text
stringlengths 2
100k
| meta
dict |
---|---|
/*
* /MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Bold/Main.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXVariants-bold"]={directory:"Variants/Bold",family:"STIXVariants",weight:"bold",Ranges:[[32,32,"All"],[119,124,"All"],[160,160,"All"],[411,411,"All"],[8242,8279,"All"],[8512,8512,"All"],[8592,8595,"All"],[8657,8674,"All"],[8709,8941,"All"]],8242:[586,-12,394,44,350],8709:[729,74,584,36,548],8726:[732,193,518,45,473],8730:[943,-28,800,112,844]};MathJax.OutputJax["HTML-CSS"].initFont("STIXVariants-bold");MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/Variants/Bold/Main.js");
| {
"pile_set_name": "Github"
} |
/*=========================================================================
Program: ParaView
Module: pqMyApplicationStarter.cxx
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#include "pqMyApplicationStarter.h"
// Server Manager Includes.
// Qt Includes.
#include <QtDebug>
// ParaView Includes.
//-----------------------------------------------------------------------------
pqMyApplicationStarter::pqMyApplicationStarter(QObject* p /*=0*/)
: QObject(p)
{
}
//-----------------------------------------------------------------------------
pqMyApplicationStarter::~pqMyApplicationStarter()
{
}
//-----------------------------------------------------------------------------
void pqMyApplicationStarter::onStartup()
{
qWarning() << "Message from pqMyApplicationStarter: Application Started";
}
//-----------------------------------------------------------------------------
void pqMyApplicationStarter::onShutdown()
{
qWarning() << "Message from pqMyApplicationStarter: Application Shutting down";
}
| {
"pile_set_name": "Github"
} |
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_vector_relational.hpp
/// @date 2008-08-03 / 2011-06-15
/// @author Christophe Riccio
///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
///
/// @defgroup core_func_vector_relational Vector Relational Functions
/// @ingroup core
///
/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to
/// operate on scalars and produce scalar Boolean results. For vector results,
/// use the following built-in functions.
///
/// In all cases, the sizes of all the input and return vectors for any particular
/// call must match.
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_CORE_func_vector_relational
#define GLM_CORE_func_vector_relational
#include "precision.hpp"
#include "setup.hpp"
#if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC10)) // Workaround a Visual C++ bug
namespace glm
{
/// @addtogroup core_func_vector_relational
/// @{
/// Returns the component-wise comparison result of x < y.
///
/// @tparam vecType Floating-point or integer vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
// TODO: Mismatched
//template <typename T, precision P, template <typename, precision> class vecType>
//GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThan(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x <= y.
///
/// @tparam vecType Floating-point or integer vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x > y.
///
/// @tparam vecType Floating-point or integer vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThan(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x >= y.
///
/// @tparam vecType Floating-point or integer vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x == y.
///
/// @tparam vecType Floating-point, integer or boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
//TODO: conflicts with definision
//template <typename T, precision P, template <typename, precision> class vecType>
//GLM_FUNC_DECL typename vecType<T, P>::bool_type equal(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the component-wise comparison of result x != y.
///
/// @tparam vecType Floating-point, integer or boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL typename vecType<T, P>::bool_type notEqual(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns true if any component of x is true.
///
/// @tparam vecType Boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool any(vecType<bool, P> const & v);
/// Returns true if all components of x are true.
///
/// @tparam vecType Boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL bool all(vecType<bool, P> const & v);
/// Returns the component-wise logical complement of x.
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
///
/// @tparam vecType Boolean vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v);
/// @}
}//namespace glm
#endif
#include "func_vector_relational.inl"
#endif//GLM_CORE_func_vector_relational
| {
"pile_set_name": "Github"
} |
define([
"../core",
"../var/strundefined"
], function( jQuery, strundefined ) {
var
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$;
jQuery.noConflict = function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
}
if ( deep && window.jQuery === jQuery ) {
window.jQuery = _jQuery;
}
return jQuery;
};
// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeof noGlobal === strundefined ) {
window.jQuery = window.$ = jQuery;
}
});
| {
"pile_set_name": "Github"
} |
===================================
Perform Quality Checks on Transfers
===================================
Create the Quality Control Point
================================
To create a *Quality Control Point*, open the *Quality* application.
Then, go to :menuselection:`Quality Control --> Control Points --> Create`. Now, you can
define the quality control point you want to apply to a specific
product. Don’t forget to select a transfer operation type.
.. image:: media/quality_transfers_01.png
:align: center
Process the Quality Check
=========================
Let’s say that we will receive a laptop. First, create a planned receipt
for the product. Then, on the receipt, you will see a *Quality Checks*
button that appears to proceed to the quality check you configured
before.
.. image:: media/quality_transfers_02.png
:align: center
By clicking on it, the instruction set on the quality control point will
be displayed and will require the check value.
.. image:: media/quality_transfers_03.png
:align: center
Once the quality check is done, you can find it linked to the
corresponding transfer and access it by clicking on the button.
.. image:: media/quality_transfers_04.png
:align: center
But, if the quality check failed, the stat button will appear in red
(instead of green) and Odoo will suggest you to create a *Quality
Alert* by highlighting the corresponding button.
.. image:: media/quality_transfers_05.png
:align: center
The quality checks can also be found in the *Quality* application by
opening the *Quality Checks* menu, under *Quality Control*.
.. image:: media/quality_transfers_06.png
:align: center | {
"pile_set_name": "Github"
} |
#!/usr/bin/env bats
# This tests contacting a registry using a token server
load helpers
user="testuser"
password="testpassword"
email="[email protected]"
base="hello-world"
@test "Test token server login" {
run docker_t login -u $user -p $password -e $email localregistry:5554
echo $output
[ "$status" -eq 0 ]
# First line is WARNING about credential save or email deprecation
[ "${lines[2]}" = "Login Succeeded" -o "${lines[1]}" = "Login Succeeded" ]
}
@test "Test token server bad login" {
run docker_t login -u "testuser" -p "badpassword" -e $email localregistry:5554
[ "$status" -ne 0 ]
run docker_t login -u "baduser" -p "testpassword" -e $email localregistry:5554
[ "$status" -ne 0 ]
}
@test "Test push and pull with token auth" {
login localregistry:5555
image="localregistry:5555/testuser/token"
build $image "$base:latest"
run docker_t push $image
echo $output
[ "$status" -eq 0 ]
docker_t rmi $image
docker_t pull $image
}
@test "Test push and pull with token auth wrong namespace" {
login localregistry:5555
image="localregistry:5555/notuser/token"
build $image "$base:latest"
run docker_t push $image
[ "$status" -ne 0 ]
}
@test "Test oauth token server login" {
version_check docker "$GOLEM_DIND_VERSION" "1.11.0"
login_oauth localregistry:5557
}
@test "Test oauth token server bad login" {
version_check docker "$GOLEM_DIND_VERSION" "1.11.0"
run docker_t login -u "testuser" -p "badpassword" -e $email localregistry:5557
[ "$status" -ne 0 ]
run docker_t login -u "baduser" -p "testpassword" -e $email localregistry:5557
[ "$status" -ne 0 ]
}
@test "Test oauth push and pull with token auth" {
version_check docker "$GOLEM_DIND_VERSION" "1.11.0"
login_oauth localregistry:5558
image="localregistry:5558/testuser/token"
build $image "$base:latest"
run docker_t push $image
echo $output
[ "$status" -eq 0 ]
docker_t rmi $image
docker_t pull $image
}
@test "Test oauth push and build with token auth" {
version_check docker "$GOLEM_DIND_VERSION" "1.11.0"
login_oauth localregistry:5558
image="localregistry:5558/testuser/token-build"
tempImage $image
run docker_t push $image
echo $output
[ "$status" -eq 0 ]
has_digest "$output"
docker_t rmi $image
image2="localregistry:5558/testuser/token-build-2"
run build $image2 $image
echo $output
[ "$status" -eq 0 ]
run docker_t push $image2
echo $output
[ "$status" -eq 0 ]
has_digest "$output"
}
@test "Test oauth push and pull with token auth wrong namespace" {
version_check docker "$GOLEM_DIND_VERSION" "1.11.0"
login_oauth localregistry:5558
image="localregistry:5558/notuser/token"
build $image "$base:latest"
run docker_t push $image
[ "$status" -ne 0 ]
}
@test "Test oauth with v1 search" {
version_check docker "$GOLEM_DIND_VERSION" "1.12.0"
run docker_t search localregistry:5600/testsearch
[ "$status" -ne 0 ]
login_oauth localregistry:5600
run docker_t search localregistry:5600/testsearch
echo $output
[ "$status" -eq 0 ]
echo $output | grep "testsearch-1"
echo $output | grep "testsearch-2"
}
| {
"pile_set_name": "Github"
} |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * calendar
#
# Translators:
# son dang <[email protected]>, 2019
# Chinh Chinh <[email protected]>, 2019
# Dao Nguyen <[email protected]>, 2019
# Martin Trigaux, 2019
# fanha99 <[email protected]>, 2019
# Tuan Tran <[email protected]>, 2019
# Nancy Momoland <[email protected]>, 2019
# Dung Nguyen Thi <[email protected]>, 2019
# Phuc Tran Thanh <[email protected]>, 2019
# Duy BQ <[email protected]>, 2020
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-05 12:34+0000\n"
"PO-Revision-Date: 2019-08-26 09:09+0000\n"
"Last-Translator: Duy BQ <[email protected]>, 2020\n"
"Language-Team: Vietnamese (https://www.transifex.com/odoo/teams/41243/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: calendar
#: model:mail.template,subject:calendar.calendar_template_meeting_reminder
msgid "${object.event_id.name} - Reminder"
msgstr "${object.event_id.name} - Nhắc nhở"
#. module: calendar
#: model:mail.template,subject:calendar.calendar_template_meeting_changedate
msgid "${object.event_id.name}: Date updated"
msgstr "${object.event_id.name}: Ngày đã được cập nhật"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid ""
"%s at %s To\n"
" %s at %s (%s)"
msgstr ""
"%s lúc %s đến\n"
"%s lúc %s (%s)"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "%s at (%s To %s) (%s)"
msgstr "%s lúc (%s đến %s) (%s)"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "%s has accepted invitation"
msgstr "%s đã chấp thuận lời mời"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "%s has declined invitation"
msgstr "%sd đã từ chối lời mời"
#. module: calendar
#: model:mail.template,body_html:calendar.calendar_template_meeting_reminder
msgid ""
"<div>\n"
" % set colors = {'needsAction': 'grey', 'accepted': 'green', 'tentative': '#FFFF00', 'declined': 'red'}\n"
" <!--\n"
" In a recurring event case, the object.event_id is always the first event\n"
" This makes the event date (and a lot of other information) incorrect\n"
" -->\n"
" % set event_id = ctx.get('force_event_id') or object.event_id\n"
" <p>\n"
" Hello ${object.common_name},<br/><br/>\n"
" This is a reminder for the below event :\n"
" </p>\n"
" <div style=\"text-align: center; margin: 16px 0px 16px 0px;\">\n"
" <a href=\"/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Accept</a>\n"
" <a href=\"/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Decline</a>\n"
" <a href=\"/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" View</a>\n"
" </div>\n"
" <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>\n"
" <td width=\"130px;\">\n"
" <div style=\"border-top-left-radius: 3px; border-top-right-radius: 3px; font-size: 12px; border-collapse: separate; text-align: center; font-weight: bold; color: #ffffff; min-height: 18px; background-color: #875A7B; border: 1px solid #875A7B;\">\n"
" ${event_id.get_interval('dayname', tz=object.partner_id.tz if not event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;\">\n"
" ${event_id.get_interval('day', tz=object.partner_id.tz if not event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;\">\n"
" ${event_id.get_interval('month', tz=object.partner_id.tz if not event_id.allday else None)}\n"
" </div>\n"
" <div style=\"border-collapse: separate; color: #5F5F5F; text-align: center; font-size: 12px; border-bottom-right-radius: 3px; font-weight: bold; border: 1px solid #875A7B; border-bottom-left-radius: 3px;\">\n"
" ${not event_id.allday and event_id.get_interval('time', tz=object.partner_id.tz) or ''}\n"
" </div>\n"
" </td>\n"
" <td width=\"20px;\"/>\n"
" <td style=\"padding-top: 5px;\">\n"
" <p><strong>Details of the event</strong></p>\n"
" <ul>\n"
" % if object.event_id.location:\n"
" <li>Location: ${object.event_id.location}\n"
" (<a target=\"_blank\" href=\"http://maps.google.com/maps?oi=map&q=${object.event_id.location}\">View Map</a>)\n"
" </li>\n"
" % endif\n"
" % if object.event_id.description :\n"
" <li>Description: ${object.event_id.description}</li>\n"
" % endif\n"
" % if not object.event_id.allday and object.event_id.duration\n"
" <li>Duration: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}</li>\n"
" % endif\n"
" <li>Attendees\n"
" <ul>\n"
" % for attendee in object.event_id.attendee_ids:\n"
" <li>\n"
" <div style=\"display: inline-block; border-radius: 50%; width: 10px; height: 10px; background:${colors[attendee.state] or 'white'};\"> </div>\n"
" % if attendee.common_name != object.common_name:\n"
" <span style=\"margin-left:5px\">${attendee.common_name}</span>\n"
" % else:\n"
" <span style=\"margin-left:5px\">You</span>\n"
" % endif\n"
" </li>\n"
" % endfor\n"
" </ul></li>\n"
" </ul>\n"
" </td>\n"
" </tr></table>\n"
" <br/>\n"
" Thank you,\n"
" <br/>\n"
" % if object.event_id.user_id and object.event_id.user_id.signature:\n"
" ${object.event_id.user_id.signature | safe}\n"
" % endif\n"
"</div>\n"
" "
msgstr ""
#. module: calendar
#: model:mail.template,body_html:calendar.calendar_template_meeting_invitation
msgid ""
"<div>\n"
" % set colors = {'needsAction': 'grey', 'accepted': 'green', 'tentative': '#FFFF00', 'declined': 'red'}\n"
" <p>\n"
" Hello ${object.common_name},<br/><br/>\n"
" ${object.event_id.user_id.partner_id.name} invited you for the ${object.event_id.name} meeting of ${object.event_id.user_id.company_id.name}.\n"
" </p>\n"
" <div style=\"text-align: center; margin: 16px 0px 16px 0px;\">\n"
" <a href=\"/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Accept</a>\n"
" <a href=\"/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Decline</a>\n"
" <a href=\"/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" View</a>\n"
" </div>\n"
" <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>\n"
" <td width=\"130px;\">\n"
" <div style=\"border-top-left-radius: 3px; border-top-right-radius: 3px; font-size: 12px; border-collapse: separate; text-align: center; font-weight: bold; color: #ffffff; min-height: 18px; background-color: #875A7B; border: 1px solid #875A7B;\">\n"
" ${object.event_id.get_interval('dayname', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;\">\n"
" ${object.event_id.get_interval('day', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;\">\n"
" ${object.event_id.get_interval('month', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"border-collapse: separate; color: #5F5F5F; text-align: center; font-size: 12px; border-bottom-right-radius: 3px; font-weight: bold; border: 1px solid #875A7B; border-bottom-left-radius: 3px;\">\n"
" ${not object.event_id.allday and object.event_id.get_interval('time', tz=object.partner_id.tz) or ''}\n"
" </div>\n"
" </td>\n"
" <td width=\"20px;\"/>\n"
" <td style=\"padding-top: 5px;\">\n"
" <p><strong>Details of the event</strong></p>\n"
" <ul>\n"
" % if object.event_id.location:\n"
" <li>Location: ${object.event_id.location}\n"
" (<a target=\"_blank\" href=\"http://maps.google.com/maps?oi=map&q=${object.event_id.location}\">View Map</a>)\n"
" </li>\n"
" % endif\n"
" % if object.event_id.description :\n"
" <li>Description: ${object.event_id.description}</li>\n"
" % endif\n"
" % if not object.event_id.allday and object.event_id.duration\n"
" <li>Duration: ${('%dH%02d' % (object.event_id.duration,round(object.event_id.duration*60)%60))}</li>\n"
" % endif\n"
" <li>Attendees\n"
" <ul>\n"
" % for attendee in object.event_id.attendee_ids:\n"
" <li>\n"
" <div style=\"display: inline-block; border-radius: 50%; width: 10px; height: 10px; background:${colors[attendee.state] or 'white'};\"> </div>\n"
" % if attendee.common_name != object.common_name:\n"
" <span style=\"margin-left:5px\">${attendee.common_name}</span>\n"
" % else:\n"
" <span style=\"margin-left:5px\">You</span>\n"
" % endif\n"
" </li>\n"
" % endfor\n"
" </ul></li>\n"
" </ul>\n"
" </td>\n"
" </tr></table>\n"
" <br/>\n"
" Thank you,\n"
" <br/>\n"
" % if object.event_id.user_id and object.event_id.user_id.signature:\n"
" ${object.event_id.user_id.signature | safe}\n"
" % endif\n"
"</div>\n"
" "
msgstr ""
#. module: calendar
#: model:mail.template,body_html:calendar.calendar_template_meeting_changedate
msgid ""
"<div>\n"
" % set colors = {'needsAction': 'grey', 'accepted': 'green', 'tentative': '#FFFF00', 'declined': 'red'}\n"
" <p>\n"
" Hello ${object.common_name},<br/><br/>\n"
" The date of the meeting has been updated. The meeting ${object.event_id.name} created by ${object.event_id.user_id.partner_id.name} is now scheduled for ${object.event_id.get_display_time_tz(tz=object.partner_id.tz)}.\n"
" </p>\n"
" <div style=\"text-align: center; margin: 16px 0px 16px 0px;\">\n"
" <a href=\"/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Accept</a>\n"
" <a href=\"/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" Decline</a>\n"
" <a href=\"/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}\" style=\"padding: 5px 10px; color: #FFFFFF; text-decoration: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius: 3px\">\n"
" View</a>\n"
" </div>\n"
" <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>\n"
" <td width=\"130px;\">\n"
" <div style=\"border-top-left-radius: 3px; border-top-right-radius: 3px; font-size: 12px; border-collapse: separate; text-align: center; font-weight: bold; color: #ffffff; min-height: 18px; background-color: #875A7B; border: 1px solid #875A7B;\">\n"
" ${object.event_id.get_interval('dayname', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;\">\n"
" ${object.event_id.get_interval('day', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;\">\n"
" ${object.event_id.get_interval('month', tz=object.partner_id.tz if not object.event_id.allday else None)}\n"
" </div>\n"
" <div style=\"border-collapse: separate; color: #5F5F5F; text-align: center; font-size: 12px; border-bottom-right-radius: 3px; font-weight: bold; border: 1px solid #875A7B; border-bottom-left-radius: 3px;\">\n"
" ${not object.event_id.allday and object.event_id.get_interval('time', tz=object.partner_id.tz) or ''}\n"
" </div>\n"
" </td>\n"
" <td width=\"20px;\"/>\n"
" <td style=\"padding-top: 5px;\">\n"
" <p><strong>Details of the event</strong></p>\n"
" <ul>\n"
" % if object.event_id.location:\n"
" <li>Location: ${object.event_id.location}\n"
" (<a target=\"_blank\" href=\"http://maps.google.com/maps?oi=map&q=${object.event_id.location}\">View Map</a>)\n"
" </li>\n"
" % endif\n"
" % if object.event_id.description :\n"
" <li>Description: ${object.event_id.description}</li>\n"
" % endif\n"
" % if not object.event_id.allday and object.event_id.duration\n"
" <li>Duration: ${('%dH%02d' % (object.event_id.duration,round(object.event_id.duration*60)%60))}</li>\n"
" % endif\n"
" <li>Attendees\n"
" <ul>\n"
" % for attendee in object.event_id.attendee_ids:\n"
" <li>\n"
" <div style=\"display: inline-block; border-radius: 50%; width: 10px; height: 10px; background: ${colors[attendee.state] or 'white'};\"> </div>\n"
" % if attendee.common_name != object.common_name:\n"
" <span style=\"margin-left:5px\">${attendee.common_name}</span>\n"
" % else:\n"
" <span style=\"margin-left:5px\">You</span>\n"
" % endif\n"
" </li>\n"
" % endfor\n"
" </ul></li>\n"
" </ul>\n"
" </td>\n"
" </tr></table>\n"
" <br/>\n"
" Thank you,\n"
" <br/>\n"
" % if object.event_id.user_id and object.event_id.user_id.signature:\n"
" ${object.event_id.user_id.signature | safe}\n"
" % endif\n"
"</div>\n"
" "
msgstr ""
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "<span> hours</span>"
msgstr "<span> giờ</span>"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/base_calendar.xml:0
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
#, python-format
msgid "Accept"
msgstr "Chấp thuận"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__state__accepted
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__attendee_status__accepted
msgid "Accepted"
msgstr "Được chấp thuận"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_needaction
msgid "Action Needed"
msgstr "Hành động cần thiết"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_mail_activity_type__category
msgid "Action to Perform"
msgstr ""
#. module: calendar
#: model:ir.model.fields,help:calendar.field_mail_activity_type__category
msgid ""
"Actions may trigger specific behavior like opening calendar view or "
"automatically mark as done when a document is uploaded"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__active
#: model:ir.model.fields,field_description:calendar.field_calendar_event__active
msgid "Active"
msgstr "Có hiệu lực"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__activity_ids
msgid "Activities"
msgstr "Các hoạt động"
#. module: calendar
#: model:ir.model,name:calendar.model_mail_activity
msgid "Activity"
msgstr "Hoạt động"
#. module: calendar
#: model:ir.model,name:calendar.model_mail_activity_type
msgid "Activity Type"
msgstr "Kiểu hoạt động"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/base_calendar.xml:0
#: model:ir.model.fields,field_description:calendar.field_calendar_event__allday
#, python-format
msgid "All Day"
msgstr "Cả ngày"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "AllDay , %s"
msgstr "Cả ngày , %s"
#. module: calendar
#: model:ir.model.constraint,message:calendar.constraint_calendar_contacts_user_id_partner_id_unique
msgid "An user cannot have twice the same contact."
msgstr "Người dùng không thể có hai liên hệ."
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Archived"
msgstr "Đã lưu"
#. module: calendar
#: model:ir.model,name:calendar.model_ir_attachment
msgid "Attachment"
msgstr "Đính kèm"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_attachment_count
msgid "Attachment Count"
msgstr "Số lượng tập tin đính kèm"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__is_attendee
msgid "Attendee"
msgstr "Tham dự"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__attendee_status
msgid "Attendee Status"
msgstr "Tình trạng Tham dự"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__partner_ids
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Attendees"
msgstr "Người Tham dự"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Availability"
msgstr "Khả dụng"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__availability__busy
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__show_as__busy
#, python-format
msgid "Busy"
msgstr "Bận"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__byday
msgid "By day"
msgstr "Theo ngày"
#. module: calendar
#: model:ir.ui.menu,name:calendar.mail_menu_calendar
#: model:ir.ui.menu,name:calendar.menu_calendar_configuration
msgid "Calendar"
msgstr "Lịch"
#. module: calendar
#: model:ir.actions.act_window,name:calendar.action_calendar_alarm
#: model:ir.ui.menu,name:calendar.menu_calendar_alarm
#: model_terms:ir.ui.view,arch_db:calendar.calendar_alarm_view_form
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_alarm_tree
msgid "Calendar Alarm"
msgstr "Báo động Lịch"
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_attendee
msgid "Calendar Attendee Information"
msgstr ""
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_contacts
msgid "Calendar Contacts"
msgstr ""
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_event
msgid "Calendar Event"
msgstr "Lịch sự kiện"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Calendar Invitation"
msgstr "Mời tham dự"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_mail_activity__calendar_event_id
msgid "Calendar Meeting"
msgstr "Lịch họp mặt"
#. module: calendar
#: model:ir.actions.server,name:calendar.ir_cron_scheduler_alarm_ir_actions_server
#: model:ir.cron,cron_name:calendar.ir_cron_scheduler_alarm
#: model:ir.cron,name:calendar.ir_cron_scheduler_alarm
msgid "Calendar: Event Reminder"
msgstr "Lịch: Nhắc nhở sự kiện"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Click here to update only this instance and not all recurrences."
msgstr ""
"Bấm để cập nhật chỉ sự kiện này (mà không phải các sự kiện khác trong cùng "
"chuỗi lặp lại của nó)"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__common_name
msgid "Common name"
msgstr "Tên phổ thông"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__state__open
msgid "Confirmed"
msgstr "Đã được xác nhận"
#. module: calendar
#: model:ir.model,name:calendar.model_res_partner
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__partner_id
msgid "Contact"
msgstr "Danh bạ"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__create_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__create_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__create_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_event__create_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__create_uid
msgid "Created by"
msgstr "Được tạo bởi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__create_date
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__create_date
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__create_date
#: model:ir.model.fields,field_description:calendar.field_calendar_event__create_date
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__create_date
msgid "Created on"
msgstr "Thời điểm tạo"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__display_start
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Date"
msgstr "Ngày"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__day
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__month_by__date
msgid "Date of month"
msgstr "Ngày trong tháng"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Day of Month"
msgstr "Ngày trong Tháng"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__month_by__day
msgid "Day of month"
msgstr "Ngày trong tháng"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_alarm__interval__days
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__rrule_type__daily
msgid "Days"
msgstr "Ngày"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/base_calendar.xml:0
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
#, python-format
msgid "Decline"
msgstr "Từ chối"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__state__declined
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__attendee_status__declined
msgid "Declined"
msgstr "Bị Từ chối"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__description
msgid "Description"
msgstr "Mô tả"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/notification_calendar.xml:0
#, python-format
msgid "Details"
msgstr "Chi tiết"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__display_name
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm_manager__display_name
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__display_name
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__display_name
#: model:ir.model.fields,field_description:calendar.field_calendar_event__display_name
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__display_name
msgid "Display Name"
msgstr "Tên hiển thị"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Document"
msgstr "Tài liệu"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__res_id
msgid "Document ID"
msgstr "ID Tài liệu"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__res_model_id
msgid "Document Model"
msgstr "Model tài liệu"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__res_model
msgid "Document Model Name"
msgstr "Tên Model tài liệu"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__duration
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Duration"
msgstr "Thời lượng"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__duration_minutes
#: model:ir.model.fields,help:calendar.field_calendar_alarm__duration_minutes
msgid "Duration in minutes"
msgstr "Thời lượng theo phút"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__email
#: model:ir.model.fields.selection,name:calendar.selection__calendar_alarm__alarm_type__email
msgid "Email"
msgstr "Tên đăng nhập / Email"
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_mail_1
msgid "Email - 3 Hours"
msgstr ""
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_mail_2
msgid "Email - 6 Hours"
msgstr ""
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_attendee__email
msgid "Email of Invited Person"
msgstr "Email của Người được mời"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__partner_id
msgid "Employee"
msgstr "Nhân viên"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__stop_date
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_tree
msgid "End Date"
msgstr "Ngày kết thúc"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__stop_datetime
msgid "End Datetime"
msgstr "Ngày giờ Kết thúc"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__end_type__end_date
msgid "End date"
msgstr "Ngày kết thúc"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Ending at"
msgstr "Kết thúc vào"
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_alarm
msgid "Event Alarm"
msgstr ""
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_alarm_manager
msgid "Event Alarm Manager"
msgstr ""
#. module: calendar
#: model:ir.model,name:calendar.model_calendar_event_type
msgid "Event Meeting Type"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__display_time
msgid "Event Time"
msgstr "Thời gian Sự kiện"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__privacy__public
msgid "Everyone"
msgstr "Mọi người"
#. module: calendar
#: code:addons/calendar/models/mail_activity.py:0
#, python-format
msgid "Feedback: "
msgstr "Phản hồi:"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__5
msgid "Fifth"
msgstr "Thứ 5"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__1
msgid "First"
msgstr "Đầu tiên"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "First you have to specify the date of the invitation."
msgstr "Đầu tiên, bạn phải xác định ngày cho lời mời."
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_follower_ids
msgid "Followers"
msgstr "Người theo dõi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_channel_ids
msgid "Followers (Channels)"
msgstr "Người theo dõi (Kênh)"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_partner_ids
msgid "Followers (Partners)"
msgstr "Người theo dõi (Đối tác)"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__4
msgid "Fourth"
msgstr "Thứ tư"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__availability__free
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__show_as__free
msgid "Free"
msgstr "Rảnh"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__availability
msgid "Free/Busy"
msgstr "Rảnh/Bận"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__fr
msgid "Fri"
msgstr "Thứ sáu"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__fr
msgid "Friday"
msgstr "Thứ sáu"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Group By"
msgstr "Nhóm theo"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "Group by date is not supported, use the calendar view instead."
msgstr ""
"Nhóm theo ngày không được hỗ trợ, thay vì thế hãy sử dụng giao diện lịch"
#. module: calendar
#: model:ir.model,name:calendar.model_ir_http
msgid "HTTP Routing"
msgstr "HTTP Routing"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_alarm__interval__hours
msgid "Hours"
msgstr "Giờ"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__id
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm_manager__id
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__id
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__id
#: model:ir.model.fields,field_description:calendar.field_calendar_event__id
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__id
msgid "ID"
msgstr "ID"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__message_needaction
#: model:ir.model.fields,help:calendar.field_calendar_event__message_unread
msgid "If checked, new messages require your attention."
msgstr "Nếu chọn, các tin nhắn mới yêu cầu sự có mặt của bạn."
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__message_has_error
msgid "If checked, some messages have a delivery error."
msgstr "Nếu đánh dấu thì một số thông điệp có lỗi."
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__active
msgid ""
"If the active field is set to false, it will allow you to hide the event "
"alarm information without removing it."
msgstr ""
"Nếu trường Hiệu lực được thiết lập là false, thông tin báo động sự kiện có "
"thể được ẩn đi mà không cần xoá nó."
#. module: calendar
#: model:mail.message.subtype,name:calendar.subtype_invitation
msgid "Invitation"
msgstr "Lời mời"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__access_token
msgid "Invitation Token"
msgstr "Token Lời mời"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Invitation details"
msgstr "Chi tiết lời mời"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Invitation for"
msgstr "Mời tham dự"
#. module: calendar
#: model:mail.template,subject:calendar.calendar_template_meeting_invitation
msgid "Invitation to ${object.event_id.name}"
msgstr ""
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Invitations"
msgstr "Lời mời"
#. module: calendar
#: model:ir.model,name:calendar.model_mail_wizard_invite
msgid "Invite wizard"
msgstr "Đồ thuật Mời"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_is_follower
msgid "Is Follower"
msgstr "Trở thành người theo dõi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__is_highlighted
msgid "Is the Event Highlighted"
msgstr "Sự kiện được đánh dấu"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__-1
msgid "Last"
msgstr "Gần nhất"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm____last_update
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm_manager____last_update
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee____last_update
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts____last_update
#: model:ir.model.fields,field_description:calendar.field_calendar_event____last_update
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type____last_update
msgid "Last Modified on"
msgstr "Sửa lần cuối"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__write_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__write_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__write_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_event__write_uid
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__write_uid
msgid "Last Updated by"
msgstr "Cập nhật gần đây bởi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__write_date
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__write_date
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__write_date
#: model:ir.model.fields,field_description:calendar.field_calendar_event__write_date
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__write_date
msgid "Last Updated on"
msgstr "Cập nhật gần đây vào"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_res_partner__calendar_last_notif_ack
#: model:ir.model.fields,field_description:calendar.field_res_users__calendar_last_notif_ack
msgid "Last notification marked as read from base Calendar"
msgstr "Thông báo gần nhất được đánh dấu là đã đọc từ Lịch cơ sở"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__rrule_type
msgid "Let the event automatically repeat at that interval"
msgstr "Cho sự kiện tự động lặp lại theo khoảng thời gian đó"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__location
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Location"
msgstr "Địa điểm"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__location
msgid "Location of Event"
msgstr "Địa điểm của Sự kiện"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Logo"
msgstr "Biểu tượng"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_main_attachment_id
msgid "Main Attachment"
msgstr "Tệp đính kèm chính"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_contacts__user_id
msgid "Me"
msgstr "Tôi"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__mail_activity_type__category__meeting
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Meeting"
msgstr "Cuộc họp"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "Meeting '%s' starts '%s' and ends '%s'"
msgstr "Cuộc họp '%s' bắt đầu lúc '%s' và kết thúc '%s'"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Meeting Details"
msgstr "Chi tiết Cuộc gặp"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__name
msgid "Meeting Subject"
msgstr "Chủ đề Cuộc gặp"
#. module: calendar
#: model:ir.actions.act_window,name:calendar.action_calendar_event_type
#: model:ir.ui.menu,name:calendar.menu_calendar_event_type
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_type_tree
msgid "Meeting Types"
msgstr "Kiểu Cuộc gặp"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__event_id
msgid "Meeting linked"
msgstr "Liên kết cuộc họp"
#. module: calendar
#: model:ir.actions.act_window,name:calendar.action_calendar_event
#: model:ir.actions.act_window,name:calendar.action_calendar_event_notify
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_tree
msgid "Meetings"
msgstr "Cuộc gặp"
#. module: calendar
#: model:ir.model,name:calendar.model_mail_message
msgid "Message"
msgstr "Thông báo"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_has_error
msgid "Message Delivery error"
msgstr "Thông báo gửi đi gặp lỗi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_ids
msgid "Messages"
msgstr "Thông báo"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_alarm__interval__minutes
msgid "Minutes"
msgstr "Phút"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Misc"
msgstr "Khác"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__mo
msgid "Mon"
msgstr "Thứ 2"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__mo
msgid "Monday"
msgstr "Thứ Hai"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__rrule_type__monthly
msgid "Months"
msgstr "Tháng"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "My Meetings"
msgstr "Cuộc gặp của tôi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__name
#: model:ir.model.fields,field_description:calendar.field_calendar_event_type__name
msgid "Name"
msgstr "Tên"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__state__needsaction
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__attendee_status__needsaction
msgid "Needs Action"
msgstr "Cần có Hành động"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "No I'm not going."
msgstr "Không, tôi sẽ không tham dự."
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_alarm__alarm_type__notification
msgid "Notification"
msgstr "Thông báo"
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_notif_5
msgid "Notification - 1 Days"
msgstr ""
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_notif_3
msgid "Notification - 1 Hours"
msgstr ""
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_notif_1
msgid "Notification - 15 Minutes"
msgstr ""
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_notif_4
msgid "Notification - 2 Hours"
msgstr ""
#. module: calendar
#: model:calendar.alarm,name:calendar.alarm_notif_2
msgid "Notification - 30 Minutes"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_needaction_counter
msgid "Number of Actions"
msgstr "Số lượng hành động"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_has_error_counter
msgid "Number of errors"
msgstr "Số lỗi"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__message_needaction_counter
msgid "Number of messages which requires an action"
msgstr "Số thông báo cần xử lý"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr "Số lượng tin gửi đi bị lỗi"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__end_type__count
msgid "Number of repetitions"
msgstr "Số lần tái diễn"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__message_unread_counter
msgid "Number of unread messages"
msgstr "Số tin chưa đọc"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/notification_calendar.xml:0
#, python-format
msgid "OK"
msgstr "OK"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__privacy__confidential
msgid "Only internal users"
msgstr "Chỉ Người dùng nội bộ"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__privacy__private
msgid "Only me"
msgstr "Chỉ tôi"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.mail_activity_view_form_popup
msgid "Open Calendar"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__month_by
msgid "Option"
msgstr "Tùy chọn"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Options"
msgstr "Tùy chọn"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__user_id
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Owner"
msgstr "Người phụ trách"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__attendee_ids
msgid "Participant"
msgstr "Người tham gia"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__partner_id
msgid "Partner-related data of the user"
msgstr "Đối tác liên hệ dữ liệu với tài khoản"
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "Please select a proper day of the month."
msgstr "Vui lòng chọn một ngày phù hợp trong tháng."
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__privacy
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Privacy"
msgstr "Tính riêng tư"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__rrule_type
msgid "Recurrence"
msgstr "Nhắc lại"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__end_type
msgid "Recurrence Termination"
msgstr "Kết thúc Tái diễn"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__recurrency
msgid "Recurrent"
msgstr "Lặp lại"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__recurrent_id
msgid "Recurrent ID"
msgstr "Mã định kỳ"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__recurrent_id_date
msgid "Recurrent ID date"
msgstr "Ngày Mã định kỳ"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__recurrency
msgid "Recurrent Meeting"
msgstr "Cuộc gặp có tính chất tái diễn theo chu kỳ"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__rrule
msgid "Recurrent Rule"
msgstr "Quy tắc lặp lại"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__duration
msgid "Remind Before"
msgstr "Nhắc trước"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__alarm_ids
msgid "Reminders"
msgstr "Nhắc nhở"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__count
msgid "Repeat"
msgstr "Lặp"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__interval
msgid "Repeat Every"
msgstr "Lặp lại mỗi"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__final_date
msgid "Repeat Until"
msgstr "Lặp lại cho đến"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__interval
msgid "Repeat every (Days/Week/Month/Year)"
msgstr "Lặp lại mỗi (Ngày/Tuần/Tháng/Năm)"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__count
msgid "Repeat x times"
msgstr "Lặp lại x lần"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__partner_id
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Responsible"
msgstr "Người phụ trách"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__sa
msgid "Sat"
msgstr "Thứ 7"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__sa
msgid "Saturday"
msgstr "Thứ Bảy"
#. module: calendar
#: model_terms:ir.actions.act_window,help:calendar.action_calendar_event
msgid "Schedule a new meeting"
msgstr ""
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_search
msgid "Search Meetings"
msgstr "Tìm kiếm Cuộc gặp"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__2
msgid "Second"
msgstr "Giây"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Select attendees..."
msgstr "Chọn người tham dự..."
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Send mail"
msgstr "Gửi thư"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__show_as
msgid "Show Time as"
msgstr "Hiển thị Thời gian là"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/notification_calendar.xml:0
#, python-format
msgid "Snooze"
msgstr "Tạm dừng"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__start
msgid "Start"
msgstr "Khởi động"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__start_date
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_tree
msgid "Start Date"
msgstr "Ngày bắt đầu"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__start_datetime
msgid "Start DateTime"
msgstr "Ngày giờ Bắt đầu"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__start
msgid "Start date of an event, without time for full days events"
msgstr ""
"Ngày bắt đầu của sự kiện, không có giờ đối với các sự kiện kéo dài cả ngày"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Starting at"
msgstr "Bắt đầu vào"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_attendee__state
#: model:ir.model.fields,field_description:calendar.field_calendar_event__state
msgid "Status"
msgstr "Trạng thái"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_attendee__state
msgid "Status of the attendee's participation"
msgstr "Tình trạng tham dự của Người tham dự"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Status:"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__stop
msgid "Stop"
msgstr "Dừng"
#. module: calendar
#: model:ir.model.fields,help:calendar.field_calendar_event__stop
msgid "Stop date of an event, without time for full days events"
msgstr ""
"Ngày kết thúc của một sự kiện, không có thời gian đối với các sự kiện diễn "
"ra cả ngày"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_tree
msgid "Subject"
msgstr "Chủ đề"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__su
msgid "Sun"
msgstr "CN"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__su
msgid "Sunday"
msgstr "Chủ nhật"
#. module: calendar
#: model:ir.model.constraint,message:calendar.constraint_calendar_event_type_name_uniq
msgid "Tag name already exists !"
msgstr "Tên từ khóa đã tồn tại!"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__categ_ids
msgid "Tags"
msgstr "Tag"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "The"
msgstr "The"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/js/mail_activity.js:0
#, python-format
msgid ""
"The activity is linked to a meeting. Deleting it will remove the meeting as "
"well. Do you want to proceed ?"
msgstr ""
"Hoạt động này được liên kết với một cuộc họp. Việc xóa nó cũng sẽ xóa cuộc "
"họp. Bạn có muốn tiếp tục?"
#. module: calendar
#: model_terms:ir.actions.act_window,help:calendar.action_calendar_event
msgid ""
"The calendar is shared between employees and fully integrated with\n"
" other applications such as the employee leaves or the business\n"
" opportunities."
msgstr ""
"Lịch được chia sẻ giữa các nhân viên và được tích hợp đầy đủ với\n"
" các ứng dụng khác như nhân viên hoặc cơ hội kinh doanh."
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid ""
"The ending date and time cannot be earlier than the starting date and time."
msgstr ""
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "The ending date cannot be earlier than the starting date."
msgstr ""
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "The interval cannot be negative."
msgstr ""
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "The number of repetitions cannot be negative."
msgstr ""
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__byday__3
msgid "Third"
msgstr "Thứ 3"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "This event is linked to a recurrence...<br/>"
msgstr "Sự kiện này nằm trong một chuỗi tái lặp...<br/>"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__th
msgid "Thu"
msgstr "Thứ 5"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__th
msgid "Thursday"
msgstr "Thứ năm"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__event_tz
msgid "Timezone"
msgstr "Múi giờ"
#. module: calendar
#: code:addons/calendar/models/res_users.py:0
#, python-format
msgid "Today's Meetings"
msgstr ""
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__tu
msgid "Tue"
msgstr "Thứ 3"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__tu
msgid "Tuesday"
msgstr "Thứ Ba"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__alarm_type
msgid "Type"
msgstr "Loại"
#. module: calendar
#. openerp-web
#: code:addons/calendar/static/src/xml/base_calendar.xml:0
#: model:ir.model.fields.selection,name:calendar.selection__calendar_attendee__state__tentative
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__attendee_status__tentative
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
#, python-format
msgid "Uncertain"
msgstr "Không chắc chắn"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__state__draft
msgid "Unconfirmed"
msgstr "Chưa xác nhận"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_alarm__interval
msgid "Unit"
msgstr "Đơn vị"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_unread
msgid "Unread Messages"
msgstr "Tin chưa đọc"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__message_unread_counter
msgid "Unread Messages Counter"
msgstr "Bộ đếm tin chưa đọc"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Until"
msgstr "Cho đến"
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "Update only this instance"
msgstr "Chỉ cập nhật instance này"
#. module: calendar
#: model:ir.model,name:calendar.model_res_users
msgid "Users"
msgstr "Người dùng"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__we
msgid "Wed"
msgstr "Thứ 4"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__week_list__we
msgid "Wednesday"
msgstr "Thứ Tư"
#. module: calendar
#: model:ir.model.fields,field_description:calendar.field_calendar_event__week_list
msgid "Weekday"
msgstr "Ngày trong tuần"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__rrule_type__weekly
msgid "Weeks"
msgstr "Tuần"
#. module: calendar
#: model:ir.model.fields.selection,name:calendar.selection__calendar_event__rrule_type__yearly
msgid "Years"
msgstr ""
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.invitation_page_anonymous
msgid "Yes I'm going."
msgstr "Có, tôi sẽ tham gia."
#. module: calendar
#: code:addons/calendar/models/calendar.py:0
#, python-format
msgid "You cannot duplicate a calendar attendee."
msgstr "Bạn không thể đúp thành phần tham dự."
#. module: calendar
#: model_terms:ir.ui.view,arch_db:calendar.view_calendar_event_form
msgid "e.g. Business Lunch"
msgstr "vd Ăn trưa công việc"
| {
"pile_set_name": "Github"
} |
{
"images": [
{
"idiom": "universal"
},
{
"filename": "Graph.png",
"scale": "1x",
"idiom": "universal"
},
{
"filename": "[email protected]",
"scale": "2x",
"idiom": "universal"
},
{
"filename": "[email protected]",
"scale": "3x",
"idiom": "universal"
},
{
"idiom": "iphone"
},
{
"scale": "1x",
"idiom": "iphone"
},
{
"scale": "2x",
"idiom": "iphone"
},
{
"subtype": "retina4",
"scale": "2x",
"idiom": "iphone"
},
{
"scale": "3x",
"idiom": "iphone"
},
{
"idiom": "ipad"
},
{
"scale": "1x",
"idiom": "ipad"
},
{
"scale": "2x",
"idiom": "ipad"
},
{
"idiom": "watch"
},
{
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{130,145}",
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{146,165}",
"scale": "2x",
"idiom": "watch"
},
{
"idiom": "mac"
},
{
"scale": "1x",
"idiom": "mac"
},
{
"scale": "2x",
"idiom": "mac"
},
{
"idiom": "car"
},
{
"scale": "2x",
"idiom": "car"
},
{
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"subtype": "retina4",
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "watch"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{130,145}",
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{146,165}",
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"subtype": "retina4",
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "watch"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{130,145}",
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"screenWidth": "{146,165}",
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "watch"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "mac"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
} | {
"pile_set_name": "Github"
} |
# Event 226 - task_0
###### Version: 0
## Description
None
## Data Dictionary
|Standard Name|Field Name|Type|Description|Sample Value|
|---|---|---|---|---|
|TBD|fid_Controller|Pointer|None|`None`|
|TBD|fid_HeaderVersion|UInt8|None|`None`|
|TBD|fid_HeaderFlagBitHost|UInt8|None|`None`|
|TBD|fid_HeaderFlagBitRetry|UInt8|None|`None`|
|TBD|fid_HeaderFlagBitTimeStamp|UInt8|None|`None`|
|TBD|fid_HeaderSubType|UInt8|None|`None`|
|TBD|fid_HeaderType|UInt8|None|`None`|
|TBD|fid_HeaderLength|UInt16|None|`None`|
|TBD|fid_HeaderDeviceHandle|UInt16|None|`None`|
|TBD|fid_HeaderDeviceAddress|UInt8|None|`None`|
|TBD|fid_HeaderSSID|UInt8|None|`None`|
|TBD|fid_HeaderStatusCode|UInt8|None|`None`|
|TBD|fid_HeaderDialogToken|UInt16|None|`None`|
## Tags
* etw_level_Informational
* etw_keywords_MAUSBTraffic
* etw_opcode_Information
* etw_task_task_0 | {
"pile_set_name": "Github"
} |
extern int bar();
int foo ()
{
return bar();
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="0"
android:endColor="#00000000"
android:startColor="#99000000" >
</gradient>
</shape> | {
"pile_set_name": "Github"
} |
flow_borrows.adb:11:06: info: data dependencies proved
| {
"pile_set_name": "Github"
} |
// lydian_diat.scl
//
// Lydian Diatonic Tonos
//
@60
:intervals
261.6255653006
275.39533189537
290.69507255622
327.03195662575
348.83408706747
373.75080757229
387.59343007496
402.50086969323
436.04260883433
455.00098313148
475.68284600109
498.33441009638
523.2511306012
550.79066379074
581.39014511244
654.0639132515
697.66817413493
747.50161514457
852.70554616492
805.00173938646
872.08521766867
910.00196626296
951.36569200218
996.66882019276
1046.5022612024
| {
"pile_set_name": "Github"
} |
require 'set'
require 'surrounded/exceptions'
require 'surrounded/context/role_map'
require 'surrounded/context/role_builders'
require 'surrounded/context/initializing'
require 'surrounded/context/forwarding'
require 'surrounded/context/trigger_controls'
require 'surrounded/access_control'
require 'surrounded/shortcuts'
require 'surrounded/east_oriented'
require 'surrounded/context/name_collision_detector'
# Extend your classes with Surrounded::Context to handle their
# initialization and application of behaviors to the role players
# passed into the constructor.
#
# The purpose of this module is to help you create context objects
# which encapsulate the interaction and behavior of objects inside.
module Surrounded
module Context
def self.extended(base)
base.class_eval {
extend RoleBuilders, Initializing, Forwarding, NameCollisionDetector
@triggers = Set.new
include InstanceMethods
trigger_mod = Module.new
const_set('TriggerMethods', trigger_mod)
include trigger_mod
extend TriggerControls
}
end
private
# Set the default type of implementation for role methods for all contexts.
def self.default_role_type
@default_role_type ||= :module
end
class << self
attr_writer :default_role_type
end
def default_role_type
@default_role_type ||= Surrounded::Context.default_role_type
end
# Set the default type of implementation for role method for an individual context.
def default_role_type=(type)
@default_role_type = type
end
# Provide the ability to create access control methods for your triggers.
def protect_triggers; self.extend(::Surrounded::AccessControl); end
# Automatically create class methods for each trigger method.
def shortcut_triggers; self.extend(::Surrounded::Shortcuts); end
# Automatically return the context object from trigger methods.
def east_oriented_triggers; self.extend(::Surrounded::EastOriented); end
# === Utility shortcuts
def role_const_defined?(name)
const_defined?(name, false)
end
# Set a named constant and make it private
def private_const_set(name, const)
unless role_const_defined?(name)
const = const_set(name, const)
private_constant name.to_sym
end
const
end
# Create attr_reader for the named methods and make them private
def private_attr_reader(*method_names)
attr_reader(*method_names)
private(*method_names)
end
# Conditional const_get for a named role behavior
def role_const(name)
if role_const_defined?(name)
const_get(name)
end
end
# Allow alternative implementations for the role map
# This requires that the specified mapper klass have an
# initializer method called 'from_base' which accepts a
# class name used to initialize the base object
def role_mapper_class(mapper: RoleMap, base: ::Triad)
@role_mapper_class ||= mapper.from_base(base)
end
module InstanceMethods
# Check whether a given name is a role inside the context.
# The provided block is used to evaluate whether or not the caller
# is allowed to inquire about the roles.
def role?(name, &block)
return false unless role_map.role?(name)
accessor = block.binding.eval('self')
role_map.role_player?(accessor) && role_map.assigned_player(name)
end
# Check if a given object is a role player in the context.
def role_player?(obj)
role_map.role_player?(obj)
end
# Return a Set of all defined triggers
def triggers
self.class.triggers
end
def rebind(**options_hash)
clear_instance_variables
begin
initialize(options_hash)
rescue ArgumentError
initialize(*options_hash.values)
end
self
end
private
def clear_instance_variables
instance_variables.each{|ivar| remove_instance_variable(ivar) }
end
def role_map
@role_map ||= role_mapper_class.new
end
def map_roles(role_object_array)
detect_collisions role_object_array
role_object_array.to_a.each do |role, object|
if self.respond_to?("map_role_#{role}")
self.send("map_role_#{role}", object)
else
map_role(role, role_behavior_name(role), object)
map_role_collection(role, role_behavior_name(role), object)
end
end
end
def map_role_collection(role, mod_name, collection)
singular_role_name = singularize_name(role)
singular_behavior_name = singularize_name(role_behavior_name(role))
if collection.respond_to?(:each_with_index) && role_const_defined?(singular_behavior_name)
collection.each_with_index do |item, index|
map_role(:"#{singular_role_name}_#{index + 1}", singular_behavior_name, item)
end
end
end
def map_role(role, mod_name, object)
instance_variable_set("@#{role}", object)
role_map.update(role, role_module_basename(mod_name), object)
end
def apply_behavior(role, behavior, object)
if behavior && role_const_defined?(behavior)
applicator = if self.respond_to?("apply_behavior_#{role}")
method("apply_behavior_#{role}")
elsif role_const(behavior).is_a?(Class)
method(:apply_class_behavior)
else
method(:apply_module_behavior)
end
role_player = applicator.call(role_const(behavior), object)
map_role(role, behavior, role_player)
end
role_player || object
end
def apply_module_behavior(mod, obj)
adder_name = module_extension_methods.find{|meth| obj.respond_to?(meth) }
return obj unless adder_name
obj.method(adder_name).call(mod)
obj
end
def apply_class_behavior(klass, obj)
wrapper_name = wrap_methods.find{|meth| klass.respond_to?(meth) }
return obj if !wrapper_name
klass.method(wrapper_name).call(obj)
end
def remove_behavior(role, behavior, object)
if behavior && role_const_defined?(behavior)
remover_name = (module_removal_methods + unwrap_methods).find do |meth|
object.respond_to?(meth)
end
end
role_player = if self.respond_to?("remove_behavior_#{role}")
self.send("remove_behavior_#{role}", role_const(behavior), object)
elsif remover_name
object.send(remover_name)
end
role_player || object
end
def apply_behaviors
role_map.each do |role, mod_name, object|
player = apply_behavior(role, mod_name, object)
if player.respond_to?(:store_context, true)
player.__send__(:store_context) do; end
end
end
end
def remove_behaviors
role_map.each do |role, mod_name, player|
if player.respond_to?(:remove_context, true)
player.__send__(:remove_context) do; end
end
remove_behavior(role, mod_name, player)
end
end
# List of possible methods to use to add behavior to an object from a module.
def module_extension_methods
[:cast_as, :extend]
end
# List of possible methods to use to add behavior to an object from a wrapper.
def wrap_methods
[:new]
end
# List of possible methods to use to remove behavior from an object with a module.
def module_removal_methods
[:uncast]
end
# List of possible methods to use to remove behavior from an object with a wrapper.
def unwrap_methods
[:__getobj__]
end
def role_behavior_name(role)
RoleName.new(role)
end
def role_module_basename(mod)
mod.to_s.split('::').last
end
def role_const(name)
self.class.send(:role_const, name)
end
def role_const_defined?(name)
self.class.send(:role_const_defined?, name)
end
def role_mapper_class
self.class.send(:role_mapper_class)
end
def singularize_name(name)
if name.respond_to?(:singularize)
name.singularize
else
# good enough for now but should be updated with better rules
name.to_s.tap do |string|
if string =~ /ies\z/
string.sub!(/ies\z/,'y')
elsif string =~ /s\z/
string.sub!(/s\z/,'')
end
end
end
end
end
class RoleName
def initialize(string, suffix=nil)
@string = string.
to_s.
split(/_/).
map{|part|
part.capitalize
}.
join.
sub(/_\d+/,'') + suffix.to_s
end
def to_str
@string
end
alias to_s to_str
def to_sym
@string.to_sym
end
end
end
end
| {
"pile_set_name": "Github"
} |
<!doctype html>
<title>CodeMirror: Panel Demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../doc/docs.css">
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/htmlmixed/htmlmixed.js"></script>
<script src="../addon/display/panel.js"></script>
<style>
.border {
border: 1px solid #f7f7f7;
}
.add-panel {
background: orange;
padding: 3px 6px;
color: white !important;
border-radius: 3px;
}
.add-panel, .remove-panel {
cursor: pointer;
}
.remove-panel {
float: right;
}
.panel {
background: #f7f7f7;
padding: 3px 7px;
font-size: 0.85em;
}
.panel.top, .panel.after-top {
border-bottom: 1px solid #ddd;
}
.panel.bottom, .panel.before-bottom {
border-top: 1px solid #ddd;
}
</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>
<ul>
<li><a href="../index.html">Home</a>
<li><a href="../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a class=active href="#">Panel</a>
</ul>
</div>
<article>
<h2>Panel Demo</h2>
<div class="border">
<textarea id="code" name="code"></textarea>
</div>
<p>
The <a href="../doc/manual.html#addon_panel"><code>panel</code></a>
addon allows you to display panels above or below an editor.
<br>
Click the links below to add panels at the given position:
</p>
<div id="demo">
<p>
<a class="add-panel" onclick="addPanel('top')">top</a>
<a class="add-panel" onclick="addPanel('after-top')">after-top</a>
<a class="add-panel" onclick="addPanel('before-bottom')">before-bottom</a>
<a class="add-panel" onclick="addPanel('bottom')">bottom</a>
</p>
<p>
You can also replace an existing panel:
</p>
<form onsubmit="return replacePanel(this);" name="replace_panel">
<input type="submit" value="Replace panel n°" />
<input type="number" name="panel_id" min="1" value="1" />
</form>
<script>
var textarea = document.getElementById("code");
var demo = document.getElementById("demo");
var numPanels = 0;
var panels = {};
var editor;
textarea.value = demo.innerHTML.trim();
editor = CodeMirror.fromTextArea(textarea, {
lineNumbers: true,
mode: "htmlmixed"
});
function makePanel(where) {
var node = document.createElement("div");
var id = ++numPanels;
var widget, close, label;
node.id = "panel-" + id;
node.className = "panel " + where;
close = node.appendChild(document.createElement("a"));
close.setAttribute("title", "Remove me!");
close.setAttribute("class", "remove-panel");
close.textContent = "✖";
CodeMirror.on(close, "mousedown", function(e) {
e.preventDefault()
panels[node.id].clear();
});
label = node.appendChild(document.createElement("span"));
label.textContent = "I'm panel n°" + id;
return node;
}
function addPanel(where) {
var node = makePanel(where);
panels[node.id] = editor.addPanel(node, {position: where, stable: true});
}
addPanel("top");
addPanel("bottom");
function replacePanel(form) {
var id = form.elements.panel_id.value;
var panel = panels["panel-" + id];
var node = makePanel("");
panels[node.id] = editor.addPanel(node, {replace: panel, position: "after-top", stable: true});
return false;
}
</script>
</div>
</article>
| {
"pile_set_name": "Github"
} |
require 'mxx_ru/cpp'
MxxRu::Cpp::exe_target {
required_prj 'so_5/prj.rb'
target 'sample.so_5.subscriptions'
cpp_source 'main.cpp'
}
| {
"pile_set_name": "Github"
} |
// Copyright 2020 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Noop perf Manager and Collector.
package stats
import (
v1 "github.com/google/cadvisor/info/v1"
"k8s.io/klog/v2"
)
type NoopManager struct {
NoopDestroy
}
type NoopDestroy struct{}
func (nsd NoopDestroy) Destroy() {
klog.V(5).Info("No-op Destroy function called")
}
func (m *NoopManager) GetCollector(cgroup string) (Collector, error) {
return &NoopCollector{}, nil
}
type NoopCollector struct {
NoopDestroy
}
func (c *NoopCollector) UpdateStats(stats *v1.ContainerStats) error {
return nil
}
| {
"pile_set_name": "Github"
} |
---
title: Visualize Log Data with Microsoft Excel
---
# Visualize Log Data with Microsoft Excel
## Introduction
In this section, we will use Microsoft Excel to access refined clickstream data.
## Prerequisites
- Have installed the [Hortonworks ODBC driver for Apache Hive](https://hortonworks.com/downloads/#addons) (check [Getting Started with HDP Tutorial](https://hortonworks.com/tutorial/hadoop-tutorial-getting-started-with-hdp/section/7/) for help with installation)
- Have sample retail data already loaded [by completing this tutorial](https://hortonworks.com/tutorial/loading-data-into-the-hortonworks-sandbox)
- Have a version of Excel with Power View (i.e. Excel 2013), which is currently only offered for Windows computers.
## Outline
- [Import Data From Apache Hive](#import-data-from-apache-hive)
- [Visualize Data Using Power View](#visualize-data-using-power-view)
- [Summary](#summary)
## Import Data From Apache Hive
Open a new Excel workbook, then navigate to **Data > From Other Sources > From Microsoft Query**.

On the Choose Data Source pop-up, select the Hortonworks ODBC data source you installed, then click **OK**. The Hortonworks ODBC driver enables you to access Hortonworks data with Excel and other Business Intelligence (BI) applications that support ODBC.

After the connection to the sandbox is established, the **Query Wizard** appears. Select the `webloganalytics` table in the **Available tables and columns** box, then click the right arrow button to add the entire `webloganalytics` table to the query. Click **Next** to continue.

On the **Filter Data** screen, click **Next** to continue without filtering the data.

On the **Sort Order** screen, click **Next** to continue without setting a sort order.

Click **Finish** on the **Query Wizard Finish** screen to retrieve the query data from the sandbox and import it into Excel.

On the **Import Data** dialog box, click **OK** to accept the default settings and import the data as a table.

The imported query data appears in the Excel workbook.

Now that we have successfully imported Hortonworks Sandbox data into Microsoft Excel, we can use Excel's Power View feature to analyze and visualize the data.
## Visualize Data Using Power View
Data visualization can help you optimize your website and convert more visits into sales and revenue. In this section we will:
- Analyze the clickstream data by location
- Filter the data by product category
- Graph the website user data by age and gender
- Pick a target customer segment
- Identify web pages with the highest bounce rates
In the Excel workbook with the imported webloganalytics data, select **Insert > Power View** to open a new Power View report.

The Power View Fields area appears on the right side of the window, with the data table displayed on the left. Drag the handles or click the Pop Out icon to maximize the size of the data table.

Let’s start by taking a look at the countries of origin of our website visitors. In the **Power View Fields** area, leave the **country** checkbox selected, and clear all of the other checkboxes. The data table will update to reflect the selections.

On the **Design** tab in the top menu, click **Map**.

The map view displays a global view of the data. Now let’s take a look at a count of IP address by state. First, drag the **ip** field into the SIZE box.

Drag **country** from the Power View Fields area into the Filters area, then select the **usa** checkbox.

Next, drag **state** into the LOCATIONS box. Remove the **country** field from the LOCATIONS box by clicking the down-arrow and then **Remove Field**.

Use the map controls to zoom in on the United States. Move the pointer over each state to display the IP count for that state.

Our dataset includes product data, so we can display the product categories viewed by website visitors in each state. To display product categories in the map by color, drag the **category** field into the COLOR box.

The map displays the product categories by color for each state. Move the pointer over each state to display detailed category information. We can see that the largest number of page hits in Florida were for clothing, followed by shoes.

Now let’s look at the clothing data by age and gender so we can optimize our content for these customers. Select **Insert > Power View** to open a new Power View report.

To set up the data, set the following fields and filters:
- In the Power View Fields area, select **ip** and **age**. All of the other fields should be unselected.
- Drag **category** from the Power View Fields area into the Filters area, then select the **clothing** checkbox.
- Drag **gender** from the Power View Fields area into the Filters area, then select the **M** (male) checkbox.
After setting these fields and filters, select **Column Chart > Clustered Column** in the top menu.

To finish setting up the chart, drag **age** into the AXIS box. Also, remove **ip** from the AXIS box by clicking the down-arrow and then **Remove Field**. The chart shows that the majority of men shopping for clothing on our website are between the ages of 22 and 30. With this information, we can optimize our content for this market segment.

Let’s assume that our data includes information about website pages (URLs) with high bounce rates. A page is considered to have a high bounce rate if it is the last page a user visited before leaving the website. By filtering this URL data by our target age group, we can find out exactly which website pages we should optimize for this market segment. Select **Insert > Power View** to open a new Power View report.

To set up the data, set the following fields and filters:
- Drag **age** from the Power View Fields area into the Filters area, then drag the sliders to set the age range from 22 to 30.
- Drag **gender** from the Power View Fields area into the Filters area, then select the **M** (male) checkbox.
- Drag **country** from the Power View Fields area into the Filters area, then select the **usa** checkbox.
- In the Power View Fields area, select **url**. All of the other fields should be unselected.
- In the Power View Fields area, move the pointer over **url**, click the down-arrow, and then select **Add to Table as Count.**
After setting these fields and filters, select **Column Chart > Clustered Column** in the top menu.

The chart shows that we should focus on optimizing four of our website pages for the market segment of men between the ages of 22 and 30. Now we can redesign these four pages and test the new designs based on our target demographic, thereby reducing the bounce rate and increasing customer retention and sales.

You can use the controls in the upper left corner of the map to sort by Count of URL in ascending order.

## Summary
You have successfully analyzed and visualized log data with Microsoft Excel. This, and other BI tools can be used with the Hortonworks Data Platform to derive insights about customers from various data sources.
The data stored in the Hortonworks Data Platform can be refreshed frequently and used for basket analysis, A/B testing, personalized product recommendations, and other sales optimization activities.
| {
"pile_set_name": "Github"
} |
package cfn_test
import (
"reflect"
"testing"
"github.com/aws-cloudformation/rain/cfn"
)
var testCase = cfn.Template(map[string]interface{}{
"Parameters": map[string]interface{}{
"Name": map[string]interface{}{
"Type": "String",
},
},
"Resources": map[string]interface{}{
"Bucket": map[string]interface{}{
"Type": "AWS::S3::Bucket",
"Properties": map[string]interface{}{
"BucketName": map[string]interface{}{
"Ref": "Name",
},
},
},
},
"Outputs": map[string]interface{}{
"Bucket": map[string]interface{}{
"Value": map[string]interface{}{
"Ref": "Bucket",
},
},
},
})
func TestGraph(t *testing.T) {
graph := testCase.Graph()
actual := graph.Nodes()
expected := []interface{}{
cfn.Element{"Name", "Parameters"},
cfn.Element{"Bucket", "Resources"},
cfn.Element{"Bucket", "Outputs"},
}
if !reflect.DeepEqual(actual, expected) {
t.Errorf("Template graph is wrong:\n%#v\n!=\n%#v\n", expected, actual)
}
}
| {
"pile_set_name": "Github"
} |
impl Iterator for Foo {
type Item = i32;
fn next(&mut self) -> Option<i32> {
unimplemented!()
}
}
| {
"pile_set_name": "Github"
} |
<snippet>
<prefix>fileManager-getSavedFileList</prefix>
<description><![CDATA[获取该小程序下已保存的本地缓存文件列表]]></description>
<body><![CDATA[
fileManager.getSavedFileList({
success: (result) => {
${1}
},
fail: () => {},
complete: () => {}
});
]]></body>
</snippet> | {
"pile_set_name": "Github"
} |
{
"name": "Dietspotlight LLC",
"displayName": "Dietspotlight",
"properties": [
"dietspotlight.com"
]
} | {
"pile_set_name": "Github"
} |
---
- name: create temporary resolveconf cloud init file
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
- name: Add domain/search/nameservers/options to resolv.conf
blockinfile:
path: "{{ resolvconffile }}"
block: |-
{% for item in [domainentry] + [searchentries] + nameserverentries.split(',') -%}
{{ item }}
{% endfor %}
options ndots:{{ ndots }}
options timeout:2
options attempts:2
state: present
insertbefore: BOF
create: yes
backup: yes
marker: "# Ansible entries {mark}"
notify: Preinstall | propagate resolvconf to k8s components
- name: Remove search/domain/nameserver options before block
replace:
dest: "{{ item[0] }}"
regexp: '^{{ item[1] }}[^#]*(?=# Ansible entries BEGIN)'
backup: yes
follow: yes
with_nested:
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
notify: Preinstall | propagate resolvconf to k8s components
- name: Remove search/domain/nameserver options after block
replace:
dest: "{{ item[0] }}"
regexp: '(# Ansible entries END\n(?:(?!^{{ item[1] }}).*\n)*)(?:^{{ item[1] }}.*\n?)+'
replace: '\1'
backup: yes
follow: yes
with_nested:
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
notify: Preinstall | propagate resolvconf to k8s components
- name: get temporary resolveconf cloud init file content
command: cat {{ resolvconffile }}
register: cloud_config
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
- name: persist resolvconf cloud init file
template:
dest: "{{ resolveconf_cloud_init_conf }}"
src: resolvconf.j2
owner: root
mode: 0644
notify: Preinstall | update resolvconf for Flatcar Container Linux by Kinvolk
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
| {
"pile_set_name": "Github"
} |
version https://git-lfs.github.com/spec/v1
oid sha256:bc9f2ae233e7a0b3dad2a33b033c1ad64b332e702d6c0ddea992fbf1b2ffebb5
size 8894
| {
"pile_set_name": "Github"
} |
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
insecure
less
iron:[email protected]
accounts-password
standard-minifiers
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
random
ejson
spacebars
check
| {
"pile_set_name": "Github"
} |
/*
* Atomic operations that C can't guarantee us. Useful for
* resource counting etc..
*
* But use these as seldom as possible since they are much more slower
* than regular operations.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1996, 97, 99, 2000, 03, 04, 06 by Ralf Baechle
*/
#ifndef _ASM_ATOMIC_H
#define _ASM_ATOMIC_H
#include <linux/irqflags.h>
#include <linux/types.h>
#include <asm/barrier.h>
#include <asm/cpu-features.h>
#include <asm/war.h>
#include <asm/system.h>
#define ATOMIC_INIT(i) { (i) }
/*
* atomic_read - read atomic variable
* @v: pointer of type atomic_t
*
* Atomically reads the value of @v.
*/
#define atomic_read(v) ((v)->counter)
/*
* atomic_set - set atomic variable
* @v: pointer of type atomic_t
* @i: required value
*
* Atomically sets the value of @v to @i.
*/
#define atomic_set(v, i) ((v)->counter = (i))
/*
* atomic_add - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic_t
*
* Atomically adds @i to @v.
*/
static __inline__ void atomic_add(int i, atomic_t * v)
{
if (kernel_uses_llsc && R10000_LLSC_WAR) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %0, %1 # atomic_add \n"
" addu %0, %2 \n"
" sc %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else if (kernel_uses_llsc) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %0, %1 # atomic_add \n"
" addu %0, %2 \n"
" sc %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else {
unsigned long flags;
raw_local_irq_save(flags);
v->counter += i;
raw_local_irq_restore(flags);
}
}
/*
* atomic_sub - subtract the atomic variable
* @i: integer value to subtract
* @v: pointer of type atomic_t
*
* Atomically subtracts @i from @v.
*/
static __inline__ void atomic_sub(int i, atomic_t * v)
{
if (kernel_uses_llsc && R10000_LLSC_WAR) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %0, %1 # atomic_sub \n"
" subu %0, %2 \n"
" sc %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else if (kernel_uses_llsc) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %0, %1 # atomic_sub \n"
" subu %0, %2 \n"
" sc %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else {
unsigned long flags;
raw_local_irq_save(flags);
v->counter -= i;
raw_local_irq_restore(flags);
}
}
/*
* Same as above, but return the result value
*/
static __inline__ int atomic_add_return(int i, atomic_t * v)
{
int result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_add_return \n"
" addu %0, %1, %3 \n"
" sc %0, %2 \n"
" beqzl %0, 1b \n"
" addu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_add_return \n"
" addu %0, %1, %3 \n"
" sc %0, %2 \n"
" beqz %0, 2f \n"
" addu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result += i;
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
static __inline__ int atomic_sub_return(int i, atomic_t * v)
{
int result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_sub_return \n"
" subu %0, %1, %3 \n"
" sc %0, %2 \n"
" beqzl %0, 1b \n"
" subu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_sub_return \n"
" subu %0, %1, %3 \n"
" sc %0, %2 \n"
" beqz %0, 2f \n"
" subu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result -= i;
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
/*
* atomic_sub_if_positive - conditionally subtract integer from atomic variable
* @i: integer value to subtract
* @v: pointer of type atomic_t
*
* Atomically test @v and subtract @i if @v is greater or equal than @i.
* The function returns the old value of @v minus @i.
*/
static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
{
int result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_sub_if_positive\n"
" subu %0, %1, %3 \n"
" bltz %0, 1f \n"
" sc %0, %2 \n"
" .set noreorder \n"
" beqzl %0, 1b \n"
" subu %0, %1, %3 \n"
" .set reorder \n"
"1: \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
int temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: ll %1, %2 # atomic_sub_if_positive\n"
" subu %0, %1, %3 \n"
" bltz %0, 1f \n"
" sc %0, %2 \n"
" .set noreorder \n"
" beqz %0, 2f \n"
" subu %0, %1, %3 \n"
" .set reorder \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
"1: \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result -= i;
if (result >= 0)
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
#define atomic_xchg(v, new) (xchg(&((v)->counter), (new)))
/**
* atomic_add_unless - add unless the number is a given value
* @v: pointer of type atomic_t
* @a: the amount to add to v...
* @u: ...unless v is equal to u.
*
* Atomically adds @a to @v, so long as it was not @u.
* Returns non-zero if @v was not @u, and zero otherwise.
*/
static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
{
int c, old;
c = atomic_read(v);
for (;;) {
if (unlikely(c == (u)))
break;
old = atomic_cmpxchg((v), c, c + (a));
if (likely(old == c))
break;
c = old;
}
return c != (u);
}
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
#define atomic_dec_return(v) atomic_sub_return(1, (v))
#define atomic_inc_return(v) atomic_add_return(1, (v))
/*
* atomic_sub_and_test - subtract value from variable and test result
* @i: integer value to subtract
* @v: pointer of type atomic_t
*
* Atomically subtracts @i from @v and returns
* true if the result is zero, or false for all
* other cases.
*/
#define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0)
/*
* atomic_inc_and_test - increment and test
* @v: pointer of type atomic_t
*
* Atomically increments @v by 1
* and returns true if the result is zero, or false for all
* other cases.
*/
#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
/*
* atomic_dec_and_test - decrement by 1 and test
* @v: pointer of type atomic_t
*
* Atomically decrements @v by 1 and
* returns true if the result is 0, or false for all other
* cases.
*/
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
/*
* atomic_dec_if_positive - decrement by 1 if old value positive
* @v: pointer of type atomic_t
*/
#define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v)
/*
* atomic_inc - increment atomic variable
* @v: pointer of type atomic_t
*
* Atomically increments @v by 1.
*/
#define atomic_inc(v) atomic_add(1, (v))
/*
* atomic_dec - decrement and test
* @v: pointer of type atomic_t
*
* Atomically decrements @v by 1.
*/
#define atomic_dec(v) atomic_sub(1, (v))
/*
* atomic_add_negative - add and test if negative
* @v: pointer of type atomic_t
* @i: integer value to add
*
* Atomically adds @i to @v and returns true
* if the result is negative, or false when
* result is greater than or equal to zero.
*/
#define atomic_add_negative(i, v) (atomic_add_return(i, (v)) < 0)
#ifdef CONFIG_64BIT
#define ATOMIC64_INIT(i) { (i) }
/*
* atomic64_read - read atomic variable
* @v: pointer of type atomic64_t
*
*/
#define atomic64_read(v) ((v)->counter)
/*
* atomic64_set - set atomic variable
* @v: pointer of type atomic64_t
* @i: required value
*/
#define atomic64_set(v, i) ((v)->counter = (i))
/*
* atomic64_add - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic64_t
*
* Atomically adds @i to @v.
*/
static __inline__ void atomic64_add(long i, atomic64_t * v)
{
if (kernel_uses_llsc && R10000_LLSC_WAR) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_add \n"
" daddu %0, %2 \n"
" scd %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else if (kernel_uses_llsc) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_add \n"
" daddu %0, %2 \n"
" scd %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else {
unsigned long flags;
raw_local_irq_save(flags);
v->counter += i;
raw_local_irq_restore(flags);
}
}
/*
* atomic64_sub - subtract the atomic variable
* @i: integer value to subtract
* @v: pointer of type atomic64_t
*
* Atomically subtracts @i from @v.
*/
static __inline__ void atomic64_sub(long i, atomic64_t * v)
{
if (kernel_uses_llsc && R10000_LLSC_WAR) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_sub \n"
" dsubu %0, %2 \n"
" scd %0, %1 \n"
" beqzl %0, 1b \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else if (kernel_uses_llsc) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %0, %1 # atomic64_sub \n"
" dsubu %0, %2 \n"
" scd %0, %1 \n"
" beqz %0, 2f \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter));
} else {
unsigned long flags;
raw_local_irq_save(flags);
v->counter -= i;
raw_local_irq_restore(flags);
}
}
/*
* Same as above, but return the result value
*/
static __inline__ long atomic64_add_return(long i, atomic64_t * v)
{
long result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_add_return \n"
" daddu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqzl %0, 1b \n"
" daddu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_add_return \n"
" daddu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqz %0, 2f \n"
" daddu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result += i;
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
{
long result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_return \n"
" dsubu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqzl %0, 1b \n"
" dsubu %0, %1, %3 \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_return \n"
" dsubu %0, %1, %3 \n"
" scd %0, %2 \n"
" beqz %0, 2f \n"
" dsubu %0, %1, %3 \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result -= i;
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
/*
* atomic64_sub_if_positive - conditionally subtract integer from atomic variable
* @i: integer value to subtract
* @v: pointer of type atomic64_t
*
* Atomically test @v and subtract @i if @v is greater or equal than @i.
* The function returns the old value of @v minus @i.
*/
static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
{
long result;
smp_llsc_mb();
if (kernel_uses_llsc && R10000_LLSC_WAR) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_if_positive\n"
" dsubu %0, %1, %3 \n"
" bltz %0, 1f \n"
" scd %0, %2 \n"
" .set noreorder \n"
" beqzl %0, 1b \n"
" dsubu %0, %1, %3 \n"
" .set reorder \n"
"1: \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else if (kernel_uses_llsc) {
long temp;
__asm__ __volatile__(
" .set mips3 \n"
"1: lld %1, %2 # atomic64_sub_if_positive\n"
" dsubu %0, %1, %3 \n"
" bltz %0, 1f \n"
" scd %0, %2 \n"
" .set noreorder \n"
" beqz %0, 2f \n"
" dsubu %0, %1, %3 \n"
" .set reorder \n"
" .subsection 2 \n"
"2: b 1b \n"
" .previous \n"
"1: \n"
" .set mips0 \n"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
: "Ir" (i), "m" (v->counter)
: "memory");
} else {
unsigned long flags;
raw_local_irq_save(flags);
result = v->counter;
result -= i;
if (result >= 0)
v->counter = result;
raw_local_irq_restore(flags);
}
smp_llsc_mb();
return result;
}
#define atomic64_cmpxchg(v, o, n) \
((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
#define atomic64_xchg(v, new) (xchg(&((v)->counter), (new)))
/**
* atomic64_add_unless - add unless the number is a given value
* @v: pointer of type atomic64_t
* @a: the amount to add to v...
* @u: ...unless v is equal to u.
*
* Atomically adds @a to @v, so long as it was not @u.
* Returns non-zero if @v was not @u, and zero otherwise.
*/
static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
{
long c, old;
c = atomic64_read(v);
for (;;) {
if (unlikely(c == (u)))
break;
old = atomic64_cmpxchg((v), c, c + (a));
if (likely(old == c))
break;
c = old;
}
return c != (u);
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
#define atomic64_dec_return(v) atomic64_sub_return(1, (v))
#define atomic64_inc_return(v) atomic64_add_return(1, (v))
/*
* atomic64_sub_and_test - subtract value from variable and test result
* @i: integer value to subtract
* @v: pointer of type atomic64_t
*
* Atomically subtracts @i from @v and returns
* true if the result is zero, or false for all
* other cases.
*/
#define atomic64_sub_and_test(i, v) (atomic64_sub_return((i), (v)) == 0)
/*
* atomic64_inc_and_test - increment and test
* @v: pointer of type atomic64_t
*
* Atomically increments @v by 1
* and returns true if the result is zero, or false for all
* other cases.
*/
#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
/*
* atomic64_dec_and_test - decrement by 1 and test
* @v: pointer of type atomic64_t
*
* Atomically decrements @v by 1 and
* returns true if the result is 0, or false for all other
* cases.
*/
#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
/*
* atomic64_dec_if_positive - decrement by 1 if old value positive
* @v: pointer of type atomic64_t
*/
#define atomic64_dec_if_positive(v) atomic64_sub_if_positive(1, v)
/*
* atomic64_inc - increment atomic variable
* @v: pointer of type atomic64_t
*
* Atomically increments @v by 1.
*/
#define atomic64_inc(v) atomic64_add(1, (v))
/*
* atomic64_dec - decrement and test
* @v: pointer of type atomic64_t
*
* Atomically decrements @v by 1.
*/
#define atomic64_dec(v) atomic64_sub(1, (v))
/*
* atomic64_add_negative - add and test if negative
* @v: pointer of type atomic64_t
* @i: integer value to add
*
* Atomically adds @i to @v and returns true
* if the result is negative, or false when
* result is greater than or equal to zero.
*/
#define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0)
#endif /* CONFIG_64BIT */
/*
* atomic*_return operations are serializing but not the non-*_return
* versions.
*/
#define smp_mb__before_atomic_dec() smp_llsc_mb()
#define smp_mb__after_atomic_dec() smp_llsc_mb()
#define smp_mb__before_atomic_inc() smp_llsc_mb()
#define smp_mb__after_atomic_inc() smp_llsc_mb()
#include <asm-generic/atomic-long.h>
#endif /* _ASM_ATOMIC_H */
| {
"pile_set_name": "Github"
} |
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"etcd.go",
"master_utils.go",
"perf_utils.go",
"serializer.go",
"util.go",
],
data = [
"@com_coreos_etcd//:etcd",
],
importpath = "k8s.io/kubernetes/test/integration/framework",
deps = [
"//pkg/api/legacyscheme:go_default_library",
"//pkg/api/testapi:go_default_library",
"//pkg/apis/batch:go_default_library",
"//pkg/apis/policy/v1beta1:go_default_library",
"//pkg/generated/openapi:go_default_library",
"//pkg/kubelet/client:go_default_library",
"//pkg/master:go_default_library",
"//pkg/util/env:go_default_library",
"//pkg/version:go_default_library",
"//staging/src/k8s.io/api/apps/v1beta1:go_default_library",
"//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library",
"//staging/src/k8s.io/api/autoscaling/v1:go_default_library",
"//staging/src/k8s.io/api/certificates/v1beta1:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
"//staging/src/k8s.io/api/rbac/v1alpha1:go_default_library",
"//staging/src/k8s.io/api/storage/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticatorfactory:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authentication/request/union:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authorization/union:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/endpoints/openapi:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/server:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library",
"//staging/src/k8s.io/client-go/informers:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
"//staging/src/k8s.io/client-go/rest:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/utils:go_default_library",
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/pborman/uuid:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
| {
"pile_set_name": "Github"
} |
## -*-shell-script-*-
##
## %CopyrightBegin%
##
## Copyright Ericsson AB 2009-2010. All Rights Reserved.
##
## The contents of this file are subject to the Erlang Public License,
## Version 1.1, (the "License"); you may not use this file except in
## compliance with the License. You should have received a copy of the
## Erlang Public License along with this software. If not, it can be
## retrieved online at http://www.erlang.org/.
##
## Software distributed under the License is distributed on an "AS IS"
## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
## the License for the specific language governing rights and limitations
## under the License.
##
## %CopyrightEnd%
##
## File: erl-xcomp-arm-rtems.conf
## Author: Rickard Green, Peer Stritzinger, Sebastien Merle
##
## -----------------------------------------------------------------------------
## When cross compiling Erlang/OTP using `otp_build', copy this file and set
## the variables needed below. Then pass the path to the copy of this file as
## an argument to `otp_build' in the configure stage:
## `otp_build configure --xcomp-conf=<FILE>'
## -----------------------------------------------------------------------------
## Note that you cannot define arbitrary variables in a cross compilation
## configuration file. Only the ones listed below will be guaranteed to be
## visible throughout the whole execution of all `configure' scripts. Other
## variables needs to be defined as arguments to `configure' or exported in
## the environment.
## -- Variables for ARM/RTEMS build --------------------------------------------
HOST_ARCH="arm-rtems5"
HOST_EXT_ARCH="arm-unknown-rtems5"
GRISP_OPENSSL_LIB="${GRISP_TC_ROOT}/${HOST_ARCH}/atsamv/lib/libbsd.a"
XCOMP_SYS_ROOT="/"
WITH_CRYPTO="yes"
DISABLED_APPS="--without-snmp --without-otp_mibs --without-erl_interface --without-jinterface --without-wx --without-debugger --without-reltool --without-gs --without-ic --without-orber --without-os_mon --without-observer --without-odbc --without-diameter --without-cosTransactions --without-cosEvent --without-cosTime --without-cosNotification --without-cosProperty --without-cosFileTransfer --without-cosEventDomain --without-et --without-megaco --without-ssh --without-typer --without-percept --without-eldap --without-dialyzer --without-edoc --without-erl_docgen --without-eunit --without-hipe"
if [ x${WITH_CRYPTO} = x"yes" ];
then
CRYPTO_CONFIG_OPTION="--disable-dynamic-ssl-lib --with-ssl --with-ssl-lib=${GRISP_OPENSSL_LIB} --with-crypto"
CRYPTO_NIF_PATH=",${ERL_TOP}/lib/crypto/priv/lib/${HOST_EXT_ARCH}/crypto.a"
# OpenSSL is included in libbsd
CRYPTO_LIB_PATH=""
else
CRYPTO_CONFIG_OPTION="--without-crypto --without-ssl"
CRYPTO_NIF_PATH=""
CRYPTO_LIB_PATH=""
fi
ASN1_NIF_PATH="${ERL_TOP}/lib/asn1/priv/lib/${HOST_EXT_ARCH}/asn1rt_nif.a"
NIF_PATH="${ASN1_NIF_PATH}${CRYPTO_NIF_PATH}"
## -- Variables for `otp_build' Only -------------------------------------------
## Variables in this section are only used, when configuring Erlang/OTP for
## cross compilation using `$ERL_TOP/otp_build configure'.
## *NOTE*! These variables currently have *no* effect if you configure using
## the `configure' script directly.
# * `erl_xcomp_build' - The build system used. This value will be passed as
# `--build=$erl_xcomp_build' argument to the `configure' script. It does
# not have to be a full `CPU-VENDOR-OS' triplet, but can be. The full
# `CPU-VENDOR-OS' triplet will be created by
# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'. If set to `guess',
# the build system will be guessed using
# `$ERL_TOP/erts/autoconf/config.guess'.
erl_xcomp_build=guess
# * `erl_xcomp_host' - Cross host/target system to build for. This value will
# be passed as `--host=$erl_xcomp_host' argument to the `configure' script.
# It does not have to be a full `CPU-VENDOR-OS' triplet, but can be. The
# full `CPU-VENDOR-OS' triplet will be created by
# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'.
erl_xcomp_host="${HOST_ARCH}"
# * `erl_xcomp_configure_flags' - Extra configure flags to pass to the
# `configure' script.
erl_xcomp_configure_flags="${CRYPTO_CONFIG_OPTION} --without-termcap --without-hipe --without-javac ${DISABLED_APPS} --enable-static-nifs=${NIF_PATH}"
## -- Cross Compiler and Other Tools -------------------------------------------
## If the cross compilation tools are prefixed by `<HOST>-' you probably do
## not need to set these variables (where `<HOST>' is what has been passed as
## `--host=<HOST>' argument to `configure').
## All variables in this section can also be used when native compiling.
# * `CC' - C compiler.
CC="$GRISP_TC_ROOT/bin/${HOST_ARCH}-gcc -pipe -B $GRISP_TC_ROOT/${HOST_ARCH}/atsamv/lib -specs bsp_specs -qrtems"
# * `CFLAGS' - C compiler flags.
CFLAGS="-Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -Wno-unused-parameter -Wno-redundant-decls -Wno-sign-conversion -Wno-sign-compare -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -g -ffunction-sections -fdata-sections -O0"
# * `STATIC_CFLAGS' - Static C compiler flags.
#STATIC_CFLAGS=
# * `CFLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
# search path for the shared libraries. Note that this actually is a
# linker flag, but it needs to be passed via the compiler.
#CFLAG_RUNTIME_LIBRARY_PATH=
# * `CPP' - C pre-processor.
#CPP=
# * `CPPFLAGS' - C pre-processor flags.
#CPPFLAGS=
# * `CXX' - C++ compiler.
#CXX=
# * `CXXFLAGS' - C++ compiler flags.
#CXXFLAGS=
# * `LD' - Linker.
LD="$GRISP_TC_ROOT/bin/${HOST_ARCH}-gcc -pipe -B $GRISP_TC_ROOT/${HOST_ARCH}/atsamv/lib -specs bsp_specs -qrtems"
# * `LDFLAGS' - Linker flags.
LDFLAGS="-mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -Wl,--gc-sections -qnolinkcmds -T linkcmds.sdram -Wl,-Map -Wl,linker.map"
# * `LIBS' - Libraries.
LIBS="-lgrisp -linih -lbsd ${CRYPTO_LIB_PATH}"
## -- *D*ynamic *E*rlang *D*river Linking --
## *NOTE*! Either set all or none of the `DED_LD*' variables.
# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
#DED_LD=
# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
#DED_LDFLAGS=
# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
# search path for shared libraries when linking with `DED_LD'.
#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
## -- Large File Support --
## *NOTE*! Either set all or none of the `LFS_*' variables.
# * `LFS_CFLAGS' - Large file support C compiler flags.
#LFS_CFLAGS=
# * `LFS_LDFLAGS' - Large file support linker flags.
#LFS_LDFLAGS=
# * `LFS_LIBS' - Large file support libraries.
#LFS_LIBS=
## -- Other Tools --
# * `RANLIB' - `ranlib' archive index tool.
#RANLIB=
# * `AR' - `ar' archiving tool.
#AR=
# * `GETCONF' - `getconf' system configuration inspection tool. `getconf' is
# currently used for finding out large file support flags to use, and
# on Linux systems for finding out if we have an NPTL thread library or
# not.
#GETCONF=
## -- Cross System Root Locations ----------------------------------------------
# * `erl_xcomp_sysroot' - The absolute path to the system root of the cross
# compilation environment. Currently, the `crypto', `odbc', `ssh' and
# `ssl' applications need the system root. These applications will be
# skipped if the system root has not been set. The system root might be
# needed for other things too. If this is the case and the system root
# has not been set, `configure' will fail and request you to set it.
erl_xcomp_sysroot="${XCOMP_SYS_ROOT}"
# * `erl_xcomp_isysroot' - The absolute path to the system root for includes
# of the cross compilation environment. If not set, this value defaults
# to `$erl_xcomp_sysroot', i.e., only set this value if the include system
# root path is not the same as the system root path.
#erl_xcomp_isysroot=
## -- Optional Feature, and Bug Tests ------------------------------------------
## These tests cannot (always) be done automatically when cross compiling. You
## usually do not need to set these variables. Only set these if you really
## know what you are doing.
## Note that some of these values will override results of tests performed
## by `configure', and some will not be used until `configure' is sure that
## it cannot figure the result out.
## The `configure' script will issue a warning when a default value is used.
## When a variable has been set, no warning will be issued.
# * `erl_xcomp_after_morecore_hook' - `yes|no'. Defaults to `no'. If `yes',
# the target system must have a working `__after_morecore_hook' that can be
# used for tracking used `malloc()' implementations core memory usage.
# This is currently only used by unsupported features.
#erl_xcomp_after_morecore_hook=
# * `erl_xcomp_bigendian' - `yes|no'. No default. If `yes', the target system
# must be big endian. If `no', little endian. This can often be
# automatically detected, but not always. If not automatically detected,
# `configure' will fail unless this variable is set. Since no default
# value is used, `configure' will try to figure this out automatically.
#erl_xcomp_bigendian=
# * `erl_xcomp_clock_gettime_cpu_time' - `yes|no'. Defaults to `no'. If `yes',
# the target system must have a working `clock_gettime()' implementation
# that can be used for retrieving process CPU time.
#erl_xcomp_clock_gettime_cpu_time=
# * `erl_xcomp_getaddrinfo' - `yes|no'. Defaults to `no'. If `yes', the target
# system must have a working `getaddrinfo()' implementation that can
# handle both IPv4 and IPv6.
#erl_xcomp_getaddrinfo=
# * `erl_xcomp_gethrvtime_procfs_ioctl' - `yes|no'. Defaults to `no'. If `yes',
# the target system must have a working `gethrvtime()' implementation and
# is used with procfs `ioctl()'.
#erl_xcomp_gethrvtime_procfs_ioctl=
# * `erl_xcomp_dlsym_brk_wrappers' - `yes|no'. Defaults to `no'. If `yes', the
# target system must have a working `dlsym(RTLD_NEXT, <S>)' implementation
# that can be used on `brk' and `sbrk' symbols used by the `malloc()'
# implementation in use, and by this track the `malloc()' implementations
# core memory usage. This is currently only used by unsupported features.
#erl_xcomp_dlsym_brk_wrappers=
# * `erl_xcomp_kqueue' - `yes|no'. Defaults to `no'. If `yes', the target
# system must have a working `kqueue()' implementation that returns a file
# descriptor which can be used by `poll()' and/or `select()'. If `no' and
# the target system has not got `epoll()' or `/dev/poll', the kernel-poll
# feature will be disabled.
#erl_xcomp_kqueue=
# * `erl_xcomp_linux_clock_gettime_correction' - `yes|no'. Defaults to `yes' on
# Linux; otherwise, `no'. If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on
# the target system must work. This variable is recommended to be set to
# `no' on Linux systems with kernel versions less than 2.6.
#erl_xcomp_linux_clock_gettime_correction=
# * `erl_xcomp_linux_nptl' - `yes|no'. Defaults to `yes' on Linux; otherwise,
# `no'. If `yes', the target system must have NPTL (Native POSIX Thread
# Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
# kernel versions typically less than 2.6).
#erl_xcomp_linux_nptl=
# * `erl_xcomp_linux_usable_sigaltstack' - `yes|no'. Defaults to `yes' on Linux;
# otherwise, `no'. If `yes', `sigaltstack()' must be usable on the target
# system. `sigaltstack()' on Linux kernel versions less than 2.4 are
# broken.
#erl_xcomp_linux_usable_sigaltstack=
# * `erl_xcomp_linux_usable_sigusrx' - `yes|no'. Defaults to `yes'. If `yes',
# the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS. Old
# LinuxThreads thread libraries (Linux kernel versions typically less than
# 2.2) used these signals and made them unusable by the ERTS.
#erl_xcomp_linux_usable_sigusrx=
# * `erl_xcomp_poll' - `yes|no'. Defaults to `no' on Darwin/MacOSX; otherwise,
# `yes'. If `yes', the target system must have a working `poll()'
# implementation that also can handle devices. If `no', `select()' will be
# used instead of `poll()'.
erl_xcomp_poll=no
# * `erl_xcomp_putenv_copy' - `yes|no'. Defaults to `no'. If `yes', the target
# system must have a `putenv()' implementation that stores a copy of the
# key/value pair.
#erl_xcomp_putenv_copy=
# * `erl_xcomp_reliable_fpe' - `yes|no'. Defaults to `no'. If `yes', the target
# system must have reliable floating point exceptions.
#erl_xcomp_reliable_fpe=
## -----------------------------------------------------------------------------
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
#ifdef ATOMIC_PLATFORM_OSX
#include <AtomicWebView/AtomicWebView.h>
// Entry point function for sub-processes.
int main(int argc, char* argv[])
{
return Atomic::WebMain(argc, argv);
}
#endif
| {
"pile_set_name": "Github"
} |
<?php
class NHP_Options_info extends NHP_Options{
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value ='', $parent){
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
//$this->render();
}//function
/**
* Field Render Function.
*
* Takes the vars and outputs the HTML for the field in the settings
*
* @since NHP_Options 1.0
*/
function render(){
$class = (isset($this->field['class']))?' '.$this->field['class']:'';
echo '</td></tr></table><div class="nhp-opts-info-field'.$class.'">'.$this->field['desc'].'</div><table class="form-table no-border"><tbody><tr><th></th><td>';
}//function
}//class
?> | {
"pile_set_name": "Github"
} |
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: znc-bouncer\n"
"X-Crowdin-Project-ID: 289533\n"
"X-Crowdin-Language: bg\n"
"X-Crowdin-File: /master/modules/po/modules_online.pot\n"
"X-Crowdin-File-ID: 184\n"
"Project-Id-Version: znc-bouncer\n"
"Language-Team: Bulgarian\n"
"Language: bg_BG\n"
#: modules_online.cpp:117
msgid "Makes ZNC's *modules to be \"online\"."
msgstr ""
| {
"pile_set_name": "Github"
} |
//
// HCDSoftware.h
// 17桥接模式
//
// Created by yifan on 15/8/15.
// Copyright (c) 2015年 黄成都. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol HCDSoftware <NSObject>
-(void)runQQ;
-(void)runWeixin;
-(void)runWord;
-(void)runXcode;
-(void)runQQDizhu;
-(void)runQQMajiang;
@end
typedef id<HCDSoftware> HCDSoftware;
| {
"pile_set_name": "Github"
} |
"------------------------------------------------------------------------------
" Description: Vim Ada/Dec Ada compiler file
" Language: Ada (Dec Ada)
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik <[email protected]>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: compiler-decada
"------------------------------------------------------------------------------
if version < 700
finish
endif
function decada#Unit_Name () dict " {{{1
" Convert filename into acs unit:
" 1: remove the file extenstion.
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
" 3: remove a trailing '_' (which denotes a specification)
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
endfunction decada#Unit_Name " }}}1
function decada#Make () dict " {{{1
let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
let &errorformat = g:self.Error_Format
let &makeprg = l:make_prg
wall
make
copen
set wrap
wincmd W
endfunction decada#Build " }}}1
function decada#Set_Session (...) dict " {{{1
if a:0 > 0
call ada#Switch_Session (a:1)
elseif argc() == 0 && strlen (v:servername) > 0
call ada#Switch_Session (
\ expand('~')[0:-2] . ".vimfiles.session]decada_" .
\ v:servername . ".vim")
endif
return
endfunction decada#Set_Session " }}}1
function decada#New () " }}}1
let Retval = {
\ 'Make' : function ('decada#Make'),
\ 'Unit_Name' : function ('decada#Unit_Name'),
\ 'Set_Session' : function ('decada#Set_Session'),
\ 'Project_Dir' : '',
\ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
\ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
\ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
return Retval
endfunction decada#New " }}}1
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker
| {
"pile_set_name": "Github"
} |
{
"http_interactions": [
{
"recorded_at": "2020-06-02T00:00:26",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug?longdesc=build_metrics%2Cinstaller+size&longdesc_type=allwordssubstr&longdesc_initial=1&keywords=perf%2Cperf-alert&keywords_type=anywords&creation_time=2019-12-17T00%3A00%3A00Z&query_format=advanced&include_fields=id%2Ctype%2Cresolution%2Clast_change_time%2Cis_open%2Ccreation_time%2Csummary%2Cwhiteboard%2Cstatus%2Ckeywords"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"creation_time\":\"2019-12-19T14:22:03Z\",\"whiteboard\":\"\",\"keywords\":[\"perf-alert\",\"regression\"],\"id\":1605110,\"is_open\":false,\"summary\":\"0.47% installer size (osx-shippable) regression on push 65cf656ecce94b8c8bc4933cf57eb760a3b8d10f (Wed December 18 2019)\",\"resolution\":\"FIXED\",\"status\":\"RESOLVED\",\"type\":\"defect\",\"last_change_time\":\"2019-12-24T09:16:22Z\"},{\"type\":\"defect\",\"status\":\"RESOLVED\",\"last_change_time\":\"2020-01-14T03:14:04Z\",\"id\":1608365,\"is_open\":false,\"keywords\":[\"perf-alert\",\"regression\"],\"creation_time\":\"2020-01-10T10:01:46Z\",\"whiteboard\":\"\",\"resolution\":\"WONTFIX\",\"summary\":\"0.13 - 0.19% installer size (macosx64-shippable, osx-shippable) regression on push e1b0906509efa6433978b9f980ec639b7eafbc6d (Thu January 9 2020)\"},{\"last_change_time\":\"2020-01-15T08:29:49Z\",\"type\":\"defect\",\"status\":\"RESOLVED\",\"resolution\":\"WONTFIX\",\"summary\":\"0.21 - 0.23% installer size (macosx64-shippable, osx-shippable) regression on push 03300b89f364aa1c7741d37ca741c6a7dca23bc3 (Fri January 10 2020)\",\"is_open\":false,\"id\":1608769,\"keywords\":[\"perf-alert\",\"regression\"],\"creation_time\":\"2020-01-13T09:37:54Z\",\"whiteboard\":\"\"},{\"is_open\":false,\"keywords\":[\"perf-alert\",\"regression\"],\"id\":1609949,\"creation_time\":\"2020-01-17T15:11:04Z\",\"whiteboard\":\"\",\"resolution\":\"FIXED\",\"summary\":\"0.38 - 7884700% build times / installer size / sccache cache_write_errors / sccache hit rate (android, linux, osx-shippable, windowsregression on push 540db822a1d4f2e4cbd491bb5afcba9aace67e78 (Wed January 15 2020)\",\"type\":\"defect\",\"status\":\"RESOLVED\",\"last_change_time\":\"2020-01-19T18:12:37Z\"},{\"status\":\"RESOLVED\",\"type\":\"defect\",\"last_change_time\":\"2020-01-28T08:02:42Z\",\"whiteboard\":\"\",\"creation_time\":\"2020-01-23T06:51:14Z\",\"id\":1611073,\"is_open\":false,\"keywords\":[\"perf-alert\",\"regression\"],\"summary\":\"0.2 - 0.32% installer size (macosx64-shippable, osx-shippable) regression on push bb908b9156834ac2f3b297ebac9bde2e0ed3fc2e (Wed January 22 2020)\",\"resolution\":\"WONTFIX\"},{\"last_change_time\":\"2020-02-04T02:46:29Z\",\"status\":\"RESOLVED\",\"type\":\"defect\",\"summary\":\"0.59 - 0.7% installer size (macosx64-shippable, osx-shippable) regression on push ec13019e304f00f62ec88b47214cae1583d12be4 (Fri January 24 2020)\",\"resolution\":\"DUPLICATE\",\"whiteboard\":\"\",\"creation_time\":\"2020-01-27T14:57:34Z\",\"is_open\":false,\"id\":1611804,\"keywords\":[\"perf-alert\",\"regression\"]},{\"id\":1615592,\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":false,\"creation_time\":\"2020-02-14T13:18:02Z\",\"whiteboard\":\"\",\"resolution\":\"WONTFIX\",\"summary\":\"0.21 - 0.27% installer size (osx-shippable) regression on push 69fb848f951448cce98bcb9446b10b9044e0c677 (Wed February 12 2020)\",\"type\":\"defect\",\"status\":\"RESOLVED\",\"last_change_time\":\"2020-02-14T17:49:51Z\"},{\"last_change_time\":\"2020-05-12T00:51:53Z\",\"type\":\"defect\",\"status\":\"NEW\",\"resolution\":\"\",\"summary\":\"0.88% installer size (osx-shippable) regression on push 96be905c6a7d25acc93b731253a1137d9a1deccc (Wed March 11 2020)\",\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":true,\"id\":1621917,\"creation_time\":\"2020-03-12T11:16:32Z\",\"whiteboard\":\"\"},{\"resolution\":\"FIXED\",\"summary\":\"0.24 - 128.86% build times / installer size / sccache hit rate / sccache requests_not_cacheable (android linux64,osx-cross,windows) regression on push 08e87bebb6062948732562a9f3e641563dd87390 (Fri March 13 2020)\",\"id\":1622668,\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":false,\"whiteboard\":\"\",\"creation_time\":\"2020-03-15T18:38:13Z\",\"last_change_time\":\"2020-03-16T18:24:28Z\",\"type\":\"defect\",\"status\":\"RESOLVED\"},{\"type\":\"defect\",\"status\":\"RESOLVED\",\"last_change_time\":\"2020-04-15T18:26:12Z\",\"id\":1624524,\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":false,\"whiteboard\":\"\",\"creation_time\":\"2020-03-24T06:07:25Z\",\"resolution\":\"FIXED\",\"summary\":\"0.14 - 0.15% installer size (osx-shippable) regression on push 16f2eded7e001e3286715b31bb93fc8fc430d046 (Mon March 23 2020)\"},{\"type\":\"defect\",\"status\":\"RESOLVED\",\"last_change_time\":\"2020-04-14T14:05:13Z\",\"is_open\":false,\"keywords\":[\"perf-alert\",\"regression\"],\"id\":1627156,\"creation_time\":\"2020-04-03T05:50:33Z\",\"whiteboard\":\"\",\"resolution\":\"WORKSFORME\",\"summary\":\"0.11% installer size (osx-shippable) regression on push 2e661ffb15f2d0c90deb73d497b4752a94b4168d (Thu April 2 2020)\"},{\"summary\":\"0.14 - 0.16% installer size (osx-shippable) regression on push a3426e213b24c1da02ec131ae2fff6f29d04b2a4 (Mon April 6 2020)\",\"resolution\":\"\",\"creation_time\":\"2020-04-08T06:00:08Z\",\"whiteboard\":\"\",\"id\":1628207,\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":true,\"last_change_time\":\"2020-05-12T00:55:08Z\",\"status\":\"NEW\",\"type\":\"defect\"},{\"last_change_time\":\"2020-05-18T12:17:14Z\",\"type\":\"defect\",\"status\":\"RESOLVED\",\"resolution\":\"FIXED\",\"summary\":\"0.26 - 40.13% build times / compiler_metrics num_static_constructors / installer size (android-4-0-armv7-api16, osx-shippable, windows2012-64-shippable) regression on push 82f9e4bad64592efb70ded65f86e566d3ca2c664 (Tue May 12 2020)\",\"is_open\":false,\"id\":1637503,\"keywords\":[\"perf-alert\",\"regression\"],\"creation_time\":\"2020-05-13T05:48:45Z\",\"whiteboard\":\"\"},{\"last_change_time\":\"2020-05-20T16:05:31Z\",\"status\":\"RESOLVED\",\"type\":\"defect\",\"summary\":\"0.36 - 0.48% installer size (osx-shippable) regression on push 9b8606a93c7591af9ebf57e6cbf2afb52f970ac5 (Fri May 15 2020)\",\"resolution\":\"WONTFIX\",\"creation_time\":\"2020-05-18T08:24:37Z\",\"whiteboard\":\"\",\"keywords\":[\"perf-alert\",\"regression\"],\"id\":1638763,\"is_open\":false},{\"summary\":\"0.76 - 1.03% installer size (osx-shippable) regression on push f816bb1d97cb89747d731078477c46ce581d4fb4 (Tue May 19 2020)\",\"resolution\":\"WONTFIX\",\"creation_time\":\"2020-05-20T05:39:44Z\",\"whiteboard\":\"\",\"id\":1639445,\"keywords\":[\"perf-alert\",\"regression\"],\"is_open\":false,\"last_change_time\":\"2020-05-20T06:50:32Z\",\"status\":\"RESOLVED\",\"type\":\"defect\"}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-7geIoAN6ONJvirjE2r9cnfHjirP8dcwTTYl41GH6FY3pVg54' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:02 GMT"],
"ETag": ["LMafq7wM1B1TJ+kftbKGlg"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; path=/; secure; HttpOnly; SameSite=Lax",
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug?longdesc=build_metrics%2Cinstaller+size&longdesc_type=allwordssubstr&longdesc_initial=1&keywords=perf%2Cperf-alert&keywords_type=anywords&creation_time=2019-12-17T00%3A00%3A00Z&query_format=advanced&include_fields=id%2Ctype%2Cresolution%2Clast_change_time%2Cis_open%2Ccreation_time%2Csummary%2Cwhiteboard%2Cstatus%2Ckeywords"
}
},
{
"recorded_at": "2020-06-02T00:00:26",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1605110/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"},{\"field_name\":\"component\",\"added\":\"General\",\"removed\":\"Performance\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"removed\":\"\",\"added\":\"1604578\",\"field_name\":\"regressed_by\"},{\"removed\":\"\",\"field_name\":\"blocks\",\"added\":\"1600879\"},{\"removed\":\"Testing\",\"field_name\":\"product\",\"added\":\"Firefox Build System\"},{\"field_name\":\"target_milestone\",\"added\":\"mozilla73\",\"removed\":\"---\"},{\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\",\"removed\":\"\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox_esr68\",\"removed\":\"---\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox71\",\"added\":\"unaffected\"},{\"field_name\":\"cf_status_firefox72\",\"added\":\"unaffected\",\"removed\":\"---\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox73\",\"added\":\"affected\"}],\"when\":\"2019-12-19T14:37:03Z\"},{\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2019-12-19T18:15:13Z\"},{\"when\":\"2019-12-19T21:37:41Z\",\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"\",\"removed\":\"needinfo?([email protected])\"}]},{\"when\":\"2019-12-20T00:15:49Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"},{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}]},{\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"added\":\"\",\"field_name\":\"flagtypes.name\"}],\"when\":\"2019-12-20T08:32:24Z\"},{\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2019-12-20T14:55:40Z\"},{\"when\":\"2019-12-20T21:03:16Z\",\"changes\":[{\"removed\":\"NEW\",\"field_name\":\"status\",\"added\":\"ASSIGNED\"},{\"added\":\"[email protected]\",\"field_name\":\"assigned_to\",\"removed\":\"[email protected]\"}],\"who\":\"[email protected]\"},{\"changes\":[{\"removed\":\"ASSIGNED\",\"added\":\"RESOLVED\",\"field_name\":\"status\"},{\"field_name\":\"resolution\",\"added\":\"FIXED\",\"removed\":\"\"},{\"added\":\"2019-12-21T09:53:02Z\",\"field_name\":\"cf_last_resolved\",\"removed\":\"\"},{\"removed\":\"affected\",\"field_name\":\"cf_status_firefox73\",\"added\":\"fixed\"},{\"comment_id\":14560004,\"comment_count\":11,\"field_name\":\"comment_tag\",\"added\":\"bugherder\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2019-12-21T09:53:02Z\"},{\"changes\":[{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2019-12-23T12:36:49Z\"},{\"when\":\"2019-12-23T16:50:17Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}]}],\"alias\":null,\"id\":1605110}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-CQSKsrXpCVvHQzdLCzRdxmm35LQLPefexUEyzK0TeeCWHzd7' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:03 GMT"],
"ETag": ["/IRmW6cQ1K7jDeJoYmJ05w"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1605110/history"
}
},
{
"recorded_at": "2020-06-02T00:00:26",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1608365/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"id\":1608365,\"alias\":null,\"history\":[{\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"},{\"added\":\"Canvas: WebGL\",\"field_name\":\"component\",\"removed\":\"Performance\"},{\"added\":\"unspecified\",\"field_name\":\"version\",\"removed\":\"Version 3\"},{\"added\":\"1477756\",\"field_name\":\"regressed_by\",\"removed\":\"\"},{\"field_name\":\"blocks\",\"added\":\"1607747\",\"removed\":\"\"},{\"removed\":\"Testing\",\"added\":\"Core\",\"field_name\":\"product\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox_esr68\",\"added\":\"unaffected\"},{\"field_name\":\"cf_status_firefox72\",\"added\":\"unaffected\",\"removed\":\"---\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox73\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox74\",\"added\":\"affected\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-10T10:06:28Z\"},{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"\",\"removed\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-10T22:46:49Z\"},{\"changes\":[{\"field_name\":\"status\",\"added\":\"RESOLVED\",\"removed\":\"NEW\"},{\"added\":\"WONTFIX\",\"field_name\":\"resolution\",\"removed\":\"\"},{\"removed\":\"\",\"added\":\"2020-01-10T22:47:17Z\",\"field_name\":\"cf_last_resolved\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-10T22:47:17Z\"},{\"when\":\"2020-01-14T03:14:04Z\",\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"cf_status_firefox74\",\"added\":\"wontfix\",\"removed\":\"affected\"}]}]}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-password, x-bugzilla-token, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-6c3tOBdFBPUSoN2SShAbtCIyTs6E2eD2tlBaAvuPEToOsghz' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:03 GMT"],
"ETag": ["Q7UwFCuq8XI2m2FDaSZUBw"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1608365/history"
}
},
{
"recorded_at": "2020-06-02T00:00:27",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1608769/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"},{\"added\":\"Telemetry\",\"field_name\":\"component\",\"removed\":\"Performance\"},{\"removed\":\"Version 3\",\"added\":\"unspecified\",\"field_name\":\"version\"},{\"field_name\":\"product\",\"added\":\"Toolkit\",\"removed\":\"Testing\"},{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-13T09:38:43Z\"},{\"when\":\"2020-01-13T14:04:45Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"removed\":\"needinfo?([email protected])\",\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}]},{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\",\"removed\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-13T16:43:07Z\"},{\"who\":\"[email protected]\",\"when\":\"2020-01-14T08:43:00Z\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"added\":\"\",\"field_name\":\"flagtypes.name\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-01-15T08:29:49Z\",\"changes\":[{\"removed\":\"NEW\",\"field_name\":\"status\",\"added\":\"RESOLVED\"},{\"field_name\":\"resolution\",\"added\":\"WONTFIX\",\"removed\":\"\"},{\"added\":\"2020-01-15T08:29:49Z\",\"field_name\":\"cf_last_resolved\",\"removed\":\"\"}]}],\"alias\":null,\"id\":1608769}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-login, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-qxlj1XFzpI40G6yhG3IuJWBu7gSUGuXnhSoV2aLV5OhDShqw' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:03 GMT"],
"ETag": ["YF1BkbMbA9ji/IKJ2rxfjA"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1608769/history"
}
},
{
"recorded_at": "2020-06-02T00:00:27",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1609949/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"},{\"removed\":\"\",\"added\":\"needinfo?([email protected]), needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-17T15:12:44Z\"},{\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"},{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-17T15:17:01Z\"},{\"when\":\"2020-01-17T17:52:07Z\",\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"status\",\"added\":\"RESOLVED\",\"removed\":\"NEW\"},{\"added\":\"1547111\",\"field_name\":\"regressed_by\",\"removed\":\"\"},{\"removed\":\"\",\"added\":\"FIXED\",\"field_name\":\"resolution\"},{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"},{\"removed\":\"\",\"added\":\"2020-01-17T17:52:07Z\",\"field_name\":\"cf_last_resolved\"}]},{\"when\":\"2020-01-17T17:56:04Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}]},{\"changes\":[{\"field_name\":\"assigned_to\",\"added\":\"[email protected]\",\"removed\":\"[email protected]\"},{\"field_name\":\"target_milestone\",\"added\":\"mozilla74\",\"removed\":\"---\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox_esr68\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox72\",\"removed\":\"---\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox73\",\"removed\":\"---\"},{\"added\":\"fixed\",\"field_name\":\"cf_status_firefox74\",\"removed\":\"---\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-19T18:12:37Z\"}],\"id\":1609949,\"alias\":null}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-login, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-kA86MdJbd5xSQxZwXD0lEDz0bpOrbcV5zD1qqo5W0txhVMDh' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:04 GMT"],
"ETag": ["G20VRKru6e2+4gs5nrQisQ"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1609949/history"
}
},
{
"recorded_at": "2020-06-02T00:00:27",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1611073/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"alias\":null,\"history\":[{\"when\":\"2020-01-23T06:51:14Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}]},{\"when\":\"2020-01-23T06:51:45Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"Graphics: WebGPU\",\"removed\":\"Performance\",\"field_name\":\"component\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"added\":\"Core\",\"field_name\":\"product\",\"removed\":\"Testing\"},{\"removed\":\"---\",\"field_name\":\"target_milestone\",\"added\":\"mozilla74\"},{\"field_name\":\"cf_status_firefox_esr68\",\"removed\":\"---\",\"added\":\"unaffected\"},{\"field_name\":\"cf_status_firefox72\",\"removed\":\"---\",\"added\":\"unaffected\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox73\",\"removed\":\"---\"}]},{\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\",\"added\":\"\"}],\"when\":\"2020-01-23T13:26:18Z\"},{\"when\":\"2020-01-27T13:28:43Z\",\"changes\":[{\"added\":\"RESOLVED\",\"field_name\":\"status\",\"removed\":\"NEW\"},{\"added\":\"WONTFIX\",\"field_name\":\"resolution\",\"removed\":\"\"},{\"field_name\":\"cf_last_resolved\",\"removed\":\"\",\"added\":\"2020-01-27T13:28:43Z\"}],\"who\":\"[email protected]\"},{\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"}],\"who\":\"[email protected]\",\"when\":\"2020-01-28T08:02:42Z\"}],\"id\":1611073}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-api-key, x-phabricator-token, x-bugzilla-token, x-bugzilla-password, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Length": ["1371"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-wSJ3XaAb1n9b6DJiTUg4rhsmWHphkKdhqvxc919X2tMYG4Kq' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:04 GMT"],
"ETag": ["HEOhZj252K8NTdYoL7sFTw"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1611073/history"
}
},
{
"recorded_at": "2020-06-02T00:00:28",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1611804/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"alias\":null,\"id\":1611804,\"history\":[{\"who\":\"[email protected]\",\"when\":\"2020-01-27T15:01:34Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"blocks\",\"added\":\"1607747\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"},{\"added\":\"1609175\",\"field_name\":\"regressed_by\",\"removed\":\"\"},{\"field_name\":\"product\",\"added\":\"Core\",\"removed\":\"Testing\"},{\"removed\":\"---\",\"field_name\":\"target_milestone\",\"added\":\"mozilla74\"},{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"},{\"field_name\":\"component\",\"added\":\"Graphics: WebGPU\",\"removed\":\"Performance\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox_esr68\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox72\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox73\",\"added\":\"unaffected\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox74\",\"added\":\"affected\"}]},{\"when\":\"2020-01-27T22:12:42Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-01-28T08:02:41Z\",\"changes\":[{\"removed\":\"\",\"added\":\"DUPLICATE\",\"field_name\":\"resolution\"},{\"field_name\":\"flagtypes.name\",\"added\":\"\",\"removed\":\"needinfo?([email protected])\"},{\"removed\":\"NEW\",\"added\":\"RESOLVED\",\"field_name\":\"status\"},{\"added\":\"2020-01-28T08:02:41Z\",\"field_name\":\"cf_last_resolved\",\"removed\":\"\"}]},{\"changes\":[{\"removed\":\"affected\",\"added\":\"wontfix\",\"field_name\":\"cf_status_firefox74\"}],\"who\":\"[email protected]\",\"when\":\"2020-02-04T02:46:29Z\"}]}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-login, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-ITBErRF2HXlP6fpqnFjcAWNYH1rMUCc6pP39bwLWyHXAGNdh' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:04 GMT"],
"ETag": ["xE+PgPvpVUriJ2qXiEOHcw"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1611804/history"
}
},
{
"recorded_at": "2020-06-02T00:00:28",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1615592/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2020-02-14T13:18:02Z\"},{\"when\":\"2020-02-14T13:18:20Z\",\"changes\":[{\"removed\":\"Version 3\",\"added\":\"unspecified\",\"field_name\":\"version\"},{\"removed\":\"Performance\",\"added\":\"Security: PSM\",\"field_name\":\"component\"},{\"removed\":\"Testing\",\"added\":\"Core\",\"field_name\":\"product\"}],\"who\":\"[email protected]\"},{\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"},{\"removed\":\"needinfo?([email protected])\",\"added\":\"\",\"field_name\":\"flagtypes.name\"}],\"when\":\"2020-02-14T14:53:17Z\"},{\"when\":\"2020-02-14T17:49:51Z\",\"changes\":[{\"field_name\":\"status\",\"added\":\"RESOLVED\",\"removed\":\"NEW\"},{\"field_name\":\"resolution\",\"added\":\"WONTFIX\",\"removed\":\"\"},{\"field_name\":\"cf_last_resolved\",\"added\":\"2020-02-14T17:49:51Z\",\"removed\":\"\"}],\"who\":\"[email protected]\"},{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"We added a new PKCS11 module to the Mac build; it's about 200kB. This is the Mac implementation of Bug 1591269 which enables Firefox on OSX to be used in enterprise environments where it's currently banned. It's not going to get any bigger.\",\"field_name\":\"comment_revision\",\"comment_count\":1,\"comment_id\":14641599,\"removed\":\"We added a new PKCS11 module to the Mac build; it's about 200kB. This is a the Mac implementation of Bug 1591269 which enables Firefox on OSX to be used in enterprise environments where it's currently banned. It's not going to get any bigger.\"}],\"when\":\"2020-02-14T17:50:27Z\"}],\"alias\":null,\"id\":1615592}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-cpHRiUkHt4snsDDZSWlkZzNHnp4yzR8pmwJxqgv6VU1Q6RuJ' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:05 GMT"],
"ETag": ["ryVapcnS+WfVPHILVsYSbg"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1615592/history"
}
},
{
"recorded_at": "2020-06-02T00:00:28",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1621917/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"who\":\"[email protected]\",\"when\":\"2020-03-12T11:17:24Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"regressed_by\",\"added\":\"1614561\"},{\"added\":\"1619461\",\"field_name\":\"blocks\",\"removed\":\"\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"removed\":\"Performance\",\"added\":\"Toolchains\",\"field_name\":\"component\"},{\"field_name\":\"product\",\"added\":\"Firefox Build System\",\"removed\":\"Testing\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox75\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-03-12T11:17:43Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"}]},{\"changes\":[{\"field_name\":\"regressed_by\",\"added\":\"1619461\",\"removed\":\"1614561\"},{\"field_name\":\"blocks\",\"added\":\"1614561\",\"removed\":\"1619461\"}],\"when\":\"2020-03-12T11:24:01Z\",\"who\":\"[email protected]\"},{\"who\":\"[email protected]\",\"when\":\"2020-03-13T16:40:48Z\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}]},{\"when\":\"2020-03-17T12:15:07Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"},{\"added\":\"affected\",\"field_name\":\"cf_status_firefox76\",\"removed\":\"---\"}]},{\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"},{\"field_name\":\"assigned_to\",\"added\":\"[email protected]\",\"removed\":\"[email protected]\"},{\"field_name\":\"priority\",\"added\":\"P3\",\"removed\":\"--\"}],\"who\":\"[email protected]\",\"when\":\"2020-03-17T19:00:18Z\"},{\"when\":\"2020-03-25T20:03:22Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox_esr68\",\"added\":\"unaffected\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox74\"}]},{\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"added\":\"fix-optional\",\"field_name\":\"cf_status_firefox76\",\"removed\":\"affected\"}],\"when\":\"2020-04-06T13:12:30Z\",\"who\":\"[email protected]\"},{\"when\":\"2020-04-14T04:02:26Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"}]},{\"changes\":[{\"added\":\"wontfix\",\"field_name\":\"cf_status_firefox76\",\"removed\":\"fix-optional\"},{\"added\":\"fix-optional\",\"field_name\":\"cf_status_firefox77\",\"removed\":\"---\"}],\"when\":\"2020-04-22T02:35:22Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"removed\":\"normal\",\"field_name\":\"severity\",\"added\":\"S3\"},{\"removed\":\"[email protected]\",\"added\":\"[email protected]\",\"field_name\":\"assigned_to\"}],\"when\":\"2020-05-12T00:51:53Z\",\"who\":\"[email protected]\"}],\"alias\":null,\"id\":1621917}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-login, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-FZ677VdxSyy4xmwazcYdIYA7QDc1xXrJCp2m36NcUdw1p0A7' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:05 GMT"],
"ETag": ["b70MvEiDWCS+oVE9mJCSWQ"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1621917/history"
}
},
{
"recorded_at": "2020-06-02T00:00:29",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1622668/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"id\":1622668,\"alias\":null,\"history\":[{\"changes\":[{\"added\":\"Core\",\"field_name\":\"product\",\"removed\":\"Testing\"},{\"removed\":\"Performance\",\"field_name\":\"component\",\"added\":\"Graphics: WebRender\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"},{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"}],\"when\":\"2020-03-15T18:38:55Z\",\"who\":\"[email protected]\"},{\"who\":\"[email protected]\",\"when\":\"2020-03-15T18:39:06Z\",\"changes\":[{\"added\":\"affected\",\"field_name\":\"cf_status_firefox75\",\"removed\":\"---\"}]},{\"when\":\"2020-03-15T18:40:10Z\",\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"}]},{\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2020-03-15T18:48:11Z\"},{\"when\":\"2020-03-15T23:23:16Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"NEW\",\"added\":\"ASSIGNED\",\"field_name\":\"status\"},{\"removed\":\"[email protected]\",\"added\":\"[email protected]\",\"field_name\":\"assigned_to\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-03-15T23:27:14Z\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"},{\"field_name\":\"keywords\",\"added\":\"leave-open\",\"removed\":\"\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-03-16T00:57:34Z\",\"changes\":[{\"removed\":\"leave-open\",\"added\":\"\",\"field_name\":\"keywords\"}]},{\"when\":\"2020-03-16T01:31:14Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"I did some further investigation. The build times regression is not actually mine, since looking at the graph in https://treeherder.mozilla.org/perf.html#/graphs?highlightAlerts=1&series=autoland,1917226,1,2&timerange=1209600 shows that during the days where my patches were fully backed out the regression actually remained. It was only on March 13 14:39 that my patches actually landed, so between the alert and then you would have seen a drop in the metric back to normal.\\n\\nSome other patch seems to have snuck in from another bug at the same time that is causing this in with the patch set https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2aadc604b542e70f7aeac259f11d1c6cea5a4a0a&tochange=c8f0e8127ec02fbab8c29c0cacbce7de871666d6 but it is not bug 1612941 that is causing that.\",\"field_name\":\"comment_revision\",\"removed\":\"I did some further investigation. The build times regression is not actually mine, since looking at the graph in https://treeherder.mozilla.org/perf.html#/graphs?highlightAlerts=1&series=autoland,1917226,1,2&timerange=1209600 shows that during the days where my patches were fully backed out the regression actually remained.\\n\\nSome other patch seems to have snuck in from another bug at the same time that is causing this in with the patch set https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2aadc604b542e70f7aeac259f11d1c6cea5a4a0a&tochange=c8f0e8127ec02fbab8c29c0cacbce7de871666d6 but it is not bug 1612941 that is causing that.\",\"comment_count\":4,\"comment_id\":14695935}]},{\"who\":\"[email protected]\",\"when\":\"2020-03-16T02:00:10Z\",\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"},{\"removed\":\"\",\"field_name\":\"see_also\",\"added\":\"https://bugzilla.mozilla.org/show_bug.cgi?id=1619461\"},{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"}]},{\"changes\":[{\"field_name\":\"comment_revision\",\"added\":\"I was trying to look through the perfherder graphs, and osx-cross build times debug vanilla metric seems to be run more frequently by the automation than the fuzzing metric. I noticed that both osx-cross build times debug metrics spiked at about the same time, but due to the better history for the vanilla metrics, it was easier to find a potential culprit.\\n\\nBoiling this down to where the spike actually occurred, it pinpointed me to this range which is actually from before my change: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ce48cc49397b1ec8f3a206d498fa68ee738ba169&tochange=7a1bf4c17b2574a9ce5dfe1adb02c10f73c3093c\\n\\nIn that range, the first time where it seems to spike is actually at https://hg.mozilla.org/integration/autoland/rev/2f5aba2e2c099a1df26e3444ccec2be0b4ff4613 which is bug 1619461. dmajor?\",\"comment_id\":14695949,\"comment_count\":5,\"removed\":\"I was trying to look through the perfherder graphs, and osx-cross build times debug vanilla metric seems to be run more frequently by the automation than the fuzzing metric. I noticed that both osx-cross build times debug metrics spiked at about the same time, but due to the better history for the vanilla metrics, it was easier to find a potential culprit.\\n\\nBoiling this down to where the spike actually occurred, it pinpointed me to this range which is actually from before my change: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ce48cc49397b1ec8f3a206d498fa68ee738ba169&tochange=7a1bf4c17b2574a9ce5dfe1adb02c10f73c3093c\\n\\nIn that range, the first time where it seems to spike is actually at https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ce48cc49397b1ec8f3a206d498fa68ee738ba169&tochange=7a1bf4c17b2574a9ce5dfe1adb02c10f73c3093c which is bug 1619461. dmajor?\"}],\"when\":\"2020-03-16T02:01:17Z\",\"who\":\"[email protected]\"},{\"who\":\"[email protected]\",\"when\":\"2020-03-16T09:16:44Z\",\"changes\":[{\"removed\":\"\",\"added\":\"[email protected]\",\"field_name\":\"cc\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-03-16T09:29:25Z\",\"changes\":[{\"added\":\"FIXED\",\"field_name\":\"resolution\",\"removed\":\"\"},{\"added\":\"mozilla76\",\"field_name\":\"target_milestone\",\"removed\":\"---\"},{\"removed\":\"ASSIGNED\",\"field_name\":\"status\",\"added\":\"RESOLVED\"},{\"field_name\":\"cf_last_resolved\",\"added\":\"2020-03-16T09:29:25Z\",\"removed\":\"\"},{\"added\":\"fixed\",\"field_name\":\"cf_status_firefox76\",\"removed\":\"---\"},{\"removed\":\"\",\"comment_count\":6,\"comment_id\":14697818,\"added\":\"bugherder\",\"field_name\":\"comment_tag\"}]},{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"\",\"removed\":\"needinfo?([email protected])\"}],\"when\":\"2020-03-16T13:54:47Z\",\"who\":\"[email protected]\"},{\"when\":\"2020-03-16T14:31:20Z\",\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"}]},{\"changes\":[{\"field_name\":\"cf_status_firefox_esr68\",\"added\":\"unaffected\",\"removed\":\"---\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox73\",\"added\":\"unaffected\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox74\"},{\"field_name\":\"cf_status_firefox75\",\"added\":\"unaffected\",\"removed\":\"affected\"}],\"when\":\"2020-03-16T18:24:28Z\",\"who\":\"[email protected]\"}]}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-login, x-phabricator-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-joWB9baw8Em0vkY74VQ69fB9sL5FJh8OzGAxGgZTLtCPijbB' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:06 GMT"],
"ETag": ["sOo40SD2vrXtzC3cfnRb5A"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1622668/history"
}
},
{
"recorded_at": "2020-06-02T00:00:29",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1624524/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"history\":[{\"who\":\"[email protected]\",\"when\":\"2020-03-24T06:07:25Z\",\"changes\":[{\"removed\":\"\",\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}]},{\"changes\":[{\"field_name\":\"product\",\"added\":\"Core\",\"removed\":\"Testing\"},{\"field_name\":\"version\",\"added\":\"unspecified\",\"removed\":\"Version 3\"},{\"removed\":\"Performance\",\"added\":\"Javascript: WebAssembly\",\"field_name\":\"component\"}],\"when\":\"2020-03-24T06:07:57Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"field_name\":\"cc\",\"added\":\"[email protected], [email protected]\",\"removed\":\"\"},{\"removed\":\"\",\"added\":\"needinfo?([email protected]), needinfo?([email protected]), needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}],\"when\":\"2020-03-24T07:50:24Z\",\"who\":\"[email protected]\"},{\"when\":\"2020-03-24T09:12:53Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"needinfo?([email protected]), needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}]},{\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2020-03-24T09:17:25Z\"},{\"changes\":[{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}],\"when\":\"2020-03-25T00:07:57Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"removed\":\"[email protected]\",\"added\":\"[email protected]\",\"field_name\":\"assigned_to\"}],\"who\":\"[email protected]\",\"when\":\"2020-03-25T00:08:19Z\"},{\"who\":\"[email protected]\",\"when\":\"2020-03-25T20:17:43Z\",\"changes\":[{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox_esr68\",\"removed\":\"---\"},{\"removed\":\"---\",\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox74\"},{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox75\",\"removed\":\"---\"}]},{\"who\":\"[email protected]\",\"when\":\"2020-04-06T12:19:41Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"},{\"field_name\":\"cc\",\"added\":\"[email protected]\",\"removed\":\"\"}]},{\"when\":\"2020-04-06T14:37:26Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"--\",\"added\":\"P2\",\"field_name\":\"priority\"},{\"removed\":\"needinfo?([email protected])\",\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}]},{\"when\":\"2020-04-08T14:41:59Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox77\",\"added\":\"affected\"}]},{\"when\":\"2020-04-08T14:44:04Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"removed\":\"\"},{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected], [email protected]\"}]},{\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}],\"when\":\"2020-04-08T17:03:58Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"\",\"removed\":\"needinfo?([email protected])\"}],\"when\":\"2020-04-08T20:54:29Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"added\":\"RESOLVED\",\"field_name\":\"status\",\"removed\":\"NEW\"},{\"removed\":\"\",\"added\":\"FIXED\",\"field_name\":\"resolution\"},{\"removed\":\"\",\"added\":\"2020-04-11T09:37:18Z\",\"field_name\":\"cf_last_resolved\"},{\"field_name\":\"cf_status_firefox77\",\"added\":\"fixed\",\"removed\":\"affected\"},{\"field_name\":\"comment_tag\",\"added\":\"bugherder\",\"comment_id\":14748420,\"comment_count\":14,\"removed\":\"\"}],\"when\":\"2020-04-11T09:37:18Z\",\"who\":\"[email protected]\"},{\"changes\":[{\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\",\"removed\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-13T12:00:48Z\"},{\"when\":\"2020-04-15T15:37:02Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"added\":\"\",\"field_name\":\"flagtypes.name\"},{\"field_name\":\"flagtypes.name\",\"attachment_id\":9136479,\"added\":\"approval-mozilla-beta?\",\"removed\":\"\"}]},{\"changes\":[{\"added\":\"approval-mozilla-beta?\",\"field_name\":\"flagtypes.name\",\"attachment_id\":9136478,\"removed\":\"\"}],\"when\":\"2020-04-15T15:37:05Z\",\"who\":\"[email protected]\"},{\"when\":\"2020-04-15T18:23:27Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"approval-mozilla-beta+\",\"attachment_id\":9136478,\"field_name\":\"flagtypes.name\",\"removed\":\"approval-mozilla-beta?\"}]},{\"changes\":[{\"removed\":\"approval-mozilla-beta?\",\"attachment_id\":9136479,\"field_name\":\"flagtypes.name\",\"added\":\"approval-mozilla-beta+\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-15T18:23:29Z\"},{\"changes\":[{\"removed\":\"affected\",\"field_name\":\"cf_status_firefox76\",\"added\":\"fixed\"},{\"comment_count\":18,\"removed\":\"\",\"comment_id\":14757414,\"added\":\"bugherder\",\"field_name\":\"comment_tag\"},{\"comment_id\":14757414,\"comment_count\":18,\"removed\":\"\",\"field_name\":\"comment_tag\",\"added\":\"uplift\"}],\"when\":\"2020-04-15T18:26:12Z\",\"who\":\"[email protected]\"}],\"alias\":null,\"id\":1624524}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-password, x-bugzilla-api-key, x-bugzilla-login, x-phabricator-token, x-bugzilla-token"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-Qavj9mM4mAPXfU0beZjeUklfBdexoqdCPoqJa6ITp8rQJIBM' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:06 GMT"],
"ETag": ["dQxp2IppcgpFV/IZccmK9g"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1624524/history"
}
},
{
"recorded_at": "2020-06-02T00:00:29",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1627156/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"alias\":null,\"history\":[{\"changes\":[{\"field_name\":\"flagtypes.name\",\"removed\":\"\",\"added\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-03T05:50:33Z\"},{\"who\":\"[email protected]\",\"changes\":[{\"field_name\":\"version\",\"removed\":\"Version 3\",\"added\":\"unspecified\"},{\"removed\":\"Performance\",\"field_name\":\"component\",\"added\":\"Telemetry\"},{\"added\":\"Toolkit\",\"field_name\":\"product\",\"removed\":\"Testing\"}],\"when\":\"2020-04-03T05:51:33Z\"},{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"}],\"when\":\"2020-04-03T07:36:55Z\"},{\"changes\":[{\"added\":\"[email protected]\",\"removed\":\"\",\"field_name\":\"cc\"},{\"removed\":\"affected\",\"field_name\":\"cf_status_firefox76\",\"added\":\"disabled\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-06T12:27:35Z\"},{\"when\":\"2020-04-14T14:05:13Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"resolution\",\"added\":\"WORKSFORME\"},{\"added\":\"RESOLVED\",\"removed\":\"NEW\",\"field_name\":\"status\"},{\"field_name\":\"cf_last_resolved\",\"removed\":\"\",\"added\":\"2020-04-14T14:05:13Z\"}]}],\"id\":1627156}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-api-key, x-bugzilla-password, x-phabricator-token, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-95Xf54kK8XIPBCxL5dxD10hyaBCdkUiujkHU1UnZ9wtVr85B' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:06 GMT"],
"ETag": ["yMarsozrMrr24H5L7siieA"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1627156/history"
}
},
{
"recorded_at": "2020-06-02T00:00:30",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1628207/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"id\":1628207,\"alias\":null,\"history\":[{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"needinfo?([email protected])\",\"removed\":\"\",\"field_name\":\"flagtypes.name\"}],\"when\":\"2020-04-08T06:00:08Z\"},{\"when\":\"2020-04-08T06:00:26Z\",\"changes\":[{\"field_name\":\"product\",\"removed\":\"Testing\",\"added\":\"Core\"},{\"added\":\"unspecified\",\"field_name\":\"version\",\"removed\":\"Version 3\"},{\"added\":\"WebVR\",\"field_name\":\"component\",\"removed\":\"Performance\"}],\"who\":\"[email protected]\"},{\"changes\":[{\"added\":\"\",\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"},{\"removed\":\"[email protected]\",\"field_name\":\"assigned_to\",\"added\":\"[email protected]\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-08T18:52:11Z\"},{\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}],\"when\":\"2020-04-08T19:01:55Z\"},{\"changes\":[{\"field_name\":\"comment_revision\",\"removed\":\"The `mozilla::gfx::VRShMem::PullSystemState` and `mozilla::gfx::VRShMem::PushSystemState` methods implement a lock-free, queue-free IPC used for hard-realtime communication of VR hardware sensor inputs. They include dual generation-id checks for dirty copies, which are then discarded in the case of a data race.\\n\\nFor non-x86 platforms (eg, aarch64 for Android), a mutex is used in place of the lock-free data structure due to the non-guarantee of memory write order and cache coherent operation.\\n\\nWould it be appropriate to flag this as an exception?\",\"added\":\"[Deleted comment posted to incorrect bug]\",\"comment_id\":14743675,\"comment_count\":2}],\"who\":\"[email protected]\",\"when\":\"2020-04-08T19:03:38Z\"},{\"changes\":[{\"added\":\"\",\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-08T19:03:50Z\"},{\"changes\":[{\"removed\":\"\",\"field_name\":\"flagtypes.name\",\"added\":\"needinfo?([email protected])\"}],\"who\":\"[email protected]\",\"when\":\"2020-04-22T12:12:18Z\"},{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"[email protected]\",\"removed\":\"\",\"field_name\":\"cc\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox_esr68\",\"added\":\"unaffected\"},{\"field_name\":\"cf_status_firefox75\",\"removed\":\"---\",\"added\":\"unaffected\"},{\"added\":\"unaffected\",\"removed\":\"---\",\"field_name\":\"cf_status_firefox76\"}],\"when\":\"2020-04-22T14:49:07Z\"},{\"when\":\"2020-04-23T21:51:30Z\",\"changes\":[{\"added\":\"\",\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\"},{\"field_name\":\"priority\",\"removed\":\"--\",\"added\":\"P3\"}],\"who\":\"[email protected]\"},{\"when\":\"2020-04-29T14:12:34Z\",\"changes\":[{\"added\":\"[email protected]\",\"removed\":\"\",\"field_name\":\"cc\"},{\"added\":\"fix-optional\",\"field_name\":\"cf_status_firefox77\",\"removed\":\"affected\"}],\"who\":\"[email protected]\"},{\"when\":\"2020-05-07T22:56:26Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"depends_on\",\"added\":\"1636311\"}],\"who\":\"[email protected]\"},{\"changes\":[{\"added\":\"S3\",\"removed\":\"normal\",\"field_name\":\"severity\"}],\"who\":\"[email protected]\",\"when\":\"2020-05-12T00:55:08Z\"}]}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-phabricator-token, x-bugzilla-login, x-bugzilla-token, x-bugzilla-api-key, x-bugzilla-password"
],
"Connection": ["keep-alive"],
"Content-Length": ["3062"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-obU2EVlxdzsZhWtIN7Ja6iarhsLPPvM3xXWB68ArCSY5lPVt' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:06 GMT"],
"ETag": ["jV6jH3Hzsjq7S11nSAluuQ"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1628207/history"
}
},
{
"recorded_at": "2020-06-02T00:00:30",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1637503/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"alias\":null,\"history\":[{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"Firefox Build System\",\"field_name\":\"product\",\"removed\":\"Testing\"},{\"added\":\"1635744\",\"removed\":\"\",\"field_name\":\"blocks\"},{\"added\":\"needinfo?([email protected])\",\"removed\":\"\",\"field_name\":\"flagtypes.name\"},{\"added\":\"[email protected]\",\"field_name\":\"cc\",\"removed\":\"\"},{\"field_name\":\"regressed_by\",\"removed\":\"\",\"added\":\"1616692\"},{\"added\":\"Toolchains\",\"field_name\":\"component\",\"removed\":\"Performance\"},{\"removed\":\"Version 3\",\"field_name\":\"version\",\"added\":\"unspecified\"},{\"added\":\"unaffected\",\"removed\":\"---\",\"field_name\":\"cf_status_firefox_esr68\"},{\"added\":\"unaffected\",\"removed\":\"---\",\"field_name\":\"cf_status_firefox76\"},{\"removed\":\"---\",\"field_name\":\"cf_status_firefox77\",\"added\":\"unaffected\"},{\"added\":\"affected\",\"removed\":\"---\",\"field_name\":\"cf_status_firefox78\"}],\"when\":\"2020-05-13T06:12:16Z\"},{\"when\":\"2020-05-13T08:14:15Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"}]},{\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}],\"who\":\"[email protected]\",\"when\":\"2020-05-13T15:13:20Z\"},{\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"\",\"field_name\":\"cc\",\"added\":\"[email protected]\"},{\"removed\":\"regression\",\"field_name\":\"keywords\",\"added\":\"\"},{\"removed\":\"\",\"field_name\":\"resolution\",\"added\":\"FIXED\"},{\"field_name\":\"target_milestone\",\"removed\":\"---\",\"added\":\"mozilla78\"},{\"added\":\"RESOLVED\",\"field_name\":\"status\",\"removed\":\"NEW\"},{\"added\":\"2020-05-15T15:03:57Z\",\"removed\":\"\",\"field_name\":\"cf_last_resolved\"},{\"added\":\"fixed\",\"field_name\":\"cf_status_firefox78\",\"removed\":\"affected\"}],\"when\":\"2020-05-15T15:03:57Z\"},{\"when\":\"2020-05-18T12:17:14Z\",\"changes\":[{\"removed\":\"\",\"field_name\":\"keywords\",\"added\":\"regression\"}],\"who\":\"[email protected]\"}],\"id\":1637503}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-api-key, x-phabricator-token, x-bugzilla-token, x-bugzilla-password, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Length": ["1892"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-iHeIH7MG33aZH1jgcdbIBzTMjZpSFd6eSsPVryE2aOs6u2vp' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:07 GMT"],
"ETag": ["Mwvdyt3j+C8q0drq+o4wJA"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1637503/history"
}
},
{
"recorded_at": "2020-06-02T00:00:30",
"request": {
"body": {
"encoding": "utf-8",
"string": ""
},
"headers": {
"Accept": ["application/json"],
"Cookie": [
"Bugzilla_login_request_cookie=gtJgkGlLew; github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM"
],
"User-Agent": ["treeherder/backend"]
},
"method": "GET",
"uri": "https://bugzilla.mozilla.org/rest/bug/1638763/history"
},
"response": {
"body": {
"encoding": "UTF-8",
"string": "{\"bugs\":[{\"id\":1638763,\"history\":[{\"changes\":[{\"added\":\"needinfo?([email protected])\",\"removed\":\"\",\"field_name\":\"flagtypes.name\"}],\"who\":\"[email protected]\",\"when\":\"2020-05-18T08:24:37Z\"},{\"when\":\"2020-05-18T08:25:06Z\",\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"Testing\",\"field_name\":\"product\",\"added\":\"Firefox\"},{\"field_name\":\"component\",\"removed\":\"Performance\",\"added\":\"Sync\"},{\"added\":\"Firefox 78\",\"field_name\":\"target_milestone\",\"removed\":\"mozilla78\"}]},{\"who\":\"[email protected]\",\"changes\":[{\"added\":\"unaffected\",\"field_name\":\"cf_status_firefox76\",\"removed\":\"---\"},{\"field_name\":\"cf_status_firefox77\",\"removed\":\"---\",\"added\":\"unaffected\"}],\"when\":\"2020-05-18T12:19:32Z\"},{\"when\":\"2020-05-18T13:41:51Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"WONTFIX\",\"removed\":\"\",\"field_name\":\"resolution\"},{\"field_name\":\"status\",\"removed\":\"NEW\",\"added\":\"RESOLVED\"},{\"field_name\":\"flagtypes.name\",\"removed\":\"needinfo?([email protected])\",\"added\":\"\"},{\"added\":\"2020-05-18T13:41:51Z\",\"removed\":\"\",\"field_name\":\"cf_last_resolved\"}]},{\"when\":\"2020-05-18T13:52:59Z\",\"changes\":[{\"added\":\"needinfo?([email protected])\",\"removed\":\"\",\"field_name\":\"flagtypes.name\"}],\"who\":\"[email protected]\"},{\"when\":\"2020-05-19T02:46:42Z\",\"who\":\"[email protected]\",\"changes\":[{\"added\":\"[email protected]\",\"removed\":\"\",\"field_name\":\"cc\"}]},{\"who\":\"[email protected]\",\"changes\":[{\"removed\":\"needinfo?([email protected])\",\"field_name\":\"flagtypes.name\",\"added\":\"\"}],\"when\":\"2020-05-20T16:05:31Z\"}],\"alias\":null}]}"
},
"headers": {
"Access-Control-Allow-Origin": ["*"],
"Access-control-allow-headers": [
"accept, content-type, origin, user-agent, x-requested-with, x-bugzilla-token, x-bugzilla-api-key, x-bugzilla-password, x-phabricator-token, x-bugzilla-login"
],
"Connection": ["keep-alive"],
"Content-Security-Policy-Report-Only": [
"default-src 'self'; worker-src 'none'; connect-src 'self' https://product-details.mozilla.org https://www.google-analytics.com https://treeherder.mozilla.org/api/failurecount/ https://crash-stats.mozilla.org/api/SuperSearch/; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https://secure.gravatar.com; object-src 'none'; script-src 'self' 'nonce-fBV6wU2YwAj8rWSvym37lkhWY32dskeyWgTyaZp569fJbex7' 'unsafe-inline' https://www.google-analytics.com; style-src 'self' 'unsafe-inline'; frame-src https://crash-stop-addon.herokuapp.com; frame-ancestors 'self'; form-action 'self' https://www.google.com/search https://github.com/login/oauth/authorize https://github.com/login"
],
"Content-Type": ["application/json; charset=UTF-8"],
"Date": ["Thu, 04 Jun 2020 09:25:07 GMT"],
"ETag": ["A4ybi+4ZecVFodtF62jBXA"],
"Referrer-policy": ["same-origin"],
"Set-Cookie": [
"github_secret=dA5CNm5AoGQR0B7gLD36GhR7lgBJrrsPBQE2HCbcxF0UGQuXdpKCZJQGVGdeeapDCYu5JDaQ9r7FCpbCSmy4ODGNXOFmRFc8A2KA5TNE3Vw2VGTE1jGFWKwc0fEydgd004oDkNsdU1asFgNqHDs3SFVJaUQQykMCE07ByQ11HnyVkVGPxmUi4Hn9VFZH30xokuGkuNYo4qi1pFc97UfpDrxpnpzCa7c48eEAKj0t9fEKh2H5axY4hcUssZsVOTXM; path=/; secure; HttpOnly; SameSite=Lax"
],
"Status": ["200"],
"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"],
"Vary": ["Accept-Encoding"],
"X-content-type-options": ["nosniff"],
"X-frame-options": ["SAMEORIGIN"],
"X-xss-protection": ["1; mode=block"],
"transfer-encoding": ["chunked"]
},
"status": {
"code": 200,
"message": "OK"
},
"url": "https://bugzilla.mozilla.org/rest/bug/1638763/history"
}
}
],
"recorded_with": "betamax/0.8.1"
}
| {
"pile_set_name": "Github"
} |
[Icon Data]
DisplayName=mega-synced
| {
"pile_set_name": "Github"
} |
package com.softwaremill.bootzooka.util
trait LowerCased
| {
"pile_set_name": "Github"
} |
//
// __
// /\ \ _
// ____ ____ ___\ \ \_/ \ _____ ___ ___
// / _ \ / __ \ / __ \ \ < __ /\__ \ / __ \ / __ \
// /\ \_\ \/\ __//\ __/\ \ \\ \ /\_\ \/_/ / /\ \_\ \/\ \_\ \
// \ \____ \ \____\ \____\\ \_\\_\ \/_/ /\____\\ \____/\ \____/
// \/____\ \/____/\/____/ \/_//_/ \/____/ \/___/ \/___/
// /\____/
// \/___/
//
// Powered by BeeFramework
//
#import "BaseBoard_iPhone.h"
#import "MobClick.h"
#pragma mark -
@implementation BaseBoard_iPhone
#pragma mark -
- (void)load
{
}
ON_CREATE_VIEWS( signal )
{
self.view.backgroundColor = [UIImage imageNamed:@"index_body_bg.png"].patternColor;
}
ON_DELETE_VIEWS( signal )
{
}
ON_WILL_APPEAR( signal )
{
[MobClick beginLogPageView:[[self class] description]];
}
ON_WILL_DISAPPEAR( signal )
{
[MobClick endLogPageView:[[self class] description]];
}
@end
| {
"pile_set_name": "Github"
} |
using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;
namespace NetOffice.ADODBApi
{
/// <summary>
/// DispatchInterface _Record_Deprecated
/// SupportByVersion ADODB, 2.5
/// </summary>
[SupportByVersion("ADODB", 2.5)]
[EntityType(EntityType.IsDispatchInterface)]
public class _Record_Deprecated : _ADO
{
#pragma warning disable
#region Type Information
/// <summary>
/// Instance Type
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false), Category("NetOffice"), CoreOverridden]
public override Type InstanceType
{
get
{
return LateBindingApiWrapperType;
}
}
private static Type _type;
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public static Type LateBindingApiWrapperType
{
get
{
if (null == _type)
_type = typeof(_Record_Deprecated);
return _type;
}
}
#endregion
#region Ctor
/// <param name="factory">current used factory core</param>
/// <param name="parentObject">object there has created the proxy</param>
/// <param name="proxyShare">proxy share instead if com proxy</param>
public _Record_Deprecated(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
public _Record_Deprecated(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy)
{
}
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated(ICOMObject parentObject, object comProxy) : base(parentObject, comProxy)
{
}
///<param name="factory">current used factory core</param>
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType)
{
}
///<param name="parentObject">object there has created the proxy</param>
///<param name="comProxy">inner wrapped COM proxy</param>
///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated(ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(parentObject, comProxy, comProxyType)
{
}
///<param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated(ICOMObject replacedObject) : base(replacedObject)
{
}
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated() : base()
{
}
/// <param name="progId">registered progID</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public _Record_Deprecated(string progId) : base(progId)
{
}
#endregion
#region Properties
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get/Set
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public object ActiveConnection
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "ActiveConnection");
}
set
{
Factory.ExecuteVariantPropertySet(this, "ActiveConnection", value);
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public NetOffice.ADODBApi.Enums.ObjectStateEnum State
{
get
{
return Factory.ExecuteEnumPropertyGet<NetOffice.ADODBApi.Enums.ObjectStateEnum>(this, "State");
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get/Set
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public object Source
{
get
{
return Factory.ExecuteVariantPropertyGet(this, "Source");
}
set
{
Factory.ExecuteVariantPropertySet(this, "Source", value);
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get/Set
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public NetOffice.ADODBApi.Enums.ConnectModeEnum Mode
{
get
{
return Factory.ExecuteEnumPropertyGet<NetOffice.ADODBApi.Enums.ConnectModeEnum>(this, "Mode");
}
set
{
Factory.ExecuteEnumPropertySet(this, "Mode", value);
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public string ParentURL
{
get
{
return Factory.ExecuteStringPropertyGet(this, "ParentURL");
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public NetOffice.ADODBApi.Fields_Deprecated Fields
{
get
{
return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ADODBApi.Fields_Deprecated>(this, "Fields", NetOffice.ADODBApi.Fields_Deprecated.LateBindingApiWrapperType);
}
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// Get
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public NetOffice.ADODBApi.Enums.RecordTypeEnum RecordType
{
get
{
return Factory.ExecuteEnumPropertyGet<NetOffice.ADODBApi.Enums.RecordTypeEnum>(this, "RecordType");
}
}
#endregion
#region Methods
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.MoveRecordOptionsEnum Options = -1</param>
/// <param name="async">optional bool Async = false</param>
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source, object destination, object userName, object password, object options, object async)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", new object[]{ source, destination, userName, password, options, async });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord()
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord");
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", source);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source, object destination)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", source, destination);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source, object destination, object userName)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", source, destination, userName);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source, object destination, object userName, object password)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", source, destination, userName, password);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.MoveRecordOptionsEnum Options = -1</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string MoveRecord(object source, object destination, object userName, object password, object options)
{
return Factory.ExecuteStringMethodGet(this, "MoveRecord", new object[]{ source, destination, userName, password, options });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.CopyRecordOptionsEnum Options = -1</param>
/// <param name="async">optional bool Async = false</param>
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source, object destination, object userName, object password, object options, object async)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", new object[]{ source, destination, userName, password, options, async });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord()
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord");
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", source);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source, object destination)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", source, destination);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source, object destination, object userName)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", source, destination, userName);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source, object destination, object userName, object password)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", source, destination, userName, password);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="destination">optional string Destination = </param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.CopyRecordOptionsEnum Options = -1</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public string CopyRecord(object source, object destination, object userName, object password, object options)
{
return Factory.ExecuteStringMethodGet(this, "CopyRecord", new object[]{ source, destination, userName, password, options });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
/// <param name="async">optional bool Async = false</param>
[SupportByVersion("ADODB", 2.5)]
public void DeleteRecord(object source, object async)
{
Factory.ExecuteMethod(this, "DeleteRecord", source, async);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void DeleteRecord()
{
Factory.ExecuteMethod(this, "DeleteRecord");
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional string Source = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void DeleteRecord(object source)
{
Factory.ExecuteMethod(this, "DeleteRecord", source);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
/// <param name="mode">optional NetOffice.ADODBApi.Enums.ConnectModeEnum Mode = 0</param>
/// <param name="createOptions">optional NetOffice.ADODBApi.Enums.RecordCreateOptionsEnum CreateOptions = -1</param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.RecordOpenOptionsEnum Options = -1</param>
/// <param name="userName">optional string UserName = </param>
/// <param name="password">optional string Password = </param>
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection, object mode, object createOptions, object options, object userName, object password)
{
Factory.ExecuteMethod(this, "Open", new object[]{ source, activeConnection, mode, createOptions, options, userName, password });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open()
{
Factory.ExecuteMethod(this, "Open");
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source)
{
Factory.ExecuteMethod(this, "Open", source);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection)
{
Factory.ExecuteMethod(this, "Open", source, activeConnection);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
/// <param name="mode">optional NetOffice.ADODBApi.Enums.ConnectModeEnum Mode = 0</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection, object mode)
{
Factory.ExecuteMethod(this, "Open", source, activeConnection, mode);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
/// <param name="mode">optional NetOffice.ADODBApi.Enums.ConnectModeEnum Mode = 0</param>
/// <param name="createOptions">optional NetOffice.ADODBApi.Enums.RecordCreateOptionsEnum CreateOptions = -1</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection, object mode, object createOptions)
{
Factory.ExecuteMethod(this, "Open", source, activeConnection, mode, createOptions);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
/// <param name="mode">optional NetOffice.ADODBApi.Enums.ConnectModeEnum Mode = 0</param>
/// <param name="createOptions">optional NetOffice.ADODBApi.Enums.RecordCreateOptionsEnum CreateOptions = -1</param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.RecordOpenOptionsEnum Options = -1</param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection, object mode, object createOptions, object options)
{
Factory.ExecuteMethod(this, "Open", new object[]{ source, activeConnection, mode, createOptions, options });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <param name="source">optional object source</param>
/// <param name="activeConnection">optional object activeConnection</param>
/// <param name="mode">optional NetOffice.ADODBApi.Enums.ConnectModeEnum Mode = 0</param>
/// <param name="createOptions">optional NetOffice.ADODBApi.Enums.RecordCreateOptionsEnum CreateOptions = -1</param>
/// <param name="options">optional NetOffice.ADODBApi.Enums.RecordOpenOptionsEnum Options = -1</param>
/// <param name="userName">optional string UserName = </param>
[CustomMethod]
[SupportByVersion("ADODB", 2.5)]
public void Open(object source, object activeConnection, object mode, object createOptions, object options, object userName)
{
Factory.ExecuteMethod(this, "Open", new object[]{ source, activeConnection, mode, createOptions, options, userName });
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public void Close()
{
Factory.ExecuteMethod(this, "Close");
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public NetOffice.ADODBApi._Recordset_Deprecated GetChildren()
{
return Factory.ExecuteKnownReferenceMethodGet<NetOffice.ADODBApi._Recordset_Deprecated>(this, "GetChildren", NetOffice.ADODBApi._Recordset_Deprecated.LateBindingApiWrapperType);
}
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[SupportByVersion("ADODB", 2.5)]
public void Cancel()
{
Factory.ExecuteMethod(this, "Cancel");
}
#endregion
#pragma warning restore
}
}
| {
"pile_set_name": "Github"
} |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.hops.security;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSAlgorithm;
import com.nimbusds.jose.JWSHeader;
import com.nimbusds.jose.JWSSigner;
import com.nimbusds.jose.JWSVerifier;
import com.nimbusds.jose.KeyLengthException;
import com.nimbusds.jose.crypto.MACSigner;
import com.nimbusds.jose.crypto.MACVerifier;
import com.nimbusds.jwt.JWTClaimsSet;
import com.nimbusds.jwt.SignedJWT;
import java.text.ParseException;
import java.util.Random;
public class MockJWTIssuer {
private final byte[] sharedSecret;
private final JWSSigner signer;
private final JWSVerifier verifier;
private final Random rand;
public MockJWTIssuer(byte[] sharedSecret) throws KeyLengthException, JOSEException {
this.sharedSecret = sharedSecret;
signer = new MACSigner(sharedSecret);
verifier = new MACVerifier(sharedSecret);
rand = new Random();
}
public String generate(JWTClaimsSet.Builder claimsBuilder) throws JOSEException {
claimsBuilder.issuer("MockJWTIssuer");
claimsBuilder.claim("rand", rand.nextLong());
SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), claimsBuilder.build());
signedJWT.sign(signer);
return signedJWT.serialize();
}
public boolean verify(String token) throws ParseException, JOSEException {
SignedJWT jwt = SignedJWT.parse(token);
return jwt.verify(verifier);
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef ACORE_MOVEMENTGENERATOR_H
#define ACORE_MOVEMENTGENERATOR_H
#include "Define.h"
#include "ObjectRegistry.h"
#include "FactoryHolder.h"
#include "Common.h"
#include "MotionMaster.h"
class Unit;
class MovementGenerator
{
public:
virtual ~MovementGenerator();
virtual void Initialize(Unit*) = 0;
virtual void Finalize(Unit*) = 0;
virtual void Reset(Unit*) = 0;
virtual bool Update(Unit*, uint32 time_diff) = 0;
virtual MovementGeneratorType GetMovementGeneratorType() = 0;
virtual uint32 GetSplineId() const { return 0; } // Xinef: Escort system
virtual void unitSpeedChanged() { }
// used by Evade code for select point to evade with expected restart default movement
virtual bool GetResetPosition(float& /*x*/, float& /*y*/, float& /*z*/) { return false; }
};
template<class T, class D>
class MovementGeneratorMedium : public MovementGenerator
{
public:
void Initialize(Unit* u)
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoInitialize(static_cast<T*>(u));
}
void Finalize(Unit* u)
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoFinalize(static_cast<T*>(u));
}
void Reset(Unit* u)
{
//u->AssertIsType<T>();
(static_cast<D*>(this))->DoReset(static_cast<T*>(u));
}
bool Update(Unit* u, uint32 time_diff)
{
//u->AssertIsType<T>();
return (static_cast<D*>(this))->DoUpdate(static_cast<T*>(u), time_diff);
}
};
struct SelectableMovement : public FactoryHolder<MovementGenerator, MovementGeneratorType>
{
SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator, MovementGeneratorType>(mgt) {}
};
template<class REAL_MOVEMENT>
struct MovementGeneratorFactory : public SelectableMovement
{
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) {}
MovementGenerator* Create(void *) const;
};
typedef FactoryHolder<MovementGenerator, MovementGeneratorType> MovementGeneratorCreator;
typedef FactoryHolder<MovementGenerator, MovementGeneratorType>::FactoryHolderRegistry MovementGeneratorRegistry;
#endif
| {
"pile_set_name": "Github"
} |
It’s not possible to get legal recognition for your same-sex relationship in Morocco.
| {
"pile_set_name": "Github"
} |
# coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
FILE: sample_hooks.py
DESCRIPTION:
This sample demonstrates how to create, get, list, update, and delete hooks
under your Metrics Advisor account. EmailHook is used as an example in this sample.
USAGE:
python sample_hooks.py
Set the environment variables with your own values before running the sample:
1) METRICS_ADVISOR_ENDPOINT - the endpoint of your Azure Metrics Advisor service
2) METRICS_ADVISOR_SUBSCRIPTION_KEY - Metrics Advisor service subscription key
3) METRICS_ADVISOR_API_KEY - Metrics Advisor service API key
"""
import os
def sample_create_hook():
# [START create_hook]
from azure.ai.metricsadvisor import MetricsAdvisorKeyCredential, MetricsAdvisorAdministrationClient
from azure.ai.metricsadvisor.models import EmailHook
service_endpoint = os.getenv("METRICS_ADVISOR_ENDPOINT")
subscription_key = os.getenv("METRICS_ADVISOR_SUBSCRIPTION_KEY")
api_key = os.getenv("METRICS_ADVISOR_API_KEY")
client = MetricsAdvisorAdministrationClient(service_endpoint,
MetricsAdvisorKeyCredential(subscription_key, api_key))
hook = client.create_hook(
name="email hook",
hook=EmailHook(
description="my email hook",
emails_to_alert=["[email protected]"],
external_link="https://adwiki.azurewebsites.net/articles/howto/alerts/create-hooks.html"
)
)
return hook
# [END create_hook]
def sample_get_hook(hook_id):
# [START get_hook]
from azure.ai.metricsadvisor import MetricsAdvisorKeyCredential, MetricsAdvisorAdministrationClient
service_endpoint = os.getenv("METRICS_ADVISOR_ENDPOINT")
subscription_key = os.getenv("METRICS_ADVISOR_SUBSCRIPTION_KEY")
api_key = os.getenv("METRICS_ADVISOR_API_KEY")
client = MetricsAdvisorAdministrationClient(service_endpoint,
MetricsAdvisorKeyCredential(subscription_key, api_key))
hook = client.get_hook(hook_id)
print("Hook name: {}".format(hook.name))
print("Description: {}".format(hook.description))
print("Emails to alert: {}".format(hook.emails_to_alert))
print("External link: {}".format(hook.external_link))
print("Admins: {}".format(hook.admins))
# [END get_hook]
def sample_list_hooks():
# [START list_hooks]
from azure.ai.metricsadvisor import MetricsAdvisorKeyCredential, MetricsAdvisorAdministrationClient
service_endpoint = os.getenv("METRICS_ADVISOR_ENDPOINT")
subscription_key = os.getenv("METRICS_ADVISOR_SUBSCRIPTION_KEY")
api_key = os.getenv("METRICS_ADVISOR_API_KEY")
client = MetricsAdvisorAdministrationClient(service_endpoint,
MetricsAdvisorKeyCredential(subscription_key, api_key))
hooks = client.list_hooks()
for hook in hooks:
print("Hook type: {}".format(hook.hook_type))
print("Hook name: {}".format(hook.name))
print("Description: {}\n".format(hook.description))
# [END list_hooks]
def sample_update_hook(hook):
# [START update_hook]
from azure.ai.metricsadvisor import MetricsAdvisorKeyCredential, MetricsAdvisorAdministrationClient
service_endpoint = os.getenv("METRICS_ADVISOR_ENDPOINT")
subscription_key = os.getenv("METRICS_ADVISOR_SUBSCRIPTION_KEY")
api_key = os.getenv("METRICS_ADVISOR_API_KEY")
client = MetricsAdvisorAdministrationClient(service_endpoint,
MetricsAdvisorKeyCredential(subscription_key, api_key))
hook.name = "updated hook name"
hook.description = "updated hook description"
updated = client.update_hook(
hook,
emails_to_alert=["[email protected]"]
)
print("Updated name: {}".format(updated.name))
print("Updated description: {}".format(updated.description))
print("Updated emails: {}".format(updated.emails_to_alert))
# [END update_hook]
def sample_delete_hook(hook_id):
# [START delete_hook]
from azure.core.exceptions import ResourceNotFoundError
from azure.ai.metricsadvisor import MetricsAdvisorKeyCredential, MetricsAdvisorAdministrationClient
service_endpoint = os.getenv("METRICS_ADVISOR_ENDPOINT")
subscription_key = os.getenv("METRICS_ADVISOR_SUBSCRIPTION_KEY")
api_key = os.getenv("METRICS_ADVISOR_API_KEY")
client = MetricsAdvisorAdministrationClient(service_endpoint,
MetricsAdvisorKeyCredential(subscription_key, api_key))
client.delete_hook(hook_id)
try:
client.get_hook(hook_id)
except ResourceNotFoundError:
print("Hook successfully deleted.")
# [END delete_hook]
if __name__ == '__main__':
print("---Creating hook...")
hook = sample_create_hook()
print("Hook successfully created...")
print("\n---Get a hook...")
sample_get_hook(hook.id)
print("\n---List hooks...")
sample_list_hooks()
print("\n---Update a hook...")
sample_update_hook(hook)
print("\n---Delete a hook...")
sample_delete_hook(hook.id)
| {
"pile_set_name": "Github"
} |
.atk-layout
.atk-layout-row.atk-layout-expand
#atk-layout-content.atk-layout.atk-layout-cell
.atk-layout-column.atk-layout-expand.atk-valign-middle
.atk-wrapper
.atk-box-large(style="width: 400px").atk-move-center.atk-swatch-gray.atk-text-inherit
{$Content}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Networking.XMPP.Synchronization
{
/// <summary>
/// Delegate for clock synchronization callback methods.
/// </summary>
/// <param name="Sender">Sender</param>
/// <param name="e">Event argument</param>
public delegate void SynchronizationEventHandler(object Sender, SynchronizationEventArgs e);
/// <summary>
/// Event arguments containing the response of a clock synchronization request.
/// </summary>
public class SynchronizationEventArgs : IqResultEventArgs
{
private readonly long latency100Ns;
private readonly long clockDifference100Ns;
private readonly long? latencyHF;
private readonly long? clockDifferenceHF;
private readonly long hfFrequency;
internal SynchronizationEventArgs(long Latency100Ns, long ClockDifference100Ns, long? LatencyHF, long? ClockDifferenceHF,
long HfFrequency, IqResultEventArgs e)
: base(e)
{
this.latency100Ns = Latency100Ns;
this.clockDifference100Ns = ClockDifference100Ns;
this.latencyHF = LatencyHF;
this.clockDifferenceHF = ClockDifferenceHF;
this.hfFrequency = HfFrequency;
}
/// <summary>
/// Measured network latency in one direction, in units of 100 ns.
/// </summary>
public long Latency100Ns => this.latency100Ns;
/// <summary>
/// Measured clock difference between source clock and client clock, in units of 100 ns.
/// Source clock = client clock + clock difference
/// </summary>
public long ClockDifference100Ns => this.clockDifference100Ns;
/// <summary>
/// Latency in network, measured in local high-frequency timer ticks.
/// </summary>
public long? LatencyHF => this.latencyHF;
/// <summary>
/// Difference if high-frequency timers, measured in local high-frequency timer ticks.
/// </summary>
public long? ClockDifferenceHF => this.clockDifferenceHF;
/// <summary>
/// Frequency of local high-frequency timer, in ticks per second.
/// </summary>
public long HfFrequency => this.hfFrequency;
}
}
| {
"pile_set_name": "Github"
} |
import React from 'react'
import { sample } from 'lodash'
import { Imprint } from './imprint'
import './index.css'
import logo from './flask_micro.png'
const message = sample([
'built with ♥︎',
])
export default () =>
<footer>
<hr />
<div className="d-flex justify-content-between">
<a
className="text-muted text-decoration-none logo"
href="https://lab.js.org/"
target="_blank"
rel="noopener noreferrer"
>
<img
alt="lab.js logo"
src={ logo }
/>{' '}
<small>{ message }</small>
</a>
<Imprint />
</div>
</footer>
| {
"pile_set_name": "Github"
} |
{
"package": "com.privacy.pay",
"verified": true,
"authors": [
"iMusynx"
],
"last_update": {
"timestamp": 1573909761
},
"recommendation": "@unnecessary",
"behaviors": [
"@standard"
]
} | {
"pile_set_name": "Github"
} |
import { renderToString } from 'react-dom/server';
import { RouterContext } from 'react-router';
import { Provider } from 'react-redux';
export default React => (renderProps, store) => {
return renderToString(
<Provider store={store}>
<RouterContext { ...renderProps } />
</Provider>
);
};
| {
"pile_set_name": "Github"
} |
{
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2009 Matthias Christian Schabel
// Copyright (C) 2007-2009 Steven Watanabe
//
// 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)
#ifndef BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
#include <string>
#include <boost/units/config.hpp>
#include <boost/units/base_unit.hpp>
//#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/systems/si/force.hpp>
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound_force, "pound-force", "lbf", 4.4482216152605, si::force, -600); // exact conversion
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_force_base_unit)
#endif
#endif // BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
| {
"pile_set_name": "Github"
} |
/*******************************************************************************
* Copyright 2018 ROBOTIS CO., LTD.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
/* Authors: Darby Lim, Hye-Jong KIM, Ryan Shim, Yong-Ho Na */
#ifndef SCARA_KINEMATICS_H_
#define SCARA_KINEMATICS_H_
#if defined(__OPENCR__)
#include <RobotisManipulator.h>
#else
#include <robotis_manipulator/robotis_manipulator.h>
#endif
using namespace Eigen;
using namespace robotis_manipulator;
namespace scara_kinematics
{
/*****************************************************************************
** Kinematics Solver Using CHain Rule and Geometry
*****************************************************************************/
class SolverUsingCRAndGeometry : public robotis_manipulator::Kinematics
{
private:
void forwardKinematicsSolverUsingChainRule(Manipulator *manipulator, Name component_name);
bool inverseKinematicsSolverUsingGeometry(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
public:
SolverUsingCRAndGeometry() {}
virtual ~SolverUsingCRAndGeometry() {}
virtual void setOption(const void *arg);
virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
virtual void solveForwardKinematics(Manipulator *manipulator);
virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
};
} // namespace scara_kinematics
#endif // SCARA_KINEMATICS_H_
| {
"pile_set_name": "Github"
} |
package com.hwm.test.http.model.entity;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.List;
public class Stories implements Parcelable {
private int type;
private int id;
private String ga_prefix;
private String title;
private List<String> images;
private boolean isRead = false;
public void setType(int type) {
this.type = type;
}
public void setId(int id) {
this.id = id;
}
public void setGa_prefix(String ga_prefix) {
this.ga_prefix = ga_prefix;
}
public void setTitle(String title) {
this.title = title;
}
public void setImages(List<String> images) {
this.images = images;
}
public int getType() {
return type;
}
public int getId() {
return id;
}
public String getGa_prefix() {
return ga_prefix;
}
public String getTitle() {
return title;
}
public List<String> getImages() {
return images;
}
public boolean isRead() {
return isRead;
}
public void setRead(boolean read) {
isRead = read;
}
@Override
public String toString() {
return "StoriesEntity{" +
"ga_prefix='" + ga_prefix + '\'' +
", type=" + type +
", id=" + id +
", title='" + title + '\'' +
", images=" + images +
", isRead=" + isRead +
'}';
}
public Stories() {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.type);
dest.writeInt(this.id);
dest.writeString(this.ga_prefix);
dest.writeString(this.title);
dest.writeStringList(this.images);
dest.writeByte(isRead ? (byte) 1 : (byte) 0);
}
protected Stories(Parcel in) {
this.type = in.readInt();
this.id = in.readInt();
this.ga_prefix = in.readString();
this.title = in.readString();
this.images = in.createStringArrayList();
this.isRead = in.readByte() != 0;
}
public static final Creator<Stories> CREATOR = new Creator<Stories>() {
public Stories createFromParcel(Parcel source) {
return new Stories(source);
}
public Stories[] newArray(int size) {
return new Stories[size];
}
};
} | {
"pile_set_name": "Github"
} |
var convert = require('./convert'),
func = convert('gt', require('../gt'));
func.placeholder = require('./placeholder');
module.exports = func;
| {
"pile_set_name": "Github"
} |
'use strict'
const assert = require('chai').assert
const breakpoints = require('../../src/constants/breakpoints')
describe('breakpoints', function() {
it('should be an object', function() {
assert.isObject(breakpoints)
})
}) | {
"pile_set_name": "Github"
} |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/devtools_client.h"
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "content/common/devtools_messages.h"
#include "content/public/common/content_switches.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "ui/base/ui_base_switches.h"
using WebKit::WebDevToolsFrontend;
using WebKit::WebString;
DevToolsClient::DevToolsClient(RenderViewImpl* render_view)
: content::RenderViewObserver(render_view) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
web_tools_frontend_.reset(
WebDevToolsFrontend::create(
render_view->webview(),
this,
ASCIIToUTF16(command_line.GetSwitchValueASCII(switches::kLang))));
}
DevToolsClient::~DevToolsClient() {
}
bool DevToolsClient::OnMessageReceived(const IPC::Message& message) {
DCHECK(RenderThreadImpl::current());
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(DevToolsClient, message)
IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend,
OnDispatchOnInspectorFrontend)
IPC_MESSAGE_UNHANDLED(handled = false);
IPC_END_MESSAGE_MAP()
return handled;
}
void DevToolsClient::sendMessageToBackend(const WebString& message) {
Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(routing_id(),
message.utf8()));
}
void DevToolsClient::activateWindow() {
Send(new DevToolsHostMsg_ActivateWindow(routing_id()));
}
void DevToolsClient::closeWindow() {
Send(new DevToolsHostMsg_CloseWindow(routing_id()));
}
void DevToolsClient::moveWindowBy(const WebKit::WebFloatPoint& offset) {
Send(new DevToolsHostMsg_MoveWindow(routing_id(), offset.x, offset.y));
}
void DevToolsClient::requestDockWindow() {
Send(new DevToolsHostMsg_RequestDockWindow(routing_id()));
}
void DevToolsClient::requestUndockWindow() {
Send(new DevToolsHostMsg_RequestUndockWindow(routing_id()));
}
void DevToolsClient::requestSetDockSide(const WebKit::WebString& side) {
Send(new DevToolsHostMsg_RequestSetDockSide(routing_id(), side.utf8()));
}
void DevToolsClient::openInNewTab(const WebKit::WebString& url) {
Send(new DevToolsHostMsg_OpenInNewTab(routing_id(),
url.utf8()));
}
void DevToolsClient::save(const WebKit::WebString& url,
const WebKit::WebString& content,
bool save_as) {
Send(new DevToolsHostMsg_Save(routing_id(),
url.utf8(),
content.utf8(),
save_as));
}
void DevToolsClient::append(const WebKit::WebString& url,
const WebKit::WebString& content) {
Send(new DevToolsHostMsg_Append(routing_id(),
url.utf8(),
content.utf8()));
}
void DevToolsClient::OnDispatchOnInspectorFrontend(const std::string& message) {
web_tools_frontend_->dispatchOnInspectorFrontend(
WebString::fromUTF8(message));
}
| {
"pile_set_name": "Github"
} |
/*
* jdsample.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains upsampling routines.
*
* Upsampling input data is counted in "row groups". A row group
* is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
* sample rows of each component. Upsampling will normally produce
* max_v_samp_factor pixel rows from each row group (but this could vary
* if the upsampler is applying a scale factor of its own).
*
* An excellent reference for image resampling is
* Digital Image Warping, George Wolberg, 1990.
* Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.
*/
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
/* Pointer to routine to upsample a single component */
typedef JMETHOD(void, upsample1_ptr,
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
/* Private subobject */
typedef struct {
struct jpeg_upsampler pub; /* public fields */
/* Color conversion buffer. When using separate upsampling and color
* conversion steps, this buffer holds one upsampled row group until it
* has been color converted and output.
* Note: we do not allocate any storage for component(s) which are full-size,
* ie do not need rescaling. The corresponding entry of color_buf[] is
* simply set to point to the input data array, thereby avoiding copying.
*/
JSAMPARRAY color_buf[MAX_COMPONENTS];
/* Per-component upsampling method pointers */
upsample1_ptr methods[MAX_COMPONENTS];
int next_row_out; /* counts rows emitted from color_buf */
JDIMENSION rows_to_go; /* counts rows remaining in image */
/* Height of an input row group for each component. */
int rowgroup_height[MAX_COMPONENTS];
/* These arrays save pixel expansion factors so that int_expand need not
* recompute them each time. They are unused for other upsampling methods.
*/
UINT8 h_expand[MAX_COMPONENTS];
UINT8 v_expand[MAX_COMPONENTS];
} my_upsampler;
typedef my_upsampler * my_upsample_ptr;
/*
* Initialize for an upsampling pass.
*/
METHODDEF(void)
start_pass_upsample (j_decompress_ptr cinfo)
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
/* Mark the conversion buffer empty */
upsample->next_row_out = cinfo->max_v_samp_factor;
/* Initialize total-height counter for detecting bottom of image */
upsample->rows_to_go = cinfo->output_height;
}
/*
* Control routine to do upsampling (and color conversion).
*
* In this version we upsample each component independently.
* We upsample one row group into the conversion buffer, then apply
* color conversion a row at a time.
*/
METHODDEF(void)
sep_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
int ci;
jpeg_component_info * compptr;
JDIMENSION num_rows;
/* Fill the conversion buffer, if it's empty */
if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
/* Invoke per-component upsample method. Notice we pass a POINTER
* to color_buf[ci], so that fullsize_upsample can change it.
*/
(*upsample->methods[ci]) (cinfo, compptr,
input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]),
upsample->color_buf + ci);
}
upsample->next_row_out = 0;
}
/* Color-convert and emit rows */
/* How many we have in the buffer: */
num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out);
/* Not more than the distance to the end of the image. Need this test
* in case the image height is not a multiple of max_v_samp_factor:
*/
if (num_rows > upsample->rows_to_go)
num_rows = upsample->rows_to_go;
/* And not more than what the client can accept: */
out_rows_avail -= *out_row_ctr;
if (num_rows > out_rows_avail)
num_rows = out_rows_avail;
(*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf,
(JDIMENSION) upsample->next_row_out,
output_buf + *out_row_ctr,
(int) num_rows);
/* Adjust counts */
*out_row_ctr += num_rows;
upsample->rows_to_go -= num_rows;
upsample->next_row_out += num_rows;
/* When the buffer is emptied, declare this input row group consumed */
if (upsample->next_row_out >= cinfo->max_v_samp_factor)
(*in_row_group_ctr)++;
}
/*
* These are the routines invoked by sep_upsample to upsample pixel values
* of a single component. One row group is processed per call.
*/
/*
* For full-size components, we just make color_buf[ci] point at the
* input buffer, and thus avoid copying any data. Note that this is
* safe only because sep_upsample doesn't declare the input row group
* "consumed" until we are done color converting and emitting it.
*/
METHODDEF(void)
fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = input_data;
}
/*
* This is a no-op version used for "uninteresting" components.
* These components will not be referenced by color conversion.
*/
METHODDEF(void)
noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = NULL; /* safety check */
}
/*
* This version handles any integral sampling ratios.
* This is not used for typical JPEG files, so it need not be fast.
* Nor, for that matter, is it particularly accurate: the algorithm is
* simple replication of the input pixel onto the corresponding output
* pixels. The hi-falutin sampling literature refers to this as a
* "box filter". A box filter tends to introduce visible artifacts,
* so if you are actually going to use 3:1 or 4:1 sampling ratios
* you would be well advised to improve this code.
*/
METHODDEF(void)
int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
JSAMPARRAY output_data = *output_data_ptr;
register JSAMPROW inptr, outptr;
register JSAMPLE invalue;
register int h;
JSAMPROW outend;
int h_expand, v_expand;
int inrow, outrow;
h_expand = upsample->h_expand[compptr->component_index];
v_expand = upsample->v_expand[compptr->component_index];
inrow = outrow = 0;
while (outrow < cinfo->max_v_samp_factor) {
/* Generate one output row with proper horizontal expansion */
inptr = input_data[inrow];
outptr = output_data[outrow];
outend = outptr + cinfo->output_width;
while (outptr < outend) {
invalue = *inptr++; /* don't need GETJSAMPLE() here */
for (h = h_expand; h > 0; h--) {
*outptr++ = invalue;
}
}
/* Generate any additional output rows by duplicating the first one */
if (v_expand > 1) {
jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
v_expand-1, cinfo->output_width);
}
inrow++;
outrow += v_expand;
}
}
/*
* Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
* It's still a box filter.
*/
METHODDEF(void)
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
register JSAMPROW inptr, outptr;
register JSAMPLE invalue;
JSAMPROW outend;
int inrow;
for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
inptr = input_data[inrow];
outptr = output_data[inrow];
outend = outptr + cinfo->output_width;
while (outptr < outend) {
invalue = *inptr++; /* don't need GETJSAMPLE() here */
*outptr++ = invalue;
*outptr++ = invalue;
}
}
}
/*
* Fast processing for the common case of 2:1 horizontal and 2:1 vertical.
* It's still a box filter.
*/
METHODDEF(void)
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
register JSAMPROW inptr, outptr;
register JSAMPLE invalue;
JSAMPROW outend;
int inrow, outrow;
inrow = outrow = 0;
while (outrow < cinfo->max_v_samp_factor) {
inptr = input_data[inrow];
outptr = output_data[outrow];
outend = outptr + cinfo->output_width;
while (outptr < outend) {
invalue = *inptr++; /* don't need GETJSAMPLE() here */
*outptr++ = invalue;
*outptr++ = invalue;
}
jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
1, cinfo->output_width);
inrow++;
outrow += 2;
}
}
/*
* Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
*
* The upsampling algorithm is linear interpolation between pixel centers,
* also known as a "triangle filter". This is a good compromise between
* speed and visual quality. The centers of the output pixels are 1/4 and 3/4
* of the way between input pixel centers.
*
* A note about the "bias" calculations: when rounding fractional values to
* integer, we do not want to always round 0.5 up to the next integer.
* If we did that, we'd introduce a noticeable bias towards larger values.
* Instead, this code is arranged so that 0.5 will be rounded up or down at
* alternate pixel locations (a simple ordered dither pattern).
*/
METHODDEF(void)
h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
register JSAMPROW inptr, outptr;
register int invalue;
register JDIMENSION colctr;
int inrow;
for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
inptr = input_data[inrow];
outptr = output_data[inrow];
/* Special case for first column */
invalue = GETJSAMPLE(*inptr++);
*outptr++ = (JSAMPLE) invalue;
*outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);
for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
/* General case: 3/4 * nearer pixel + 1/4 * further pixel */
invalue = GETJSAMPLE(*inptr++) * 3;
*outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);
*outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);
}
/* Special case for last column */
invalue = GETJSAMPLE(*inptr);
*outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);
*outptr++ = (JSAMPLE) invalue;
}
}
/*
* Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
* Again a triangle filter; see comments for h2v1 case, above.
*
* It is OK for us to reference the adjacent input rows because we demanded
* context from the main buffer controller (see initialization code).
*/
METHODDEF(void)
h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
register JSAMPROW inptr0, inptr1, outptr;
#if BITS_IN_JSAMPLE == 8
register int thiscolsum, lastcolsum, nextcolsum;
#else
register INT32 thiscolsum, lastcolsum, nextcolsum;
#endif
register JDIMENSION colctr;
int inrow, outrow, v;
inrow = outrow = 0;
while (outrow < cinfo->max_v_samp_factor) {
for (v = 0; v < 2; v++) {
/* inptr0 points to nearest input row, inptr1 points to next nearest */
inptr0 = input_data[inrow];
if (v == 0) /* next nearest is row above */
inptr1 = input_data[inrow-1];
else /* next nearest is row below */
inptr1 = input_data[inrow+1];
outptr = output_data[outrow++];
/* Special case for first column */
thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
*outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4);
*outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
lastcolsum = thiscolsum; thiscolsum = nextcolsum;
for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {
/* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */
/* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */
nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
*outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
*outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);
lastcolsum = thiscolsum; thiscolsum = nextcolsum;
}
/* Special case for last column */
*outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);
*outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4);
}
inrow++;
}
}
/*
* Module initialization routine for upsampling.
*/
GLOBAL(void)
jinit_upsampler (j_decompress_ptr cinfo)
{
my_upsample_ptr upsample;
int ci;
jpeg_component_info * compptr;
boolean need_buffer, do_fancy;
int h_in_group, v_in_group, h_out_group, v_out_group;
upsample = (my_upsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(my_upsampler));
cinfo->upsample = (struct jpeg_upsampler *) upsample;
upsample->pub.start_pass = start_pass_upsample;
upsample->pub.upsample = sep_upsample;
upsample->pub.need_context_rows = FALSE; /* until we find out differently */
if (cinfo->CCIR601_sampling) /* this isn't supported */
ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);
/* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,
* so don't ask for it.
*/
do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;
/* Verify we can handle the sampling factors, select per-component methods,
* and create storage as needed.
*/
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
/* Compute size of an "input group" after IDCT scaling. This many samples
* are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
*/
h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /
cinfo->min_DCT_scaled_size;
v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /
cinfo->min_DCT_scaled_size;
h_out_group = cinfo->max_h_samp_factor;
v_out_group = cinfo->max_v_samp_factor;
upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
need_buffer = TRUE;
if (! compptr->component_needed) {
/* Don't bother to upsample an uninteresting component. */
upsample->methods[ci] = noop_upsample;
need_buffer = FALSE;
} else if (h_in_group == h_out_group && v_in_group == v_out_group) {
/* Fullsize components can be processed without any work. */
upsample->methods[ci] = fullsize_upsample;
need_buffer = FALSE;
} else if (h_in_group * 2 == h_out_group &&
v_in_group == v_out_group) {
/* Special cases for 2h1v upsampling */
if (do_fancy && compptr->downsampled_width > 2)
upsample->methods[ci] = h2v1_fancy_upsample;
else
upsample->methods[ci] = h2v1_upsample;
} else if (h_in_group * 2 == h_out_group &&
v_in_group * 2 == v_out_group) {
/* Special cases for 2h2v upsampling */
if (do_fancy && compptr->downsampled_width > 2) {
upsample->methods[ci] = h2v2_fancy_upsample;
upsample->pub.need_context_rows = TRUE;
} else
upsample->methods[ci] = h2v2_upsample;
} else if ((h_out_group % h_in_group) == 0 &&
(v_out_group % v_in_group) == 0) {
/* Generic integral-factors upsampling method */
upsample->methods[ci] = int_upsample;
upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group);
upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group);
} else
ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
if (need_buffer) {
upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
(JDIMENSION) jround_up((long) cinfo->output_width,
(long) cinfo->max_h_samp_factor),
(JDIMENSION) cinfo->max_v_samp_factor);
}
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path name="Pictures" path="."/>
</paths> | {
"pile_set_name": "Github"
} |
import lit.formats
config.name = 'sub-suite'
config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()
config.test_source_root = None
config.test_exec_root = None
| {
"pile_set_name": "Github"
} |
var test = require('tape');
var parse = require('../');
test('boolean default true', function (t) {
var argv = parse([], {
boolean: 'sometrue',
default: { sometrue: true }
});
t.equal(argv.sometrue, true);
t.end();
});
test('boolean default false', function (t) {
var argv = parse([], {
boolean: 'somefalse',
default: { somefalse: false }
});
t.equal(argv.somefalse, false);
t.end();
});
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018, Intel Corporation
#
# src/test/util_is_zeroed/TEST0 -- unit test for util_is_zeroed
#
. ../unittest/unittest.sh
require_test_type medium
require_fs_type none
require_build_type debug nondebug
# covered by TEST1
configure_valgrind memcheck force-disable
setup
expect_normal_exit ./util_is_zeroed$EXESUFFIX
pass
| {
"pile_set_name": "Github"
} |
/**
* Select2 Dutch translation
*/
(function ($) {
"use strict";
$.extend($.fn.select2.defaults, {
formatNoMatches: function () { return "Geen resultaten gevonden"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; },
formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; },
formatLoadMore: function (pageNumber) { return "Meer resultaten laden..."; },
formatSearching: function () { return "Zoeken..."; },
});
})(jQuery); | {
"pile_set_name": "Github"
} |
# created by tools/tclZIC.tcl - do not edit
set TZData(:Etc/GMT+7) {
{-9223372036854775808 -25200 0 -07}
}
| {
"pile_set_name": "Github"
} |
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <[email protected]>
//
// 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://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
#define BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
#include <boost/compute/command_queue.hpp>
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/type_traits/result_of.hpp>
namespace boost {
namespace compute {
namespace detail {
// Space complexity: O(1)
template<class InputIterator, class OutputIterator, class BinaryFunction>
inline void serial_reduce(InputIterator first,
InputIterator last,
OutputIterator result,
BinaryFunction function,
command_queue &queue)
{
typedef typename
std::iterator_traits<InputIterator>::value_type T;
typedef typename
::boost::compute::result_of<BinaryFunction(T, T)>::type result_type;
const context &context = queue.get_context();
size_t count = detail::iterator_range_size(first, last);
if(count == 0){
return;
}
meta_kernel k("serial_reduce");
size_t count_arg = k.add_arg<cl_uint>("count");
k <<
k.decl<result_type>("result") << " = " << first[0] << ";\n" <<
"for(uint i = 1; i < count; i++)\n" <<
" result = " << function(k.var<T>("result"),
first[k.var<uint_>("i")]) << ";\n" <<
result[0] << " = result;\n";
kernel kernel = k.compile(context);
kernel.set_arg(count_arg, static_cast<uint_>(count));
queue.enqueue_task(kernel);
}
} // end detail namespace
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
| {
"pile_set_name": "Github"
} |
// (C) Copyright Rani Sharoni 2003-2005.
// Use, modification and distribution are subject to 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/type_traits for most recent version including documentation.
#ifndef BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED
#define BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/detail/ice_or.hpp>
// should be the last #include
#include <boost/type_traits/detail/bool_trait_def.hpp>
namespace boost { namespace tr1{
namespace detail{
template <class B, class D>
struct is_base_of_imp
{
typedef typename remove_cv<B>::type ncvB;
typedef typename remove_cv<D>::type ncvD;
BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or<
(::boost::detail::is_base_and_derived_impl<ncvB,ncvD>::value),
(::boost::is_same<ncvB,ncvD>::value)>::value));
};
}
BOOST_TT_AUX_BOOL_TRAIT_DEF2(
is_base_of
, Base
, Derived
, (::boost::tr1::detail::is_base_of_imp<Base, Derived>::value))
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false)
#endif
} } // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
#endif // BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED
| {
"pile_set_name": "Github"
} |
/////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/artgtk.cpp
// Purpose: stock wxArtProvider instance with native GTK+ stock icons
// Author: Vaclav Slavik
// Modified by:
// Created: 2004-08-22
// Copyright: (c) Vaclav Slavik, 2004
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#include "wx/artprov.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h"
// compatibility with older GTK+ versions:
#ifndef GTK_STOCK_FILE
#define GTK_STOCK_FILE "gtk-file"
#endif
#ifndef GTK_STOCK_DIRECTORY
#define GTK_STOCK_DIRECTORY "gtk-directory"
#endif
// ----------------------------------------------------------------------------
// wxGTK2ArtProvider
// ----------------------------------------------------------------------------
class wxGTK2ArtProvider : public wxArtProvider
{
protected:
virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client,
const wxSize& size);
virtual wxIconBundle CreateIconBundle(const wxArtID& id,
const wxArtClient& client);
};
/*static*/ void wxArtProvider::InitNativeProvider()
{
PushBack(new wxGTK2ArtProvider);
}
// ----------------------------------------------------------------------------
// CreateBitmap routine
// ----------------------------------------------------------------------------
namespace
{
wxString wxArtIDToStock(const wxArtID& id)
{
#define ART(wxid, gtkid) \
if (id == wxid) return gtkid;
ART(wxART_ERROR, GTK_STOCK_DIALOG_ERROR)
ART(wxART_INFORMATION, GTK_STOCK_DIALOG_INFO)
ART(wxART_WARNING, GTK_STOCK_DIALOG_WARNING)
ART(wxART_QUESTION, GTK_STOCK_DIALOG_QUESTION)
//ART(wxART_HELP_SIDE_PANEL, )
ART(wxART_HELP_SETTINGS, GTK_STOCK_SELECT_FONT)
//ART(wxART_HELP_BOOK, )
ART(wxART_HELP_FOLDER, GTK_STOCK_DIRECTORY)
ART(wxART_HELP_PAGE, GTK_STOCK_FILE)
ART(wxART_MISSING_IMAGE, GTK_STOCK_MISSING_IMAGE)
ART(wxART_ADD_BOOKMARK, GTK_STOCK_ADD)
ART(wxART_DEL_BOOKMARK, GTK_STOCK_REMOVE)
ART(wxART_GO_BACK, GTK_STOCK_GO_BACK)
ART(wxART_GO_FORWARD, GTK_STOCK_GO_FORWARD)
ART(wxART_GO_UP, GTK_STOCK_GO_UP)
ART(wxART_GO_DOWN, GTK_STOCK_GO_DOWN)
ART(wxART_GO_TO_PARENT, GTK_STOCK_GO_UP)
ART(wxART_GO_HOME, GTK_STOCK_HOME)
ART(wxART_GOTO_FIRST, GTK_STOCK_GOTO_FIRST)
ART(wxART_GOTO_LAST, GTK_STOCK_GOTO_LAST)
ART(wxART_FILE_OPEN, GTK_STOCK_OPEN)
ART(wxART_PRINT, GTK_STOCK_PRINT)
ART(wxART_HELP, GTK_STOCK_HELP)
ART(wxART_TIP, GTK_STOCK_DIALOG_INFO)
//ART(wxART_REPORT_VIEW, )
//ART(wxART_LIST_VIEW, )
//ART(wxART_NEW_DIR, )
ART(wxART_FOLDER, GTK_STOCK_DIRECTORY)
ART(wxART_FOLDER_OPEN, GTK_STOCK_DIRECTORY)
//ART(wxART_GO_DIR_UP, )
ART(wxART_EXECUTABLE_FILE, GTK_STOCK_EXECUTE)
ART(wxART_NORMAL_FILE, GTK_STOCK_FILE)
ART(wxART_TICK_MARK, GTK_STOCK_APPLY)
ART(wxART_CROSS_MARK, GTK_STOCK_CANCEL)
ART(wxART_FLOPPY, GTK_STOCK_FLOPPY)
ART(wxART_CDROM, GTK_STOCK_CDROM)
ART(wxART_HARDDISK, GTK_STOCK_HARDDISK)
ART(wxART_REMOVABLE, GTK_STOCK_HARDDISK)
ART(wxART_FILE_SAVE, GTK_STOCK_SAVE)
ART(wxART_FILE_SAVE_AS, GTK_STOCK_SAVE_AS)
ART(wxART_COPY, GTK_STOCK_COPY)
ART(wxART_CUT, GTK_STOCK_CUT)
ART(wxART_PASTE, GTK_STOCK_PASTE)
ART(wxART_DELETE, GTK_STOCK_DELETE)
ART(wxART_NEW, GTK_STOCK_NEW)
ART(wxART_UNDO, GTK_STOCK_UNDO)
ART(wxART_REDO, GTK_STOCK_REDO)
ART(wxART_PLUS, GTK_STOCK_ADD)
ART(wxART_MINUS, GTK_STOCK_REMOVE)
ART(wxART_CLOSE, GTK_STOCK_CLOSE)
ART(wxART_QUIT, GTK_STOCK_QUIT)
ART(wxART_FIND, GTK_STOCK_FIND)
ART(wxART_FIND_AND_REPLACE, GTK_STOCK_FIND_AND_REPLACE)
#undef ART
// allow passing GTK+ stock IDs to wxArtProvider -- if a recognized wx
// ID wasn't found, pass it to GTK+ in the hope it is a GTK+ or theme
// icon name:
return id;
}
GtkIconSize ArtClientToIconSize(const wxArtClient& client)
{
if (client == wxART_TOOLBAR)
return GTK_ICON_SIZE_LARGE_TOOLBAR;
else if (client == wxART_MENU || client == wxART_FRAME_ICON)
return GTK_ICON_SIZE_MENU;
else if (client == wxART_CMN_DIALOG || client == wxART_MESSAGE_BOX)
return GTK_ICON_SIZE_DIALOG;
else if (client == wxART_BUTTON)
return GTK_ICON_SIZE_BUTTON;
else
return GTK_ICON_SIZE_INVALID; // this is arbitrary
}
GtkIconSize FindClosestIconSize(const wxSize& size)
{
#define NUM_SIZES 6
static struct
{
GtkIconSize icon;
gint x, y;
} s_sizes[NUM_SIZES];
static bool s_sizesInitialized = false;
if (!s_sizesInitialized)
{
s_sizes[0].icon = GTK_ICON_SIZE_MENU;
s_sizes[1].icon = GTK_ICON_SIZE_SMALL_TOOLBAR;
s_sizes[2].icon = GTK_ICON_SIZE_LARGE_TOOLBAR;
s_sizes[3].icon = GTK_ICON_SIZE_BUTTON;
s_sizes[4].icon = GTK_ICON_SIZE_DND;
s_sizes[5].icon = GTK_ICON_SIZE_DIALOG;
for (size_t i = 0; i < NUM_SIZES; i++)
{
gtk_icon_size_lookup(s_sizes[i].icon,
&s_sizes[i].x, &s_sizes[i].y);
}
s_sizesInitialized = true;
}
GtkIconSize best = GTK_ICON_SIZE_DIALOG; // presumably largest
unsigned distance = INT_MAX;
for (size_t i = 0; i < NUM_SIZES; i++)
{
// only use larger bitmaps, scaling down looks better than scaling up:
if (size.x > s_sizes[i].x || size.y > s_sizes[i].y)
continue;
unsigned dist = (size.x - s_sizes[i].x) * (size.x - s_sizes[i].x) +
(size.y - s_sizes[i].y) * (size.y - s_sizes[i].y);
if (dist == 0)
return s_sizes[i].icon;
else if (dist < distance)
{
distance = dist;
best = s_sizes[i].icon;
}
}
return best;
}
GdkPixbuf *CreateStockIcon(const char *stockid, GtkIconSize size)
{
// FIXME: This code is not 100% correct, because stock pixmap are
// context-dependent and may be affected by theme engine, the
// correct value can only be obtained for given GtkWidget object.
//
// Fool-proof implementation of stock bitmaps would extend wxBitmap
// with "stock-id" representation (in addition to pixmap and pixbuf
// ones) and would convert it to pixbuf when rendered.
GtkWidget* widget = wxGTKPrivate::GetButtonWidget();
#ifdef __WXGTK3__
GtkStyleContext* sc = gtk_widget_get_style_context(widget);
GtkIconSet* iconset = gtk_style_context_lookup_icon_set(sc, stockid);
GdkPixbuf* pixbuf = NULL;
if (iconset)
pixbuf = gtk_icon_set_render_icon_pixbuf(iconset, sc, size);
return pixbuf;
#else
GtkStyle* style = gtk_widget_get_style(widget);
GtkIconSet* iconset = gtk_style_lookup_icon_set(style, stockid);
if (!iconset)
return NULL;
return gtk_icon_set_render_icon(iconset, style,
gtk_widget_get_default_direction(),
GTK_STATE_NORMAL, size, NULL, NULL);
#endif
}
GdkPixbuf *CreateThemeIcon(const char *iconname, int size)
{
return gtk_icon_theme_load_icon
(
gtk_icon_theme_get_default(),
iconname,
size,
(GtkIconLookupFlags)0,
NULL
);
}
// creates either stock or theme icon
GdkPixbuf *CreateGtkIcon(const char *icon_name,
GtkIconSize stock_size, const wxSize& pixel_size)
{
// try stock GTK+ icon first
GdkPixbuf *pixbuf = CreateStockIcon(icon_name, stock_size);
if ( pixbuf )
return pixbuf;
// if that fails, try theme icon
wxSize size(pixel_size);
if ( pixel_size == wxDefaultSize )
gtk_icon_size_lookup(stock_size, &size.x, &size.y);
return CreateThemeIcon(icon_name, size.x);
}
template<typename SizeType, typename LoaderFunc>
wxIconBundle DoCreateIconBundle(const char *stockid,
const SizeType *sizes_from,
const SizeType *sizes_to,
LoaderFunc get_icon)
{
wxIconBundle bundle;
for ( const SizeType *i = sizes_from; i != sizes_to; ++i )
{
GdkPixbuf *pixbuf = get_icon(stockid, *i);
if ( !pixbuf )
continue;
wxIcon icon;
icon.CopyFromBitmap(wxBitmap(pixbuf));
bundle.AddIcon(icon);
}
return bundle;
}
} // anonymous namespace
wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize& size)
{
const wxString stockid = wxArtIDToStock(id);
GtkIconSize stocksize = (size == wxDefaultSize) ?
ArtClientToIconSize(client) :
FindClosestIconSize(size);
// we must have some size, this is arbitrary
if (stocksize == GTK_ICON_SIZE_INVALID)
stocksize = GTK_ICON_SIZE_BUTTON;
GdkPixbuf *pixbuf = CreateGtkIcon(stockid.utf8_str(), stocksize, size);
if (pixbuf && size != wxDefaultSize &&
(size.x != gdk_pixbuf_get_width(pixbuf) ||
size.y != gdk_pixbuf_get_height(pixbuf)))
{
GdkPixbuf *p2 = gdk_pixbuf_scale_simple(pixbuf, size.x, size.y,
GDK_INTERP_BILINEAR);
if (p2)
{
g_object_unref (pixbuf);
pixbuf = p2;
}
}
return wxBitmap(pixbuf);
}
wxIconBundle
wxGTK2ArtProvider::CreateIconBundle(const wxArtID& id,
const wxArtClient& WXUNUSED(client))
{
wxIconBundle bundle;
const wxString stockid = wxArtIDToStock(id);
// try to load the bundle as stock icon first
GtkWidget* widget = wxGTKPrivate::GetButtonWidget();
#ifdef __WXGTK3__
GtkStyleContext* sc = gtk_widget_get_style_context(widget);
GtkIconSet* iconset = gtk_style_context_lookup_icon_set(sc, stockid.utf8_str());
#else
GtkStyle* style = gtk_widget_get_style(widget);
GtkIconSet* iconset = gtk_style_lookup_icon_set(style, stockid.utf8_str());
#endif
if ( iconset )
{
GtkIconSize *sizes;
gint n_sizes;
gtk_icon_set_get_sizes(iconset, &sizes, &n_sizes);
bundle = DoCreateIconBundle
(
stockid.utf8_str(),
sizes, sizes + n_sizes,
&CreateStockIcon
);
g_free(sizes);
return bundle;
}
// otherwise try icon themes
gint *sizes = gtk_icon_theme_get_icon_sizes
(
gtk_icon_theme_get_default(),
stockid.utf8_str()
);
if ( !sizes )
return bundle;
gint *last = sizes;
while ( *last )
last++;
bundle = DoCreateIconBundle
(
stockid.utf8_str(),
sizes, last,
&CreateThemeIcon
);
g_free(sizes);
return bundle;
}
// ----------------------------------------------------------------------------
// wxArtProvider::GetNativeSizeHint()
// ----------------------------------------------------------------------------
/*static*/
wxSize wxArtProvider::GetNativeSizeHint(const wxArtClient& client)
{
// Gtk has specific sizes for each client, see artgtk.cpp
GtkIconSize gtk_size = ArtClientToIconSize(client);
// no size hints for this client
if (gtk_size == GTK_ICON_SIZE_INVALID)
return wxDefaultSize;
gint width, height;
gtk_icon_size_lookup( gtk_size, &width, &height);
return wxSize(width, height);
}
| {
"pile_set_name": "Github"
} |
(* mosml/src/mosmllib/test/callback/testcallback.sml -- test Callback.
The SML side of things -- [email protected] 1999-08-09 *)
app load ["Int", "Dynlib", "Callback", "Mosml"];
use "../auxil.sml";
open Callback;
(* Obtain a handle pointing to the library defining the C functions,
and make the C side register a number of C functions: *)
val dlh = Dynlib.dlopen { lib = "./libcside.so",
flag = Dynlib.RTLD_LAZY,
global = false }
val _ = Dynlib.app1 (Dynlib.dlsym dlh "initialize_callbacktest") ();
(* TESTING THE REGISTRATION AND USE OF C VALUES *)
(* Define SML functions that call the registered C functions *)
(* Passing and returning base types: unit, int, char, real, string, bool: *)
val fu : unit -> unit = app1 (getcptr "regcfu");
val fi : int -> int = app1 (getcptr "regcfi");
val fc : char -> char = app1 (getcptr "regcfc");
val fr : real -> real = app1 (getcptr "regcfr");
val fs : string -> string = app1 (getcptr "regcfs");
val fb : bool -> bool = app1 (getcptr "regcfb");
(* Passing several curried arguments: *)
val fcur : int -> char -> real -> string -> bool -> int =
app5 (getcptr "regcfcur");
(* Passing a tuple: *)
val ftup : int * char * real -> int =
app1 (getcptr "regcftup");
(* Passing a record: *)
val frec : { surname : string, givenname : string, age : int } -> bool =
app1 (getcptr "regcfrec");
(* Passing a constructed value belonging to a datatype: *)
datatype t =
Lf
| Br of int * t * t
| Brs of t list
val fdat : t -> int =
app1 (getcptr "regcfdat");
(* Passing an ML function (a closure): *)
val ffun : (int -> real) -> int -> string =
app2 (getcptr "regcffun");
(* Returning a tuple *)
val frtup : int -> int * bool =
app1 (getcptr "regcfrtup");
(* Returning a record *)
val frrec : int -> { half : int, odd : bool } =
app1 (getcptr "regcfrrec");
(* Illustration of heap allocation trickiness *)
val fconcat : string -> string -> string =
app2 (getcptr "regcfconcat");
(* Exercising the C functions: *)
val test1 = () = fu ();
val test2 = 5667 = fi 5666;
val test3 = #"T" = fc #"t";
val test4 = 56.0 = fr 28.0;
val test5 = "TEST NUMBER +1" = fs "Test number +1";
val test6 = fb false;
val test7 = 85 = fcur 5 #"A" 10.0 "blah" true;
val test8 = 80 = ftup(5, #"A", 10.0);
val test9 = not (frec {surname = "Jensen", givenname = "Karin", age = 28 });
local
val tree = Brs[Lf,
Br(12, Br(10, Lf, Lf), Br(20, Lf, Lf)),
Brs[Br(15, Lf, Lf)]]
in
val test10 = 57 = fdat tree
end
val test11 = ("Just right" = ffun (fn x => real x + 7.0) 100000);
val test12 = (8, true) = frtup 17;
val test13 = {half = 8, odd = true} = frrec 17;
val test14 = "abcdef" = fconcat "abc" "def";
(* TESTING THE REGISTRATION AND USE OF ML VALUES *)
val test15 = app1 (getcptr "getting_notreg") () : bool;
val test16 = (register "unregistered" (fn x => x);
unregister "unregistered";
app1 (getcptr "getting_unreg") ()) : bool;
val test17 = (app1 (getcptr "using_notreg") (); false)
handle Fail _ => true | _ => false : bool;
val test18 = (register "temp1" (fn x => x);
app1 (getcptr "using_unreg") ()) : bool;
fun mkfun extra =
let fun f (r : real) = r + extra
in f end
(* On a 266 MHz Pentium II notebook this does 1.25 million callbacks/sec: *)
val test19 =
let val a = 2.5
val b = 1000000
val c = 10.0
val _ = (register "extrafun" (mkfun a); register "steps" b)
val res = Mosml.time (app1 (getcptr "call function")) c : real
val expected = a * real b + c
in abs(expected - res) < 0.0001 end
(* On a 266 MHz Pentium II notebook this does 1.5 million callbacks/sec: *)
val test20 =
let val a = 1
val b = 1000000
val c = 17
val _ = app unregister ["extrafun", "steps"]
val _ = (register "extrafun" (fn x => x+a); register "steps" b)
val res = Mosml.time (app1 (getcptr "call function")) c : int
val expected = a * b + c
in expected = res end
val _ = quit();
| {
"pile_set_name": "Github"
} |
*color0: #1d1229
*color1: #cb59e7
*color2: #609ba6
*color3: #c9aae0
*color4: #7529b1
*color5: #a939ff
*color6: #7962d0
*color7: #d3b6ea
*color8: #1d1229
*color9: #cb59e7
*color10: #609ba6
*color11: #c9aae0
*color12: #7529b1
*color13: #a939ff
*color14: #7962d0
*color15: #d3b6ea
*background: #130c1b
*foreground: #eed6ff
rofi.color-normal: argb:00000000, #c9aae0, argb:00000000, #1d1229, #c9aae0
rofi.color-window: #130c1b, #000000, #832757
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.i18n.client.impl.cldr;
// DO NOT EDIT - GENERATED FROM CLDR AND ICU DATA
/**
* Implementation of DateTimeFormatInfo for the "en_MH" locale.
*/
public class DateTimeFormatInfoImpl_en_MH extends DateTimeFormatInfoImpl_en_001 {
@Override
public String[] ampms() {
return new String[] {
"AM",
"PM"
};
}
@Override
public String dateFormatFull() {
return "EEEE, MMMM d, y";
}
@Override
public String dateFormatLong() {
return "MMMM d, y";
}
@Override
public String dateFormatMedium() {
return "MMM d, y";
}
@Override
public String dateFormatShort() {
return "M/d/yy";
}
@Override
public int firstDayOfTheWeek() {
return 0;
}
@Override
public String formatMonthAbbrevDay() {
return "MMM d";
}
@Override
public String formatMonthFullDay() {
return "MMMM d";
}
@Override
public String formatMonthFullWeekdayDay() {
return "EEEE, MMMM d";
}
@Override
public String formatMonthNumDay() {
return "M/d";
}
@Override
public String formatYearMonthAbbrevDay() {
return "MMM d, y";
}
@Override
public String formatYearMonthFullDay() {
return "MMMM d, y";
}
@Override
public String formatYearMonthNum() {
return "M/y";
}
@Override
public String formatYearMonthNumDay() {
return "M/d/y";
}
@Override
public String formatYearMonthWeekdayDay() {
return "EEE, MMM d, y";
}
}
| {
"pile_set_name": "Github"
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.vector.complex;
import org.apache.drill.exec.vector.UInt4Vector;
import org.apache.drill.exec.vector.ValueVector;
/**
* Represents repeated (AKA "array") value vectors.
* <p>
* A repeated vector contains values that may either be flat or nested. A value
* consists of zero or more cells(inner values). Current design maintains data
* and offsets vectors. Each cell is stored in the data vector. Repeated vector
* uses the offset vector to determine the sequence of cells pertaining to an
* individual value.
*/
public interface RepeatedValueVector extends ValueVector, ContainerVectorLike {
int DEFAULT_REPEAT_PER_RECORD = 5;
/**
* @return the underlying offset vector or null if none exists.
*/
UInt4Vector getOffsetVector();
/**
* @return the underlying data vector or null if none exists.
*/
ValueVector getDataVector();
@Override
RepeatedAccessor getAccessor();
@Override
RepeatedMutator getMutator();
interface RepeatedAccessor extends ValueVector.Accessor {
/**
* @return total number of cells that vector contains.
* The result includes empty, null valued cells.
*/
int getInnerValueCount();
/**
* @return number of cells that the value at the given index contains.
*/
int getInnerValueCountAt(int index);
/**
* @param index value index
* @return true if the value at the given index is empty, false otherwise.
*/
boolean isEmpty(int index);
}
interface RepeatedMutator extends ValueVector.Mutator {
/**
* Starts a new value that is a container of cells.
*
* @param index index of new value to start
*/
void startNewValue(int index);
}
}
| {
"pile_set_name": "Github"
} |
0x__1_1_
| {
"pile_set_name": "Github"
} |
$ pynastran: version=mystran
SOL 1
CEND
TITLE = SIMPLE composite plate in bending
ECHO = NONE
$
SUBCASE 3
SPC = 1
OLOAD = ALL
DISP = ALL
LOAD = 1003
$
BEGIN BULK
$ set AUTOSPC_RAT = 1.0E-9 to avoid all rotational DOFs being constrained
PARAM AUTOSPC Y 1.0E-9 Y Y
$-------$-------$-------$-------$-------$-------$-------$-------$-------$-------
$ Out-of-plane shear force applied to at the tip of the plate
FORCE 1003 21 1.0 0. 0. 1.
FORCE 1003 22 1.0 0. 0. 1.
$-------$-------$-------$-------$-------$-------$-------$-------$-------$-------
$ Orthotropic material
MAT8, 102, 4.5E9, 9.0E9, 0.28, 6.9E9, 6.9E9, 6.9E9
$-------$-------$-------$-------$-------$-------$-------$-------$-------$-------
PSHELL, 100, 102, 0.005, 102, 1.0, 102
$-------$-------$-------$-------$-------$-------$-------$-------$-------$-------
$ BOUNDARY conditions based on SPC
SPC 1 1 123456 0.0 2 123456 0.0
$-------$-------$-------$-------$-------$-------$-------$-------$-------$-------
$ GRIDs and CQUADs
GRID 1 0 0.0 0.0 0.0 0
GRID 2 0 0.01 0.0 0.0 0
GRID 3 0 0.01 0.01 0.0 0
GRID 4 0 0.0 0.01 0.0 0
GRID 5 0 0.01 0.02 0.0 0
GRID 6 0 0.0 0.02 0.0 0
GRID 7 0 0.01 0.03 0.0 0
GRID 8 0 0.0 0.03 0.0 0
GRID 9 0 0.01 0.04 0.0 0
GRID 10 0 0.0 0.04 0.0 0
GRID 11 0 0.01 0.05 0.0 0
GRID 12 0 0.0 0.05 0.0 0
GRID 13 0 0.01 0.06 0.0 0
GRID 14 0 0.0 0.06 0.0 0
GRID 15 0 0.01 0.07 0.0 0
GRID 16 0 0.0 0.07 0.0 0
GRID 17 0 0.01 0.08 0.0 0
GRID 18 0 0.0 0.08 0.0 0
GRID 19 0 0.01 0.09 0.0 0
GRID 20 0 0.0 0.09 0.0 0
GRID 21 0 0.01 0.10 0.0 0
GRID 22 0 0.0 0.10 0.0 0
CQUAD4 1 100 1 2 3 4
CQUAD4 2 100 4 3 5 6
CQUAD4 3 100 6 5 7 8
CQUAD4 4 100 8 7 9 10
CQUAD4 5 100 10 9 11 12
CQUAD4 6 100 12 11 13 14
CQUAD4 7 100 14 13 15 16
CQUAD4 8 100 16 15 17 18
CQUAD4 9 100 18 17 19 20
CQUAD4 10 100 20 19 21 22
ENDDATA | {
"pile_set_name": "Github"
} |
status: 200
headers:
inline:
content-type: application/json
body:
engine: mustache
provide:
- salutation
- addressee
template:
inline: '{"greeting":"{{ salutation }}","subject":{{>json-subject}},"shouldYouReallyHandwriteJSON":"no"}'
salutation:
inline: 'Hello'
addressee: env.ADDRESSEE
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<creatures>
<creature name="Achad" type="monster" looktype="146" lookhead="93" lookbody="93" looklegs="57" lookfeet="97"/>
<creature name="Acolyte Of the Cult" type="monster" looktype="194" lookhead="114" lookbody="121" looklegs="121" lookfeet="57"/>
<creature name="Adept of the Cult" type="monster" looktype="194" lookhead="114" lookbody="94" looklegs="94" lookfeet="57"/>
<creature name="Amazon" type="monster" looktype="137" lookhead="113" lookbody="120" looklegs="114" lookfeet="132"/>
<creature name="Ancient Scarab" type="monster" looktype="79" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Apocalypse" type="monster" looktype="12" lookhead="38" lookbody="114" lookfeet="94"/>
<creature name="Apprentice Sheng" type="monster" looktype="23"/>
<creature name="Arkhothep" type="monster" looktype="87"/>
<creature name="Ashmunrah" type="monster" looktype="87" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Assassin" type="monster" looktype="129"/>
<creature name="Avalanche" type="monster" looktype="261"/>
<creature name="Axeitus Headbanger" type="monster" looktype="71"/>
<creature name="Azure Frog" type="monster" looktype="226" lookhead="69" lookbody="66" looklegs="69" lookfeet="66"/>
<creature name="Badger" type="monster" looktype="105" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Bandit" type="monster" looktype="129" lookhead="58" lookbody="59" looklegs="45" lookfeet="114"/>
<creature name="Banshee" type="monster" looktype="78" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Barbarian Bloodwalker" type="monster" looktype="255" lookhead="114" lookbody="132" looklegs="132" lookfeet="132"/>
<creature name="Barbarian Brutetamer" type="monster" looktype="264" lookhead="78" lookbody="116" looklegs="95" lookfeet="121"/>
<creature name="Barbarian Headsplitter" type="monster" looktype="253" lookhead="115" lookbody="105" looklegs="119" lookfeet="132"/>
<creature name="Barbarian Skullhunter" type="monster" looktype="254" lookbody="77" looklegs="77" lookfeet="114"/>
<creature name="Bat" type="monster" looktype="122" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Bazir" type="monster" looktype="201"/>
<creature name="Bear" type="monster" looktype="16" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Behemoth" type="monster" looktype="55"/>
<creature name="Beholder" type="monster" looktype="17" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Betrayed Wraith" type="monster" looktype="233"/>
<creature name="Black Knight" type="monster" looktype="131" lookhead="95" lookbody="95" looklegs="95" lookfeet="95"/>
<creature name="Black Sheep" type="monster" looktype="13" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Blightwalker" type="monster" looktype="246"/>
<creature name="Blood Crab" type="monster" looktype="200"/>
<creature name="Bloodpaw" type="monster" looktype="42" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Blue Butterfly" type="monster" looktype="227"/>
<creature name="Blue Djinn" type="monster" looktype="80" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Bonebeast" type="monster" looktype="101"/>
<creature name="Bones" type="monster" looktype="231"/>
<creature name="Bovinus" type="monster" looktype="25" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Braindeath" type="monster" looktype="256"/>
<creature name="Brutus Bloodbeard" type="monster" looktype="98"/>
<creature name="Bug" type="monster" looktype="45" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Butterfly" type="monster" looktype="10" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Carniphila" type="monster" looktype="120" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Carrion Worm" type="monster" looktype="192"/>
<creature name="Cave Rat" type="monster" looktype="56" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Centipede" type="monster" looktype="124" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Chakoya Toolshaper" type="monster" looktype="259"/>
<creature name="Chakoya Tribewarden" type="monster" looktype="259"/>
<creature name="Chakoya Windcaller" type="monster" looktype="260"/>
<creature name="Chicken" type="monster" looktype="111" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="CM Outfit" type="monster" looktype="266"/>
<creature name="Cobra" type="monster" looktype="81" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Colerian The Barbarian" type="monster" looktype="253" lookhead="76" lookbody="115" looklegs="115" lookfeet="43"/>
<creature name="Coral Frog" type="monster" looktype="226" lookhead="114" lookbody="98" looklegs="97" lookfeet="114"/>
<creature name="Countess Sorrow" type="monster" looktype="241"/>
<creature name="Crab" type="monster" looktype="112" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Crimson Frog" type="monster" looktype="226" lookhead="94" lookbody="78" looklegs="94" lookfeet="78"/>
<creature name="Crocodile" type="monster" looktype="119" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Crypt shambler" type="monster" looktype="100" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Crystal Spider" type="monster" looktype="263"/>
<creature name="Cursed Gladiator" type="monster" looktype="100"/>
<creature name="Cyclops" type="monster" looktype="22"/>
<creature name="Cyclops Drone" type="monster" looktype="280"/>
<creature name="Cyclops Smith" type="monster" looktype="277"/>
<creature name="Darakan the Executioner" type="monster" looktype="255" lookhead="78" lookbody="114" looklegs="114" lookfeet="114"/>
<creature name="Dark Monk" type="monster" looktype="225" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dark Torturer" type="monster" looktype="234"/>
<creature name="Deadeye Devious" type="monster" looktype="151" lookhead="115" lookbody="76" looklegs="35" lookfeet="117"/>
<creature name="Deathbringer" type="monster" looktype="231"/>
<creature name="Deathslicer" type="monster" looktype="102"/>
<creature name="Deer" type="monster" looktype="31" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Defiler" type="monster" looktype="238"/>
<creature name="Demodras" type="monster" looktype="204" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Demon" type="monster" looktype="35"/>
<creature name="Demon (Goblin)" type="monster" looktype="35"/>
<creature name="Demon Skeleton" type="monster" looktype="37" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Destroyer" type="monster" looktype="236"/>
<creature name="Dharalion" type="monster" looktype="203" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Diabolic Imp" type="monster" looktype="237"/>
<creature name="Dipthrah" type="monster" looktype="87" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dire Penguin" type="monster" looktype="250"/>
<creature name="Dog" type="monster" looktype="32" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dracola" type="monster" looktype="231"/>
<creature name="Dragon" type="monster" looktype="34" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dragon Lord" type="monster" looktype="39" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Drasilla" type="monster" looktype="34" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dwarf" type="monster" looktype="69" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dwarf Geomancer" type="monster" looktype="66" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dwarf Guard" type="monster" looktype="70" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dwarf Soldier" type="monster" looktype="71" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dworc Fleshhunter" type="monster" looktype="215" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dworc Venomsniper" type="monster" looktype="216" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Dworc Voodoomaster" type="monster" looktype="214" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Efreet" type="monster" looktype="103" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Elder Beholder" type="monster" looktype="108" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Elephant" type="monster" looktype="211" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Elf" type="monster" looktype="62" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Elf Arcanist" type="monster" looktype="63" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Elf Scout" type="monster" looktype="64" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Enlightened of the Cult" type="monster" looktype="193"/>
<creature name="Fallen Mooh'tah Master Ghar" type="monster" looktype="29" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Fernfang" type="monster" looktype="206" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Ferumbras" type="monster" looktype="229" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Fire Devil" type="monster" looktype="40" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Fire Elemental" type="monster" looktype="49"/>
<creature name="Flamethrower" type="monster"/>
<creature name="Flamingo" type="monster" looktype="212" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Fluffy" type="monster" looktype="240"/>
<creature name="Freegoiz" type="monster" looktype="110"/>
<creature name="Frost Dragon" type="monster" looktype="248" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Frost Giant" type="monster" looktype="257" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Frost Giantess" type="monster" looktype="265" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Frost Troll" type="monster" looktype="53" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Frostfur" type="monster" looktype="52" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Fury" type="monster" looktype="149" lookhead="94" lookbody="77" looklegs="96"/>
<creature name="Gargoyle" type="monster" looktype="95" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Gazer" type="monster" looktype="109" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="General Murius" type="monster" looktype="202" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Ghazbaran" type="monster" looktype="12" lookbody="123" looklegs="97" lookfeet="94"/>
<creature name="Ghost" type="monster" looktype="48" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Ghoul" type="monster" looktype="18" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Giant Spider" type="monster" looktype="38"/>
<creature name="Gnorre Chyllson" type="monster" looktype="251" lookhead="11" lookbody="9" looklegs="11" lookfeet="85"/>
<creature name="Goblin" type="monster" looktype="61" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Green Djinn" type="monster" looktype="51" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Green Frog" type="monster" looktype="224" lookhead="69" lookbody="66" looklegs="69" lookfeet="66"/>
<creature name="Grimgor Guteater" type="monster" looktype="2" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Grorlam" type="monster" looktype="205" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Hacker" type="monster" looktype="8" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Hand of Cursed Fate" type="monster" looktype="230"/>
<creature name="Hellfire Fighter" type="monster" looktype="243"/>
<creature name="Hellhound" type="monster" looktype="240"/>
<creature name="Hero" type="monster" looktype="73" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Hunter" type="monster" looktype="129" lookhead="95" lookbody="116" looklegs="121" lookfeet="115"/>
<creature name="Husky" type="monster" looktype="258"/>
<creature name="Hyaena" type="monster" looktype="94" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Hydra" type="monster" looktype="121" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Ice Golem" type="monster" looktype="261" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Ice Witch" type="monster" looktype="149" lookbody="47" looklegs="105" lookfeet="105"/>
<creature name="Infernatil" type="monster" looktype="201"/>
<creature name="Island troll" type="monster" looktype="15" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Juggernaut" type="monster" looktype="244"/>
<creature name="Jungle Maw" type="monster" looktype="120"/>
<creature name="Kongra" type="monster" looktype="116" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Kreebosh the Exile" type="monster" looktype="103"/>
<creature name="Larva" type="monster" looktype="82" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Lavahole" type="monster" lookitem="389"/>
<creature name="Lethal Lissy" type="monster" looktype="155" lookhead="77" looklegs="76" lookfeet="132"/>
<creature name="Lich" type="monster" looktype="99" lookhead="95" lookbody="116" looklegs="119" lookfeet="115"/>
<creature name="Lion" type="monster" looktype="41" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Lizard Sentinel" type="monster" looktype="114" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Lizard Snakecharmer" type="monster" looktype="115" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Lizard Templar" type="monster" looktype="113" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Lost Soul" type="monster" looktype="232"/>
<creature name="Magic Pillar" type="monster" lookitem="1551"/>
<creature name="Magicthrower" type="monster" lookitem="1560"/>
<creature name="Mahrdis" type="monster" looktype="90" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Mammoth" type="monster" looktype="199"/>
<creature name="Marid" type="monster" looktype="104" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Massive Water Elemental" type="monster" looktype="11"/>
<creature name="Merlkin" type="monster" looktype="117" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Mimic" type="monster" looktype="92" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Minishabaal" type="monster" looktype="237"/>
<creature name="Minotaur" type="monster" looktype="25" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Minotaur archer" type="monster" looktype="24" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Minotaur guard" type="monster" looktype="29" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Minotaur mage" type="monster" looktype="23" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Monk" type="monster" looktype="57" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Morgaroth" type="monster" looktype="12" lookbody="94" looklegs="79" lookfeet="79"/>
<creature name="Morguthis" type="monster" looktype="90" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Mr. Punish" type="monster" looktype="234"/>
<creature name="Mummy" type="monster" looktype="65" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Munster" type="monster" looktype="56"/>
<creature name="Necromancer" type="monster" looktype="9" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Necropharus" type="monster" looktype="209" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Nightmare" type="monster" looktype="245"/>
<creature name="Nomad" type="monster" looktype="146" lookhead="114" lookbody="20" looklegs="22" lookfeet="2"/>
<creature name="Norgle Glacierbeard" type="monster" looktype="257" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Novice Of The Cult" type="monster" looktype="133" lookhead="114" lookbody="95" looklegs="114" lookfeet="114"/>
<creature name="Omruc" type="monster" looktype="90" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc" type="monster" looktype="5"/>
<creature name="Orc Berserker" type="monster" looktype="8" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc Leader" type="monster" looktype="59" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc Rider" type="monster" looktype="4" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc Shaman" type="monster" looktype="6"/>
<creature name="Orc Spearman" type="monster" looktype="50" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc Warlord" type="monster" looktype="2" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orc Warrior" type="monster" looktype="7" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orchid Frog" type="monster" looktype="226" lookhead="109" lookbody="14" looklegs="109" lookfeet="114"/>
<creature name="Orcus The Cruel" type="monster" looktype="59" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Orshabaal" type="monster" looktype="201"/>
<creature name="Panda" type="monster" looktype="123" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Parrot" type="monster" looktype="217" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Penguin" type="monster" looktype="250"/>
<creature name="Phantasm" type="monster" looktype="241" lookhead="20"/>
<creature name="Pig" type="monster" looktype="60" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Pirate Buccaneer" type="monster" looktype="97"/>
<creature name="Pirate Corsair" type="monster" looktype="98"/>
<creature name="Pirate Cutthroat" type="monster" looktype="96"/>
<creature name="Pirate Ghost" type="monster" looktype="196"/>
<creature name="Pirate Marauder" type="monster" looktype="93"/>
<creature name="Pirate Skeleton" type="monster" looktype="195"/>
<creature name="Plaguesmith" type="monster" looktype="247"/>
<creature name="Plaguethrower" type="monster"/>
<creature name="Poison spider" type="monster" looktype="36"/>
<creature name="Poisonthrower" type="monster"/>
<creature name="Polar Bear" type="monster" looktype="42" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Priestess" type="monster" looktype="58" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Primitive" type="monster" looktype="143" lookhead="1" lookbody="1" looklegs="1" lookfeet="1"/>
<creature name="Quara Constrictor" type="monster" looktype="130"/>
<creature name="Quara Constrictor Scout" type="monster" looktype="130"/>
<creature name="Quara Hydromancer" type="monster" looktype="130"/>
<creature name="Quara Hydromancer Scout" type="monster" looktype="130"/>
<creature name="Quara Mantassin" type="monster" looktype="72"/>
<creature name="Quara Mantassin Scout" type="monster" looktype="72"/>
<creature name="Quara Pincher" type="monster" looktype="77"/>
<creature name="Quara Pincher Scout" type="monster" looktype="77"/>
<creature name="Quara Predator" type="monster" looktype="20"/>
<creature name="Quara Predator Scout" type="monster" looktype="20"/>
<creature name="Rabbit" type="monster" looktype="74" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Rahemos" type="monster" looktype="87" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Rat" type="monster" looktype="21" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Red Butterfly" type="monster" looktype="228"/>
<creature name="Rocky" type="monster" looktype="95" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Rotworm" type="monster" looktype="26" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Scarab" type="monster" looktype="83" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Scorpion" type="monster" looktype="43" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Seagull" type="monster" looktype="223" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Serpent Spawn" type="monster" looktype="220" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Sheep" type="monster" looktype="14" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Shredderthrower" type="monster"/>
<creature name="Sibang" type="monster" looktype="118" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Silver Rabbit" type="monster" looktype="262" lookhead="69" lookbody="66" looklegs="69" lookfeet="66"/>
<creature name="Skeleton" type="monster" looktype="33" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Skunk" type="monster" looktype="106" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Slim" type="monster" looktype="101" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Slime" type="monster" looktype="19" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>>
<creature name="Smuggler" type="monster" looktype="134" lookhead="95" looklegs="113" lookfeet="115"/>
<creature name="Snake" type="monster" looktype="28" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Son of Verminor" type="monster" looktype="19"/>
<creature name="Son the Ripper" type="monster" looktype="151" lookhead="95" lookbody="94" looklegs="117" lookfeet="97"/>
<creature name="Spectre" type="monster" looktype="235" lookhead="20"/>
<creature name="spider" type="monster" looktype="30" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Spirit of Earth" type="monster" looktype="67" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Spirit of Fire" type="monster" looktype="242"/>
<creature name="Spirit of Water" type="monster" looktype="11" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Spit Nettle" type="monster" looktype="221" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Stalker" type="monster" looktype="128" lookhead="95" lookbody="116" looklegs="95" lookfeet="114"/>
<creature name="Stone Golem" type="monster" looktype="67" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Svoren the Mad" type="monster" looktype="254" lookhead="80" lookbody="99" looklegs="118" lookfeet="38"/>
<creature name="Swamp Troll" type="monster" looktype="76" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Tarantula" type="monster" looktype="219" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Terror Bird" type="monster" looktype="218" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Thalas" type="monster" looktype="90" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="The Dark Dancer" type="monster" looktype="58"/>
<creature name="The Evil Eye" type="monster" looktype="210" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="The Hag" type="monster" looktype="264" lookhead="78" lookbody="97" looklegs="95" lookfeet="95"/>
<creature name="The Hairy One" type="monster" looktype="116"/>
<creature name="The Halloween Hare" type="monster" looktype="74"/>
<creature name="The Handmaiden" type="monster" looktype="230"/>
<creature name="The Horned Fox" type="monster" looktype="202"/>
<creature name="The Imperor" type="monster" looktype="237"/>
<creature name="The Masked Marauder" type="monster" looktype="234"/>
<creature name="The Obliverator" type="monster" looktype="35" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="The Old Widow" type="monster" looktype="208" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="The Pit Lord" type="monster" looktype="55" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="The Plasmother" type="monster" looktype="238"/>
<creature name="The Ruthless Herald" type="monster" looktype="237"/>
<creature name="Thornback Tortoise" type="monster" looktype="198"/>
<creature name="Thul" type="monster" looktype="46"/>
<creature name="Tibia Bug" type="monster" looktype="45" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Tiger" type="monster" looktype="125" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Tiquandas Revenge" type="monster" looktype="120"/>
<creature name="Toad" type="monster" looktype="222"/>
<creature name="Tortoise" type="monster" looktype="197"/>
<creature name="Troll" type="monster" looktype="15" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Undead Dragon" type="monster" looktype="231"/>
<creature name="Undead Minion" type="monster" looktype="37" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Valkyrie" type="monster" looktype="139" lookhead="113" lookbody="57" looklegs="95" lookfeet="113"/>
<creature name="Vampire" type="monster" looktype="68" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Vashresamun" type="monster" looktype="90" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Verminor" type="monster" looktype="201"/>
<creature name="War Wolf" type="monster" looktype="3" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Warlock" type="monster" looktype="130" lookhead="19" lookbody="71" looklegs="128" lookfeet="128"/>
<creature name="Wasp" type="monster" looktype="44" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Water Elemental" type="monster" looktype="11" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Webster" type="monster" looktype="263"/>
<creature name="Wild Warrior" type="monster" looktype="131" lookhead="57" lookbody="57" looklegs="57" lookfeet="57"/>
<creature name="Winter Wolf" type="monster" looktype="52" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Witch" type="monster" looktype="54" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Wolf" type="monster" looktype="27" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Wyvern" type="monster" looktype="239"/>
<creature name="Yakchal" type="monster" looktype="149"/>
<creature name="Yellow Butterfly" type="monster" looktype="10"/>
<creature name="Yeti" type="monster" looktype="110" lookhead="20" lookbody="30" looklegs="40" lookfeet="50"/>
<creature name="Bog Raider" type="monster" looktype="299"/>
<creature name="Cockroach" type="monster" looktype="284"/>
<creature name="Cryo Elemental" type="monster" looktype="261"/>
<creature name="Earth Elemental" type="monster" looktype="285"/>
<creature name="Massive Earth Elemental" type="monster" looktype="301"/>
<creature name="Energy Elemental" type="monster" looktype="293"/>
<creature name="Massive Energy Elemental" type="monster" looktype="290"/>
<creature name="Slick Water Elemental" type="monster" looktype="286"/>
<creature name="Massive Fire Elemental" type="monster" looktype="242"/>
<creature name="Roaring Water Elemental" type="monster" looktype="11"/>
<creature name="Grim Reaper" type="monster" looktype="300"/>
<creature name="Skeleton Warrior" type="monster" looktype="298"/>
<creature name="Goblin Scavenger" type="monster" looktype="297"/>
<creature name="Goblin Assassin" type="monster" looktype="296"/>
<creature name="Rotworm Queen" type="monster" looktype="295"/>
<creature name="Wisp" type="monster" looktype="294"/>
<creature name="Animated Pumpkin" type="monster" looktype="292"/>
<creature name="Wyrm" type="monster" looktype="291"/>
<creature name="The Count" type="monster" looktype="287"/>
<creature name="Acid Blob" type="monster" looktype="314"/>
<creature name="Azerus" type="monster" looktype="309"/>
<creature name="Crazed Beggar" type="monster" looktype="153" lookhead="59" lookbody="38" looklegs="38" lookfeet="97"/>
<creature name="Damaged Worker Golem" type="monster" looktype="304"/>
<creature name="Death Blob" type="monster" looktype="315"/>
<creature name="Gozzler" type="monster" looktype="313"/>
<creature name="Halloween Pumpkin" type="monster" looktype="292"/>
<creature name="Haunted Treeling" type="monster" looktype="310"/>
<creature name="Haunted Spirit" type="monster" looktype="319"/>
<creature name="Hellish Tortoise" type="monster" looktype="303"/>
<creature name="Hellspawn" type="monster" looktype="322"/>
<creature name="Mercury Blob" type="monster" looktype="316"/>
<creature name="Mutated Bat" type="monster" looktype="307"/>
<creature name="Mutated Human" type="monster" looktype="323"/>
<creature name="Mutated Rat" type="monster" looktype="305"/>
<creature name="Mutated Tiger" type="monster" looktype="318"/>
<creature name="Nightstalker" type="monster" looktype="320"/>
<creature name="Nightmare Scion" type="monster" looktype="321"/>
<creature name="Tar Blob" type="monster" looktype="315"/>
<creature name="Undead Gladiator" type="monster" looktype="306"/>
<creature name="Vampire Bride" type="monster" looktype="312"/>
<creature name="War Golem" type="monster" looktype="326"/>
<creature name="Werewolf" type="monster" looktype="308"/>
<creature name="Worker Golem" type="monster" looktype="304"/>
<creature name="Young Sea Serpent" type="monster" looktype="317"/>
<creature name="Zombie" type="monster" looktype="311"/>
<creature name="Gang Member" type="monster" looktype="151" lookhead="114" lookbody="19" looklegs="42" lookfeet="20"/>
<creature name="Gladiator" type="monster" looktype="131" lookhead="78" lookbody="19" looklegs="42" lookfeet="20"/>
<creature name="Mad Scientist" type="monster" looktype="133" lookhead="39" lookbody="0" looklegs="19" lookfeet="20"/>
</creatures>
| {
"pile_set_name": "Github"
} |
(function (factory) {
!(typeof exports === 'object' && typeof module !== 'undefined') &&
typeof define === 'function' && define.amd ? define(factory) :
factory()
}(function () { 'use strict';
const config = {};
config.async = true;
})); | {
"pile_set_name": "Github"
} |
To reproduce:
```console
# Install AKS based on https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough
$ az login
$ az provider register -n Microsoft.ContainerService # if you have not done this already
$ az group create --name aksgroup --location eastus # create the resource group
$ az aks create -g aksgroup -n aksconformance -k 1.10.5 --agent-count 1 --generate-ssh-keys
$ az aks get-credentials --resource-group aksgroup --name aksconformance
$ curl -L https://raw.githubusercontent.com/cncf/k8s-conformance/master/sonobuoy-conformance.yaml | kubectl apply -f -
$ kubectl logs -f -n sonobuoy sonobuoy
# wait for "no-exit was specified, sonobuoy is now blocking"
$ kubectl cp sonobuoy/sonobuoy:/tmp/sonobuoy ./results
# untar the tarball, then add plugins/e2e/results/{e2e.log,junit_01.xml}
| {
"pile_set_name": "Github"
} |
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SKC_LINUX_BUG_H
#define _SKC_LINUX_BUG_H
#include <stdio.h>
#include <stdlib.h>
#define WARN_ON(cond) \
((cond) ? printf("Internal warning(%s:%d, %s): %s\n", \
__FILE__, __LINE__, __func__, #cond) : 0)
#endif
| {
"pile_set_name": "Github"
} |
Traceback (most recent call last):
File "tests/exceptions/source/backtrace/chaining_third.py", line 45, in <module>
a_decorator()
File "tests/exceptions/source/backtrace/chaining_third.py", line 9, in a_decorator
b_decorator()
> File "tests/exceptions/source/backtrace/chaining_third.py", line 21, in b_decorator
c_decorated()
File "tests/exceptions/source/backtrace/chaining_third.py", line 38, in c_decorated
1 / 0
ZeroDivisionError: division by zero
Traceback (most recent call last):
File "tests/exceptions/source/backtrace/chaining_third.py", line 46, in <module>
a_context_manager()
File "tests/exceptions/source/backtrace/chaining_third.py", line 13, in a_context_manager
b_context_manager()
> File "tests/exceptions/source/backtrace/chaining_third.py", line 26, in b_context_manager
c_not_decorated()
File "tests/exceptions/source/backtrace/chaining_third.py", line 42, in c_not_decorated
1 / 0
ZeroDivisionError: division by zero
Traceback (most recent call last):
File "tests/exceptions/source/backtrace/chaining_third.py", line 47, in <module>
a_explicit()
File "tests/exceptions/source/backtrace/chaining_third.py", line 17, in a_explicit
b_explicit()
> File "tests/exceptions/source/backtrace/chaining_third.py", line 31, in b_explicit
c_not_decorated()
File "tests/exceptions/source/backtrace/chaining_third.py", line 42, in c_not_decorated
1 / 0
ZeroDivisionError: division by zero
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2007 Simon Fell
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import "NSView_additions.h"
@implementation NSView (TrackingHelpers)
- (BOOL)mousePointerIsInsideRect:(NSRect)rect {
NSPoint loc = [self convertPoint:self.window.mouseLocationOutsideOfEventStream fromView:nil];
return NSPointInRect(loc, rect);
}
// addTrackingRect helper that calculates whether we're inside the rect or not
- (NSTrackingRectTag)addTrackingRect:(NSRect)rect owner:(id)owner {
return [self addTrackingRect:rect owner:owner userData:nil assumeInside:[self mousePointerIsInsideRect:rect]];
}
@end
| {
"pile_set_name": "Github"
} |
input {
tcp {
port => 5000
type => "tcp5000"
}
kafka {
type => "metromind-start"
consumer_threads => 2
topics => ["metromind-start"]
decorate_events => true
codec => "plain"
key_deserializer_class => "org.apache.kafka.common.serialization.StringDeserializer"
bootstrap_servers => "kafka:9092"
}
kafka {
type => "metromind-raw"
consumer_threads => 2
topics => ["metromind-raw"]
decorate_events => true
codec => "plain"
key_deserializer_class => "org.apache.kafka.common.serialization.StringDeserializer"
bootstrap_servers => "kafka:9092"
}
kafka {
type => "metromind-anomaly"
consumer_threads => 1
topics => ["metromind-anomaly"]
decorate_events => true
codec => "plain"
key_deserializer_class => "org.apache.kafka.common.serialization.StringDeserializer"
bootstrap_servers => "kafka:9092"
}
}
## Add your filters / logstash plugins configuration here
filter {
json { source => "message" }
if [type] == "metromind-anomaly" {
fingerprint {
method => "SHA1"
key => "HMAC"
source => [ "@timestamp" ]
target => "Id"
}
}
grok {
match => ["@timestamp", "%{YEAR:[@metadata][year]}-%{MONTHNUM:[@metadata][month]}-%{MONTHDAY:[@metadata][day]}T%{GREEDYDATA}"]
}
mutate {
remove_field => ["kafka", "message"]
}
}
output {
if [type] == "tcp5000" {
elasticsearch {
hosts => "elasticsearch:9200"
}
}
if [type] == "metromind-start" or [type] == "metromind-raw" {
elasticsearch {
hosts => "elasticsearch:9200"
index => "%{type}-day2-%{[@metadata][year]}-%{[@metadata][month]}"
document_type => "logs"
retry_max_interval => 10
action => "index"
timeout => 60
}
}else {
elasticsearch {
hosts => "elasticsearch:9200"
index => "%{type}-day2-%{[@metadata][year]}-%{[@metadata][month]}"
document_type => "logs"
retry_max_interval => 10
action => "index"
document_id => "%{Id}"
timeout => 60
}
}
}
| {
"pile_set_name": "Github"
} |
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
font-weight: normal;
font-style: normal;
}
| {
"pile_set_name": "Github"
} |
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/DataProcessorAlgorithm.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/AlgorithmProperty.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FileFinder.h"
#include "MantidAPI/IEventWorkspace.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidKernel/Exception.h"
#include "MantidKernel/FacilityInfo.h"
#include "MantidKernel/PropertyManager.h"
#include "MantidKernel/PropertyManagerDataService.h"
#include "MantidKernel/System.h"
#include "Poco/Path.h"
#include <stdexcept>
#include <utility>
#ifdef MPI_BUILD
#include <boost/mpi.hpp>
#endif
using namespace Mantid::Kernel;
using namespace Mantid::API;
namespace Mantid {
namespace API {
//----------------------------------------------------------------------------------------------
/** Constructor
*/
template <class Base>
GenericDataProcessorAlgorithm<Base>::GenericDataProcessorAlgorithm()
: m_useMPI(false), m_loadAlg("Load"), m_accumulateAlg("Plus"),
m_loadAlgFileProp("Filename"),
m_propertyManagerPropertyName("ReductionProperties") {
Base::enableHistoryRecordingForChild(true);
}
//---------------------------------------------------------------------------------------------
/** Create a Child Algorithm. A call to this method creates a child algorithm
*object.
* Using this mechanism instead of creating daughter
* algorithms directly via the new operator is prefered since then
* the framework can take care of all of the necessary book-keeping.
*
* Overrides the method of the same name in Algorithm to enable history
*tracking by default.
*
* @param name :: The concrete algorithm class of the Child Algorithm
* @param startProgress :: The percentage progress value of the overall
*algorithm where this child algorithm starts
* @param endProgress :: The percentage progress value of the overall
*algorithm where this child algorithm ends
* @param enableLogging :: Set to false to disable logging from the child
*algorithm
* @param version :: The version of the child algorithm to create. By
*default gives the latest version.
* @return shared pointer to the newly created algorithm object
*/
template <class Base>
std::shared_ptr<Algorithm>
GenericDataProcessorAlgorithm<Base>::createChildAlgorithm(
const std::string &name, const double startProgress,
const double endProgress, const bool enableLogging, const int &version) {
// call parent method to create the child algorithm
auto alg = Algorithm::createChildAlgorithm(name, startProgress, endProgress,
enableLogging, version);
alg->enableHistoryRecordingForChild(this->isRecordingHistoryForChild());
if (this->isRecordingHistoryForChild()) {
// pass pointer to the history object created in Algorithm to the child
alg->trackAlgorithmHistory(Base::m_history);
}
return alg;
}
template <class Base>
void GenericDataProcessorAlgorithm<Base>::setLoadAlg(const std::string &alg) {
if (alg.empty())
throw std::invalid_argument("Cannot set load algorithm to empty string");
m_loadAlg = alg;
}
template <class Base>
void GenericDataProcessorAlgorithm<Base>::setLoadAlgFileProp(
const std::string &filePropName) {
if (filePropName.empty()) {
throw std::invalid_argument(
"Cannot set the load algorithm file property name");
}
m_loadAlgFileProp = filePropName;
}
template <class Base>
void GenericDataProcessorAlgorithm<Base>::setAccumAlg(const std::string &alg) {
if (alg.empty())
throw std::invalid_argument(
"Cannot set accumulate algorithm to empty string");
m_accumulateAlg = alg;
}
template <class Base>
void GenericDataProcessorAlgorithm<Base>::setPropManagerPropName(
const std::string &propName) {
m_propertyManagerPropertyName = propName;
}
/**
* Declare mapping of property name to name in the PropertyManager. This is used
*by
* getPropertyValue(const string &) and getProperty(const string&).
*
* @param nameInProp Name of the property as declared in Algorithm::init().
* @param nameInPropManager Name of the property in the PropertyManager.
*/
template <class Base>
void GenericDataProcessorAlgorithm<Base>::mapPropertyName(
const std::string &nameInProp, const std::string &nameInPropManager) {
m_nameToPMName[nameInProp] = nameInPropManager;
}
/**
* Copy a property from an existing algorithm.
*
* @warning This only works if your algorithm is in the WorkflowAlgorithms
*sub-project.
*
* @param alg
* @param name
*
* @throws std::runtime_error If you ask to copy a non-existent property
*/
template <class Base>
void GenericDataProcessorAlgorithm<Base>::copyProperty(
const API::Algorithm_sptr &alg, const std::string &name) {
if (!alg->existsProperty(name)) {
std::stringstream msg;
msg << "Algorithm \"" << alg->name() << "\" does not have property \""
<< name << "\"";
throw std::runtime_error(msg.str());
}
auto prop = alg->getPointerToProperty(name);
Base::declareProperty(std::unique_ptr<Property>(prop->clone()),
prop->documentation());
}
/**
* Get the property held by this object. If the value is the default see if it
* is contained in the PropertyManager. @see Algorithm::getPropertyValue(const
*string &)
*
* @param name
* @return
*/
template <class Base>
std::string GenericDataProcessorAlgorithm<Base>::getPropertyValue(
const std::string &name) const {
// explicitly specifying a property wins
if (!Base::isDefault(name)) {
return Algorithm::getPropertyValue(name);
}
// return it if it is in the held property manager
auto mapping = m_nameToPMName.find(name);
if (mapping != m_nameToPMName.end()) {
auto pm = this->getProcessProperties();
if (pm->existsProperty(mapping->second)) {
return pm->getPropertyValue(mapping->second);
}
}
// let the parent class version win
return Algorithm::getPropertyValue(name);
}
/**
* Get the property held by this object. If the value is the default see if it
* contained in the PropertyManager. @see Algorithm::getProperty(const string&)
*
* @param name
* @return
*/
template <class Base>
PropertyManagerOwner::TypedValue
GenericDataProcessorAlgorithm<Base>::getProperty(
const std::string &name) const {
// explicitely specifying a property wins
if (!Base::isDefault(name)) {
return Base::getProperty(name);
}
// return it if it is in the held property manager
auto mapping = m_nameToPMName.find(name);
if (mapping != m_nameToPMName.end()) {
auto pm = this->getProcessProperties();
if (pm->existsProperty(mapping->second)) {
return pm->getProperty(mapping->second);
}
}
// let the parent class version win
return Algorithm::getProperty(name);
}
template <class Base>
ITableWorkspace_sptr GenericDataProcessorAlgorithm<Base>::determineChunk(
const std::string &filename) {
UNUSED_ARG(filename);
throw std::runtime_error(
"DataProcessorAlgorithm::determineChunk is not implemented");
}
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::loadChunk(const size_t rowIndex) {
UNUSED_ARG(rowIndex);
throw std::runtime_error(
"DataProcessorAlgorithm::loadChunk is not implemented");
}
/**
* Assemble the partial workspaces from all MPI processes
* @param partialWS :: workspace to assemble
* thread only)
*/
template <class Base>
Workspace_sptr
GenericDataProcessorAlgorithm<Base>::assemble(Workspace_sptr partialWS) {
Workspace_sptr outputWS = std::move(partialWS);
#ifdef MPI_BUILD
IAlgorithm_sptr gatherAlg = createChildAlgorithm("GatherWorkspaces");
gatherAlg->setLogging(true);
gatherAlg->setAlwaysStoreInADS(true);
gatherAlg->setProperty("InputWorkspace", partialWS);
gatherAlg->setProperty("PreserveEvents", true);
gatherAlg->setPropertyValue("OutputWorkspace", "_total");
gatherAlg->execute();
if (isMainThread()) {
outputWS = AnalysisDataService::Instance().retrieve("_total");
}
#endif
return outputWS;
}
/**
* Assemble the partial workspaces from all MPI processes
* @param partialWSName :: Name of the workspace to assemble
* @param outputWSName :: Name of the assembled workspace (available in main
* thread only)
*/
template <class Base>
Workspace_sptr
GenericDataProcessorAlgorithm<Base>::assemble(const std::string &partialWSName,
const std::string &outputWSName) {
#ifdef MPI_BUILD
std::string threadOutput = partialWSName;
Workspace_sptr partialWS =
AnalysisDataService::Instance().retrieve(partialWSName);
IAlgorithm_sptr gatherAlg = createChildAlgorithm("GatherWorkspaces");
gatherAlg->setLogging(true);
gatherAlg->setAlwaysStoreInADS(true);
gatherAlg->setProperty("InputWorkspace", partialWS);
gatherAlg->setProperty("PreserveEvents", true);
gatherAlg->setPropertyValue("OutputWorkspace", outputWSName);
gatherAlg->execute();
if (isMainThread())
threadOutput = outputWSName;
#else
UNUSED_ARG(outputWSName)
const std::string &threadOutput = partialWSName;
#endif
Workspace_sptr outputWS =
AnalysisDataService::Instance().retrieve(threadOutput);
return outputWS;
}
/**
* Save a workspace as a nexus file, with check for which thread
* we are executing in.
* @param outputWSName :: Name of the workspace to save
* @param outputFile :: Path to the Nexus file to save
*/
template <class Base>
void GenericDataProcessorAlgorithm<Base>::saveNexus(
const std::string &outputWSName, const std::string &outputFile) {
#ifdef MPI_BUILD
if (boost::mpi::communicator().rank() <= 0 && !outputFile.empty()) {
#else
if (!outputFile.empty()) {
#endif
IAlgorithm_sptr saveAlg = createChildAlgorithm("SaveNexus");
saveAlg->setPropertyValue("Filename", outputFile);
saveAlg->setPropertyValue("InputWorkspace", outputWSName);
saveAlg->execute();
}
}
/// Return true if we are running on the main thread
template <class Base> bool GenericDataProcessorAlgorithm<Base>::isMainThread() {
bool mainThread;
#ifdef MPI_BUILD
mainThread = (boost::mpi::communicator().rank() == 0);
#else
mainThread = true;
#endif
return mainThread;
}
/// Return the number of MPI processes running
template <class Base> int GenericDataProcessorAlgorithm<Base>::getNThreads() {
#ifdef MPI_BUILD
return boost::mpi::communicator().size();
#else
return 1;
#endif
}
/**
* Determine what kind of input data we have and load it
* @param inputData :: File path or workspace name
* @param loadQuiet :: If true then the output is not stored in the ADS
*/
template <class Base>
Workspace_sptr
GenericDataProcessorAlgorithm<Base>::load(const std::string &inputData,
const bool loadQuiet) {
Workspace_sptr inputWS;
// First, check whether we have the name of an existing workspace
if (AnalysisDataService::Instance().doesExist(inputData)) {
inputWS = AnalysisDataService::Instance().retrieve(inputData);
} else {
std::string foundFile = FileFinder::Instance().getFullPath(inputData);
if (foundFile.empty()) {
// Get facility extensions
FacilityInfo facilityInfo = ConfigService::Instance().getFacility();
const std::vector<std::string> facilityExts = facilityInfo.extensions();
foundFile = FileFinder::Instance().findRun(inputData, facilityExts);
}
if (!foundFile.empty()) {
Poco::Path p(foundFile);
const std::string outputWSName = p.getBaseName();
IAlgorithm_sptr loadAlg = createChildAlgorithm(m_loadAlg);
loadAlg->setProperty(m_loadAlgFileProp, foundFile);
if (!loadQuiet) {
loadAlg->setAlwaysStoreInADS(true);
}
// Set up MPI if available
#ifdef MPI_BUILD
// First, check whether the loader allows use to chunk the data
if (loadAlg->existsProperty("ChunkNumber") &&
loadAlg->existsProperty("TotalChunks")) {
m_useMPI = true;
// The communicator containing all processes
boost::mpi::communicator world;
g_log.notice() << "Chunk/Total: " << world.rank() + 1 << "/"
<< world.size() << '\n';
loadAlg->setPropertyValue("OutputWorkspace", outputWSName);
loadAlg->setProperty("ChunkNumber", world.rank() + 1);
loadAlg->setProperty("TotalChunks", world.size());
}
#endif
loadAlg->execute();
if (loadQuiet) {
inputWS = loadAlg->getProperty("OutputWorkspace");
} else {
inputWS = AnalysisDataService::Instance().retrieve(outputWSName);
}
} else
throw std::runtime_error(
"DataProcessorAlgorithm::load could process any data");
}
return inputWS;
}
/**
* Get the property manager object of a given name from the property manager
* data service, or create a new one. If the PropertyManager name is missing
*(default) this will
* look at m_propertyManagerPropertyName to get the correct value;
*
* @param propertyManager :: Name of the property manager to retrieve.
*/
template <class Base>
std::shared_ptr<PropertyManager>
GenericDataProcessorAlgorithm<Base>::getProcessProperties(
const std::string &propertyManager) const {
std::string propertyManagerName(propertyManager);
if (propertyManager.empty() && (!m_propertyManagerPropertyName.empty())) {
if (!Base::existsProperty(m_propertyManagerPropertyName)) {
std::stringstream msg;
msg << "Failed to find property \"" << m_propertyManagerPropertyName
<< "\"";
throw Exception::NotFoundError(msg.str(), this->name());
}
propertyManagerName = this->getPropertyValue(m_propertyManagerPropertyName);
}
std::shared_ptr<PropertyManager> processProperties;
if (PropertyManagerDataService::Instance().doesExist(propertyManagerName)) {
processProperties =
PropertyManagerDataService::Instance().retrieve(propertyManagerName);
} else {
Base::getLogger().notice() << "Could not find property manager\n";
processProperties = std::make_shared<PropertyManager>();
PropertyManagerDataService::Instance().addOrReplace(propertyManagerName,
processProperties);
}
return processProperties;
}
template <class Base>
std::vector<std::string>
GenericDataProcessorAlgorithm<Base>::splitInput(const std::string &input) {
UNUSED_ARG(input);
throw std::runtime_error(
"DataProcessorAlgorithm::splitInput is not implemented");
}
template <class Base>
void GenericDataProcessorAlgorithm<Base>::forwardProperties() {
throw std::runtime_error(
"DataProcessorAlgorithm::forwardProperties is not implemented");
}
//------------------------------------------------------------------------------------------
// Binary opration implementations for DPA so it can record history
//------------------------------------------------------------------------------------------
/**
* Divide a matrix workspace by another matrix workspace
* @param lhs :: the workspace on the left hand side of the divide symbol
* @param rhs :: the workspace on the right hand side of the divide symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::divide(const MatrixWorkspace_sptr lhs,
const MatrixWorkspace_sptr rhs) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Divide", lhs, rhs);
}
/**
* Divide a matrix workspace by a single value
* @param lhs :: the workspace on the left hand side of the divide symbol
* @param rhsValue :: the value on the right hand side of the divide symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::divide(const MatrixWorkspace_sptr lhs,
const double &rhsValue) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Divide", lhs, createWorkspaceSingleValue(rhsValue));
}
/**
* Multiply a matrix workspace by another matrix workspace
* @param lhs :: the workspace on the left hand side of the multiplication
* symbol
* @param rhs :: the workspace on the right hand side of the multiplication
* symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::multiply(const MatrixWorkspace_sptr lhs,
const MatrixWorkspace_sptr rhs) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Divide", lhs, rhs);
}
/**
* Multiply a matrix workspace by a single value
* @param lhs :: the workspace on the left hand side of the multiplication
* symbol
* @param rhsValue :: the value on the right hand side of the multiplication
* symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::multiply(const MatrixWorkspace_sptr lhs,
const double &rhsValue) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Multiply", lhs, createWorkspaceSingleValue(rhsValue));
}
/**
* Add a matrix workspace to another matrix workspace
* @param lhs :: the workspace on the left hand side of the addition symbol
* @param rhs :: the workspace on the right hand side of the addition symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::plus(const MatrixWorkspace_sptr lhs,
const MatrixWorkspace_sptr rhs) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Plus", lhs, rhs);
}
/**
* Add a single value to another matrix workspace
* @param lhs :: the workspace on the left hand side of the addition symbol
* @param rhsValue :: the value on the right hand side of the addition symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::plus(const MatrixWorkspace_sptr lhs,
const double &rhsValue) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Plus", lhs, createWorkspaceSingleValue(rhsValue));
}
/**
* Subract a matrix workspace from another matrix workspace
* @param lhs :: the workspace on the left hand side of the subtraction symbol
* @param rhs :: the workspace on the right hand side of the subtraction symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::minus(const MatrixWorkspace_sptr lhs,
const MatrixWorkspace_sptr rhs) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Minus", lhs, rhs);
}
/**
* Subract a single value from a matrix workspace
* @param lhs :: the workspace on the left hand side of the subtraction symbol
* @param rhsValue :: the workspace on the right hand side of the subtraction
* symbol
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::minus(const MatrixWorkspace_sptr lhs,
const double &rhsValue) {
return this->executeBinaryAlgorithm<
MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>(
"Minus", lhs, createWorkspaceSingleValue(rhsValue));
}
/**
* Create a workspace that contains just a single Y value.
* @param rhsValue :: the value to convert to a single value matrix workspace
* @return matrix workspace resulting from the operation
*/
template <class Base>
MatrixWorkspace_sptr
GenericDataProcessorAlgorithm<Base>::createWorkspaceSingleValue(
const double &rhsValue) {
MatrixWorkspace_sptr retVal =
WorkspaceFactory::Instance().create("WorkspaceSingleValue", 1, 1, 1);
retVal->dataY(0)[0] = rhsValue;
return retVal;
}
template <typename T>
void GenericDataProcessorAlgorithm<T>::visualStudioC4661Workaround() {}
template class GenericDataProcessorAlgorithm<Algorithm>;
template class MANTID_API_DLL GenericDataProcessorAlgorithm<SerialAlgorithm>;
template class MANTID_API_DLL GenericDataProcessorAlgorithm<ParallelAlgorithm>;
template class MANTID_API_DLL
GenericDataProcessorAlgorithm<DistributedAlgorithm>;
template <>
MANTID_API_DLL void
GenericDataProcessorAlgorithm<Algorithm>::visualStudioC4661Workaround() {}
} // namespace API
} // namespace Mantid
| {
"pile_set_name": "Github"
} |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
#include "curl_setup.h"
#include "urldata.h"
#include <curl/curl.h>
#include <stddef.h>
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#ifdef __SYMBIAN32__
/* zlib pollutes the namespace with this definition */
#undef WIN32
#endif
#endif
#ifdef HAVE_BROTLI
#include <brotli/decode.h>
#endif
#include "sendf.h"
#include "http.h"
#include "content_encoding.h"
#include "strdup.h"
#include "strcase.h"
#include "curl_memory.h"
#include "memdebug.h"
#define CONTENT_ENCODING_DEFAULT "identity"
#ifndef CURL_DISABLE_HTTP
#define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */
#ifdef HAVE_LIBZ
/* Comment this out if zlib is always going to be at least ver. 1.2.0.4
(doing so will reduce code size slightly). */
#define OLD_ZLIB_SUPPORT 1
#define GZIP_MAGIC_0 0x1f
#define GZIP_MAGIC_1 0x8b
/* gzip flag byte */
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
#define COMMENT 0x10 /* bit 4 set: file comment present */
#define RESERVED 0xE0 /* bits 5..7: reserved */
typedef enum {
ZLIB_UNINIT, /* uninitialized */
ZLIB_INIT, /* initialized */
ZLIB_INFLATING, /* inflating started. */
ZLIB_EXTERNAL_TRAILER, /* reading external trailer */
ZLIB_GZIP_HEADER, /* reading gzip header */
ZLIB_GZIP_INFLATING, /* inflating gzip stream */
ZLIB_INIT_GZIP /* initialized in transparent gzip mode */
} zlibInitState;
/* Writer parameters. */
typedef struct {
zlibInitState zlib_init; /* zlib init state */
uInt trailerlen; /* Remaining trailer byte count. */
z_stream z; /* State structure for zlib. */
} zlib_params;
static voidpf
zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
{
(void) opaque;
/* not a typo, keep it calloc() */
return (voidpf) calloc(items, size);
}
static void
zfree_cb(voidpf opaque, voidpf ptr)
{
(void) opaque;
free(ptr);
}
static CURLcode
process_zlib_error(struct connectdata *conn, z_stream *z)
{
struct Curl_easy *data = conn->data;
if(z->msg)
failf(data, "Error while processing content unencoding: %s",
z->msg);
else
failf(data, "Error while processing content unencoding: "
"Unknown failure within decompression software.");
return CURLE_BAD_CONTENT_ENCODING;
}
static CURLcode
exit_zlib(struct connectdata *conn,
z_stream *z, zlibInitState *zlib_init, CURLcode result)
{
if(*zlib_init == ZLIB_GZIP_HEADER)
Curl_safefree(z->next_in);
if(*zlib_init != ZLIB_UNINIT) {
if(inflateEnd(z) != Z_OK && result == CURLE_OK)
result = process_zlib_error(conn, z);
*zlib_init = ZLIB_UNINIT;
}
return result;
}
static CURLcode process_trailer(struct connectdata *conn, zlib_params *zp)
{
z_stream *z = &zp->z;
CURLcode result = CURLE_OK;
uInt len = z->avail_in < zp->trailerlen? z->avail_in: zp->trailerlen;
/* Consume expected trailer bytes. Terminate stream if exhausted.
Issue an error if unexpected bytes follow. */
zp->trailerlen -= len;
z->avail_in -= len;
z->next_in += len;
if(z->avail_in)
result = CURLE_WRITE_ERROR;
if(result || !zp->trailerlen)
result = exit_zlib(conn, z, &zp->zlib_init, result);
else {
/* Only occurs for gzip with zlib < 1.2.0.4 or raw deflate. */
zp->zlib_init = ZLIB_EXTERNAL_TRAILER;
}
return result;
}
static CURLcode inflate_stream(struct connectdata *conn,
contenc_writer *writer, zlibInitState started)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
uInt nread = z->avail_in;
Bytef *orig_in = z->next_in;
bool done = FALSE;
CURLcode result = CURLE_OK; /* Curl_client_write status */
char *decomp; /* Put the decompressed data here. */
/* Check state. */
if(zp->zlib_init != ZLIB_INIT &&
zp->zlib_init != ZLIB_INFLATING &&
zp->zlib_init != ZLIB_INIT_GZIP &&
zp->zlib_init != ZLIB_GZIP_INFLATING)
return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR);
/* Dynamically allocate a buffer for decompression because it's uncommonly
large to hold on the stack */
decomp = malloc(DSIZ);
if(decomp == NULL)
return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
/* because the buffer size is fixed, iteratively decompress and transfer to
the client via downstream_write function. */
while(!done) {
int status; /* zlib status */
done = TRUE;
/* (re)set buffer for decompressed output for every iteration */
z->next_out = (Bytef *) decomp;
z->avail_out = DSIZ;
#ifdef Z_BLOCK
/* Z_BLOCK is only available in zlib ver. >= 1.2.0.5 */
status = inflate(z, Z_BLOCK);
#else
/* fallback for zlib ver. < 1.2.0.5 */
status = inflate(z, Z_SYNC_FLUSH);
#endif
/* Flush output data if some. */
if(z->avail_out != DSIZ) {
if(status == Z_OK || status == Z_STREAM_END) {
zp->zlib_init = started; /* Data started. */
result = Curl_unencode_write(conn, writer->downstream, decomp,
DSIZ - z->avail_out);
if(result) {
exit_zlib(conn, z, &zp->zlib_init, result);
break;
}
}
}
/* Dispatch by inflate() status. */
switch(status) {
case Z_OK:
/* Always loop: there may be unflushed latched data in zlib state. */
done = FALSE;
break;
case Z_BUF_ERROR:
/* No more data to flush: just exit loop. */
break;
case Z_STREAM_END:
result = process_trailer(conn, zp);
break;
case Z_DATA_ERROR:
/* some servers seem to not generate zlib headers, so this is an attempt
to fix and continue anyway */
if(zp->zlib_init == ZLIB_INIT) {
/* Do not use inflateReset2(): only available since zlib 1.2.3.4. */
(void) inflateEnd(z); /* don't care about the return code */
if(inflateInit2(z, -MAX_WBITS) == Z_OK) {
z->next_in = orig_in;
z->avail_in = nread;
zp->zlib_init = ZLIB_INFLATING;
zp->trailerlen = 4; /* Tolerate up to 4 unknown trailer bytes. */
done = FALSE;
break;
}
zp->zlib_init = ZLIB_UNINIT; /* inflateEnd() already called. */
}
/* FALLTHROUGH */
default:
result = exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
break;
}
}
free(decomp);
/* We're about to leave this call so the `nread' data bytes won't be seen
again. If we are in a state that would wrongly allow restart in raw mode
at the next call, assume output has already started. */
if(nread && zp->zlib_init == ZLIB_INIT)
zp->zlib_init = started; /* Cannot restart anymore. */
return result;
}
/* Deflate handler. */
static CURLcode deflate_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
if(!writer->downstream)
return CURLE_WRITE_ERROR;
/* Initialize zlib */
z->zalloc = (alloc_func) zalloc_cb;
z->zfree = (free_func) zfree_cb;
if(inflateInit(z) != Z_OK)
return process_zlib_error(conn, z);
zp->zlib_init = ZLIB_INIT;
return CURLE_OK;
}
static CURLcode deflate_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
/* Set the compressed input when this function is called */
z->next_in = (Bytef *) buf;
z->avail_in = (uInt) nbytes;
if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER)
return process_trailer(conn, zp);
/* Now uncompress the data */
return inflate_stream(conn, writer, ZLIB_INFLATING);
}
static void deflate_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
exit_zlib(conn, z, &zp->zlib_init, CURLE_OK);
}
static const content_encoding deflate_encoding = {
"deflate",
NULL,
deflate_init_writer,
deflate_unencode_write,
deflate_close_writer,
sizeof(zlib_params)
};
/* Gzip handler. */
static CURLcode gzip_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
if(!writer->downstream)
return CURLE_WRITE_ERROR;
/* Initialize zlib */
z->zalloc = (alloc_func) zalloc_cb;
z->zfree = (free_func) zfree_cb;
if(strcmp(zlibVersion(), "1.2.0.4") >= 0) {
/* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */
if(inflateInit2(z, MAX_WBITS + 32) != Z_OK) {
return process_zlib_error(conn, z);
}
zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */
}
else {
/* we must parse the gzip header and trailer ourselves */
if(inflateInit2(z, -MAX_WBITS) != Z_OK) {
return process_zlib_error(conn, z);
}
zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */
zp->zlib_init = ZLIB_INIT; /* Initial call state */
}
return CURLE_OK;
}
#ifdef OLD_ZLIB_SUPPORT
/* Skip over the gzip header */
static enum {
GZIP_OK,
GZIP_BAD,
GZIP_UNDERFLOW
} check_gzip_header(unsigned char const *data, ssize_t len, ssize_t *headerlen)
{
int method, flags;
const ssize_t totallen = len;
/* The shortest header is 10 bytes */
if(len < 10)
return GZIP_UNDERFLOW;
if((data[0] != GZIP_MAGIC_0) || (data[1] != GZIP_MAGIC_1))
return GZIP_BAD;
method = data[2];
flags = data[3];
if(method != Z_DEFLATED || (flags & RESERVED) != 0) {
/* Can't handle this compression method or unknown flag */
return GZIP_BAD;
}
/* Skip over time, xflags, OS code and all previous bytes */
len -= 10;
data += 10;
if(flags & EXTRA_FIELD) {
ssize_t extra_len;
if(len < 2)
return GZIP_UNDERFLOW;
extra_len = (data[1] << 8) | data[0];
if(len < (extra_len + 2))
return GZIP_UNDERFLOW;
len -= (extra_len + 2);
data += (extra_len + 2);
}
if(flags & ORIG_NAME) {
/* Skip over NUL-terminated file name */
while(len && *data) {
--len;
++data;
}
if(!len || *data)
return GZIP_UNDERFLOW;
/* Skip over the NUL */
--len;
++data;
}
if(flags & COMMENT) {
/* Skip over NUL-terminated comment */
while(len && *data) {
--len;
++data;
}
if(!len || *data)
return GZIP_UNDERFLOW;
/* Skip over the NUL */
--len;
}
if(flags & HEAD_CRC) {
if(len < 2)
return GZIP_UNDERFLOW;
len -= 2;
}
*headerlen = totallen - len;
return GZIP_OK;
}
#endif
static CURLcode gzip_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
if(zp->zlib_init == ZLIB_INIT_GZIP) {
/* Let zlib handle the gzip decompression entirely */
z->next_in = (Bytef *) buf;
z->avail_in = (uInt) nbytes;
/* Now uncompress the data */
return inflate_stream(conn, writer, ZLIB_INIT_GZIP);
}
#ifndef OLD_ZLIB_SUPPORT
/* Support for old zlib versions is compiled away and we are running with
an old version, so return an error. */
return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR);
#else
/* This next mess is to get around the potential case where there isn't
* enough data passed in to skip over the gzip header. If that happens, we
* malloc a block and copy what we have then wait for the next call. If
* there still isn't enough (this is definitely a worst-case scenario), we
* make the block bigger, copy the next part in and keep waiting.
*
* This is only required with zlib versions < 1.2.0.4 as newer versions
* can handle the gzip header themselves.
*/
switch(zp->zlib_init) {
/* Skip over gzip header? */
case ZLIB_INIT:
{
/* Initial call state */
ssize_t hlen;
switch(check_gzip_header((unsigned char *) buf, nbytes, &hlen)) {
case GZIP_OK:
z->next_in = (Bytef *) buf + hlen;
z->avail_in = (uInt) (nbytes - hlen);
zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */
break;
case GZIP_UNDERFLOW:
/* We need more data so we can find the end of the gzip header. It's
* possible that the memory block we malloc here will never be freed if
* the transfer abruptly aborts after this point. Since it's unlikely
* that circumstances will be right for this code path to be followed in
* the first place, and it's even more unlikely for a transfer to fail
* immediately afterwards, it should seldom be a problem.
*/
z->avail_in = (uInt) nbytes;
z->next_in = malloc(z->avail_in);
if(z->next_in == NULL) {
return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
}
memcpy(z->next_in, buf, z->avail_in);
zp->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */
/* We don't have any data to inflate yet */
return CURLE_OK;
case GZIP_BAD:
default:
return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
}
}
break;
case ZLIB_GZIP_HEADER:
{
/* Need more gzip header data state */
ssize_t hlen;
z->avail_in += (uInt) nbytes;
z->next_in = Curl_saferealloc(z->next_in, z->avail_in);
if(z->next_in == NULL) {
return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
}
/* Append the new block of data to the previous one */
memcpy(z->next_in + z->avail_in - nbytes, buf, nbytes);
switch(check_gzip_header(z->next_in, z->avail_in, &hlen)) {
case GZIP_OK:
/* This is the zlib stream data */
free(z->next_in);
/* Don't point into the malloced block since we just freed it */
z->next_in = (Bytef *) buf + hlen + nbytes - z->avail_in;
z->avail_in = (uInt) (z->avail_in - hlen);
zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */
break;
case GZIP_UNDERFLOW:
/* We still don't have any data to inflate! */
return CURLE_OK;
case GZIP_BAD:
default:
return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
}
}
break;
case ZLIB_EXTERNAL_TRAILER:
z->next_in = (Bytef *) buf;
z->avail_in = (uInt) nbytes;
return process_trailer(conn, zp);
case ZLIB_GZIP_INFLATING:
default:
/* Inflating stream state */
z->next_in = (Bytef *) buf;
z->avail_in = (uInt) nbytes;
break;
}
if(z->avail_in == 0) {
/* We don't have any data to inflate; wait until next time */
return CURLE_OK;
}
/* We've parsed the header, now uncompress the data */
return inflate_stream(conn, writer, ZLIB_GZIP_INFLATING);
#endif
}
static void gzip_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
zlib_params *zp = (zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
exit_zlib(conn, z, &zp->zlib_init, CURLE_OK);
}
static const content_encoding gzip_encoding = {
"gzip",
"x-gzip",
gzip_init_writer,
gzip_unencode_write,
gzip_close_writer,
sizeof(zlib_params)
};
#endif /* HAVE_LIBZ */
#ifdef HAVE_BROTLI
/* Writer parameters. */
typedef struct {
BrotliDecoderState *br; /* State structure for brotli. */
} brotli_params;
static CURLcode brotli_map_error(BrotliDecoderErrorCode be)
{
switch(be) {
case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:
case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:
case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:
case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:
case BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:
case BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:
case BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:
case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:
case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:
case BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:
case BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:
case BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:
case BROTLI_DECODER_ERROR_FORMAT_PADDING_1:
case BROTLI_DECODER_ERROR_FORMAT_PADDING_2:
#ifdef BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY
case BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY:
#endif
#ifdef BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET
case BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:
#endif
case BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:
return CURLE_BAD_CONTENT_ENCODING;
case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:
case BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:
case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:
case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:
case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:
case BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:
return CURLE_OUT_OF_MEMORY;
default:
break;
}
return CURLE_WRITE_ERROR;
}
static CURLcode brotli_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
brotli_params *bp = (brotli_params *) &writer->params;
(void) conn;
if(!writer->downstream)
return CURLE_WRITE_ERROR;
bp->br = BrotliDecoderCreateInstance(NULL, NULL, NULL);
return bp->br? CURLE_OK: CURLE_OUT_OF_MEMORY;
}
static CURLcode brotli_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
brotli_params *bp = (brotli_params *) &writer->params;
const uint8_t *src = (const uint8_t *) buf;
char *decomp;
uint8_t *dst;
size_t dstleft;
CURLcode result = CURLE_OK;
BrotliDecoderResult r = BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT;
if(!bp->br)
return CURLE_WRITE_ERROR; /* Stream already ended. */
decomp = malloc(DSIZ);
if(!decomp)
return CURLE_OUT_OF_MEMORY;
while((nbytes || r == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) &&
result == CURLE_OK) {
dst = (uint8_t *) decomp;
dstleft = DSIZ;
r = BrotliDecoderDecompressStream(bp->br,
&nbytes, &src, &dstleft, &dst, NULL);
result = Curl_unencode_write(conn, writer->downstream,
decomp, DSIZ - dstleft);
if(result)
break;
switch(r) {
case BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:
case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:
break;
case BROTLI_DECODER_RESULT_SUCCESS:
BrotliDecoderDestroyInstance(bp->br);
bp->br = NULL;
if(nbytes)
result = CURLE_WRITE_ERROR;
break;
default:
result = brotli_map_error(BrotliDecoderGetErrorCode(bp->br));
break;
}
}
free(decomp);
return result;
}
static void brotli_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
brotli_params *bp = (brotli_params *) &writer->params;
(void) conn;
if(bp->br) {
BrotliDecoderDestroyInstance(bp->br);
bp->br = NULL;
}
}
static const content_encoding brotli_encoding = {
"br",
NULL,
brotli_init_writer,
brotli_unencode_write,
brotli_close_writer,
sizeof(brotli_params)
};
#endif
/* Identity handler. */
static CURLcode identity_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR;
}
static CURLcode identity_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
return Curl_unencode_write(conn, writer->downstream, buf, nbytes);
}
static void identity_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
(void) writer;
}
static const content_encoding identity_encoding = {
"identity",
"none",
identity_init_writer,
identity_unencode_write,
identity_close_writer,
0
};
/* supported content encodings table. */
static const content_encoding * const encodings[] = {
&identity_encoding,
#ifdef HAVE_LIBZ
&deflate_encoding,
&gzip_encoding,
#endif
#ifdef HAVE_BROTLI
&brotli_encoding,
#endif
NULL
};
/* Return a list of comma-separated names of supported encodings. */
char *Curl_all_content_encodings(void)
{
size_t len = 0;
const content_encoding * const *cep;
const content_encoding *ce;
char *ace;
for(cep = encodings; *cep; cep++) {
ce = *cep;
if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT))
len += strlen(ce->name) + 2;
}
if(!len)
return strdup(CONTENT_ENCODING_DEFAULT);
ace = malloc(len);
if(ace) {
char *p = ace;
for(cep = encodings; *cep; cep++) {
ce = *cep;
if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) {
strcpy(p, ce->name);
p += strlen(p);
*p++ = ',';
*p++ = ' ';
}
}
p[-2] = '\0';
}
return ace;
}
/* Real client writer: no downstream. */
static CURLcode client_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
return writer->downstream? CURLE_WRITE_ERROR: CURLE_OK;
}
static CURLcode client_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
struct Curl_easy *data = conn->data;
struct SingleRequest *k = &data->req;
(void) writer;
if(!nbytes || k->ignorebody)
return CURLE_OK;
return Curl_client_write(conn, CLIENTWRITE_BODY, (char *) buf, nbytes);
}
static void client_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
(void) writer;
}
static const content_encoding client_encoding = {
NULL,
NULL,
client_init_writer,
client_unencode_write,
client_close_writer,
0
};
/* Deferred error dummy writer. */
static CURLcode error_init_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR;
}
static CURLcode error_unencode_write(struct connectdata *conn,
contenc_writer *writer,
const char *buf, size_t nbytes)
{
char *all = Curl_all_content_encodings();
(void) writer;
(void) buf;
(void) nbytes;
if(!all)
return CURLE_OUT_OF_MEMORY;
failf(conn->data, "Unrecognized content encoding type. "
"libcurl understands %s content encodings.", all);
free(all);
return CURLE_BAD_CONTENT_ENCODING;
}
static void error_close_writer(struct connectdata *conn,
contenc_writer *writer)
{
(void) conn;
(void) writer;
}
static const content_encoding error_encoding = {
NULL,
NULL,
error_init_writer,
error_unencode_write,
error_close_writer,
0
};
/* Create an unencoding writer stage using the given handler. */
static contenc_writer *new_unencoding_writer(struct connectdata *conn,
const content_encoding *handler,
contenc_writer *downstream)
{
size_t sz = offsetof(contenc_writer, params) + handler->paramsize;
contenc_writer *writer = (contenc_writer *) calloc(1, sz);
if(writer) {
writer->handler = handler;
writer->downstream = downstream;
if(handler->init_writer(conn, writer)) {
free(writer);
writer = NULL;
}
}
return writer;
}
/* Write data using an unencoding writer stack. */
CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer,
const char *buf, size_t nbytes)
{
if(!nbytes)
return CURLE_OK;
return writer->handler->unencode_write(conn, writer, buf, nbytes);
}
/* Close and clean-up the connection's writer stack. */
void Curl_unencode_cleanup(struct connectdata *conn)
{
struct Curl_easy *data = conn->data;
struct SingleRequest *k = &data->req;
contenc_writer *writer = k->writer_stack;
while(writer) {
k->writer_stack = writer->downstream;
writer->handler->close_writer(conn, writer);
free(writer);
writer = k->writer_stack;
}
}
/* Find the content encoding by name. */
static const content_encoding *find_encoding(const char *name, size_t len)
{
const content_encoding * const *cep;
for(cep = encodings; *cep; cep++) {
const content_encoding *ce = *cep;
if((strncasecompare(name, ce->name, len) && !ce->name[len]) ||
(ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len]))
return ce;
}
return NULL;
}
/* Set-up the unencoding stack from the Content-Encoding header value.
* See RFC 7231 section 3.1.2.2. */
CURLcode Curl_build_unencoding_stack(struct connectdata *conn,
const char *enclist, int maybechunked)
{
struct Curl_easy *data = conn->data;
struct SingleRequest *k = &data->req;
do {
const char *name;
size_t namelen;
/* Parse a single encoding name. */
while(ISSPACE(*enclist) || *enclist == ',')
enclist++;
name = enclist;
for(namelen = 0; *enclist && *enclist != ','; enclist++)
if(!ISSPACE(*enclist))
namelen = enclist - name + 1;
/* Special case: chunked encoding is handled at the reader level. */
if(maybechunked && namelen == 7 && strncasecompare(name, "chunked", 7)) {
k->chunk = TRUE; /* chunks coming our way. */
Curl_httpchunk_init(conn); /* init our chunky engine. */
}
else if(namelen) {
const content_encoding *encoding = find_encoding(name, namelen);
contenc_writer *writer;
if(!k->writer_stack) {
k->writer_stack = new_unencoding_writer(conn, &client_encoding, NULL);
if(!k->writer_stack)
return CURLE_OUT_OF_MEMORY;
}
if(!encoding)
encoding = &error_encoding; /* Defer error at stack use. */
/* Stack the unencoding stage. */
writer = new_unencoding_writer(conn, encoding, k->writer_stack);
if(!writer)
return CURLE_OUT_OF_MEMORY;
k->writer_stack = writer;
}
} while(*enclist);
return CURLE_OK;
}
#else
/* Stubs for builds without HTTP. */
CURLcode Curl_build_unencoding_stack(struct connectdata *conn,
const char *enclist, int maybechunked)
{
(void) conn;
(void) enclist;
(void) maybechunked;
return CURLE_NOT_BUILT_IN;
}
CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer,
const char *buf, size_t nbytes)
{
(void) conn;
(void) writer;
(void) buf;
(void) nbytes;
return CURLE_NOT_BUILT_IN;
}
void Curl_unencode_cleanup(struct connectdata *conn)
{
(void) conn;
}
char *Curl_all_content_encodings(void)
{
return strdup(CONTENT_ENCODING_DEFAULT); /* Satisfy caller. */
}
#endif /* CURL_DISABLE_HTTP */
| {
"pile_set_name": "Github"
} |
/*
===========================================================================
Doom 3 GPL Source Code
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code").
Doom 3 Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#pragma once
class DialogAFConstraintFixed;
class DialogAFConstraintBallAndSocket;
class DialogAFConstraintUniversal;
class DialogAFConstraintHinge;
class DialogAFConstraintSlider;
class DialogAFConstraintSpring;
// DialogAFConstraint dialog
class DialogAFConstraint : public CDialog {
DECLARE_DYNAMIC(DialogAFConstraint)
public:
DialogAFConstraint( CWnd* pParent = NULL ); // standard constructor
virtual ~DialogAFConstraint();
void LoadFile( idDeclAF *af );
void SaveFile( void );
void LoadConstraint( const char *name );
void SaveConstraint( void );
void UpdateFile( void );
enum { IDD = IDD_DIALOG_AF_CONSTRAINT };
protected:
virtual BOOL OnInitDialog();
virtual void DoDataExchange( CDataExchange* pDX ); // DDX/DDV support
virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;
afx_msg BOOL OnToolTipNotify( UINT id, NMHDR *pNMHDR, LRESULT *pResult );
afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnCbnSelchangeComboConstraints();
afx_msg void OnBnClickedButtonNewconstraint();
afx_msg void OnBnClickedButtonRenameconstraint();
afx_msg void OnBnClickedButtonDeleteconstraint();
afx_msg void OnCbnSelchangeComboConstraintType();
afx_msg void OnCbnSelchangeComboConstraintBody1();
afx_msg void OnCbnSelchangeComboConstraintBody2();
afx_msg void OnEnChangeEditConstraintFriction();
afx_msg void OnDeltaposSpinConstraintFriction(NMHDR *pNMHDR, LRESULT *pResult);
DECLARE_MESSAGE_MAP()
private:
idDeclAF * file;
idDeclAF_Constraint*constraint;
CDialog * constraintDlg;
DialogAFConstraintFixed *fixedDlg;
DialogAFConstraintBallAndSocket *ballAndSocketDlg;
DialogAFConstraintUniversal *universalDlg;
DialogAFConstraintHinge *hingeDlg;
DialogAFConstraintSlider *sliderDlg;
DialogAFConstraintSpring *springDlg;
//{{AFX_DATA(DialogAFConstraint)
CComboBox m_comboConstraintList; // list with constraints
CComboBox m_comboConstraintType;
CComboBox m_comboBody1List;
CComboBox m_comboBody2List;
float m_friction;
//}}AFX_DATA
static toolTip_t toolTips[];
private:
void InitConstraintList( void );
void InitConstraintTypeDlg( void );
void InitBodyLists( void );
void InitNewRenameDeleteButtons( void );
};
| {
"pile_set_name": "Github"
} |
.variables {
width: 14cm;
}
.variables {
height: 24px;
color: #888888;
font-family: "Trebuchet MS", Verdana, sans-serif;
quotes: "~" "~";
}
.redefinition {
three: 3;
}
.values {
font-family: 'Trebuchet', 'Trebuchet', 'Trebuchet';
color: #888888 !important;
url: url('Trebuchet');
multi: something 'A', B, C, 'Trebuchet';
}
| {
"pile_set_name": "Github"
} |
%function GetImglistForCaffe()
data_folder = '../VOC2012/ImageSets/Segmentation';
save_folder = '~/workspace/caffe-dev/examples/segnet';
img_prefix = '/JPEGImages/';
img_postfix = '.jpg';
seg_prefix = '/SegmentationClassAug/';
seg_postfix = '.png';
fn = {'VOC2012_test.txt', ...
'VOC2012_train.txt', ...
'VOC2012_val.txt', ...
'VOC2012_train_aug.txt', ...
'VOC2012_trainval_aug.txt'};
for i = 1 : numel(fn)
list = GetList(fullfile(data_folder, fn{i}));
imglist = AppendPrefixPostfix(list, img_prefix, img_postfix);
seglist = AppendPrefixPostfix(list, seg_prefix, seg_postfix);
assert(numel(imglist) == numel(seglist));
fid = fopen(fullfile(save_folder, fn{i}), 'w');
for j = 1 : numel(imglist)
fprintf(fid, '%s %s\n', imglist{j}, seglist{j});
end
fclose(fid);
end
| {
"pile_set_name": "Github"
} |
require('../modules/es6.parse-float');
module.exports = require('../modules/_core').parseFloat; | {
"pile_set_name": "Github"
} |
// Packages
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import Switch from 'react-router-dom/es/Switch';
import { Provider } from 'react-redux';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Cookies from 'universal-cookie';
// DO not register a SW for now
// import registerServiceWorker from './registerServiceWorker';
// Components
import SkillRollBack from './components/SkillRollBack/SkillRollBack';
import MuiThemeProviderNext from '@material-ui/core/styles/MuiThemeProvider';
import { theme } from './MUItheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import Snackbar from 'material-ui/Snackbar';
import NotFound from './components/NotFound/NotFound.react';
import Admin from './components/Admin/Admin';
import Dashboard from './components/Dashboard/Dashboard';
import BrowseSkill from './components/BrowseSkill/BrowseSkill';
import SkillListing from './components/SkillPage/SkillListing';
import Logout from './components/Auth/Logout.react';
import SkillCreator from './components/SkillCreator/SkillCreator';
import SkillVersion from './components/SkillVersion/SkillVersion';
import SkillHistory from './components/SkillHistory/SkillHistory';
import SkillFeedbackPage from './components/SkillFeedbackPage/SkillFeedbackPage';
import BotBuilderWrap from './components/BotBuilder/BotBuilderWrap';
import setDefaults from './DefaultSettings';
import BrowseSkillByCategory from './components/BrowseSkill/BrowseSkillByCategory';
import BrowseSkillByLanguage from './components/BrowseSkill/BrowseSkillByLanguage';
import { colors, isProduction } from './utils';
import Login from './components/Auth/Login/Login';
import ForgotPassword from './components/Auth/ForgotPassword/ForgotPassword';
import SignUp from './components/Auth/SignUp/SignUp';
import store from './store';
import appActions from './redux/actions/app';
import uiActions from './redux/actions/ui';
import { listUserSettings } from './api/index';
setDefaults();
const cookies = new Cookies();
const cookieDomain = isProduction() ? '.susi.ai' : '';
const muiTheme = getMuiTheme({
appBar: {
color: colors.primary,
},
checkbox: {
checkedColor: colors.primary,
},
stepper: {
iconColor: colors.primary,
},
radioButton: {
backgroundColor: '#ffffff',
borderColor: colors.primary,
checkedColor: colors.primary,
},
raisedButton: {
primaryColor: colors.primary,
primaryTextColor: '#ffffff',
textColor: '#ffffff',
},
flatButton: {
color: '#FFFFFF',
primaryTextColor: colors.primary,
textColor: colors.primary,
},
});
class App extends React.Component {
static propTypes = {
getApiKeys: PropTypes.func,
actions: PropTypes.object,
accessToken: PropTypes.string,
snackBarProps: PropTypes.object,
};
componentDidMount = () => {
const { actions, accessToken } = this.props;
actions.getApiKeys();
accessToken && actions.getAdmin();
accessToken &&
listUserSettings()
.then(payload => {
let userName = '';
if (payload.settings && payload.settings.userName) {
userName = payload.settings.userName;
}
cookies.set('username', userName, {
path: '/',
domain: cookieDomain,
});
})
.catch(error => {});
window.addEventListener('offline', this.onUserOffline);
window.addEventListener('online', this.onUserOnline);
};
componentWillUnmount = () => {
window.addEventListener('offline', this.onUserOffline);
window.addEventListener('online', this.onUserOnline);
};
onUserOffline = () => {
const { actions } = this.props;
actions.openSnackBar({
snackBarMessage: 'It seems you are offline!',
snackBarDuration: 4000,
});
};
onUserOnline = () => {
const { actions } = this.props;
actions.openSnackBar({
snackBarMessage: 'Welcome back!',
snackBarDuration: 4000,
});
};
render() {
const {
actions,
snackBarProps: { snackBarMessage },
snackBarProps: { isSnackBarOpen },
snackBarProps: { snackBarDuration },
} = this.props;
return (
<Router>
<MuiThemeProviderNext theme={theme}>
<MuiThemeProvider muiTheme={muiTheme}>
<div>
<Snackbar
open={isSnackBarOpen}
message={snackBarMessage}
autoHideDuration={snackBarDuration}
onRequestClose={actions.closeSnackBar}
/>
<Login />
<SignUp />
<ForgotPassword />
<Switch>
<Route
exact
path="/:category/:skill/edit/:lang"
component={SkillCreator}
/>
<Route
exact
path="/:category/:skill/edit/:lang/:commit"
component={SkillCreator}
/>
<Route path="/admin" component={Admin} />
<Route
exact
path="/:category/:skill/:lang"
component={SkillListing}
/>
<Route
exact
path="/:category/:skill/:lang/feedbacks"
component={SkillFeedbackPage}
/>
<Route path="/botbuilder" component={BotBuilderWrap} />
<Route exact path="/dashboard" component={Dashboard} />
<Route exact path="/logout" component={Logout} />
<Route exact path="/skillCreator" component={SkillCreator} />
<Route
exact
path="/:category/:skill/versions/:lang"
component={SkillVersion}
/>
<Route
exact
path="/:category/:skill/compare/:lang/:oldid/:recentid"
component={SkillHistory}
/>
<Route
exact
path="/:category/:skill/edit/:lang/:latestid/:revertid"
component={SkillRollBack}
/>
<Route
exact
path="/category/:category"
component={BrowseSkillByCategory}
/>
<Route
exact
path="/language/:language"
component={BrowseSkillByLanguage}
/>
<Route
exact
path="/"
render={routeProps => <BrowseSkill {...routeProps} />}
/>
<Route exact path="*" component={NotFound} />
</Switch>
</div>
</MuiThemeProvider>
</MuiThemeProviderNext>
</Router>
);
}
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({ ...appActions, ...uiActions }, dispatch),
};
}
function mapStateToProps(store) {
return {
...store.ui,
...store.app,
};
}
const ConnectedApp = connect(
mapStateToProps,
mapDispatchToProps,
)(App);
ReactDOM.render(
<Provider store={store} key="provider">
<ConnectedApp />
</Provider>,
document.getElementById('root'),
);
| {
"pile_set_name": "Github"
} |
package main
/*
This has moved to https://github.com/stretchr/gomniauth/tree/master/example/goweb
*/
| {
"pile_set_name": "Github"
} |
.translator=Rıdvan Ağar
a.help=Yardım
a.language=Türkçe
a.lynxNotSupported=Web tarayıcınız HTML Frames'i desteklemiyor. Frames (ve Javascript) desteği gerekli.
a.password=Şifre
a.remoteConnectionsDisabled=Başka bilgisayarlardan, veri tabanına bağlanma izni henüz ayarlanmamış ('webAllowOthers').
a.title=H2 Konsolu
a.tools=Araçlar
a.user=Kullanıcı adı
admin.executing=Aktif
admin.ip=IP
admin.lastAccess=Son bağlantı
admin.lastQuery=Son komut
admin.no=#no
admin.notConnected=#not connected
admin.url=URL
admin.yes=#yes
adminAllow=İzin verilen bağlantılar
adminConnection=Bağlantı güvenliği
adminHttp=Şifrelenmemiş HTTP bağlantıları
adminHttps=Şifrelenmiş HTTP bağlantıları
adminLocal=Sadece yerel bağlantılara izin ver
adminLogin=Yönetim girişi
adminLoginCancel=İptal et
adminLoginOk=Tamam
adminLogout=Bitir
adminOthers=Başka bilgisayarlardan, veri tabanına bağlanma izni ver
adminPort=Port
adminPortWeb=Web-Server Port
adminRestart=Değişiklikler veri tabanı hizmetçisinin yeniden başlatılmasıyla etkinlik kazanacak.
adminSave=Kaydet
adminSessions=Aktif bağlantılar
adminShutdown=Kapat
adminTitle=H2 Konsol ayarları
adminTranslateHelp=H2 Kullanıcı arayüzünü (H2 Konsol) dilinize çevirin yada çeviriyi düzeltin.
adminTranslateStart=Çeviri
helpAction=Aksiyon
helpAddAnotherRow=Yeni bir satır ekle
helpAddDrivers=Veritabanı sürücüsü ekle
helpAddDriversText=Yeni veri tabanı sürücüleri eklemek için, sürücü dosyalarının yerini H2DRIVERS yada CLASSPATH çevre değişkenlerine ekleyebilirsiniz. Örnek (Windows): Sürücü dosyası C:/Programs/hsqldb/lib/hsqldb.jar ise H2DRIVERS değişkenini C:/Programs/hsqldb/lib/hsqldb.jar olarak girin.
helpAddRow=Veri tabanına yeni bir satır ekler
helpCommandHistory=Komut tarihçesini gösterir
helpCreateTable=Veri tabanına yeni bir tabela ekler
helpDeleteRow=Tabeladan satırı siler
helpDisconnect=Veri tabanı bağlantısını keser
helpDisplayThis=Bu yardım sayfasını gösterir
helpDropTable=Var ise, istenen tabelayı siler
helpExecuteCurrent=Girilen SQL komutunu icra eder
helpExecuteSelected=#Executes the SQL statement defined by the text selection
helpIcon=Şalter
helpImportantCommands=Önemli komutlar
helpOperations=İşlemler
helpQuery=Tabela içeriğini gösterir
helpSampleSQL=Örnek SQL
helpStatements=SQL komutları
helpUpdate=Bir tabeladaki belli bir satır içeriğini değiştirir
helpWithColumnsIdName=Colon isimleriyle birlikte
key.alt=#Alt
key.ctrl=#Ctrl
key.enter=#Enter
key.shift=#Shift
key.space=#Space
login.connect=Bağlan
login.driverClass=Veri tabanı sürücü sınıfı
login.driverNotFound=İstenilen veri tabanı sürücüsü bulunamadı<br />Sürücü ekleme konusunda bilgi için Yardım'a başvurunuz
login.goAdmin=Seçenekler
login.jdbcUrl=JDBC URL
login.language=Dil
login.login=Giriş
login.remove=Sil
login.save=Kaydet
login.savedSetting=Kayıtlı ayarlar
login.settingName=Ayar adı
login.testConnection=Bağlantıyı test et
login.testSuccessful=Test başarılı
login.welcome=H2 Konsolu
result.1row=1 dizi
result.autoCommitOff=Auto-Commit kapatıldı
result.autoCommitOn=Auto-Commit açıldı
result.bytes=#bytes
result.characters=#characters
result.maxrowsSet=Maximum dizi sayısı ayarı yapıldı
result.noRows=Hiç bir bilgi yok
result.noRunningStatement=Şu an bir komut icra ediliyor
result.rows=Dizi
result.statementWasCanceled=Komut iptal edildi
result.updateCount=Güncelleşterilen dizi sayısı
resultEdit.action=Aksiyon
resultEdit.add=Ekle
resultEdit.cancel=İptal
resultEdit.delete=Sil
resultEdit.edit=Değiştir
resultEdit.editResult=Değiştir
resultEdit.save=Kaydet
toolbar.all=Hepsi
toolbar.autoCommit=Auto-Commit
toolbar.autoComplete=Auto-Complete
toolbar.autoComplete.full=Hepsi
toolbar.autoComplete.normal=Normal
toolbar.autoComplete.off=Kapalı
toolbar.autoSelect=#Auto select
toolbar.autoSelect.off=Kapalı
toolbar.autoSelect.on=#On
toolbar.cancelStatement=Yürütülen işlemi iptal et
toolbar.clear=Temizle
toolbar.commit=Degişiklikleri kaydet
toolbar.disconnect=Bağlantıyı kes
toolbar.history=Verilmiş olan komutlar
toolbar.maxRows=Maximum dizi sayısı
toolbar.refresh=Güncelleştir
toolbar.rollback=Değişiklikleri geri al
toolbar.run=İşlemi yürüt
toolbar.runSelected=#Run Selected
toolbar.sqlStatement=SQL komutu
tools.backup=Yedekle
tools.backup.help=Bir veritabanının yedeklemesini yapar.
tools.changeFileEncryption=DosyaKodla
tools.changeFileEncryption.help=Veritabanının dosya kodlama şifresi ve türünü belirler.
tools.cipher=Şifreleme türü (AES yada XTEA)
tools.commandLine=Komut
tools.convertTraceFile=TraceDosyasiDönüştür
tools.convertTraceFile.help=Verilen bir trace.db dosyasını Java uygulamasına ve SQL-Betiğe çevirir.
tools.createCluster=KümeYarat
tools.createCluster.help=Bağımsız bir veritabanından bir küme (Cluster) yaratır.
tools.databaseName=Veritabanının adı
tools.decryptionPassword=Kod çözme şifresi
tools.deleteDbFiles=VeritabanıDosyalarınıSil
tools.deleteDbFiles.help=Bir veritabanına ait bütün dosyaları siler.
tools.directory=Dizelge
tools.encryptionPassword=Kodlama şifresi
tools.javaDirectoryClassName=Java dizelge ve sınıf adı
tools.recover=Kurtar
tools.recover.help=Bozuk bir veritabanının kurtarılmasına yardımcı olur.
tools.restore=YenidenY???#252kle
tools.restore.help=Bir veritabanının yedeklemesini yeniden yükler.
tools.result=Sonuç
tools.run=İşlemi yürüt
tools.runScript=BetikÇalıştır
tools.runScript.help=Bir betik dosyası çalıştırır.
tools.script=Betik
tools.script.help=Bir veritabanının yedekleme yada taşıma amaçlı SQL-Betiğe çevrilmesini sağlar
tools.scriptFileName=Betik dosya adı
tools.serverList=Hizmetçi listesi
tools.sourceDatabaseName=Kaynak veritabanının adı
tools.sourceDatabaseURL=Kaynak veritabanının URL'u
tools.sourceDirectory=Kaynak dizelge
tools.sourceFileName=Kaynak dosya adı
tools.sourceScriptFileName=Kaynak betik dosya adı
tools.targetDatabaseName=Hedef veritabanının adı
tools.targetDatabaseURL=Hedef veritabanının URL'u
tools.targetDirectory=Hedef dizelge
tools.targetFileName=Hedef dosya adı
tools.targetScriptFileName=Hedef betik dosya adı
tools.traceFileName=Trace dosya adı
tree.admin=Yönetici
tree.current=Güncel değer
tree.hashed=Hash tabanlı
tree.increment=Artır
tree.indexes=Indexler
tree.nonUnique=eşsiz değil
tree.sequences=Dizinler
tree.unique=Eşsiz
tree.users=Kullanıcı
| {
"pile_set_name": "Github"
} |
T-Toets voor Onafhankelijke Steekproeven
==========================
Met de t-toets voor onafhankelijke steekproeven kan de gebruiker de effectgrootte schatten en de nulhypothese dat steekproefgemiddelden van twee onafhankelijke steekproeven gelijk zijn toetsen.
### Assumpties
- De afhankelijke variabele is continu.
- De data van beide groepen komen uit een aselecte steekproef uit de populatie.
- De afhankelijke variabele is normaal verdeeld in beide populaties.
- De populatie varianties in beide groepen zijn homogeen.
### Invoer
-------
#### Invoerveld
- Variabelen: In deze box wordt de afhankelijke variabele geselecteerd.
- Groeperende Variabele: In deze box wordt de variabele die de groepen definieert geselecteerd.
#### Toetsen
- Student: De student t-toets. Dit is de standaardoptie.
- Welch: Welch's t-toets.
- Mann-Whitney: Mann-Whitney test.
#### Alt. Hypothese
- Groep 1 ≠ Groep 2: Tweezijdige alternatieve hypothese dat de populatiegemiddelden gelijk zijn. Dit is de standaardoptie.
- Groep 1 ≠ Groep 2: Eenzijdige alternatieve hypothese dat het populatiegemiddelde van groep 1 groter is dan het populatiegemiddelde van groep 2.
- Groep 1 ≠ Groep 2: Eenzijdige alternatieve hypothese dat het populatiegemiddelde van groep 1 kleiner is dan het populatiegemiddelde van groep 2.
#### Verificatie van aannames
- Normaliteit: Shapiro-Wilk toets voor normaliteit.
- Gelijkheid van varianties: Levene's test voor homogeniteit van varianties.
#### Aanvullende Statistieken
- Locatieparameter: Voor de Student's t-toets en Welch's T-toets wordt de locatieparameter gegeven met het gemiddelde verschil; voor de Mann-Whitney test wordt de locatieparameter gegeven met de Hodges-Lehmann schatting.
- Betrouwbaarheidsinterval: Betrouwbaarheidsinterval voor de locatieparameter. De standaardoptie is 95%. Dit kan naar het gewenste percentage worden aangepast.
- Effectgrootte: Bij de Student t-toets en de Welch t-toets kan de effectgrootte hier beneden worden geselecteerd. Voor de Mann-Whitney wordt de effectgrootte gegeven met de rank biserial correlatie.
- Cohen's d: Bij de Student t-toets gebruikt deze de samengenomen standaarddeviatie om het gemiddelde verschil de standaardiseren. Voor de Welch's t-toets wordt de vierkantswortel van de gemiddelde variantie gebruikt om het gemiddelde verschil te standaardiseren.
- Glass's delta: Gebruikt de standaarddeviatie van groep 2 om het gemiddelde verschil te standaardiseren. Om aan te passen welke groep wordt gebruikt als groep 2, kunt u de volgorde van de niveaus aanpassen door op de naam van de groeperende variabele te klikken in het data scherm. Klik op een van de niveaus en klik dan op de pijltjes om de volgorde aan te passen.
- Hedges' g: Past een corrigerende factor toe op Cohen's d tegen bias.
- Betrouwbaarheidsinterval: Betrouwbaarheidsinterval voor de effectgrootte gebaseerd op een niet-centrale t-verdeling voor Cohen's d, Glass' delta en Hedges' g, en de normaal benadering van de Fisher getransformeerde rank biseriële correlatie.
- Beschrijvend: Steekproef grootte, steekproefgemiddelde, steekproef standaarddeviatie, standaardfout van het gemiddelde voor iedere groep.
- Beschrijvende grafieken: Geeft het steekproefgemiddelde en de betrouwbaarheidsinterval weer voor iedere groep.
- Betrouwbaarheidsinterval: De betrouwbaarheidsintervallen worden weergegeven in percentages. De standaardoptie is 95%. Dit kan naar het gewenste percentage worden aangepast.
- Vovk-Sellke Maximum *p*-Ratio: De grens 1/(-e *p* log(*p*)) wordt afgeleid van de vorm van de verdeling van de *p*-waarde. Onder de nulhypothese (H<sub>0</sub>) is het uniform(0,1), en onder de alternatieve (H<sub>1</sub>) neemt hij af in *p*, bijv., een beta(α, 1) vergelijking, waarin 0 < α < 1. The Vovk-Sellke MPR wordt verkregen door de vorm van α van de verdeling onder H<sub>1</sub> zodat de verkregen *p*-waarde *maximaal diagnostisch* is. De waarde is dan de ratio van de dichtheid op punt *p* onder H<sub>0</sub> en H<sub>1</sub>. Bijvoorbeeld, als de tweezijdige *p*-waarde gelijk is aan .05, dan is de Vovk-Sellke MPR gelijk aan 2.46, wat aangeeft dat deze *p*-waarde op zijn hoogst 2.46 keer meer kans heeft om voor te komen onder H<sub>1</sub> dan onder H<sub>0</sub>.
#### Ontbrekende Waarden
- Het uitsluiten van waarnemingen, analyse voor analyse: Wanneer er meerdere t-toetsen in een analyse zitten, wordt elke test uitgevoerd met alle waarnemingen die valide data bevatten voor de afhankelijke variabele in de t-toets. De steekproefgroottes kunnen daardoor verschillen per toets. Dit is de standaardoptie.
- Het lijstgewijze uitsluiten van waarnemingen: Wanneer er meerdere t-toetsen in een analyse zitten, wordt elke t-toets uitgevoerd met enkel de waarnemingen die valide data voor alle afhankelijke variabelen bevatten. De steekproefgrootte is daardoor hetzelfde over alle toetsen.
### Uitvoer
-------
#### T-Toets voor Onafhankelijke Steekproeven
- De eerste kolom bevat de variabelen waarvoor de analyse is uitgevoerd.
- Toets: Het type toets dat is geselecteerd. Als er maar een toets is geselecteerd wordt deze kolom niet weergegeven. In dit geval geeft de tabel alleen de resultaten van de geselecteerde toets weer.
- t: De waarde van de t-waarde.
- W: De toets statistiek van de Wilcoxon toets. Deze wordt berekend door de rangordes van de eerste groep op te tellen (dezelfde procedure als door R wordt gebruikt).
- vg: Vrijheidsgraden.
- p: De p-waarde.
- Gemiddelde verschil: Gemiddeld verschil tussen de steekproefgemiddelden. Deze kolom heet alleen 'Gemiddelde verschil' wanneer de toets `Student` of `Welch` is geselecteerd. Wanneer de toets `Mann-Whitney` is geselecteerd, heet deze kolom 'Locatieparameter'.
- Locatieparameter: Voor de Student's t-toets en Welch's t-toets is de locatieparameter gegeven in verschil in gemiddelde; voor de Mann-Whitney toets wordt de locatieparameter gegeven met de Hodges-Lehmann schatting. Deze kolom heet alleen 'Locatieparameter' wanneer de `Mann-Whitney` t-toets is geselecteerd. Deze kolom heet in alle andere gevallen 'Gemiddelde verschil'.
- Std. Fout Verschil: De standaardfout van het gemiddelde van de verschilscores. Dit wordt alleen weergegeven voor Student's t-toets en Welch's t-toets.
- % BI voor gemiddeld verschil/locatieparameter: Het betrouwbaarheidsinterval voor het gemiddeld verschil/de locatieparameter van de verschilscores. De standaardoptie is 95%.
- Onder: De ondergrens van het betrouwbaarheidsinterval.
- Boven: De bovengrens van het betrouwbaarheidsinterval.
- Effectgrootte: Voor de Student t-toets en de Welch t-toets wordt de effectgrootte gegeven met Cohen's d/Glass' delta/Hedges' g; Voor de Mann-Whitney test wordt de effectgrootte gegeven met de gematchte rank biseriële correlatie.
- % BI voor effectgrootte: Het betrouwbaarheidsinterval voor de effectgrootte. De standaardoptie is 95%.
- Onder: De ondergrens van het betrouwbaarheidsinterval.
- Boven: De bovengrens van het betrouwbaarheidsinterval.
#### Verificatie van aannames
Toets voor normaliteit (Shapiro-Wilk)
- De eerste kolom bevat de afhankelijke variabele.
- De tweede kolom bevat alle niveaus van de groeperende variabele.
- W: De waarde van de W toets statistiek.
- p: De p-waarde.
Variantiegelijkheid toets (Levene's):
- De eerste kolom bevat de afhankelijke variabele.
- F: De waarde van de F-statistiek.
- vg: De vrijheidsgraden.
- p: De p-waarde.
#### Beschrijvende Statistiek
- De eerste kolom bevat de afhankelijke variabele.
- Groep: De niveaus van de groeperende variabele.
- N: De steekproefgrootte per groep.
- Gemiddelde: Het gemiddelde van de afhankelijke variabele per groep.
- SD: Standaarddeviatie van het gemiddelde.
- Std. Fout: Standaardfout van het gemiddelde.
#### Beschrijvende Grafieken
- Geeft het steekproefgemiddelde weer (black bullet), de % betrouwbaarheidsinterval (whiskers) voor iedere groep, de x-as geeft de groeperende variabele weer, en de y-as de afhankelijke variabele.
### Referenties
-------
- Moore, D. S., McCabe, G. P., & Craig, B. A. (2012). *Introduction to the practice of statistics (7th ed.)*. New York, NY: W. H. Freeman and Company.
- Sellke, T., Bayarri, M. J., & Berger, J. O. (2001). Calibration of *p* values for testing precise null hypotheses. *The American Statistician, 55*(1), 62-71.
- Whitlock, M. C., & Schluter, D. (2015). *The analysis of biological data (2nd ed.)*. Greenwood Village, Colorado: Roberts and Company Publishers.
### R-packages
---
- stats
- car
- MBESS
### Voorbeeld
---
- Voor een voorbeeld, ga naar `Open`--> `Data Library` --> `T-Tests` --> `Directed Reading Activities`.
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in
* the LICENSE file in the root directory of this source tree. An
* additional grant of patent rights can be found in the PATENTS file
* in the same directory.
*
*/
#pragma once
#include "util.h"
#include <sys/types.h>
#include <sys/un.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <sys/socket.h>
struct sockaddr_un;
struct addr {
socklen_t size;
union {
struct sockaddr addr;
struct sockaddr_un addr_un;
struct sockaddr_in addr_in;
struct sockaddr_in6 addr_in6;
};
};
struct addr* make_addr_unix_filesystem(const char* pathname);
struct addr* make_addr_unix_abstract(const void* bytes, size_t nr);
struct addr* make_addr_unix_abstract_s(const char* name);
char* describe_addr(const struct addr* addr);
// N.B. IO signals not unmasked during this call.
// Use xgetaddrinfo_interruptible to make a getaddrinfo call that we
// can reliably interrupt.
struct addrinfo* xgetaddrinfo(const char* node,
const char* service,
const struct addrinfo* hints);
struct addrinfo* xgetaddrinfo_interruptible(
const char* node,
const char* service,
const struct addrinfo* hints);
struct addr* addrinfo2addr(const struct addrinfo* ai);
void xconnect(int fd, const struct addr* addr);
void xlisten(int fd, int backlog);
void xbind(int fd, const struct addr* addr);
void xsetsockopt(int fd, int level, int opname,
void* optval, socklen_t optlen);
void str2gaiargs(const char* inp, char** node, char** service);
// Allocate a socket. The returned file descriptor is owned by the
// current reslist.
int xsocket(int domain, int type, int protocol);
// Accept a connection. The returned file descriptor is owned by the
// current reslist.
int xaccept(int server_socket);
// Returns -1 on EAGAIN/EWOULDBLOCK
int xaccept_nonblock(int server_socket);
// Allocate a socket pair. The returned file descriptors are owned by
// the current reslist.
void xsocketpair(int domain, int type, int protocol,
int* s1, int* s2);
// Like xsocketpair, but give FD ownership to the caller, not the
// current reslist.
void xsocketpairnc(int domain, int type, int protocol, int sv[2]);
void disable_tcp_nagle(int fd);
void xshutdown(int socketfd, int how);
#ifdef SO_PEERCRED
struct ucred get_peer_credentials(int socketfd);
#endif
| {
"pile_set_name": "Github"
} |
! Copyright (C) 2013 Jon Harper.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors tools.test furnace.auth.basic http.server
http.server.responses kernel http namespaces ;
IN: furnace.auth.basic.tests
CONSTANT: GET-AUTH "Basic Zm9vOmJhcg=="
{ "foo" "bar" } [ GET-AUTH parse-basic-auth ] unit-test
{ t } [ [ <request> "GET" >>method init-request
"path" <304> <trivial-responder> "name" <basic-auth-realm>
call-responder* >boolean
] with-scope ] unit-test
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved.
// Use of this source code is governed by a MIT license found in the LICENSE file.
package codec
import (
"math"
"reflect"
)
const (
cborMajorUint byte = iota
cborMajorNegInt
cborMajorBytes
cborMajorText
cborMajorArray
cborMajorMap
cborMajorTag
cborMajorOther
)
const (
cborBdFalse byte = 0xf4 + iota
cborBdTrue
cborBdNil
cborBdUndefined
cborBdExt
cborBdFloat16
cborBdFloat32
cborBdFloat64
)
const (
cborBdIndefiniteBytes byte = 0x5f
cborBdIndefiniteString = 0x7f
cborBdIndefiniteArray = 0x9f
cborBdIndefiniteMap = 0xbf
cborBdBreak = 0xff
)
const (
CborStreamBytes byte = 0x5f
CborStreamString = 0x7f
CborStreamArray = 0x9f
CborStreamMap = 0xbf
CborStreamBreak = 0xff
)
const (
cborBaseUint byte = 0x00
cborBaseNegInt = 0x20
cborBaseBytes = 0x40
cborBaseString = 0x60
cborBaseArray = 0x80
cborBaseMap = 0xa0
cborBaseTag = 0xc0
cborBaseSimple = 0xe0
)
// -------------------
type cborEncDriver struct {
noBuiltInTypes
encNoSeparator
e *Encoder
w encWriter
h *CborHandle
x [8]byte
}
func (e *cborEncDriver) EncodeNil() {
e.w.writen1(cborBdNil)
}
func (e *cborEncDriver) EncodeBool(b bool) {
if b {
e.w.writen1(cborBdTrue)
} else {
e.w.writen1(cborBdFalse)
}
}
func (e *cborEncDriver) EncodeFloat32(f float32) {
e.w.writen1(cborBdFloat32)
bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f))
}
func (e *cborEncDriver) EncodeFloat64(f float64) {
e.w.writen1(cborBdFloat64)
bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f))
}
func (e *cborEncDriver) encUint(v uint64, bd byte) {
if v <= 0x17 {
e.w.writen1(byte(v) + bd)
} else if v <= math.MaxUint8 {
e.w.writen2(bd+0x18, uint8(v))
} else if v <= math.MaxUint16 {
e.w.writen1(bd + 0x19)
bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v))
} else if v <= math.MaxUint32 {
e.w.writen1(bd + 0x1a)
bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v))
} else { // if v <= math.MaxUint64 {
e.w.writen1(bd + 0x1b)
bigenHelper{e.x[:8], e.w}.writeUint64(v)
}
}
func (e *cborEncDriver) EncodeInt(v int64) {
if v < 0 {
e.encUint(uint64(-1-v), cborBaseNegInt)
} else {
e.encUint(uint64(v), cborBaseUint)
}
}
func (e *cborEncDriver) EncodeUint(v uint64) {
e.encUint(v, cborBaseUint)
}
func (e *cborEncDriver) encLen(bd byte, length int) {
e.encUint(uint64(length), bd)
}
func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) {
e.encUint(uint64(xtag), cborBaseTag)
if v := ext.ConvertExt(rv); v == nil {
e.EncodeNil()
} else {
en.encode(v)
}
}
func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) {
e.encUint(uint64(re.Tag), cborBaseTag)
if re.Data != nil {
en.encode(re.Data)
} else if re.Value == nil {
e.EncodeNil()
} else {
en.encode(re.Value)
}
}
func (e *cborEncDriver) EncodeArrayStart(length int) {
e.encLen(cborBaseArray, length)
}
func (e *cborEncDriver) EncodeMapStart(length int) {
e.encLen(cborBaseMap, length)
}
func (e *cborEncDriver) EncodeString(c charEncoding, v string) {
e.encLen(cborBaseString, len(v))
e.w.writestr(v)
}
func (e *cborEncDriver) EncodeSymbol(v string) {
e.EncodeString(c_UTF8, v)
}
func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) {
if c == c_RAW {
e.encLen(cborBaseBytes, len(v))
} else {
e.encLen(cborBaseString, len(v))
}
e.w.writeb(v)
}
// ----------------------
type cborDecDriver struct {
d *Decoder
h *CborHandle
r decReader
b [scratchByteArrayLen]byte
br bool // bytes reader
bdRead bool
bd byte
noBuiltInTypes
decNoSeparator
}
func (d *cborDecDriver) readNextBd() {
d.bd = d.r.readn1()
d.bdRead = true
}
func (d *cborDecDriver) uncacheRead() {
if d.bdRead {
d.r.unreadn1()
d.bdRead = false
}
}
func (d *cborDecDriver) ContainerType() (vt valueType) {
if d.bd == cborBdNil {
return valueTypeNil
} else if d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) {
return valueTypeBytes
} else if d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) {
return valueTypeString
} else if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) {
return valueTypeArray
} else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) {
return valueTypeMap
} else {
// d.d.errorf("isContainerType: unsupported parameter: %v", vt)
}
return valueTypeUnset
}
func (d *cborDecDriver) TryDecodeAsNil() bool {
if !d.bdRead {
d.readNextBd()
}
// treat Nil and Undefined as nil values
if d.bd == cborBdNil || d.bd == cborBdUndefined {
d.bdRead = false
return true
}
return false
}
func (d *cborDecDriver) CheckBreak() bool {
if !d.bdRead {
d.readNextBd()
}
if d.bd == cborBdBreak {
d.bdRead = false
return true
}
return false
}
func (d *cborDecDriver) decUint() (ui uint64) {
v := d.bd & 0x1f
if v <= 0x17 {
ui = uint64(v)
} else {
if v == 0x18 {
ui = uint64(d.r.readn1())
} else if v == 0x19 {
ui = uint64(bigen.Uint16(d.r.readx(2)))
} else if v == 0x1a {
ui = uint64(bigen.Uint32(d.r.readx(4)))
} else if v == 0x1b {
ui = uint64(bigen.Uint64(d.r.readx(8)))
} else {
d.d.errorf("decUint: Invalid descriptor: %v", d.bd)
return
}
}
return
}
func (d *cborDecDriver) decCheckInteger() (neg bool) {
if !d.bdRead {
d.readNextBd()
}
major := d.bd >> 5
if major == cborMajorUint {
} else if major == cborMajorNegInt {
neg = true
} else {
d.d.errorf("invalid major: %v (bd: %v)", major, d.bd)
return
}
return
}
func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) {
neg := d.decCheckInteger()
ui := d.decUint()
// check if this number can be converted to an int without overflow
var overflow bool
if neg {
if i, overflow = chkOvf.SignedInt(ui + 1); overflow {
d.d.errorf("cbor: overflow converting %v to signed integer", ui+1)
return
}
i = -i
} else {
if i, overflow = chkOvf.SignedInt(ui); overflow {
d.d.errorf("cbor: overflow converting %v to signed integer", ui)
return
}
}
if chkOvf.Int(i, bitsize) {
d.d.errorf("cbor: overflow integer: %v", i)
return
}
d.bdRead = false
return
}
func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) {
if d.decCheckInteger() {
d.d.errorf("Assigning negative signed value to unsigned type")
return
}
ui = d.decUint()
if chkOvf.Uint(ui, bitsize) {
d.d.errorf("cbor: overflow integer: %v", ui)
return
}
d.bdRead = false
return
}
func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) {
if !d.bdRead {
d.readNextBd()
}
if bd := d.bd; bd == cborBdFloat16 {
f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2)))))
} else if bd == cborBdFloat32 {
f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4))))
} else if bd == cborBdFloat64 {
f = math.Float64frombits(bigen.Uint64(d.r.readx(8)))
} else if bd >= cborBaseUint && bd < cborBaseBytes {
f = float64(d.DecodeInt(64))
} else {
d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd)
return
}
if chkOverflow32 && chkOvf.Float32(f) {
d.d.errorf("cbor: float32 overflow: %v", f)
return
}
d.bdRead = false
return
}
// bool can be decoded from bool only (single byte).
func (d *cborDecDriver) DecodeBool() (b bool) {
if !d.bdRead {
d.readNextBd()
}
if bd := d.bd; bd == cborBdTrue {
b = true
} else if bd == cborBdFalse {
} else {
d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd)
return
}
d.bdRead = false
return
}
func (d *cborDecDriver) ReadMapStart() (length int) {
d.bdRead = false
if d.bd == cborBdIndefiniteMap {
return -1
}
return d.decLen()
}
func (d *cborDecDriver) ReadArrayStart() (length int) {
d.bdRead = false
if d.bd == cborBdIndefiniteArray {
return -1
}
return d.decLen()
}
func (d *cborDecDriver) decLen() int {
return int(d.decUint())
}
func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte {
d.bdRead = false
for {
if d.CheckBreak() {
break
}
if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText {
d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd)
return nil
}
n := d.decLen()
oldLen := len(bs)
newLen := oldLen + n
if newLen > cap(bs) {
bs2 := make([]byte, newLen, 2*cap(bs)+n)
copy(bs2, bs)
bs = bs2
} else {
bs = bs[:newLen]
}
d.r.readb(bs[oldLen:newLen])
// bs = append(bs, d.r.readn()...)
d.bdRead = false
}
d.bdRead = false
return bs
}
func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
if !d.bdRead {
d.readNextBd()
}
if d.bd == cborBdNil || d.bd == cborBdUndefined {
d.bdRead = false
return nil
}
if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString {
if bs == nil {
return d.decAppendIndefiniteBytes(nil)
}
return d.decAppendIndefiniteBytes(bs[:0])
}
clen := d.decLen()
d.bdRead = false
if zerocopy {
if d.br {
return d.r.readx(clen)
} else if len(bs) == 0 {
bs = d.b[:]
}
}
return decByteSlice(d.r, clen, bs)
}
func (d *cborDecDriver) DecodeString() (s string) {
return string(d.DecodeBytes(d.b[:], true, true))
}
func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) {
if !d.bdRead {
d.readNextBd()
}
u := d.decUint()
d.bdRead = false
realxtag = u
if ext == nil {
re := rv.(*RawExt)
re.Tag = realxtag
d.d.decode(&re.Value)
} else if xtag != realxtag {
d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag)
return
} else {
var v interface{}
d.d.decode(&v)
ext.UpdateExt(rv, v)
}
d.bdRead = false
return
}
func (d *cborDecDriver) DecodeNaked() {
if !d.bdRead {
d.readNextBd()
}
n := &d.d.n
var decodeFurther bool
switch d.bd {
case cborBdNil:
n.v = valueTypeNil
case cborBdFalse:
n.v = valueTypeBool
n.b = false
case cborBdTrue:
n.v = valueTypeBool
n.b = true
case cborBdFloat16, cborBdFloat32:
n.v = valueTypeFloat
n.f = d.DecodeFloat(true)
case cborBdFloat64:
n.v = valueTypeFloat
n.f = d.DecodeFloat(false)
case cborBdIndefiniteBytes:
n.v = valueTypeBytes
n.l = d.DecodeBytes(nil, false, false)
case cborBdIndefiniteString:
n.v = valueTypeString
n.s = d.DecodeString()
case cborBdIndefiniteArray:
n.v = valueTypeArray
decodeFurther = true
case cborBdIndefiniteMap:
n.v = valueTypeMap
decodeFurther = true
default:
switch {
case d.bd >= cborBaseUint && d.bd < cborBaseNegInt:
if d.h.SignedInteger {
n.v = valueTypeInt
n.i = d.DecodeInt(64)
} else {
n.v = valueTypeUint
n.u = d.DecodeUint(64)
}
case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes:
n.v = valueTypeInt
n.i = d.DecodeInt(64)
case d.bd >= cborBaseBytes && d.bd < cborBaseString:
n.v = valueTypeBytes
n.l = d.DecodeBytes(nil, false, false)
case d.bd >= cborBaseString && d.bd < cborBaseArray:
n.v = valueTypeString
n.s = d.DecodeString()
case d.bd >= cborBaseArray && d.bd < cborBaseMap:
n.v = valueTypeArray
decodeFurther = true
case d.bd >= cborBaseMap && d.bd < cborBaseTag:
n.v = valueTypeMap
decodeFurther = true
case d.bd >= cborBaseTag && d.bd < cborBaseSimple:
n.v = valueTypeExt
n.u = d.decUint()
n.l = nil
// d.bdRead = false
// d.d.decode(&re.Value) // handled by decode itself.
// decodeFurther = true
default:
d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd)
return
}
}
if !decodeFurther {
d.bdRead = false
}
return
}
// -------------------------
// CborHandle is a Handle for the CBOR encoding format,
// defined at http://tools.ietf.org/html/rfc7049 and documented further at http://cbor.io .
//
// CBOR is comprehensively supported, including support for:
// - indefinite-length arrays/maps/bytes/strings
// - (extension) tags in range 0..0xffff (0 .. 65535)
// - half, single and double-precision floats
// - all numbers (1, 2, 4 and 8-byte signed and unsigned integers)
// - nil, true, false, ...
// - arrays and maps, bytes and text strings
//
// None of the optional extensions (with tags) defined in the spec are supported out-of-the-box.
// Users can implement them as needed (using SetExt), including spec-documented ones:
// - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc.
//
// To encode with indefinite lengths (streaming), users will use
// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants.
//
// For example, to encode "one-byte" as an indefinite length string:
// var buf bytes.Buffer
// e := NewEncoder(&buf, new(CborHandle))
// buf.WriteByte(CborStreamString)
// e.MustEncode("one-")
// e.MustEncode("byte")
// buf.WriteByte(CborStreamBreak)
// encodedBytes := buf.Bytes()
// var vv interface{}
// NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv)
// // Now, vv contains the same string "one-byte"
//
type CborHandle struct {
binaryEncodingType
BasicHandle
}
func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
return h.SetExt(rt, tag, &setExtWrapper{i: ext})
}
func (h *CborHandle) newEncDriver(e *Encoder) encDriver {
return &cborEncDriver{e: e, w: e.w, h: h}
}
func (h *CborHandle) newDecDriver(d *Decoder) decDriver {
return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes}
}
func (e *cborEncDriver) reset() {
e.w = e.e.w
}
func (d *cborDecDriver) reset() {
d.r = d.d.r
d.bd, d.bdRead = 0, false
}
var _ decDriver = (*cborDecDriver)(nil)
var _ encDriver = (*cborEncDriver)(nil)
| {
"pile_set_name": "Github"
} |
namespace TerraViewer.Callibration
{
partial class ProjectorView
{
/// <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 Component 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.SuspendLayout();
//
// ProjectorView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "ProjectorView";
this.Size = new System.Drawing.Size(253, 163);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.ProjectorView_Paint);
this.ResumeLayout(false);
}
#endregion
}
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yii message/extract' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE: this file must be saved in UTF-8 encoding.
*/
return [
'Language' => '언어',
'Welcome to %appName%' => '%appName%에 오신 것을 환영합니다.',
'<strong>Following</strong> user' => '',
'<strong>Member</strong> in these spaces' => '',
'<strong>User</strong> followers' => '',
'<strong>User</strong> tags' => '',
'Allows access to your about page with personal information' => '',
'Auth Mode' => '',
'Basic Settings' => '',
'Change Email' => '',
'Change Password' => '',
'Change Username' => '',
'Confirm new password' => '',
'Connect account' => '',
'Connected Accounts' => '',
'Connected accounts' => '',
'Created at' => '',
'Created by' => '',
'Current Password' => '',
'Currently in use' => '',
'Default Space' => '',
'Delete' => '',
'Delete Account' => '',
'Description' => '',
'Disconnect account' => '',
'E-Mail is already in use! - Try forgot password.' => '',
'Email' => '',
'Follow' => '',
'General' => '',
'Here you can connect to external service provider for using external services like a single sign on authentication.' => '',
'Last Login' => '',
'Manager' => '',
'Missing E-Mail Attribute from AuthClient.' => '',
'Missing ID AuthClient Attribute from AuthClient.' => '',
'Modules' => '',
'My Account' => '',
'Name' => '',
'New password' => '',
'No users found.' => '',
'Notifications' => '',
'Password' => '',
'Permission' => '',
'Profile' => '',
'Profile posts only' => '',
'Register now and participate!' => '',
'Security' => '',
'Settings' => '',
'Show At Directory' => '',
'Show At Registration' => '',
'Show all content' => '',
'Sign in' => '',
'Sign in / up' => '',
'Sign up' => '',
'Sign up now' => '',
'Sort order' => '',
'Source' => '',
'Space ID' => '',
'Status' => '',
'Tags' => '',
'Unfollow' => '',
'Unknown user status!' => '',
'Updated at' => '',
'Updated by' => '',
'User' => '',
'User has been invited.' => '',
'User with the same email already exists but isn\'t linked to you. Login using your email first to link it.' => '',
'Username' => '',
'Username contains invalid characters.' => '',
'View your about page' => '',
'Visibility' => '',
'Welcome to %appName%. Please click on the button below to proceed with your registration.' => '',
'You got an invite' => '',
'You\'re not registered.' => '',
'You\'ve been invited to join {space} on {appName}' => '',
'Your account is disabled!' => '',
'Your account is not approved yet!' => '',
'Your new password must not be equal your current password!' => '',
'invited you to join {name}.' => '',
'invited you to join {space} on {name}.' => '',
'or' => '',
];
| {
"pile_set_name": "Github"
} |
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.xdebugger;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.extensions.ExtensionPoint;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.HeavyPlatformTestCase;
import com.intellij.util.xmlb.annotations.Attribute;
import com.intellij.xdebugger.breakpoints.*;
import com.intellij.xdebugger.impl.breakpoints.XBreakpointManagerImpl;
import org.jetbrains.annotations.NotNull;
public abstract class XDebuggerTestCase extends HeavyPlatformTestCase {
public static final MyLineBreakpointType MY_LINE_BREAKPOINT_TYPE = new MyLineBreakpointType();
protected static final MySimpleBreakpointType MY_SIMPLE_BREAKPOINT_TYPE = new MySimpleBreakpointType();
@NotNull
static XBreakpoint<MyBreakpointProperties> addBreakpoint(XBreakpointManagerImpl breakpointManager, MyBreakpointProperties abc) {
return WriteAction.compute(() -> breakpointManager.addBreakpoint(MY_SIMPLE_BREAKPOINT_TYPE, abc));
}
@NotNull
static XLineBreakpoint<MyBreakpointProperties> addLineBreakpoint(XBreakpointManagerImpl breakpointManager,
String url,
int line,
MyBreakpointProperties properties) {
return WriteAction.compute(() -> breakpointManager.addLineBreakpoint(MY_LINE_BREAKPOINT_TYPE, url, line, properties));
}
static void removeBreakPoint(XBreakpointManagerImpl breakpointManager, XBreakpoint<?> breakpoint) {
WriteAction.run(() -> breakpointManager.removeBreakpoint(breakpoint));
}
@Override
protected void initApplication() throws Exception {
super.initApplication();
final ExtensionPoint<XBreakpointType> point = XBreakpointType.EXTENSION_POINT_NAME.getPoint();
point.registerExtension(MY_LINE_BREAKPOINT_TYPE, getTestRootDisposable());
point.registerExtension(MY_SIMPLE_BREAKPOINT_TYPE, getTestRootDisposable());
}
public static class MyLineBreakpointType extends XLineBreakpointType<MyBreakpointProperties> {
public MyLineBreakpointType() {
super("testLine", "239");
}
@Override
public MyBreakpointProperties createBreakpointProperties(@NotNull final VirtualFile file, final int line) {
return null;
}
@Override
public MyBreakpointProperties createProperties() {
return new MyBreakpointProperties();
}
}
public static class MySimpleBreakpointType extends XBreakpointType<XBreakpoint<MyBreakpointProperties>,MyBreakpointProperties> {
public MySimpleBreakpointType() {
super("test", "239");
}
@Override
public String getDisplayText(final XBreakpoint<MyBreakpointProperties> breakpoint) {
return "";
}
@Override
public MyBreakpointProperties createProperties() {
return new MyBreakpointProperties();
}
@Override
public XBreakpoint<MyBreakpointProperties> createDefaultBreakpoint(@NotNull XBreakpointCreator<MyBreakpointProperties> creator) {
final XBreakpoint<MyBreakpointProperties> breakpoint = creator.createBreakpoint(new MyBreakpointProperties("default"));
breakpoint.setEnabled(true);
return breakpoint;
}
}
protected static class MyBreakpointProperties extends XBreakpointProperties<MyBreakpointProperties> {
@Attribute("option")
public String myOption;
public MyBreakpointProperties() {
}
public MyBreakpointProperties(final String option) {
myOption = option;
}
@Override
public MyBreakpointProperties getState() {
return this;
}
@Override
public void loadState(@NotNull final MyBreakpointProperties state) {
myOption = state.myOption;
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* QEMU USB API
*
* Copyright (c) 2005 Fabrice Bellard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu-queue.h"
/* Constants related to the USB / PCI interaction */
#define USB_SBRN 0x60 /* Serial Bus Release Number Register */
#define USB_RELEASE_1 0x10 /* USB 1.0 */
#define USB_RELEASE_2 0x20 /* USB 2.0 */
#define USB_RELEASE_3 0x30 /* USB 3.0 */
#define USB_TOKEN_SETUP 0x2d
#define USB_TOKEN_IN 0x69 /* device -> host */
#define USB_TOKEN_OUT 0xe1 /* host -> device */
/* specific usb messages, also sent in the 'pid' parameter */
#define USB_MSG_ATTACH 0x100
#define USB_MSG_DETACH 0x101
#define USB_MSG_RESET 0x102
#define USB_RET_NODEV (-1)
#define USB_RET_NAK (-2)
#define USB_RET_STALL (-3)
#define USB_RET_BABBLE (-4)
#define USB_RET_ASYNC (-5)
#define USB_SPEED_LOW 0
#define USB_SPEED_FULL 1
#define USB_SPEED_HIGH 2
#define USB_SPEED_SUPER 3
#define USB_SPEED_MASK_LOW (1 << USB_SPEED_LOW)
#define USB_SPEED_MASK_FULL (1 << USB_SPEED_FULL)
#define USB_SPEED_MASK_HIGH (1 << USB_SPEED_HIGH)
#define USB_SPEED_MASK_SUPER (1 << USB_SPEED_SUPER)
#define USB_STATE_NOTATTACHED 0
#define USB_STATE_ATTACHED 1
//#define USB_STATE_POWERED 2
#define USB_STATE_DEFAULT 3
//#define USB_STATE_ADDRESS 4
//#define USB_STATE_CONFIGURED 5
#define USB_STATE_SUSPENDED 6
#define USB_CLASS_AUDIO 1
#define USB_CLASS_COMM 2
#define USB_CLASS_HID 3
#define USB_CLASS_PHYSICAL 5
#define USB_CLASS_STILL_IMAGE 6
#define USB_CLASS_PRINTER 7
#define USB_CLASS_MASS_STORAGE 8
#define USB_CLASS_HUB 9
#define USB_CLASS_CDC_DATA 0x0a
#define USB_CLASS_CSCID 0x0b
#define USB_CLASS_CONTENT_SEC 0x0d
#define USB_CLASS_APP_SPEC 0xfe
#define USB_CLASS_VENDOR_SPEC 0xff
#define USB_DIR_OUT 0
#define USB_DIR_IN 0x80
#define USB_TYPE_MASK (0x03 << 5)
#define USB_TYPE_STANDARD (0x00 << 5)
#define USB_TYPE_CLASS (0x01 << 5)
#define USB_TYPE_VENDOR (0x02 << 5)
#define USB_TYPE_RESERVED (0x03 << 5)
#define USB_RECIP_MASK 0x1f
#define USB_RECIP_DEVICE 0x00
#define USB_RECIP_INTERFACE 0x01
#define USB_RECIP_ENDPOINT 0x02
#define USB_RECIP_OTHER 0x03
#define DeviceRequest ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8)
#define DeviceOutRequest ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8)
#define InterfaceRequest \
((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
#define InterfaceOutRequest \
((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
#define EndpointRequest ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8)
#define EndpointOutRequest \
((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8)
#define ClassInterfaceRequest \
((USB_DIR_IN|USB_TYPE_CLASS|USB_RECIP_INTERFACE)<<8)
#define ClassInterfaceOutRequest \
((USB_DIR_OUT|USB_TYPE_CLASS|USB_RECIP_INTERFACE)<<8)
#define USB_REQ_GET_STATUS 0x00
#define USB_REQ_CLEAR_FEATURE 0x01
#define USB_REQ_SET_FEATURE 0x03
#define USB_REQ_SET_ADDRESS 0x05
#define USB_REQ_GET_DESCRIPTOR 0x06
#define USB_REQ_SET_DESCRIPTOR 0x07
#define USB_REQ_GET_CONFIGURATION 0x08
#define USB_REQ_SET_CONFIGURATION 0x09
#define USB_REQ_GET_INTERFACE 0x0A
#define USB_REQ_SET_INTERFACE 0x0B
#define USB_REQ_SYNCH_FRAME 0x0C
#define USB_DEVICE_SELF_POWERED 0
#define USB_DEVICE_REMOTE_WAKEUP 1
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_DEVICE_QUALIFIER 0x06
#define USB_DT_OTHER_SPEED_CONFIG 0x07
#define USB_DT_DEBUG 0x0A
#define USB_DT_INTERFACE_ASSOC 0x0B
#define USB_ENDPOINT_XFER_CONTROL 0
#define USB_ENDPOINT_XFER_ISOC 1
#define USB_ENDPOINT_XFER_BULK 2
#define USB_ENDPOINT_XFER_INT 3
typedef struct USBBus USBBus;
typedef struct USBBusOps USBBusOps;
typedef struct USBPort USBPort;
typedef struct USBDevice USBDevice;
typedef struct USBDeviceInfo USBDeviceInfo;
typedef struct USBPacket USBPacket;
typedef struct USBDesc USBDesc;
typedef struct USBDescID USBDescID;
typedef struct USBDescDevice USBDescDevice;
typedef struct USBDescConfig USBDescConfig;
typedef struct USBDescIfaceAssoc USBDescIfaceAssoc;
typedef struct USBDescIface USBDescIface;
typedef struct USBDescEndpoint USBDescEndpoint;
typedef struct USBDescOther USBDescOther;
typedef struct USBDescString USBDescString;
struct USBDescString {
uint8_t index;
char *str;
QLIST_ENTRY(USBDescString) next;
};
/* definition of a USB device */
struct USBDevice {
//DeviceState qdev;
USBDeviceInfo *info;
USBPort *port;
char *port_path;
void *opaque;
/* Actual connected speed */
int speed;
/* Supported speeds, not in info because it may be variable (hostdevs) */
int speedmask;
uint8_t addr;
char product_desc[32];
int auto_attach;
int attached;
int32_t state;
uint8_t setup_buf[8];
uint8_t data_buf[4096];
int32_t remote_wakeup;
int32_t setup_state;
int32_t setup_len;
int32_t setup_index;
QLIST_HEAD(, USBDescString) strings;
const USBDescDevice *device;
const USBDescConfig *config;
};
struct USBDeviceInfo {
//DeviceInfo qdev;
int (*init)(USBDevice *dev);
/*
* Process USB packet.
* Called by the HC (Host Controller).
*
* Returns length of the transaction
* or one of the USB_RET_XXX codes.
*/
int (*handle_packet)(USBDevice *dev, USBPacket *p);
/*
* Called when a packet is canceled.
*/
void (*cancel_packet)(USBDevice *dev, USBPacket *p);
/*
* Called when device is destroyed.
*/
void (*handle_destroy)(USBDevice *dev);
/*
* Attach the device
*/
void (*handle_attach)(USBDevice *dev);
/*
* Reset the device
*/
void (*handle_reset)(USBDevice *dev);
/*
* Process control request.
* Called from handle_packet().
*
* Returns length or one of the USB_RET_ codes.
*/
int (*handle_control)(USBDevice *dev, USBPacket *p, int request, int value,
int index, int length, uint8_t *data);
/*
* Process data transfers (both BULK and ISOC).
* Called from handle_packet().
*
* Returns length or one of the USB_RET_ codes.
*/
int (*handle_data)(USBDevice *dev, USBPacket *p);
const char *product_desc;
const USBDesc *usb_desc;
/* handle legacy -usbdevice command line options */
const char *usbdevice_name;
USBDevice *(*usbdevice_init)(const char *params);
};
typedef struct USBPortOps {
void (*attach)(USBPort *port);
void (*detach)(USBPort *port);
/*
* This gets called when a device downstream from the device attached to
* the port (iow attached through a hub) gets detached.
*/
void (*child_detach)(USBPort *port, USBDevice *child);
void (*wakeup)(USBPort *port);
/*
* Note that port->dev will be different then the device from which
* the packet originated when a hub is involved, if you want the orginating
* device use p->owner
*/
void (*complete)(USBPort *port, USBPacket *p);
} USBPortOps;
/* USB port on which a device can be connected */
struct USBPort {
USBDevice *dev;
int speedmask;
char path[16];
USBPortOps *ops;
void *opaque;
int index; /* internal port index, may be used with the opaque */
QTAILQ_ENTRY(USBPort) next;
};
typedef void USBCallback(USBPacket * packet, void *opaque);
/* Structure used to hold information about an active USB packet. */
struct USBPacket {
/* Data fields for use by the driver. */
int pid;
uint8_t devaddr;
uint8_t devep;
uint8_t *data;
int len;
/* Internal use by the USB layer. */
USBDevice *owner;
};
int usb_handle_packet(USBDevice *dev, USBPacket *p);
void usb_packet_complete(USBDevice *dev, USBPacket *p);
void usb_cancel_packet(USBPacket * p);
void usb_attach(USBPort *port, USBDevice *dev);
void usb_wakeup(USBDevice *dev);
int usb_generic_handle_packet(USBDevice *s, USBPacket *p);
void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p);
int set_usb_string(uint8_t *buf, const char *str);
void usb_send_msg(USBDevice *dev, int msg);
/* usb-linux.c */
//USBDevice *usb_host_device_open(const char *devname);
//int usb_host_device_close(const char *devname);
//void usb_host_info(Monitor *mon);
/* usb-hid.c */
void usb_hid_datain_cb(USBDevice *dev, void *opaque, void (*datain)(void *));
/* usb-bt.c */
//USBDevice *usb_bt_init(HCIInfo *hci);
/* usb ports of the VM */
#define VM_USB_HUB_SIZE 8
/* usb-musb.c */
enum musb_irq_source_e {
musb_irq_suspend = 0,
musb_irq_resume,
musb_irq_rst_babble,
musb_irq_sof,
musb_irq_connect,
musb_irq_disconnect,
musb_irq_vbus_request,
musb_irq_vbus_error,
musb_irq_rx,
musb_irq_tx,
musb_set_vbus,
musb_set_session,
__musb_irq_max,
};
typedef struct MUSBState MUSBState;
//MUSBState *musb_init(qemu_irq *irqs);
uint32_t musb_core_intr_get(MUSBState *s);
void musb_core_intr_clear(MUSBState *s, uint32_t mask);
void musb_set_size(MUSBState *s, int epnum, int size, int is_tx);
/* usb-bus.c */
struct USBBus {
//BusState qbus;
USBBusOps *ops;
int busnr;
int nfree;
int nused;
QTAILQ_HEAD(, USBPort) free;
QTAILQ_HEAD(, USBPort) used;
QTAILQ_ENTRY(USBBus) next;
};
struct USBBusOps {
int (*register_companion)(USBBus *bus, USBPort *ports[],
uint32_t portcount, uint32_t firstport);
};
//void usb_bus_new(USBBus *bus, USBBusOps *ops, DeviceState *host);
USBBus *usb_bus_find(int busnr);
void usb_qdev_register(USBDeviceInfo *info);
void usb_qdev_register_many(USBDeviceInfo *info);
USBDevice *usb_create(USBBus *bus, const char *name);
USBDevice *usb_create_simple(USBBus *bus, const char *name);
USBDevice *usbdevice_create(const char *cmdline);
void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
USBPortOps *ops, int speedmask);
int usb_register_companion(const char *masterbus, USBPort *ports[],
uint32_t portcount, uint32_t firstport,
void *opaque, USBPortOps *ops, int speedmask);
void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr);
void usb_unregister_port(USBBus *bus, USBPort *port);
int usb_device_attach(USBDevice *dev);
int usb_device_detach(USBDevice *dev);
int usb_device_delete_addr(int busnr, int addr);
//
//static inline USBBus *usb_bus_from_device(USBDevice *d)
//{
// return DO_UPCAST(USBBus, qbus, d->qdev.parent_bus);
//}
USBDevice *usb_keyboard_init(void);
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2006-2007 Erin Catto http://www.box2d.org
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
#include "Render.h"
#include "Test.h"
#include "glui/glui.h"
#include <cstdio>
using namespace std;
namespace
{
int32 testIndex = 0;
int32 testSelection = 0;
int32 testCount = 0;
TestEntry* entry;
Test* test;
Settings settings;
int32 width = 640;
int32 height = 480;
int32 framePeriod = 16;
int32 mainWindow;
float settingsHz = 60.0;
GLUI *glui;
float32 viewZoom = 1.0f;
int tx, ty, tw, th;
bool rMouseDown;
b2Vec2 lastp;
}
static void Resize(int32 w, int32 h)
{
width = w;
height = h;
GLUI_Master.get_viewport_area(&tx, &ty, &tw, &th);
glViewport(tx, ty, tw, th);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
float32 ratio = float32(tw) / float32(th);
b2Vec2 extents(ratio * 25.0f, 25.0f);
extents *= viewZoom;
b2Vec2 lower = settings.viewCenter - extents;
b2Vec2 upper = settings.viewCenter + extents;
// L/R/B/T
gluOrtho2D(lower.x, upper.x, lower.y, upper.y);
}
static b2Vec2 ConvertScreenToWorld(int32 x, int32 y)
{
float32 u = x / float32(tw);
float32 v = (th - y) / float32(th);
float32 ratio = float32(tw) / float32(th);
b2Vec2 extents(ratio * 25.0f, 25.0f);
extents *= viewZoom;
b2Vec2 lower = settings.viewCenter - extents;
b2Vec2 upper = settings.viewCenter + extents;
b2Vec2 p;
p.x = (1.0f - u) * lower.x + u * upper.x;
p.y = (1.0f - v) * lower.y + v * upper.y;
return p;
}
// This is used to control the frame rate (60Hz).
static void Timer(int)
{
glutSetWindow(mainWindow);
glutPostRedisplay();
glutTimerFunc(framePeriod, Timer, 0);
}
static void SimulationLoop()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
test->SetTextLine(30);
b2Vec2 oldCenter = settings.viewCenter;
settings.hz = settingsHz;
test->Step(&settings);
if (oldCenter.x != settings.viewCenter.x || oldCenter.y != settings.viewCenter.y)
{
Resize(width, height);
}
test->DrawTitle(5, 15, entry->name);
glutSwapBuffers();
if (testSelection != testIndex)
{
testIndex = testSelection;
delete test;
entry = g_testEntries + testIndex;
test = entry->createFcn();
viewZoom = 1.0f;
settings.viewCenter.Set(0.0f, 20.0f);
Resize(width, height);
}
}
static void Keyboard(unsigned char key, int x, int y)
{
B2_NOT_USED(x);
B2_NOT_USED(y);
switch (key)
{
case 27:
#ifndef __APPLE__
// freeglut specific function
glutLeaveMainLoop();
#endif
exit(0);
break;
// Press 'z' to zoom out.
case 'z':
viewZoom = b2Min(1.1f * viewZoom, 20.0f);
Resize(width, height);
break;
// Press 'x' to zoom in.
case 'x':
viewZoom = b2Max(0.9f * viewZoom, 0.02f);
Resize(width, height);
break;
// Press 'r' to reset.
case 'r':
delete test;
test = entry->createFcn();
break;
// Press space to launch a bomb.
case ' ':
if (test)
{
test->LaunchBomb();
}
break;
case 'p':
settings.pause = !settings.pause;
break;
// Press [ to prev test.
case '[':
--testSelection;
if (testSelection < 0)
{
testSelection = testCount - 1;
}
glui->sync_live();
break;
// Press ] to next test.
case ']':
++testSelection;
if (testSelection == testCount)
{
testSelection = 0;
}
glui->sync_live();
break;
default:
if (test)
{
test->Keyboard(key);
}
}
}
static void KeyboardSpecial(int key, int x, int y)
{
B2_NOT_USED(x);
B2_NOT_USED(y);
switch (key)
{
case GLUT_ACTIVE_SHIFT:
// Press left to pan left.
case GLUT_KEY_LEFT:
settings.viewCenter.x -= 0.5f;
Resize(width, height);
break;
// Press right to pan right.
case GLUT_KEY_RIGHT:
settings.viewCenter.x += 0.5f;
Resize(width, height);
break;
// Press down to pan down.
case GLUT_KEY_DOWN:
settings.viewCenter.y -= 0.5f;
Resize(width, height);
break;
// Press up to pan up.
case GLUT_KEY_UP:
settings.viewCenter.y += 0.5f;
Resize(width, height);
break;
// Press home to reset the view.
case GLUT_KEY_HOME:
viewZoom = 1.0f;
settings.viewCenter.Set(0.0f, 20.0f);
Resize(width, height);
break;
}
}
static void KeyboardUp(unsigned char key, int x, int y)
{
B2_NOT_USED(x);
B2_NOT_USED(y);
if (test)
{
test->KeyboardUp(key);
}
}
static void Mouse(int32 button, int32 state, int32 x, int32 y)
{
// Use the mouse to move things around.
if (button == GLUT_LEFT_BUTTON)
{
int mod = glutGetModifiers();
b2Vec2 p = ConvertScreenToWorld(x, y);
if (state == GLUT_DOWN)
{
b2Vec2 p = ConvertScreenToWorld(x, y);
if (mod == GLUT_ACTIVE_SHIFT)
{
test->ShiftMouseDown(p);
}
else
{
test->MouseDown(p);
}
}
if (state == GLUT_UP)
{
test->MouseUp(p);
}
}
else if (button == GLUT_RIGHT_BUTTON)
{
if (state == GLUT_DOWN)
{
lastp = ConvertScreenToWorld(x, y);
rMouseDown = true;
}
if (state == GLUT_UP)
{
rMouseDown = false;
}
}
}
static void MouseMotion(int32 x, int32 y)
{
b2Vec2 p = ConvertScreenToWorld(x, y);
test->MouseMove(p);
if (rMouseDown)
{
b2Vec2 diff = p - lastp;
settings.viewCenter.x -= diff.x;
settings.viewCenter.y -= diff.y;
Resize(width, height);
lastp = ConvertScreenToWorld(x, y);
}
}
static void MouseWheel(int wheel, int direction, int x, int y)
{
B2_NOT_USED(wheel);
B2_NOT_USED(x);
B2_NOT_USED(y);
if (direction > 0)
{
viewZoom /= 1.1f;
}
else
{
viewZoom *= 1.1f;
}
Resize(width, height);
}
static void Restart(int)
{
delete test;
entry = g_testEntries + testIndex;
test = entry->createFcn();
Resize(width, height);
}
static void Pause(int)
{
settings.pause = !settings.pause;
}
static void Exit(int code)
{
// TODO: freeglut is not building on OSX
#ifdef FREEGLUT
glutLeaveMainLoop();
#endif
exit(code);
}
static void SingleStep(int)
{
settings.pause = 1;
settings.singleStep = 1;
}
int main(int argc, char** argv)
{
testCount = 0;
while (g_testEntries[testCount].createFcn != NULL)
{
++testCount;
}
testIndex = b2Clamp(testIndex, 0, testCount-1);
testSelection = testIndex;
entry = g_testEntries + testIndex;
test = entry->createFcn();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
glutInitWindowSize(width, height);
char title[32];
sprintf(title, "Box2D Version %d.%d.%d", b2_version.major, b2_version.minor, b2_version.revision);
mainWindow = glutCreateWindow(title);
//glutSetOption (GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
glutDisplayFunc(SimulationLoop);
GLUI_Master.set_glutReshapeFunc(Resize);
GLUI_Master.set_glutKeyboardFunc(Keyboard);
GLUI_Master.set_glutSpecialFunc(KeyboardSpecial);
GLUI_Master.set_glutMouseFunc(Mouse);
#ifdef FREEGLUT
glutMouseWheelFunc(MouseWheel);
#endif
glutMotionFunc(MouseMotion);
glutKeyboardUpFunc(KeyboardUp);
glui = GLUI_Master.create_glui_subwindow( mainWindow,
GLUI_SUBWINDOW_RIGHT );
glui->add_statictext("Tests");
GLUI_Listbox* testList =
glui->add_listbox("", &testSelection);
glui->add_separator();
GLUI_Spinner* velocityIterationSpinner =
glui->add_spinner("Vel Iters", GLUI_SPINNER_INT, &settings.velocityIterations);
velocityIterationSpinner->set_int_limits(1, 500);
GLUI_Spinner* positionIterationSpinner =
glui->add_spinner("Pos Iters", GLUI_SPINNER_INT, &settings.positionIterations);
positionIterationSpinner->set_int_limits(0, 100);
GLUI_Spinner* hertzSpinner =
glui->add_spinner("Hertz", GLUI_SPINNER_FLOAT, &settingsHz);
hertzSpinner->set_float_limits(5.0f, 200.0f);
glui->add_checkbox("Warm Starting", &settings.enableWarmStarting);
glui->add_checkbox("Time of Impact", &settings.enableContinuous);
glui->add_checkbox("Sub-Stepping", &settings.enableSubStepping);
//glui->add_separator();
GLUI_Panel* drawPanel = glui->add_panel("Draw");
glui->add_checkbox_to_panel(drawPanel, "Shapes", &settings.drawShapes);
glui->add_checkbox_to_panel(drawPanel, "Joints", &settings.drawJoints);
glui->add_checkbox_to_panel(drawPanel, "AABBs", &settings.drawAABBs);
glui->add_checkbox_to_panel(drawPanel, "Pairs", &settings.drawPairs);
glui->add_checkbox_to_panel(drawPanel, "Contact Points", &settings.drawContactPoints);
glui->add_checkbox_to_panel(drawPanel, "Contact Normals", &settings.drawContactNormals);
glui->add_checkbox_to_panel(drawPanel, "Contact Forces", &settings.drawContactForces);
glui->add_checkbox_to_panel(drawPanel, "Friction Forces", &settings.drawFrictionForces);
glui->add_checkbox_to_panel(drawPanel, "Center of Masses", &settings.drawCOMs);
glui->add_checkbox_to_panel(drawPanel, "Statistics", &settings.drawStats);
glui->add_checkbox_to_panel(drawPanel, "Profile", &settings.drawProfile);
int32 testCount = 0;
TestEntry* e = g_testEntries;
while (e->createFcn)
{
testList->add_item(testCount, e->name);
++testCount;
++e;
}
glui->add_button("Pause", 0, Pause);
glui->add_button("Single Step", 0, SingleStep);
glui->add_button("Restart", 0, Restart);
glui->add_button("Quit", 0,(GLUI_Update_CB)Exit);
glui->set_main_gfx_window( mainWindow );
// Use a timer to control the frame rate.
glutTimerFunc(framePeriod, Timer, 0);
glutMainLoop();
return 0;
}
| {
"pile_set_name": "Github"
} |
json.id service.id
json.channel service.channel
json.on_post service.on_post
json.on_comment service.on_comment
json.type service.type
json.webhook_url service.webhook_url
json.name service.name
json.icon_name service.icon_name
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <algorithm>
#include <fstream>
#include <string>
#include <vector>
#include <sys/param.h>
#include <backtrace/BacktraceMap.h>
#include <gtest/gtest.h>
#include "art_field-inl.h"
#include "class_linker-inl.h"
#include "common_runtime_test.h"
#include "compiler_callbacks.h"
#include "dex2oat_environment_test.h"
#include "gc/space/image_space.h"
#include "mem_map.h"
#include "oat_file_assistant.h"
#include "oat_file_manager.h"
#include "os.h"
#include "scoped_thread_state_change.h"
#include "thread-inl.h"
#include "utils.h"
namespace art {
class OatFileAssistantTest : public Dex2oatEnvironmentTest {
public:
virtual void SetUp() OVERRIDE {
ReserveImageSpace();
Dex2oatEnvironmentTest::SetUp();
}
// Pre-Relocate the image to a known non-zero offset so we don't have to
// deal with the runtime randomly relocating the image by 0 and messing up
// the expected results of the tests.
bool PreRelocateImage(std::string* error_msg) {
std::string image;
if (!GetCachedImageFile(&image, error_msg)) {
return false;
}
std::string patchoat = GetAndroidRoot();
patchoat += kIsDebugBuild ? "/bin/patchoatd" : "/bin/patchoat";
std::vector<std::string> argv;
argv.push_back(patchoat);
argv.push_back("--input-image-location=" + GetImageLocation());
argv.push_back("--output-image-file=" + image);
argv.push_back("--instruction-set=" + std::string(GetInstructionSetString(kRuntimeISA)));
argv.push_back("--base-offset-delta=0x00008000");
return Exec(argv, error_msg);
}
virtual void PreRuntimeCreate() {
std::string error_msg;
ASSERT_TRUE(PreRelocateImage(&error_msg)) << error_msg;
UnreserveImageSpace();
}
virtual void PostRuntimeCreate() OVERRIDE {
ReserveImageSpace();
}
// Generate a non-PIC odex file for the purposes of test.
// The generated odex file will be un-relocated.
void GenerateOdexForTest(const std::string& dex_location,
const std::string& odex_location,
CompilerFilter::Filter filter,
bool pic = false,
bool with_patch_info = true) {
// Temporarily redirect the dalvik cache so dex2oat doesn't find the
// relocated image file.
std::string dalvik_cache = GetDalvikCache(GetInstructionSetString(kRuntimeISA));
std::string dalvik_cache_tmp = dalvik_cache + ".redirected";
ASSERT_EQ(0, rename(dalvik_cache.c_str(), dalvik_cache_tmp.c_str())) << strerror(errno);
std::vector<std::string> args;
args.push_back("--dex-file=" + dex_location);
args.push_back("--oat-file=" + odex_location);
args.push_back("--compiler-filter=" + CompilerFilter::NameOfFilter(filter));
args.push_back("--runtime-arg");
args.push_back("-Xnorelocate");
if (pic) {
args.push_back("--compile-pic");
}
if (with_patch_info) {
args.push_back("--include-patch-information");
}
std::string error_msg;
ASSERT_TRUE(OatFileAssistant::Dex2Oat(args, &error_msg)) << error_msg;
ASSERT_EQ(0, rename(dalvik_cache_tmp.c_str(), dalvik_cache.c_str())) << strerror(errno);
// Verify the odex file was generated as expected and really is
// unrelocated.
std::unique_ptr<OatFile> odex_file(OatFile::Open(odex_location.c_str(),
odex_location.c_str(),
nullptr,
nullptr,
false,
/*low_4gb*/false,
dex_location.c_str(),
&error_msg));
ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
EXPECT_EQ(pic, odex_file->IsPic());
EXPECT_EQ(with_patch_info, odex_file->HasPatchInfo());
EXPECT_EQ(filter, odex_file->GetCompilerFilter());
if (CompilerFilter::IsBytecodeCompilationEnabled(filter)) {
const std::vector<gc::space::ImageSpace*> image_spaces =
Runtime::Current()->GetHeap()->GetBootImageSpaces();
ASSERT_TRUE(!image_spaces.empty() && image_spaces[0] != nullptr);
const ImageHeader& image_header = image_spaces[0]->GetImageHeader();
const OatHeader& oat_header = odex_file->GetOatHeader();
uint32_t combined_checksum = OatFileAssistant::CalculateCombinedImageChecksum();
EXPECT_EQ(combined_checksum, oat_header.GetImageFileLocationOatChecksum());
EXPECT_NE(reinterpret_cast<uintptr_t>(image_header.GetOatDataBegin()),
oat_header.GetImageFileLocationOatDataBegin());
EXPECT_NE(image_header.GetPatchDelta(), oat_header.GetImagePatchDelta());
}
}
void GeneratePicOdexForTest(const std::string& dex_location,
const std::string& odex_location,
CompilerFilter::Filter filter) {
GenerateOdexForTest(dex_location, odex_location, filter, true, false);
}
// Generate a non-PIC odex file without patch information for the purposes
// of test. The generated odex file will be un-relocated.
void GenerateNoPatchOdexForTest(const std::string& dex_location,
const std::string& odex_location,
CompilerFilter::Filter filter) {
GenerateOdexForTest(dex_location, odex_location, filter, false, false);
}
private:
// Reserve memory around where the image will be loaded so other memory
// won't conflict when it comes time to load the image.
// This can be called with an already loaded image to reserve the space
// around it.
void ReserveImageSpace() {
MemMap::Init();
// Ensure a chunk of memory is reserved for the image space.
// The reservation_end includes room for the main space that has to come
// right after the image in case of the GSS collector.
uintptr_t reservation_start = ART_BASE_ADDRESS;
uintptr_t reservation_end = ART_BASE_ADDRESS + 384 * MB;
std::unique_ptr<BacktraceMap> map(BacktraceMap::Create(getpid(), true));
ASSERT_TRUE(map.get() != nullptr) << "Failed to build process map";
for (BacktraceMap::const_iterator it = map->begin();
reservation_start < reservation_end && it != map->end(); ++it) {
ReserveImageSpaceChunk(reservation_start, std::min(it->start, reservation_end));
reservation_start = std::max(reservation_start, it->end);
}
ReserveImageSpaceChunk(reservation_start, reservation_end);
}
// Reserve a chunk of memory for the image space in the given range.
// Only has effect for chunks with a positive number of bytes.
void ReserveImageSpaceChunk(uintptr_t start, uintptr_t end) {
if (start < end) {
std::string error_msg;
image_reservation_.push_back(std::unique_ptr<MemMap>(
MemMap::MapAnonymous("image reservation",
reinterpret_cast<uint8_t*>(start), end - start,
PROT_NONE, false, false, &error_msg)));
ASSERT_TRUE(image_reservation_.back().get() != nullptr) << error_msg;
LOG(INFO) << "Reserved space for image " <<
reinterpret_cast<void*>(image_reservation_.back()->Begin()) << "-" <<
reinterpret_cast<void*>(image_reservation_.back()->End());
}
}
// Unreserve any memory reserved by ReserveImageSpace. This should be called
// before the image is loaded.
void UnreserveImageSpace() {
image_reservation_.clear();
}
std::vector<std::unique_ptr<MemMap>> image_reservation_;
};
class OatFileAssistantNoDex2OatTest : public OatFileAssistantTest {
public:
virtual void SetUpRuntimeOptions(RuntimeOptions* options) {
OatFileAssistantTest::SetUpRuntimeOptions(options);
options->push_back(std::make_pair("-Xnodex2oat", nullptr));
}
};
// Generate an oat file for the purposes of test, as opposed to testing
// generation of oat files.
static void GenerateOatForTest(const char* dex_location, CompilerFilter::Filter filter) {
// Use an oat file assistant to find the proper oat location.
OatFileAssistant ofa(dex_location, kRuntimeISA, false, false);
const std::string* oat_location = ofa.OatFileName();
ASSERT_TRUE(oat_location != nullptr);
std::vector<std::string> args;
args.push_back("--dex-file=" + std::string(dex_location));
args.push_back("--oat-file=" + *oat_location);
args.push_back("--compiler-filter=" + CompilerFilter::NameOfFilter(filter));
args.push_back("--runtime-arg");
args.push_back("-Xnorelocate");
std::string error_msg;
ASSERT_TRUE(OatFileAssistant::Dex2Oat(args, &error_msg)) << error_msg;
// Verify the oat file was generated as expected.
std::unique_ptr<OatFile> oat_file(OatFile::Open(oat_location->c_str(),
oat_location->c_str(),
nullptr,
nullptr,
false,
/*low_4gb*/false,
dex_location,
&error_msg));
ASSERT_TRUE(oat_file.get() != nullptr) << error_msg;
EXPECT_EQ(filter, oat_file->GetCompilerFilter());
}
// Case: We have a DEX file, but no OAT file for it.
// Expect: The status is kDex2OatNeeded.
TEST_F(OatFileAssistantTest, DexNoOat) {
std::string dex_location = GetScratchDir() + "/DexNoOat.jar";
Copy(GetDexSrc1(), dex_location);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeedProfile));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_EQ(OatFileAssistant::kOatOutOfDate, oat_file_assistant.OdexFileStatus());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_EQ(OatFileAssistant::kOatOutOfDate, oat_file_assistant.OatFileStatus());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have no DEX file and no OAT file.
// Expect: Status is kNoDexOptNeeded. Loading should fail, but not crash.
TEST_F(OatFileAssistantTest, NoDexNoOat) {
std::string dex_location = GetScratchDir() + "/NoDexNoOat.jar";
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Trying to make the oat file up to date should not fail or crash.
std::string error_msg;
EXPECT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg));
// Trying to get the best oat file should fail, but not crash.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
EXPECT_EQ(nullptr, oat_file.get());
}
// Case: We have a DEX file and up-to-date OAT file for it.
// Expect: The status is kNoDexOptNeeded.
TEST_F(OatFileAssistantTest, OatUpToDate) {
std::string dex_location = GetScratchDir() + "/OatUpToDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kEverything));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_TRUE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_EQ(OatFileAssistant::kOatUpToDate, oat_file_assistant.OatFileStatus());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file and speed-profile OAT file for it.
// Expect: The status is kNoDexOptNeeded if the profile hasn't changed.
TEST_F(OatFileAssistantTest, ProfileOatUpToDate) {
std::string dex_location = GetScratchDir() + "/ProfileOatUpToDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeedProfile);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeedProfile));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_TRUE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_EQ(OatFileAssistant::kOatUpToDate, oat_file_assistant.OatFileStatus());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file and speed-profile OAT file for it.
// Expect: The status is kNoDex2OatNeeded if the profile has changed.
TEST_F(OatFileAssistantTest, ProfileOatOutOfDate) {
std::string dex_location = GetScratchDir() + "/ProfileOatOutOfDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeedProfile);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, true, false);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeedProfile));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_EQ(OatFileAssistant::kOatOutOfDate, oat_file_assistant.OatFileStatus());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a MultiDEX file and up-to-date OAT file for it.
// Expect: The status is kNoDexOptNeeded and we load all dex files.
TEST_F(OatFileAssistantTest, MultiDexOatUpToDate) {
std::string dex_location = GetScratchDir() + "/MultiDexOatUpToDate.jar";
Copy(GetMultiDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
// Verify we can load both dex files.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(2u, dex_files.size());
}
// Case: We have a MultiDEX file where the secondary dex file is out of date.
// Expect: The status is kDex2OatNeeded.
TEST_F(OatFileAssistantTest, MultiDexSecondaryOutOfDate) {
std::string dex_location = GetScratchDir() + "/MultiDexSecondaryOutOfDate.jar";
// Compile code for GetMultiDexSrc1.
Copy(GetMultiDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
// Now overwrite the dex file with GetMultiDexSrc2 so the secondary checksum
// is out of date.
Copy(GetMultiDexSrc2(), dex_location);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a MultiDEX file and up-to-date OAT file for it with relative
// encoded dex locations.
// Expect: The oat file status is kNoDexOptNeeded.
TEST_F(OatFileAssistantTest, RelativeEncodedDexLocation) {
std::string dex_location = GetScratchDir() + "/RelativeEncodedDexLocation.jar";
std::string oat_location = GetOdexDir() + "/RelativeEncodedDexLocation.oat";
// Create the dex file
Copy(GetMultiDexSrc1(), dex_location);
// Create the oat file with relative encoded dex location.
std::vector<std::string> args;
args.push_back("--dex-file=" + dex_location);
args.push_back("--dex-location=" + std::string("RelativeEncodedDexLocation.jar"));
args.push_back("--oat-file=" + oat_location);
args.push_back("--compiler-filter=speed");
std::string error_msg;
ASSERT_TRUE(OatFileAssistant::Dex2Oat(args, &error_msg)) << error_msg;
// Verify we can load both dex files.
OatFileAssistant oat_file_assistant(dex_location.c_str(),
oat_location.c_str(),
kRuntimeISA, false, true);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(2u, dex_files.size());
}
// Case: We have a DEX file and out-of-date OAT file.
// Expect: The status is kDex2OatNeeded.
TEST_F(OatFileAssistantTest, OatOutOfDate) {
std::string dex_location = GetScratchDir() + "/OatOutOfDate.jar";
// We create a dex, generate an oat for it, then overwrite the dex with a
// different dex to make the oat out of date.
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
Copy(GetDexSrc2(), dex_location);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file and an ODEX file, but no OAT file.
// Expect: The status is kPatchOatNeeded.
TEST_F(OatFileAssistantTest, DexOdexNoOat) {
std::string dex_location = GetScratchDir() + "/DexOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/DexOdexNoOat.odex";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kPatchOatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
// We should still be able to get the non-executable odex file to run from.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
}
// Case: We have a stripped DEX file and an ODEX file, but no OAT file.
// Expect: The status is kPatchOatNeeded
TEST_F(OatFileAssistantTest, StrippedDexOdexNoOat) {
std::string dex_location = GetScratchDir() + "/StrippedDexOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/StrippedDexOdexNoOat.odex";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Strip the dex file
Copy(GetStrippedDexSrc1(), dex_location);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kPatchOatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Make the oat file up to date.
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_TRUE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Verify we can load the dex files from it.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a stripped DEX file, an ODEX file, and an out-of-date OAT file.
// Expect: The status is kPatchOatNeeded.
TEST_F(OatFileAssistantTest, StrippedDexOdexOat) {
std::string dex_location = GetScratchDir() + "/StrippedDexOdexOat.jar";
std::string odex_location = GetOdexDir() + "/StrippedDexOdexOat.odex";
// Create the oat file from a different dex file so it looks out of date.
Copy(GetDexSrc2(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
// Create the odex file
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Strip the dex file.
Copy(GetStrippedDexSrc1(), dex_location);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kPatchOatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded, // Can't run dex2oat because dex file is stripped.
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kEverything));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_TRUE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Make the oat file up to date.
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded, // Can't run dex2oat because dex file is stripped.
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kEverything));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_TRUE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_TRUE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Verify we can load the dex files from it.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a stripped (or resource-only) DEX file, no ODEX file and no
// OAT file. Expect: The status is kNoDexOptNeeded.
TEST_F(OatFileAssistantTest, ResourceOnlyDex) {
std::string dex_location = GetScratchDir() + "/ResourceOnlyDex.jar";
Copy(GetStrippedDexSrc1(), dex_location);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Make the oat file up to date. This should have no effect.
std::string error_msg;
EXPECT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file, no ODEX file and an OAT file that needs
// relocation.
// Expect: The status is kSelfPatchOatNeeded.
TEST_F(OatFileAssistantTest, SelfRelocation) {
std::string dex_location = GetScratchDir() + "/SelfRelocation.jar";
std::string oat_location = GetOdexDir() + "/SelfRelocation.oat";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, oat_location, CompilerFilter::kSpeed);
OatFileAssistant oat_file_assistant(dex_location.c_str(),
oat_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kInterpretOnly));
EXPECT_EQ(OatFileAssistant::kSelfPatchOatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kEverything));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
// Make the oat file up to date.
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileNeedsRelocation());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileNeedsRelocation());
EXPECT_TRUE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file, no ODEX file and an OAT file that needs
// relocation but doesn't have patch info.
// Expect: The status is kDex2OatNeeded, because we can't run patchoat.
TEST_F(OatFileAssistantTest, NoSelfRelocation) {
std::string dex_location = GetScratchDir() + "/NoSelfRelocation.jar";
std::string oat_location = GetOdexDir() + "/NoSelfRelocation.oat";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateNoPatchOdexForTest(dex_location, oat_location, CompilerFilter::kSpeed);
OatFileAssistant oat_file_assistant(dex_location.c_str(),
oat_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
// Make the oat file up to date.
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file, an ODEX file and an OAT file, where the ODEX and
// OAT files both have patch delta of 0.
// Expect: It shouldn't crash, and status is kPatchOatNeeded.
TEST_F(OatFileAssistantTest, OdexOatOverlap) {
std::string dex_location = GetScratchDir() + "/OdexOatOverlap.jar";
std::string odex_location = GetOdexDir() + "/OdexOatOverlap.odex";
std::string oat_location = GetOdexDir() + "/OdexOatOverlap.oat";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Create the oat file by copying the odex so they are located in the same
// place in memory.
Copy(odex_location, oat_location);
// Verify things don't go bad.
OatFileAssistant oat_file_assistant(dex_location.c_str(),
oat_location.c_str(), kRuntimeISA, false, true);
EXPECT_EQ(OatFileAssistant::kPatchOatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
// Things aren't relocated, so it should fall back to interpreted.
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_FALSE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file and a PIC ODEX file, but no OAT file.
// Expect: The status is kNoDexOptNeeded, because PIC needs no relocation.
TEST_F(OatFileAssistantTest, DexPicOdexNoOat) {
std::string dex_location = GetScratchDir() + "/DexPicOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/DexPicOdexNoOat.odex";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GeneratePicOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kEverything));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_TRUE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file and a VerifyAtRuntime ODEX file, but no OAT file.
// Expect: The status is kNoDexOptNeeded, because VerifyAtRuntime contains no code.
TEST_F(OatFileAssistantTest, DexVerifyAtRuntimeOdexNoOat) {
std::string dex_location = GetScratchDir() + "/DexVerifyAtRuntimeOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/DexVerifyAtRuntimeOdexNoOat.odex";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kVerifyAtRuntime);
// Verify the status.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kVerifyAtRuntime));
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_TRUE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_TRUE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.HasOriginalDexFiles());
}
// Case: We have a DEX file and up-to-date OAT file for it.
// Expect: We should load an executable dex file.
TEST_F(OatFileAssistantTest, LoadOatUpToDate) {
std::string dex_location = GetScratchDir() + "/LoadOatUpToDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
// Load the oat using an oat file assistant.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file and up-to-date interpret-only OAT file for it.
// Expect: We should still load the oat file as executable.
TEST_F(OatFileAssistantTest, LoadExecInterpretOnlyOatUpToDate) {
std::string dex_location = GetScratchDir() + "/LoadExecInterpretOnlyOatUpToDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kInterpretOnly);
// Load the oat using an oat file assistant.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file and up-to-date OAT file for it.
// Expect: Loading non-executable should load the oat non-executable.
TEST_F(OatFileAssistantTest, LoadNoExecOatUpToDate) {
std::string dex_location = GetScratchDir() + "/LoadNoExecOatUpToDate.jar";
Copy(GetDexSrc1(), dex_location);
GenerateOatForTest(dex_location.c_str(), CompilerFilter::kSpeed);
// Load the oat using an oat file assistant.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_FALSE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a DEX file.
// Expect: We should load an executable dex file from an alternative oat
// location.
TEST_F(OatFileAssistantTest, LoadDexNoAlternateOat) {
std::string dex_location = GetScratchDir() + "/LoadDexNoAlternateOat.jar";
std::string oat_location = GetScratchDir() + "/LoadDexNoAlternateOat.oat";
Copy(GetDexSrc1(), dex_location);
OatFileAssistant oat_file_assistant(
dex_location.c_str(), oat_location.c_str(), kRuntimeISA, false, true);
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg)) << error_msg;
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_TRUE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
EXPECT_TRUE(OS::FileExists(oat_location.c_str()));
// Verify it didn't create an oat in the default location.
OatFileAssistant ofm(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_FALSE(ofm.OatFileExists());
}
// Case: We have a DEX file but can't write the oat file.
// Expect: We should fail to make the oat file up to date.
TEST_F(OatFileAssistantTest, LoadDexUnwriteableAlternateOat) {
std::string dex_location = GetScratchDir() + "/LoadDexUnwriteableAlternateOat.jar";
// Make the oat location unwritable by inserting some non-existent
// intermediate directories.
std::string oat_location = GetScratchDir() + "/foo/bar/LoadDexUnwriteableAlternateOat.oat";
Copy(GetDexSrc1(), dex_location);
OatFileAssistant oat_file_assistant(
dex_location.c_str(), oat_location.c_str(), kRuntimeISA, false, true);
std::string error_msg;
ASSERT_EQ(OatFileAssistant::kUpdateNotAttempted,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg));
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() == nullptr);
}
// Case: We don't have a DEX file and can't write the oat file.
// Expect: We should fail to generate the oat file without crashing.
TEST_F(OatFileAssistantTest, GenNoDex) {
std::string dex_location = GetScratchDir() + "/GenNoDex.jar";
std::string oat_location = GetScratchDir() + "/GenNoDex.oat";
OatFileAssistant oat_file_assistant(
dex_location.c_str(), oat_location.c_str(), kRuntimeISA, false, true);
std::string error_msg;
EXPECT_EQ(OatFileAssistant::kUpdateNotAttempted,
oat_file_assistant.GenerateOatFile(CompilerFilter::kSpeed, &error_msg));
}
// Turn an absolute path into a path relative to the current working
// directory.
static std::string MakePathRelative(std::string target) {
char buf[MAXPATHLEN];
std::string cwd = getcwd(buf, MAXPATHLEN);
// Split the target and cwd paths into components.
std::vector<std::string> target_path;
std::vector<std::string> cwd_path;
Split(target, '/', &target_path);
Split(cwd, '/', &cwd_path);
// Reverse the path components, so we can use pop_back().
std::reverse(target_path.begin(), target_path.end());
std::reverse(cwd_path.begin(), cwd_path.end());
// Drop the common prefix of the paths. Because we reversed the path
// components, this becomes the common suffix of target_path and cwd_path.
while (!target_path.empty() && !cwd_path.empty()
&& target_path.back() == cwd_path.back()) {
target_path.pop_back();
cwd_path.pop_back();
}
// For each element of the remaining cwd_path, add '..' to the beginning
// of the target path. Because we reversed the path components, we add to
// the end of target_path.
for (unsigned int i = 0; i < cwd_path.size(); i++) {
target_path.push_back("..");
}
// Reverse again to get the right path order, and join to get the result.
std::reverse(target_path.begin(), target_path.end());
return Join(target_path, '/');
}
// Case: Non-absolute path to Dex location.
// Expect: Not sure, but it shouldn't crash.
TEST_F(OatFileAssistantTest, NonAbsoluteDexLocation) {
std::string abs_dex_location = GetScratchDir() + "/NonAbsoluteDexLocation.jar";
Copy(GetDexSrc1(), abs_dex_location);
std::string dex_location = MakePathRelative(abs_dex_location);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
}
// Case: Very short, non-existent Dex location.
// Expect: kNoDexOptNeeded.
TEST_F(OatFileAssistantTest, ShortDexLocation) {
std::string dex_location = "/xx";
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.HasOriginalDexFiles());
// Trying to make it up to date should have no effect.
std::string error_msg;
EXPECT_EQ(OatFileAssistant::kUpdateSucceeded,
oat_file_assistant.MakeUpToDate(CompilerFilter::kSpeed, &error_msg));
EXPECT_TRUE(error_msg.empty());
}
// Case: Non-standard extension for dex file.
// Expect: The status is kDex2OatNeeded.
TEST_F(OatFileAssistantTest, LongDexExtension) {
std::string dex_location = GetScratchDir() + "/LongDexExtension.jarx";
Copy(GetDexSrc1(), dex_location);
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, false);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded,
oat_file_assistant.GetDexOptNeeded(CompilerFilter::kSpeed));
EXPECT_FALSE(oat_file_assistant.IsInBootClassPath());
EXPECT_FALSE(oat_file_assistant.OdexFileExists());
EXPECT_TRUE(oat_file_assistant.OdexFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OdexFileIsUpToDate());
EXPECT_FALSE(oat_file_assistant.OatFileExists());
EXPECT_TRUE(oat_file_assistant.OatFileIsOutOfDate());
EXPECT_FALSE(oat_file_assistant.OatFileIsUpToDate());
}
// A task to generate a dex location. Used by the RaceToGenerate test.
class RaceGenerateTask : public Task {
public:
explicit RaceGenerateTask(const std::string& dex_location, const std::string& oat_location)
: dex_location_(dex_location), oat_location_(oat_location), loaded_oat_file_(nullptr)
{}
void Run(Thread* self ATTRIBUTE_UNUSED) {
// Load the dex files, and save a pointer to the loaded oat file, so that
// we can verify only one oat file was loaded for the dex location.
std::vector<std::unique_ptr<const DexFile>> dex_files;
std::vector<std::string> error_msgs;
const OatFile* oat_file = nullptr;
dex_files = Runtime::Current()->GetOatFileManager().OpenDexFilesFromOat(
dex_location_.c_str(),
oat_location_.c_str(),
/*class_loader*/nullptr,
/*dex_elements*/nullptr,
&oat_file,
&error_msgs);
CHECK(!dex_files.empty()) << Join(error_msgs, '\n');
CHECK(dex_files[0]->GetOatDexFile() != nullptr) << dex_files[0]->GetLocation();
loaded_oat_file_ = dex_files[0]->GetOatDexFile()->GetOatFile();
CHECK_EQ(loaded_oat_file_, oat_file);
}
const OatFile* GetLoadedOatFile() const {
return loaded_oat_file_;
}
private:
std::string dex_location_;
std::string oat_location_;
const OatFile* loaded_oat_file_;
};
// Test the case where multiple processes race to generate an oat file.
// This simulates multiple processes using multiple threads.
//
// We want unique Oat files to be loaded even when there is a race to load.
// TODO: The test case no longer tests locking the way it was intended since we now get multiple
// copies of the same Oat files mapped at different locations.
TEST_F(OatFileAssistantTest, RaceToGenerate) {
std::string dex_location = GetScratchDir() + "/RaceToGenerate.jar";
std::string oat_location = GetOdexDir() + "/RaceToGenerate.oat";
// We use the lib core dex file, because it's large, and hopefully should
// take a while to generate.
Copy(GetLibCoreDexFileNames()[0], dex_location);
const int kNumThreads = 32;
Thread* self = Thread::Current();
ThreadPool thread_pool("Oat file assistant test thread pool", kNumThreads);
std::vector<std::unique_ptr<RaceGenerateTask>> tasks;
for (int i = 0; i < kNumThreads; i++) {
std::unique_ptr<RaceGenerateTask> task(new RaceGenerateTask(dex_location, oat_location));
thread_pool.AddTask(self, task.get());
tasks.push_back(std::move(task));
}
thread_pool.StartWorkers(self);
thread_pool.Wait(self, true, false);
// Verify every task got a unique oat file.
std::set<const OatFile*> oat_files;
for (auto& task : tasks) {
const OatFile* oat_file = task->GetLoadedOatFile();
EXPECT_TRUE(oat_files.find(oat_file) == oat_files.end());
oat_files.insert(oat_file);
}
}
// Case: We have a DEX file and an ODEX file, no OAT file, and dex2oat is
// disabled.
// Expect: We should load the odex file non-executable.
TEST_F(OatFileAssistantNoDex2OatTest, LoadDexOdexNoOat) {
std::string dex_location = GetScratchDir() + "/LoadDexOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/LoadDexOdexNoOat.odex";
// Create the dex and odex files
Copy(GetDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Load the oat using an executable oat file assistant.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_FALSE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(1u, dex_files.size());
}
// Case: We have a MultiDEX file and an ODEX file, no OAT file, and dex2oat is
// disabled.
// Expect: We should load the odex file non-executable.
TEST_F(OatFileAssistantNoDex2OatTest, LoadMultiDexOdexNoOat) {
std::string dex_location = GetScratchDir() + "/LoadMultiDexOdexNoOat.jar";
std::string odex_location = GetOdexDir() + "/LoadMultiDexOdexNoOat.odex";
// Create the dex and odex files
Copy(GetMultiDexSrc1(), dex_location);
GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeed);
// Load the oat using an executable oat file assistant.
OatFileAssistant oat_file_assistant(dex_location.c_str(), kRuntimeISA, false, true);
std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile();
ASSERT_TRUE(oat_file.get() != nullptr);
EXPECT_FALSE(oat_file->IsExecutable());
std::vector<std::unique_ptr<const DexFile>> dex_files;
dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str());
EXPECT_EQ(2u, dex_files.size());
}
TEST(OatFileAssistantUtilsTest, DexFilenameToOdexFilename) {
std::string error_msg;
std::string odex_file;
EXPECT_TRUE(OatFileAssistant::DexFilenameToOdexFilename(
"/foo/bar/baz.jar", kArm, &odex_file, &error_msg)) << error_msg;
EXPECT_EQ("/foo/bar/oat/arm/baz.odex", odex_file);
EXPECT_TRUE(OatFileAssistant::DexFilenameToOdexFilename(
"/foo/bar/baz.funnyext", kArm, &odex_file, &error_msg)) << error_msg;
EXPECT_EQ("/foo/bar/oat/arm/baz.odex", odex_file);
EXPECT_FALSE(OatFileAssistant::DexFilenameToOdexFilename(
"nopath.jar", kArm, &odex_file, &error_msg));
EXPECT_FALSE(OatFileAssistant::DexFilenameToOdexFilename(
"/foo/bar/baz_noext", kArm, &odex_file, &error_msg));
}
// Verify the dexopt status values from dalvik.system.DexFile
// match the OatFileAssistant::DexOptStatus values.
TEST_F(OatFileAssistantTest, DexOptStatusValues) {
ScopedObjectAccess soa(Thread::Current());
StackHandleScope<1> hs(soa.Self());
ClassLinker* linker = Runtime::Current()->GetClassLinker();
Handle<mirror::Class> dexfile(
hs.NewHandle(linker->FindSystemClass(soa.Self(), "Ldalvik/system/DexFile;")));
ASSERT_FALSE(dexfile.Get() == nullptr);
linker->EnsureInitialized(soa.Self(), dexfile, true, true);
ArtField* no_dexopt_needed = mirror::Class::FindStaticField(
soa.Self(), dexfile, "NO_DEXOPT_NEEDED", "I");
ASSERT_FALSE(no_dexopt_needed == nullptr);
EXPECT_EQ(no_dexopt_needed->GetTypeAsPrimitiveType(), Primitive::kPrimInt);
EXPECT_EQ(OatFileAssistant::kNoDexOptNeeded, no_dexopt_needed->GetInt(dexfile.Get()));
ArtField* dex2oat_needed = mirror::Class::FindStaticField(
soa.Self(), dexfile, "DEX2OAT_NEEDED", "I");
ASSERT_FALSE(dex2oat_needed == nullptr);
EXPECT_EQ(dex2oat_needed->GetTypeAsPrimitiveType(), Primitive::kPrimInt);
EXPECT_EQ(OatFileAssistant::kDex2OatNeeded, dex2oat_needed->GetInt(dexfile.Get()));
ArtField* patchoat_needed = mirror::Class::FindStaticField(
soa.Self(), dexfile, "PATCHOAT_NEEDED", "I");
ASSERT_FALSE(patchoat_needed == nullptr);
EXPECT_EQ(patchoat_needed->GetTypeAsPrimitiveType(), Primitive::kPrimInt);
EXPECT_EQ(OatFileAssistant::kPatchOatNeeded, patchoat_needed->GetInt(dexfile.Get()));
ArtField* self_patchoat_needed = mirror::Class::FindStaticField(
soa.Self(), dexfile, "SELF_PATCHOAT_NEEDED", "I");
ASSERT_FALSE(self_patchoat_needed == nullptr);
EXPECT_EQ(self_patchoat_needed->GetTypeAsPrimitiveType(), Primitive::kPrimInt);
EXPECT_EQ(OatFileAssistant::kSelfPatchOatNeeded, self_patchoat_needed->GetInt(dexfile.Get()));
}
// TODO: More Tests:
// * Image checksum change is out of date for kIntepretOnly, but not
// kVerifyAtRuntime. But target of kVerifyAtRuntime still says current
// kInterpretOnly is out of date.
// * Test class linker falls back to unquickened dex for DexNoOat
// * Test class linker falls back to unquickened dex for MultiDexNoOat
// * Test using secondary isa
// * Test for status of oat while oat is being generated (how?)
// * Test case where 32 and 64 bit boot class paths differ,
// and we ask IsInBootClassPath for a class in exactly one of the 32 or
// 64 bit boot class paths.
// * Test unexpected scenarios (?):
// - Dex is stripped, don't have odex.
// - Oat file corrupted after status check, before reload unexecutable
// because it's unrelocated and no dex2oat
// * Test unrelocated specific target compilation type can be relocated to
// make it up to date.
} // namespace art
| {
"pile_set_name": "Github"
} |
package datadog.trace.agent.tooling.bytebuddy.matcher.testclasses;
public class UntracedClass extends G {
@Override
public void g() {}
@Override
public void f() {}
@Override
public void e() {}
@Override
public void d() {}
@Override
public void c() {}
@Override
public void b() {}
@Override
public void a() {}
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.