answer stringlengths 15 1.25M |
|---|
import _jsx from "@babel/runtime/helpers/builtin/jsx";
import <API key> from "@babel/runtime/helpers/builtin/<API key>";
import _inheritsLoose from "@babel/runtime/helpers/builtin/inheritsLoose";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import withProps from 'recompose/withProps';
import uniqueId from 'lodash/uniqueId';
import IconButton from "@material-ui/core/es/IconButton";
import Menu from "@material-ui/core/es/Menu";
import MenuItem from "@material-ui/core/es/MenuItem";
import MoreVertIcon from "@material-ui/icons/es/MoreVert";
import TableRow from "@material-ui/core/es/TableRow";
import MuiTableCell from "@material-ui/core/es/TableCell";
import Avatar from '../../../components/Avatar';
import Username from '../../../components/Username/WithCard';
import UserRole from '../../../components/UserRole';
import formatJoinDate from '../../../utils/formatJoinDate';
var actionsStyle = {
width: 48,
paddingLeft: 0,
paddingRight: 0
};
var TableCell = withProps(function (props) {
return {
className: cx('AdminUserRow-cell', props.className)
};
})(MuiTableCell);
var _ref =
/*#__PURE__*/
_jsx(TableCell, {}, void 0, "Email");
var _ref2 =
/*#__PURE__*/
_jsx(MoreVertIcon, {});
var _ref3 =
/*#__PURE__*/
_jsx(MenuItem, {}, void 0, "Ban");
var UserRow =
/*#__PURE__*/
function (_React$Component) {
_inheritsLoose(UserRow, _React$Component);
function UserRow() {
var _temp, _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return (_temp = _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this, _this.state = {
open: false,
anchorEl: null
}, _this.menu = uniqueId('menu'), _this.handleOpenMenu = function (event) {
_this.setState({
open: true,
anchorEl: event.currentTarget
});
}, _this.handleCloseMenu = function () {
_this.setState({
open: false,
anchorEl: null
});
}, _temp) || <API key>(_this);
}
var _proto = UserRow.prototype;
_proto.render = function render() {
var user = this.props.user;
var _this$state = this.state,
open = _this$state.open,
anchorEl = _this$state.anchorEl;
return _jsx(TableRow, {
className: "AdminUserRow"
}, void 0, _jsx(TableCell, {
className: "AdminUserRow-avatar"
}, void 0, _jsx(Avatar, {
user: user
})), _jsx(TableCell, {}, void 0, _jsx(Username, {
user: user
})), _jsx(TableCell, {}, void 0, formatJoinDate(user.createdAt, 'date')), _ref, _jsx(TableCell, {}, void 0, user.roles.length > 0 &&
/* Only show the primary role here for space reasons. */
_jsx(UserRole, {
roleName: user.roles[0]
})), _jsx(TableCell, {
style: actionsStyle
}, void 0, _jsx(IconButton, {
onClick: this.handleOpenMenu,
"aria-haspopup": "true",
"aria-owns": open ? this.menu : null
}, void 0, _ref2), _jsx(Menu, {
id: this.menu,
open: open,
anchorEl: anchorEl,
onClose: this.handleCloseMenu
}, void 0, _ref3)));
};
return UserRow;
}(React.Component);
export { UserRow as default };
UserRow.propTypes = process.env.NODE_ENV !== "production" ? {
user: PropTypes.object.isRequired
} : {};
//# sourceMappingURL=Row.js.map |
# GENERATED FROM Dockerfile.template
FROM vicamo/buildpack-deps:sid-hurd-i386-scm
RUN set -ex; \
apt-get update; \
apt-get install -y --<API key> \
autoconf \
automake \
bzip2 \
dpkg-dev \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
<API key> \
libdb-dev \
libevent-dev \
libffi-dev \
libgdbm-dev \
libglib2.0-dev \
libgmp-dev \
libjpeg-dev \
libkrb5-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
$(if [ -n "$(apt-cache search --names-only libmaxminddb-dev)" ]; then \
echo "libmaxminddb-dev"; \
else \
echo "libgeoip-dev"; \
fi) \
libncurses5-dev \
libncursesw5-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
unzip \
xz-utils \
zlib1g-dev \
\
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show '<API key>' 2>/dev/null | grep -q '^Version:'; then \
echo '<API key>'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \ |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StarshipSeven.GameInterfaces;
using System.Windows.Media;
namespace StarshipSeven.GameEntities
{
public class HumanPlayer : Player, IHumanPlayer
{
public HumanPlayer(Guid id)
: base(id)
{
}
public HumanPlayer(string name, Color color)
:base(name, color)
{
}
}
} |
{% extends 'layout.html' %}
{% from 'macros/basic.html' import octicon without context %}
{% block body %}
<h1>{{ repo.full_name }}
<small>«manage»</small>
</h1>
<table class="table table-striped">
<tr>
<th>Full name:</th>
<td>{{ repo|gh_repo_link }}</td>
</tr>
<tr>
<th>Description:</th>
<td>{{ repo.description }}</td>
</tr>
<tr>
<th>Languages:</th>
<td>{{ repo|repo_languages }}</td>
</tr>
<tr>
<th>Topics:</th>
<td>{{ repo|repo_topics }}</td>
</tr>
<tr>
<th>Visibility @GitHub:</th>
<td>{{ repo|gh_repo_visibility }}</td>
</tr>
<tr>
<th>Visibility @repocribro:</th>
<td>{{ repo|repo_visibility }}</td>
</tr>
<tr>
<th>URL @GitHub:</th>
<td>{{ repo.url|ext_link }}</td>
</tr>
<tr>
<th>URL @repocribro:</th>
<td>{{ repo|repo_link(show_secret=True) }}</td>
</tr>
<tr>
<th>Webhook ID:</th>
<td>{{ repo.webhook_id }}</td>
</tr>
{% if repo.parent_name != None %}
<tr>
<th>Fork of</th>
<td>
<a href="https://github.com/{{ repo.parent_name }}" target="_blank">
{{ octicon('mark-github') }} {{ repo.parent_name }}
</a>
</td>
</tr>
{% endif %}
</table>
<div class="row">
<div class="col-md-2">
<a href="{{ url_for('manage.dashboard', tab='repositories') }}" class="btn btn-default">
{{ octicon('list-unordered') }} Back
</a>
</div>
<div class="col-md-2">
<form action="{{ url_for('manage.repository_activate') }}" method="POST">
<input type="hidden" value="{{ repo.full_name }}" name="full_name">
<button type="submit" class="btn btn-primary" name="enable" value="{{ repo.visibility_type }}">
{{ octicon('link') }} Reactivate
</button>
</form>
</div>
<div class="col-md-2">
<form action="{{ url_for('manage.<API key>') }}" method="POST">
<input type="hidden" value="{{ repo.full_name }}" name="full_name">
<button type="submit" class="btn btn-danger">
{{ octicon('circle-slash') }} Deactivate
</button>
</form>
</div>
<div class="col-md-2">
<form action="{{ url_for('manage.repository_update') }}" method="POST">
<input type="hidden" value="{{ repo.full_name }}" name="full_name">
<button type="submit" class="btn btn-primary">
{{ octicon('sync') }} Update
</button>
</form>
</div>
<div class="col-md-3">
<form action="{{ url_for('manage.repository_activate') }}" method="POST">
<input type="hidden" value="{{ repo.full_name }}" name="full_name">
<div class="btn-group" role="group">
<button type="submit" class="btn btn-success{% if repo.is_public %} disabled{% endif %}" name="enable"
value="{{ Repository.VISIBILITY_PUBLIC }}"{% if repo.is_public %} disabled{% endif %}>
Public
</button>
<button type="submit" class="btn btn-primary{% if repo.is_hidden %} disabled{% endif %}" name="enable"
value="{{ Repository.VISIBILITY_HIDDEN }}"{% if repo.is_hidden %} disabled{% endif %}>
Hidden
</button>
<button type="submit" class="btn btn-warning{% if repo.is_private %} disabled{% endif %}" name="enable"
value="{{ Repository.VISIBILITY_PRIVATE }}"{% if repo.is_private %} disabled{% endif %}>
Private
</button>
</div>
</form>
</div>
<div class="col-md-1">
<form action="{{ url_for('manage.repository_delete') }}" method="POST">
<input type="hidden" value="{{ repo.full_name }}" name="full_name">
<button type="submit" class="btn btn-danger">
{{ octicon('trashcan') }} Delete
</button>
</form>
</div>
</div>
{% endblock %} |
<?php
namespace Deployer\Task;
use Deployer\Host\Host;
use Deployer\Host\HostCollection;
use Deployer\Component\PharUpdate\Exception\<API key>;
use PHPUnit\Framework\TestCase;
class ScriptManagerTest extends TestCase
{
public function <API key>()
{
$scriptManager = new ScriptManager(new TaskCollection());
$classname = 'Deployer\Task\ScriptManager';
$this->assertInstanceOf($classname, $scriptManager);
}
/**
* @expectedException <API key>
*/
public function <API key>()
{
$scriptManager = new ScriptManager(new TaskCollection());
$scriptManager->getTasks("");
}
/**
* @expectedException <API key>
*/
public function <API key>()
{
$taskCollection = new TaskCollection();
$taskCollection->set('testTask', new Task('testTask'));
$scriptManager = new ScriptManager($taskCollection);
$scriptManager->getTasks("testTask2");
}
public function <API key>()
{
$hostCollection = new HostCollection();
$hostCollection->set('app', (new Host('app'))->stage('prod')->roles('app'));
$hostCollection->set('db', (new Host('db'))->stage('prod')->roles('db'));
$task = new Task('compile');
$task
->onStage('prod')
->onRoles('app');
$taskCollection = new TaskCollection();
$taskCollection->set('compile', $task);
$scriptManager = new ScriptManager($taskCollection, $hostCollection);
$this->assertNotEmpty($scriptManager->getTasks("compile"));
$task = new Task('dump');
$task
->onStage('prod')
->onRoles('db');
$taskCollection = new TaskCollection();
$taskCollection->set('dump', $task);
$scriptManager = new ScriptManager($taskCollection, $hostCollection);
$this->assertNotEmpty($scriptManager->getTasks("dump"));
}
} |
'use strict';
//Setting up route
angular.module('enumerations').config(['$stateProvider',
function($stateProvider) {
// Enumerations state routing
$stateProvider.
state('enumeration-modal', {
url: '/enumeration-modal',
templateUrl: 'modules/enumerations/views/enumeration-modal.client.view.html'
}).
state('enumerations', {
abstract: true,
url: '/enumerations',
template: '<ui-view/>'
}).
state('enumerations.list', {
url: '',
templateUrl: 'modules/enumerations/views/list-enumerations.client.view.html'
}).
state('enumerations.create', {
url: '/create',
templateUrl: 'modules/enumerations/views/create-enumeration.client.view.html'
}).
state('enumerations.view', {
url: '/:enumerationId',
templateUrl: 'modules/enumerations/views/view-enumeration.client.view.html'
}).
state('enumerations.edit', {
url: '/:enumerationId/edit',
templateUrl: 'modules/enumerations/views/edit-enumeration.client.view.html'
});
}
]); |
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160901132337) do
create_table "article_attachments", force: :cascade do |t|
t.integer "article_id"
t.string "title", limit: 255
t.string "<API key>", limit: 255
t.string "<API key>", limit: 255
t.integer "<API key>"
t.datetime "<API key>"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "article_attachments", ["article_id"], name: "<API key>"
create_table "articles", force: :cascade do |t|
t.datetime "publish_at"
t.integer "user_id"
t.string "author", limit: 255
t.string "title", limit: 255
t.string "permalink", limit: 255
t.text "content"
t.integer "read"
t.datetime "created_at"
t.datetime "updated_at"
t.string "image_file_name", limit: 255
t.string "image_content_type", limit: 255
t.integer "image_file_size"
t.datetime "image_updated_at"
t.string "image_caption", limit: 255
t.boolean "featured", default: true
end
create_table "ckeditor_assets", force: :cascade do |t|
t.string "data_file_name", limit: 255, null: false
t.string "data_content_type", limit: 255
t.integer "data_file_size"
t.integer "assetable_id"
t.string "assetable_type", limit: 30
t.string "type", limit: 30
t.integer "width"
t.integer "height"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ckeditor_assets", ["assetable_type", "assetable_id"], name: "<API key>"
add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], name: "<API key>"
create_table "subscriptions", force: :cascade do |t|
t.boolean "active", default: false
t.string "name"
t.string "email"
t.string "auth_token"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "taggings", force: :cascade do |t|
t.integer "tag_id"
t.integer "taggable_id"
t.string "taggable_type", limit: 255
t.integer "tagger_id"
t.string "tagger_type", limit: 255
t.string "context", limit: 128
t.datetime "created_at"
end
add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
create_table "tags", force: :cascade do |t|
t.string "name", limit: 255
t.integer "taggings_count", default: 0
end
add_index "tags", ["name"], name: "index_tags_on_name", unique: true
end |
// Code generated by protoc-gen-go.
// source: rendermessages.proto
// DO NOT EDIT!
package dota
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type CMsgBeginFrame struct {
FramePaintTime *float64 `protobuf:"fixed64,1,opt,name=frame_paint_time" json:"frame_paint_time,omitempty"`
SurfaceWidth *uint32 `protobuf:"varint,2,opt,name=surface_width" json:"surface_width,omitempty"`
SurfaceHeight *uint32 `protobuf:"varint,3,opt,name=surface_height" json:"surface_height,omitempty"`
RenderTarget *uint32 `protobuf:"varint,4,opt,name=render_target" json:"render_target,omitempty"`
UiScaleFactor *float64 `protobuf:"fixed64,5,opt,name=ui_scale_factor" json:"ui_scale_factor,omitempty"`
EmptyFrame *bool `protobuf:"varint,6,opt,name=empty_frame" json:"empty_frame,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgBeginFrame) Reset() { *m = CMsgBeginFrame{} }
func (m *CMsgBeginFrame) String() string { return proto.CompactTextString(m) }
func (*CMsgBeginFrame) ProtoMessage() {}
func (m *CMsgBeginFrame) GetFramePaintTime() float64 {
if m != nil && m.FramePaintTime != nil {
return *m.FramePaintTime
}
return 0
}
func (m *CMsgBeginFrame) GetSurfaceWidth() uint32 {
if m != nil && m.SurfaceWidth != nil {
return *m.SurfaceWidth
}
return 0
}
func (m *CMsgBeginFrame) GetSurfaceHeight() uint32 {
if m != nil && m.SurfaceHeight != nil {
return *m.SurfaceHeight
}
return 0
}
func (m *CMsgBeginFrame) GetRenderTarget() uint32 {
if m != nil && m.RenderTarget != nil {
return *m.RenderTarget
}
return 0
}
func (m *CMsgBeginFrame) GetUiScaleFactor() float64 {
if m != nil && m.UiScaleFactor != nil {
return *m.UiScaleFactor
}
return 0
}
func (m *CMsgBeginFrame) GetEmptyFrame() bool {
if m != nil && m.EmptyFrame != nil {
return *m.EmptyFrame
}
return false
}
type CMsgEndFrame struct {
<API key> *uint32 `protobuf:"varint,1,opt,name=<API key>" json:"<API key>,omitempty"`
MouseCursorHotspotX *float32 `protobuf:"fixed32,2,opt,name=<API key>" json:"<API key>,omitempty"`
MouseCursorHotspotY *float32 `protobuf:"fixed32,3,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgEndFrame) Reset() { *m = CMsgEndFrame{} }
func (m *CMsgEndFrame) String() string { return proto.CompactTextString(m) }
func (*CMsgEndFrame) ProtoMessage() {}
func (m *CMsgEndFrame) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgEndFrame) <API key>() float32 {
if m != nil && m.MouseCursorHotspotX != nil {
return *m.MouseCursorHotspotX
}
return 0
}
func (m *CMsgEndFrame) <API key>() float32 {
if m != nil && m.MouseCursorHotspotY != nil {
return *m.MouseCursorHotspotY
}
return 0
}
type CMsgClearBackbuffer struct {
ClearColorRgba *uint32 `protobuf:"varint,1,opt,name=clear_color_rgba" json:"clear_color_rgba,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgClearBackbuffer) Reset() { *m = CMsgClearBackbuffer{} }
func (m *CMsgClearBackbuffer) String() string { return proto.CompactTextString(m) }
func (*CMsgClearBackbuffer) ProtoMessage() {}
func (m *CMsgClearBackbuffer) GetClearColorRgba() uint32 {
if m != nil && m.ClearColorRgba != nil {
return *m.ClearColorRgba
}
return 0
}
type <API key> struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
type CMsgDeleteTexture struct {
TexturePointer *uint64 `protobuf:"varint,1,opt,name=texture_pointer" json:"texture_pointer,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgDeleteTexture) Reset() { *m = CMsgDeleteTexture{} }
func (m *CMsgDeleteTexture) String() string { return proto.CompactTextString(m) }
func (*CMsgDeleteTexture) ProtoMessage() {}
func (m *CMsgDeleteTexture) GetTexturePointer() uint64 {
if m != nil && m.TexturePointer != nil {
return *m.TexturePointer
}
return 0
}
type CMsgDeletePanel struct {
ContextId *uint64 `protobuf:"varint,1,opt,name=context_id" json:"context_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgDeletePanel) Reset() { *m = CMsgDeletePanel{} }
func (m *CMsgDeletePanel) String() string { return proto.CompactTextString(m) }
func (*CMsgDeletePanel) ProtoMessage() {}
func (m *CMsgDeletePanel) GetContextId() uint64 {
if m != nil && m.ContextId != nil {
return *m.ContextId
}
return 0
}
type <API key> struct {
PanelHandle *uint64 `protobuf:"varint,1,opt,name=panel_handle" json:"panel_handle,omitempty"`
BrushIndex *uint32 `protobuf:"varint,2,opt,name=brush_index" json:"brush_index,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetPanelHandle() uint64 {
if m != nil && m.PanelHandle != nil {
return *m.PanelHandle
}
return 0
}
func (m *<API key>) GetBrushIndex() uint32 {
if m != nil && m.BrushIndex != nil {
return *m.BrushIndex
}
return 0
}
type CMsgPoint struct {
X *float64 `protobuf:"fixed64,1,opt,name=x" json:"x,omitempty"`
Y *float64 `protobuf:"fixed64,2,opt,name=y" json:"y,omitempty"`
Z *float64 `protobuf:"fixed64,3,opt,name=z" json:"z,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgPoint) Reset() { *m = CMsgPoint{} }
func (m *CMsgPoint) String() string { return proto.CompactTextString(m) }
func (*CMsgPoint) ProtoMessage() {}
func (m *CMsgPoint) GetX() float64 {
if m != nil && m.X != nil {
return *m.X
}
return 0
}
func (m *CMsgPoint) GetY() float64 {
if m != nil && m.Y != nil {
return *m.Y
}
return 0
}
func (m *CMsgPoint) GetZ() float64 {
if m != nil && m.Z != nil {
return *m.Z
}
return 0
}
type CMsgMatrix4X4 struct {
M00 *float64 `protobuf:"fixed64,1,opt,name=m00" json:"m00,omitempty"`
M01 *float64 `protobuf:"fixed64,2,opt,name=m01" json:"m01,omitempty"`
M02 *float64 `protobuf:"fixed64,3,opt,name=m02" json:"m02,omitempty"`
M03 *float64 `protobuf:"fixed64,4,opt,name=m03" json:"m03,omitempty"`
M10 *float64 `protobuf:"fixed64,5,opt,name=m10" json:"m10,omitempty"`
M11 *float64 `protobuf:"fixed64,6,opt,name=m11" json:"m11,omitempty"`
M12 *float64 `protobuf:"fixed64,7,opt,name=m12" json:"m12,omitempty"`
M13 *float64 `protobuf:"fixed64,8,opt,name=m13" json:"m13,omitempty"`
M20 *float64 `protobuf:"fixed64,9,opt,name=m20" json:"m20,omitempty"`
M21 *float64 `protobuf:"fixed64,10,opt,name=m21" json:"m21,omitempty"`
M22 *float64 `protobuf:"fixed64,11,opt,name=m22" json:"m22,omitempty"`
M23 *float64 `protobuf:"fixed64,12,opt,name=m23" json:"m23,omitempty"`
M30 *float64 `protobuf:"fixed64,13,opt,name=m30" json:"m30,omitempty"`
M31 *float64 `protobuf:"fixed64,14,opt,name=m31" json:"m31,omitempty"`
M32 *float64 `protobuf:"fixed64,15,opt,name=m32" json:"m32,omitempty"`
M33 *float64 `protobuf:"fixed64,16,opt,name=m33" json:"m33,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgMatrix4X4) Reset() { *m = CMsgMatrix4X4{} }
func (m *CMsgMatrix4X4) String() string { return proto.CompactTextString(m) }
func (*CMsgMatrix4X4) ProtoMessage() {}
func (m *CMsgMatrix4X4) GetM00() float64 {
if m != nil && m.M00 != nil {
return *m.M00
}
return 0
}
func (m *CMsgMatrix4X4) GetM01() float64 {
if m != nil && m.M01 != nil {
return *m.M01
}
return 0
}
func (m *CMsgMatrix4X4) GetM02() float64 {
if m != nil && m.M02 != nil {
return *m.M02
}
return 0
}
func (m *CMsgMatrix4X4) GetM03() float64 {
if m != nil && m.M03 != nil {
return *m.M03
}
return 0
}
func (m *CMsgMatrix4X4) GetM10() float64 {
if m != nil && m.M10 != nil {
return *m.M10
}
return 0
}
func (m *CMsgMatrix4X4) GetM11() float64 {
if m != nil && m.M11 != nil {
return *m.M11
}
return 0
}
func (m *CMsgMatrix4X4) GetM12() float64 {
if m != nil && m.M12 != nil {
return *m.M12
}
return 0
}
func (m *CMsgMatrix4X4) GetM13() float64 {
if m != nil && m.M13 != nil {
return *m.M13
}
return 0
}
func (m *CMsgMatrix4X4) GetM20() float64 {
if m != nil && m.M20 != nil {
return *m.M20
}
return 0
}
func (m *CMsgMatrix4X4) GetM21() float64 {
if m != nil && m.M21 != nil {
return *m.M21
}
return 0
}
func (m *CMsgMatrix4X4) GetM22() float64 {
if m != nil && m.M22 != nil {
return *m.M22
}
return 0
}
func (m *CMsgMatrix4X4) GetM23() float64 {
if m != nil && m.M23 != nil {
return *m.M23
}
return 0
}
func (m *CMsgMatrix4X4) GetM30() float64 {
if m != nil && m.M30 != nil {
return *m.M30
}
return 0
}
func (m *CMsgMatrix4X4) GetM31() float64 {
if m != nil && m.M31 != nil {
return *m.M31
}
return 0
}
func (m *CMsgMatrix4X4) GetM32() float64 {
if m != nil && m.M32 != nil {
return *m.M32
}
return 0
}
func (m *CMsgMatrix4X4) GetM33() float64 {
if m != nil && m.M33 != nil {
return *m.M33
}
return 0
}
type CRadiusData struct {
TopLeft *<API key> `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
TopRight *<API key> `protobuf:"bytes,2,opt,name=top_right" json:"top_right,omitempty"`
BottomRight *<API key> `protobuf:"bytes,3,opt,name=bottom_right" json:"bottom_right,omitempty"`
BottomLeft *<API key> `protobuf:"bytes,4,opt,name=bottom_left" json:"bottom_left,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CRadiusData) Reset() { *m = CRadiusData{} }
func (m *CRadiusData) String() string { return proto.CompactTextString(m) }
func (*CRadiusData) ProtoMessage() {}
func (m *CRadiusData) GetTopLeft() *<API key> {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *CRadiusData) GetTopRight() *<API key> {
if m != nil {
return m.TopRight
}
return nil
}
func (m *CRadiusData) GetBottomRight() *<API key> {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *CRadiusData) GetBottomLeft() *<API key> {
if m != nil {
return m.BottomLeft
}
return nil
}
type <API key> struct {
Horizontal *float64 `protobuf:"fixed64,1,opt,name=horizontal" json:"horizontal,omitempty"`
Vertical *float64 `protobuf:"fixed64,2,opt,name=vertical" json:"vertical,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetHorizontal() float64 {
if m != nil && m.Horizontal != nil {
return *m.Horizontal
}
return 0
}
func (m *<API key>) GetVertical() float64 {
if m != nil && m.Vertical != nil {
return *m.Vertical
}
return 0
}
type CBorderData struct {
Top *<API key> `protobuf:"bytes,1,opt,name=top" json:"top,omitempty"`
Right *<API key> `protobuf:"bytes,2,opt,name=right" json:"right,omitempty"`
Bottom *<API key> `protobuf:"bytes,3,opt,name=bottom" json:"bottom,omitempty"`
Left *<API key> `protobuf:"bytes,4,opt,name=left" json:"left,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CBorderData) Reset() { *m = CBorderData{} }
func (m *CBorderData) String() string { return proto.CompactTextString(m) }
func (*CBorderData) ProtoMessage() {}
func (m *CBorderData) GetTop() *<API key> {
if m != nil {
return m.Top
}
return nil
}
func (m *CBorderData) GetRight() *<API key> {
if m != nil {
return m.Right
}
return nil
}
func (m *CBorderData) GetBottom() *<API key> {
if m != nil {
return m.Bottom
}
return nil
}
func (m *CBorderData) GetLeft() *<API key> {
if m != nil {
return m.Left
}
return nil
}
type <API key> struct {
Style *uint32 `protobuf:"varint,1,opt,name=style" json:"style,omitempty"`
Width *float64 `protobuf:"fixed64,2,opt,name=width" json:"width,omitempty"`
Color *uint32 `protobuf:"varint,3,opt,name=color" json:"color,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetStyle() uint32 {
if m != nil && m.Style != nil {
return *m.Style
}
return 0
}
func (m *<API key>) GetWidth() float64 {
if m != nil && m.Width != nil {
return *m.Width
}
return 0
}
func (m *<API key>) GetColor() uint32 {
if m != nil && m.Color != nil {
return *m.Color
}
return 0
}
type CBorderImageData struct {
BorderTextureId *uint32 `protobuf:"varint,1,opt,name=border_texture_id" json:"border_texture_id,omitempty"`
PreserveMiddle *bool `protobuf:"varint,2,opt,name=preserve_middle" json:"preserve_middle,omitempty"`
TopSlicePixels *float64 `protobuf:"fixed64,3,opt,name=top_slice_pixels" json:"top_slice_pixels,omitempty"`
RightSlicePixels *float64 `protobuf:"fixed64,4,opt,name=right_slice_pixels" json:"right_slice_pixels,omitempty"`
BottomSlicePixels *float64 `protobuf:"fixed64,5,opt,name=bottom_slice_pixels" json:"bottom_slice_pixels,omitempty"`
LeftSlicePixels *float64 `protobuf:"fixed64,6,opt,name=left_slice_pixels" json:"left_slice_pixels,omitempty"`
TopWidth *<API key> `protobuf:"bytes,7,opt,name=top_width" json:"top_width,omitempty"`
RightWidth *<API key> `protobuf:"bytes,8,opt,name=right_width" json:"right_width,omitempty"`
BottomWidth *<API key> `protobuf:"bytes,9,opt,name=bottom_width" json:"bottom_width,omitempty"`
LeftWidth *<API key> `protobuf:"bytes,10,opt,name=left_width" json:"left_width,omitempty"`
TopOutsetPixels *float64 `protobuf:"fixed64,11,opt,name=top_outset_pixels" json:"top_outset_pixels,omitempty"`
RightOutsetPixels *float64 `protobuf:"fixed64,12,opt,name=right_outset_pixels" json:"right_outset_pixels,omitempty"`
BottomOutsetPixels *float64 `protobuf:"fixed64,13,opt,name=<API key>" json:"<API key>,omitempty"`
LeftOutsetPixels *float64 `protobuf:"fixed64,14,opt,name=left_outset_pixels" json:"left_outset_pixels,omitempty"`
<API key> *uint32 `protobuf:"varint,15,opt,name=<API key>" json:"<API key>,omitempty"`
VerticalRepeatType *uint32 `protobuf:"varint,16,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CBorderImageData) Reset() { *m = CBorderImageData{} }
func (m *CBorderImageData) String() string { return proto.CompactTextString(m) }
func (*CBorderImageData) ProtoMessage() {}
func (m *CBorderImageData) GetBorderTextureId() uint32 {
if m != nil && m.BorderTextureId != nil {
return *m.BorderTextureId
}
return 0
}
func (m *CBorderImageData) GetPreserveMiddle() bool {
if m != nil && m.PreserveMiddle != nil {
return *m.PreserveMiddle
}
return false
}
func (m *CBorderImageData) GetTopSlicePixels() float64 {
if m != nil && m.TopSlicePixels != nil {
return *m.TopSlicePixels
}
return 0
}
func (m *CBorderImageData) GetRightSlicePixels() float64 {
if m != nil && m.RightSlicePixels != nil {
return *m.RightSlicePixels
}
return 0
}
func (m *CBorderImageData) <API key>() float64 {
if m != nil && m.BottomSlicePixels != nil {
return *m.BottomSlicePixels
}
return 0
}
func (m *CBorderImageData) GetLeftSlicePixels() float64 {
if m != nil && m.LeftSlicePixels != nil {
return *m.LeftSlicePixels
}
return 0
}
func (m *CBorderImageData) GetTopWidth() *<API key> {
if m != nil {
return m.TopWidth
}
return nil
}
func (m *CBorderImageData) GetRightWidth() *<API key> {
if m != nil {
return m.RightWidth
}
return nil
}
func (m *CBorderImageData) GetBottomWidth() *<API key> {
if m != nil {
return m.BottomWidth
}
return nil
}
func (m *CBorderImageData) GetLeftWidth() *<API key> {
if m != nil {
return m.LeftWidth
}
return nil
}
func (m *CBorderImageData) GetTopOutsetPixels() float64 {
if m != nil && m.TopOutsetPixels != nil {
return *m.TopOutsetPixels
}
return 0
}
func (m *CBorderImageData) <API key>() float64 {
if m != nil && m.RightOutsetPixels != nil {
return *m.RightOutsetPixels
}
return 0
}
func (m *CBorderImageData) <API key>() float64 {
if m != nil && m.BottomOutsetPixels != nil {
return *m.BottomOutsetPixels
}
return 0
}
func (m *CBorderImageData) GetLeftOutsetPixels() float64 {
if m != nil && m.LeftOutsetPixels != nil {
return *m.LeftOutsetPixels
}
return 0
}
func (m *CBorderImageData) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CBorderImageData) <API key>() uint32 {
if m != nil && m.VerticalRepeatType != nil {
return *m.VerticalRepeatType
}
return 0
}
type <API key> struct {
WidthType *uint32 `protobuf:"varint,1,opt,name=width_type" json:"width_type,omitempty"`
WidthValue *float64 `protobuf:"fixed64,2,opt,name=width_value" json:"width_value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetWidthType() uint32 {
if m != nil && m.WidthType != nil {
return *m.WidthType
}
return 0
}
func (m *<API key>) GetWidthValue() float64 {
if m != nil && m.WidthValue != nil {
return *m.WidthValue
}
return 0
}
type CBoxShadowData struct {
Inset *bool `protobuf:"varint,1,opt,name=inset" json:"inset,omitempty"`
HorizontalOffset *float64 `protobuf:"fixed64,2,opt,name=horizontal_offset" json:"horizontal_offset,omitempty"`
VerticalOffset *float64 `protobuf:"fixed64,3,opt,name=vertical_offset" json:"vertical_offset,omitempty"`
BlurRadius *float64 `protobuf:"fixed64,4,opt,name=blur_radius" json:"blur_radius,omitempty"`
SpreadDistance *float64 `protobuf:"fixed64,5,opt,name=spread_distance" json:"spread_distance,omitempty"`
Color *uint32 `protobuf:"varint,6,opt,name=color" json:"color,omitempty"`
Fill *bool `protobuf:"varint,7,opt,name=fill" json:"fill,omitempty"`
Animating *bool `protobuf:"varint,8,opt,name=animating" json:"animating,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CBoxShadowData) Reset() { *m = CBoxShadowData{} }
func (m *CBoxShadowData) String() string { return proto.CompactTextString(m) }
func (*CBoxShadowData) ProtoMessage() {}
func (m *CBoxShadowData) GetInset() bool {
if m != nil && m.Inset != nil {
return *m.Inset
}
return false
}
func (m *CBoxShadowData) GetHorizontalOffset() float64 {
if m != nil && m.HorizontalOffset != nil {
return *m.HorizontalOffset
}
return 0
}
func (m *CBoxShadowData) GetVerticalOffset() float64 {
if m != nil && m.VerticalOffset != nil {
return *m.VerticalOffset
}
return 0
}
func (m *CBoxShadowData) GetBlurRadius() float64 {
if m != nil && m.BlurRadius != nil {
return *m.BlurRadius
}
return 0
}
func (m *CBoxShadowData) GetSpreadDistance() float64 {
if m != nil && m.SpreadDistance != nil {
return *m.SpreadDistance
}
return 0
}
func (m *CBoxShadowData) GetColor() uint32 {
if m != nil && m.Color != nil {
return *m.Color
}
return 0
}
func (m *CBoxShadowData) GetFill() bool {
if m != nil && m.Fill != nil {
return *m.Fill
}
return false
}
func (m *CBoxShadowData) GetAnimating() bool {
if m != nil && m.Animating != nil {
return *m.Animating
}
return false
}
type CTextShadowData struct {
HorizontalOffset *float64 `protobuf:"fixed64,2,opt,name=horizontal_offset" json:"horizontal_offset,omitempty"`
VerticalOffset *float64 `protobuf:"fixed64,3,opt,name=vertical_offset" json:"vertical_offset,omitempty"`
BlurRadius *float64 `protobuf:"fixed64,4,opt,name=blur_radius" json:"blur_radius,omitempty"`
Color *uint32 `protobuf:"varint,6,opt,name=color" json:"color,omitempty"`
Animating *bool `protobuf:"varint,8,opt,name=animating" json:"animating,omitempty"`
Strength *float64 `protobuf:"fixed64,9,opt,name=strength" json:"strength,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CTextShadowData) Reset() { *m = CTextShadowData{} }
func (m *CTextShadowData) String() string { return proto.CompactTextString(m) }
func (*CTextShadowData) ProtoMessage() {}
func (m *CTextShadowData) GetHorizontalOffset() float64 {
if m != nil && m.HorizontalOffset != nil {
return *m.HorizontalOffset
}
return 0
}
func (m *CTextShadowData) GetVerticalOffset() float64 {
if m != nil && m.VerticalOffset != nil {
return *m.VerticalOffset
}
return 0
}
func (m *CTextShadowData) GetBlurRadius() float64 {
if m != nil && m.BlurRadius != nil {
return *m.BlurRadius
}
return 0
}
func (m *CTextShadowData) GetColor() uint32 {
if m != nil && m.Color != nil {
return *m.Color
}
return 0
}
func (m *CTextShadowData) GetAnimating() bool {
if m != nil && m.Animating != nil {
return *m.Animating
}
return false
}
func (m *CTextShadowData) GetStrength() float64 {
if m != nil && m.Strength != nil {
return *m.Strength
}
return 0
}
type CMsgClipData struct {
Left *float64 `protobuf:"fixed64,1,opt,name=left" json:"left,omitempty"`
Top *float64 `protobuf:"fixed64,2,opt,name=top" json:"top,omitempty"`
Right *float64 `protobuf:"fixed64,3,opt,name=right" json:"right,omitempty"`
Bottom *float64 `protobuf:"fixed64,4,opt,name=bottom" json:"bottom,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgClipData) Reset() { *m = CMsgClipData{} }
func (m *CMsgClipData) String() string { return proto.CompactTextString(m) }
func (*CMsgClipData) ProtoMessage() {}
func (m *CMsgClipData) GetLeft() float64 {
if m != nil && m.Left != nil {
return *m.Left
}
return 0
}
func (m *CMsgClipData) GetTop() float64 {
if m != nil && m.Top != nil {
return *m.Top
}
return 0
}
func (m *CMsgClipData) GetRight() float64 {
if m != nil && m.Right != nil {
return *m.Right
}
return 0
}
func (m *CMsgClipData) GetBottom() float64 {
if m != nil && m.Bottom != nil {
return *m.Bottom
}
return 0
}
type <API key> struct {
LayerId *uint64 `protobuf:"varint,1,opt,name=layer_id" json:"layer_id,omitempty"`
Width *float64 `protobuf:"fixed64,2,opt,name=width" json:"width,omitempty"`
Height *float64 `protobuf:"fixed64,3,opt,name=height" json:"height,omitempty"`
LayerQuadTopLeftX *float64 `protobuf:"fixed64,4,opt,name=<API key>" json:"<API key>,omitempty"`
LayerQuadTopLeftY *float64 `protobuf:"fixed64,5,opt,name=<API key>" json:"<API key>,omitempty"`
LayerQuadTopLeftZ *float64 `protobuf:"fixed64,6,opt,name=<API key>" json:"<API key>,omitempty"`
LayerQuadTopRightX *float64 `protobuf:"fixed64,7,opt,name=<API key>" json:"<API key>,omitempty"`
LayerQuadTopRightY *float64 `protobuf:"fixed64,8,opt,name=<API key>" json:"<API key>,omitempty"`
LayerQuadTopRightZ *float64 `protobuf:"fixed64,9,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,10,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,11,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,12,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,13,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,14,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,15,opt,name=<API key>" json:"<API key>,omitempty"`
TransformM00 *float64 `protobuf:"fixed64,16,opt,name=transform_m00" json:"transform_m00,omitempty"`
TransformM01 *float64 `protobuf:"fixed64,17,opt,name=transform_m01" json:"transform_m01,omitempty"`
TransformM02 *float64 `protobuf:"fixed64,18,opt,name=transform_m02" json:"transform_m02,omitempty"`
TransformM03 *float64 `protobuf:"fixed64,19,opt,name=transform_m03" json:"transform_m03,omitempty"`
TransformM10 *float64 `protobuf:"fixed64,20,opt,name=transform_m10" json:"transform_m10,omitempty"`
TransformM11 *float64 `protobuf:"fixed64,21,opt,name=transform_m11" json:"transform_m11,omitempty"`
TransformM12 *float64 `protobuf:"fixed64,22,opt,name=transform_m12" json:"transform_m12,omitempty"`
TransformM13 *float64 `protobuf:"fixed64,23,opt,name=transform_m13" json:"transform_m13,omitempty"`
TransformM20 *float64 `protobuf:"fixed64,24,opt,name=transform_m20" json:"transform_m20,omitempty"`
TransformM21 *float64 `protobuf:"fixed64,25,opt,name=transform_m21" json:"transform_m21,omitempty"`
TransformM22 *float64 `protobuf:"fixed64,26,opt,name=transform_m22" json:"transform_m22,omitempty"`
TransformM23 *float64 `protobuf:"fixed64,27,opt,name=transform_m23" json:"transform_m23,omitempty"`
TransformM30 *float64 `protobuf:"fixed64,28,opt,name=transform_m30" json:"transform_m30,omitempty"`
TransformM31 *float64 `protobuf:"fixed64,29,opt,name=transform_m31" json:"transform_m31,omitempty"`
TransformM32 *float64 `protobuf:"fixed64,30,opt,name=transform_m32" json:"transform_m32,omitempty"`
TransformM33 *float64 `protobuf:"fixed64,31,opt,name=transform_m33" json:"transform_m33,omitempty"`
PerspectiveDepth *float64 `protobuf:"fixed64,32,opt,name=perspective_depth" json:"perspective_depth,omitempty"`
Opacity *float64 `protobuf:"fixed64,33,opt,name=opacity" json:"opacity,omitempty"`
CompositionColor *uint32 `protobuf:"varint,34,opt,name=composition_color" json:"composition_color,omitempty"`
Desaturation *float64 `protobuf:"fixed64,35,opt,name=desaturation" json:"desaturation,omitempty"`
<API key> *uint32 `protobuf:"varint,36,opt,name=<API key>" json:"<API key>,omitempty"`
OpacityMaskOpacity *float64 `protobuf:"fixed64,37,opt,name=<API key>" json:"<API key>,omitempty"`
Border *CBorderData `protobuf:"bytes,38,opt,name=border" json:"border,omitempty"`
BorderImage *CBorderImageData `protobuf:"bytes,39,opt,name=border_image" json:"border_image,omitempty"`
BorderRadius *CRadiusData `protobuf:"bytes,40,opt,name=border_radius" json:"border_radius,omitempty"`
BoxShadow *CBoxShadowData `protobuf:"bytes,41,opt,name=box_shadow" json:"box_shadow,omitempty"`
GaussianblurPasses *float64 `protobuf:"fixed64,42,opt,name=gaussianblur_passes" json:"gaussianblur_passes,omitempty"`
<API key> *float64 `protobuf:"fixed64,43,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,44,opt,name=<API key>" json:"<API key>,omitempty"`
Scale_2DFactorsX *float64 `protobuf:"fixed64,45,opt,name=scale_2d_factors_x" json:"scale_2d_factors_x,omitempty"`
Scale_2DFactorsY *float64 `protobuf:"fixed64,46,opt,name=scale_2d_factors_y" json:"scale_2d_factors_y,omitempty"`
Rotate_2D *float64 `protobuf:"fixed64,47,opt,name=rotate_2d" json:"rotate_2d,omitempty"`
NeedsClear *bool `protobuf:"varint,48,opt,name=needs_clear" json:"needs_clear,omitempty"`
NeedsDepth *bool `protobuf:"varint,49,opt,name=needs_depth" json:"needs_depth,omitempty"`
<API key> *bool `protobuf:"varint,50,opt,name=<API key>" json:"<API key>,omitempty"`
TextShadow *CTextShadowData `protobuf:"bytes,51,opt,name=text_shadow" json:"text_shadow,omitempty"`
MixBlendMode *uint32 `protobuf:"varint,52,opt,name=mix_blend_mode" json:"mix_blend_mode,omitempty"`
OccludedLeftEdge *float64 `protobuf:"fixed64,53,opt,name=occluded_left_edge" json:"occluded_left_edge,omitempty"`
OccludedTopEdge *float64 `protobuf:"fixed64,54,opt,name=occluded_top_edge" json:"occluded_top_edge,omitempty"`
OccludedRightEdge *float64 `protobuf:"fixed64,55,opt,name=occluded_right_edge" json:"occluded_right_edge,omitempty"`
OccludedBottomEdge *float64 `protobuf:"fixed64,56,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetLayerId() uint64 {
if m != nil && m.LayerId != nil {
return *m.LayerId
}
return 0
}
func (m *<API key>) GetWidth() float64 {
if m != nil && m.Width != nil {
return *m.Width
}
return 0
}
func (m *<API key>) GetHeight() float64 {
if m != nil && m.Height != nil {
return *m.Height
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopLeftX != nil {
return *m.LayerQuadTopLeftX
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopLeftY != nil {
return *m.LayerQuadTopLeftY
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopLeftZ != nil {
return *m.LayerQuadTopLeftZ
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopRightX != nil {
return *m.LayerQuadTopRightX
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopRightY != nil {
return *m.LayerQuadTopRightY
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.LayerQuadTopRightZ != nil {
return *m.LayerQuadTopRightZ
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) GetTransformM00() float64 {
if m != nil && m.TransformM00 != nil {
return *m.TransformM00
}
return 0
}
func (m *<API key>) GetTransformM01() float64 {
if m != nil && m.TransformM01 != nil {
return *m.TransformM01
}
return 0
}
func (m *<API key>) GetTransformM02() float64 {
if m != nil && m.TransformM02 != nil {
return *m.TransformM02
}
return 0
}
func (m *<API key>) GetTransformM03() float64 {
if m != nil && m.TransformM03 != nil {
return *m.TransformM03
}
return 0
}
func (m *<API key>) GetTransformM10() float64 {
if m != nil && m.TransformM10 != nil {
return *m.TransformM10
}
return 0
}
func (m *<API key>) GetTransformM11() float64 {
if m != nil && m.TransformM11 != nil {
return *m.TransformM11
}
return 0
}
func (m *<API key>) GetTransformM12() float64 {
if m != nil && m.TransformM12 != nil {
return *m.TransformM12
}
return 0
}
func (m *<API key>) GetTransformM13() float64 {
if m != nil && m.TransformM13 != nil {
return *m.TransformM13
}
return 0
}
func (m *<API key>) GetTransformM20() float64 {
if m != nil && m.TransformM20 != nil {
return *m.TransformM20
}
return 0
}
func (m *<API key>) GetTransformM21() float64 {
if m != nil && m.TransformM21 != nil {
return *m.TransformM21
}
return 0
}
func (m *<API key>) GetTransformM22() float64 {
if m != nil && m.TransformM22 != nil {
return *m.TransformM22
}
return 0
}
func (m *<API key>) GetTransformM23() float64 {
if m != nil && m.TransformM23 != nil {
return *m.TransformM23
}
return 0
}
func (m *<API key>) GetTransformM30() float64 {
if m != nil && m.TransformM30 != nil {
return *m.TransformM30
}
return 0
}
func (m *<API key>) GetTransformM31() float64 {
if m != nil && m.TransformM31 != nil {
return *m.TransformM31
}
return 0
}
func (m *<API key>) GetTransformM32() float64 {
if m != nil && m.TransformM32 != nil {
return *m.TransformM32
}
return 0
}
func (m *<API key>) GetTransformM33() float64 {
if m != nil && m.TransformM33 != nil {
return *m.TransformM33
}
return 0
}
func (m *<API key>) GetPerspectiveDepth() float64 {
if m != nil && m.PerspectiveDepth != nil {
return *m.PerspectiveDepth
}
return 0
}
func (m *<API key>) GetOpacity() float64 {
if m != nil && m.Opacity != nil {
return *m.Opacity
}
return 0
}
func (m *<API key>) GetCompositionColor() uint32 {
if m != nil && m.CompositionColor != nil {
return *m.CompositionColor
}
return 0
}
func (m *<API key>) GetDesaturation() float64 {
if m != nil && m.Desaturation != nil {
return *m.Desaturation
}
return 0
}
func (m *<API key>) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.OpacityMaskOpacity != nil {
return *m.OpacityMaskOpacity
}
return 0
}
func (m *<API key>) GetBorder() *CBorderData {
if m != nil {
return m.Border
}
return nil
}
func (m *<API key>) GetBorderImage() *CBorderImageData {
if m != nil {
return m.BorderImage
}
return nil
}
func (m *<API key>) GetBorderRadius() *CRadiusData {
if m != nil {
return m.BorderRadius
}
return nil
}
func (m *<API key>) GetBoxShadow() *CBoxShadowData {
if m != nil {
return m.BoxShadow
}
return nil
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.GaussianblurPasses != nil {
return *m.GaussianblurPasses
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *<API key>) GetScale_2DFactorsX() float64 {
if m != nil && m.Scale_2DFactorsX != nil {
return *m.Scale_2DFactorsX
}
return 0
}
func (m *<API key>) GetScale_2DFactorsY() float64 {
if m != nil && m.Scale_2DFactorsY != nil {
return *m.Scale_2DFactorsY
}
return 0
}
func (m *<API key>) GetRotate_2D() float64 {
if m != nil && m.Rotate_2D != nil {
return *m.Rotate_2D
}
return 0
}
func (m *<API key>) GetNeedsClear() bool {
if m != nil && m.NeedsClear != nil {
return *m.NeedsClear
}
return false
}
func (m *<API key>) GetNeedsDepth() bool {
if m != nil && m.NeedsDepth != nil {
return *m.NeedsDepth
}
return false
}
func (m *<API key>) <API key>() bool {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return false
}
func (m *<API key>) GetTextShadow() *CTextShadowData {
if m != nil {
return m.TextShadow
}
return nil
}
func (m *<API key>) GetMixBlendMode() uint32 {
if m != nil && m.MixBlendMode != nil {
return *m.MixBlendMode
}
return 0
}
func (m *<API key>) GetOccludedLeftEdge() float64 {
if m != nil && m.OccludedLeftEdge != nil {
return *m.OccludedLeftEdge
}
return 0
}
func (m *<API key>) GetOccludedTopEdge() float64 {
if m != nil && m.OccludedTopEdge != nil {
return *m.OccludedTopEdge
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.OccludedRightEdge != nil {
return *m.OccludedRightEdge
}
return 0
}
func (m *<API key>) <API key>() float64 {
if m != nil && m.OccludedBottomEdge != nil {
return *m.OccludedBottomEdge
}
return 0
}
type <API key> struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
type <API key> struct {
LayerId *uint64 `protobuf:"varint,1,opt,name=layer_id" json:"layer_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetLayerId() uint64 {
if m != nil && m.LayerId != nil {
return *m.LayerId
}
return 0
}
type CMsgTransitionData struct {
StartTime *float64 `protobuf:"fixed64,1,opt,name=start_time" json:"start_time,omitempty"`
DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds" json:"delay_seconds,omitempty"`
DurationSeconds *float64 `protobuf:"fixed64,3,opt,name=duration_seconds" json:"duration_seconds,omitempty"`
TimingFunc *uint32 `protobuf:"varint,4,opt,name=timing_func,def=0" json:"timing_func,omitempty"`
CubicBezier_0 *float32 `protobuf:"fixed32,5,opt,name=cubic_bezier_0" json:"cubic_bezier_0,omitempty"`
CubicBezier_1 *float32 `protobuf:"fixed32,6,opt,name=cubic_bezier_1" json:"cubic_bezier_1,omitempty"`
CubicBezier_2 *float32 `protobuf:"fixed32,7,opt,name=cubic_bezier_2" json:"cubic_bezier_2,omitempty"`
CubicBezier_3 *float32 `protobuf:"fixed32,8,opt,name=cubic_bezier_3" json:"cubic_bezier_3,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgTransitionData) Reset() { *m = CMsgTransitionData{} }
func (m *CMsgTransitionData) String() string { return proto.CompactTextString(m) }
func (*CMsgTransitionData) ProtoMessage() {}
const <API key> uint32 = 0
func (m *CMsgTransitionData) GetStartTime() float64 {
if m != nil && m.StartTime != nil {
return *m.StartTime
}
return 0
}
func (m *CMsgTransitionData) GetDelaySeconds() float64 {
if m != nil && m.DelaySeconds != nil {
return *m.DelaySeconds
}
return 0
}
func (m *CMsgTransitionData) GetDurationSeconds() float64 {
if m != nil && m.DurationSeconds != nil {
return *m.DurationSeconds
}
return 0
}
func (m *CMsgTransitionData) GetTimingFunc() uint32 {
if m != nil && m.TimingFunc != nil {
return *m.TimingFunc
}
return <API key>
}
func (m *CMsgTransitionData) GetCubicBezier_0() float32 {
if m != nil && m.CubicBezier_0 != nil {
return *m.CubicBezier_0
}
return 0
}
func (m *CMsgTransitionData) GetCubicBezier_1() float32 {
if m != nil && m.CubicBezier_1 != nil {
return *m.CubicBezier_1
}
return 0
}
func (m *CMsgTransitionData) GetCubicBezier_2() float32 {
if m != nil && m.CubicBezier_2 != nil {
return *m.CubicBezier_2
}
return 0
}
func (m *CMsgTransitionData) GetCubicBezier_3() float32 {
if m != nil && m.CubicBezier_3 != nil {
return *m.CubicBezier_3
}
return 0
}
type CMsgAnimationData struct {
StartTime *float64 `protobuf:"fixed64,1,opt,name=start_time" json:"start_time,omitempty"`
DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds" json:"delay_seconds,omitempty"`
DurationSeconds *float64 `protobuf:"fixed64,3,opt,name=duration_seconds" json:"duration_seconds,omitempty"`
TimingFunc *uint32 `protobuf:"varint,4,opt,name=timing_func" json:"timing_func,omitempty"`
CubicBezier_0 *float32 `protobuf:"fixed32,5,opt,name=cubic_bezier_0" json:"cubic_bezier_0,omitempty"`
CubicBezier_1 *float32 `protobuf:"fixed32,6,opt,name=cubic_bezier_1" json:"cubic_bezier_1,omitempty"`
CubicBezier_2 *float32 `protobuf:"fixed32,7,opt,name=cubic_bezier_2" json:"cubic_bezier_2,omitempty"`
CubicBezier_3 *float32 `protobuf:"fixed32,8,opt,name=cubic_bezier_3" json:"cubic_bezier_3,omitempty"`
Direction *uint32 `protobuf:"varint,9,opt,name=direction" json:"direction,omitempty"`
Iteration *float32 `protobuf:"fixed32,10,opt,name=iteration" json:"iteration,omitempty"`
Frames []*<API key> `protobuf:"bytes,11,rep,name=frames" json:"frames,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgAnimationData) Reset() { *m = CMsgAnimationData{} }
func (m *CMsgAnimationData) String() string { return proto.CompactTextString(m) }
func (*CMsgAnimationData) ProtoMessage() {}
func (m *CMsgAnimationData) GetStartTime() float64 {
if m != nil && m.StartTime != nil {
return *m.StartTime
}
return 0
}
func (m *CMsgAnimationData) GetDelaySeconds() float64 {
if m != nil && m.DelaySeconds != nil {
return *m.DelaySeconds
}
return 0
}
func (m *CMsgAnimationData) GetDurationSeconds() float64 {
if m != nil && m.DurationSeconds != nil {
return *m.DurationSeconds
}
return 0
}
func (m *CMsgAnimationData) GetTimingFunc() uint32 {
if m != nil && m.TimingFunc != nil {
return *m.TimingFunc
}
return 0
}
func (m *CMsgAnimationData) GetCubicBezier_0() float32 {
if m != nil && m.CubicBezier_0 != nil {
return *m.CubicBezier_0
}
return 0
}
func (m *CMsgAnimationData) GetCubicBezier_1() float32 {
if m != nil && m.CubicBezier_1 != nil {
return *m.CubicBezier_1
}
return 0
}
func (m *CMsgAnimationData) GetCubicBezier_2() float32 {
if m != nil && m.CubicBezier_2 != nil {
return *m.CubicBezier_2
}
return 0
}
func (m *CMsgAnimationData) GetCubicBezier_3() float32 {
if m != nil && m.CubicBezier_3 != nil {
return *m.CubicBezier_3
}
return 0
}
func (m *CMsgAnimationData) GetDirection() uint32 {
if m != nil && m.Direction != nil {
return *m.Direction
}
return 0
}
func (m *CMsgAnimationData) GetIteration() float32 {
if m != nil && m.Iteration != nil {
return *m.Iteration
}
return 0
}
func (m *CMsgAnimationData) GetFrames() []*<API key> {
if m != nil {
return m.Frames
}
return nil
}
type <API key> struct {
Percent *float32 `protobuf:"fixed32,1,opt,name=percent" json:"percent,omitempty"`
TimingFunc *uint32 `protobuf:"varint,2,opt,name=timing_func,def=0" json:"timing_func,omitempty"`
CubicBezier_0 *float32 `protobuf:"fixed32,3,opt,name=cubic_bezier_0" json:"cubic_bezier_0,omitempty"`
CubicBezier_1 *float32 `protobuf:"fixed32,4,opt,name=cubic_bezier_1" json:"cubic_bezier_1,omitempty"`
CubicBezier_2 *float32 `protobuf:"fixed32,5,opt,name=cubic_bezier_2" json:"cubic_bezier_2,omitempty"`
CubicBezier_3 *float32 `protobuf:"fixed32,6,opt,name=cubic_bezier_3" json:"cubic_bezier_3,omitempty"`
XXX_extensions map[int32]proto.Extension `json:"-"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
var <API key> = []proto.ExtensionRange{
{1000, 536870911},
}
func (*<API key>) ExtensionRangeArray() []proto.ExtensionRange {
return <API key>
}
func (m *<API key>) ExtensionMap() map[int32]proto.Extension {
if m.XXX_extensions == nil {
m.XXX_extensions = make(map[int32]proto.Extension)
}
return m.XXX_extensions
}
const <API key> uint32 = 0
func (m *<API key>) GetPercent() float32 {
if m != nil && m.Percent != nil {
return *m.Percent
}
return 0
}
func (m *<API key>) GetTimingFunc() uint32 {
if m != nil && m.TimingFunc != nil {
return *m.TimingFunc
}
return <API key>
}
func (m *<API key>) GetCubicBezier_0() float32 {
if m != nil && m.CubicBezier_0 != nil {
return *m.CubicBezier_0
}
return 0
}
func (m *<API key>) GetCubicBezier_1() float32 {
if m != nil && m.CubicBezier_1 != nil {
return *m.CubicBezier_1
}
return 0
}
func (m *<API key>) GetCubicBezier_2() float32 {
if m != nil && m.CubicBezier_2 != nil {
return *m.CubicBezier_2
}
return 0
}
func (m *<API key>) GetCubicBezier_3() float32 {
if m != nil && m.CubicBezier_3 != nil {
return *m.CubicBezier_3
}
return 0
}
type <API key> struct {
Base *CMsgPoint `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *CMsgPoint `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() *CMsgPoint {
if m != nil {
return m.Base
}
return nil
}
func (m *<API key>) GetTransition() *CMsgPoint {
if m != nil {
return m.Transition
}
return nil
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1012,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1012,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgPoint `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string {
return proto.CompactTextString(m)
}
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgPoint {
if m != nil {
return m.Data
}
return nil
}
type CMsgColor struct {
Base *uint32 `protobuf:"varint,1,opt,name=base" json:"base,omitempty"`
Transition *uint32 `protobuf:"varint,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgColor) Reset() { *m = CMsgColor{} }
func (m *CMsgColor) String() string { return proto.CompactTextString(m) }
func (*CMsgColor) ProtoMessage() {}
func (m *CMsgColor) GetBase() uint32 {
if m != nil && m.Base != nil {
return *m.Base
}
return 0
}
func (m *CMsgColor) GetTransition() uint32 {
if m != nil && m.Transition != nil {
return *m.Transition
}
return 0
}
func (m *CMsgColor) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgColor) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1001,
Name: "dota.CMsgColor.<API key>",
Tag: "bytes,1001,opt,name=<API key>",
}
type <API key> struct {
Data *uint32 `protobuf:"varint,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() uint32 {
if m != nil && m.Data != nil {
return *m.Data
}
return 0
}
type CMsgColorStop struct {
Position *float64 `protobuf:"fixed64,1,opt,name=position" json:"position,omitempty"`
ColorRgba *uint32 `protobuf:"varint,2,opt,name=color_rgba" json:"color_rgba,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgColorStop) Reset() { *m = CMsgColorStop{} }
func (m *CMsgColorStop) String() string { return proto.CompactTextString(m) }
func (*CMsgColorStop) ProtoMessage() {}
func (m *CMsgColorStop) GetPosition() float64 {
if m != nil && m.Position != nil {
return *m.Position
}
return 0
}
func (m *CMsgColorStop) GetColorRgba() uint32 {
if m != nil && m.ColorRgba != nil {
return *m.ColorRgba
}
return 0
}
type CMsgLinearGradient struct {
StartPosition *CMsgPoint `protobuf:"bytes,1,opt,name=start_position" json:"start_position,omitempty"`
EndPosition *CMsgPoint `protobuf:"bytes,2,opt,name=end_position" json:"end_position,omitempty"`
ColorStop []*CMsgColorStop `protobuf:"bytes,3,rep,name=color_stop" json:"color_stop,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgLinearGradient) Reset() { *m = CMsgLinearGradient{} }
func (m *CMsgLinearGradient) String() string { return proto.CompactTextString(m) }
func (*CMsgLinearGradient) ProtoMessage() {}
func (m *CMsgLinearGradient) GetStartPosition() *CMsgPoint {
if m != nil {
return m.StartPosition
}
return nil
}
func (m *CMsgLinearGradient) GetEndPosition() *CMsgPoint {
if m != nil {
return m.EndPosition
}
return nil
}
func (m *CMsgLinearGradient) GetColorStop() []*CMsgColorStop {
if m != nil {
return m.ColorStop
}
return nil
}
type CMsgRadialGradient struct {
CenterPosition *CMsgPoint `protobuf:"bytes,1,opt,name=center_position" json:"center_position,omitempty"`
OffsetDistance *CMsgPoint `protobuf:"bytes,2,opt,name=offset_distance" json:"offset_distance,omitempty"`
Radii *CMsgPoint `protobuf:"bytes,3,opt,name=radii" json:"radii,omitempty"`
ColorStop []*CMsgColorStop `protobuf:"bytes,4,rep,name=color_stop" json:"color_stop,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgRadialGradient) Reset() { *m = CMsgRadialGradient{} }
func (m *CMsgRadialGradient) String() string { return proto.CompactTextString(m) }
func (*CMsgRadialGradient) ProtoMessage() {}
func (m *CMsgRadialGradient) GetCenterPosition() *CMsgPoint {
if m != nil {
return m.CenterPosition
}
return nil
}
func (m *CMsgRadialGradient) GetOffsetDistance() *CMsgPoint {
if m != nil {
return m.OffsetDistance
}
return nil
}
func (m *CMsgRadialGradient) GetRadii() *CMsgPoint {
if m != nil {
return m.Radii
}
return nil
}
func (m *CMsgRadialGradient) GetColorStop() []*CMsgColorStop {
if m != nil {
return m.ColorStop
}
return nil
}
type CMsgParticle struct {
ParticlePosition *CMsgPoint `protobuf:"bytes,1,opt,name=particle_position" json:"particle_position,omitempty"`
ParticleSize *float32 `protobuf:"fixed32,2,opt,name=particle_size" json:"particle_size,omitempty"`
ParticleSharpness *float32 `protobuf:"fixed32,3,opt,name=particle_sharpness" json:"particle_sharpness,omitempty"`
ColorRgba *uint32 `protobuf:"varint,4,opt,name=color_rgba" json:"color_rgba,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgParticle) Reset() { *m = CMsgParticle{} }
func (m *CMsgParticle) String() string { return proto.CompactTextString(m) }
func (*CMsgParticle) ProtoMessage() {}
func (m *CMsgParticle) GetParticlePosition() *CMsgPoint {
if m != nil {
return m.ParticlePosition
}
return nil
}
func (m *CMsgParticle) GetParticleSize() float32 {
if m != nil && m.ParticleSize != nil {
return *m.ParticleSize
}
return 0
}
func (m *CMsgParticle) <API key>() float32 {
if m != nil && m.ParticleSharpness != nil {
return *m.ParticleSharpness
}
return 0
}
func (m *CMsgParticle) GetColorRgba() uint32 {
if m != nil && m.ColorRgba != nil {
return *m.ColorRgba
}
return 0
}
type CMsgParticleSystem struct {
BasePosition *CMsgPoint `protobuf:"bytes,1,opt,name=base_position" json:"base_position,omitempty"`
<API key> *CMsgPoint `protobuf:"bytes,2,opt,name=<API key>" json:"<API key>,omitempty"`
ParticleSize *float64 `protobuf:"fixed64,3,opt,name=particle_size" json:"particle_size,omitempty"`
<API key> *float64 `protobuf:"fixed64,4,opt,name=<API key>" json:"<API key>,omitempty"`
ParticlesPerSecond *float64 `protobuf:"fixed64,5,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,6,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,7,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *float64 `protobuf:"fixed64,8,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *CMsgPoint `protobuf:"bytes,9,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *CMsgPoint `protobuf:"bytes,10,opt,name=<API key>" json:"<API key>,omitempty"`
GravityAcceleration *CMsgPoint `protobuf:"bytes,11,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *CMsgPoint `protobuf:"bytes,12,opt,name=<API key>" json:"<API key>,omitempty"`
ColorStartRgba *uint32 `protobuf:"varint,13,opt,name=color_start_rgba" json:"color_start_rgba,omitempty"`
<API key> *uint32 `protobuf:"varint,14,opt,name=<API key>" json:"<API key>,omitempty"`
ColorEndRgba *uint32 `protobuf:"varint,15,opt,name=color_end_rgba" json:"color_end_rgba,omitempty"`
<API key> *uint32 `protobuf:"varint,16,opt,name=<API key>" json:"<API key>,omitempty"`
ParentPanelHandle *uint64 `protobuf:"varint,17,opt,name=parent_panel_handle" json:"parent_panel_handle,omitempty"`
ParentBrushIndex *uint32 `protobuf:"varint,18,opt,name=parent_brush_index" json:"parent_brush_index,omitempty"`
ParticleSharpness *float32 `protobuf:"fixed32,19,opt,name=particle_sharpness" json:"particle_sharpness,omitempty"`
<API key> *float32 `protobuf:"fixed32,20,opt,name=<API key>" json:"<API key>,omitempty"`
ParticleFlicker *float32 `protobuf:"fixed32,21,opt,name=particle_flicker" json:"particle_flicker,omitempty"`
<API key> *float32 `protobuf:"fixed32,22,opt,name=<API key>" json:"<API key>,omitempty"`
ParticleVelocityMin *CMsgPoint `protobuf:"bytes,23,opt,name=<API key>" json:"<API key>,omitempty"`
ParticleVelocityMax *CMsgPoint `protobuf:"bytes,24,opt,name=<API key>" json:"<API key>,omitempty"`
Particles []*CMsgParticle `protobuf:"bytes,50,rep,name=particles" json:"particles,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgParticleSystem) Reset() { *m = CMsgParticleSystem{} }
func (m *CMsgParticleSystem) String() string { return proto.CompactTextString(m) }
func (*CMsgParticleSystem) ProtoMessage() {}
func (m *CMsgParticleSystem) GetBasePosition() *CMsgPoint {
if m != nil {
return m.BasePosition
}
return nil
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.<API key>
}
return nil
}
func (m *CMsgParticleSystem) GetParticleSize() float64 {
if m != nil && m.ParticleSize != nil {
return *m.ParticleSize
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float64 {
if m != nil && m.ParticlesPerSecond != nil {
return *m.ParticlesPerSecond
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float64 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.<API key>
}
return nil
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.<API key>
}
return nil
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.GravityAcceleration
}
return nil
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.<API key>
}
return nil
}
func (m *CMsgParticleSystem) GetColorStartRgba() uint32 {
if m != nil && m.ColorStartRgba != nil {
return *m.ColorStartRgba
}
return 0
}
func (m *CMsgParticleSystem) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) GetColorEndRgba() uint32 {
if m != nil && m.ColorEndRgba != nil {
return *m.ColorEndRgba
}
return 0
}
func (m *CMsgParticleSystem) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() uint64 {
if m != nil && m.ParentPanelHandle != nil {
return *m.ParentPanelHandle
}
return 0
}
func (m *CMsgParticleSystem) GetParentBrushIndex() uint32 {
if m != nil && m.ParentBrushIndex != nil {
return *m.ParentBrushIndex
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float32 {
if m != nil && m.ParticleSharpness != nil {
return *m.ParticleSharpness
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) GetParticleFlicker() float32 {
if m != nil && m.ParticleFlicker != nil {
return *m.ParticleFlicker
}
return 0
}
func (m *CMsgParticleSystem) <API key>() float32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.ParticleVelocityMin
}
return nil
}
func (m *CMsgParticleSystem) <API key>() *CMsgPoint {
if m != nil {
return m.ParticleVelocityMax
}
return nil
}
func (m *CMsgParticleSystem) GetParticles() []*CMsgParticle {
if m != nil {
return m.Particles
}
return nil
}
type CMsgFillBrush struct {
Opacity *float64 `protobuf:"fixed64,1,opt,name=opacity" json:"opacity,omitempty"`
ColorRgba *uint32 `protobuf:"varint,2,opt,name=color_rgba" json:"color_rgba,omitempty"`
LinearGradient *CMsgLinearGradient `protobuf:"bytes,3,opt,name=linear_gradient" json:"linear_gradient,omitempty"`
RadialGradient *CMsgRadialGradient `protobuf:"bytes,4,opt,name=radial_gradient" json:"radial_gradient,omitempty"`
ParticleSystem *CMsgParticleSystem `protobuf:"bytes,5,opt,name=particle_system" json:"particle_system,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgFillBrush) Reset() { *m = CMsgFillBrush{} }
func (m *CMsgFillBrush) String() string { return proto.CompactTextString(m) }
func (*CMsgFillBrush) ProtoMessage() {}
func (m *CMsgFillBrush) GetOpacity() float64 {
if m != nil && m.Opacity != nil {
return *m.Opacity
}
return 0
}
func (m *CMsgFillBrush) GetColorRgba() uint32 {
if m != nil && m.ColorRgba != nil {
return *m.ColorRgba
}
return 0
}
func (m *CMsgFillBrush) GetLinearGradient() *CMsgLinearGradient {
if m != nil {
return m.LinearGradient
}
return nil
}
func (m *CMsgFillBrush) GetRadialGradient() *CMsgRadialGradient {
if m != nil {
return m.RadialGradient
}
return nil
}
func (m *CMsgFillBrush) GetParticleSystem() *CMsgParticleSystem {
if m != nil {
return m.ParticleSystem
}
return nil
}
type <API key> struct {
Base []*CMsgFillBrush `protobuf:"bytes,1,rep,name=base" json:"base,omitempty"`
Transition []*CMsgFillBrush `protobuf:"bytes,2,rep,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() []*CMsgFillBrush {
if m != nil {
return m.Base
}
return nil
}
func (m *<API key>) GetTransition() []*CMsgFillBrush {
if m != nil {
return m.Transition
}
return nil
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1007,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1007,opt,name=<API key>",
}
type <API key> struct {
Data []*CMsgFillBrush `protobuf:"bytes,1,rep,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string {
return proto.CompactTextString(m)
}
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() []*CMsgFillBrush {
if m != nil {
return m.Data
}
return nil
}
type <API key> struct {
FillBrush []*CMsgFillBrush `protobuf:"bytes,1,rep,name=fill_brush" json:"fill_brush,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetFillBrush() []*CMsgFillBrush {
if m != nil {
return m.FillBrush
}
return nil
}
type CMsgPanelPosition struct {
Base *CMsgPoint `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *CMsgPoint `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
ScrollOffset *CMsgPoint `protobuf:"bytes,5,opt,name=scroll_offset" json:"scroll_offset,omitempty"`
ScrollOffsetTarget *CMsgPoint `protobuf:"bytes,6,opt,name=<API key>" json:"<API key>,omitempty"`
ScrollTransitionX *CMsgTransitionData `protobuf:"bytes,7,opt,name=scroll_transition_x" json:"scroll_transition_x,omitempty"`
ScrollTransitionY *CMsgTransitionData `protobuf:"bytes,8,opt,name=scroll_transition_y" json:"scroll_transition_y,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgPanelPosition) Reset() { *m = CMsgPanelPosition{} }
func (m *CMsgPanelPosition) String() string { return proto.CompactTextString(m) }
func (*CMsgPanelPosition) ProtoMessage() {}
func (m *CMsgPanelPosition) GetBase() *CMsgPoint {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgPanelPosition) GetTransition() *CMsgPoint {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgPanelPosition) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgPanelPosition) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
func (m *CMsgPanelPosition) GetScrollOffset() *CMsgPoint {
if m != nil {
return m.ScrollOffset
}
return nil
}
func (m *CMsgPanelPosition) <API key>() *CMsgPoint {
if m != nil {
return m.ScrollOffsetTarget
}
return nil
}
func (m *CMsgPanelPosition) <API key>() *CMsgTransitionData {
if m != nil {
return m.ScrollTransitionX
}
return nil
}
func (m *CMsgPanelPosition) <API key>() *CMsgTransitionData {
if m != nil {
return m.ScrollTransitionY
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1011,
Name: "dota.CMsgPanelPosition.<API key>",
Tag: "bytes,1011,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgPoint `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgPoint {
if m != nil {
return m.Data
}
return nil
}
type CMsgOpacity struct {
Base *float64 `protobuf:"fixed64,1,opt,name=base" json:"base,omitempty"`
Transition *float64 `protobuf:"fixed64,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgOpacity) Reset() { *m = CMsgOpacity{} }
func (m *CMsgOpacity) String() string { return proto.CompactTextString(m) }
func (*CMsgOpacity) ProtoMessage() {}
func (m *CMsgOpacity) GetBase() float64 {
if m != nil && m.Base != nil {
return *m.Base
}
return 0
}
func (m *CMsgOpacity) GetTransition() float64 {
if m != nil && m.Transition != nil {
return *m.Transition
}
return 0
}
func (m *CMsgOpacity) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgOpacity) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1004,
Name: "dota.CMsgOpacity.<API key>",
Tag: "bytes,1004,opt,name=<API key>",
}
type <API key> struct {
Data *float64 `protobuf:"fixed64,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() float64 {
if m != nil && m.Data != nil {
return *m.Data
}
return 0
}
type CMsgRotate2D struct {
Base *float64 `protobuf:"fixed64,1,opt,name=base" json:"base,omitempty"`
Transition *float64 `protobuf:"fixed64,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgRotate2D) Reset() { *m = CMsgRotate2D{} }
func (m *CMsgRotate2D) String() string { return proto.CompactTextString(m) }
func (*CMsgRotate2D) ProtoMessage() {}
func (m *CMsgRotate2D) GetBase() float64 {
if m != nil && m.Base != nil {
return *m.Base
}
return 0
}
func (m *CMsgRotate2D) GetTransition() float64 {
if m != nil && m.Transition != nil {
return *m.Transition
}
return 0
}
func (m *CMsgRotate2D) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgRotate2D) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1014,
Name: "dota.CMsgRotate2D.<API key>",
Tag: "bytes,1014,opt,name=<API key>",
}
type <API key> struct {
Data *float64 `protobuf:"fixed64,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() float64 {
if m != nil && m.Data != nil {
return *m.Data
}
return 0
}
type CMsgOpacityMaskData struct {
<API key> *uint32 `protobuf:"varint,1,opt,name=<API key>" json:"<API key>,omitempty"`
OpacityMaskOpacity *float64 `protobuf:"fixed64,2,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgOpacityMaskData) Reset() { *m = CMsgOpacityMaskData{} }
func (m *CMsgOpacityMaskData) String() string { return proto.CompactTextString(m) }
func (*CMsgOpacityMaskData) ProtoMessage() {}
func (m *CMsgOpacityMaskData) <API key>() uint32 {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return 0
}
func (m *CMsgOpacityMaskData) <API key>() float64 {
if m != nil && m.OpacityMaskOpacity != nil {
return *m.OpacityMaskOpacity
}
return 0
}
type CMsgOpacityMask struct {
Base *CMsgOpacityMaskData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *CMsgOpacityMaskData `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgOpacityMask) Reset() { *m = CMsgOpacityMask{} }
func (m *CMsgOpacityMask) String() string { return proto.CompactTextString(m) }
func (*CMsgOpacityMask) ProtoMessage() {}
func (m *CMsgOpacityMask) GetBase() *CMsgOpacityMaskData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgOpacityMask) GetTransition() *CMsgOpacityMaskData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgOpacityMask) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgOpacityMask) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1013,
Name: "dota.CMsgOpacityMask.<API key>",
Tag: "bytes,1013,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgOpacityMaskData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgOpacityMaskData {
if m != nil {
return m.Data
}
return nil
}
type CMsgDesaturation struct {
Base *float64 `protobuf:"fixed64,1,opt,name=base" json:"base,omitempty"`
Transition *float64 `protobuf:"fixed64,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgDesaturation) Reset() { *m = CMsgDesaturation{} }
func (m *CMsgDesaturation) String() string { return proto.CompactTextString(m) }
func (*CMsgDesaturation) ProtoMessage() {}
func (m *CMsgDesaturation) GetBase() float64 {
if m != nil && m.Base != nil {
return *m.Base
}
return 0
}
func (m *CMsgDesaturation) GetTransition() float64 {
if m != nil && m.Transition != nil {
return *m.Transition
}
return 0
}
func (m *CMsgDesaturation) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgDesaturation) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1005,
Name: "dota.CMsgDesaturation.<API key>",
Tag: "bytes,1005,opt,name=<API key>",
}
type <API key> struct {
Data *float64 `protobuf:"fixed64,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() float64 {
if m != nil && m.Data != nil {
return *m.Data
}
return 0
}
type CMsgGaussianValues struct {
Passes *float64 `protobuf:"fixed64,1,opt,name=passes" json:"passes,omitempty"`
StddevHor *float64 `protobuf:"fixed64,2,opt,name=stddev_hor" json:"stddev_hor,omitempty"`
StddevVer *float64 `protobuf:"fixed64,3,opt,name=stddev_ver" json:"stddev_ver,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgGaussianValues) Reset() { *m = CMsgGaussianValues{} }
func (m *CMsgGaussianValues) String() string { return proto.CompactTextString(m) }
func (*CMsgGaussianValues) ProtoMessage() {}
func (m *CMsgGaussianValues) GetPasses() float64 {
if m != nil && m.Passes != nil {
return *m.Passes
}
return 0
}
func (m *CMsgGaussianValues) GetStddevHor() float64 {
if m != nil && m.StddevHor != nil {
return *m.StddevHor
}
return 0
}
func (m *CMsgGaussianValues) GetStddevVer() float64 {
if m != nil && m.StddevVer != nil {
return *m.StddevVer
}
return 0
}
type CMsgGaussianBlur struct {
Base *CMsgGaussianValues `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *CMsgGaussianValues `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgGaussianBlur) Reset() { *m = CMsgGaussianBlur{} }
func (m *CMsgGaussianBlur) String() string { return proto.CompactTextString(m) }
func (*CMsgGaussianBlur) ProtoMessage() {}
func (m *CMsgGaussianBlur) GetBase() *CMsgGaussianValues {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgGaussianBlur) GetTransition() *CMsgGaussianValues {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgGaussianBlur) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgGaussianBlur) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1008,
Name: "dota.CMsgGaussianBlur.<API key>",
Tag: "bytes,1008,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgGaussianValues `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgGaussianValues {
if m != nil {
return m.Data
}
return nil
}
type <API key> struct {
Base *float64 `protobuf:"fixed64,1,opt,name=base" json:"base,omitempty"`
Transition *float64 `protobuf:"fixed64,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() float64 {
if m != nil && m.Base != nil {
return *m.Base
}
return 0
}
func (m *<API key>) GetTransition() float64 {
if m != nil && m.Transition != nil {
return *m.Transition
}
return 0
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1003,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1003,opt,name=<API key>",
}
type <API key> struct {
Data *float64 `protobuf:"fixed64,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string {
return proto.CompactTextString(m)
}
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() float64 {
if m != nil && m.Data != nil {
return *m.Data
}
return 0
}
type <API key> struct {
Base *CMsgPoint `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *CMsgPoint `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() *CMsgPoint {
if m != nil {
return m.Base
}
return nil
}
func (m *<API key>) GetTransition() *CMsgPoint {
if m != nil {
return m.Transition
}
return nil
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1002,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1002,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgPoint `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string {
return proto.CompactTextString(m)
}
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgPoint {
if m != nil {
return m.Data
}
return nil
}
type <API key> struct {
X *float64 `protobuf:"fixed64,1,opt,name=x" json:"x,omitempty"`
Y *float64 `protobuf:"fixed64,2,opt,name=y" json:"y,omitempty"`
XIsPercent *bool `protobuf:"varint,3,opt,name=x_is_percent" json:"x_is_percent,omitempty"`
YIsPercent *bool `protobuf:"varint,4,opt,name=y_is_percent" json:"y_is_percent,omitempty"`
IsParentRelative *bool `protobuf:"varint,5,opt,name=is_parent_relative" json:"is_parent_relative,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetX() float64 {
if m != nil && m.X != nil {
return *m.X
}
return 0
}
func (m *<API key>) GetY() float64 {
if m != nil && m.Y != nil {
return *m.Y
}
return 0
}
func (m *<API key>) GetXIsPercent() bool {
if m != nil && m.XIsPercent != nil {
return *m.XIsPercent
}
return false
}
func (m *<API key>) GetYIsPercent() bool {
if m != nil && m.YIsPercent != nil {
return *m.YIsPercent
}
return false
}
func (m *<API key>) GetIsParentRelative() bool {
if m != nil && m.IsParentRelative != nil {
return *m.IsParentRelative
}
return false
}
type <API key> struct {
Base *<API key> `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
Transition *<API key> `protobuf:"bytes,2,opt,name=transition" json:"transition,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,3,opt,name=transition_data" json:"transition_data,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() *<API key> {
if m != nil {
return m.Base
}
return nil
}
func (m *<API key>) GetTransition() *<API key> {
if m != nil {
return m.Transition
}
return nil
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1015,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1015,opt,name=<API key>",
}
type <API key> struct {
Data *<API key> `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *<API key> {
if m != nil {
return m.Data
}
return nil
}
type <API key> struct {
Base *CMsgMatrix4X4 `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CMsgMatrix4X4 `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetBase() *CMsgMatrix4X4 {
if m != nil {
return m.Base
}
return nil
}
func (m *<API key>) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *<API key>) GetTransition() *CMsgMatrix4X4 {
if m != nil {
return m.Transition
}
return nil
}
func (m *<API key>) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1000,
Name: "dota.<API key>.<API key>",
Tag: "bytes,1000,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgMatrix4X4 `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() {
*m = <API key>{}
}
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgMatrix4X4 {
if m != nil {
return m.Data
}
return nil
}
type CMsgBorderRadius struct {
Base *CRadiusData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CRadiusData `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgBorderRadius) Reset() { *m = CMsgBorderRadius{} }
func (m *CMsgBorderRadius) String() string { return proto.CompactTextString(m) }
func (*CMsgBorderRadius) ProtoMessage() {}
func (m *CMsgBorderRadius) GetBase() *CRadiusData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgBorderRadius) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgBorderRadius) GetTransition() *CRadiusData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgBorderRadius) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1006,
Name: "dota.CMsgBorderRadius.<API key>",
Tag: "bytes,1006,opt,name=<API key>",
}
type <API key> struct {
Data *CRadiusData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CRadiusData {
if m != nil {
return m.Data
}
return nil
}
type CMsgBorder struct {
Base *CBorderData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CBorderData `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgBorder) Reset() { *m = CMsgBorder{} }
func (m *CMsgBorder) String() string { return proto.CompactTextString(m) }
func (*CMsgBorder) ProtoMessage() {}
func (m *CMsgBorder) GetBase() *CBorderData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgBorder) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgBorder) GetTransition() *CBorderData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgBorder) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1009,
Name: "dota.CMsgBorder.<API key>",
Tag: "bytes,1009,opt,name=<API key>",
}
type <API key> struct {
Data *CBorderData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CBorderData {
if m != nil {
return m.Data
}
return nil
}
type CMsgBoxShadow struct {
Base *CBoxShadowData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CBoxShadowData `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgBoxShadow) Reset() { *m = CMsgBoxShadow{} }
func (m *CMsgBoxShadow) String() string { return proto.CompactTextString(m) }
func (*CMsgBoxShadow) ProtoMessage() {}
func (m *CMsgBoxShadow) GetBase() *CBoxShadowData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgBoxShadow) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgBoxShadow) GetTransition() *CBoxShadowData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgBoxShadow) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1010,
Name: "dota.CMsgBoxShadow.<API key>",
Tag: "bytes,1010,opt,name=<API key>",
}
type <API key> struct {
Data *CBoxShadowData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CBoxShadowData {
if m != nil {
return m.Data
}
return nil
}
type CMsgTextShadow struct {
Base *CTextShadowData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CTextShadowData `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgTextShadow) Reset() { *m = CMsgTextShadow{} }
func (m *CMsgTextShadow) String() string { return proto.CompactTextString(m) }
func (*CMsgTextShadow) ProtoMessage() {}
func (m *CMsgTextShadow) GetBase() *CTextShadowData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgTextShadow) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgTextShadow) GetTransition() *CTextShadowData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgTextShadow) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1017,
Name: "dota.CMsgTextShadow.<API key>",
Tag: "bytes,1017,opt,name=<API key>",
}
type <API key> struct {
Data *CTextShadowData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CTextShadowData {
if m != nil {
return m.Data
}
return nil
}
type CMsgClip struct {
Base *CMsgClipData `protobuf:"bytes,1,opt,name=base" json:"base,omitempty"`
TransitionData *CMsgTransitionData `protobuf:"bytes,2,opt,name=transition_data" json:"transition_data,omitempty"`
Transition *CMsgClipData `protobuf:"bytes,3,opt,name=transition" json:"transition,omitempty"`
Animations []*CMsgAnimationData `protobuf:"bytes,4,rep,name=animations" json:"animations,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgClip) Reset() { *m = CMsgClip{} }
func (m *CMsgClip) String() string { return proto.CompactTextString(m) }
func (*CMsgClip) ProtoMessage() {}
func (m *CMsgClip) GetBase() *CMsgClipData {
if m != nil {
return m.Base
}
return nil
}
func (m *CMsgClip) GetTransitionData() *CMsgTransitionData {
if m != nil {
return m.TransitionData
}
return nil
}
func (m *CMsgClip) GetTransition() *CMsgClipData {
if m != nil {
return m.Transition
}
return nil
}
func (m *CMsgClip) GetAnimations() []*CMsgAnimationData {
if m != nil {
return m.Animations
}
return nil
}
var <API key> = &proto.ExtensionDesc{
ExtendedType: (*<API key>)(nil),
ExtensionType: (*<API key>)(nil),
Field: 1018,
Name: "dota.CMsgClip.<API key>",
Tag: "bytes,1018,opt,name=<API key>",
}
type <API key> struct {
Data *CMsgClipData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetData() *CMsgClipData {
if m != nil {
return m.Data
}
return nil
}
type CMsgPushClipLayer struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
BorderRadius *CRadiusData `protobuf:"bytes,3,opt,name=border_radius" json:"border_radius,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgPushClipLayer) Reset() { *m = CMsgPushClipLayer{} }
func (m *CMsgPushClipLayer) String() string { return proto.CompactTextString(m) }
func (*CMsgPushClipLayer) ProtoMessage() {}
func (m *CMsgPushClipLayer) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *CMsgPushClipLayer) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *CMsgPushClipLayer) GetBorderRadius() *CRadiusData {
if m != nil {
return m.BorderRadius
}
return nil
}
type CMsgPopClipLayer struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgPopClipLayer) Reset() { *m = CMsgPopClipLayer{} }
func (m *CMsgPopClipLayer) String() string { return proto.CompactTextString(m) }
func (*CMsgPopClipLayer) ProtoMessage() {}
type <API key> struct {
ContextId *uint64 `protobuf:"varint,1,opt,name=context_id" json:"context_id,omitempty"`
Width *float64 `protobuf:"fixed64,3,opt,name=width" json:"width,omitempty"`
Height *float64 `protobuf:"fixed64,4,opt,name=height" json:"height,omitempty"`
<API key> *bool `protobuf:"varint,5,opt,name=<API key>" json:"<API key>,omitempty"`
Zindex *float32 `protobuf:"fixed32,6,opt,name=zindex" json:"zindex,omitempty"`
PanelPosition *CMsgPanelPosition `protobuf:"bytes,7,opt,name=panel_position" json:"panel_position,omitempty"`
TransformMatrix *<API key> `protobuf:"bytes,8,opt,name=transform_matrix" json:"transform_matrix,omitempty"`
TransformOrigin *<API key> `protobuf:"bytes,9,opt,name=transform_origin" json:"transform_origin,omitempty"`
<API key> *<API key> `protobuf:"bytes,10,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *<API key> `protobuf:"bytes,11,opt,name=<API key>" json:"<API key>,omitempty"`
Opacity *CMsgOpacity `protobuf:"bytes,12,opt,name=opacity" json:"opacity,omitempty"`
WashColor *CMsgColor `protobuf:"bytes,13,opt,name=wash_color" json:"wash_color,omitempty"`
Desaturation *CMsgDesaturation `protobuf:"bytes,14,opt,name=desaturation" json:"desaturation,omitempty"`
OpacityMask *CMsgOpacityMask `protobuf:"bytes,15,opt,name=opacity_mask" json:"opacity_mask,omitempty"`
BorderRadius *CMsgBorderRadius `protobuf:"bytes,16,opt,name=border_radius" json:"border_radius,omitempty"`
GaussianBlur *CMsgGaussianBlur `protobuf:"bytes,17,opt,name=gaussian_blur" json:"gaussian_blur,omitempty"`
Border *CMsgBorder `protobuf:"bytes,18,opt,name=border" json:"border,omitempty"`
BorderImage *CBorderImageData `protobuf:"bytes,19,opt,name=border_image" json:"border_image,omitempty"`
BoxShadow *CMsgBoxShadow `protobuf:"bytes,20,opt,name=box_shadow" json:"box_shadow,omitempty"`
Scale_2DCentered *<API key> `protobuf:"bytes,21,opt,name=scale_2d_centered" json:"scale_2d_centered,omitempty"`
Rotate_2DCentered *CMsgRotate2D `protobuf:"bytes,22,opt,name=rotate_2d_centered" json:"rotate_2d_centered,omitempty"`
TextShadow *CMsgTextShadow `protobuf:"bytes,23,opt,name=text_shadow" json:"text_shadow,omitempty"`
Clip *CMsgClip `protobuf:"bytes,24,opt,name=clip" json:"clip,omitempty"`
<API key> *bool `protobuf:"varint,25,opt,name=<API key>" json:"<API key>,omitempty"`
NeedsFullRepaint *int32 `protobuf:"varint,26,opt,name=needs_full_repaint" json:"needs_full_repaint,omitempty"`
WantsHitTest *bool `protobuf:"varint,27,opt,name=wants_hit_test" json:"wants_hit_test,omitempty"`
MixBlendMode *uint32 `protobuf:"varint,28,opt,name=mix_blend_mode" json:"mix_blend_mode,omitempty"`
OpaqueBackground *bool `protobuf:"varint,29,opt,name=opaque_background" json:"opaque_background,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetContextId() uint64 {
if m != nil && m.ContextId != nil {
return *m.ContextId
}
return 0
}
func (m *<API key>) GetWidth() float64 {
if m != nil && m.Width != nil {
return *m.Width
}
return 0
}
func (m *<API key>) GetHeight() float64 {
if m != nil && m.Height != nil {
return *m.Height
}
return 0
}
func (m *<API key>) <API key>() bool {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return false
}
func (m *<API key>) GetZindex() float32 {
if m != nil && m.Zindex != nil {
return *m.Zindex
}
return 0
}
func (m *<API key>) GetPanelPosition() *CMsgPanelPosition {
if m != nil {
return m.PanelPosition
}
return nil
}
func (m *<API key>) GetTransformMatrix() *<API key> {
if m != nil {
return m.TransformMatrix
}
return nil
}
func (m *<API key>) GetTransformOrigin() *<API key> {
if m != nil {
return m.TransformOrigin
}
return nil
}
func (m *<API key>) <API key>() *<API key> {
if m != nil {
return m.<API key>
}
return nil
}
func (m *<API key>) <API key>() *<API key> {
if m != nil {
return m.<API key>
}
return nil
}
func (m *<API key>) GetOpacity() *CMsgOpacity {
if m != nil {
return m.Opacity
}
return nil
}
func (m *<API key>) GetWashColor() *CMsgColor {
if m != nil {
return m.WashColor
}
return nil
}
func (m *<API key>) GetDesaturation() *CMsgDesaturation {
if m != nil {
return m.Desaturation
}
return nil
}
func (m *<API key>) GetOpacityMask() *CMsgOpacityMask {
if m != nil {
return m.OpacityMask
}
return nil
}
func (m *<API key>) GetBorderRadius() *CMsgBorderRadius {
if m != nil {
return m.BorderRadius
}
return nil
}
func (m *<API key>) GetGaussianBlur() *CMsgGaussianBlur {
if m != nil {
return m.GaussianBlur
}
return nil
}
func (m *<API key>) GetBorder() *CMsgBorder {
if m != nil {
return m.Border
}
return nil
}
func (m *<API key>) GetBorderImage() *CBorderImageData {
if m != nil {
return m.BorderImage
}
return nil
}
func (m *<API key>) GetBoxShadow() *CMsgBoxShadow {
if m != nil {
return m.BoxShadow
}
return nil
}
func (m *<API key>) GetScale_2DCentered() *<API key> {
if m != nil {
return m.Scale_2DCentered
}
return nil
}
func (m *<API key>) <API key>() *CMsgRotate2D {
if m != nil {
return m.Rotate_2DCentered
}
return nil
}
func (m *<API key>) GetTextShadow() *CMsgTextShadow {
if m != nil {
return m.TextShadow
}
return nil
}
func (m *<API key>) GetClip() *CMsgClip {
if m != nil {
return m.Clip
}
return nil
}
func (m *<API key>) <API key>() bool {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return false
}
func (m *<API key>) GetNeedsFullRepaint() int32 {
if m != nil && m.NeedsFullRepaint != nil {
return *m.NeedsFullRepaint
}
return 0
}
func (m *<API key>) GetWantsHitTest() bool {
if m != nil && m.WantsHitTest != nil {
return *m.WantsHitTest
}
return false
}
func (m *<API key>) GetMixBlendMode() uint32 {
if m != nil && m.MixBlendMode != nil {
return *m.MixBlendMode
}
return 0
}
func (m *<API key>) GetOpaqueBackground() bool {
if m != nil && m.OpaqueBackground != nil {
return *m.OpaqueBackground
}
return false
}
type CMsgPopAAndTContext struct {
ContextId *uint64 `protobuf:"varint,1,opt,name=context_id" json:"context_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgPopAAndTContext) Reset() { *m = CMsgPopAAndTContext{} }
func (m *CMsgPopAAndTContext) String() string { return proto.CompactTextString(m) }
func (*CMsgPopAAndTContext) ProtoMessage() {}
func (m *CMsgPopAAndTContext) GetContextId() uint64 {
if m != nil && m.ContextId != nil {
return *m.ContextId
}
return 0
}
type <API key> struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
type <API key> struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
type CMsgBeginPaintLast struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgBeginPaintLast) Reset() { *m = CMsgBeginPaintLast{} }
func (m *CMsgBeginPaintLast) String() string { return proto.CompactTextString(m) }
func (*CMsgBeginPaintLast) ProtoMessage() {}
type CMsgEndPaintLast struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgEndPaintLast) Reset() { *m = CMsgEndPaintLast{} }
func (m *CMsgEndPaintLast) String() string { return proto.CompactTextString(m) }
func (*CMsgEndPaintLast) ProtoMessage() {}
type CMsgDrawFilledRect struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
FillBrushCollection *<API key> `protobuf:"bytes,3,opt,name=<API key>" json:"<API key>,omitempty"`
Antialiasing *uint32 `protobuf:"varint,4,opt,name=antialiasing" json:"antialiasing,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgDrawFilledRect) Reset() { *m = CMsgDrawFilledRect{} }
func (m *CMsgDrawFilledRect) String() string { return proto.CompactTextString(m) }
func (*CMsgDrawFilledRect) ProtoMessage() {}
func (m *CMsgDrawFilledRect) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *CMsgDrawFilledRect) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *CMsgDrawFilledRect) <API key>() *<API key> {
if m != nil {
return m.FillBrushCollection
}
return nil
}
func (m *CMsgDrawFilledRect) GetAntialiasing() uint32 {
if m != nil && m.Antialiasing != nil {
return *m.Antialiasing
}
return 0
}
type <API key> struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
FillBrushCollection *<API key> `protobuf:"bytes,3,opt,name=<API key>" json:"<API key>,omitempty"`
Antialiasing *uint32 `protobuf:"varint,4,opt,name=antialiasing" json:"antialiasing,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) <API key>() *<API key> {
if m != nil {
return m.FillBrushCollection
}
return nil
}
func (m *<API key>) GetAntialiasing() uint32 {
if m != nil && m.Antialiasing != nil {
return *m.Antialiasing
}
return 0
}
type <API key> struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
TextureId *uint32 `protobuf:"varint,3,opt,name=texture_id" json:"texture_id,omitempty"`
TextureTopLeft *CMsgPoint `protobuf:"bytes,4,opt,name=texture_top_left" json:"texture_top_left,omitempty"`
TextureBottomRight *CMsgPoint `protobuf:"bytes,5,opt,name=<API key>" json:"<API key>,omitempty"`
TextureSerial *int32 `protobuf:"varint,6,opt,name=texture_serial,def=0" json:"texture_serial,omitempty"`
TextureSampleMode *uint32 `protobuf:"varint,7,opt,name=texture_sample_mode,def=0" json:"texture_sample_mode,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
const <API key> int32 = 0
const <API key> uint32 = 0
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetTextureId() uint32 {
if m != nil && m.TextureId != nil {
return *m.TextureId
}
return 0
}
func (m *<API key>) GetTextureTopLeft() *CMsgPoint {
if m != nil {
return m.TextureTopLeft
}
return nil
}
func (m *<API key>) <API key>() *CMsgPoint {
if m != nil {
return m.TextureBottomRight
}
return nil
}
func (m *<API key>) GetTextureSerial() int32 {
if m != nil && m.TextureSerial != nil {
return *m.TextureSerial
}
return <API key>
}
func (m *<API key>) <API key>() uint32 {
if m != nil && m.TextureSampleMode != nil {
return *m.TextureSampleMode
}
return <API key>
}
type <API key> struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
TextureId *uint32 `protobuf:"varint,3,opt,name=texture_id" json:"texture_id,omitempty"`
TextureTopLeft *CMsgPoint `protobuf:"bytes,4,opt,name=texture_top_left" json:"texture_top_left,omitempty"`
TextureBottomRight *CMsgPoint `protobuf:"bytes,5,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetTextureId() uint32 {
if m != nil && m.TextureId != nil {
return *m.TextureId
}
return 0
}
func (m *<API key>) GetTextureTopLeft() *CMsgPoint {
if m != nil {
return m.TextureTopLeft
}
return nil
}
func (m *<API key>) <API key>() *CMsgPoint {
if m != nil {
return m.TextureBottomRight
}
return nil
}
type <API key> struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
TextureId *uint32 `protobuf:"varint,3,opt,name=texture_id" json:"texture_id,omitempty"`
TextureTopLeft *CMsgPoint `protobuf:"bytes,4,opt,name=texture_top_left" json:"texture_top_left,omitempty"`
TextureBottomRight *CMsgPoint `protobuf:"bytes,5,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetTextureId() uint32 {
if m != nil && m.TextureId != nil {
return *m.TextureId
}
return 0
}
func (m *<API key>) GetTextureTopLeft() *CMsgPoint {
if m != nil {
return m.TextureTopLeft
}
return nil
}
func (m *<API key>) <API key>() *CMsgPoint {
if m != nil {
return m.TextureBottomRight
}
return nil
}
type <API key> struct {
TopLeft *CMsgPoint `protobuf:"bytes,1,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,2,opt,name=bottom_right" json:"bottom_right,omitempty"`
TextureId *uint32 `protobuf:"varint,3,opt,name=texture_id" json:"texture_id,omitempty"`
TextureTopLeft *CMsgPoint `protobuf:"bytes,4,opt,name=texture_top_left" json:"texture_top_left,omitempty"`
TextureBottomRight *CMsgPoint `protobuf:"bytes,5,opt,name=<API key>" json:"<API key>,omitempty"`
TextureSerial *int32 `protobuf:"varint,6,opt,name=texture_serial,def=0" json:"texture_serial,omitempty"`
TextureSampleMode *uint32 `protobuf:"varint,7,opt,name=texture_sample_mode,def=0" json:"texture_sample_mode,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
const <API key> int32 = 0
const <API key> uint32 = 0
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetTextureId() uint32 {
if m != nil && m.TextureId != nil {
return *m.TextureId
}
return 0
}
func (m *<API key>) GetTextureTopLeft() *CMsgPoint {
if m != nil {
return m.TextureTopLeft
}
return nil
}
func (m *<API key>) <API key>() *CMsgPoint {
if m != nil {
return m.TextureBottomRight
}
return nil
}
func (m *<API key>) GetTextureSerial() int32 {
if m != nil && m.TextureSerial != nil {
return *m.TextureSerial
}
return <API key>
}
func (m *<API key>) <API key>() uint32 {
if m != nil && m.TextureSampleMode != nil {
return *m.TextureSampleMode
}
return <API key>
}
type CMsgLockTexture struct {
TextureId *uint32 `protobuf:"varint,1,opt,name=texture_id" json:"texture_id,omitempty"`
TextureSerial *int32 `protobuf:"varint,2,opt,name=texture_serial,def=0" json:"texture_serial,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgLockTexture) Reset() { *m = CMsgLockTexture{} }
func (m *CMsgLockTexture) String() string { return proto.CompactTextString(m) }
func (*CMsgLockTexture) ProtoMessage() {}
const <API key> int32 = 0
func (m *CMsgLockTexture) GetTextureId() uint32 {
if m != nil && m.TextureId != nil {
return *m.TextureId
}
return 0
}
func (m *CMsgLockTexture) GetTextureSerial() int32 {
if m != nil && m.TextureSerial != nil {
return *m.TextureSerial
}
return <API key>
}
type <API key> struct {
Width *float32 `protobuf:"fixed32,1,opt,name=width" json:"width,omitempty"`
Height *float32 `protobuf:"fixed32,2,opt,name=height" json:"height,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetWidth() float32 {
if m != nil && m.Width != nil {
return *m.Width
}
return 0
}
func (m *<API key>) GetHeight() float32 {
if m != nil && m.Height != nil {
return *m.Height
}
return 0
}
type CMsgTextFormat struct {
FontName *string `protobuf:"bytes,1,opt,name=font_name" json:"font_name,omitempty"`
FontSize *float64 `protobuf:"fixed64,2,opt,name=font_size" json:"font_size,omitempty"`
FontWeight *int32 `protobuf:"varint,3,opt,name=font_weight,def=-1" json:"font_weight,omitempty"`
FontStyle *int32 `protobuf:"varint,4,opt,name=font_style,def=-1" json:"font_style,omitempty"`
Underline *bool `protobuf:"varint,5,opt,name=underline" json:"underline,omitempty"`
Strikethrough *bool `protobuf:"varint,6,opt,name=strikethrough" json:"strikethrough,omitempty"`
FillBrushCollection *<API key> `protobuf:"bytes,7,opt,name=<API key>" json:"<API key>,omitempty"`
LetterSpacing *int32 `protobuf:"varint,8,opt,name=letter_spacing,def=0" json:"letter_spacing,omitempty"`
InlineObject *<API key> `protobuf:"bytes,9,opt,name=inline_object" json:"inline_object,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgTextFormat) Reset() { *m = CMsgTextFormat{} }
func (m *CMsgTextFormat) String() string { return proto.CompactTextString(m) }
func (*CMsgTextFormat) ProtoMessage() {}
const <API key> int32 = -1
const <API key> int32 = -1
const <API key> int32 = 0
func (m *CMsgTextFormat) GetFontName() string {
if m != nil && m.FontName != nil {
return *m.FontName
}
return ""
}
func (m *CMsgTextFormat) GetFontSize() float64 {
if m != nil && m.FontSize != nil {
return *m.FontSize
}
return 0
}
func (m *CMsgTextFormat) GetFontWeight() int32 {
if m != nil && m.FontWeight != nil {
return *m.FontWeight
}
return <API key>
}
func (m *CMsgTextFormat) GetFontStyle() int32 {
if m != nil && m.FontStyle != nil {
return *m.FontStyle
}
return <API key>
}
func (m *CMsgTextFormat) GetUnderline() bool {
if m != nil && m.Underline != nil {
return *m.Underline
}
return false
}
func (m *CMsgTextFormat) GetStrikethrough() bool {
if m != nil && m.Strikethrough != nil {
return *m.Strikethrough
}
return false
}
func (m *CMsgTextFormat) <API key>() *<API key> {
if m != nil {
return m.FillBrushCollection
}
return nil
}
func (m *CMsgTextFormat) GetLetterSpacing() int32 {
if m != nil && m.LetterSpacing != nil {
return *m.LetterSpacing
}
return <API key>
}
func (m *CMsgTextFormat) GetInlineObject() *<API key> {
if m != nil {
return m.InlineObject
}
return nil
}
type CMsgTextRangeFormat struct {
StartIndex *uint32 `protobuf:"varint,1,opt,name=start_index" json:"start_index,omitempty"`
EndIndex *uint32 `protobuf:"varint,2,opt,name=end_index" json:"end_index,omitempty"`
Format *CMsgTextFormat `protobuf:"bytes,3,opt,name=format" json:"format,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgTextRangeFormat) Reset() { *m = CMsgTextRangeFormat{} }
func (m *CMsgTextRangeFormat) String() string { return proto.CompactTextString(m) }
func (*CMsgTextRangeFormat) ProtoMessage() {}
func (m *CMsgTextRangeFormat) GetStartIndex() uint32 {
if m != nil && m.StartIndex != nil {
return *m.StartIndex
}
return 0
}
func (m *CMsgTextRangeFormat) GetEndIndex() uint32 {
if m != nil && m.EndIndex != nil {
return *m.EndIndex
}
return 0
}
func (m *CMsgTextRangeFormat) GetFormat() *CMsgTextFormat {
if m != nil {
return m.Format
}
return nil
}
type <API key> struct {
FontName *string `protobuf:"bytes,1,opt,name=font_name" json:"font_name,omitempty"`
FontSize *float64 `protobuf:"fixed64,2,opt,name=font_size" json:"font_size,omitempty"`
FontWeight *int32 `protobuf:"varint,3,opt,name=font_weight,def=-1" json:"font_weight,omitempty"`
FontStyle *int32 `protobuf:"varint,4,opt,name=font_style,def=-1" json:"font_style,omitempty"`
Underline *bool `protobuf:"varint,5,opt,name=underline" json:"underline,omitempty"`
Strikethrough *bool `protobuf:"varint,6,opt,name=strikethrough" json:"strikethrough,omitempty"`
FillBrushCollection *<API key> `protobuf:"bytes,7,opt,name=<API key>" json:"<API key>,omitempty"`
LetterSpacing *int32 `protobuf:"varint,8,opt,name=letter_spacing,def=0" json:"letter_spacing,omitempty"`
InlineObject *<API key> `protobuf:"bytes,9,opt,name=inline_object" json:"inline_object,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
const <API key> int32 = -1
const <API key> int32 = -1
const <API key> int32 = 0
func (m *<API key>) GetFontName() string {
if m != nil && m.FontName != nil {
return *m.FontName
}
return ""
}
func (m *<API key>) GetFontSize() float64 {
if m != nil && m.FontSize != nil {
return *m.FontSize
}
return 0
}
func (m *<API key>) GetFontWeight() int32 {
if m != nil && m.FontWeight != nil {
return *m.FontWeight
}
return <API key>
}
func (m *<API key>) GetFontStyle() int32 {
if m != nil && m.FontStyle != nil {
return *m.FontStyle
}
return <API key>
}
func (m *<API key>) GetUnderline() bool {
if m != nil && m.Underline != nil {
return *m.Underline
}
return false
}
func (m *<API key>) GetStrikethrough() bool {
if m != nil && m.Strikethrough != nil {
return *m.Strikethrough
}
return false
}
func (m *<API key>) <API key>() *<API key> {
if m != nil {
return m.FillBrushCollection
}
return nil
}
func (m *<API key>) GetLetterSpacing() int32 {
if m != nil && m.LetterSpacing != nil {
return *m.LetterSpacing
}
return <API key>
}
func (m *<API key>) GetInlineObject() *<API key> {
if m != nil {
return m.InlineObject
}
return nil
}
type <API key> struct {
StartIndex *uint32 `protobuf:"varint,1,opt,name=start_index" json:"start_index,omitempty"`
EndIndex *uint32 `protobuf:"varint,2,opt,name=end_index" json:"end_index,omitempty"`
Format *<API key> `protobuf:"bytes,3,opt,name=format" json:"format,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetStartIndex() uint32 {
if m != nil && m.StartIndex != nil {
return *m.StartIndex
}
return 0
}
func (m *<API key>) GetEndIndex() uint32 {
if m != nil && m.EndIndex != nil {
return *m.EndIndex
}
return 0
}
func (m *<API key>) GetFormat() *<API key> {
if m != nil {
return m.Format
}
return nil
}
type CMsgDrawTextRegion struct {
Wtext []byte `protobuf:"bytes,2,opt,name=wtext" json:"wtext,omitempty"`
DefaultFormat *CMsgTextFormat `protobuf:"bytes,3,opt,name=default_format" json:"default_format,omitempty"`
TextAlign *uint32 `protobuf:"varint,4,opt,name=text_align" json:"text_align,omitempty"`
LineHeight *uint32 `protobuf:"varint,5,opt,name=line_height" json:"line_height,omitempty"`
TopLeft *CMsgPoint `protobuf:"bytes,6,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,7,opt,name=bottom_right" json:"bottom_right,omitempty"`
Wrapping *bool `protobuf:"varint,8,opt,name=wrapping" json:"wrapping,omitempty"`
Ellipsis *bool `protobuf:"varint,9,opt,name=ellipsis" json:"ellipsis,omitempty"`
RangeFormats []*CMsgTextRangeFormat `protobuf:"bytes,10,rep,name=range_formats" json:"range_formats,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CMsgDrawTextRegion) Reset() { *m = CMsgDrawTextRegion{} }
func (m *CMsgDrawTextRegion) String() string { return proto.CompactTextString(m) }
func (*CMsgDrawTextRegion) ProtoMessage() {}
func (m *CMsgDrawTextRegion) GetWtext() []byte {
if m != nil {
return m.Wtext
}
return nil
}
func (m *CMsgDrawTextRegion) GetDefaultFormat() *CMsgTextFormat {
if m != nil {
return m.DefaultFormat
}
return nil
}
func (m *CMsgDrawTextRegion) GetTextAlign() uint32 {
if m != nil && m.TextAlign != nil {
return *m.TextAlign
}
return 0
}
func (m *CMsgDrawTextRegion) GetLineHeight() uint32 {
if m != nil && m.LineHeight != nil {
return *m.LineHeight
}
return 0
}
func (m *CMsgDrawTextRegion) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *CMsgDrawTextRegion) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *CMsgDrawTextRegion) GetWrapping() bool {
if m != nil && m.Wrapping != nil {
return *m.Wrapping
}
return false
}
func (m *CMsgDrawTextRegion) GetEllipsis() bool {
if m != nil && m.Ellipsis != nil {
return *m.Ellipsis
}
return false
}
func (m *CMsgDrawTextRegion) GetRangeFormats() []*CMsgTextRangeFormat {
if m != nil {
return m.RangeFormats
}
return nil
}
type <API key> struct {
Wtext []byte `protobuf:"bytes,2,opt,name=wtext" json:"wtext,omitempty"`
DefaultFormat *<API key> `protobuf:"bytes,3,opt,name=default_format" json:"default_format,omitempty"`
TextAlign *uint32 `protobuf:"varint,4,opt,name=text_align" json:"text_align,omitempty"`
LineHeight *uint32 `protobuf:"varint,5,opt,name=line_height" json:"line_height,omitempty"`
TopLeft *CMsgPoint `protobuf:"bytes,6,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,7,opt,name=bottom_right" json:"bottom_right,omitempty"`
Wrapping *bool `protobuf:"varint,8,opt,name=wrapping" json:"wrapping,omitempty"`
Ellipsis *bool `protobuf:"varint,9,opt,name=ellipsis" json:"ellipsis,omitempty"`
RangeFormats []*<API key> `protobuf:"bytes,10,rep,name=range_formats" json:"range_formats,omitempty"`
TextShadow *CTextShadowData `protobuf:"bytes,11,opt,name=text_shadow" json:"text_shadow,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetWtext() []byte {
if m != nil {
return m.Wtext
}
return nil
}
func (m *<API key>) GetDefaultFormat() *<API key> {
if m != nil {
return m.DefaultFormat
}
return nil
}
func (m *<API key>) GetTextAlign() uint32 {
if m != nil && m.TextAlign != nil {
return *m.TextAlign
}
return 0
}
func (m *<API key>) GetLineHeight() uint32 {
if m != nil && m.LineHeight != nil {
return *m.LineHeight
}
return 0
}
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetWrapping() bool {
if m != nil && m.Wrapping != nil {
return *m.Wrapping
}
return false
}
func (m *<API key>) GetEllipsis() bool {
if m != nil && m.Ellipsis != nil {
return *m.Ellipsis
}
return false
}
func (m *<API key>) GetRangeFormats() []*<API key> {
if m != nil {
return m.RangeFormats
}
return nil
}
func (m *<API key>) GetTextShadow() *CTextShadowData {
if m != nil {
return m.TextShadow
}
return nil
}
type <API key> struct {
CallbackObj []byte `protobuf:"bytes,1,opt,name=callback_obj" json:"callback_obj,omitempty"`
TopLeft *CMsgPoint `protobuf:"bytes,2,opt,name=top_left" json:"top_left,omitempty"`
BottomRight *CMsgPoint `protobuf:"bytes,3,opt,name=bottom_right" json:"bottom_right,omitempty"`
TopLeftPadding *CMsgPoint `protobuf:"bytes,4,opt,name=top_left_padding" json:"top_left_padding,omitempty"`
BottomRightPadding *CMsgPoint `protobuf:"bytes,5,opt,name=<API key>" json:"<API key>,omitempty"`
<API key> *bool `protobuf:"varint,6,opt,name=<API key>" json:"<API key>,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *<API key>) Reset() { *m = <API key>{} }
func (m *<API key>) String() string { return proto.CompactTextString(m) }
func (*<API key>) ProtoMessage() {}
func (m *<API key>) GetCallbackObj() []byte {
if m != nil {
return m.CallbackObj
}
return nil
}
func (m *<API key>) GetTopLeft() *CMsgPoint {
if m != nil {
return m.TopLeft
}
return nil
}
func (m *<API key>) GetBottomRight() *CMsgPoint {
if m != nil {
return m.BottomRight
}
return nil
}
func (m *<API key>) GetTopLeftPadding() *CMsgPoint {
if m != nil {
return m.TopLeftPadding
}
return nil
}
func (m *<API key>) <API key>() *CMsgPoint {
if m != nil {
return m.BottomRightPadding
}
return nil
}
func (m *<API key>) <API key>() bool {
if m != nil && m.<API key> != nil {
return *m.<API key>
}
return false
}
func init() {
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
proto.RegisterExtension(<API key>)
} |
class <API key>
@config = {
log_failed: false,
base_url: 'http://im.govwizely.com/api/terms.json'
}
@valid_config_keys = @config.keys
def self.configure(options = {})
options.each { |key, value| @config[key.to_sym] = value if @valid_config_keys.include? key.to_sym }
@config[:log_failed] = false unless @config[:log_failed]
end
end |
namespace Microsoft.Azure.Management.Sql.Fluent
{
using Microsoft.Azure.Management.ResourceManager.Fluent.Core;
using Microsoft.Azure.Management.Sql.Fluent.Models;
using System;
<summary>
An immutable client-side representation of an Azure SQL ElasticPool's Database Activity.
</summary>
public interface <API key> :
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasInner<Models.<API key>>,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasResourceGroup,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasName,
Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasId,
Microsoft.Azure.Management.Sql.Fluent.<API key>
{
<summary>
Gets the database name.
</summary>
string DatabaseName { get; }
<summary>
Gets the name of the current Elastic Pool the database is in if available.
</summary>
string <API key> { get; }
<summary>
Gets the error message if available.
</summary>
string ErrorMessage { get; }
<summary>
Gets the error severity if available.
</summary>
int ErrorSeverity { get; }
<summary>
Gets the error code if available.
</summary>
int ErrorCode { get; }
<summary>
Gets the name of the Azure SQL Server the Elastic Pool is in.
</summary>
string ServerName { get; }
<summary>
Gets the percentage complete if available.
</summary>
int PercentComplete { get; }
<summary>
Gets the name of the current service objective if available.
</summary>
string <API key> { get; }
<summary>
Gets the name for the Elastic Pool the database is moving into if available.
</summary>
string <API key> { get; }
<summary>
Gets the name of the requested service objective if available.
</summary>
string <API key> { get; }
<summary>
Gets the unique operation ID.
</summary>
string OperationId { get; }
<summary>
Gets the time the operation started (ISO8601 format).
</summary>
System.DateTime? StartTime { get; }
<summary>
Gets the time the operation finished (ISO8601 format).
</summary>
System.DateTime? EndTime { get; }
<summary>
Gets the current state of the operation.
</summary>
string State { get; }
<summary>
Gets the operation name.
</summary>
string Operation { get; }
}
} |
package com.socialthingy.plusf.p2p.discovery
import java.net.InetSocketAddress
import java.nio.ByteBuffer
import java.util.Optional
import akka.actor.{ActorSystem, PoisonPill}
import akka.testkit.TestKit
import com.socialthingy.p2p.{Peer, _}
import com.socialthingy.plusf.p2p._
import org.mockito.Mockito._
import org.scalatest.concurrent.{Eventually, ScalaFutures}
import org.scalatest.mockito.MockitoSugar
import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Matchers}
import scala.concurrent.duration._
import scala.language.postfixOps
class <API key>
extends TestKit(ActorSystem())
with FlatSpecLike
with Matchers
with Eventually
with ScalaFutures
with MockitoSugar
with BeforeAndAfterAll {
implicit val patience = PatienceConfig(10 seconds)
implicit val ec = system.dispatcher
val deser = new Deserialiser {
override def deserialise(bytes: ByteBuffer): Object =
new String(bytes.array(), bytes.position(), bytes.remaining(), "UTF-8")
}
val ser = new Serialiser {
override def serialise(obj: Object, byteStringBuilder: ByteBuffer): Unit = {
byteStringBuilder.put(obj.asInstanceOf[String].getBytes("UTF-8"))
}
}
val discoveryAddr = new InetSocketAddress("localhost", 7084)
val discoveryActor = DiscoveryActor(discoveryAddr)
override def afterAll(): Unit = {
discoveryActor ! PoisonPill
}
"two peers in direct connect mode" should "be able to discover one another and exchange data" in withPeers { (peer1, cb1, peer2, cb2) =>
peer1.join("sess123", Optional.empty())
peer2.join("sess123", Optional.empty())
eventually {
verify(cb1).connectedToPeer(7082)
verify(cb2).connectedToPeer(7081)
}
peer1.send(new RawData("hello from 1", 0))
peer2.send(new RawData("hello from 2", 0))
peer1.send(new RawData("blah!", 0))
peer2.send(new RawData("wibble", 0))
eventually {
verify(cb1).data("hello from 2")
verify(cb2).data("hello from 1")
verify(cb1).data("wibble")
verify(cb2).data("blah!")
}
}
"a peer" should "successfully reinitialise after being closed" in withPeers { (peer, cb, _, _) =>
peer.join("sess123", Optional.empty())
eventually {
verify(cb).waitingForPeer()
}
peer.close()
eventually {
verify(cb).discoveryCancelled()
}
peer.join("sess234", Optional.empty())
eventually {
verify(cb, times(2)).waitingForPeer()
}
}
"a peer" should "time out its session when nobody joins" in withPeers { (lonelyPeer, cb, _, _) =>
lonelyPeer.join("sess999", Optional.empty())
Thread.sleep(11000)
eventually {
verify(cb).discoveryTimeout()
}
}
"a peer" should "be able to cancel its session before a peer joins" in withPeers { (peer1, cb1, peer2, cb2) =>
peer1.join("sess123", Optional.empty())
eventually {
verify(cb1).waitingForPeer()
}
peer1.close()
eventually {
verify(cb1).discoveryCancelled()
}
peer2.join("sess123", Optional.empty())
eventually {
verify(cb2).waitingForPeer()
}
peer1.join("sess123", Optional.empty())
eventually {
verify(cb1).connectedToPeer(7082)
verify(cb2).connectedToPeer(7081)
}
}
"a peer in port forward mode" should "have its forwarded port number given to the other peer" in withPeers { (peer1, cb1, peer2, cb2) =>
peer1.join("sess123", Optional.of(9876))
peer2.join("sess123", Optional.empty())
eventually {
verify(cb2).connectedToPeer(9876)
}
}
def withPeers(testCode: (Peer, Callbacks, Peer, Callbacks) => Any): Unit = {
val cb1 = mock[Callbacks]
val peer1 = new Peer(new InetSocketAddress("localhost", 7081), discoveryAddr, cb1, ser, deser, java.time.Duration.ofSeconds(10))
val cb2 = mock[Callbacks]
val peer2 = new Peer(new InetSocketAddress("localhost", 7082), discoveryAddr, cb2, ser, deser, java.time.Duration.ofSeconds(10))
try {
testCode(peer1, cb1, peer2, cb2)
} finally {
peer1.close()
peer2.close()
Thread.sleep(2000)
}
}
} |
'use strict';
describe('Service: Auth', function () {
// load the service's module
beforeEach(module('waxeApp'));
// instantiate service
var Auth;
beforeEach(inject(function (_Auth_) {
Auth = _Auth_;
}));
it('should do something', function () {
expect(!!Auth).toBe(true);
});
}); |
namespace Yeoman.VisualStudio
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
public class DirectoryWatcher
{
private string[] filesAtStart;
private string[] filesAtEnd;
private IEnumerable<string> filesToAdd;
private IEnumerable<string> filesToRemove;
private string watchedDirectory;
public DirectoryWatcher(string directory)
{
this.watchedDirectory = directory;
}
public bool IsWatching
{
get;
private set;
}
public void StartWatching()
{
this.filesAtStart = GetFilesInDirectory(this.watchedDirectory);
this.IsWatching = true;
}
public void EndWatching()
{
this.filesAtEnd = GetFilesInDirectory(this.watchedDirectory);
this.IsWatching = false;
this.filesToRemove = this.filesAtStart.Except(this.filesAtEnd);
this.filesToAdd = this.filesAtEnd.Except(this.filesAtStart);
}
public IEnumerable<string> GetFilesToAdd()
{
if (this.IsWatching)
{
throw new Exception("You must call EndWatching() first.");
}
return this.filesToAdd.AsEnumerable<string>();
}
public IEnumerable<string> GetFilesToRemove()
{
if (this.IsWatching)
{
throw new Exception("You must call EndWatching() first.");
}
return this.filesToRemove.AsEnumerable<string>();
}
private static string[] GetFilesInDirectory(string directory)
{
var files = Directory.GetFiles(directory, "*", SearchOption.AllDirectories);
return files;
}
}
} |
import click
import workflow
from alfred_omni_api import AuthKeys, ConfigKeys, config
from omni_api.trello import TrelloClient
wf = workflow.Workflow()
def get_password(key):
try:
return wf.get_password(key)
except workflow.PasswordNotFound:
return None
def prompt_for_keychain(label, key, hide=True):
value = get_password(key)
if not value or click.confirm('Reset {}'.format(label)):
value = click.prompt('{}'.format(label), hide_input=hide)
wf.save_password(key, value)
def prompt_for_config(label, key):
current = config.get(key, enforce=False)
value = click.prompt(label, default=current)
kwargs = {key: value}
config.set(**kwargs)
assert config.get(key) == value
@click.group()
def cli():
pass
@cli.command()
def jira():
prompt_for_config('JIRA URL', ConfigKeys.JIRA_URL)
prompt_for_keychain('JIRA username', AuthKeys.JIRA_USERNAME, hide=False)
prompt_for_keychain('JIRA password', AuthKeys.JIRA_PASSWORD)
@cli.command()
def github():
prompt_for_keychain('Github token', AuthKeys.GITHUB_TOKEN)
@cli.command()
def jive():
prompt_for_config('Jive URL', ConfigKeys.JIVE_URL)
prompt_for_keychain('Jive username', AuthKeys.JIVE_USERNAME, hide=False)
prompt_for_keychain('Jive password', AuthKeys.JIVE_PASSWORD)
@cli.command()
def trello():
prompt_for_keychain('Trello API key', AuthKeys.TRELLO_API_KEY, hide=False)
prompt_for_keychain('Trello token', AuthKeys.TRELLO_TOKEN)
client = TrelloClient(
wf.get_password(AuthKeys.TRELLO_API_KEY),
wf.get_password(AuthKeys.TRELLO_TOKEN)
)
me = client.get_me()
boards = client.get_boards(me.id)
click.secho('Boards', bold=True)
for i, board in enumerate(boards):
click.echo('{}: {}'.format(i, board.name))
board_index = click.prompt('Choose a board for card creation', type=int)
board = boards[board_index]
lists = client.get_lists(board.id)
for i, list_ in enumerate(lists):
click.echo('{}: {}'.format(i, list_.name))
list_index = click.prompt('Choose a list for card creation', type=int)
list_ = lists[list_index]
kwargs = {
ConfigKeys.TRELLO_MEMBER_ID: me.id,
ConfigKeys.TRELLO_BOARD_ID: board.id,
ConfigKeys.TRELLO_LIST_ID: list_.id,
}
config.set(**kwargs)
@cli.command()
def hackpad():
url = 'https://hackpad.com/ep/account/settings/'
if click.confirm(
'Hackpad creds can be found at {}. Launch?'.format(url)
):
click.launch(url)
prompt_for_keychain('HackPad client id', AuthKeys.HACKPAD_CLIENT_ID)
prompt_for_keychain('HackPad secret', AuthKeys.HACKPAD_SECRET)
if __name__ == '__main__':
cli() |
package org.lemsml.jlems.core.type;
import org.lemsml.jlems.core.annotation.ModelElement;
import org.lemsml.jlems.core.annotation.ModelProperty;
import org.lemsml.jlems.core.expression.ParseError;
import org.lemsml.jlems.core.expression.Parser;
import org.lemsml.jlems.core.logging.E;
import org.lemsml.jlems.core.sim.ContentError;
@ModelElement(info="A reference to another component. The target component can be accessed with path expressions in the " +
"same way as a child component, but can be defined independently")
public class ComponentReference implements Named {
@ModelProperty(info="")
public String name;
@ModelProperty(info="Target type")
public String type;
public String description;
public ComponentType r_type;
public String root;
public boolean isAny = false;
public boolean local = false;
public boolean required = true;
public String defaultComponent;
private boolean inResolve = false;
public ComponentReference() {
// maybe only one constructor?
}
public ComponentReference(String sn, String st, ComponentType t) {
name = sn;
type = st;
r_type = t;
}
public void resolve(Lems lems, Parser p) throws ContentError, ParseError {
inResolve = true;
LemsCollection<ComponentType> types = lems.getComponentTypes();
if (type == null) {
E.error("no type specified in component ref " + name);
} else if (type.equals("Component")) {
isAny = true;
} else {
ComponentType t = types.getByName(type);
if (t != null) {
r_type = t;
r_type.checkResolve(lems, p);
} else {
throw new ContentError("ComponentRef: No such typer: " + type + ", used by " + getName());
}
}
inResolve = false;
}
public String getName() {
return name;
}
public ComponentType getComponentType() {
return r_type;
}
public String getTargetType() {
return type;
}
public ComponentReference makeCopy() {
ComponentReference ret = new ComponentReference();
ret.name = name;
ret.type = type;
ret.local = local;
ret.required = required;
ret.r_type = r_type;
if (defaultComponent != null) {
ret.defaultComponent= defaultComponent;
}
return ret;
}
public boolean isLocal() {
return local;
}
public boolean isRequired() {
boolean ret = true;
if (!required) {
ret = false;
}
return ret;
}
public boolean resolving() {
return inResolve;
}
public String getDefaultComponent() {
return defaultComponent;
}
} |
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class Badges
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class Badges
">
<meta name="generator" content="docfx 2.43.2.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg site-icon" src="../siteicon.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Manatee.Trello.Badges">
<h1 id="<API key>" data-uid="Manatee.Trello.Badges" class="text-break">Class Badges
</h1>
<div class="markdown level0 summary"><p>Represents a collection of badges which summarize the contents of a card.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">Badges</span></div>
</div>
<div classs="implements">
<h5>Implements</h5>
<div><a class="xref" href="Manatee.Trello.IBadges.html">IBadges</a></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">System.Object.Equals(System.Object)</span>
</div>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetHashCode()</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.ToString()</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Manatee.Trello.html">Manatee.Trello</a></h6>
<h6><strong>Assembly</strong>: Manatee.Trello.dll</h6>
<h5 id="<API key>">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class Badges : IBadges</code></pre>
</div>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L28">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.Attachments*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.Attachments">Attachments</h4>
<div class="markdown level1 summary"><p>Gets the number of attachments on this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? Attachments { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Int32</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L32">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.CheckItems*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.CheckItems">CheckItems</h4>
<div class="markdown level1 summary"><p>Gets the number of check items on this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? CheckItems { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Int32</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L36">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.CheckItemsChecked*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.CheckItemsChecked">CheckItemsChecked</h4>
<div class="markdown level1 summary"><p>Gets the number of check items on this card which are checked.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? CheckItemsChecked { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Int32</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L40">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.Comments*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.Comments">Comments</h4>
<div class="markdown level1 summary"><p>Gets the number of comments on this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? Comments { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Int32</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L44">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.DueDate*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.DueDate">DueDate</h4>
<div class="markdown level1 summary"><p>Gets the due date for this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public DateTime? DueDate { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.DateTime</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L48">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.FogBugz*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.FogBugz">FogBugz</h4>
<div class="markdown level1 summary"><p>Gets some FogBugz information.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string FogBugz { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L52">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.HasDescription*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.HasDescription">HasDescription</h4>
<div class="markdown level1 summary"><p>Gets whether this card has a description.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool? HasDescription { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Boolean</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L56">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.HasVoted*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.HasVoted">HasVoted</h4>
<div class="markdown level1 summary"><p>Gets whether the current member has voted for this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool? HasVoted { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Boolean</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L60">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.IsComplete*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.IsComplete">IsComplete</h4>
<div class="markdown level1 summary"><p>Gets wheterh this card has been marked complete.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool? IsComplete { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Boolean</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L64">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.IsSubscribed*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.IsSubscribed">IsSubscribed</h4>
<div class="markdown level1 summary"><p>Gets whether the current member is subscribed to this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool? IsSubscribed { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Boolean</span>></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L68">View Source</a>
</span>
<a id="<API key>" data-uid="Manatee.Trello.Badges.Votes*"></a>
<h4 id="<API key>" data-uid="Manatee.Trello.Badges.Votes">Votes</h4>
<div class="markdown level1 summary"><p>Gets the number of votes for this card.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? Votes { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Nullable</span><<span class="xref">System.Int32</span>></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="implements">Implements</h3>
<div>
<a class="xref" href="Manatee.Trello.IBadges.html">IBadges</a>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https:
</li>
<li>
<a href="https://github.com/gregsdennis/Manatee.Trello/blob/master/Manatee.Trello/Badges.cs/#L10" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html> |
/**
* Comment.
*/
a {
text-decoration: none;
}
a:hover,
a.\:hover {
text-decoration: underline;
}
a:active,
a.\:active {
font-weight: bold;
}
a:hover,
a:focus,
a.\:hover,
a.\:focus {
font-weight: bold;
}
a.lol:active,
a.lol.\:active {
font-weight: normal;
}
a:nth-child(5),
a.\:nth-child\(5\) {
border: 1px solid papayawhip;
}
a:hover:focus,
a:hover.\:focus,
a.\:hover:focus,
a.\:hover.\:focus {
font-weight: bold;
}
a:before {
color: white;
}
a::before {
color: white;
}
a:before,
a::before {
color: white;
}
a:hover::before,
a.\:hover::before {
border-top-color: blue;
}
a:active:focus:hover::before,
a:active:focus.\:hover::before,
a:active.\:focus:hover::before,
a:active.\:focus.\:hover::before,
a.\:active:focus:hover::before,
a.\:active:focus.\:hover::before,
a.\:active.\:focus:hover::before,
a.\:active.\:focus.\:hover::before {
border-bottom-color: blue;
}
a:active:focus + div:hover,
a:active.\:focus + div:hover,
a.\:active:focus + div:hover,
a.\:active.\:focus + div:hover,
a:active:focus + div.\:hover,
a:active.\:focus + div.\:hover,
a.\:active:focus + div.\:hover,
a.\:active.\:focus + div.\:hover {
color: magenta;
} |
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div class="container-fluid">
{{ content }}
</div>
{% include footer.html %}
</body>
</html> |
class App < ActiveRecord::Base
belongs_to :organization
validates :name, :organization, presence: true
scope :backed_up, -> { where("<API key> IS TRUE") }
scope :not_backed_up, -> { where("<API key> IS FALSE") }
scope :no_schedules, -> { where("backup_schedule IS NULL") }
ADDON_FINDERER_SQL = <<-EOS
SELECT *
FROM apps a, json_array_elements(a.addons) obj
WHERE obj#>>'{addon_service,name}' = ?
AND obj#>>'{plan,name}' = ?;
EOS
def type
App.type_from_name(name)
end
def prefix
App.prefix_from_name(name)
end
def self.prefixes
[ 'g5-nae', 'g5-hub', '<API key>', 'g5-backups-manager', '<API key>',
'<API key>', '<API key>']
end
def self.types
@@types ||= prefixes.map {|p| p.gsub('g5-', '')}
end
def self.type_from_name(name)
regex_str = types.join("|")
name.try(:[], /#{regex_str}/)
end
def self.prefix_from_name(name)
# add caret to only match beginning of string
regex_str = prefixes.map {|p| "^#{p}"}.join("|")
name.try(:[], /#{regex_str}/)
end
def self.group_by_type(apps)
main_apps, misc_apps = apps.partition(&:prefix)
main_apps
.group_by(&:type)
.merge({ "misc" => misc_apps })
.sort.to_h
end
def has_ssl_addon?
addons.any? do |h|
h["addon_service"]["name"] == "ssl" && h["plan"]["name"] == "ssl:endpoint"
end unless addons.nil?
end
def database_plans
return [] if addons.nil?
addons.
select { |h| h["addon_service"]["name"] == "heroku-postgresql" }.
map { |h| h["plan"]["name"].split(":").last }
end
def self.all_with_addon(addon_service_name, plan_name)
App.find_by_sql([ ADDON_FINDERER_SQL, addon_service_name, plan_name ])
end
end |
var objectpool_8h =
[
[ "ObjectPool", "class_object_pool.html", "class_object_pool" ],
[ "ThreadPool", "objectpool_8h.html#<API key>", null ]
]; |
package es.shyri.swagger.android.volley.petstore.full;
import com.android.volley.ExecutorDelivery;
import com.android.volley.Network;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.BasicNetwork;
import com.android.volley.toolbox.HttpStack;
import com.android.volley.toolbox.HurlStack;
import com.android.volley.toolbox.NoCache;
import net.jodah.concurrentunit.Waiter;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.<API key>;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Executors;
import io.swagger.client.ApiException;
import io.swagger.client.ApiInvoker;
import io.swagger.client.api.PetApi;
import io.swagger.client.model.Category;
import io.swagger.client.model.Pet;
import static com.ibm.icu.impl.Assert.fail;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@RunWith(<API key>.class)
public class PetApiTest {
PetApi api = null;
@Before
public void setup() {
HttpStack stack = new HurlStack();
Network network = new BasicNetwork(stack);
ApiInvoker.initializeInstance(new NoCache(), network, 4, new ExecutorDelivery(Executors.<API key>()), 30);
api = new PetApi();
}
@Test
public void testCreateAndGetPet() throws Exception {
final Waiter waiter = new Waiter();
final Pet pet = createRandomPet();
api.addPet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.getPetById(pet.getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet response) {
Pet fetched = response;
waiter.assertNotNull(fetched);
waiter.assertEquals(pet.getId(), fetched.getId());
waiter.assertNotNull(fetched.getCategory());
waiter.assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
}
@Test
public void testUpdatePet() throws Exception {
final Waiter waiter = new Waiter();
final Pet pet = createRandomPet();
pet.setName("programmer");
api.updatePet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.getPetById(pet.getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet fetched) {
waiter.assertNotNull(fetched);
waiter.assertEquals(pet.getId(), fetched.getId());
waiter.assertNotNull(fetched.getCategory());
waiter.assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
}
@Test
public void <API key>() throws Exception {
final Waiter waiter = new Waiter();
final Pet pet = createRandomPet();
pet.setName("programmer");
pet.setStatus(Pet.StatusEnum.available);
api.updatePet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.findPetsByStatus(Arrays.asList(new String[]{"available"}), new Response.Listener<List<Pet>>() {
@Override
public void onResponse(List<Pet> pets) {
waiter.assertNotNull(pets);
boolean found = false;
for (Pet fetched : pets) {
if (fetched.getId().equals(pet.getId())) {
found = true;
break;
}
}
waiter.assertTrue(found);
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
}
@Test
public void <API key>() throws Exception {
final Waiter waiter = new Waiter();
final Pet pet = createRandomPet();
pet.setName("frank");
api.addPet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
final Pet[] fetched = new Pet[1];
api.getPetById(pet.getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet petResponse) {
fetched[0] = petResponse;
waiter.assertEquals("frank", fetched[0].getName());
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.updatePetWithForm(String.valueOf(fetched[0].getId()), "furt", null, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.getPetById(fetched[0].getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet updated) {
waiter.assertEquals("furt", updated.getName());
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
}
@Test
public void testDeletePet() throws Exception {
final Waiter waiter = new Waiter();
Pet pet = createRandomPet();
api.addPet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
final Pet[] fetched = new Pet[1];
api.getPetById(pet.getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet response) {
fetched[0] = response;
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.deletePet(fetched[0].getId(), "special-key", new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
api.getPetById(fetched[0].getId(), new Response.Listener<Pet>() {
@Override
public void onResponse(Pet response) {
waiter.fail("expected an error");
waiter.resume();
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
waiter.assertEquals(404, error.networkResponse.statusCode);
waiter.resume();
}
});
waiter.await();
}
@Test
public void testUploadFile() throws Exception {
final Waiter waiter = new Waiter();
Pet pet = createRandomPet();
api.addPet(pet, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
File file = new File("hello.txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
writer.write("Hello world!");
writer.close();
api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath()), new Response.Listener<String>() {
@Override
public void onResponse(String response) {
waiter.resume();
}
}, createErrorListener(waiter));
waiter.await();
}
@Test
public void <API key>() throws Exception {
Pet pet = createRandomPet();
api.addPet(pet);
Pet fetched = api.getPetById(pet.getId());
assertNotNull(fetched);
assertEquals(pet.getId(), fetched.getId());
assertNotNull(fetched.getCategory());
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
}
@Test
public void testUpdatePetSync() throws Exception {
Pet pet = createRandomPet();
pet.setName("programmer");
api.updatePet(pet);
Pet fetched = api.getPetById(pet.getId());
assertNotNull(fetched);
assertEquals(pet.getId(), fetched.getId());
assertNotNull(fetched.getCategory());
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
}
@Test
public void <API key>() throws Exception {
Pet pet = createRandomPet();
pet.setName("programmer");
pet.setStatus(Pet.StatusEnum.available);
api.updatePet(pet);
List<Pet> pets = api.findPetsByStatus(Arrays.asList(new String[]{"available"}));
assertNotNull(pets);
boolean found = false;
for (Pet fetched : pets) {
if (fetched.getId().equals(pet.getId())) {
found = true;
break;
}
}
assertTrue(found);
}
@Test
public void <API key>() throws Exception {
Pet pet = createRandomPet();
pet.setName("frank");
api.addPet(pet);
Pet fetched = api.getPetById(pet.getId());
assertEquals("frank", fetched.getName());
api.updatePetWithForm(String.valueOf(fetched.getId()), "furt", null);
Pet updated = api.getPetById(fetched.getId());
assertEquals("furt", updated.getName());
}
@Test
public void testDeletePetSync() throws Exception {
Pet pet = createRandomPet();
api.addPet(pet);
Pet fetched = api.getPetById(pet.getId());
api.deletePet(fetched.getId(), null);
try {
fetched = api.getPetById(fetched.getId());
fail("expected an error");
} catch (ApiException e) {
assertEquals(404, e.getCode());
}
}
@Test
public void testUploadFileSync() throws Exception {
Pet pet = createRandomPet();
api.addPet(pet);
File file = new File("hello.txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
writer.write("Hello world!");
writer.close();
api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath()));
}
private Pet createRandomPet() {
Pet pet = new Pet();
pet.setId(System.currentTimeMillis());
pet.setName("gorilla");
Category category = new Category();
category.setName("really-happy");
pet.setCategory(category);
pet.setStatus(Pet.StatusEnum.available);
List<String> photos = Arrays.asList(new String[]{"http:
pet.setPhotoUrls(photos);
return pet;
}
private Response.ErrorListener createErrorListener(final Waiter waiter) {
return new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
error.printStackTrace();
waiter.fail(error.getMessage());
waiter.resume();
}
};
}
} |
var fs = require('../../util/fs');
var path = require('path');
var mout = require('mout');
var Q = require('q');
var rimraf = require('../../util/rimraf');
var endpointParser = require('<API key>');
var PackageRepository = require('../../core/PackageRepository');
var semver = require('../../util/semver');
var defaultConfig = require('../../config');
function clean(logger, endpoints, options, config) {
var decEndpoints;
var names;
options = options || {};
config = defaultConfig(config);
// If endpoints is an empty array, null them
if (endpoints && !endpoints.length) {
endpoints = null;
}
// Generate decomposed endpoints and names based on the endpoints
if (endpoints) {
decEndpoints = endpoints.map(function (endpoint) {
return endpointParser.decompose(endpoint);
});
names = decEndpoints.map(function (decEndpoint) {
return decEndpoint.name || decEndpoint.source;
});
}
return Q.all([
clearPackages(decEndpoints, config, logger),
clearLinks(names, config, logger)
])
.spread(function (entries) {
return entries;
});
}
function clearPackages(decEndpoints, config, logger) {
var repository = new PackageRepository(config, logger);
return repository.list()
.then(function (entries) {
var promises;
// Filter entries according to the specified packages
if (decEndpoints) {
entries = entries.filter(function (entry) {
return !!mout.array.find(decEndpoints, function (decEndpoint) {
var entryPkgMeta = entry.pkgMeta;
// Check if name or source match the entry
if (decEndpoint.name !== entryPkgMeta.name &&
decEndpoint.source !== entryPkgMeta.name &&
decEndpoint.source !== entryPkgMeta._source
) {
return false;
}
// If target is a wildcard, simply return true
if (decEndpoint.target === '*') {
return true;
}
// If it's a semver target, compare using semver spec
if (semver.validRange(decEndpoint.target)) {
return semver.satisfies(entryPkgMeta.version, decEndpoint.target);
}
// Otherwise, compare against target/release
return decEndpoint.target === entryPkgMeta._target ||
decEndpoint.target === entryPkgMeta._release;
});
});
}
promises = entries.map(function (entry) {
return repository.eliminate(entry.pkgMeta)
.then(function () {
logger.info('deleted', 'Cached package ' + entry.pkgMeta.name + ': ' + entry.canonicalDir, {
file: entry.canonicalDir
});
});
});
return Q.all(promises)
.then(function () {
if (!decEndpoints) {
// Ensure that everything is cleaned,
// even invalid packages in the cache
return repository.clear();
}
})
.then(function () {
return entries;
});
});
}
function clearLinks(names, config, logger) {
var promise;
var dir = config.storage.links;
// If no names are passed, grab all links
if (!names) {
promise = Q.nfcall(fs.readdir, dir)
.fail(function (err) {
if (err.code === 'ENOENT') {
return [];
}
throw err;
});
// Otherwise use passed ones
} else {
promise = Q.resolve(names);
}
return promise
.then(function (names) {
var promises;
var linksToRemove = [];
// Decide which links to delete
promises = names.map(function (name) {
var link = path.join(config.storage.links, name);
return Q.nfcall(fs.readlink, link)
.then(function (linkTarget) {
// Link exists, check if it points to a folder
// that still exists
return Q.nfcall(fs.stat, linkTarget)
.then(function (stat) {
// Target is not a folder..
if (!stat.isDirectory()) {
linksToRemove.push(link);
}
})
// Error occurred reading the link
.fail(function () {
linksToRemove.push(link);
});
// Ignore if link does not exist
}, function (err) {
if (err.code !== 'ENOENT') {
linksToRemove.push(link);
}
});
});
return Q.all(promises)
.then(function () {
var promises;
// Remove each link that was declared as invalid
promises = linksToRemove.map(function (link) {
return Q.nfcall(rimraf, link)
.then(function () {
logger.info('deleted', 'Invalid link: ' + link, {
file: link
});
});
});
return Q.all(promises);
});
});
}
clean.readOptions = function (argv) {
var cli = require('../../util/cli');
var options = cli.readOptions(argv);
var endpoints = options.argv.remain.slice(2);
delete options.argv;
return [endpoints, options];
};
module.exports = clean; |
package com.sivalabs.jcart.site.web.controllers;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.sivalabs.jcart.site.web.models.Cart;
import com.sivalabs.jcart.site.web.models.OrderDTO;
/**
* @author Siva
*
*/
@Controller
public class CheckoutController extends <API key>
{
@Override
protected String getHeaderTitle()
{
return "Checkout";
}
@RequestMapping(value="/checkout", method=RequestMethod.GET)
public String checkout(HttpServletRequest request, Model model)
{
OrderDTO order = new OrderDTO();
model.addAttribute("order", order);
Cart cart = getOrCreateCart(request);
model.addAttribute("cart", cart);
return "checkout";
}
} |
define(["../core","../event","./trigger"],function(e){"use strict";e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(o,u){e.fn[u]=function(e,o){return arguments.length>0?this.on(u,null,e,o):this.trigger(u)}}),e.fn.extend({hover:function(e,o){return this.mouseenter(e).mouseleave(o||e)}})});
//# sourceMappingURL=/sm/<SHA256-like>.map |
var mysql = require('mysql');
module.exports = function(app, config){
var self = this;
var mysqlPool = mysql.createPool(config.db);
function createSystem(req, res) {
//var sql = "INSERT INTO "
}
function updateSystem(req, res) {
}
function deleteSystem(req, res) {
}
function upsertUser(req, res) {
}
function deleteUser(req, res) {
}
function createSession(req, res) {
}
app.post('/connect_api/system', createSystem);
app.put('/connect_api/system/:systemId', updateSystem);
app.delete('/connect_api/system/:systemId', deleteSystem);
app.put('/connect_api/system/:systemId/user/:userId', upsertUser);
app.delete('/connect_api/system/:systemId/user/:userId', deleteUser);
app.post('/connect_api/system/:systemId/user/:userId/session', createSession);
}; |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.0 / compcert - 2.7.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
compcert
<small>
2.7.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-19 20:43:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-19 20:43:27 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq 8.13.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.10.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Maxime Dénès <mail@maximedenes.fr>"
homepage: "http://compcert.inria.fr/"
dev-repo: "git+https://github.com/AbsInt/CompCert.git"
bug-reports: "https://github.com/AbsInt/CompCert/issues"
license: "INRIA Non-Commercial License Agreement"
build: [
[
"./configure"
"ia32-linux" {os = "linux"}
"ia32-macosx" {os = "macos"}
"ia32-cygwin" {os = "cygwin"}
"-bindir"
"%{bin}%"
"-libdir"
"%{lib}%/compcert"
"-clightgen"
]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
depends: [
"ocaml"
"coq" {>= "8.5.2" & < "8.6~"}
"menhir" {>= "20160303" & < "20180530"}
]
patches: "fix-coq-version.patch"
synopsis: "The CompCert C compiler"
authors: "Xavier Leroy <xavier.leroy@inria.fr>"
extra-files: ["fix-coq-version.patch" "md5=<API key>"]
url {
src: "https://github.com/AbsInt/CompCert/archive/v2.7.1.tar.gz"
checksum: "md5=<API key>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-compcert.2.7.1 coq.8.13.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.0).
The following dependencies couldn't be met:
- coq-compcert -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert.2.7.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html> |
module Adminpanel
class <API key> < ActionView::Helpers::FormBuilder
include ApplicationHelper
alias_method :text_field_original, :text_field
alias_method :<API key>, :radio_button
alias_method :text_area_original, :text_area
alias_method :<API key>, :password_field
alias_method :<API key>, :number_field
alias_method :<API key>, :email_field
alias_method :file_field_original, :file_field
def body(&block)
@template.content_tag :div, class: 'widget-body' do
@template.content_tag :div, class: 'widget-forms clearfix' do
yield
end
end
end
def footer(&block)
@template.content_tag :div, class: 'widget-footer' do
yield
end
end
def text_field(method, *args)
base_layout method, *args, 'text_field_original'
end
def image_field(method, *args)
image_input = base_layout(method, *args, 'file_field_original')
if !object.nil? && !object.new_record? #if not new record
"#{thumbnail_layout(method)}#{image_input}".html_safe
else
image_input
end
end
def file_field(method, *args)
file_input = base_layout(method, *args, 'file_field_original')
if !object.nil? && !object.new_record? #if not new record
"#{title_layout(method)}#{file_input}".html_safe
else
file_input
end
end
def gallery_field(method, *args)
base_layout method, *args, 'gallery_base'
end
def wysiwyg_field(method, *args)
options = args.extract_options!
options.reverse_merge! class: 'wysihtml5 span7'
base_layout method, options, 'text_area_original'
end
def text_area(method, *args)
base_layout method, *args, 'text_area_original'
end
# def radio_button_group(name, buttons, options)
# options.reverse_merge! :label => name
# options.reverse_merge! :html => {}
# output = ""
# buttons.each do |b|
# output += @template.content_tag(:label, <API key>(name, b, options[:html]) + b.capitalize, :class => "radio")
# end
# @template.content_tag :div, :class => "control-group" do
# @template.content_tag(:label, options[:label], :class => "control-label") +
# @template.content_tag(:div, output, { :class => "controls"}, false)
# end
# end
def <API key>(method, collection, value_method, text_method, options = {}, html_options = {})
super method, collection, value_method, text_method, options, html_options do |b|
b.label class: 'checkbox' do
b.check_box +
b.label
end
end
end
def boolean(method, *args)
base_layout method, *args, 'boolean_base'
end
def enum_field(method, *args)
select(
method,
self.object.class.send(method.pluralize).map{|option, value|
[I18n.t("#{self.object.class.name.demodulize.downcase}.#{option}"), option]
},
*args
)
end
def resource_select(method, *args)
select method, Adminpanel.<API key>.map{|resource| [symbol_class(resource).display_name, resource.to_s]}, *args
end
def select(method, select_options, *args)
options = args.extract_options!
label = options['label']
options.delete('label')
options.reverse_merge! class: 'span7', include_blank: '(Seleccione por favor)';
@template.content_tag :div, class: "control-group" do
@template.content_tag(:label, label, class: "control-label") +
@template.content_tag(:div, super(method, select_options, options), class: "controls")
end
end
def number_field(method, *args)
base_layout( method, *args, '<API key>' )
end
def password_field(method, *args)
base_layout( method, *args, '<API key>' )
end
def email_field(method, *args)
base_layout( method, *args, '<API key>' )
end
def submit(method, *args)
options = args.extract_options!
options.reverse_merge!(
class: 'btn btn-primary',
data: {
disable_with: I18n.t('action.submitting')
}
)
super(method, *args << options)
end
def datepicker(method, *args)
base_layout( method, *args, 'datepickerize_base' )
end
# def prepend_field(name, *args)
# options = args.extract_options!
# options.reverse_merge! :label => name
# label = options['label']
# options.delete('label')
# options.reverse_merge! :symbol => "#"
# symbol = options[:symbol]
# options.delete(:symbol)
# @template.content_tag :div, :class => "control-group" do
# @template.content_tag(:label, label, :class => "control-label") +
# @template.content_tag(
# :div,
# @template.content_tag(
# :div,
# @template.content_tag(:span, symbol, :class => "add-on") +
# text_field_original(name, *args << options),
# :class => "input-prepend"
# :class => "controls"
# end
# end
# def append_field(name, *args)
# options = args.extract_options!
# options.reverse_merge! :label => name
# label = options['label']
# options.delete('label')
# options.reverse_merge! :symbol => "#"
# symbol = options[:symbol]
# options.delete(:symbol)
# @template.content_tag :div, :class => "control-group" do
# @template.content_tag(:label, label, :class => "control-label") +
# @template.content_tag(
# :div,
# @template.content_tag(
# :div,
# text_field_original(name, *args << options) +
# @template.content_tag(:span, symbol, :class => "add-on"),
# :class => "input-append"
# :class => "controls"
# end
# end
private
def base_layout(method, *args, input_type)
options = args.extract_options!
options.reverse_merge! class: 'span7'
label = options['label']
options.delete('label')
@template.content_tag :div, class: 'control-group' do
@template.content_tag(:label, label, class: 'control-label') +
@template.content_tag(:div, class: 'controls') do
self.send(input_type, method, options)
end
end
end
def datepickerize_base(method, options)
options.reverse_merge! 'value' => Time.now.strftime("%d-%m-%Y")
@template.content_tag(
:div,
class: 'input-append date datepicker datepicker-basic',
data: {
date_format: 'dd-mm-yyyy',
date: options['value']
}
) do
text_field_original(method, options) +
(
@template.content_tag :span, class: 'add-on' do
@template.content_tag :i, nil, class: 'fa fa-th'
end
)
end
end
def boolean_base(method, options)
@template.content_tag :label, class: 'checkbox' do
check_box(method)
end
end
def gallery_base(method, options)
file_field_input = file_field_original(method, options)
hidden_input = hidden_field(:_destroy)
delete_button = @template.content_tag(:button, I18n.t("action.delete"), class: "btn btn-danger remove-fields")
if object.nil? || object.new_record?
"#{file_field_input}#{hidden_input}#{delete_button}".html_safe
else
"#{thumbnail_layout(method)}#{file_field_input}#{hidden_input}#{delete_button}".html_safe
end
end
def thumbnail_layout(attribute)
@template.content_tag :div, class: 'control-group' do
@template.content_tag :div, class: 'controls' do
@template.image_tag self.object.send("#{attribute}_url", :thumb)
end
end
end
def title_layout(attribute)
@template.content_tag :div, class: 'control-group' do
@template.content_tag :div, class: 'controls' do
@template.content_tag(:i, I18n.t('adminpanel.form.server_file', file: self.object["#{attribute}"]))
end
end
end
end
end |
'use strict';
angular.module('todoApp')
.directive('autofocus', function () {
return {
link: function (scope, element, attrs) {
scope.$watch(attrs.autofocus, function (val) {
if (angular.isDefined(val) && val) {
// $timeout(function() {
element[0].focus();
}
}, true);
element.bind('blur', function () {
if (angular.isDefined(attrs.autofocusLost)) {
scope.$apply(attrs.autofocusLost);
}
});
}
};
}); |
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>ResponseCorsFilter xref</title>
<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../apidocs/edu/msu/nscl/olog/ResponseCorsFilter.html">View Javadoc</a></div><pre>
<a class="jxr_linenumber" name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
<a class="jxr_linenumber" name="2" href="#2">2</a> <em class="jxr_comment"> * To change this template, choose Tools | Templates</em>
<a class="jxr_linenumber" name="3" href="#3">3</a> <em class="jxr_comment"> * and open the template in the editor.</em>
<a class="jxr_linenumber" name="4" href="#4">4</a> <em class="jxr_comment"> */</em>
<a class="jxr_linenumber" name="5" href="#5">5</a> <strong class="jxr_keyword">package</strong> edu.msu.nscl.olog;
<a class="jxr_linenumber" name="6" href="#6">6</a>
<a class="jxr_linenumber" name="7" href="#7">7</a> <strong class="jxr_keyword">import</strong> javax.ws.rs.core.Response;
<a class="jxr_linenumber" name="8" href="#8">8</a> <strong class="jxr_keyword">import</strong> javax.ws.rs.core.Response.ResponseBuilder;
<a class="jxr_linenumber" name="9" href="#9">9</a>
<a class="jxr_linenumber" name="10" href="#10">10</a> <strong class="jxr_keyword">import</strong> com.sun.jersey.spi.container.ContainerRequest;
<a class="jxr_linenumber" name="11" href="#11">11</a> <strong class="jxr_keyword">import</strong> com.sun.jersey.spi.container.ContainerResponse;
<a class="jxr_linenumber" name="12" href="#12">12</a> <strong class="jxr_keyword">import</strong> com.sun.jersey.spi.container.<API key>;
<a class="jxr_linenumber" name="13" href="#13">13</a> <em class="jxr_javadoccomment">/**</em>
<a class="jxr_linenumber" name="14" href="#14">14</a> <em class="jxr_javadoccomment"> *</em>
<a class="jxr_linenumber" name="15" href="#15">15</a> <em class="jxr_javadoccomment"> * @author berryman</em>
<a class="jxr_linenumber" name="16" href="#16">16</a> <em class="jxr_javadoccomment"> */</em>
<a class="jxr_linenumber" name="17" href="#17">17</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../edu/msu/nscl/olog/ResponseCorsFilter.html">ResponseCorsFilter</a> <strong class="jxr_keyword">implements</strong> <API key> {
<a class="jxr_linenumber" name="18" href="#18">18</a>
<a class="jxr_linenumber" name="19" href="#19">19</a> @Override
<a class="jxr_linenumber" name="20" href="#20">20</a> <strong class="jxr_keyword">public</strong> ContainerResponse filter(ContainerRequest req, ContainerResponse contResp) {
<a class="jxr_linenumber" name="21" href="#21">21</a>
<a class="jxr_linenumber" name="22" href="#22">22</a> ResponseBuilder resp = Response.fromResponse(contResp.getResponse());
<a class="jxr_linenumber" name="23" href="#23">23</a> resp.header(<span class="jxr_string">"<API key>"</span>, <span class="jxr_string">"*"</span>)
<a class="jxr_linenumber" name="24" href="#24">24</a> .header(<span class="jxr_string">"<API key>"</span>, <span class="jxr_string">"GET, POST, PUT, DELETE, OPTIONS"</span>)
<a class="jxr_linenumber" name="25" href="#25">25</a> .header(<span class="jxr_string">"<API key>"</span>, <span class="jxr_string">"true"</span>);
<a class="jxr_linenumber" name="26" href="#26">26</a>
<a class="jxr_linenumber" name="27" href="#27">27</a> String reqHead = req.getHeaderValue(<span class="jxr_string">"<API key>"</span>);
<a class="jxr_linenumber" name="28" href="#28">28</a>
<a class="jxr_linenumber" name="29" href="#29">29</a> <strong class="jxr_keyword">if</strong>(<strong class="jxr_keyword">null</strong> != reqHead && !reqHead.equals(<strong class="jxr_keyword">null</strong>)){
<a class="jxr_linenumber" name="30" href="#30">30</a> resp.header(<span class="jxr_string">"<API key>"</span>, reqHead);
<a class="jxr_linenumber" name="31" href="#31">31</a> }
<a class="jxr_linenumber" name="32" href="#32">32</a>
<a class="jxr_linenumber" name="33" href="#33">33</a> contResp.setResponse(resp.build());
<a class="jxr_linenumber" name="34" href="#34">34</a> <strong class="jxr_keyword">return</strong> contResp;
<a class="jxr_linenumber" name="35" href="#35">35</a> }
<a class="jxr_linenumber" name="36" href="#36">36</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html> |
#include "FileSystem.h"
#include "LogUnimpl.h"
#include <fuse.h>
#include <iostream>
#include <cstddef>
#include <string>
using RT11FS::FileSystem;
using std::cerr;
using std::endl;
using std::string;
namespace {
struct rt11_config
{
char *image;
int listdir;
};
static auto getFS()
{
return reinterpret_cast<FileSystem*>(fuse_get_context()->private_data);
}
auto rt11_getattr(const char *path, struct stat *stbuf) -> int
{
return getFS()->getattr(path, stbuf);
}
auto rt11_fgetattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi) -> int
{
return getFS()->fgetattr(path, stbuf, fi);
}
auto rt11_statfs(const char *path, struct statvfs *vfs) -> int
{
return getFS()->statfs(path, vfs);
}
auto rt11_chmod(const char *path, mode_t mode) -> int
{
return getFS()->chmod(path, mode);
}
auto rt11_unlink(const char *path) -> int
{
return getFS()->unlink(path);
}
auto rt11_rename(const char *oldName, const char *newName) -> int
{
return getFS()->rename(oldName, newName);
}
auto rt11_opendir(const char *, struct fuse_file_info *) -> int
{
return 0;
}
auto rt11_releasedir(const char *, struct fuse_file_info *) -> int
{
return 0;
}
auto rt11_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi) -> int
{
return getFS()->readdir(path, buf, filler, offset, fi);
}
auto rt11_open(const char *path, struct fuse_file_info *fi)
{
return getFS()->open(path, fi);
}
auto rt11_create(const char *path, mode_t mode, struct fuse_file_info *fi)
{
return getFS()->create(path, mode, fi);
}
auto rt11_release(const char *path, struct fuse_file_info *fi)
{
return getFS()->release(path, fi);
}
auto rt11_ftruncate(const char *path, off_t size, struct fuse_file_info *fi) -> int
{
return getFS()->ftruncate(path, size, fi);
}
auto rt11_read(const char *path, char *buf, size_t count, off_t offset, struct fuse_file_info *fi)
{
return getFS()->read(path, buf, count, offset, fi);
}
auto rt11_write(const char *path, const char *buf, size_t count, off_t offset, struct fuse_file_info *fi)
{
return getFS()->write(path, buf, count, offset, fi);
}
auto rt11_fsync(const char *path, int isdatasync, struct fuse_file_info *fi)
{
return getFS()->fsync(path, isdatasync, fi);
}
auto build_oper(struct fuse_operations *oper)
{
add_unimpl(oper);
oper->getattr = &rt11_getattr;
oper->fgetattr = &rt11_fgetattr;
oper->statfs = &rt11_statfs;
oper->chmod = &rt11_chmod;
oper->unlink = &rt11_unlink;
oper->rename = &rt11_rename;
oper->opendir = &rt11_opendir;
oper->releasedir = &rt11_releasedir;
oper->readdir = &rt11_readdir;
oper->open = &rt11_open;
oper->create = &rt11_create;
oper->release = &rt11_release;
oper->ftruncate = &rt11_ftruncate;
oper->read = &rt11_read;
oper->write = &rt11_write;
oper->fsync = &rt11_fsync;
}
auto usage(const string &program)
{
cerr << "usage: " << program << " disk-image mountpoint" << endl;
exit(1);
}
struct fuse_opt rt11_opts[] =
{
{ "-i %s", offsetof(struct rt11_config, image), 0 },
{ "-d", offsetof(struct rt11_config, listdir), 1},
FUSE_OPT_END,
};
}
auto main(int argc, char *argv[]) -> int
{
int exitcode;
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_operations rt11_oper;
struct rt11_config config;
memset(&config, 0, sizeof(config));
if (fuse_opt_parse(&args, &config, rt11_opts, NULL) == -1) {
usage(argv[0]);
}
if (config.image == NULL) {
cerr << argv[0] << ": must specify an image to mount" << endl;
usage(argv[0]);
}
fuse_opt_add_arg(&args, "-<API key>");
// the file system isn't thread safe; make FUSE serialize requests
// (it isn't likely that perf will be enough of an issues that this will ever matter)
fuse_opt_add_arg(&args, "-s");
FileSystem fs {config.image};
if (config.listdir) {
fs.lsdir();
return 0;
}
build_oper(&rt11_oper);
exitcode = fuse_main(args.argc, args.argv, &rt11_oper, &fs);
fuse_opt_free_args(&args);
return exitcode;
} |
<?php
include("database.php");
$email = $_POST["email"];
if($email != "" || $email != NULL) {
$pdo = new PDO($database_conexao, $database_username, $database_senha);
$query = "SELECT * FROM grupo_randori WHERE grupo_randori.nome = (SELECT user.fk_grupo_randori FROM user WHERE EMAIL=:email)";
$statement = $pdo->prepare($query);
$statement->bindValue(":email",$email);
$statement->execute();
$grupo = $statement->fetch(\PDO::FETCH_ASSOC);
$query = "UPDATE grupo_randori SET piloto = :email WHERE nome = :nome_grupo";
$statement = $pdo->prepare($query);
$statement->bindValue(":nome_grupo",$grupo["nome"]);
$statement->bindValue(":email",$email);
$statement->execute();
}
header("location:kata.php");
?> |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.<API key>);
}
}(this, function(expect, <API key>) {
'use strict';
var instance;
beforeEach(function() {
instance = new <API key>.ScaledAmount();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('ScaledAmount', function() {
it('should create an instance of ScaledAmount', function() {
// uncomment below and update the code to test ScaledAmount
//var instane = new <API key>.ScaledAmount();
//expect(instance).to.be.a(<API key>.ScaledAmount);
});
it('should have the property value (base name: "value")', function() {
// uncomment below and update the code to test the property value
//var instane = new <API key>.ScaledAmount();
//expect(instance).to.be();
});
it('should have the property scale (base name: "scale")', function() {
// uncomment below and update the code to test the property scale
//var instane = new <API key>.ScaledAmount();
//expect(instance).to.be();
});
});
})); |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_51) on Mon Mar 14 15:22:41 CDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>S-Index (Cat's Cradle)</title>
<meta name="date" content="2016-03-14">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="S-Index (Cat\'s Cradle)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../vector2d/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-12.html">Prev Letter</a></li>
<li><a href="index-14.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-13.html" target="_top">Frames</a></li>
<li><a href="index-13.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">F</a> <a href="index-6.html">G</a> <a href="index-7.html">I</a> <a href="index-8.html">M</a> <a href="index-9.html">N</a> <a href="index-10.html">O</a> <a href="index-11.html">P</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">V</a> <a href="index-16.html">X</a> <a href="index-17.html">Y</a> <a name="I:S">
</a>
<h2 class="title">S</h2>
<dl>
<dt><span class="memberNameLink"><a href="../vector2d/Vector2D.html#scale-double-double-">scale(double, double)</a></span> - Method in class vector2d.<a href="../vector2d/Vector2D.html" title="class in vector2d">Vector2D</a></dt>
<dd>
<div class="block">Multiplication of the components of a vector
stretches the vector.</div>
</dd>
<dt><span class="memberNameLink"><a href="../vector2d/Vector2D.html#scale-double-">scale(double)</a></span> - Method in class vector2d.<a href="../vector2d/Vector2D.html" title="class in vector2d">Vector2D</a></dt>
<dd>
<div class="block">We will often want to stretch a vector the
same amount in the horizontal and vertical directions.</div>
</dd>
<dt><span class="memberNameLink"><a href="../vector2d/CatsCradlePanel.html#SPEED">SPEED</a></span> - Static variable in class vector2d.<a href="../vector2d/CatsCradlePanel.html" title="class in vector2d">CatsCradlePanel</a></dt>
<dd> </dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">F</a> <a href="index-6.html">G</a> <a href="index-7.html">I</a> <a href="index-8.html">M</a> <a href="index-9.html">N</a> <a href="index-10.html">O</a> <a href="index-11.html">P</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">V</a> <a href="index-16.html">X</a> <a href="index-17.html">Y</a> </div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../vector2d/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-12.html">Prev Letter</a></li>
<li><a href="index-14.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-13.html" target="_top">Frames</a></li>
<li><a href="index-13.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
</body>
</html> |
<a href="/random">Random page</a> |
<stbui-search
placeholder=""
class="mat-elevation-z4 m-b-16"
(onSearch)="onSearchTriggered($event)"
></stbui-search>
<div class="mat-elevation-z4">
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox
(change)="$event ? masterToggle() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()"
>
</mat-checkbox>
</th>
<td mat-cell *matCellDef="let row">
<mat-checkbox
(click)="$event.stopPropagation()"
(change)="$event ? selection.toggle(row) : null"
[checked]="selection.isSelected(row)"
>
</mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="firstSeen">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">
{{ element.firstSeen | date: 'yyyy-MM-dd hh:mm:ss' }}
</td>
</ng-container>
<ng-container matColumnDef="src">
<th mat-header-cell *matHeaderCellDef>URL</th>
<td mat-cell *matCellDef="let element">{{ element.src }}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">{{ element.type }}</td>
</ng-container>
<ng-container matColumnDef="releaseStages">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element">{{ element.releaseStages }}</td>
</ng-container>
<ng-container matColumnDef="star" stickyEnd>
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element"></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr
mat-row
*matRowDef="let row; columns: displayedColumns"
(click)="rowSelection(row, $event)"
></tr>
</table>
</div>
<error-detail
[opened]="openDetail"
(onOpened)="onOpenedTriggered($event)"
></error-detail> |
# 3dObjectViewerJS
JavaScript 3D Object Viewer using Canvas
View 3D Objects in "object space", can only handle one continous strip of vertexes. So models with seperate pieces are not supported.
Very primitive.
Has single source lighting & texturing (auto generated texture from http://ricardocabello.com/blog/post/710)
This was more of an experiment and learning experience than an actual product. I don't recommend using this for anything.
"Cell" shading example:
http:
I never read up on how cell shading is really done, I just took a guess by drawing a wide wireframe on the backface triangles. In practice, this would be really slow. |
<!
Filters form :
- Pages
- Search field (title, content, etc.)
<div id="maincolumn">
<h2 class="main articles" id="main-title"><?= lang('<API key>') ?></h2>
<?php
$nbLang = count(Settings::get_languages());
$width = (100 / $nbLang) - 10;
$flag_width = (30 * $nbLang);
?>
<!-- Tabs -->
<div id="articlesTab" class="mainTabs">
<ul class="tab-menu">
<li><a><span><?= lang('<API key>') ?></span></a></li>
<li><a><span><?= lang('<API key>') ?></span></a></li>
<li><a><span><?= lang('ionize_title_types') ?></span></a></li>
<li><a title="<?= lang('ionize_help_flags') ?>"><span><?= lang('ionize_label_flags') ?></span></a></li>
</ul>
<div class="clear"></div>
</div>
<!-- Articles list -->
<div id="articlesTabContent">
<div class="tabcontent">
<!-- Article list filtering -->
<form id="filterArticles">
<label class="left" title="<?= lang('<API key>') ?>"><?= lang('<API key>') ?></label>
<input id="contains" type="text" class="inputtext w160 left"></input>
<a id="cleanFilter" class="icon clearfield left ml5"></a>
</form>
<table class="list" id="articlesTable">
<thead>
<tr>
<th><?= lang('ionize_label_title') ?></th>
<th axis="string"><?= lang('ionize_label_pages') ?></th>
<th axis="string" style="width:<?= $flag_width ?>px;"><?= lang('<API key>') ?></th>
<th class="right" style="width:70px;"><?= lang('<API key>') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($articles as $article) :?>
<?php
$title = ($article['title'] != '') ? $article['title'] : $article['name'];
// HTML strings
$online_html = $content_html = $pages_html ='';
// Array of status
$pages = $content = $online = array();
foreach($article['langs'] as $lang)
{
if($lang['online'] == '1') $online[] = '<img class="pr5" src="'. theme_url() . 'images/world_flags/flag_' . $lang['lang'] . '.gif" />';
if ($lang['content'] != '') $content[] = '<img class="pr5" src="'. theme_url() . 'images/world_flags/flag_' . $lang['lang'] . '.gif" />';
}
// Article parent pages links
foreach($article['pages'] as $page)
{
if (!empty($page['page']))
{
$page_title = (! empty($page['page']['title'])) ? $page['page']['title'] : $page['page']['name'];
$pages[] = '<span rel="" >' . $page_title . '</span>';
}
}
// HTML
$pages_html = implode(', ', $pages);
$content_html = implode('', $content);
$online_html = implode('', $online);
?>
<tr class="article<?= $article['id_article'] ?>">
<td style="overflow:hidden;" class="title">
<div style="overflow:hidden;">
<span class="toggler left" rel="content<?= $article['id_article'] ?>">
<a class="left article" rel="0.<?= $article['id_article'] ?>"><span class="flag flag<?= $article['flag'] ?>"></span><?= $title ?></a>
</span>
</div>
<div id="content<?= $article['id_article'] ?>" class="content">
<div class="text">
<?php foreach(Settings::get_languages() as $language) :?>
<?php $lang = $language['lang']; ?>
<div style="width:<?=$width?>%;" class="mr10 left langcontent<?php if($language['def'] == '1') :?> dl<?php endif ;?>">
<img class="pr5" src="<?= theme_url() ?>images/world_flags/flag_<?= $lang ?>.gif" />
<div>
<?= strip_tags($article['langs'][$lang]['content'], ('<p>,<ul>,<ol>,<li>,<h1>,<h2>,<h3>')) ?>
</div>
</div>
<?php endforeach ;?>
</div>
</div>
</td>
<td>
<?php if(empty($pages_html)) :?>
<img class="help" src="<?= theme_url() ?>images/icon_16_alert.png" title="<?= lang('<API key>') ?>" />
<?php endif; ?>
<?= $pages_html ?>
</td>
<td>
<?= $content_html ?>
<?php if(count($content) < $nbLang) :?><img class="help" src="<?= theme_url() ?>images/icon_16_alert.png" title="<?= lang('<API key>') ?>" /><?php endif; ?>
</td>
<!-- <td><?= $online_html ?></td> -->
<td>
<a class="icon right delete" rel="<?= $article['id_article'] ?>"></a>
<a class="icon right duplicate mr5" rel="<?= $article['id_article'] ?>|<?= $article['name'] ?>"></a>
<a class="icon right edit mr5" rel="<?= $article['id_article'] ?>" title="<?= $title ?>"></a>
</td>
</tr>
<?php endforeach ;?>
</tbody>
</table>
</div>
<!-- Categories -->
<div class="tabcontent">
<div class="tabsidecolumn">
<h3><?= lang('<API key>') ?></h3>
<form name="newCategoryForm" id="newCategoryForm" action="<?= admin_url() ?>category/save">
<!-- Name -->
<dl class="small">
<dt>
<label for="name"><?=lang('ionize_label_name')?></label>
</dt>
<dd>
<input id="name" name="name" class="inputtext required" type="text" value="" />
</dd>
</dl>
<fieldset id="blocks">
<!-- Category Lang Tabs -->
<div id="categoryTab" class="mainTabs gray">
<ul class="tab-menu">
<?php foreach(Settings::get_languages() as $l) :?>
<li class="tab_category" rel="<?= $l['lang'] ?>"><a><span><?= ucfirst($l['name']) ?></span></a></li>
<?php endforeach ;?>
</ul>
<div class="clear"></div>
</div>
<!-- Category Content -->
<div id="categoryTabContent">
<?php foreach(Settings::get_languages() as $l) :?>
<?php $lang = $l['lang']; ?>
<div class="tabcontentcat">
<!-- title -->
<dl class="small">
<dt>
<label for="title_<?= $lang ?>"><?= lang('ionize_label_title') ?></label>
</dt>
<dd>
<input id="title_<?= $lang ?>" name="title_<?= $lang ?>" class="inputtext" type="text" value=""/>
</dd>
</dl>
<!-- subtitle -->
<dl class="small">
<dt>
<label for="subtitle_<?= $lang ?>"><?= lang('<API key>') ?></label>
</dt>
<dd>
<input id="subtitle_<?= $lang ?>" name="subtitle_<?= $lang ?>" class="inputtext" type="text" value=""/>
</dd>
</dl>
<!-- description -->
<dl class="small">
<dt>
<label for="descriptionCategory<?= $lang ?>"><?= lang('<API key>') ?></label>
</dt>
<dd>
<textarea id="descriptionCategory<?= $lang ?>" name="description_<?= $lang ?>" class="tinyCategory" rel="<?= $lang ?>"></textarea>
</dd>
</dl>
</div>
<?php endforeach ;?>
</div>
<!-- save button -->
<dl class="small">
<dt> </dt>
<dd>
<button id="bSaveNewCategory" type="button" class="button yes"><?= lang('ionize_button_save') ?></button>
</dd>
</dl>
</fieldset>
</form>
</div>
<div class="tabcolumn pt15" id="categoriesContainer">
</div>
</div>
<!-- Types -->
<div class="tabcontent">
<!-- New type -->
<div class="tabsidecolumn">
<h3><?= lang('<API key>') ?></h3>
<form name="newTypeForm" id="newTypeForm" action="<?= admin_url() ?>article_type/save">
<!-- Name -->
<dl class="small">
<dt>
<label for="type"><?=lang('ionize_label_type')?></label>
</dt>
<dd>
<input id="type" name="type" class="inputtext" type="text" value="" />
</dd>
</dl>
<!-- Flag -->
<dl class="small">
<dt>
<label for="flag0" title="<?= lang('ionize_help_flag') ?>"><?= lang('ionize_label_flag') ?></label>
</dt>
<dd>
<label class="flag flag0"><input id="flag0" name="type_flag" class="inputradio" type="radio" value="0" /></label>
<label class="flag flag1"><input name="type_flag" class="inputradio" type="radio" value="1" /></label>
<label class="flag flag2"><input name="type_flag" class="inputradio" type="radio" value="2" /></label>
<label class="flag flag3"><input name="type_flag" class="inputradio" type="radio" value="3" /></label>
<label class="flag flag4"><input name="type_flag" class="inputradio" type="radio" value="4" /></label>
<label class="flag flag5"><input name="type_flag" class="inputradio" type="radio" value="5" /></label>
<label class="flag flag6"><input name="type_flag" class="inputradio" type="radio" value="6" /></label>
</dd>
</dt>
</dl>
<!-- Description -->
<dl class="small">
<dt>
<label for="descriptionType"><?=lang('<API key>')?></label>
</dt>
<dd>
<textarea id="descriptionType" name="description" class="tinyType"></textarea>
</dd>
</dl>
<!-- save button -->
<dl class="small">
<dt> </dt>
<dd>
<button id="bSaveNewType" type="button" class="button yes"><?= lang('ionize_button_save') ?></button>
</dd>
</dl>
</form>
</div>
<!-- Existing types -->
<div class="tabcolumn pt15" id="<API key>"></div>
</div>
<!-- Articles Markers -->
<div class="tabcontent">
<form name="flagsForm" id="flagsForm">
<label class="flag flag1" for="flag1"></label><input type="text" class="inputtext w180 mb2 ml10" id="flag1" name="flag1" value="<?= Settings::get('flag1') ?>" /><br/>
<label class="flag flag2" for="flag2"></label><input type="text" class="inputtext w180 mb2 ml10" id="flag2" name="flag2" value="<?= Settings::get('flag2') ?>" /><br/>
<label class="flag flag3" for="flag3"></label><input type="text" class="inputtext w180 mb2 ml10" id="flag3" name="flag3" value="<?= Settings::get('flag3') ?>" /><br/>
<label class="flag flag4" for="flag4"></label><input type="text" class="inputtext w180 mb2 ml10" id="flag4" name="flag4" value="<?= Settings::get('flag4') ?>" /><br/>
<label class="flag flag5" for="flag5"></label><input type="text" class="inputtext w180 mb2 ml10" id="flag5" name="flag5" value="<?= Settings::get('flag5') ?>" /><br/>
<label class="flag flag6" for="flag5"></label><input type="text" class="inputtext w180 ml10" id="flag6" name="flag6" value="<?= Settings::get('flag6') ?>" /><br/>
<label></label><button id="bSaveFlags" type="button" class="button yes ml20 mt10"><?= lang('ionize_button_save') ?></button>
</form>
</div>
</div>
</div>
<script type="text/javascript">
/**
* Make each article draggable
*
*/
$$('#articlesTable .article').each(function(item, idx)
{
ION.addDragDrop(item, '.dropArticleInPage,.dropArticleAsLink,.folder', 'ION.dropArticleInPage,ION.dropArticleAsLink,ION.dropArticleInPage');
});
/**
* Adds Sortable function to the user list table
*
*/
new SortableTable('articlesTable',{sortOn: 0, sortBy: 'ASC'});
ION.initLabelHelpLinks('#articlesTable');
ION.initLabelHelpLinks('#filterArticles');
// Categories list
ION.HTML(admin_url + 'category/get_list', '', {'update': 'categoriesContainer'});
// New category Form submit
$('bSaveNewCategory').addEvent('click', function(e) {
e.stop();
ION.sendData(admin_url + 'category/save', $('newCategoryForm'));
});
/**
* New category tabs (langs)
*/
new TabSwapper({tabsContainer: 'categoryTab', sectionsContainer: 'categoryTabContent', selectedClass: 'selected', deselectedClass: '', tabs: 'li', clickers: 'li a', sections: 'div.tabcontentcat', cookieName: 'categoryTab' });
/**
* TinyEditors
* Must be called after tabs init.
*
*/
ION.initTinyEditors('.tab_category', '#categoryTabContent .tinyCategory', 'small');
// Type list
ION.HTML(admin_url + 'article_type/get_list', '', {'update': '<API key>'});
// New Type Form submit
$('bSaveNewType').addEvent('click', function(e) {
e.stop();
ION.sendData(admin_url + 'article_type/save', $('newTypeForm'));
});
/**
* Flags save button
*
*/
$('bSaveFlags').addEvent('click', function(e) {
e.stop();
ION.sendData(admin_url + 'setting/save_flags', $('flagsForm'));
});
/**
* Articles Tabs
*
*/
new TabSwapper({tabsContainer: 'articlesTab', sectionsContainer: 'articlesTabContent', selectedClass: 'selected', deselectedClass: '', tabs: 'li', clickers: 'li a', sections: 'div.tabcontent', cookieName: 'articlesTab' });
/**
* Table action icons
*
$$('#articlesTable .delete').each(function(item)
{
ION.initItemDeleteEvent(item, 'article');
});
*/
var <API key> = Lang.get('<API key>');
var url = admin_url + 'article/delete/';
$$('#articlesTable .delete').each(function(item)
{
ION.initRequestEvent(item, url + item.getProperty('rel'), {}, {'message': <API key>})
});
$$('#articlesTable .duplicate').each(function(item)
{
var rel = item.getProperty('rel').split("|");
var id = rel[0];
var url = rel[1];
item.addEvent('click', function(e)
{
e.stop();
ION.formWindow('DuplicateArticle', 'newArticleForm', '<API key>', 'article/duplicate/' + id + '/' + url, {width:520, height:280});
});
});
$$('#articlesTable .edit').each(function(item)
{
var id_article = item.getProperty('rel');
var title = item.getProperty('title');
item.addEvent('click', function(e)
{
e.stop();
MUI.Content.update({'element': $('mainPanel'),'loadMethod': 'xhr','url': admin_url + 'article/edit/0.' + id_article, 'title': Lang.get('<API key>') + ' : ' + title });
});
});
/**
* Content togglers
*
*/
<API key> = function()
{
$$('#articlesTable tbody tr td.title').each(function(el)
{
var c = el.getFirst('.content');
var toggler = el.getElement('.toggler');
var text = c.getFirst();
var s = text.getDimensions();
if (s.height > 0)
{
toggler.store('max', s.height +10);
if (toggler.hasClass('expand'))
{
el.setStyles({'height': 20 + s.height + 'px' });
c.setStyles({'height': s.height + 'px' });
}
}
else
{
toggler.store('max', s.height);
}
});
}
window.removeEvent('resize', <API key>);
window.addEvent('resize', function()
{
<API key>();
});
window.fireEvent('resize');
$$('#articlesTable tbody tr td .toggler').each(function(el)
{
el.fx = new Fx.Morph($(el.getProperty('rel')), {duration: 200, transition: Fx.Transitions.Sine.easeOut});
el.fx2 = new Fx.Morph($(el.getParent('td')), {duration: 200, transition: Fx.Transitions.Sine.easeOut});
$(el.getProperty('rel')).setStyles({'height':'0px'});
});
var toggleArticle = function(e)
{
e.stop();
// this.fx.toggle();
this.toggleClass('expand');
var max = this.retrieve('max');
var from = 0;
var to = max;
if (this.hasClass('expand') == 0)
{
from = max;
to = 0;
this.getParent('tr').removeClass('highlight');
}
else
{
this.getParent('tr').addClass('highlight');
}
this.fx.start({'height': [from, to]});
this.fx2.start({'height': [from+20, to+20]});
};
$$('#articlesTable tbody tr td .toggler').addEvent('click', toggleArticle);
$$('#articlesTable tbody tr td.title').addEvent('click', function(e){this.getElement('.toggler').fireEvent('click', e)});
$$('#articlesTable tbody tr td .content').addEvent('click', function(e){this.getParent('td').getElement('.toggler').fireEvent('click', e)});
/**
* Filtering
*
*/
var filterArticles = function(search)
{
var reg = new RegExp('<span class="highlight"[^><]*>|<.span[^><]*>','g')
var search = RegExp(search,"gi");
$$('#articlesTable .text').each(function(el)
{
var c = el.get('html');
var tr = el.getParent('tr');
var m = c.match(search);
if ( (m))
{
tr.setStyles({'background-color':'#FDFCED'});
h = c;
h = h.replace(reg, '');
m.each(function(item){
h = h.replace(item, '<span class="highlight">' + item + '</span>');
})
el.set('html', h);
tr.setStyle('visibility', 'visible');
}
else
{
tr.removeProperty('style');
h = c.replace(reg, '');
el.set('html', h);
}
});
}
$('contains').addEvent('keyup', function(e)
{
e.stop();
var search = this.value;
if (search.length > 2)
{
if (this.timeoutID)
{
$clear(this.timeoutID);
}
this.timeoutID = filterArticles.delay(500, this, search);
}
});
$('cleanFilter').addEvent('click', function(e)
{
var reg = new RegExp('<span class="highlight"[^><]*>|<.span[^><]*>','g')
$('contains').setProperty('value','').set('text', '');
$$('#articlesTable tr').each(function(el)
{
el.removeProperty('style');
});
$$('#articlesTable .text').each(function(el){
var c = el.get('html');
c = c.replace(reg, '');
el.set('html', c);
});
});
/**
* Panel toolbox
*
*/
ION.initToolbox('articles_toolbox');
</script> |
import curry1 from './_private/curry1'
/**
* @function exists
* @desc Validates if a value is not null or undefined
* @param {*} x - any valid Javascript value
* @example
*
* exists(null) // false
* exists([] // true
*
*/
export default curry1(function exists (x) {
return !(x == null)
}) |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Comp4414Component } from './comp-4414.component';
describe('Comp4414Component', () => {
let component: Comp4414Component;
let fixture: ComponentFixture<Comp4414Component>;
beforeEach(async(() => {
TestBed.<API key>({
declarations: [ Comp4414Component ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Comp4414Component);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
}); |
# Capitan linter
Linitng your private assets.
## ESLint
Linting your JavaScript files with ESLinter.
| | |
|
Task | grunt/tasks/eslint.js
Rules | grunt/linter/.eslintrc
Used Plugin | https:
Rule List| http://eslint.org/docs/rules/
## HMTL Hint
Linting your generated HTML files **except** the styleguide.html.
| | |
|
Task | grunt/tasks/htmlhintplus.js
Rules | grunt/linter/.htmlhintrc
Used Plugin | https://github.com/poppinlp/grunt-htmlhint-plus
Rule List| https://github.com/yaniswang/HTMLHint/wiki/Rules
## Stylelint
Linting SASS Files via postcss task.
| | |
|
Task | grunt/tasks/postcss.js
Rules | grunt/linter/.stylelintrc
Used Plugins | https:
Rule List| https://github.com/stylelint/stylelint/blob/master/docs/user-guide/rules.md |
using System;
namespace ReMi.DataAccess.Exceptions.Configuration
{
public class <API key> : <API key>
{
public <API key>(Guid boardId)
: base(FormatMessage(boardId))
{
}
public <API key>(Guid boardId, Exception innerException)
: base(FormatMessage(boardId), innerException)
{
}
private static string FormatMessage(Guid boardId)
{
return string.Format("JQL query not found for board: {0}", boardId);
}
}
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title >Cloud Connection</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<header>
<div class="headline">
<h1 style="color:black; font-style: cursive; text-align: center; margin-top: none ">Cloud Connection</h1>
</div>
</header>
<div class="controls">
<center><table id= "table1">
<tr>
<center><td><div id="interactive" class="viewport"></div></td></center>
<section id="container" class="container">
<td>
<!-- <fieldset class="input-group"> -->
<button class="stop">Stop</button>
<!-- </fieldset> -->
</td>
<td>
<button id = "generator">Confirm</button>
</td>
</tr>
<fieldset class="reader-config-group">
<h1>Directions: Using web enabled camera , focus on barcode until image is captured </h1>
<div id = "genlink" ><a href="http://generator.barcoding.com/"> ** Generate custom QR codes HERE** </a></div>
<label>
<span>Barcode-Type</span>
<select name="decoder_readers">
<option value="code_128" selected="selected">Code 128</option>
<option value="code_39">Code 39</option>
<option value="ean">EAN</option>
<option value="ean_8">EAN-8</option>
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
<option value="codabar">Codabar</option>
<option value="i2of5">I2of5</option>
</select>
</label>
<label>
<span>Resolution (long side)</span>
<select name="<API key>">
<option value="320x240">320px</option>
<option selected="selected" value="640x480">640px</option>
<option value="800x600">800px</option>
<option value="1280x720">1280px</option>
<option value="1600x960">1600px</option>
<option value="1920x1080">1920px</option>
</select>
</label>
<label>
<span>Patch-Size</span>
<select name="locator_patch-size">
<option value="x-small">x-small</option>
<option value="small">small</option>
<option selected="selected" value="medium">medium</option>
<option value="large">large</option>
<option value="x-large">x-large</option>
</select>
</label>
<label>
<span>Half-Sample</span>
<input type="checkbox" checked="checked" name="locator_half-sample" />
</label>
<label>
<span>Workers</span>
<select name="numOfWorkers">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option selected="selected" value="4">4</option>
<option value="8">8</option>
</select>
</label>
<label>
</label>
</fieldset>
</tr>
<td>
</div>
<div id="result_strip">
<ul class="thumbnails"></ul>
</div>
</td>
</section>
</table></center>
<hr>
<section>
<center><table id = "table2" style= "border-radius: 25px; border: solid" >
<th>GENERAL INFO</th>
<tr>
<td><article id = "gensect">
<ul>
</ul>
</article></td>
</tr>
<tr>
<td><center><form >
<input type="text" style="width:75%">
<input type="submit" value="Submit">
</form></center>
</td>
</tr>
</table></center><br><br>
<center><table id = "table3" style= "border-radius: 25px; border: solid" >
<th>PERSONAL THOUGHTS AND NOTES</th>
<tr>
<td><article id = "persect">
<ul>
</ul>
</article></td>
</tr>
<tr>
<td><center><form >
<input type="text" style="width:75%">
<input type="submit" value="Submit">
</form></center>
</td>
</tr>
</table></center><br><br>
<center><table id = "table4" style= "border-radius: 25px; border: solid" >
<th>PUBLIC FORUM</th>
<tr>
<td><article id = "pubsect">
<ul>
</ul>
</article></td>
</tr>
<tr>
<td><center><form >
<input type="text" style="width:75%">
<input type="submit" value="Submit">
</form></center>
</td>
</tr>
</table></center><br><br>
</section>
<script type="text/javascript">
var phone, accessToken, myDHS, myDHSURL = 'your_dhs_url';
var xhrConfig = new XMLHttpRequest();
xhrConfig.open('GET', myDHSURL + "/config/");
xhrConfig.onreadystatechange = function() {
if (xhrConfig.readyState == 4) {
if (xhrConfig.status == 200) {
myDHS = JSON.parse(xhrConfig.responseText);
} else {
console.log(xhrConfig.responseText);
}
}
}
xhrConfig.send();
function createPhoneObject() {
phone = ATT.rtc.Phone.getPhone();
registerEvents();
<API key>.hidden = true;
<API key>.hidden = false;
}
function registerEvents() {
phone.on('error', onError);
}
function onError(data) {
console.log(data.error);
}
</script>
<!
<button id="<API key>" onclick="createPhoneObject()">Create Phone Object</button>
<button id="<API key>" hidden disabled>Phone Object Created Successfully</button>
</p>
<p>
<input type="text" id="callToInput" placeholder="Account ID/Telephone" hidden>
<button id="makeCallButton" onclick="makeCall()" hidden>Make Call alice@yourdomain.com or 1234567890</button>
<button id="answerCallButton" onclick="answerCall()" hidden>Answer Call</button>
<audio id="local" style="display:none"></audio>
<audio id="remote" style="display:none"></audio>
</p>
<script src="jquery-1.9.0.min.js"></script>
<script src="quagga.js" ></script>
<script src="live_w_locator.js" ></script>
<script>
var item = $(".code")[0];
var item2gen = "Golden Gate Bridge";
var item2pers = "-Photo of me on Bridge www.nickperez.us/ggbridge";
var item2pub = " - Greatest bridge in the world. It was built by the Egyptians millions of years ago using nothing but seashells and pigs feet \n - ^ How dare you! My great granddad build the entire thing with his bare hands " ;
var item1gen = "Eclipse Gum ";
var item1pers = "- This area is used for general information about the tagged item like it's price or history ";
var item1pub= "-This public area is used to share any other sort of information about a tagged item including reviews, price comparisons, or other commentary " ;
var item3gen = "-Parking Meter 888 at 888 1st street";
var item3pers = "-Move car at 3:52 ";
var item3pub= "-Payment is required between the hours of 8am -6pm Monday - Friday . The following Holidays are free: \n Christmas, Thanksgiving, New Years, Cinco de Mayo";
var item4gen = "Beers";
var item4pers = "-These are Nicks. Not YOURS!";
var item4pub = " -I (Mark) took one . I will be replace it ASAP!";
var item5gen = "Street Art / 'grafitti' by Banksy";
var item5pers = "-Notes shared by the artist about the work and the meaning behind it \n - contact info for interestd buyers ";
var item5pub = "-Comments and impressions from fans and passers bys ";
// grFITTI , DOH]]ICKY, DORITORS
$("#generator").click(function(){
var item = $(".code")[0];
if(item.innerHTML == "0022000013316"){
$("#gensect").append(item1gen);
$("#persect").append(item1pers);
$("#pubsect").append(item1pub);
}else if(item.innerHTML == "item 2"){
$("#gensect").append(item2gen);
$("#persect").append(item2pers);
$("#pubsect").append(item2pub);
}else if(item.innerHTML == "item 3"){
$("#gensect").append(item3gen);
$("#persect").append(item3pers);
$("#pubsect").append(item3pub);
}else if(item.innerHTML == "item 4"){
$("#gensect").append(item4gen);
$("#persect").append(item4pers);
$("#pubsect").append(item4pub);
}else if(item.innerHTML == "item 5"){
$("#gensect").append(item5gen);
$("#persect").append(item5pers);
$("#pubsect").append(item5pub);
}else{
alert("Error reading item. Please reload this page");
}
});
</script>
<script type="text/javascript">
function enough(){
var snaps = $(".thumbnails")[0].children
if(snaps.length >1){
$('#stop').click()
}
}
enough()
</script>
</body>
</html> |
/* Remove the "Styling with Markdown is supported" link when a PR comment is in edit mode */
a.tabnav-extra[href$='mastering-markdown/'] {
display: none !important;
}
/* Remove annoying "helpful" banner on the issue tracker listing */
.repository-content .mb-4.js-notice {
display: none !important;
}
/* Remove annoying "helpful" popover on the repo label page */
.labels-list .TutorialPopover {
display: none !important;
}
/* Remove the useless "Continuous integration has not been set up" message on PRs */
.branch-action-item.<API key> {
display: none;
}
/* Remove "pro tip!" box on profile page (appears when name isn't set) */
.new-user-avatar-cta {
display: none !important;
}
/* Remove random protip at the bottom of the page */
.protip {
display: none !important;
}
/* Remove Marketplace marketing box on PRs */
.<API key> {
display: none !important;
} |
package main
import (
"context"
"crypto/rand"
"encoding/base64"
"encoding/gob"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"path/filepath"
"github.com/gorilla/securecookie"
"github.com/gorilla/sessions"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
)
var conf *oauth2.Config
var store *sessions.CookieStore
// User is a Google user
type User struct {
Name string `json:"name"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
Email string `json:"email"`
Picture string `json:"picture"`
}
// GroupMember defines whether the user is a member of a group
// It is set by the groups `hasMember` API endpoint
type GroupMember struct {
IsMember bool `json:"isMember"`
}
func init() {
gob.Register(User{})
}
func oauthConfig() {
keyFile := filepath.Join(dataDir, ".cookie_key")
if key, err := ioutil.ReadFile(keyFile); err == nil {
store = sessions.NewCookieStore(key)
} else {
// TODO(jamesog): Add a second parameter for encryption
// This makes it more complicated to write to the cache file
// It should probably be saved in the database instead
key := securecookie.GenerateRandomKey(64)
err := ioutil.WriteFile(keyFile, key, 0600)
if err != nil {
log.Fatal(err)
}
store = sessions.NewCookieStore(key)
}
f, err := ioutil.ReadFile(credsFile)
if err != nil {
log.Fatalf("couldn't read credentials file: %s", err)
}
scopes := []string{
"https:
"https:
"https:
}
conf, err = google.ConfigFromJSON(f, scopes...)
if err != nil {
log.Fatalf("couldn't parse OAuth2 config: %s", err)
}
}
func getLoginURL(state string) string {
return conf.AuthCodeURL(state)
}
func randToken() string {
b := make([]byte, 32)
rand.Read(b)
return base64.StdEncoding.EncodeToString(b)
}
// loginHandler is just a redirect to the Google login page
func (app *App) loginHandler(w http.ResponseWriter, r *http.Request) {
tok := randToken()
state, err := store.Get(r, "state")
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
// State only needs to be valid for 5 mins
state.Options.MaxAge = 300
state.Values["state"] = tok
// Store a redirect URL to send the user back to the page they were on
redir, _ := store.Get(r, "redir")
redir.Options.MaxAge = 300
redir.Values["redir"] = r.URL.Query().Get("redir")
// Save both sessions
sessions.Save(r, w)
http.Redirect(w, r, getLoginURL(tok), http.StatusFound)
}
func (app *App) logoutHandler(w http.ResponseWriter, r *http.Request) {
session, err := store.Get(r, "user")
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
v := session.Values["user"]
if user, ok := v.(User); ok {
app.audit(user.Email, "logout", "")
}
session.Options.MaxAge = -1
session.Save(r, w)
// User is logged out. Redirect back to the index page
http.Redirect(w, r, "/", http.StatusFound)
}
// AuthSession stores the session and OAuth2 client
type AuthSession struct {
state *sessions.Session
user *sessions.Session
token *oauth2.Token
client *http.Client
}
type googleAPIError struct {
Error struct {
Message string `json:"message"`
Code int `json:"code"`
} `json:"error"`
}
// userInfo fetches the user profile info from the Google API
func (s AuthSession) userInfo() (*User, error) {
// Retrieve the logged in user's information
res, err := s.client.Get("https:
if err != nil {
return nil, err
}
defer res.Body.Close()
data, _ := ioutil.ReadAll(res.Body)
// Unmarshal the user data
var user User
err = json.Unmarshal(data, &user)
if err != nil {
return nil, err
}
return &user, nil
}
// validateUser looks up the user's email address in the database and returns
// true if they exist
func (app *App) validateUser(user *User) (bool, error) {
return app.db.UserExists(user.Email)
}
// validateGroupMember looks up all group names in the database and returns
// true if the user is a member of any of the groups
func (app *App) validateGroupMember(s AuthSession, email string) (bool, error) {
url := "https:
groups, err := app.db.LoadGroups()
if err != nil {
log.Printf("error retrieving groups from database: %v", err)
return false, err
}
for _, group := range groups {
res, err := s.client.Get(fmt.Sprintf(url, group, email))
if err != nil {
log.Printf("error retrieving user %s for group %s: %v", email, group, err)
continue
}
defer res.Body.Close()
data, _ := ioutil.ReadAll(res.Body)
if res.StatusCode != http.StatusOK {
var e googleAPIError
err := json.Unmarshal(data, &e)
if err != nil {
log.Printf("[group %s] error unmarshaling Google API error: %v", group, err)
continue
}
log.Printf("[group %s] error code %d from groups API: %v", group, e.Error.Code, e.Error.Message)
continue
}
var gm GroupMember
err = json.Unmarshal(data, &gm)
if err != nil {
return false, err
}
if gm.IsMember {
return true, nil
}
}
return false, nil
}
// authHandler receives the login information from Google and checks if the
// email address is authorized
func (app *App) authHandler(w http.ResponseWriter, r *http.Request) {
var s AuthSession
var err error
s.state, err = store.Get(r, "state")
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
// Check if the user has a valid session
q := r.URL.Query()
if s.state.Values["state"] != q.Get("state") {
http.Error(w, "Invalid session", http.StatusUnauthorized)
return
}
// Attempt to fetch the redirect URI from the store
uri := "/"
redir, _ := store.Get(r, "redir")
if u := redir.Values["redir"]; u != "" {
uri = u.(string)
}
// Destroy the redirect session, it isn't needed any more
redir.Options.MaxAge = -1
redir.Save(r, w)
s.user, err = store.Get(r, "user")
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
s.token, err = conf.Exchange(context.Background(), q.Get("code"))
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
s.client = conf.Client(context.Background(), s.token)
var authorised bool
// Check if the user email is in the individual users list
// If the individual user is not authorised, check group membership
user, err := s.userInfo()
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
authorised, err = app.validateUser(user)
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
// The user doesn't have an individual entry, check group membership
if !authorised {
authorised, err = app.validateGroupMember(s, user.Email)
if err != nil {
http.Error(w, err.Error(), http.<API key>)
return
}
}
if authorised {
// Store the information in the session
s.user.Values["user"] = user
} else {
s.user.AddFlash(fmt.Sprintf("%s is not authorised", user.Email), "unauth_flash")
}
s.user.Save(r, w)
app.audit(user.Email, "login", "")
// User is logged in. Redirect back to the index page
http.Redirect(w, r, uri, http.StatusFound)
} |
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140309090442) do
create_table "departments", force: true do |t|
t.string "name"
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.string "publishes_as"
end
create_table "resources", force: true do |t|
t.string "url"
t.datetime "created_at"
t.datetime "updated_at"
t.string "file_file_name"
t.string "file_content_type"
t.integer "file_file_size"
t.datetime "file_updated_at"
t.integer "department_id"
t.boolean "exists"
t.boolean "has_sane_filename"
t.boolean "has_extension"
t.string "type"
t.boolean "csv_is_valid"
t.boolean "<API key>"
t.integer "csv_rows"
t.string "csv_encoding"
t.boolean "<API key>"
t.boolean "<API key>"
t.integer "spreadsheet_sheets"
t.boolean "<API key>"
t.boolean "<API key>"
t.boolean "html_is_index_html"
t.boolean "<API key>"
t.boolean "pdf_is_valid"
t.integer "pdf_pages"
t.boolean "pdf_contains_text"
t.boolean "pdf_contains_drm"
t.boolean "zip_is_valid"
t.integer "zip_files"
t.boolean "xml_is_valid"
t.boolean "xml_contains_schema"
t.boolean "<API key>"
t.integer "presentation_slides"
t.boolean "json_is_valid"
t.datetime "last_modified"
t.string "ms_office_version"
t.string "extension"
t.integer "http_status"
t.string "encoding"
end
add_index "resources", ["department_id"], name: "<API key>"
create_table "score_criteria", force: true do |t|
t.string "name"
t.integer "amount"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "scores", force: true do |t|
t.integer "department_id"
t.integer "score"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "scores", ["department_id"], name: "<API key>"
create_table "<API key>", force: true do |t|
t.integer "score_id"
t.integer "score_criteria_id"
end
add_index "<API key>", ["score_id", "score_criteria_id"], name: "<API key>"
end |
using LanguageExt;
namespace SJP.Schematic.Core
{
public class <API key> : DatabaseColumn, <API key>
{
public <API key>(
Identifier columnName,
IDbType type,
bool isNullable,
Option<string> defaultValue,
Option<string> definition
) : base(columnName, type, isNullable, defaultValue, Option<IAutoIncrement>.None)
{
Definition = definition;
}
public Option<string> Definition { get; }
public override bool IsComputed { get; } = true;
}
} |
using System.Collections.Generic;
using Cresce.Datasources.Commands;
using Cresce.Models.Interfaces;
namespace Cresce.Datasources.Sql.Commands
{
internal class CrudCommandsBuilder<TEntity> : <API key><TEntity>
where TEntity : IIdenfiable
{
private readonly IQueryBuilder _queryBuilder;
private readonly ICommandsBuilder<TEntity> _commandsBuilder;
private <API key><TEntity> _identityGenerator;
public CrudCommandsBuilder(IQueryBuilder queryBuilder, ICommandsBuilder<TEntity> commandsBuilder)
{
_queryBuilder = queryBuilder;
_commandsBuilder = commandsBuilder;
}
#region Implementation of <API key><TEntity>
public ICrudCommands<TEntity> Build()
{
_commandsBuilder.<API key>(_identityGenerator);
_commandsBuilder.SetExistsCommand(_queryBuilder.BuildExists());
_commandsBuilder.SetGetByIdCommand(_queryBuilder.BuildGetById(), _queryBuilder.GetIdFields());
_commandsBuilder.SetGetAllCommand(_queryBuilder.BuildGetAll());
_commandsBuilder.SetEntityCount(_queryBuilder.BuildEntityCount());
_commandsBuilder.SetEntityMax(_queryBuilder.BuildEntityMax());
_commandsBuilder.SetInsert(_queryBuilder.BuildInsert());
_commandsBuilder.SetUpdate(_queryBuilder.BuildUpdate());
_commandsBuilder.SetDeleteAllCommand(_queryBuilder.BuildDeleteAll());
return _commandsBuilder.Build();
}
#endregion
#region Implementation of IQueryFieldsBuilder
public void SetIdentifierField(string fieldName) => _queryBuilder.SetIdentifierField(fieldName);
public void SetField(string fieldName) => _queryBuilder.SetField(fieldName);
public IEnumerable<string> GetIdFields() => _queryBuilder.GetIdFields();
#endregion
#region Implementation of <API key><TEntity>
public void <API key>(<API key><TEntity> generator)
{
_identityGenerator = generator;
}
public IQueryBuilder GetQueryBuilder() => _queryBuilder;
#endregion
}
} |
#include "Common/Common.h"
#include "IVolumeControl.h"
#include "IMouseControl.h"
#include "IKeyboardControl.h"
#include "IDisplayControl.h"
#include "IAudioInput.h"
#if defined(WIN32)
#include "../Win32/<API key>.h"
#endif
namespace MinCOM
{
// {<API key>}
template<> const Guid TypeInfo< RemotePC::IVolumeControl >::iid_ =
{ 0x561c6bcb, 0xe60a, 0x4145, { 0xa6, 0x16, 0x88, 0xb7, 0x8c, 0x99, 0x90, 0xf } };
// {<API key>}
template<> const Guid TypeInfo< RemotePC::IMouseControl >::iid_ =
{ 0x4bd3770d, 0xfdd7, 0x4f2d, { 0xbd, 0x72, 0xe9, 0x15, 0x8, 0x22, 0x4b, 0x51 } };
// {<API key>}
template<> const Guid TypeInfo< RemotePC::IKeyboardControl >::iid_ =
{ 0xf584f8e6, 0xc540, 0x4b26, { 0xab, 0xb1, 0x74, 0xe, 0x13, 0xc0, 0x95, 0x20 } };
// {<API key>}
template<> const Guid TypeInfo< RemotePC::IDisplayControl >::iid_ =
{ 0xd65d5b11, 0xb2e7, 0x454a, { 0x9c, 0xe7, 0x69, 0x6a, 0x7e, 0xa7, 0x57, 0xfc } };
// {<API key>}
template<> const Guid TypeInfo< RemotePC::IAudioInput >::iid_ =
{ 0x2E03DB3F, 0x1AC6, 0x4516, { 0x97, 0xB8, 0x11, 0x86, 0x9D, 0x65, 0xCB, 0x62 } };
#if defined(WIN32)
// {<API key>}
template<> const Guid TypeInfo< RemotePC::<API key> >::iid_ =
{ 0xb2165673, 0x46af, 0x4210, { 0xa9, 0xa0, 0xda, 0x35, 0xff, 0x16, 0xd8, 0xcc } };
#endif
} |
<HTML><HEAD>
<TITLE>Review for Haunting, The (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0171363">Haunting, The (1999)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Dennis+Schwartz">Dennis Schwartz</A></H3><HR WIDTH="40%" SIZE="4">
<P>
HAUNTING, THE (director: Jan de Bont; screenwriter: David Self, based on
the novel The Haunting of Hill House by Shirley Jackson;
cinematographer: Caleb Deschanel; editor: Michael Kahn; cast: Lili
Taylor (Nell), Liam Neeson (Dr. David Marrow), Catherine Zeta Jones
(Theo), Owen Wilson (Luke), Alix Koromzay (Mary), Marian Seldes (Mrs.
Dudley), Bruce Dern (Mr. Dudley); Runtime:112; 1999)</P>
<PRE>Reviewed by Dennis Schwartz</PRE>
<P>This one's a bomb. It's a total special effect film, sapping away what
is human about the characters, while unsuccessfully putting the human
characteristics into the haunted house. The house is the star of the
film and the actors are the props. This insipid horror story has little
to recommend it; it wasn't scary, or campy, or well acted, it was just
unimaginative. The few thrills it offers, are all a result of special
effects. This is a date film more than anything else.</P>
<P>The real horror it provided, was zapping Shirley Jackson's very literate
psychological thriller. A far better film version, one that was actually
thrilling, is the one done in 1963 by Robert Wise. The director of this
film, Jan de Bont (Speed/Speed 2/ Twister), is not up to dealing with a
psychological story and directing characters in a persuasive way, he is
more into making silly theme movies that rely solely on special effects.
The man just can't make a literate film.</P>
<P>A research test for volunteer insomniacs is advertised in the paper, as
a psychologist, Dr, Marrow (Liam), is using that as a cover for his
study of group fear. Unhappy with her lot in life, Nell (Taylor), a
repressed and timid spinster who took care of her invalid mother until
she recently died, finds out that her mother didn't even leave her the
apartment. She seems relieved to get away from her unpleasant situation
and do the experiment, and welcomes the chance to be living with other
volunteers, even if they will live in the scary Hill House.</P>
<P>Theo (Zeta) is an extrovert, an attractive NYC artist, an insomniac who
is bi-sexual, favoring lesbian relationships, causing her to have
problems with her boyfriend and wanting to change her scene for awhile.
Luke (Owen) is an insomniac, with a hyper personality and manic energy,
who will comically walk around the schlock house among the griffins and
huge hallways in his pajama bottoms and a baseball glove. Soon they will
all experience strange phenomena, such as Nell's name written on the
wall welcoming her home and telling her to leave or else, a moving
flume, house breathing sounds, animated ghosts of murdered children and
the ghost of the ogre who built the house, and one dramatic shot of the
ogre's wife who committed suicide, as she is seen suspended from the
ceiling by a rope around her neck. This house is haunted Hollywood
style, as the Gothic house, which Theo describes as a cross between
something Charles Foster Kane would build and the Munsters' house,
becomes the central focus of the film and the insomniacs stay away
trying to look afraid of what they are seeing. It's all hokum from
beginning to end, and it is so poorly scripted, that tedium quickly sets
in, leaving the film with no purpose except to be laughed at for how
stupid it all is.</P>
<P>Since this thriller was never thrilling, it just went on to show off the
stage set designs illustriously created by Eugenio Zanetti, all one
could do was go from room to room and stare at the cherubs, the leaping
skeletons, the elaborately built stairway collapsing, an animated hand
of a ghost coming out of the fountain, and at the futile effort to make
a Disney fantasy picture. The film concludes on a bland note, not even
bothering to go after what the Liam character was supposed to be about,
whether he was an egotistical scientist out for his own ends or a good
guy trying to help science with useful knowledge. After the film
exhausts itself with its fake horror show and we see the ghost of Hill
house chasing after Nell, the film gets a few laughs it never intended
to get, as it concludes as a show-off will, when he is so proud of his
wealthy house, that he thinks he has really impressed you, and continues
to show-and-tell long after one has lost interest. The laughs that were
gleaned, are of the kind that do not bode well for the film, they are
the laughs that come from those who know they have just seen a bad film.</P>
<PRE>REVIEWED ON 8/21/2000 GRADE: D</PRE>
<P>Dennis Schwartz: "Ozus' World Movie Reviews"</P>
<PRE><A HREF="http:
<PRE><A HREF="mailto:ozus@sover.net">ozus@sover.net</A></PRE>
<P>© ALL RIGHTS RESERVED DENNIS SCHWARTZ</P>
<HR><P CLASS=flush><SMALL>The review above was posted to the
<A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR>
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.<BR>
Please direct comments/criticisms of the review to relevant newsgroups.<BR>
Broken URLs inthe reviews are the responsibility of the author.<BR>
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
</SMALL></P>
<P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P>
</P></BODY></HTML> |
from microbit import *
while True:
if button_a.is_pressed():
pin1.write_digital(1)
pin2.write_digital(1)
pin0.write_digital(0)
pin8.write_digital(0)
display.show(Image.ARROW_N)
elif button_b.is_pressed():
pin0.write_digital(1)
pin8.write_digital(1)
pin1.write_digital(0)
pin2.write_digital(0)
display.show(Image.ARROW_S)
else:
pin0.write_digital(0)
pin8.write_digital(0)
pin1.write_digital(0)
pin2.write_digital(0)
display.show(Image.NO) |
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Media.Imaging;
namespace CharacterEditor.Models
{
public class Character : NotifyableBase, ICloneable //, IEditableObject
{
public Character()
{
PropertyChanged += <API key>;
AnimationCollection = new <API key><IAnimationBase>();
AnimationCollection.CollectionChanged += <API key>;
}
private string characterPath;
public string CharacterPath
{
get { return characterPath; }
set
{
characterPath = value;
<API key>("CharacterPath");
}
}
private BitmapImage frameSheet;
public BitmapImage FrameSheet
{
get {
return frameSheet;
}
set
{
frameSheet = value;
<API key>("FrameSheet");
}
}
void <API key>(object sender, System.Collections.Specialized.<API key> e)
{
<API key>("AnimationCollection");
}
void <API key>(object sender, <API key> e)
{
<API key>("SelectedAnimation." + e.PropertyName);
}
private IAnimationBase selectedAnimation;
public IAnimationBase SelectedAnimation
{
get { return selectedAnimation; }
set
{
if (selectedAnimation != null)
{
selectedAnimation.PropertyChanged -= <API key>;
}
selectedAnimation = value;
if (selectedAnimation != null)
{
selectedAnimation.PropertyChanged += <API key>;
}
<API key>("SelectedAnimation");
}
}
private <API key><IAnimationBase> animationCollection;
public <API key><IAnimationBase> AnimationCollection
{
get
{
return animationCollection;
}
set
{
if (animationCollection != null)
{
animationCollection.CollectionChanged -= <API key>;
}
animationCollection = value;
if (animationCollection != null)
{
animationCollection.CollectionChanged += <API key>;
}
<API key>("AnimationCollection");
}
}
void <API key>(object sender, <API key> e)
{
if (e.PropertyName != "IsDirty" && e.PropertyName != "IsRedirty")
{
IsDirty = true;
}
}
private string name;
public string Name
{
get { return name; }
set
{
name = value;
Debug.WriteLine("Name Property changed, danger of directory not found exceptions");
<API key>("Name");
}
}
public override string ToString()
{
return base.ToString() + ": Name = " + Name;
}
//private bool hasFrameSheet;
//public bool HasFrameSheet
// get { return hasFrameSheet; }
// set
// hasFrameSheet = value;
// <API key>("HasFrameSheet");
private bool isDirty;
public bool IsDirty
{
get { return isDirty; }
set
{
isDirty = value;
<API key>("IsDirty");
}
}
private bool isRedirty;
public bool IsRedirty
{
get { return isRedirty; }
set
{
isRedirty = value;
<API key>("IsRedirty");
}
}
private int frameHeight = 24;
[Category("Frame")]
[DisplayName("Frame Height")]
[Description("The height of a frame")]
public int FrameHeight
{
get { return frameHeight; }
set
{
frameHeight = value;
<API key>("FrameHeight");
}
}
private int frameWidth = 24 ;
[Category("Frame")]
[DisplayName("Frame Width")]
[Description("The width of a frame")]
public int FrameWidth
{
get { return frameWidth; }
set
{
frameWidth = value;
<API key>("FrameWidth");
}
}
private int leftMargin;
[Category("Margin")]
[DisplayName("Left Margin")]
[Description("The left space between the border and the frames")]
public int LeftMargin
{
get { return leftMargin; }
set
{
leftMargin = value;
<API key>("LeftMargin");
}
}
private int upperMargin;
[Category("Margin")]
[DisplayName("Upper Margin")]
[Description("The upper space between the border and the frames")]
public int UpperMargin
{
get { return upperMargin; }
set
{
upperMargin = value;
<API key>("UpperMargin");
}
}
private int bottomMargin;
[Category("Margin")]
[DisplayName("Bottom Margin")]
[Description("The bottom space between the border and the frames")]
public int BottomMargin
{
get { return bottomMargin; }
set
{
bottomMargin = value;
<API key>("BottomMargin");
}
}
private int rightMargin;
[Category("Margin")]
[DisplayName("Right Margin")]
[Description("The right space between the border and the frames")]
public int RightMargin
{
get { return rightMargin; }
set
{
rightMargin = value;
<API key>("RightMargin");
}
}
//private bool isSaving;
//public bool IsSaving
// get { return isSaving; }
// set
// isSaving = value;
// <API key>("IsSaving");
public object Clone()
{
return this.MemberwiseClone();
}
}
} |
var http = require('http');
var fs = require('fs');
var path = require('path');
var mime = require('mime');
var cache = {};
function send404 (response) {
response.writeHead(404, {'Content-Type': 'text/plain'});
response.write('Error 404: resource not found.');
response.end();
}
function sendFile (response, filePath, fileContents) {
response.writeHead(
200,
{"Content-Type": mime.lookup(path.basename(filePath))}
);
response.end(fileContents);
}
function serveStatic (response, cache, absPath) {
if(cache[absPath]) {
sendFile(response, absPath, cache[absPath]);
} else {
fs.exists(absPath, function (exists) {
if(exists) {
fs.readFile(absPath, function (err, data) {
if(err) {
send404(response);
}else {
cache[absPath] = data;
sendFile(response, absPath, data);
}
});
} else {
send404(response);
}
});
}
}
var server = http.createServer(function (request, response) {
var filePath = false
console.log("Requested Url: " + request.url);
if (request.url == '/') {
filePath = 'public/index.html'
} else {
filePath = 'public' + request.url;
};
var absPath = './' + filePath;
console.log("The path: " + absPath);
serveStatic(response, cache, absPath);
});
server.listen(3000, function () {
console.log('Server listening on port 3000.');
});
var chatServer = require('./lib/chat_server');
chatServer.listen(server); |
export const length1 = "Lorem";
export const length2 = "Lorem ipsum";
export const length3 = "Lorem ipsum dolor";
export const length4 = "Lorem ipsum dolor sit amet";
export const length5 = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"; |
namespace Atlas.Models
{
public class Language
{
public int Id { get; set; }
public string Name { get; set; }
}
} |
/**
* Canned policy tests
*/
var _ = require('lodash');
var chai = require('chai');
var expect = chai.expect;
var CannedPolicy = require('../../lib/CannedPolicy');
describe('CannedPolicy', function() {
it('should convert `expireTime` to seconds', function(done) {
var expireTimeMs = new Date().getTime();
var expireTimeSecs = Math.round(expireTimeMs / 1000);
var policy = new CannedPolicy('http://t.com', expireTimeMs);
expect(policy.expireTime).to.equal(expireTimeSecs);
done();
});
describe('#toJSON()', function() {
it('should fail if `url` is missing', function(done) {
var expireTimeMs = new Date().getTime();
var policy = new CannedPolicy(undefined, expireTimeMs);
var func = _.bind(policy.toJSON, policy);
expect(func).to.throw(Error, /missing param: url/i);
done();
});
it('should fail if `expireTime` is missing', function(done) {
var policy = new CannedPolicy('test');
var func = _.bind(policy.toJSON, policy);
expect(func).to.throw(Error, /missing param: expireTime/i);
done();
});
it('should fail if `expireTime` is after the end of time', function(done) {
var policy = new CannedPolicy('test', 3000000000000);
var func = _.bind(policy.toJSON, policy);
expect(func).to.throw(Error, /expireTime must be less than.*/i);
done();
});
it('should fail if `expireTime` is before now', function(done) {
var beforeNow = new Date().getTime() - 10000;
var policy = new CannedPolicy('test', beforeNow);
var func = _.bind(policy.toJSON, policy);
expect(func).to.throw(Error, /.*must be after the current time$/i);
done();
});
it('should support IP restrictions', function(done) {
var expireTimeMs = new Date().getTime() + 10000;
var policy = new CannedPolicy('http://t.com', expireTimeMs, "1.2.3.0/24");
var result = policy.toJSON();
var parsedResult;
expect(result).to.be.a('string');
// Parse the stringified result so we can examine it's properties.
parsedResult = JSON.parse(result);
expect(parsedResult).to.have.deep.property(
'Statement[0].Condition.IpAddress.AWS:SourceIp', "1.2.3.0/24");
done();
});
it('should exclude IP restrictions if none were given', function(done) {
var policy = new CannedPolicy('http://t.com', Date.now() + 1000);
var result = policy.toJSON();
var parsedResult;
// Parse the stringified result so we can examine it's properties.
parsedResult = JSON.parse(result);
expect(parsedResult).to.not.have.deep.property(
'Statement[0].Condition.IpAddress.AWS:SourceIp');
done();
});
it('should return the canned policy as stringified JSON', function(done) {
var expireTimeMs = new Date().getTime() + 10000;
var expireTimeSecs = Math.round(expireTimeMs / 1000);
var policy = new CannedPolicy('http://t.com', expireTimeMs);
var result = policy.toJSON();
var parsedResult;
expect(result).to.be.a('string');
// Parse the stringified result so we can examine it's properties.
parsedResult = JSON.parse(result);
expect(parsedResult).to.have.deep.property(
'Statement[0].Resource', 'http://t.com');
expect(parsedResult).to.have.deep.property(
'Statement[0].Condition.DateLessThan.AWS:EpochTime', expireTimeSecs);
done();
});
});
}); |
#import <UIKit/UIView.h>
// Not exported
@interface <API key> : UIView
{
_Bool <API key>;
}
+ (id)<API key>:(id)arg1;
+ (id)wrapperViewForView:(id)arg1 wrapperFrame:(struct CGRect)arg2 viewFrame:(struct CGRect)arg3;
+ (id)wrapperViewForView:(id)arg1 frame:(struct CGRect)arg2;
@property(nonatomic) _Bool <API key>; // @synthesize <API key>=<API key>;
- (void)unwrapView:(id)arg1;
- (void)unwrapView;
- (void)setBounds:(struct CGRect)arg1;
- (void)setFrame:(struct CGRect)arg1;
@end |
'use strict';
var express = require('express'),
posts = require('./mock/posts.json');
var app = express();
app.get('/', function(req, res){
res.send("<h1>Hello!</h1>");
});
app.get('/blog/:title?', function(req, res){
var title = req.params.title;
if (title == undefined) {
res.status(503);
res.send("This page is under construction!")
} else {
var post = posts[title];
res.send(post);
}
});
app.listen(3000, function(){
console.log("The frontend server is running on port 3000!")
}); |
const express = require('express');
const path = require('path');
const port = process.env.PORT || 8080;
const app = express();
app.use(express.static(__dirname));
app.get('*', (req, res) => {
res.sendFile(path.resolve(__dirname, 'index.html'));
});
app.listen(port);
console.log('Server has started.'); |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About <API key></source>
<translation>O <API key></translation>
</message>
<message>
<location line="+39"/>
<source><b><API key></b> version</source>
<translation>Wersja <b><API key></b></translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http:
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http:
<translation>
Oprogramowanie eksperymentalne.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http:
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http:
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Prawo autorskie</translation>
</message>
<message>
<location line="+0"/>
<source>The <API key> developers</source>
<translation>Deweloperzy <API key></translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Książka Adresowa</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Kliknij dwukrotnie, aby edytować adres lub etykietę</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Utwórz nowy adres</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Skopiuj aktualnie wybrany adres do schowka</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Nowy Adres</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your <API key> addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Tutaj znajdują się twoje adresy <API key> do odbioru płatności. Możesz nadać oddzielne adresy dla każdego z wysyłających monety, żeby śledzić oddzielnie ich opłaty.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>&Kopiuj adres</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Pokaż Kod &QR</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a <API key> address</source>
<translation>Podpisz wiadomość aby dowieść, że ten adres jest twój</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Podpisz wiado&mość</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Usuń zaznaczony adres z listy</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Eksportuj dane z aktywnej karty do pliku</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>&Eksportuj</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified <API key> address</source>
<translation>Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem <API key>.</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Zweryfikuj wiadomość</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Usuń</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your <API key> addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Tutaj znajdują się Twoje adresy <API key> do wysyłania płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>Kopiuj &Etykietę</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Edytuj</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Wyślij monety</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Eksportuj książkę adresową</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Plik *.CSV (rozdzielany przecinkami)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Błąd podczas eksportowania</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Błąd zapisu do pliku %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etykieta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(bez etykiety)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Okienko Hasła</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Wpisz hasło</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nowe hasło</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Powtórz nowe hasło</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Wprowadź nowe hasło dla portfela.<br/>Proszę użyć hasła składającego się z <b>10 lub więcej losowych znaków</b> lub <b>ośmiu lub więcej słów</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Zaszyfruj portfel</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Ta operacja wymaga hasła do portfela ażeby odblokować portfel.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Odblokuj portfel</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Odszyfruj portfel</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Zmień hasło</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Podaj stare i nowe hasło do portfela.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Potwierdź szyfrowanie portfela</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR <API key></b>!</source>
<translation>Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło to <b>STRACISZ WSZYSTKIE SWOJE <API key>'Y</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Jesteś pewien, że chcesz zaszyfrować swój portfel?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>WAŻNE: Wszystkie wykonane wcześniej kopie pliku portfela powinny być zamienione na nowe, szyfrowane pliki. Z powodów bezpieczeństwa, poprzednie kopie nieszyfrowanych plików portfela staną się bezużyteczne jak tylko zaczniesz korzystać z nowego, szyfrowanego portfela.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Uwaga: Klawisz Caps Lock jest włączony</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Portfel zaszyfrowany</translation>
</message>
<message>
<location line="-56"/>
<source><API key> will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your <API key> from being stolen by malware infecting your computer.</source>
<translation>Program <API key> zamknie się aby dokończyć proces szyfrowania. Pamiętaj, że szyfrowanie portfela nie zabezpiecza w pełni Twoich cryptographicanomalyów przed kradzieżą przez wirusy lub trojany mogące zainfekować Twój komputer.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Szyfrowanie portfela nie powiodło się</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Szyfrowanie portfela nie powiodło się z powodu wewnętrznego błędu. Twój portfel nie został zaszyfrowany.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Podane hasła nie są takie same.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Odblokowanie portfela nie powiodło się</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Wprowadzone hasło do odszyfrowania portfela jest niepoprawne.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Odszyfrowywanie portfela nie powiodło się</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Hasło portfela zostało pomyślnie zmienione.</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Podpisz wiado&mość...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Synchronizacja z siecią...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>P&odsumowanie</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Pokazuje ogólny zarys portfela</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transakcje</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Przeglądaj historię transakcji</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Edytuj listę zapisanych adresów i i etykiet</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Pokaż listę adresów do otrzymywania płatności</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Zakończ</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Zamknij program</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about <API key></source>
<translation>Pokaż informację o <API key></translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>O &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Pokazuje informacje o Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opcje...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>Zaszyfruj Portf&el</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Wykonaj kopię zapasową...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Zmień hasło...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Importowanie bloków z dysku...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Ponowne indeksowanie bloków na dysku...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a <API key> address</source>
<translation>Wyślij monety na adres <API key></translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for <API key></source>
<translation>Zmienia opcje konfiguracji <API key></translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Zapasowy portfel w innej lokalizacji</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Zmień hasło użyte do szyfrowania portfela</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>&Okno debudowania</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Otwórz konsolę debugowania i diagnostyki</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>&Zweryfikuj wiadomość...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source><API key></source>
<translation><API key></translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Portfel</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>Wyślij</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>Odbie&rz</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Adresy</translation>
</message>
<message>
<location line="+22"/>
<source>&About <API key></source>
<translation>O <API key></translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Pokaż / Ukryj</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Pokazuje lub ukrywa główne okno</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Szyfruj klucze prywatne, które są powiązane z twoim portfelem</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your <API key> addresses to prove you own them</source>
<translation>Podpisz wiadomości swoim adresem aby udowodnić jego posiadanie</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified <API key> addresses</source>
<translation>Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem <API key>.</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Plik</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>P&referencje</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>Pomo&c</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Pasek zakładek</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source><API key> client</source>
<translation><API key> klient</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to <API key> network</source>
<translation><numerusform>%n aktywne połączenie do sieci <API key></numerusform><numerusform>%n aktywne połączenia do sieci <API key></numerusform><numerusform>%n aktywnych połączeń do sieci <API key></numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>Przetworzono (w przybliżeniu) %1 z %2 bloków historii transakcji.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>Pobrano %1 bloków z historią transakcji.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n godzina</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n tydzień</numerusform><numerusform>%n tygodni</numerusform><numerusform>%n tygodni</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>Ostatni otrzymany blok został wygenerowany %1 temu.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Błąd</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Ostrzeżenie</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Informacja</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation>Transakcja przekracza limit. Możesz wysłać ją płacąc prowizję %1, która zostaje przekazana do węzłów, które ją prześlą i pomoże wspierać sieć <API key>. Czy chcesz zapłacić prowizję?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Aktualny</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Łapanie bloków...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Potwierdź prowizję transakcyjną</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Transakcja wysłana</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Transakcja przychodząca</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Data: %1
Kwota: %2
Typ: %3
Adres: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>Obsługa URI</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid <API key> address or malformed URI parameters.</source>
<translation>URI nie może zostać przetworzony! Prawdopodobnie błędny adres <API key> bądź nieprawidłowe parametry URI.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Portfel jest <b>zaszyfrowany</b> i obecnie <b>niezablokowany</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Portfel jest <b>zaszyfrowany</b> i obecnie <b>zablokowany</b></translation>
</message>
<message>
<location filename="../<API key>.cpp" line="+111"/>
<source>A fatal error occurred. <API key> can no longer continue safely and will quit.</source>
<translation>Błąd krytyczny. <API key> nie może kontynuować bezpiecznie więc zostanie zamknięty.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Sieć Alert</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Edytuj adres</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etykieta</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Etykieta skojarzona z tym wpisem w książce adresowej</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adres</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Ten adres jest skojarzony z wpisem w książce adresowej. Może być zmodyfikowany jedynie dla adresów wysyłających.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Nowy adres odbiorczy</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Nowy adres wysyłania</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Edytuj adres odbioru</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Edytuj adres wysyłania</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Wprowadzony adres "%1" już istnieje w książce adresowej.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid <API key> address.</source>
<translation>Wprowadzony adres "%1" nie jest poprawnym adresem <API key>.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Nie można było odblokować portfela.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Tworzenie nowego klucza nie powiodło się.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source><API key></source>
<translation><API key></translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>wersja</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Użycie:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>opcje konsoli</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>UI opcje</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Ustaw Język, na przykład "pl_PL" (domyślnie: systemowy)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Uruchom zminimalizowany</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Pokazuj okno powitalne przy starcie (domyślnie: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opcje</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>Główne</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Płać prowizję za transakcje</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start <API key> after logging in to the system.</source>
<translation>Automatycznie uruchamia <API key> po zalogowaniu do systemu.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start <API key> on system login</source>
<translation>Uruchamiaj <API key> wraz z zalogowaniem do &systemu</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>Przywróć domyślne wszystkie ustawienia klienta.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>Z&resetuj Ustawienia</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Sieć</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the <API key> client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Automatycznie otwiera port klienta <API key> na routerze. Ta opcja dzieła tylko jeśli twój router wspiera UPnP i jest ono włączone.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Mapuj port używając &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the <API key> network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Podłącz się do sieci <API key> przez proxy SOCKS (np. gdy łączysz się poprzez Tor'a)</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>&Połącz się przez proxy SOCKS</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Proxy &IP: </translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Adres IP serwera proxy (np. 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Port proxy (np. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>Wersja &SOCKS</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>SOCKS wersja serwera proxy (np. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Okno</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Pokazuj tylko ikonę przy zegarku po zminimalizowaniu okna.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimalizuj do paska przy zegarku zamiast do paska zadań</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimalizuje zamiast zakończyć działanie programu przy zamykaniu okna. Kiedy ta opcja jest włączona, program zakończy działanie po wybieraniu Zamknij w menu.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimalizuj przy zamknięciu</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Wyświetlanie</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>Język &Użytkownika:</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting <API key>.</source>
<translation>Można tu ustawić język interfejsu uzytkownika. Żeby ustawienie przyniosło skutek trzeba uruchomić ponownie <API key>.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Jednostka pokazywana przy kwocie:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Wybierz podział jednostki pokazywany w interfejsie oraz podczas wysyłania monet</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show <API key> addresses in the transaction list or not.</source>
<translation>Pokazuj adresy <API key> na liście transakcji.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>&Wyświetlaj adresy w liście transakcji</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Anuluj</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>Z&astosuj</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>domyślny</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Potwierdź reset ustawień</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Niektóre ustawienia mogą wymagać ponownego uruchomienia klienta, żeby zacząć działać.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>Czy chcesz kontynuować?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Ostrzeżenie</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting <API key>.</source>
<translation>To ustawienie zostanie zastosowane po restarcie <API key></translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Adres podanego proxy jest nieprawidłowy</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formularz</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the <API key> network after a connection is established, but this process has not completed yet.</source>
<translation>Wyświetlana informacja może być nieaktualna. Twój portfel synchronizuje się automatycznie z siecią <API key>, zaraz po tym jak uzyskano połączenie, ale proces ten nie został jeszcze ukończony.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Niepotwierdzony:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Portfel</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>Niedojrzały: </translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Balans wydobycia, który jeszcze nie dojrzał</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Ostatnie transakcje</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Twoje obecne saldo</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Suma transakcji, które nie zostały jeszcze potwierdzone, i które nie zostały wliczone do twojego obecnego salda</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>desynchronizacja</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start <API key>: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>Okno Dialogowe Kodu QR</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Prośba o płatność</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Kwota:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Etykieta:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Wiadomość:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>Zapi&sz jako...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Błąd kodowania URI w Kodzie QR.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>Podana ilość jest nieprawidłowa, proszę sprawdzić</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>Wynikowy URI jest zbyt długi, spróbuj zmniejszyć tekst etykiety / wiadomości</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>Zapisz Kod QR</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>Obraz PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Nazwa klienta</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>NIEDOSTĘPNE</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Wersja klienta</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Informacje</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Używana wersja OpenSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Czas uruchomienia</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Sieć</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Liczba połączeń</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>W sieci testowej</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Ciąg bloków</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktualna liczba bloków</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Szacowana ilość bloków</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Czas ostatniego bloku</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Otwórz</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Opcje konsoli</translation>
</message>
<message>
<location line="+7"/>
<source>Show the <API key> help message to get a list with possible <API key> command-line options.</source>
<translation>Pokaż pomoc <API key>, aby zobaczyć listę wszystkich opcji linii poleceń</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Pokaż</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsola</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Data kompilacji</translation>
</message>
<message>
<location line="-104"/>
<source><API key> - Debug window</source>
<translation><API key> - Okno debudowania</translation>
</message>
<message>
<location line="+25"/>
<source><API key> Core</source>
<translation>Rdzeń <API key></translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the <API key> debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Wyczyść konsolę</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the <API key> RPC console.</source>
<translation>Witam w konsoli <API key> RPC</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Użyj strzałek do przewijania historii i <b>Ctrl-L</b> aby wyczyścić ekran</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Wpisz <b>help</b> aby uzyskać listę dostępnych komend</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Wyślij płatność</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Wyślij do wielu odbiorców na raz</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Dodaj Odbio&rce</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Wyczyść wszystkie pola transakcji</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Wyczyść &wszystko</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 CGA</source>
<translation>123.456 CGA</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Potwierdź akcję wysyłania</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>Wy&syłka</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> do %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Potwierdź wysyłanie monet</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Czy na pewno chcesz wysłać %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation> i </translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Kwota do zapłacenia musi być większa od 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Kwota przekracza twoje saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Suma przekracza twoje saldo, gdy doliczymy %1 prowizji transakcyjnej.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Błąd: Tworzenie transakcji zakończone niepowodzeniem!</translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Błąd: transakcja została odrzucona. Może się to zdarzyć, gdy monety z Twojego portfela zostały już wydane, na przykład gdy używałeś kopii wallet.dat i <API key> które tam wydałeś nie zostały jeszcze odjęte z portfela z którego teraz korzystasz.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Formularz</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>Su&ma:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Zapłać dla:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. <API key>)</source>
<translation>Adres, na który wysłasz płatności (np. <API key>)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Wprowadź etykietę dla tego adresu by dodać go do książki adresowej</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etykieta:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Wybierz adres z książki adresowej</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Wklej adres ze schowka</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Usuń tego odbiorce</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a <API key> address (e.g. <API key>)</source>
<translation>Wprowadź adres <API key> (np. <API key>)</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Podpisy - Podpisz / zweryfikuj wiadomość</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>Podpi&sz Wiadomość</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. <API key>)</source>
<translation>Wprowadź adres <API key> (np. <API key>)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Wybierz adres z książki kontaktowej</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Wklej adres ze schowka</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Wprowadź wiadomość, którą chcesz podpisać, tutaj</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Podpis</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Kopiuje aktualny podpis do schowka systemowego</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this <API key> address</source>
<translation>Podpisz wiadomość aby dowieść, że ten adres jest twój</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Podpisz Wiado&mość</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Zresetuj wszystkie pola podpisanej wiadomości</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Wyczyść &wszystko</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>&Zweryfikuj wiadomość</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. <API key>)</source>
<translation>Wprowadź adres <API key> (np. <API key>)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified <API key> address</source>
<translation>Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem <API key>.</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>Zweryfikuj Wiado&mość</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Resetuje wszystkie pola weryfikacji wiadomości</translation>
</message>
<message>
<location filename="../<API key>.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a <API key> address (e.g. <API key>)</source>
<translation>Wprowadź adres <API key> (np. <API key>)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Kliknij "Podpisz Wiadomość" żeby uzyskać podpis</translation>
</message>
<message>
<location line="+3"/>
<source>Enter <API key> signature</source>
<translation>Wprowadź podpis <API key></translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Podany adres jest nieprawidłowy.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Proszę sprawdzić adres i spróbować ponownie.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Wprowadzony adres nie odnosi się do klucza.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Odblokowanie portfela zostało anulowane.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Klucz prywatny dla podanego adresu nie jest dostępny</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Podpisanie wiadomości nie powiodło się</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Wiadomość podpisana.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Podpis nie może zostać zdekodowany.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Sprawdź podpis i spróbuj ponownie.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Weryfikacja wiadomości nie powiodła się.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Wiadomość zweryfikowana.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The <API key> developers</source>
<translation>Deweloperzy <API key></translation>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Otwórz do %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/offline</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/niezatwierdzone</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 potwierdzeń</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, emitowany przez %n węzeł</numerusform><numerusform>, emitowany przez %n węzły</numerusform><numerusform>, emitowany przez %n węzłów</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Źródło</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Wygenerowano</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Od</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Do</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>własny adres</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etykieta</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Przypisy</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>niezaakceptowane</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Debet</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Prowizja transakcji</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Kwota netto</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Wiadomość</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Komentarz</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>ID transakcji</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Wygenerowane monety muszą zaczekać 120 bloków zanim będzie można je wydać. Kiedy wygenerowałeś ten blok, został on wyemitowany do sieci, aby dodać go do łańcucha bloków. Jeśli to się nie powiedzie nie zostanie on zaakceptowany i wygenerowanych monet nie będzie można wysyłać. Może się to czasami zdarzyć jeśli inny węzeł wygeneruje blok tuż przed tobą.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Informacje debugowania</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transakcja</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>Wejścia</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>prawda</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>fałsz</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, nie został jeszcze pomyślnie wyemitowany</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Otwórz dla %n bloku</numerusform><numerusform>Otwórz dla %n następnych bloków</numerusform><numerusform>Otwórz dla %n następnych bloków</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>nieznany</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Transaction details</source>
<translation>Szczegóły transakcji</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ten panel pokazuje szczegółowy opis transakcji</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+225"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform>Otwórz dla %n następnych bloków</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Otwórz do %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline (%1 potwierdzeń)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Niezatwierdzony (%1 z %2 potwierdzeń)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Zatwierdzony (%1 potwierdzeń)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>Balans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostał %n blok</numerusform><numerusform>Balans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostało %n bloków</numerusform><numerusform>Balans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostało %n bloków</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Ten blok nie został odebrany przez jakikolwiek inny węzeł i prawdopodobnie nie zostanie zaakceptowany!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Wygenerowano ale nie zaakceptowano</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Otrzymane przez</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Odebrano od</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Wysłano do</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Płatność do siebie</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Wydobyto</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(brak)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Data i czas odebrania transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Rodzaj transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Adres docelowy transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Kwota usunięta z lub dodana do konta.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Wszystko</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Dzisiaj</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>W tym tygodniu</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>W tym miesiącu</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>W zeszłym miesiącu</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>W tym roku</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Zakres...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Otrzymane przez</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Wysłano do</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Do siebie</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Wydobyto</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Inne</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Wprowadź adres albo etykietę żeby wyszukać</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Min suma</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Kopiuj adres</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiuj etykietę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiuj kwotę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Skopiuj ID transakcji</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Edytuj etykietę</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Pokaż szczegóły transakcji</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Eksportuj Dane Transakcyjne</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>CSV (rozdzielany przecinkami)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Potwierdzony</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etykieta</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Błąd podczas eksportowania</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Błąd zapisu do pliku %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Zakres:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>do</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Wyślij płatność</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>&Eksportuj</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Eksportuj dane z aktywnej karty do pliku</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Kopia Zapasowa Portfela</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Dane Portfela (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Nie udało się wykonać kopii zapasowej</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Wystąpił błąd przy zapisywaniu portfela do nowej lokalizacji.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Wykonano Kopię Zapasową</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Dane portfela zostały poprawnie zapisane w nowym miejscu.</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+94"/>
<source><API key> version</source>
<translation>Wersja <API key></translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Użycie:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or <API key></source>
<translation>Wyślij polecenie do -server lub <API key></translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Lista poleceń</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Uzyskaj pomoc do polecenia</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Opcje:</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: <API key>.conf)</source>
<translation>Wskaż plik konfiguracyjny (domyślnie: <API key>.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: <API key>.pid)</source>
<translation>Wskaż plik pid (domyślnie: <API key>.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Wskaż folder danych</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Ustaw rozmiar w megabajtach cache-u bazy danych (domyślnie: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 13931 or testnet: 113931)</source>
<translation>Nasłuchuj połączeń na <port> (domyślnie: 13931 lub testnet: 113931)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Utrzymuj maksymalnie <n> połączeń z peerami (domyślnie: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Podłącz się do węzła aby otrzymać adresy peerów i rozłącz</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Podaj swój publiczny adres</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Próg po którym nastąpi rozłączenie nietrzymających się zasad peerów (domyślnie: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 13932 or testnet: 13936)</source>
<translation>Nasłuchuj połączeń JSON-RPC na <port> (domyślnie: 13932 or testnet: 13936)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Akceptuj linię poleceń oraz polecenia JSON-RPC</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Uruchom w tle jako daemon i przyjmuj polecenia</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Użyj sieci testowej</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=<API key>
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "<API key> Alert" admin@foo.com
</source>
<translation>%s, musisz ustawić rpcpassword w pliku konfiguracyjnym:⏎
%s⏎
Zalecane jest użycie losowego hasła:⏎
rpcuser=<API key>⏎
rpcpassword=%s⏎
(nie musisz pamiętać tego hasła)⏎
Użytkownik i hasło nie mogą być takie same.⏎
Jeśli plik nie istnieje, utwórz go z uprawnieniami tylko-do-odczytu dla właściciela.⏎
Zalecane jest ustawienie alertnotify aby poinformować o problemach:⏎
na przykład: alertnotify=echo %%s | mail -s "Alarm <API key>" admin@foo.com⏎</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu dla IPv6, korzystam z IPv4: %s</translation>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Skojarz z podanym adresem. Użyj formatu [host]:port dla IPv6 </translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. <API key> is probably already running.</source>
<translation>Nie można zablokować folderu danych %s. <API key> prawdopodobnie już działa.</translation>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Uruchom polecenie przy otrzymaniu odpowiedniego powiadomienia (%s w poleceniu jest podstawiane za komunikat)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: 27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Uwaga: Wyświetlone transakcje mogą nie być poprawne! Możliwe, że potrzebujesz aktualizacji bądź inne węzły jej potrzebują</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong <API key> will not work properly.</source>
<translation>Uwaga: Sprawdź czy data i czas na Twoim komputerze są prawidłowe! Jeśli nie to <API key> nie będzie działał prawidłowo.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Ostrzeżenie: błąd odczytu wallet.dat! Wszystkie klucze zostały odczytane, ale może brakować pewnych danych transakcji lub wpisów w książce adresowej lub mogą one być nieprawidłowe.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Ostrzeżenie: Odtworzono dane z uszkodzonego pliku wallet.dat! Oryginalny wallet.dat został zapisany jako wallet.{timestamp}.bak w %s; jeśli twoje saldo lub transakcje są niepoprawne powinieneś odtworzyć kopię zapasową.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Opcje tworzenia bloku:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Łącz tylko do wskazanego węzła</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Wykryto uszkodzoną bazę bloków</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>Czy chcesz teraz przebudować bazę bloków?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Błąd inicjowania bloku bazy danych</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Błąd inicjowania środowiska bazy portfela %s!</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Błąd ładowania bazy bloków</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Błąd ładowania bazy bloków</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Błąd: Mało miejsca na dysku!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Błąd: Zablokowany portfel, nie można utworzyć transakcji!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Błąd: błąd systemu:</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>Nie udało się odczytać informacji bloku</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>Nie udało się odczytać bloku.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>Nie udało się zsynchronizować indeksu bloków.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>Nie udało się zapisać indeksu bloków.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>Nie udało się zapisać informacji bloku</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>Nie udało się zapisać bloku</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>Nie udało się zapisać do bazy monet</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>Nie udało się zapisać indeksu transakcji</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>Nie udało się zapisać danych odtwarzających</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Wyszukaj połączenia wykorzystując zapytanie DNS (domyślnie 1 jeśli nie użyto -connect)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Generuj monety (domyślnie: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Ile bloków sprawdzić przy starcie (domyślnie: 288, 0 = wszystkie)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Jak dokładna jest weryfikacja bloku (0-4, domyślnie: 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Odbuduj indeks łańcucha bloków z obecnych plików blk000??.dat</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>Ustaw liczbę wątków do odwołań RPC (domyślnie: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Weryfikacja bloków...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Weryfikacja portfela...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Importuj bloki z zewnętrznego pliku blk000??.dat</translation>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation>Ustaw liczbę wątków skryptu weryfikacji (do 16, 0 = auto, <0 = zostawia taką ilość rdzenie wolnych, domyślnie: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Informacja</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Nieprawidłowy adres -tor: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Utrzymuj pełen indeks transakcji (domyślnie: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Maksymalny bufor odbioru na połączenie, <n>*1000 bajtów (domyślnie: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maksymalny bufor wysyłu na połączenie, <n>*1000 bajtów (domyślnie: 1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Akceptuj tylko łańcuch bloków zgodny z wbudowanymi punktami kontrolnymi (domyślnie: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Łącz z węzłami tylko w sieci <net> (IPv4, IPv6 lub Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>Poprzedź informacje debugowania znacznikiem czasowym</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the <API key> Wiki for SSL setup instructions)</source>
<translation>Opcje SSL: (odwiedź <API key> Wiki w celu uzyskania instrukcji)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Wybierz używaną wersje socks serwera proxy (4-5, domyślnie:5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Wyślij informację/raport do debuggera.</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Ustaw maksymalny rozmiar bloku w bajtach (domyślnie: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Zmniejsz plik debug.log przy starcie programu (domyślnie: 1 jeśli nie użyto -debug)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Błąd systemu:</translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Nazwa użytkownika dla połączeń JSON-RPC</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Ostrzeżenie</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>Musisz przebudować bazę używając parametru -reindex aby zmienić -txindex</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat uszkodzony, odtworzenie się nie powiodło</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Hasło do połączeń JSON-RPC</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Przyjmuj połączenia JSON-RPC ze wskazanego adresu IP</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Wysyłaj polecenia do węzła działającego na <ip> (domyślnie: 127.0.0.1)</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Zaktualizuj portfel do najnowszego formatu.</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Ustaw rozmiar puli kluczy na <n> (domyślnie: 100)</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Użyj OpenSSL (https) do połączeń JSON-RPC</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Plik certyfikatu serwera (domyślnie: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Klucz prywatny serwera (domyślnie: server.pem)</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Aceptowalne szyfry (domyślnie: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Ta wiadomość pomocy</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Nie można przywiązać %s na tym komputerze (bind returned error %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Łączy przez proxy socks</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Zezwól -addnode, -seednode i -connect na łączenie się z serwerem DNS</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Wczytywanie adresów...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Błąd ładowania wallet.dat: Uszkodzony portfel</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of <API key></source>
<translation>Błąd ładowania wallet.dat: Portfel wymaga nowszej wersji <API key></translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart <API key> to complete</source>
<translation>Portfel wymaga przepisania: zrestartuj <API key> żeby ukończyć</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Błąd ładowania wallet.dat</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Nieprawidłowy adres -proxy: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Nieznana sieć w -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Nieznana wersja proxy w -socks: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Nie można uzyskać adresu -bind: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Nie można uzyskać adresu -externalip: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Nieprawidłowa kwota dla -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Nieprawidłowa kwota</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Niewystarczające środki</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Ładowanie indeksu bloku...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Dodaj węzeł do łączenia się and attempt to keep the connection open</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. <API key> is probably already running.</source>
<translation>Nie można przywiązać %s na tym komputerze. <API key> prawdopodobnie już działa.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>
</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Wczytywanie portfela...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>Nie można dezaktualizować portfela</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>Nie można zapisać domyślnego adresu</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Ponowne skanowanie...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Wczytywanie zakończone</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Aby użyć opcji %s</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Błąd</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Musisz ustawić rpcpassword=<hasło> w pliku configuracyjnym:
%s
Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu.</translation>
</message>
</context>
</TS> |
package com.techjar.ledcm.hardware;
import com.techjar.ledcm.hardware.manager.LEDManager;
import com.techjar.ledcm.LEDCubeManager;
import com.techjar.ledcm.util.math.Dimension3D;
import com.techjar.ledcm.util.math.<API key>;
import com.techjar.ledcm.util.math.Vector3;
import org.lwjgl.util.Color;
/**
* Immutable LED array for atomic LED color access.
*
* @author Techjar
*/
public class LEDArray {
private final Object lock = new Object();
private final LEDManager manager;
private final byte[] red;
private final byte[] green;
private final byte[] blue;
private final LEDArray transformed;
/**
* Requires internal arrays to be passed for fast construction.
*/
public LEDArray(LEDManager manager, byte[] redArray, byte[] greenArray, byte[] blueArray) {
this(manager, redArray, greenArray, blueArray, true, false);
}
private LEDArray(LEDManager manager, byte[] redArray, byte[] greenArray, byte[] blueArray, boolean external, boolean isTransformed) {
this.manager = manager;
if (external) {
red = new byte[redArray.length];
green = new byte[greenArray.length];
blue = new byte[blueArray.length];
System.arraycopy(redArray, 0, red, 0, redArray.length);
System.arraycopy(greenArray, 0, green, 0, greenArray.length);
System.arraycopy(blueArray, 0, blue, 0, blueArray.length);
} else {
red = redArray;
green = greenArray;
blue = blueArray;
}
if (!isTransformed && LEDCubeManager.getLEDCube() != null) {
byte[] redT = new byte[redArray.length];
byte[] greenT = new byte[greenArray.length];
byte[] blueT = new byte[blueArray.length];
Dimension3D dim = manager.getDimensions();
<API key> vec = <API key>.get();
<API key> newVec = <API key>.get();
for (int x = 0; x < dim.x; x++) {
for (int y = 0; y < dim.y; y++) {
for (int z = 0; z < dim.z; z++) {
vec.set(x, y, z);
LEDCubeManager.getLEDCube().applyTransform(newVec.set(x, y, z));
if (newVec.getX() >= 0 && newVec.getX() < dim.x && newVec.getY() >= 0 && newVec.getY() < dim.y && newVec.getZ() >= 0 && newVec.getZ() < dim.z) {
int index = manager.encodeVector(vec);
int newIndex = manager.encodeVector(newVec);
redT[newIndex] = red[index];
greenT[newIndex] = green[index];
blueT[newIndex] = blue[index];
}
}
}
}
vec.release();
newVec.release();
transformed = new LEDArray(manager, redT, greenT, blueT, false, true);
} else {
transformed = this;
}
}
public Color getLEDColor(int x, int y, int z) {
int index = manager.encodeVector(x, y, z);
return new Color(red[index], green[index], blue[index]);
}
public Color getLEDColorReal(int x, int y, int z) {
int index = manager.encodeVector(x, y, z);
Color color = new Color(red[index], green[index], blue[index]);
if (manager.getResolution() < 255) {
return new Color(Math.round(color.getRed() / manager.getFactor()), Math.round(color.getGreen() / manager.getFactor()), Math.round(color.getBlue() / manager.getFactor()));
} else return color;
}
public LEDArray getTransformed() {
return transformed;
}
public byte[] getRed() {
byte[] copy = new byte[red.length];
System.arraycopy(red, 0, copy, 0, red.length);
return copy;
}
public byte[] getGreen() {
byte[] copy = new byte[green.length];
System.arraycopy(green, 0, copy, 0, green.length);
return copy;
}
public byte[] getBlue() {
byte[] copy = new byte[blue.length];
System.arraycopy(blue, 0, copy, 0, blue.length);
return copy;
}
} |
#ifndef SIG_UTIL_FOLD_HPP
#define SIG_UTIL_FOLD_HPP
#include "../helper/helper_modules.hpp"
#include "../helper/container_helper.hpp"
\file fold.hpp
namespace sig
{
/**
(a -> b -> a) -> a0 -> [b] -> a \n
a0a
\param func (a -> b -> a)
\param init a0
\param list [b]\ref sig_container
\return a
\sa foldr(F const& func, T init, C const& list)
\code
const std::set<double> data1{ -2.2, 0 , 1.1, 3.3 };
const array<int, 4> data2{ 1, -3, 5, 4 }; // sig::array
double r1 = foldl(std::plus<double>(), 0, data1);
double r2 = foldl([](double sum, int v){ return sum + v % 2; }, 0, data2);
r1; // 2.2
r2; // 1
\endcode
*/
template <class F, class T, class C>
auto foldl(F&& func, T&& init, C&& list)
{
using CR = typename impl::<API key><C>::type;
using R = decltype(std::forward<F>(func)(std::forward<T>(init), std::declval<typename impl::container_traits<CR>::value_type>()));
return std::accumulate(impl::begin(std::forward<C>(list)), impl::end(std::forward<C>(list)), static_cast<R>(init), std::forward<F>(func));
}
#if SIG_ENABLE_FOLDR
/**
(a -> b -> b) -> b0 -> [a] -> b \n
b0b
\param func (a -> b -> a)
\param init b0
\param list [a]\ref sig_container
\return b
\sa foldl(F const& func, T init, C const& list)
\code
int fl = foldl(std::minus<int>(), 1, array<int, 3>{ 2, 3, 4 }); // ((1-2)-3)-4
int fr = foldr(std::minus<int>(), 4, array<int, 3>{ 1, 2, 3 }); // 1-(2-(3-4))
assert(fl0 == ((1-2)-3)-4);
assert(fr0 == 1-(2-(3-4)));
\endcode
*/
template <class F, class T, class C>
auto foldr(F&& func, T&& init, C&& list)
{
using CR = typename impl::<API key><C>::type;
using R = decltype(impl::eval(std::forward<F>(func), std::forward<T>(init), std::declval<typename impl::container_traits<CR>::value_type>()));
return std::accumulate(impl::rbegin(std::forward<C>(list)), impl::rend(std::forward<C>(list)), static_cast<R>(std::forward<T>(init)), std::bind(std::forward<F>(func), _2, _1));
}
#endif
/**
(a -> a -> a) -> (b -> c -> ... -> a) -> a0 -> [b] -> [c] -> ... -> a \n
a0a \n
lists
\param fold_func oper_func (a -> a -> a)
\param oper_func (b -> c -> ... -> a)
\param init a0
\param lists... [b] [c] ...\ref sig_container
\return a
\code
const array<int, 5> data1{ 1, 2, 3, 4, 5 }; // sig::array
const std::vector<int> data2{ 1, -3, 5, 2, 10 };
const std::list<int> data3{ 1, -3, 5, 2 };
double dp = dotProduct(
[](double sum, double a){ return sum + a; },
[](int b, int c, int d, double e){ return std::pow(b*b + c*c + d*d + e*e, 0.25); },
0,
data1, data2, data3, array<double, 4>{ 1.1, 2.2, 3.3, 4.4 }
);
\endcode
*/
template <class F1, class F2, class T, class... Cs>
auto dotProduct(F1&& fold_func, F2&& oper_func, T&& init, Cs&&... lists)
{
using R = decltype(impl::eval(
std::forward<F1>(fold_func),
std::forward<T>(init),
impl::eval(
std::forward<F2>(oper_func),
std::declval<typename impl::container_traits<typename impl::<API key><Cs>::type>::value_type>()...)
)
);
R result = std::forward<T>(init);
const uint length = min(lists.size()...);
iterative_fold(length, result, std::forward<F2>(oper_func), std::forward<F1>(fold_func), impl::begin(std::forward<Cs>(lists))...);
return result;
}
}
#endif |
import os
import argparse
keywords = {\
"mac":[\
"brew install",\
"brew cask install",\
"port install"\
],\
"linux":[\
"apt-get install",\
"aptitude install",\
"yum install",\
"pacman install",\
"dpkg -i",\
"dnf install",\
"zypper in",\
"make install",\
"tar "\
],\
"lua":[\
"luarocks install",\
"luarocks make"\
],\
"python":[\
"pip install",\
"easy_install",\
"conda install"\
],\
"ruby":[\
"gem install",\
"rvm install"\
],
"node":[\
"npm install",\
"bower install"\
],\
}
def whatinstalled():
parser = argparse.ArgumentParser(description='A simple tool to retrieve what you installed using CLI')
parser.add_argument('-f', '--file', dest='bash_file', type=str, help="custom file to parse", default="~/.bash_history")
parser.add_argument('-p', '--profile', dest='profile', type=str, help="specific profile to use", default=None)
args = parser.parse_args()
global keywords
history_file = os.path.expanduser(args.bash_file)
f = open(history_file,"r")
if(args.profile != None and args.profile in keywords):
keywords = {args.profile:keywords[args.profile]}
elif(args.profile != None and args.profile not in keywords):
print("\n[ERROR]Profile doesn't exist\n")
exit(0)
for line in f:
for category in keywords:
for item in keywords[category]:
if item in line:
print("["+category+"]"+str(line[:-1]))
if __name__ == '__main__':
whatinstalled() |
using ReMi.Contracts.Plugins.Data;
using ReMi.Contracts.Plugins.Data.CacheService;
using ReMi.Contracts.Plugins.Services.CacheService;
namespace ReMi.Plugin.Composites.Services
{
public class <API key> : BaseComposit<ICacheService>, ICacheService
{
public void SetKey(CacheEntry entry)
{
var service = GetPluginService(PluginType.CacheService);
if (service != null) service.SetKey(entry);
}
public byte[] GetKey(string key)
{
var service = GetPluginService(PluginType.CacheService);
return service == null ? null : service.GetKey(key);
}
public void ResetCache()
{
var service = GetPluginService(PluginType.CacheService);
if (service != null) service.ResetCache();
}
public void ResetKey(string key)
{
var service = GetPluginService(PluginType.CacheService);
if (service != null) service.ResetKey(key);
}
public void ResetGroup(string @group)
{
var service = GetPluginService(PluginType.CacheService);
if (service != null) service.ResetGroup(@group);
}
}
} |
<?php
/**
* UserIdentity represents the data needed to identity a user.
* It contains the authentication method that checks if the provided
* data can identity the user.
*/
class UserIdentity extends CUserIdentity {
public $error_msg;
public $error_field;
/**
* Authenticates a user.
* The example implementation makes sure if the username and password
* are both 'demo'.
* In practical applications, this should be changed to authenticate
* against some persistent user identity storage (e.g. database).
* @return boolean whether authentication succeeds.
*/
public function authenticate() {
$user_data = UserMaster::model()->findByAttributes(array("UserName" => $this->username));
$usertype_data = UserType::model()->findByAttributes(array("TypeName" => "admin"));
if (empty($user_data)) {
$this->errorCode = self::<API key>;
$this->error_msg = "invalid Username";
$this->error_field = "username";
} elseif ($user_data->UserPassword != md5($this->password)) {
$this->errorCode = self::<API key>;
$this->error_msg = "Invalid Password";
$this->error_field = "password";
} elseif ($user_data->UserTypeId != $usertype_data->TypeId) {
$this->errorCode = self::<API key>;
$this->error_msg = "This is admin restricted area";
$this->error_field = "username";
} else {
$this->errorCode = self::ERROR_NONE;
Yii::app()->user->setState("username", $this->username);
//$this->setState('id', $user_data->id);
}
return !$this->errorCode;
}
function fetch_error() {
return $this->error_msg;
}
private $_id;
public function getId()
{
//$user_data = UserMaster::model()->findByAttributes(array("UserName" => $this->username));
//return $user_data->id;
return $this->_id;
}
} |
import gevent
import pytest
from raiden.api.python import RaidenAPI
from raiden.tests.utils.detect_failure import raise_on_failure
from raiden.tests.utils.events import (
<API key>,
search_for_item,
<API key>,
<API key>,
)
from raiden.tests.utils.network import CHAIN
from raiden.tests.utils.protocol import (
<API key>,
<API key>,
)
from raiden.tests.utils.transfer import (
<API key>,
get_channelstate,
transfer,
wait_assert,
)
from raiden.transfer import channel, views
from raiden.transfer.mediated_transfer.events import (
SendLockedTransfer,
SendLockExpired,
SendRefundTransfer,
)
from raiden.transfer.mediated_transfer.state_change import ReceiveLockExpired
from raiden.transfer.state_change import <API key>, ReceiveProcessed
from raiden.transfer.views import state_from_raiden
from raiden.waiting import wait_for_block, wait_for_settle
@pytest.mark.parametrize("channels_per_node", [CHAIN])
@pytest.mark.parametrize("number_of_nodes", [3])
@pytest.mark.parametrize("settle_timeout", [50])
def <API key>(raiden_chain, token_addresses, deposit, network_wait):
raise_on_failure(
raiden_chain,
<API key>,
raiden_chain=raiden_chain,
token_addresses=token_addresses,
deposit=deposit,
network_wait=network_wait,
)
def <API key>(raiden_chain, token_addresses, deposit, network_wait):
# The network has the following topology:
app0, app1, app2 = raiden_chain # pylint: disable=<API key>
token_address = token_addresses[0]
<API key> = app0.raiden.default_registry.address
<API key> = views.get_<API key>(
views.state_from_app(app0), <API key>, token_address
)
# Exhaust the channel App1 <-> App2 (to force the refund transfer)
exhaust_amount = deposit
transfer(
initiator_app=app1,
target_app=app2,
token_address=token_address,
amount=exhaust_amount,
identifier=1,
)
refund_amount = deposit
identifier = 1
payment_status = app0.raiden.<API key>(
<API key>, refund_amount, app2.raiden.address, identifier
)
msg = "Must fail, there are no routes available"
assert payment_status.payment_done.wait() is False, msg
# The transfer from app0 to app2 failed, so the balances did change.
# Since the refund is not unlocked both channels have the corresponding
# amount locked (issue #1091)
send_lockedtransfer = <API key>(
app0.raiden, SendLockedTransfer, {"transfer": {"lock": {"amount": refund_amount}}}
)
assert send_lockedtransfer
send_refundtransfer = <API key>(app1.raiden, SendRefundTransfer, {})
assert send_refundtransfer
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit,
[send_lockedtransfer.transfer.lock],
app1,
deposit,
[send_refundtransfer.transfer.lock],
)
# This channel was exhausted to force the refund transfer
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
0,
[],
app2,
deposit * 2,
[],
)
@pytest.mark.parametrize("privatekey_seed", ["<API key>:{}"])
@pytest.mark.parametrize("number_of_nodes", [3])
@pytest.mark.parametrize("channels_per_node", [CHAIN])
def <API key>(
raiden_chain,
number_of_nodes,
token_addresses,
deposit,
network_wait,
retry_timeout,
# UDP does not seem to retry messages until processed
skip_if_not_matrix, # pylint: disable=unused-argument
):
raise_on_failure(
raiden_chain,
<API key>,
raiden_chain=raiden_chain,
number_of_nodes=number_of_nodes,
token_addresses=token_addresses,
deposit=deposit,
network_wait=network_wait,
retry_timeout=retry_timeout,
)
def <API key>(
raiden_chain, number_of_nodes, token_addresses, deposit, network_wait, retry_timeout
):
"""A failed transfer must send a refund back.
TODO:
- Unlock the token on refund #1091
- Clear the merkletree and update the locked amount #193
- Remove the refund message type #490"""
# Topology:
# 0 -> 1 -> 2
app0, app1, app2 = raiden_chain
token_address = token_addresses[0]
<API key> = app0.raiden.default_registry.address
<API key> = views.get_<API key>(
views.state_from_app(app0), <API key>, token_address
)
# make a transfer to test the path app0 -> app1 -> app2
identifier_path = 1
amount_path = 1
transfer(
initiator_app=app0,
target_app=app2,
token_address=token_address,
amount=amount_path,
identifier=identifier_path,
timeout=network_wait * number_of_nodes,
)
# drain the channel app1 -> app2
identifier_drain = 2
amount_drain = deposit * 8
transfer(
initiator_app=app1,
target_app=app2,
token_address=token_address,
amount=amount_drain,
identifier=identifier_drain,
timeout=network_wait,
)
# wait for the nodes to sync
gevent.sleep(1)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[],
app1,
deposit + amount_path,
[],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path - amount_drain,
[],
app2,
deposit + amount_path + amount_drain,
[],
)
# app0 -> app1 -> app2 is the only available path, but the channel app1 ->
# app2 doesn't have capacity, so a refund will be sent on app1 -> app0
identifier_refund = 3
amount_refund = 50
payment_status = app0.raiden.<API key>(
<API key>, amount_refund, app2.raiden.address, identifier_refund
)
msg = "there is no path with capacity, the transfer must fail"
assert payment_status.payment_done.wait() is False, msg
gevent.sleep(0.2)
# A lock structure with the correct amount
send_locked = <API key>(
app0.raiden, SendLockedTransfer, {"transfer": {"lock": {"amount": amount_refund}}}
)
assert send_locked
secrethash = send_locked.transfer.lock.secrethash
send_refund = <API key>(app1.raiden, SendRefundTransfer, {})
assert send_refund
lock = send_locked.transfer.lock
refund_lock = send_refund.transfer.lock
assert lock.amount == refund_lock.amount
assert lock.secrethash
assert lock.expiration
assert lock.secrethash == refund_lock.secrethash
# Both channels have the amount locked because of the refund message
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[lock],
app1,
deposit + amount_path,
[refund_lock],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path - amount_drain,
[],
app2,
deposit + amount_path + amount_drain,
[],
)
# Additional checks for LockExpired causing nonce mismatch after refund transfer:
# At this point make sure that the initiator has not deleted the payment task
assert secrethash in state_from_raiden(app0.raiden).payment_mapping.<API key>
# Wait for lock lock expiration but make sure app0 never processes LockExpired
with <API key>(app0):
wait_for_block(
raiden=app0.raiden,
block_number=channel.<API key>(lock) + 1,
retry_timeout=retry_timeout,
)
# make sure that app0 still has the payment task for the secrethash
assert secrethash in state_from_raiden(app0.raiden).payment_mapping.<API key>
# make sure that app1 sent a lock expired message for the secrethash
send_lock_expired = <API key>(
app1.raiden, SendLockExpired, {"secrethash": secrethash}
)
assert send_lock_expired
# make sure that app0 never got it
state_changes = app0.raiden.wal.storage.<API key>(0, "latest")
assert not search_for_item(state_changes, ReceiveLockExpired, {"secrethash": secrethash})
# Out of the handicapped app0 transport.
# Now wait till app0 receives and processes LockExpired
<API key> = <API key>(
app0.raiden, ReceiveLockExpired, {"secrethash": secrethash}, retry_timeout
)
# And also till app1 received the processed
<API key>(
app1.raiden,
ReceiveProcessed,
{"message_identifier": <API key>.message_identifier},
retry_timeout,
)
# make sure app1 queue has cleared the SendLockExpired
chain_state1 = views.state_from_app(app1)
queues1 = views.<API key>(chain_state=chain_state1)
result = [
(queue_id, queue)
for queue_id, queue in queues1.items()
if queue_id.recipient == app0.raiden.address and queue
]
assert not result
# and now wait for 1 more block so that the payment task can be deleted
wait_for_block(
raiden=app0.raiden,
block_number=app0.raiden.get_block_number() + 1,
retry_timeout=retry_timeout,
)
# and since the lock expired message has been sent and processed then the
# payment task should have been deleted from both nodes
assert secrethash not in state_from_raiden(app0.raiden).payment_mapping.<API key>
assert secrethash not in state_from_raiden(app1.raiden).payment_mapping.<API key>
@pytest.mark.parametrize("privatekey_seed", ["<API key>:{}"])
@pytest.mark.parametrize("number_of_nodes", [3])
@pytest.mark.parametrize("channels_per_node", [CHAIN])
def <API key>(
raiden_chain,
number_of_nodes,
token_addresses,
deposit,
network_wait,
retry_timeout,
# UDP does not seem to retry messages until processed
skip_if_not_matrix, # pylint: disable=unused-argument
blockchain_type,
):
raise_on_failure(
raiden_chain,
<API key>,
raiden_chain=raiden_chain,
number_of_nodes=number_of_nodes,
token_addresses=token_addresses,
deposit=deposit,
network_wait=network_wait,
retry_timeout=retry_timeout,
blockchain_type=blockchain_type,
)
def <API key>(
raiden_chain,
number_of_nodes,
token_addresses,
deposit,
network_wait,
retry_timeout,
blockchain_type,
):
# Topology:
# 0 -> 1 -> 2
app0, app1, app2 = raiden_chain
token_address = token_addresses[0]
<API key> = app0.raiden.default_registry.address
<API key> = views.get_<API key>(
views.state_from_app(app0), <API key>, token_address
)
token_proxy = app0.raiden.chain.token(token_address)
initial_balance0 = token_proxy.balance_of(app0.raiden.address)
initial_balance1 = token_proxy.balance_of(app1.raiden.address)
# make a transfer to test the path app0 -> app1 -> app2
identifier_path = 1
amount_path = 1
transfer(
initiator_app=app0,
target_app=app2,
token_address=token_address,
amount=amount_path,
identifier=identifier_path,
timeout=network_wait * number_of_nodes,
)
# drain the channel app1 -> app2
identifier_drain = 2
amount_drain = deposit * 8
transfer(
initiator_app=app1,
target_app=app2,
token_address=token_address,
amount=amount_drain,
identifier=identifier_drain,
timeout=network_wait,
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[],
app1,
deposit + amount_path,
[],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path - amount_drain,
[],
app2,
deposit + amount_path + amount_drain,
[],
)
# app0 -> app1 -> app2 is the only available path, but the channel app1 ->
# app2 doesn't have capacity, so a refund will be sent on app1 -> app0
identifier_refund = 3
amount_refund = 50
payment_status = app0.raiden.<API key>(
<API key>, amount_refund, app2.raiden.address, identifier_refund
)
msg = "there is no path with capacity, the transfer must fail"
assert payment_status.payment_done.wait() is False, msg
gevent.sleep(0.2)
# A lock structure with the correct amount
send_locked = <API key>(
app0.raiden, SendLockedTransfer, {"transfer": {"lock": {"amount": amount_refund}}}
)
assert send_locked
secrethash = send_locked.transfer.lock.secrethash
send_refund = <API key>(app1.raiden, SendRefundTransfer, {})
assert send_refund
lock = send_locked.transfer.lock
refund_lock = send_refund.transfer.lock
assert lock.amount == refund_lock.amount
assert lock.secrethash
assert lock.expiration
assert lock.secrethash == refund_lock.secrethash
# Both channels have the amount locked because of the refund message
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[lock],
app1,
deposit + amount_path,
[refund_lock],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path - amount_drain,
[],
app2,
deposit + amount_path + amount_drain,
[],
)
# Additional checks for LockExpired causing nonce mismatch after refund transfer:
# At this point make sure that the initiator has not deleted the payment task
assert secrethash in state_from_raiden(app0.raiden).payment_mapping.<API key>
with <API key>():
# now app1 goes offline
app1.raiden.stop()
app1.raiden.get()
assert not app1.raiden
# Wait for lock expiration so that app0 sends a LockExpired
wait_for_block(
raiden=app0.raiden,
block_number=channel.<API key>(lock) + 1,
retry_timeout=retry_timeout,
)
# make sure that app0 sent a lock expired message for the secrethash
<API key>(
app0.raiden, SendLockExpired, {"secrethash": secrethash}, retry_timeout
)
# now app0 closes the channel
RaidenAPI(app0.raiden).channel_close(
registry_address=<API key>,
token_address=token_address,
partner_address=app1.raiden.address,
)
count = 0
original_update = app1.raiden.<API key>.<API key>
def patched_update(raiden, event):
nonlocal count
count += 1
original_update(raiden, event)
app1.raiden.<API key>.<API key> = patched_update
# and now app1 comes back online
app1.raiden.start()
assert count == 1, "Update transfer should have only been called once during restart"
channel_identifier = get_channelstate(app0, app1, <API key>).identifier
# and we wait for settlement
wait_for_settle(
raiden=app0.raiden,
payment_network_id=<API key>,
token_address=token_address,
channel_ids=[channel_identifier],
retry_timeout=app0.raiden.alarm.sleep_time,
)
timeout = 30 if blockchain_type == "parity" else 10
with gevent.Timeout(timeout):
unlock_app0 = <API key>(
app0.raiden,
<API key>,
{"participant": app0.raiden.address},
retry_timeout,
)
assert unlock_app0.returned_tokens == 50
with gevent.Timeout(timeout):
unlock_app1 = <API key>(
app1.raiden,
<API key>,
{"participant": app1.raiden.address},
retry_timeout,
)
assert unlock_app1.returned_tokens == 50
final_balance0 = token_proxy.balance_of(app0.raiden.address)
final_balance1 = token_proxy.balance_of(app1.raiden.address)
assert final_balance0 - deposit - initial_balance0 == -1
assert final_balance1 - deposit - initial_balance1 == 1
@pytest.mark.parametrize("privatekey_seed", ["<API key>:{}"])
@pytest.mark.parametrize("number_of_nodes", [4])
@pytest.mark.parametrize("number_of_tokens", [1])
@pytest.mark.parametrize("channels_per_node", [CHAIN])
def <API key>(
raiden_chain, number_of_nodes, token_addresses, deposit, network_wait
):
raise_on_failure(
raiden_chain,
<API key>,
raiden_chain=raiden_chain,
number_of_nodes=number_of_nodes,
token_addresses=token_addresses,
deposit=deposit,
network_wait=network_wait,
)
def <API key>(
raiden_chain, number_of_nodes, token_addresses, deposit, network_wait
):
"""Test the refund transfer sent due to failure after 2nd hop"""
# Topology:
# 0 -> 1 -> 2 -> 3
app0, app1, app2, app3 = raiden_chain
token_address = token_addresses[0]
<API key> = app0.raiden.default_registry.address
<API key> = views.get_<API key>(
views.state_from_app(app0), <API key>, token_address
)
# make a transfer to test the path app0 -> app1 -> app2 -> app3
identifier_path = 1
amount_path = 1
transfer(
initiator_app=app0,
target_app=app3,
token_address=token_address,
amount=amount_path,
identifier=identifier_path,
timeout=network_wait * number_of_nodes,
)
# drain the channel app2 -> app3
identifier_drain = 2
amount_drain = deposit * 8
transfer(
initiator_app=app2,
target_app=app3,
token_address=token_address,
amount=amount_drain,
identifier=identifier_drain,
timeout=network_wait,
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[],
app1,
deposit + amount_path,
[],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path,
[],
app2,
deposit + amount_path,
[],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app2,
deposit - amount_path - amount_drain,
[],
app3,
deposit + amount_path + amount_drain,
[],
)
# app0 -> app1 -> app2 > app3 is the only available path, but the channel
# app2 -> app3 doesn't have capacity, so a refund will be sent on
# app2 -> app1 -> app0
identifier_refund = 3
amount_refund = 50
payment_status = app0.raiden.<API key>(
<API key>, amount_refund, app3.raiden.address, identifier_refund
)
msg = "there is no path with capacity, the transfer must fail"
assert payment_status.payment_done.wait() is False, msg
gevent.sleep(0.2)
# Lock structures with the correct amount
send_locked1 = <API key>(
app0.raiden, SendLockedTransfer, {"transfer": {"lock": {"amount": amount_refund}}}
)
assert send_locked1
send_refund1 = <API key>(app1.raiden, SendRefundTransfer, {})
assert send_refund1
lock1 = send_locked1.transfer.lock
refund_lock1 = send_refund1.transfer.lock
assert lock1.amount == refund_lock1.amount
assert lock1.secrethash == refund_lock1.secrethash
send_locked2 = <API key>(
app1.raiden, SendLockedTransfer, {"transfer": {"lock": {"amount": amount_refund}}}
)
assert send_locked2
send_refund2 = <API key>(app2.raiden, SendRefundTransfer, {})
assert send_refund2
lock2 = send_locked2.transfer.lock
refund_lock2 = send_refund2.transfer.lock
assert lock2.amount == refund_lock2.amount
assert lock2.secrethash
assert lock2.expiration
# channels have the amount locked because of the refund message
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app0,
deposit - amount_path,
[lock1],
app1,
deposit + amount_path,
[refund_lock1],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app1,
deposit - amount_path,
[lock2],
app2,
deposit + amount_path,
[refund_lock2],
)
with gevent.Timeout(network_wait):
wait_assert(
<API key>,
<API key>,
app2,
deposit - amount_path - amount_drain,
[],
app3,
deposit + amount_path + amount_drain,
[],
) |
import styles from './UserInput.less';
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { MIN_FONT_SIZE, MAX_FONT_SIZE } from 'constants';
import { updateTextColor, blurTextColor, updateFontSize, blurFontSize,
updateFontSizeUnit, toggleFontWeight, <API key>, blurBackgroundColor,
<API key> } from 'actions/app';
import Editable from 'Editable/Editable';
import Toggle from 'Toggle/Toggle';
function mapStateToProps(state) {
return {
textColor: state.textColor,
fontSize: state.fontSize,
fontSizeUnit: state.fontSizeUnit,
isFontBold: state.isFontBold,
backgroundColor: state.backgroundColor,
accessibilityLevel: state.accessibilityLevel
};
}
function mapDispatchToProps(dispatch) {
return {
updateTextColor: value => dispatch(updateTextColor('value', value)),
blurTextColor: () => dispatch(blurTextColor()),
updateFontSize: value => dispatch(updateFontSize(value)),
blurFontSize: () => dispatch(blurFontSize()),
updateFontSizeUnit: value => dispatch(updateFontSizeUnit(value)),
toggleFontWeight: () => dispatch(toggleFontWeight()),
<API key>: value => dispatch(<API key>('value', value)),
blurBackgroundColor: () => dispatch(blurBackgroundColor()),
<API key>: value => dispatch(<API key>(value))
};
}
function UserInput(props) {
const { textColor, fontSize, fontSizeUnit, isFontBold, backgroundColor,
accessibilityLevel, updateTextColor,
blurTextColor, updateFontSize, blurFontSize,
updateFontSizeUnit, toggleFontWeight, <API key>, blurBackgroundColor,
<API key> } = props;
return (
<div className={styles.container}>
<div className={styles.innerContainer}>
<p className={styles.<API key>}>
<span className={styles.textColorContainer}>
<label htmlFor="text-color">My text color is </label>
<span className={styles.colorContainer}>
<Editable
isValid={textColor.isValueValid}
onChange={updateTextColor}
inputProps={{
id: 'text-color',
type: 'text',
value: textColor.value,
onBlur: blurTextColor
}}
/>
</span>
</span>
{' '}
<span className={styles.<API key>}>
<label htmlFor="font-size">at </label>
<span className={styles.fontSizeContainer}>
<Editable
isValid={fontSize.isValid}
onChange={updateFontSize}
inputProps={{
id: 'font-size',
type: 'number',
min: MIN_FONT_SIZE,
max: MAX_FONT_SIZE,
step: '1',
value: fontSize.value,
onBlur: blurFontSize
}}
/>
</span>
<span className={styles.<API key>}>
<Toggle
values={['pt', 'px']}
currentValue={fontSizeUnit}
onChange={updateFontSizeUnit}
/>
</span>
and
<span className={styles.fontWeightContainer}>
<Toggle
values={['regular', 'bold']}
currentValue={isFontBold ? 'bold' : 'regular'}
onChange={toggleFontWeight}
/>
</span>
weight
</span>
</p>
<p className={styles.<API key>}>
<label htmlFor="background-color">My background color is </label>
<span className={styles.colorContainer}>
<Editable
isValid={backgroundColor.isValueValid}
onChange={<API key>}
inputProps={{
id: 'background-color',
type: 'text',
value: backgroundColor.value,
onBlur: blurBackgroundColor
}}
/>
</span>
</p>
<p className={styles.<API key>}>
My design must be
<Toggle
values={['AA', 'AAA']}
currentValue={accessibilityLevel}
onChange={<API key>}
/>
compliant
</p>
{
(!textColor.isValueValid || !backgroundColor.isValueValid || !fontSize.isValid) &&
<div className={styles.errorsContainer}>
{
(!textColor.isValueValid || !backgroundColor.isValueValid) &&
<p className={styles.error}>
Enter a valid hexadecimal color
</p>
}
{
!fontSize.isValid &&
<p className={styles.error}>
Enter a font size of {MIN_FONT_SIZE}px or above
</p>
}
</div>
}
</div>
</div>
);
}
UserInput.propTypes = {
textColor: PropTypes.object.isRequired,
fontSize: PropTypes.object.isRequired,
fontSizeUnit: PropTypes.string.isRequired,
isFontBold: PropTypes.bool.isRequired,
backgroundColor: PropTypes.object.isRequired,
accessibilityLevel: PropTypes.string.isRequired,
updateTextColor: PropTypes.func.isRequired,
blurTextColor: PropTypes.func.isRequired,
updateFontSize: PropTypes.func.isRequired,
blurFontSize: PropTypes.func.isRequired,
updateFontSizeUnit: PropTypes.func.isRequired,
toggleFontWeight: PropTypes.func.isRequired,
<API key>: PropTypes.func.isRequired,
blurBackgroundColor: PropTypes.func.isRequired,
<API key>: PropTypes.func.isRequired
};
export default connect(mapStateToProps, mapDispatchToProps)(UserInput); |
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1"/>
<title>EZFILE</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="<API key>+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
<style>
@import url(https://fonts.googleapis.com/earlyaccess/nanumgothic.css);
* {
font-family: 'Nanum Gothic', sans-serif;
padding: 0;
margin: 0;
}
html, body {
width: 100%;
height: 100%;
}
.layer {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
display: table;
position: absolute;
}
.cell {
display: table-cell;
vertical-align: middle;
width: 0;
height: 100%;
padding: 10px;
margin: 0 auto;
}
code {display: block; border-radius: 0;}
.tab1x:before {content: "\00a0\00a0\00a0\00a0";}
.tab2x:before {content: "\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";}
.tab3x:before {content: "\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";}
.tab4x:before {content: "\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";}
.tab5x:before {content: "\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";}
h1 {text-align: center; padding: 10px 0 20px 0;}
</style>
</head>
<body>
<div class="layer">
<div class="cell">
<h1 class="h1">jquery.babypaunch.ezfile.js - Sample</h1>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 1. -
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file1").ezfile({name: "upfile1"});</code>
<code>})</code>
</div>
<div id="file1"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 2. -
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file2").ezfile({name: "upfile2", limit: 0});</code>
<code>})</code>
</div>
<div id="file2"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 3. - 3
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file3").ezfile({name: "upfile2", limit: 3});</code>
<code>})</code>
</div>
<div id="file3"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 4. - (gif, jpg, jpeg, png)
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file4").ezfile({name: "upfile4", ext: ["gif", "jpg", "jpeg", "png"]});</code>
<code>})</code>
</div>
<div id="file4"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 5. - (gif, jpg, jpeg, png), , (900px, 300px)
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file5").ezfile({name: "upfile5", ext: ["gif", "jpg", "jpeg", "png"], size: [900, 300, true]});</code>
<code>})</code>
</div>
<div id="file5"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 6. - (gif, jpg, jpeg, png), , (900px, 300px)
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file6").ezfile({name: "upfile6", ext: ["gif", "jpg", "jpeg", "png"], size: [900, 300]});</code>
<code>})</code>
</div>
<div id="file6"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 7. - gif , , (8, 2)
</div>
<div class="panel-body">
<div>
<code>$(function(){</code>
<code class="tab1x">$("#file7").ezfile({name: "upfile7", ext: "gif", ratio: [8, 2]});</code>
<code>})</code>
</div>
<div id="file7"></div>
</div>
</div>
</div>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
Example 8. - (10mb)
</div>
<div class="panel-body">
<code>$(function(){</code>
<code class="tab1x">$("#file8").ezfile({name: "upfile8", limit: 0, byte: "10mb"});</code>
<code>})</code>
<div id="file8"></div>
</div>
</div>
</div>
</div><!-- div.cell -->
</div><!-- div.layer -->
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<API key>" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.15.1/jquery.validate.js"></script>
<script src="jquery.babypaunch.ezfile.js"></script>
<script>
$(function(){
$("#file1").ezfile({name: "upfile1"});
$("#file2").ezfile({name: "upfile2", limit: 0});
$("#file3").ezfile({name: "upfile3", limit: 3});
$("#file4").ezfile({name: "upfile4", ext: ["gif", "jpg", "jpeg", "png"]});
$("#file5").ezfile({name: "upfile5", ext: ["gif", "jpg", "jpeg", "png"], size: [900, 300, true]});
$("#file6").ezfile({name: "upfile6", ext: ["gif", "jpg", "jpeg", "png"], size: [900, 300]});
$("#file7").ezfile({name: "upfile7", ext: "gif", ratio: [8, 2]});
$("#file8").ezfile({name: "upfile8", limit: 0, byte: "10mb"});
}); //end: $(function(){
</script>
</body>
</html> |
using System;
using NHibernate;
namespace Utilities.Transactions
{
public class Transaction: IDisposable
{
private readonly ISession _session;
private readonly bool <API key>;
public Transaction(ISession session)
{
_session = session;
<API key> = session.Transaction.IsActive;
if (!<API key>)
{
session.BeginTransaction();
}
}
public void Commit()
{
if (!<API key>)
{
_session.Transaction.Commit();
}
}
public void Rollback()
{
_session.Transaction.Rollback();
}
public void Dispose()
{
if (!<API key> && _session.Transaction.IsActive)
{
_session.Transaction.Rollback();
}
}
}
} |
public class Rectangle {
/*
* Define two public attributes width and height of type int.
*/
// write your code here
public int width;
public int height;
/*
* Define a constructor which expects two parameters width and height here.
*/
// write your code here
public Rectangle(int width, int height) {
this.width = width;
this.height = height;
}
/*
* Define a public method `getArea` which can calculate the area of the
* rectangle and return.
*/
// write your code here
public int getArea() {
return this.width * this.height;
}
} |
#include "ImageVerification.hpp"
#include <assert.h>
#include <cstdlib>
#include <Video/LowLevelRenderer/Interface/LowLevelRenderer.hpp>
#include <Utility/Log.hpp>
#define <API key>
#include <stb_image_write.h>
#define STBI_ONLY_PNG
#include <stb_image.h>
using namespace Video;
ImageVerification::ImageVerification(LowLevelRenderer* lowLevelRenderer, Texture* texture) {
data = lowLevelRenderer->ReadImage(texture);
size = texture->GetSize();
}
ImageVerification::~ImageVerification() {
delete[] data;
}
void ImageVerification::WritePNG(const char* filename) const {
assert(filename != nullptr);
stbi_write_png(filename, size.x, size.y, 4, data, 4 * size.x);
}
bool ImageVerification::Compare(const char* imageData, unsigned int imageDataLength, int maxDifference) const {
// Load reference image.
int components, width, height;
unsigned char* referenceData = reinterpret_cast<unsigned char*>(<API key>(reinterpret_cast<const unsigned char*>(imageData), imageDataLength, &width, &height, &components, 0));
if (referenceData == NULL)
Log() << "Couldn't load headerized image.\n";
// Compare results to reference.
bool match = true;
for (uint32_t y = 0; y < size.y; ++y) {
for (uint32_t x = 0; x < size.x; ++x) {
for (uint32_t component = 0; component < 4; ++component) {
int color = data[(y * size.x + x) * 4 + component];
int reference = referenceData[(y * size.x + x) * 4 + component];
if (abs(color - reference) > maxDifference) {
match = false;
}
}
}
}
// Cleanup.
stbi_image_free(referenceData);
return match;
} |
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
function validate () {
var promo=document.getElementById('promocode').value;
if (promo=="APA") {
alert("MAAF")
};
}
</script>
</head>
<body>
<input id="pomocode" name="promocode" >
<input type="submit" onclick="validate()">
</body>
</html> |
// Nova double testing service - HTTP API implementation
package novaservice
import (
"crypto/rand"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"launchpad.net/goose/nova"
"launchpad.net/goose/testservices"
"launchpad.net/goose/testservices/identityservice"
"net/http"
"path"
"strconv"
"strings"
"time"
)
const authToken = "X-Auth-Token"
// errorResponse defines a single HTTP error response.
type errorResponse struct {
code int
body string
contentType string
errorText string
headers map[string]string
nova *Nova
}
// verbatim real Nova responses (as errors).
var (
errUnauthorized = &errorResponse{
http.StatusUnauthorized,
`401 Unauthorized
This server could not verify that you are authorized to access the ` +
`document you requested. Either you supplied the wrong ` +
`credentials (e.g., bad password), or your browser does ` +
`not understand how to supply the credentials required.
Authentication required
`,
"text/plain; charset=UTF-8",
"unauthorized request",
nil,
nil,
}
errForbidden = &errorResponse{
http.StatusForbidden,
`{"forbidden": {"message": "Policy doesn't allow compute_extension:` +
`flavormanage to be performed.", "code": 403}}`,
"application/json; charset=UTF-8",
"forbidden flavors request",
nil,
nil,
}
errBadRequest = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Malformed request url", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request base path or URL",
nil,
nil,
}
errBadRequest2 = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "The server could not comply with the ` +
`request since it is either malformed or otherwise incorrect.", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request URL",
nil,
nil,
}
errBadRequest3 = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Malformed request body", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request body",
nil,
nil,
}
<API key> = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "entity already exists", "code": 400}}`,
"application/json; charset=UTF-8",
"duplicate value",
nil,
nil,
}
<API key> = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Server name is not defined", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request - missing server name",
nil,
nil,
}
<API key> = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Missing flavorRef attribute", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request - missing flavorRef",
nil,
nil,
}
<API key> = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Missing imageRef attribute", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request - missing imageRef",
nil,
nil,
}
errBadRequestSG = &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Security group id should be integer", "code": 400}}`,
"application/json; charset=UTF-8",
"bad security group id type",
nil,
nil,
}
errNotFound = &errorResponse{
http.StatusNotFound,
`404 Not Found
The resource could not be found.
`,
"text/plain; charset=UTF-8",
"resource not found",
nil,
nil,
}
errNotFoundJSON = &errorResponse{
http.StatusNotFound,
`{"itemNotFound": {"message": "The resource could not be found.", "code": 404}}`,
"application/json; charset=UTF-8",
"resource not found",
nil,
nil,
}
errNotFoundJSONSG = &errorResponse{
http.StatusNotFound,
`{"itemNotFound": {"message": "Security group $ID$ not found.", "code": 404}}`,
"application/json; charset=UTF-8",
"",
nil,
nil,
}
errNotFoundJSONSGR = &errorResponse{
http.StatusNotFound,
`{"itemNotFound": {"message": "Rule ($ID$) not found.", "code": 404}}`,
"application/json; charset=UTF-8",
"security rule not found",
nil,
nil,
}
errMultipleChoices = &errorResponse{
http.<API key>,
`{"choices": [{"status": "CURRENT", "media-types": [{"base": ` +
`"application/xml", "type": "application/vnd.openstack.compute+` +
`xml;version=2"}, {"base": "application/json", "type": "application/` +
`vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links": ` +
`[{"href": "$ENDPOINT$$URL$", "rel": "self"}]}]}`,
"application/json",
"multiple URL redirection choices",
nil,
nil,
}
errNoVersion = &errorResponse{
http.StatusOK,
`{"versions": [{"status": "CURRENT", "updated": "2011-01-21` +
`T11:33:21Z", "id": "v2.0", "links": [{"href": "$ENDPOINT$", "rel": "self"}]}]}`,
"application/json",
"no version specified in URL",
nil,
nil,
}
errVersionsLinks = &errorResponse{
http.StatusOK,
`{"version": {"status": "CURRENT", "updated": "2011-01-21T11` +
`:33:21Z", "media-types": [{"base": "application/xml", "type": ` +
`"application/vnd.openstack.compute+xml;version=2"}, {"base": ` +
`"application/json", "type": "application/vnd.openstack.compute` +
`+json;version=2"}], "id": "v2.0", "links": [{"href": "$ENDPOINT$"` +
`, "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack` +
`-compute/1.1/<API key>.1.pdf", "type": "application/pdf` +
`", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/` +
`openstack-compute/1.1/wadl/os-compute-1.1.wadl", "type": ` +
`"application/vnd.sun.wadl+xml", "rel": "describedby"}]}}`,
"application/json",
"version missing from URL",
nil,
nil,
}
errNotImplemented = &errorResponse{
http.<API key>,
"501 Not Implemented",
"text/plain; charset=UTF-8",
"not implemented",
nil,
nil,
}
errNoGroupId = &errorResponse{
errorText: "no security group id given",
}
<API key> = &errorResponse{
http.<API key>,
"",
"text/plain; charset=UTF-8",
"too many requests",
// RFC says that Retry-After should be an int, but we don't want to wait an entire second during the test suite.
map[string]string{"Retry-After": "0.001"},
nil,
}
<API key> = &errorResponse{
http.StatusNotFound,
"Zero floating ips available.",
"text/plain; charset=UTF-8",
"zero floating ips available",
nil,
nil,
}
errIPLimitExceeded = &errorResponse{
http.<API key>,
"Maximum number of floating ips exceeded.",
"text/plain; charset=UTF-8",
"maximum number of floating ips exceeded",
nil,
nil,
}
)
func (e *errorResponse) Error() string {
return e.errorText
}
// requestBody returns the body for the error response, replacing
// $ENDPOINT$, $URL$, $ID$, and $ERROR$ in e.body with the values from
// the request.
func (e *errorResponse) requestBody(r *http.Request) []byte {
url := strings.TrimLeft(r.URL.Path, "/")
body := e.body
if body != "" {
if e.nova != nil {
body = strings.Replace(body, "$ENDPOINT$", e.nova.endpointURL(true, "/"), -1)
}
body = strings.Replace(body, "$URL$", url, -1)
body = strings.Replace(body, "$ERROR$", e.Error(), -1)
if slash := strings.LastIndex(url, "/"); slash != -1 {
body = strings.Replace(body, "$ID$", url[slash+1:], -1)
}
}
return []byte(body)
}
func (e *errorResponse) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if e.contentType != "" {
w.Header().Set("Content-Type", e.contentType)
}
body := e.requestBody(r)
if e.headers != nil {
for h, v := range e.headers {
w.Header().Set(h, v)
}
}
w.Header().Set("Content-Length", strconv.Itoa(len(body)))
if e.code != 0 {
w.WriteHeader(e.code)
}
if len(body) > 0 {
w.Write(body)
}
}
type novaHandler struct {
n *Nova
method func(n *Nova, w http.ResponseWriter, r *http.Request) error
}
func userInfo(i identityservice.IdentityService, r *http.Request) (*identityservice.UserInfo, error) {
return i.FindUser(r.Header.Get(authToken))
}
func (h *novaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
// handle invalid X-Auth-Token header
_, err := userInfo(h.n.IdentityService, r)
if err != nil {
errUnauthorized.ServeHTTP(w, r)
return
}
// handle trailing slash in the path
if strings.HasSuffix(path, "/") && path != "/" {
errNotFound.ServeHTTP(w, r)
return
}
err = h.method(h.n, w, r)
if err == nil {
return
}
var resp http.Handler
if _, ok := err.(*testservices.<API key>); ok {
resp = <API key>
} else if err == testservices.NoMoreFloatingIPs {
resp = <API key>
} else if err == testservices.IPLimitExceeded {
resp = errIPLimitExceeded
} else {
resp, _ = err.(http.Handler)
if resp == nil {
resp = &errorResponse{
http.<API key>,
`{"internalServerError":{"message":"$ERROR$",code:500}}`,
"application/json",
err.Error(),
nil,
h.n,
}
}
}
resp.ServeHTTP(w, r)
}
func writeResponse(w http.ResponseWriter, code int, body []byte) {
w.Header().Set("Content-Length", strconv.Itoa(len(body)))
w.WriteHeader(code)
w.Write(body)
}
// sendJSON sends the specified response serialized as JSON.
func sendJSON(code int, resp interface{}, w http.ResponseWriter, r *http.Request) error {
data, err := json.Marshal(resp)
if err != nil {
return err
}
writeResponse(w, code, data)
return nil
}
func (n *Nova) handler(method func(n *Nova, w http.ResponseWriter, r *http.Request) error) http.Handler {
return &novaHandler{n, method}
}
func (n *Nova) handleRoot(w http.ResponseWriter, r *http.Request) error {
if r.URL.Path == "/" {
return errNoVersion
}
return errMultipleChoices
}
// handleFlavors handles the flavors HTTP API.
func (n *Nova) handleFlavors(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
if flavorId := path.Base(r.URL.Path); flavorId != "flavors" {
flavor, err := n.flavor(flavorId)
if err != nil {
return errNotFound
}
resp := struct {
Flavor nova.FlavorDetail `json:"flavor"`
}{*flavor}
return sendJSON(http.StatusOK, resp, w, r)
}
entities := n.<API key>()
if len(entities) == 0 {
entities = []nova.Entity{}
}
resp := struct {
Flavors []nova.Entity `json:"flavors"`
}{entities}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
if flavorId := path.Base(r.URL.Path); flavorId != "flavors" {
return errNotFound
}
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return err
}
if len(body) == 0 {
return errBadRequest2
}
return errNotImplemented
case "PUT":
if flavorId := path.Base(r.URL.Path); flavorId != "flavors" {
return errNotFoundJSON
}
return errNotFound
case "DELETE":
if flavorId := path.Base(r.URL.Path); flavorId != "flavors" {
return errForbidden
}
return errNotFound
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// handleFlavorsDetail handles the flavors/detail HTTP API.
func (n *Nova) handleFlavorsDetail(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
if flavorId := path.Base(r.URL.Path); flavorId != "detail" {
return errNotFound
}
flavors := n.allFlavors()
if len(flavors) == 0 {
flavors = []nova.FlavorDetail{}
}
resp := struct {
Flavors []nova.FlavorDetail `json:"flavors"`
}{flavors}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
return errNotFound
case "PUT":
if flavorId := path.Base(r.URL.Path); flavorId != "detail" {
return errNotFound
}
return errNotFoundJSON
case "DELETE":
if flavorId := path.Base(r.URL.Path); flavorId != "detail" {
return errNotFound
}
return errForbidden
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// handleServerActions handles the servers/<id>/action HTTP API.
func (n *Nova) handleServerActions(server *nova.ServerDetail, w http.ResponseWriter, r *http.Request) error {
if server == nil {
return errNotFound
}
body, err := ioutil.ReadAll(r.Body)
if err != nil || len(body) == 0 {
return errNotFound
}
var action struct {
AddSecurityGroup *struct {
Name string
}
RemoveSecurityGroup *struct {
Name string
}
AddFloatingIP *struct {
Address string
}
RemoveFloatingIP *struct {
Address string
}
}
if err := json.Unmarshal(body, &action); err != nil {
return err
}
switch {
case action.AddSecurityGroup != nil:
name := action.AddSecurityGroup.Name
group, err := n.securityGroupByName(name)
if err != nil || n.<API key>(server.Id, group.Id) {
return errNotFound
}
if err := n.<API key>(server.Id, group.Id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
case action.RemoveSecurityGroup != nil:
name := action.RemoveSecurityGroup.Name
group, err := n.securityGroupByName(name)
if err != nil || !n.<API key>(server.Id, group.Id) {
return errNotFound
}
if err := n.<API key>(server.Id, group.Id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
case action.AddFloatingIP != nil:
addr := action.AddFloatingIP.Address
if n.hasServerFloatingIP(server.Id, addr) {
return errNotFound
}
fip, err := n.floatingIPByAddr(addr)
if err != nil {
return errNotFound
}
if err := n.addServerFloatingIP(server.Id, fip.Id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
case action.RemoveFloatingIP != nil:
addr := action.RemoveFloatingIP.Address
if !n.hasServerFloatingIP(server.Id, addr) {
return errNotFound
}
fip, err := n.floatingIPByAddr(addr)
if err != nil {
return errNotFound
}
if err := n.<API key>(server.Id, fip.Id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
}
return fmt.Errorf("unknown server action: %q", string(body))
}
// newUUID generates a random UUID conforming to RFC 4122.
func newUUID() (string, error) {
uuid := make([]byte, 16)
if _, err := io.ReadFull(rand.Reader, uuid); err != nil {
return "", err
}
uuid[8] = uuid[8]&^0xc0 | 0x80 // variant bits; see section 4.1.1.
uuid[6] = uuid[6]&^0xf0 | 0x40 // version 4; see section 4.1.3.
return fmt.Sprintf("%x-%x-%x-%x-%x", uuid[0:4], uuid[4:6], uuid[6:8], uuid[8:10], uuid[10:]), nil
}
// noGroupError constructs a bad request response for an invalid group.
func noGroupError(groupName, tenantId string) error {
return &errorResponse{
http.StatusBadRequest,
`{"badRequest": {"message": "Security group ` + groupName + ` not found for project ` + tenantId + `.", "code": 400}}`,
"application/json; charset=UTF-8",
"bad request URL",
nil,
nil,
}
}
// handleRunServer handles creating and running a server.
func (n *Nova) handleRunServer(body []byte, w http.ResponseWriter, r *http.Request) error {
var req struct {
Server struct {
FlavorRef string
ImageRef string
Name string
Metadata map[string]string
SecurityGroups []map[string]string `json:"security_groups"`
}
}
if err := json.Unmarshal(body, &req); err != nil {
return errBadRequest3
}
if req.Server.Name == "" {
return <API key>
}
if req.Server.ImageRef == "" {
return <API key>
}
if req.Server.FlavorRef == "" {
return <API key>
}
n.nextServerId++
id := strconv.Itoa(n.nextServerId)
uuid, err := newUUID()
if err != nil {
return err
}
var groups []int
if len(req.Server.SecurityGroups) > 0 {
for _, group := range req.Server.SecurityGroups {
groupName := group["name"]
if groupName == "default" {
// assume default security group exists
continue
}
if sg, err := n.securityGroupByName(groupName); err != nil {
return noGroupError(groupName, n.TenantId)
} else {
groups = append(groups, sg.Id)
}
}
}
// TODO(dimitern) - 2013-02-11 bug=1121684
// make sure flavor/image exist (if needed)
flavor := nova.FlavorDetail{Id: req.Server.FlavorRef}
n.buildFlavorLinks(&flavor)
flavorEnt := nova.Entity{Id: flavor.Id, Links: flavor.Links}
image := nova.Entity{Id: req.Server.ImageRef}
timestr := time.Now().Format(time.RFC3339)
userInfo, _ := userInfo(n.IdentityService, r)
server := nova.ServerDetail{
Id: id,
UUID: uuid,
Name: req.Server.Name,
TenantId: n.TenantId,
UserId: userInfo.Id,
HostId: "1",
Image: image,
Flavor: flavorEnt,
Status: nova.StatusActive,
Created: timestr,
Updated: timestr,
Addresses: make(map[string][]nova.IPAddress),
}
nextServer := len(n.allServers(nil)) + 1
n.buildServerLinks(&server)
// set some IP addresses
addr := fmt.Sprintf("127.10.0.%d", nextServer)
server.Addresses["public"] = []nova.IPAddress{{4, addr}, {6, "::dead:beef:f00d"}}
addr = fmt.Sprintf("127.0.0.%d", nextServer)
server.Addresses["private"] = []nova.IPAddress{{4, addr}, {6, "::face::000f"}}
if err := n.addServer(server); err != nil {
return err
}
var resp struct {
Server struct {
SecurityGroups []map[string]string `json:"security_groups"`
Id string `json:"id"`
Links []nova.Link `json:"links"`
AdminPass string `json:"adminPass"`
} `json:"server"`
}
if len(req.Server.SecurityGroups) > 0 {
for _, gid := range groups {
if err := n.<API key>(id, gid); err != nil {
return err
}
}
resp.Server.SecurityGroups = req.Server.SecurityGroups
} else {
resp.Server.SecurityGroups = []map[string]string{{"name": "default"}}
}
resp.Server.Id = id
resp.Server.Links = server.Links
resp.Server.AdminPass = "secret"
return sendJSON(http.StatusAccepted, resp, w, r)
}
// handleServers handles the servers HTTP API.
func (n *Nova) handleServers(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
if suffix := path.Base(r.URL.Path); suffix != "servers" {
groups := false
serverId := ""
if suffix == "os-security-groups" {
// handle GET /servers/<id>/os-security-groups
serverId = path.Base(strings.Replace(r.URL.Path, "/os-security-groups", "", 1))
groups = true
} else {
serverId = suffix
}
server, err := n.server(serverId)
if err != nil {
return errNotFoundJSON
}
if groups {
srvGroups := n.<API key>(serverId)
if len(srvGroups) == 0 {
srvGroups = []nova.SecurityGroup{}
}
resp := struct {
Groups []nova.SecurityGroup `json:"security_groups"`
}{srvGroups}
return sendJSON(http.StatusOK, resp, w, r)
}
resp := struct {
Server nova.ServerDetail `json:"server"`
}{*server}
return sendJSON(http.StatusOK, resp, w, r)
}
f := make(filter)
if err := r.ParseForm(); err == nil && len(r.Form) > 0 {
for filterKey, filterValues := range r.Form {
for _, value := range filterValues {
f[filterKey] = value
}
}
}
entities := n.<API key>(f)
if len(entities) == 0 {
entities = []nova.Entity{}
}
resp := struct {
Servers []nova.Entity `json:"servers"`
}{entities}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
if suffix := path.Base(r.URL.Path); suffix != "servers" {
serverId := ""
if suffix == "action" {
// handle POST /servers/<id>/action
serverId = path.Base(strings.Replace(r.URL.Path, "/action", "", 1))
server, _ := n.server(serverId)
return n.handleServerActions(server, w, r)
} else {
serverId = suffix
}
return errNotFound
}
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return err
}
if len(body) == 0 {
return errBadRequest2
}
return n.handleRunServer(body, w, r)
case "PUT":
if serverId := path.Base(r.URL.Path); serverId != "servers" {
return errBadRequest2
}
return errNotFound
case "DELETE":
if serverId := path.Base(r.URL.Path); serverId != "servers" {
if _, err := n.server(serverId); err != nil {
return errNotFoundJSON
}
if err := n.removeServer(serverId); err != nil {
return err
}
writeResponse(w, http.StatusNoContent, nil)
return nil
}
return errNotFound
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// handleServersDetail handles the servers/detail HTTP API.
func (n *Nova) handleServersDetail(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
if serverId := path.Base(r.URL.Path); serverId != "detail" {
return errNotFound
}
f := make(filter)
if err := r.ParseForm(); err == nil && len(r.Form) > 0 {
for filterKey, filterValues := range r.Form {
for _, value := range filterValues {
f[filterKey] = value
}
}
}
servers := n.allServers(f)
if len(servers) == 0 {
servers = []nova.ServerDetail{}
}
resp := struct {
Servers []nova.ServerDetail `json:"servers"`
}{servers}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
return errNotFound
case "PUT":
if serverId := path.Base(r.URL.Path); serverId != "detail" {
return errNotFound
}
return errBadRequest2
case "DELETE":
if serverId := path.Base(r.URL.Path); serverId != "detail" {
return errNotFound
}
return errNotFoundJSON
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// processGroupId returns the group id from the given request.
// If there was no group id specified in the path, it returns errNoGroupId
func (n *Nova) processGroupId(w http.ResponseWriter, r *http.Request) (*nova.SecurityGroup, error) {
if groupId := path.Base(r.URL.Path); groupId != "os-security-groups" {
id, err := strconv.Atoi(groupId)
if err != nil {
return nil, errBadRequestSG
}
group, err := n.securityGroup(id)
if err != nil {
return nil, errNotFoundJSONSG
}
return group, nil
}
return nil, errNoGroupId
}
// <API key> handles the os-security-groups HTTP API.
func (n *Nova) <API key>(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
group, err := n.processGroupId(w, r)
if err == errNoGroupId {
groups := n.allSecurityGroups()
if len(groups) == 0 {
groups = []nova.SecurityGroup{}
}
resp := struct {
Groups []nova.SecurityGroup `json:"security_groups"`
}{groups}
return sendJSON(http.StatusOK, resp, w, r)
}
if err != nil {
return err
}
resp := struct {
Group nova.SecurityGroup `json:"security_group"`
}{*group}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
if groupId := path.Base(r.URL.Path); groupId != "os-security-groups" {
return errNotFound
}
body, err := ioutil.ReadAll(r.Body)
if err != nil || len(body) == 0 {
return errBadRequest2
}
var req struct {
Group struct {
Name string
Description string
} `json:"security_group"`
}
if err := json.Unmarshal(body, &req); err != nil {
return err
} else {
_, err := n.securityGroupByName(req.Group.Name)
if err == nil {
return <API key>
}
n.nextGroupId++
nextId := n.nextGroupId
err = n.addSecurityGroup(nova.SecurityGroup{
Id: nextId,
Name: req.Group.Name,
Description: req.Group.Description,
TenantId: n.TenantId,
})
if err != nil {
return err
}
group, err := n.securityGroup(nextId)
if err != nil {
return err
}
var resp struct {
Group nova.SecurityGroup `json:"security_group"`
}
resp.Group = *group
return sendJSON(http.StatusOK, resp, w, r)
}
case "PUT":
if groupId := path.Base(r.URL.Path); groupId != "os-security-groups" {
return errNotFoundJSON
}
return errNotFound
case "DELETE":
if group, err := n.processGroupId(w, r); group != nil {
if err := n.removeSecurityGroup(group.Id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
} else if err == errNoGroupId {
return errNotFound
} else {
return err
}
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// <API key> handles the <API key> HTTP API.
func (n *Nova) <API key>(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
return errNotFoundJSON
case "POST":
if ruleId := path.Base(r.URL.Path); ruleId != "<API key>" {
return errNotFound
}
body, err := ioutil.ReadAll(r.Body)
if err != nil || len(body) == 0 {
return errBadRequest2
}
var req struct {
Rule nova.RuleInfo `json:"security_group_rule"`
}
if err = json.Unmarshal(body, &req); err != nil {
return err
}
inrule := req.Rule
group, err := n.securityGroup(inrule.ParentGroupId)
if err != nil {
return err // TODO: should be a 4XX error with details
}
for _, r := range group.Rules {
// TODO: this logic is actually wrong, not what nova does at all
// why are we reimplementing half of nova/api/openstack in go again?
if r.IPProtocol != nil && *r.IPProtocol == inrule.IPProtocol &&
r.FromPort != nil && *r.FromPort == inrule.FromPort &&
r.ToPort != nil && *r.ToPort == inrule.ToPort {
// TODO: Use a proper helper and sane error type
return &errorResponse{
http.StatusBadRequest,
fmt.Sprintf(`{"badRequest": {"message": "This rule already exists in group %d", "code": 400}}`, group.Id),
"application/json; charset=UTF-8",
"rule already exists",
nil,
nil,
}
}
}
n.nextRuleId++
nextId := n.nextRuleId
err = n.<API key>(nextId, req.Rule)
if err != nil {
return err
}
rule, err := n.securityGroupRule(nextId)
if err != nil {
return err
}
var resp struct {
Rule nova.SecurityGroupRule `json:"security_group_rule"`
}
resp.Rule = *rule
return sendJSON(http.StatusOK, resp, w, r)
case "PUT":
if ruleId := path.Base(r.URL.Path); ruleId != "<API key>" {
return errNotFoundJSON
}
return errNotFound
case "DELETE":
if ruleId := path.Base(r.URL.Path); ruleId != "<API key>" {
id, err := strconv.Atoi(ruleId)
if err != nil {
// weird, but this is how nova responds
return errBadRequestSG
}
if _, err = n.securityGroupRule(id); err != nil {
return errNotFoundJSONSGR
}
if err = n.<API key>(id); err != nil {
return err
}
writeResponse(w, http.StatusAccepted, nil)
return nil
}
return errNotFound
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// handleFloatingIPs handles the os-floating-ips HTTP API.
func (n *Nova) handleFloatingIPs(w http.ResponseWriter, r *http.Request) error {
switch r.Method {
case "GET":
if ipId := path.Base(r.URL.Path); ipId != "os-floating-ips" {
nId, err := strconv.Atoi(ipId)
if err != nil {
return errNotFoundJSON
}
fip, err := n.floatingIP(nId)
if err != nil {
return errNotFoundJSON
}
resp := struct {
IP nova.FloatingIP `json:"floating_ip"`
}{*fip}
return sendJSON(http.StatusOK, resp, w, r)
}
fips := n.allFloatingIPs()
if len(fips) == 0 {
fips = []nova.FloatingIP{}
}
resp := struct {
IPs []nova.FloatingIP `json:"floating_ips"`
}{fips}
return sendJSON(http.StatusOK, resp, w, r)
case "POST":
if ipId := path.Base(r.URL.Path); ipId != "os-floating-ips" {
return errNotFound
}
n.nextIPId++
nextId := n.nextIPId
addr := fmt.Sprintf("10.0.0.%d", nextId)
fip := nova.FloatingIP{Id: nextId, IP: addr, Pool: "nova"}
err := n.addFloatingIP(fip)
if err != nil {
return err
}
resp := struct {
IP nova.FloatingIP `json:"floating_ip"`
}{fip}
return sendJSON(http.StatusOK, resp, w, r)
case "PUT":
if ipId := path.Base(r.URL.Path); ipId != "os-floating-ips" {
return errNotFoundJSON
}
return errNotFound
case "DELETE":
if ipId := path.Base(r.URL.Path); ipId != "os-floating-ips" {
if nId, err := strconv.Atoi(ipId); err == nil {
if err := n.removeFloatingIP(nId); err == nil {
writeResponse(w, http.StatusAccepted, nil)
return nil
}
}
return errNotFoundJSON
}
return errNotFound
}
return fmt.Errorf("unknown request method %q for %s", r.Method, r.URL.Path)
}
// setupHTTP attaches all the needed handlers to provide the HTTP API.
func (n *Nova) SetupHTTP(mux *http.ServeMux) {
handlers := map[string]http.Handler{
"/": n.handler((*Nova).handleRoot),
"/$v/": errBadRequest,
"/$v/$t/": errNotFound,
"/$v/$t/flavors": n.handler((*Nova).handleFlavors),
"/$v/$t/flavors/detail": n.handler((*Nova).handleFlavorsDetail),
"/$v/$t/servers": n.handler((*Nova).handleServers),
"/$v/$t/servers/detail": n.handler((*Nova).handleServersDetail),
"/$v/$t/os-security-groups": n.handler((*Nova).<API key>),
"/$v/$t/<API key>": n.handler((*Nova).<API key>),
"/$v/$t/os-floating-ips": n.handler((*Nova).handleFloatingIPs),
}
for path, h := range handlers {
path = strings.Replace(path, "$v", n.VersionPath, 1)
path = strings.Replace(path, "$t", n.TenantId, 1)
if !strings.HasSuffix(path, "/") {
mux.Handle(path+"/", h)
}
mux.Handle(path, h)
}
} |
<?php
namespace Ftm\PlayerBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Server
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Ftm\PlayerBundle\Entity\ServerRepository")
*/
class Server
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="Name", type="string", length=255)
*/
private $name;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Server
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
} |
module LogicCode
( HuffmanNode,
truthTable,
grayCode,
huffmanCode
) where
data HuffmanNode a = Empty | Leaf (a, Int) | Branch Int (HuffmanNode a) (HuffmanNode a)
--Problem 46 - 49: Problem 48: Truth tables for logical expressions.
--Eg: truthTable 3 (\[a, b, c] -> Logical expr involving a, b, and c)
truthTable :: Int -> ([Bool] -> Bool) -> IO ()
truthTable n fn = printTable $ map (\x -> x ++ [fn x]) (cart n [True, False]) where
printTable :: [[Bool]] -> IO ()
printTable = mapM_ (putStrLn . concatMap showSpace) where
showSpace :: Bool -> String
showSpace True = show True ++ " "
showSpace False = show False ++ " "
cart :: Int -> [a] -> [[a]]
cart 1 xs = foldr (\x acc -> [x] : acc) [] xs
cart l xs = [ x ++ y | x <- cart 1 xs, y <- cart (l - 1) xs]
--Problem 49: Gray codes.
--An n-bit Gray code is a sequence of n-bit strings constructed according to certain rules; for example,
--n = 1: C(1) = ['0','1'].
--n = 2: C(2) = ['00','01','11','10'].
--n = 3: C(3) = ['000','001','011','010',´110´,´111´,´101´,´100´].
grayCode :: Int -> [String]
grayCode 1 = ["0", "1"]
grayCode n = map ('0':) (grayCode $ n - 1) ++ (map ('1':) $ reverse $ grayCode (n - 1))
--Problem 50: Huffman Codes.
--Generate a Huffman code list from a given list of alphabets and their frequencies.
huffmanCode :: (Ord a) => [(a, Int)] -> [(a, String)]
huffmanCode ls = sort' $ process "" $ makeTree $ sort $ turnLeaf ls where
sort :: [HuffmanNode a] -> [HuffmanNode a]
sort [] = []
sort (x : xs) =
let smallerSorted = sort [a | a <- xs, snd' a <= snd' x]
biggerSorted = sort [a | a <- xs, snd' a > snd' x]
in smallerSorted ++ [x] ++ biggerSorted
turnLeaf :: [(a, Int)] -> [HuffmanNode a]
turnLeaf = map Leaf
makeTree :: [HuffmanNode a] -> HuffmanNode a
makeTree [tr] = tr
makeTree (m : n : ys) = makeTree $ sort $ Branch (snd' m + snd' n) m n : ys
process :: String -> HuffmanNode a -> [(a, String)]
process _ Empty = []
process str (Leaf (e, _)) = [(e, str)]
process str (Branch _ ltr rtr) = process (str ++ "0") ltr ++ process (str ++ "1") rtr
snd' :: HuffmanNode a -> Int
snd' (Leaf (_, n)) = n
snd' (Branch n _ _) = n
sort' :: (Ord a) => [(a, String)] -> [(a, String)]
sort' [] = []
sort' (x : xs) =
let smallerSorted = sort' [a | a <- xs, fst a <= fst x]
biggerSorted = sort' [a | a <- xs, fst x < fst a]
in smallerSorted ++ [x] ++ biggerSorted |
<?php
namespace Payever\Bundle\ApiBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class PayeverApiBundle extends Bundle
{
} |
#include "AsioLibWrapper.h"
#include "ASIOOutput.h"
#include "AudioPlayer.h"
#include "AudioFormat.h"
#include "AudioBufferList.h"
#include "Logger.h"
namespace {
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
// Possible event queue event types
enum eMessageQueueEvents : uint32_t {
<API key> = 'stop',
<API key> = 'rest',
<API key> = 'ovld'
};
// Convert ASIOSampleType into an AudioFormat
SFB::Audio::AudioFormat <API key>(ASIOSampleType sampleType)
{
SFB::Audio::AudioFormat result;
switch (sampleType) {
// 16 bit samples
case ASIOSTInt16LSB:
case ASIOSTInt16MSB:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key> | <API key>;
result.mBitsPerChannel = 16;
result.mBytesPerPacket = (result.mBitsPerChannel / 8);
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// 24 bit samples
case ASIOSTInt24LSB:
case ASIOSTInt24MSB:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key> | <API key>;
result.mBitsPerChannel = 24;
result.mBytesPerPacket = (result.mBitsPerChannel / 8);
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// 32 bit samples
case ASIOSTInt32LSB:
case ASIOSTInt32MSB:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key> | <API key>;
result.mBitsPerChannel = 32;
result.mBytesPerPacket = (result.mBitsPerChannel / 8);
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// 32 bit float (float) samples
case ASIOSTFloat32LSB:
case ASIOSTFloat32MSB:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key> | <API key>;
result.mBitsPerChannel = 32;
result.mBytesPerPacket = (result.mBitsPerChannel / 8);
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// 64 bit float (double) samples
case ASIOSTFloat64LSB:
case ASIOSTFloat64MSB:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key> | <API key>;
result.mBitsPerChannel = 64;
result.mBytesPerPacket = (result.mBitsPerChannel / 8);
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// other bit depths aligned in 32 bits
case ASIOSTInt32LSB16:
case ASIOSTInt32MSB16:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key>;
result.mBitsPerChannel = 16;
result.mBytesPerPacket = 4;
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
case ASIOSTInt32LSB18:
case ASIOSTInt32MSB18:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key>;
result.mBitsPerChannel = 18;
result.mBytesPerPacket = 4;
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
case ASIOSTInt32LSB20:
case ASIOSTInt32MSB20:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key>;
result.mBitsPerChannel = 20;
result.mBytesPerPacket = 4;
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
case ASIOSTInt32LSB24:
case ASIOSTInt32MSB24:
result.mFormatID = <API key>;
result.mFormatFlags = <API key> | <API key>;
result.mBitsPerChannel = 24;
result.mBytesPerPacket = 4;
result.mFramesPerPacket = 1;
result.mBytesPerFrame = result.mBytesPerPacket * result.mFramesPerPacket;
break;
// DSD
case ASIOSTDSDInt8LSB1:
case ASIOSTDSDInt8MSB1:
result.mFormatID = SFB::Audio::<API key>;
result.mFormatFlags = <API key>;
result.mBitsPerChannel = 1;
result.mBytesPerPacket = 1;
result.mFramesPerPacket = 8;
result.mBytesPerFrame = 0;
break;
case ASIOSTDSDInt8NER8:
result.mFormatID = SFB::Audio::<API key>;
result.mFormatFlags = <API key>;
result.mBitsPerChannel = 8;
result.mBytesPerPacket = 1;
result.mFramesPerPacket = 1;
result.mBytesPerFrame = 1;
break;
}
// Add big endian flag
switch (sampleType) {
case ASIOSTInt16MSB:
case ASIOSTInt24MSB:
case ASIOSTInt32MSB:
case ASIOSTFloat32MSB:
case ASIOSTFloat64MSB:
case ASIOSTInt32MSB16:
case ASIOSTInt32MSB18:
case ASIOSTInt32MSB20:
case ASIOSTInt32MSB24:
case ASIOSTDSDInt8MSB1:
result.mFormatFlags |= <API key>;
break;
}
return result;
}
const size_t kUIDLength = 1024;
// Information about an ASIO driver
struct DriverInfo
{
ASIODriverInfo mDriverInfo;
char mUID [kUIDLength];
long mInputChannelCount;
long mOutputChannelCount;
long mMinimumBufferSize;
long mMaximumBufferSize;
long <API key>;
long mBufferGranularity;
ASIOSampleType mFormat;
ASIOSampleRate mSampleRate;
bool mPostOutput;
long mInputLatency;
long mOutputLatency;
long mInputBufferCount; // becomes number of actual created input buffers
long mOutputBufferCount; // becomes number of actual created output buffers
ASIOBufferInfo *mBufferInfo;
ASIOChannelInfo *mChannelInfo;
// The above two arrays share the same indexing, as the data in them are linked together
SFB::Audio::BufferList mBufferList;
// Information from <API key>()
// data is converted to double floats for easier use, however 64 bit integer can be used, too
double mNanoseconds;
double mSamples;
double mTCSamples; // time code samples
ASIOTime mTInfo; // time info state
unsigned long mSysRefTime; // system reference time, when bufferSwitch() was called
};
// Callback prototypes
void myASIOBufferSwitch(long doubleBufferIndex, ASIOBool directProcess);
void <API key>(ASIOSampleRate sRate);
long myASIOMessage(long selector, long value, void *message, double *opt);
ASIOTime * <API key>(ASIOTime *params, long doubleBufferIndex, ASIOBool directProcess);
// Sadly ASIO requires global state
static SFB::Audio::ASIOOutput *sOutput = nullptr;
static AsioDriver *sASIO = nullptr;
static DriverInfo sDriverInfo = {{0}};
static ASIOCallbacks sCallbacks = {
.bufferSwitch = myASIOBufferSwitch,
.sampleRateDidChange = <API key>,
.asioMessage = myASIOMessage,
.<API key> = <API key>
};
// Callbacks
// Backdoor into <API key>
void myASIOBufferSwitch(long doubleBufferIndex, ASIOBool directProcess)
{
ASIOTime timeInfo = {{0}};
auto result = sASIO->getSamplePosition(&timeInfo.timeInfo.samplePosition, &timeInfo.timeInfo.systemTime);
if(ASE_OK == result)
timeInfo.timeInfo.flags = kSystemTimeValid | <API key>;
<API key>(&timeInfo, doubleBufferIndex, directProcess);
}
void <API key>(ASIOSampleRate sRate)
{
LOGGER_INFO("org.sbooth.AudioEngine.Output.ASIO", "<API key>: New sample rate " << sRate);
}
long myASIOMessage(long selector, long value, void *message, double *opt)
{
if(sOutput)
return sOutput->HandleASIOMessage(selector, value, message, opt);
return 0;
}
ASIOTime * <API key>(ASIOTime *params, long doubleBufferIndex, ASIOBool directProcess)
{
if(sOutput)
sOutput->FillASIOBuffer(doubleBufferIndex);
return nullptr;
}
}
const CFStringRef SFB::Audio::ASIOOutput::kDriverIDKey = CFSTR("ID");
const CFStringRef SFB::Audio::ASIOOutput::kDriverNumberKey = CFSTR("Number");
const CFStringRef SFB::Audio::ASIOOutput::<API key> = CFSTR("Display Name");
const CFStringRef SFB::Audio::ASIOOutput::kDriverCompanyKey = CFSTR("Company Name");
const CFStringRef SFB::Audio::ASIOOutput::kDriverFolderKey = CFSTR("Install Folder");
const CFStringRef SFB::Audio::ASIOOutput::<API key> = CFSTR("Architectures");
const CFStringRef SFB::Audio::ASIOOutput::kDriverUIDKey = CFSTR("UID");
bool SFB::Audio::ASIOOutput::IsAvailable()
{
auto count = AsioLibWrapper::GetAsioLibraryList(nullptr, 0);
return 0 < count;
}
CFArrayRef SFB::Audio::ASIOOutput::<API key>()
{
unsigned int count = (unsigned int)AsioLibWrapper::GetAsioLibraryList(nullptr, 0);
if(0 == count) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to load ASIO library list");
return nullptr;
}
AsioLibInfo buffer [count];
count = (unsigned int)AsioLibWrapper::GetAsioLibraryList(buffer, (unsigned int)count);
if(0 == count) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to load ASIO library list");
return nullptr;
}
CFMutableArray driverInfoArray = <API key>(kCFAllocatorDefault, 0, &<API key>);
if(!driverInfoArray)
return nullptr;
for(unsigned int i = 0; i < count; ++i) {
CFMutableDictionary driverDictionary = <API key>(kCFAllocatorDefault, 0, &<API key>, &<API key>);
if(!driverDictionary)
continue;
CFString str = <API key>(kCFAllocatorDefault, buffer[i].Id, <API key>);
<API key>(driverDictionary, kDriverIDKey, str);
CFNumber num = CFNumberCreate(kCFAllocatorDefault, kCFNumberCharType, &buffer[i].Number);
<API key>(driverDictionary, kDriverNumberKey, num);
str = <API key>(kCFAllocatorDefault, buffer[i].DisplayName, <API key>);
<API key>(driverDictionary, <API key>, str);
str = <API key>(kCFAllocatorDefault, buffer[i].Company, <API key>);
<API key>(driverDictionary, kDriverCompanyKey, str);
str = <API key>(kCFAllocatorDefault, buffer[i].InstallFolder, <API key>);
<API key>(driverDictionary, kDriverFolderKey, str);
str = <API key>(kCFAllocatorDefault, buffer[i].Architectures, <API key>);
<API key>(driverDictionary, <API key>, str);
char deviceUID [1024];
if(buffer[i].ToCString(deviceUID, 1024, '|')) {
str = <API key>(kCFAllocatorDefault, deviceUID, <API key>);
<API key>(driverDictionary, kDriverUIDKey, str);
}
else
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to create driver UID");
CFArrayAppendValue(driverInfoArray, driverDictionary);
}
return driverInfoArray.Relinquish();
}
#pragma mark Creation and Destruction
SFB::Audio::Output::unique_ptr SFB::Audio::ASIOOutput::<API key>(CFStringRef driverUID)
{
return unique_ptr(new ASIOOutput(driverUID));
}
SFB::Audio::ASIOOutput::ASIOOutput()
: mEventQueue(new SFB::RingBuffer), mStateChangedBlock(nullptr)
{
mEventQueue->Allocate(512);
// Setup the event dispatch timer
mEventQueueTimer = <API key>(<API key>, 0, 0, <API key>(<API key>, 0));
<API key>(mEventQueueTimer, DISPATCH_TIME_NOW, NSEC_PER_SEC / 5, NSEC_PER_SEC / 3);
<API key>(mEventQueueTimer, ^{
// Process player events
while(mEventQueue-><API key>()) {
uint32_t eventCode;
auto bytesRead = mEventQueue->Read(&eventCode, sizeof(eventCode));
if(bytesRead != sizeof(eventCode)) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Error reading event from queue");
break;
}
switch(eventCode) {
case <API key>:
Stop();
break;
case <API key>:
Reset();
break;
case <API key>:
LOGGER_INFO("org.sbooth.AudioEngine.Output.ASIO", "ASIO overload");
break;
}
}
});
// Start the timer
dispatch_resume(mEventQueueTimer);
}
SFB::Audio::ASIOOutput::ASIOOutput(CFStringRef driverUID)
: ASIOOutput()
{
mDesiredDriverUID = (CFStringRef)CFRetain(driverUID);
}
SFB::Audio::ASIOOutput::~ASIOOutput()
{
dispatch_release(mEventQueueTimer);
}
#pragma mark Device Management
bool SFB::Audio::ASIOOutput::GetDeviceIOFormat(DeviceIOFormat& deviceIOFormat) const
{
ASIOIoFormat asioFormat;
auto result = sASIO->future(kAsioGetIoFormat, &asioFormat);
if(ASE_SUCCESS != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to get ASIO format: " << result);
return false;
}
switch(asioFormat.FormatType) {
case kASIOPCMFormat: deviceIOFormat = DeviceIOFormat::eDeviceIOFormatPCM; break;
case kASIODSDFormat: deviceIOFormat = DeviceIOFormat::eDeviceIOFormatDSD; break;
case kASIOFormatInvalid:
default:
return false;
}
return true;
}
bool SFB::Audio::ASIOOutput::SetDeviceIOFormat(const DeviceIOFormat& deviceIOFormat)
{
ASIOIoFormat asioFormat = {
.FormatType = DeviceIOFormat::eDeviceIOFormatPCM == deviceIOFormat ? kASIOPCMFormat : kASIODSDFormat,
.future = {0}
};
auto result = sASIO->future(kAsioSetIoFormat, &asioFormat);
if(ASE_SUCCESS != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to set ASIO format: " << result);
return false;
}
return true;
}
void SFB::Audio::ASIOOutput::<API key>(dispatch_block_t block)
{
if(mStateChangedBlock)
Block_release(mStateChangedBlock), mStateChangedBlock = nullptr;
mStateChangedBlock = Block_copy(block);
}
#pragma mark -
bool SFB::Audio::ASIOOutput::<API key>(Float64& sampleRate) const
{
auto result = sASIO->getSampleRate(&sampleRate);
if(ASE_OK != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to get sample rate: " << result);
return false;
}
return true;
}
bool SFB::Audio::ASIOOutput::<API key>(Float64 sampleRate)
{
auto result = sASIO->canSampleRate(sampleRate);
if(ASE_OK == result) {
result = sASIO->setSampleRate(sampleRate);
if(ASE_OK != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to set sample rate: " << result);
return false;
}
}
else {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Sample rate not supported: " << sampleRate);
return false;
}
return true;
}
size_t SFB::Audio::ASIOOutput::<API key>() const
{
return (size_t)sDriverInfo.<API key>;
}
#pragma mark -
bool SFB::Audio::ASIOOutput::_Open()
{
if(!CFStringGetCString(mDesiredDriverUID, sDriverInfo.mUID, kUIDLength, <API key>))
return false;
AsioLibInfo libInfo;
AsioLibInfo::FromCString(libInfo, sDriverInfo.mUID, '|');
AsioLibWrapper::UnloadLib();
if(!AsioLibWrapper::LoadLib(libInfo)) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to load ASIO library");
return false;
}
if(AsioLibWrapper::CreateInstance(libInfo.Number, &sASIO)) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to instantiate ASIO driver");
return false;
}
sDriverInfo.mDriverInfo = {
.asioVersion = 2,
.sysRef = nullptr
};
if(!sASIO->init(&sDriverInfo.mDriverInfo)){
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to init ASIO driver: " << sDriverInfo.mDriverInfo.errorMessage);
return false;
}
// Determine whether to post output notifications
if(ASE_OK == sASIO->outputReady())
sDriverInfo.mPostOutput = true;
return true;
}
bool SFB::Audio::ASIOOutput::_Close()
{
sASIO->disposeBuffers();
delete sASIO, sASIO = nullptr;
sDriverInfo.mInputBufferCount = 0;
sDriverInfo.mOutputBufferCount = 0;
if(sDriverInfo.mBufferInfo)
delete [] sDriverInfo.mBufferInfo, sDriverInfo.mBufferInfo = nullptr;
if(sDriverInfo.mChannelInfo)
delete [] sDriverInfo.mChannelInfo, sDriverInfo.mChannelInfo = nullptr;
sDriverInfo.mBufferList.Deallocate();
return true;
}
bool SFB::Audio::ASIOOutput::_Start()
{
auto result = sASIO->start();
if(ASE_OK != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "start() failed: " << result);
return false;
}
sOutput = this;
if(mStateChangedBlock)
mStateChangedBlock();
return true;
}
bool SFB::Audio::ASIOOutput::_Stop()
{
auto result = sASIO->stop();
if(ASE_OK != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "stop() failed: " << result);
return false;
}
sOutput = nullptr;
if(mStateChangedBlock)
mStateChangedBlock();
return true;
}
bool SFB::Audio::ASIOOutput::_RequestStop()
{
uint32_t event = <API key>;
mEventQueue->Write(&event, sizeof(event));
return true;
}
bool SFB::Audio::ASIOOutput::_IsOpen() const
{
return nullptr != sASIO;
}
bool SFB::Audio::ASIOOutput::_IsRunning() const
{
return nullptr != sOutput;
}
bool SFB::Audio::ASIOOutput::_Reset()
{
#if 0
if(_IsRunning() && !_Stop())
return false;
// Clean up
sASIO->disposeBuffers();
// Re-initialize the driver
if(!sASIO->init(&sDriverInfo.mDriverInfo)){
LOGGER_CRIT("org.sbooth.AudioEngine.ASIOPlayer", "Unable to init ASIO driver: " << sDriverInfo.mDriverInfo.errorMessage);
return false;
}
if(ASE_OK == sASIO->outputReady())
sDriverInfo.mPostOutput = true;
#endif
return true;
}
bool SFB::Audio::ASIOOutput::_SupportsFormat(const AudioFormat& format) const
{
return format.IsPCM() || format.IsDSD();
}
bool SFB::Audio::ASIOOutput::_SetupForDecoder(const Decoder& decoder)
{
const AudioFormat& decoderFormat = decoder.GetFormat();
if(!_SupportsFormat(decoderFormat)) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "ASIO unsupported format: " << decoderFormat);
return false;
}
bool running = _IsRunning();
if(running && !_Stop())
return false;
// Clean up existing state
sASIO->disposeBuffers();
sDriverInfo.mInputBufferCount = 0;
sDriverInfo.mOutputBufferCount = 0;
if(sDriverInfo.mBufferInfo)
delete [] sDriverInfo.mBufferInfo, sDriverInfo.mBufferInfo = nullptr;
if(sDriverInfo.mChannelInfo)
delete [] sDriverInfo.mChannelInfo, sDriverInfo.mChannelInfo = nullptr;
sDriverInfo.mBufferList.Deallocate();
// Configure the ASIO driver with the decoder's format
ASIOIoFormat asioFormat = {
.FormatType = decoderFormat.IsPCM() ? kASIOPCMFormat : decoderFormat.IsDSD() ? kASIODSDFormat : kASIOFormatInvalid,
.future = {0}
};
auto result = sASIO->future(kAsioSetIoFormat, &asioFormat);
if(ASE_SUCCESS != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to set ASIO format: " << result);
return false;
}
// Set the sample rate if supported
SetDeviceSampleRate(decoderFormat.mSampleRate);
// Store the ASIO driver format
asioFormat = {0};
result = sASIO->future(kAsioGetIoFormat, &asioFormat);
if(ASE_SUCCESS != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to get ASIO format: " << result);
return false;
}
sDriverInfo.mFormat = asioFormat.FormatType;
// if(asioFormat.FormatType != format.streamType) {
// return false;
if(!GetDeviceSampleRate(sDriverInfo.mSampleRate))
return false;
// Query available channels
result = sASIO->getChannels(&sDriverInfo.mInputChannelCount, &sDriverInfo.mOutputChannelCount);
if(ASE_OK != result) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to obtain ASIO channel count: " << result);
return false;
}
// if(0 == sDriverInfo.mOutputChannelCount) {
// LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "No available output channels");
// return false;
// FIXME: Is there a way to dynamically query the channel layout?
switch(sDriverInfo.mOutputChannelCount) {
// exaSound's ASIO drivers support stereo and 8 channel
case 2: <API key> = ChannelLayout::Stereo; break;
// case 8: <API key> = ChannelLayout::<API key>(<API key>); break;
default:
LOGGER_INFO("org.sbooth.AudioEngine.Output.ASIO", "Unknown driver channel layout");
<API key> = nullptr;
break;
}
// Get the preferred buffer size
result = sASIO->getBufferSize(&sDriverInfo.mMinimumBufferSize, &sDriverInfo.mMaximumBufferSize, &sDriverInfo.<API key>, &sDriverInfo.mBufferGranularity);
if(ASE_OK != result) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to obtain ASIO buffer size: " << result);
return false;
}
// Prepare ASIO buffers
sDriverInfo.mInputBufferCount = std::min(sDriverInfo.mInputChannelCount, 0L);
sDriverInfo.mOutputBufferCount = std::min(sDriverInfo.mOutputChannelCount, (long)decoderFormat.mChannelsPerFrame);
sDriverInfo.mBufferInfo = new ASIOBufferInfo [sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount];
sDriverInfo.mChannelInfo = new ASIOChannelInfo [sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount];
for(long channelIndex = 0; channelIndex < sDriverInfo.mInputBufferCount; ++channelIndex) {
sDriverInfo.mBufferInfo[channelIndex].isInput = ASIOTrue;
sDriverInfo.mBufferInfo[channelIndex].channelNum = channelIndex;
sDriverInfo.mBufferInfo[channelIndex].buffers[0] = sDriverInfo.mBufferInfo[channelIndex].buffers[1] = nullptr;
}
for(long channelIndex = sDriverInfo.mInputBufferCount; channelIndex < sDriverInfo.mOutputBufferCount; ++channelIndex) {
sDriverInfo.mBufferInfo[channelIndex].isInput = ASIOFalse;
sDriverInfo.mBufferInfo[channelIndex].channelNum = channelIndex;
sDriverInfo.mBufferInfo[channelIndex].buffers[0] = sDriverInfo.mBufferInfo[channelIndex].buffers[1] = nullptr;
}
// Create the buffers
result = sASIO->createBuffers(sDriverInfo.mBufferInfo, sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount, sDriverInfo.<API key>, &sCallbacks);
if(ASE_OK != result) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to create ASIO buffers: " << result);
return false;
}
// Get the buffer details, sample word length, name, word clock group and activation
for(long i = 0; i < sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount; ++i) {
sDriverInfo.mChannelInfo[i].channel = sDriverInfo.mBufferInfo[i].channelNum;
sDriverInfo.mChannelInfo[i].isInput = sDriverInfo.mBufferInfo[i].isInput;
result = sASIO->getChannelInfo(&sDriverInfo.mChannelInfo[i]);
if(ASE_OK != result) {
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to get ASIO channel information: " << result);
break;
}
}
// Get input and output latencies
if(ASE_OK == result) {
// Latencies often are only valid after ASIOCreateBuffers()
// (input latency is the age of the first sample in the currently returned audio block)
// (output latency is the time the first sample in the currently returned audio block requires to get to the output)
result = sASIO->getLatencies(&sDriverInfo.mInputLatency, &sDriverInfo.mOutputLatency);
if(ASE_OK != result)
LOGGER_ERR("org.sbooth.AudioEngine.Output.ASIO", "Unable to get ASIO latencies: " << result);
}
// Set the format to the first output channel
// FIXME: Can each channel have a separate format?
for(long i = 0; i < sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount; ++i) {
if(!sDriverInfo.mChannelInfo[i].isInput) {
AudioFormat format = <API key>(sDriverInfo.mChannelInfo[i].type);
format.mSampleRate = sDriverInfo.mSampleRate;
format.mChannelsPerFrame = decoderFormat.mChannelsPerFrame;
mFormat = format;
break;
}
}
sDriverInfo.mBufferList.Allocate(mFormat, (UInt32)sDriverInfo.<API key>);
// Set up the channel map
mChannelLayout = decoder.GetChannelLayout();
if(!mChannelLayout.MapToLayout(<API key>, mChannelMap))
mChannelMap.clear();
// Ensure the ring buffer is large enough
if(8 * sDriverInfo.<API key> > mPlayer-><API key>())
mPlayer-><API key>((uint32_t)(8 * sDriverInfo.<API key>));
if(running && !_Start())
return false;
return true;
}
bool SFB::Audio::ASIOOutput::_CreateDeviceUID(CFStringRef& deviceUID) const
{
deviceUID = <API key>(kCFAllocatorDefault, sDriverInfo.mUID, <API key>);
if(nullptr == deviceUID)
return false;
return true;
}
bool SFB::Audio::ASIOOutput::_SetDeviceUID(CFStringRef deviceUID)
{
if(!CFStringGetCString(deviceUID, sDriverInfo.mUID, kUIDLength, <API key>))
return false;
if(!_Stop() || !_Close())
return false;
AsioLibInfo libInfo;
AsioLibInfo::FromCString(libInfo, sDriverInfo.mUID, '|');
AsioLibWrapper::UnloadLib();
if(!AsioLibWrapper::LoadLib(libInfo)) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to load ASIO library");
return false;
}
if(AsioLibWrapper::CreateInstance(libInfo.Number, &sASIO)) {
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to instantiate ASIO driver");
return false;
}
sDriverInfo.mDriverInfo = {
.asioVersion = 2,
.sysRef = nullptr
};
if(!sASIO->init(&sDriverInfo.mDriverInfo)){
LOGGER_CRIT("org.sbooth.AudioEngine.Output.ASIO", "Unable to init ASIO driver: " << sDriverInfo.mDriverInfo.errorMessage);
return false;
}
// Determine whether to post output notifications
if(ASE_OK == sASIO->outputReady())
sDriverInfo.mPostOutput = true;
return true;
}
#pragma mark Callbacks
long SFB::Audio::ASIOOutput::HandleASIOMessage(long selector, long value, void *message, double *opt)
{
LOGGER_INFO("org.sbooth.AudioEngine.Output.ASIO", "HandleASIOMessage: selector = " << selector << ", value = " << value);
switch(selector) {
case <API key>:
if(value == kAsioResetRequest || value == kAsioEngineVersion || value == kAsioResyncRequest || value == <API key> || value == <API key> || value == <API key> || value == <API key>)
return 1;
break;
case kAsioResetRequest:
{
uint32_t event = <API key>;
mEventQueue->Write(&event, sizeof(event));
return 1;
}
case kAsioOverload:
{
uint32_t event = <API key>;
mEventQueue->Write(&event, sizeof(event));
return 1;
}
case kAsioResyncRequest:
case <API key>:
case <API key>:
return 1;
case kAsioEngineVersion:
return 2;
}
return 0;
}
void SFB::Audio::ASIOOutput::FillASIOBuffer(long doubleBufferIndex)
{
// Get audio from the player
sDriverInfo.mBufferList.Reset();
mPlayer->ProvideAudio(sDriverInfo.mBufferList, sDriverInfo.mBufferList.GetCapacityFrames());
// Copy the audio, channel mapping as required
for(long bufferIndex = 0, ablIndex = 0; bufferIndex < sDriverInfo.mInputBufferCount + sDriverInfo.mOutputBufferCount; ++bufferIndex) {
if(!sDriverInfo.mBufferInfo[bufferIndex].isInput) {
auto bufIndex = -1;
if(!mChannelMap.empty())
bufIndex = mChannelMap[(std::vector<SInt32>::size_type)ablIndex];
else if(ablIndex < sDriverInfo.mBufferList->mNumberBuffers)
bufIndex = (SInt32)ablIndex;
if(-1 != bufIndex) {
const AudioBuffer buf = sDriverInfo.mBufferList->mBuffers[bufIndex];
memcpy(sDriverInfo.mBufferInfo[bufferIndex].buffers[doubleBufferIndex], buf.mData, buf.mDataByteSize);
}
++ablIndex;
}
}
// If the driver supports the ASIOOutputReady() optimization, do it here, all data are in place
if(sDriverInfo.mPostOutput)
sASIO->outputReady();
} |
-- @desc
-- @author viticm
-- @date 2015-4-22 16:01:20
module("toplist_combat_t", package.seeall)
-- Mvc ...
require_ex("logic/toplist/modules/combat")
require_ex("logic/toplist/views/combat")
require_ex("logic/toplist/controllers/combat")
function new()
local toplist_combat = {}
setmetatable(toplist_combat, {__index = toplist_combat_t})
toplist_combat:init()
return toplist_combat
end
function init(self)
self.moudule_ = <API key>.new()
self.view_ = <API key>.new()
self.controller_ = <API key>.new()
self.controller_:set_core(self) -- Set core.
end
function getid(self)
return kLogicSystemID.toplist.combat;
end
function module(self)
return self.moudule_
end
function view(self)
return self.view_
end
function controller(self)
return self.controller_
end |
// Generated by class-dump 3.5 (64 bit).
#import <IDEKit/<API key>.h>
@class NSMutableArray, NSPopUpButton, NSSound;
@interface <API key> : <API key>
{
NSPopUpButton *_soundPopUpButton;
NSMutableArray *_recentSounds;
NSSound *_playingSound;
}
@property(retain) NSPopUpButton *soundPopUpButton; // @synthesize soundPopUpButton=_soundPopUpButton;
- (void).cxx_destruct;
- (void)awakeFromNib;
- (void)populatePopUpButton;
- (void)<API key>:(id)arg1;
- (void)chooseSound:(id)arg1;
- (void)selectSound:(id)arg1;
- (void)setAlert:(id)arg1;
@end |
# AppServiceOverview
Repository for sample code used in my App Service Overview presentation |
# images.hashblot.com
This app generates Hashblot images for incoming requests. |
// Package semaphore is a Go library that implements a semaphore for controlling
// the concurrency of workloads. Using a buffered channel, this package provides a
// safe way for multiple goroutines to request and return semaphore permits.
// For those not familiar with the concept of a semaphore, it allows you to control
// the access to a particular resource (or particular number of resources). A
// common use case is to limit the number of concurrent threads permitted to
// process work, to avoid overcomitting the resources of a system. More details
// (historical and applied) about semaphores can be found
// The package uses three method for working with semaphores: Acquire(),
// Release(), and Close(). Here is a quick overview of using this package:
// import "github.com/theckman/semaphore"
//
// sema, err := semaphore.New(2)
// if err != nil {
// // handle error
// for i := 0; i < 10; i++ {
// // blocks until semaphore permit is given
// // or until semaphore has Close() called
// err := sema.Acquire()
// if err != nil {
// // lock acquistion failed (i.e., semaphore is no longer usable)
// panic("semaphore in unexpected state")
// // lock acquired, spin-off work
// go func() {
// time.Sleep(time.Second * 3)
// sema.Release()
// /* wait for work to finish... */
// sema.Close()
package semaphore |
import * as Engine from "./Engine";
import * as IConnectionOptions from "./IConnectionOptions";
import * as IGenerationOptions from "./IGenerationOptions";
import * as NamingStrategy from "./NamingStrategy";
import * as Utils from "./Utils";
export { Column } from "./models/Column";
export { Entity } from "./models/Entity";
export { Index } from "./models/Index";
export { Relation } from "./models/Relation";
export { RelationId } from "./models/RelationId";
export {
Engine,
IConnectionOptions,
IGenerationOptions,
NamingStrategy,
Utils,
}; |
class Thought < ActiveRecord::Base
attr_accessor :tag_list
belongs_to :thinker, foreign_key: "thinker_id"
belongs_to :category
has_many :comments, dependent: :destroy
has_many :attendances, dependent: :destroy
has_many :thinkers, through: :attendances
has_many :thought_tags, dependent: :destroy
has_many :tags, through: :thought_tags
validates :title, presence: true, length: {minimum: 5}
validates :description, presence: true
validates :venue, presence: true
validates :location, presence: true
mount_uploader :image, ImageUploader
def self.random_thought
limit(4).order("RANDOM()")
end
def tag_list=(names)
tag_names = names.split(",").collect {|string| string.strip.downcase}.uniq
<API key> = tag_names.collect {|tag_name| Tag.find_or_create_by(name: tag_name)}
self.tags = <API key>
end
def tag_list
tags.join(", ")
end
end |
// Use of this source code is governed by a MIT-style
package user
import (
api "github.com/gigforks/go-gogs-client"
"github.com/gigforks/gogs/models"
"github.com/gigforks/gogs/modules/context"
"github.com/gigforks/gogs/modules/setting"
"github.com/gigforks/gogs/routers/api/v1/convert"
"github.com/gigforks/gogs/routers/api/v1/repo"
)
func GetUserByParamsName(ctx *context.APIContext, name string) *models.User {
user, err := models.GetUserByName(ctx.Params(name))
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetUserByName", err)
}
return nil
}
return user
}
// GetUserByParams returns user whose name is presented in URL paramenter.
func GetUserByParams(ctx *context.APIContext) *models.User {
return GetUserByParamsName(ctx, ":username")
}
func <API key>() string {
return setting.AppUrl + "api/v1/user/keys/"
}
func listPublicKeys(ctx *context.APIContext, uid int64) {
keys, err := models.ListPublicKeys(uid)
if err != nil {
ctx.Error(500, "ListPublicKeys", err)
return
}
apiLink := <API key>()
apiKeys := make([]*api.PublicKey, len(keys))
for i := range keys {
apiKeys[i] = convert.ToPublicKey(apiLink, keys[i])
}
ctx.JSON(200, &apiKeys)
}
// https://github.com/gigforks/go-gogs-client/wiki/Users-Public-Keys#<API key>
func ListMyPublicKeys(ctx *context.APIContext) {
listPublicKeys(ctx, ctx.User.Id)
}
// https://github.com/gigforks/go-gogs-client/wiki/Users-Public-Keys#<API key>
func ListPublicKeys(ctx *context.APIContext) {
user := GetUserByParams(ctx)
if ctx.Written() {
return
}
listPublicKeys(ctx, user.Id)
}
// https://github.com/gigforks/go-gogs-client/wiki/Users-Public-Keys#<API key>
func GetPublicKey(ctx *context.APIContext) {
key, err := models.GetPublicKeyByID(ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrKeyNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetPublicKeyByID", err)
}
return
}
apiLink := <API key>()
ctx.JSON(200, convert.ToPublicKey(apiLink, key))
}
// CreateUserPublicKey creates new public key to given user by ID.
func CreateUserPublicKey(ctx *context.APIContext, form api.CreateKeyOption, uid int64) {
content, err := models.<API key>(form.Key)
if err != nil {
repo.<API key>(ctx, err)
return
}
key, err := models.AddPublicKey(uid, form.Title, content)
if err != nil {
repo.HandleAddKeyError(ctx, err)
return
}
apiLink := <API key>()
ctx.JSON(201, convert.ToPublicKey(apiLink, key))
}
// https://github.com/gigforks/go-gogs-client/wiki/Users-Public-Keys#create-a-public-key
func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) {
CreateUserPublicKey(ctx, form, ctx.User.Id)
}
// https://github.com/gigforks/go-gogs-client/wiki/Users-Public-Keys#delete-a-public-key
func DeletePublicKey(ctx *context.APIContext) {
if err := models.DeletePublicKey(ctx.User, ctx.ParamsInt64(":id")); err != nil {
if models.<API key>(err) {
ctx.Error(403, "", "You do not have access to this key")
} else {
ctx.Error(500, "DeletePublicKey", err)
}
return
}
ctx.Status(204)
} |
import React from 'react';
import PubSub from 'pubsub-js';
class RadioButton extends React.Component {
constructor(props) {
super(props);
this.state = {
selectedIndex: 0
};
this.onChange = this.onChange.bind(this);
}
componentDidMount() {
}
<API key>() {
}
onChange(state) {
this.setState(state);
}
handleClick(index) {
if(this.state.selectedIndex != index){
this.setState({selectedIndex: index});
PubSub.publish(this.props.msg, index);
}
}
render() {
var tabs = this.props.tabs.map((tab, index) => {
var clickableClass;
if(index == this.state.selectedIndex)
return <li key = {index} onClick={this.handleClick.bind(this, index)} className="<API key>" id="sc_bq">{tab.name}</li>
else
return <li key = {index} onClick={this.handleClick.bind(this, index)} >{tab.name}</li>
});
return (
<ul className="label">
{tabs}
</ul>
);
}
}
export default RadioButton; |
using System.Collections.Specialized;
namespace <API key>.Adapters
{
public class <API key> : <API key><NameValueCollection>
{
public override string LookupMode
{
get { return "Key"; }
}
protected override void Add(string key, string value)
{
Collection.Add(key, value);
}
public override string Get(string key)
{
return Collection[key];
}
}
} |
import { Http } from '@angular/http';
import { RdService } from './../../services/rd.service';
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { FormGroup, FormControl, Validators } from '@angular/forms';
@Component({
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.css']
})
export class UserComponent implements OnInit {
error: string = undefined;
success: string = undefined;
canDelete = false;
selected: any;
users: Observable<any[]>;
route = '';
form = new FormGroup({
username: new FormControl('', Validators.required),
password: new FormControl('', Validators.required),
});
constructor(public USER: RdService, private http: Http) {
/**
* By default you need to supply url and model.
* Port is not required
* Methods is not required but needs to be an array of what methods to watch.
* By default all the method are true, if you supply an empty array it will turn all to false.
*/
this.USER.use({
url: 'http://localhost',
model: 'users',
port: 3000,
methods: [
'post',
'put',
'delete'
],
});
}
ngOnInit() {
/**
* By default it will load from `${this.serverUrl}/${this.model}` but you can you whatever custom route you have.
* Just pass the custom route into the load function as a string.
*/
this.users = this.USER.load();
}
changeData() {
if (!this.route) {
this.users = this.USER.load('http://localhost:3000/users?limit=1');
this.route = 'http://localhost:3000/users?limit=1';
} else {
this.users = this.USER.load();
this.route = '';
}
}
select(entry: any) {
this.canDelete = true;
this.form.controls['username'].setValue(entry.username);
this.form.controls['password'].setValue(entry.password);
this.form.controls['username'].disable();
this.form.controls['password'].disable();
this.selected = entry;
}
clear() {
this.canDelete = false;
this.selected = undefined;
this.form.reset();
this.form.controls['username'].enable();
this.form.controls['password'].enable();
}
goOnline() {
this.selected.online = true;
this.USER.put(this.selected).subscribe(res => {
this.success = 'Set Online!';
setTimeout(() => this.success = undefined, 5000);
}, error => {
error = JSON.parse(error._body);
this.error = error;
setTimeout(() => this.error = undefined, 5000);
});
}
goOffline() {
this.selected.online = false;
this.USER.put(this.selected).subscribe(res => {
this.success = 'Set Offline!';
setTimeout(() => this.success = undefined, 5000);
}, error => {
error = JSON.parse(error._body);
this.error = error;
setTimeout(() => this.error = undefined, 5000);
});
}
post() {
this.error = undefined;
this.USER.post(this.form.value).subscribe(res => {
this.success = 'Posted!';
setTimeout(() => this.success = undefined, 5000);
}, error => {
error = JSON.parse(error._body);
this.error = error;
setTimeout(() => this.error = undefined, 5000);
});
this.clear();
}
delete() {
this.USER.delete(this.selected.id).subscribe(res => {
this.success = 'Deleted!';
setTimeout(() => this.success = undefined, 5000);
}, error => {
error = JSON.parse(error._body);
this.error = error;
setTimeout(() => this.error = undefined, 5000);
});
this.clear();
}
} |
import test from 'ava';
import 'babel-core/register';
import reducer from '../src/reducer';
import { ROUTE_TO_NEXT, ROUTE_TO, MODIFY_ROUTE } from '../src/ActionTypes';
const createRouteAction = (options) => ({
type: options.type,
payload: {
replace: !!options.replace,
exit: !!options.exit,
state: options.state
},
meta: {
state: {},
_routeId: options._routeId,
routeKey: options.routeKey || options.url,
url: options.url,
location: {
href: `https://example.com${options.url}`,
origin: 'https://example.com'
}
}
});
const <API key> = (options) => createRouteAction({
type: ROUTE_TO_NEXT,
options
});
const createRouteToAction = (options) => createRouteAction({
type: ROUTE_TO,
options
});
test('initial state', t => {
const state = reducer();
t.same(state, {
current: null,
previous: null,
next: null
});
});
test('route to next', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users'
}));
t.is(state.previous, null);
t.is(state.current, null);
t.is(state.next.url, '/users');
t.is(state.next.state, null);
t.is(state.next._routeId, 1);
t.is(state.next.location.origin, 'https://example.com');
});
test('route to next with state', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users',
state: {count: 100}
}));
t.is(state.previous, null);
t.is(state.current, null);
t.is(state.next.url, '/users');
t.same(state.next.state, {count: 100});
t.is(state.next._routeId, 1);
t.is(state.next.location.origin, 'https://example.com');
});
test('route to', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users'
}));
state = reducer(state, createRouteToAction({
_routeId: 1,
url: '/users'
}));
t.is(state.previous, null);
t.is(state.next, null);
t.is(state.current.url, '/users');
t.is(state.current._routeId, 1);
t.is(state.current.location.origin, 'https://example.com');
state = reducer(state, createRouteToAction({
_routeId: 2,
url: '/users/joe'
}));
t.is(state.current.url, '/users/joe');
t.is(state.current._routeId, 2);
t.is(state.current.location.origin, 'https://example.com');
t.is(state.previous.url, '/users');
t.is(state.previous._routeId, 1);
t.is(state.previous.location.origin, 'https://example.com');
});
test('route to with state', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users',
state: {count: 100}
}));
state = reducer(state, createRouteToAction({
_routeId: 1,
url: '/users',
state: {count: 100}
}));
t.is(state.previous, null);
t.is(state.next, null);
t.is(state.current.url, '/users');
t.same(state.current.state, {count: 100});
t.is(state.current._routeId, 1);
t.is(state.current.location.origin, 'https://example.com');
state = reducer(state, createRouteToAction({
_routeId: 2,
url: '/users/joe'
}));
t.is(state.current.url, '/users/joe');
t.is(state.current.state, null);
t.is(state.current._routeId, 2);
t.is(state.current.location.origin, 'https://example.com');
t.is(state.previous.url, '/users');
t.same(state.previous.state, {count: 100});
t.is(state.previous._routeId, 1);
t.is(state.previous.location.origin, 'https://example.com');
});
test('replace', t => {
let state = reducer();
state = reducer(state, createRouteToAction({
_routeId: 1,
url: '/users'
}));
state = reducer(state, createRouteToAction({
_routeId: 2,
url: '/users/joe'
}));
state = reducer(state, createRouteToAction({
_routeId: 3,
url: '/users/joseph',
replace: true
}));
t.is(state.current.url, '/users/joseph');
t.is(state.previous.url, '/users');
});
test('put exit in state', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users',
exit: true
}));
t.true(state.next.exit);
});
test('modify with exit', t => {
let state = reducer();
state = reducer(state, <API key>({
_routeId: 1,
url: '/users'
}));
state = reducer(state, {
type: MODIFY_ROUTE,
payload: {
exit: true
}
});
t.is(state.next.url, '/users');
t.true(state.next.exit);
}); |
.PHONY: help
help: ## This help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install package for development
@pip install -r requirements-dev.txt
test:
@pytest tests/ --cov pytest_testdox --cov-report=xml
check: ## Run static code checks
@black --check .
@isort --check .
@flake8 .
clean: ## Clean cache and temporary files
@find . -name "*.pyc" | xargs rm -rf
@find . -name "*.pyo" | xargs rm -rf
@find . -name "__pycache__" -type d | xargs rm -rf
@rm -rf *.egg-info
@rm -rf dist/
@rm -rf build/ |
TODO
=
## Uncompleted
- [ ] Embed.ly integration
- [ ] Test on Medium
## Future
- [ ] Rate limit reloads (1 per sec?)
- [ ] Group gists together (by tag?, by folder?)
## Completed
- [x] Log in using GitHub (1h)
- [x] List gists for user (1h)
- [x] Download gist.
- [x] Parallelize gist download.
- [x] Deliver gist files over HTTP (with MIME types)
- [x] Implement oEmbed (http://oembed.com/)
- [x] Add TLS support.
- [x] Domain name registration
- [x] Create DigitalOcean droplet
- [x] Error reporting (Bugsnag)
- [x] CI (Drone)
- [x] Test Coverage (Coveralls)
- [x] Continuous Deployment (Drone)
- [x] Upstart service
- [x] Log management (Papertrail)
- [x] Metrics (Datadog)
- [x] Reload if accessing any .html
- [x] Unit Tests
- [x] MockGitHubClient
- [x] GitHub tests
- [x] Handler tests
- [x] UI
- [x] Home page (unauthenticated)
- [x] Dashboard (authenticated)
- [x] Visually test embeds
- [x] Add .gist-exposed class to iframe.
- [x] Favicon |
// Unit tests for the dependency injection.
// Authors:
// 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,
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
// included in all copies or substantial portions of the Software.
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// 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.
using System;
using Babuine.ComponentModel;
using NUnit.Framework;
namespace Babuine.ComponentModel.Test {
class <API key> : IAssembler {
public void AssembleComponents (Linker linker)
{
linker.WireInterface (typeof (ISecondComponent), delegate () {
return new <API key> (new FirstComponentImpl());
}, true);
linker.WireInterface (typeof (IThirdComponent), typeof (<API key>));
}
}
[TestFixture]
public class <API key> {
ObjectProvider objectProvider;
<API key> client, otherClient;
[TestFixtureSetUp]
public void FixtureSetUp ()
{
objectProvider = <API key>.<API key> (new <API key> ());
client = objectProvider.GetInjectedObject <<API key>> ();
}
[SetUp]
public void SetUp ()
{
otherClient = objectProvider.GetInjectedObject <<API key>> ();
}
[Test]
public void <API key> ()
{
Assert.IsNotNull (client.ReturnComponent ());
Assert.IsNotNull (otherClient.ReturnComponent ());
}
[Test]
public void <API key> ()
{
Assert.IsNotNull (client.ReturnComponent ().ReturnComponent ());
Assert.IsNotNull (otherClient.ReturnComponent ().ReturnComponent ());
}
[Test]
public void <API key> ()
{
Assert.IsNotNull (client.ReturnComponent ().ReturnComponent ().ReturnComponent ());
Assert.IsNotNull (otherClient.ReturnComponent ().ReturnComponent ().ReturnComponent ());
}
[Test]
public void <API key> ()
{
Assert.IsFalse (client.ReturnComponent () == otherClient.ReturnComponent ());
Assert.AreNotSame (client.ReturnComponent (), otherClient.ReturnComponent ());
}
[Test]
public void <API key> ()
{
Assert.IsTrue (client.ReturnComponent ().ReturnComponent () == otherClient.ReturnComponent ().ReturnComponent ());
Assert.AreSame (client.ReturnComponent ().ReturnComponent (), otherClient.ReturnComponent ().ReturnComponent ());
}
[Test]
public void <API key> ()
{
//Because the last level is a unique instance, the
//contained objects in the second instance are the same.
Assert.IsTrue (client.ReturnComponent ().ReturnComponent ().ReturnComponent () == otherClient.ReturnComponent ().ReturnComponent ().ReturnComponent ());
Assert.AreSame (client.ReturnComponent ().ReturnComponent ().ReturnComponent (), otherClient.ReturnComponent ().ReturnComponent ().ReturnComponent ());
}
}
} |
package ir.asparsa.hobbytaste.ui.fragment.content;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.view.*;
import ir.asparsa.android.ui.fragment.BaseFragment;
import ir.asparsa.hobbytaste.ApplicationLauncher;
import ir.asparsa.hobbytaste.R;
import ir.asparsa.hobbytaste.core.route.RouteFactory;
import ir.asparsa.hobbytaste.ui.activity.LaunchActivity;
import rx.Observer;
import javax.inject.Inject;
/**
* @author hadi
* @since 6/23/2016 AD
*/
public abstract class BaseContentFragment extends BaseFragment {
public static final String <API key> = "<API key>";
public static final String <API key> = "<API key>";
@Inject
RouteFactory mRouteFactory;
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
getArguments().putString(<API key>, setHeaderTitle());
ApplicationLauncher.mainComponent().inject(this);
}
@Nullable @Override public View onCreateView(
LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState
) {
return inflater.inflate(R.layout.content_fragment, container, false);
}
@Override public void onCreateOptionsMenu(
Menu menu,
MenuInflater inflater
) {
if (mRouteFactory.getCurrentPosition() ==
getArguments().getInt(<API key>, RouteFactory.NO_POSITION)) {
menu.clear();
}
super.onCreateOptionsMenu(menu, inflater);
}
protected abstract String setHeaderTitle();
public String getHeaderTitle() {
return getArguments().getString(<API key>, "");
}
public void setCurrentPosition(int position) {
getArguments().putInt(<API key>, position);
}
public BackState onBackPressed() {
return BackState.BACK_FRAGMENT;
}
public <API key> <API key>() {
return null;
}
public boolean hasHomeAsUp() {
return false;
}
public boolean scrollToolbar() {
return false;
}
public static abstract class <API key> implements Observer<View> {
@Override public void onCompleted() {
}
@Override public void onError(Throwable e) {
}
}
protected LaunchActivity activity() {
FragmentActivity activity = getActivity();
if (activity instanceof LaunchActivity) {
return (LaunchActivity) activity;
}
throw new RuntimeException("Activity is not launch activity");
}
public enum BackState {
CLOSE_APP,
BACK_FRAGMENT
}
protected FragmentDelegate getDelegate() {
return new FragmentDelegate() {
@Override public Bundle getArguments() {
return BaseContentFragment.this.getArguments();
}
@Override public Context getContext() {
return BaseContentFragment.this.getContext();
}
@Override public String getString(@StringRes int res) {
return BaseContentFragment.this.getString(res);
}
@Override public FragmentManager getFragmentManager() {
return BaseContentFragment.this.getFragmentManager();
}
@Override public void onEvent(
String event,
Object... data
) {
BaseContentFragment.this.onEvent(event, data);
}
};
}
protected void onEvent(
String event,
Object... data
) {
}
} |
<?php
declare(strict_types=1);
namespace MsgPhp\Eav\Tests\Infrastructure\Doctrine;
use MsgPhp\Domain\Infrastructure\Doctrine\MappingConfig;
use MsgPhp\Eav\Infrastructure\Doctrine\EavObjectMappings;
use PHPUnit\Framework\TestCase;
/**
* @internal
*/
final class <API key> extends TestCase
{
public function testMapping(): void
{
$available = array_flip(array_map(static function (string $file): string {
return 'MsgPhp\\Eav\\Model\\'.basename($file, '.php'); |
<scri
<!DOCTYPE html>
<html lang="fr" itemscope="" itemtype="http://schema.org/Blog">
<head> <script>
if (window.parent !== window) {
if (typeof btoa !== "function") {
window.btoa = function (input) {
var str = String(input);
for (var block, charCode, idx = 0, map = chars, output = ''; str.charAt(idx | 0) || (map = '=', idx % 1); output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {
charCode = str.charCodeAt(idx += 3/4)
block = block << 8 | charCode
}
return output
}
}
var re = /^(?:https?:)?(?:\/\/)?([^\/\?]+)/i
var res = re.exec(document.referrer)
var domain = res[1]
var forbidden = ["aGVsbG8ubGFuZA==","Y3Vpc2luZS5sYW5k","cmVjZXR0ZS5sYW5k","cmVjZXR0ZXMubGFuZA==",]
if (forbidden.indexOf(btoa(domain)) > -1) {
document.location = document.location.origin + "/system/noframed"
}
}
</script>
<link rel="stylesheet" href="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/css/ob-style.css?v2.35.0.0" />
<link rel="stylesheet" href="//assets.over-blog-kiwi.com/b/blog/build/soundplayer.2940b52.css" />
<!-- Forked theme from id 60 - last modified : 2017-02-23T08:01:21+01:00 -->
<!-- shortcut:[Meta] -->
<!-- title -->
<!-- Title -->
<title>529 - Le Site dont vous êtes le Héros</title>
<!-- metas description, keyword, robots -->
<!-- Metas -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="author" content="" />
<meta property="og:site_name" content="Le Site dont vous êtes le Héros" />
<meta property="og:title" content="529 - Le Site dont vous êtes le Héros" />
<meta name="twitter:title" content="529 - Le Site dont vous êtes le Héros" />
<meta name="description" content="Vous lisez à la hâte le papyrus acheté sur la place du marché de Thèbes. Les caractères a demi effaces sont presque indéchiffrables, mais vous avez à peine fini d'énoncer le sort à haute voix qu'un éclair aveuglant frappe vos deux adversaires. Les Hommes-Chats..." />
<meta property="og:description" content="Vous lisez à la hâte le papyrus acheté sur la place du marché de Thèbes. Les caractères a demi effaces sont presque indéchiffrables, mais vous avez à peine fini d'énoncer le sort à haute voix qu'un éclair aveuglant frappe vos deux adversaires. Les Hommes-Chats..." />
<meta name="<TwitterConsumerkey>" content="Vous lisez à la hâte le papyrus acheté sur la place du marché de Thèbes. Les caractères a demi effaces sont presque indéchiffrables, mais vous avez à peine fini d'énoncer le sort à haute voix qu'un éclair..." />
<meta property="og:locale" content="fr_FR" />
<meta property="og:url" content="http://<API key>.overblog.com/2014/12/529.html" />
<meta name="twitter:url" content="http://<API key>.overblog.com/2014/12/529.html" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@overblog" />
<meta name="twitter:creator" content="@" />
<meta property="fb:app_id" content="284865384904712" />
<!-- Robots -->
<meta name="robots" content="index,follow" />
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss" />
<!-- Analytics -->
<!-- shortcut:[Options] -->
</script>ll" group="shares" />
<!-- shortcut:[Includes] -->
<!-- favicon -->
<!-- Metas -->
<link rel="shortcut icon" type="image/x-icon" href="http://fdata.over-blog.net/99/00/00/01/img/favicon.ico" />
<link rel="icon" type="image/png" href="http://fdata.over-blog.net/99/00/00/01/img/favicon.png" />
<link rel="apple-touch-icon" href="http://fdata.over-blog.net/99/00/00/01/img/mobile-favicon.png" />
<!-- SEO -->
<!-- includes -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss" />
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700' rel='stylesheet' type='text/css'>
<!-- Fonts -->
<link href='http://fonts.googleapis.com/css?family=Carter+One' rel='stylesheet' type='text/css'>
<!-- Fancybox -->
<link rel="stylesheet" type="text/css" href="http://assets.over-blog-kiwi.com/themes/jquery/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<style type="text/css">
/*** RESET ***/
.clearfix:after {content: "."; display: block; height: 0; clear: both; visibility: hidden;}
.clearfix {display: inline-block;} /* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
* {margin:0; padding:0;}
body {background-color: #000; color: #fff; font-family: 'PT Sans Caption', sans-serif; font-size: 12px;}
a {text-decoration: none;}
h1,
h2,
h3,
h4,
h5,
h6 { font-weight:normal;}
img {border:none;}
.box li {list-style:none;}
#cl_1_0 ul,
#cl_1_0 ol {margin-left: 0; padding-left: 25px;}
.visuallyhidden,
.<API key> label {
position: absolute;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px; width: 1px;
margin: -1px; padding: 0; border: 0;
}
/*** General ***/
.ln {clear: both;}
#ln_2 {padding-bottom: 20px;}
.cl {float:left;}
.clear {clear:both;}
.list-title {font-size: 24px; margin: 10px 0 10px 10px; text-shadow: 1px 1px 1px #000;}
/*** Structure ***/
#cl_0_0 {margin-bottom:0; width:100%;}
#cl_1_0 {display:inline; padding:0 12px 0 0; width:630px; }
#cl_1_1 {display:inline; padding:0; width:308px;}
#cl_2_0 {margin-top: 30px; width: 100%;}
#global {margin:0px auto; width:950px;}
.header {margin: 110px 0 20px; text-align:left;}
.avatar,
#top{
display: inline-block;
vertical-align: middle;
}
.avatar{
margin-right: 10px;
}
#top .title {font-family: Carter One, cusrive; font-size: 60px; left: 0; letter-spacing: 2px; line-height: 60px; text-shadow: 0 5px 5px #333; text-transform: uppercase;}
#top .description {font-family: Carter One, cusrive; font-size:60px; font-size: 20px; letter-spacing: 2px; text-shadow: 0 2px 1px #333;}
article {margin-bottom: 35px;}
/** Article **/
.article,
.page{
background: #141414;
background: rgba(20,20,20,0.9);
border: 2px solid #333;
-moz-border-radius: 5px;
-<API key>: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
padding: 10px;
}
.noresult{
margin-bottom: 20px;
}
.beforeArticle {margin-bottom: 10px;}
.divTitreArticle .post-title,
.divPageTitle .post-title,
.special h3 {border-bottom: 1px solid; font-size: 30px; letter-spacing:2px; margin-bottom: 10px; padding-bottom:5px; word-wrap: break-word;}
.contenuArticle, .pageContent {padding-top:10px;}
.contenuArticle p,
.pageContent p .contenuArticle ol,
.contenuArticle ul {font-size: 14px; line-height: 22px; padding-bottom: 8px;}
.ob-repost {background: #222; border: 1px solid #2A2A2A; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; font-weight: bold; margin: 1em 0; text-align: center;}
.ob-repost p {font-size: 12px; line-height: normal; padding: 0;}
.ob-repost .ob-link {text-decoration: underline;}
/* Sections */
.ob-section-text,
.ob-section-images,
.ob-section-video,
.ob-section-audio,
.ob-section-quote,
.ob-secton-map {width: 600px;}
/* Medias */
.ob-video iframe,
.ob-video object,
.ob-section-images .ob-slideshow,
.ob-slideshow img, .ob-section-map .ob-map {
width: 600px;
}
.ob-video iframe{
border: 0;
}
.ob-video object {
max-height: 345px;
}
.ob-section-audio .obsoundplayer .obsoundplayername {
height: 31px;
width: 200px;
overflow: hidden;
}
/* Section texte */
.ob-text h3,
.ob-text h4,
.ob-text h5 {margin: 15px 0 5px;}
.ob-text h3 {font-size: 18px; line-height: 18px;}
.ob-text h4 {font-size: 16px; line-height: 16px;}
.ob-text h5 {font-size: 14px; font-weight: bold; line-height: 14px;}
.ob-text pre {width: 600px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -webkit-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; overflow: auto;}
/* Section image */
.ob-media-left {margin-right: 30px;}
.ob-media-right {margin-left: 30px; max-width: 100%;}
.ob-row-1-col img {width: 100%;}
.ob-row-2-col img {width: 50%; margin-top: 0; margin-bottom: 0;}
.ob-row-3-col img {width: 200px; margin-top: 0; margin-bottom: 0;}
/* Section map */
.ob-map div {color: #282924;}
/* Section HTML */
.ob-section-html iframe,
.ob-section-html embed,
.ob-section-html object {max-width: 100%;}
/* Section file */
.ob-section-file .ob-ctn {background: #222; border: none; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); display: block; max-width: 100%;}
.ob-section-file .ob-ctn a.ob-link,
.ob-section-file .ob-c a.ob-link:visited {color: #FFF; text-decoration: underline; max-width: 521px;}
.ob-section-file .ob-ctn a.ob-link:hover {color: #FFF; text-decoration: none;}
/* Section Quote */
.ob-section-quote {background: #222; border: none; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); margin-bottom: 20px; width: 100%;}
.ob-section-quote .ob-quote p {color: #FFF; min-height: 20px;}
.ob-section-quote .ob-quote p:before {color: #444; margin: 20px 0 0 -85px;}
.ob-section-quote .ob-quote p:after {color: #444; margin: 80px 0 0;}
.ob-section-quote p.ob-author,
.ob-section-quote p.ob-source {background: #444; font-size: 14px; font-style: italic; margin: 25px 0 0; max-height: 22px; max-width: 517px; overflow: hidden; padding-bottom: 0\9; position: relative; text-overflow: ellipsis; white-space: nowrap; z-index: 11;}
/* Section Link */
.ob-section-link .ob-ctn {background: #222; border: none; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);}
.ob-section-link .ob-media-left {margin: 0;}
.ob-section-link p.ob-url {background: #444; margin: 0; max-height: 20px; max-width: 395px;}
.ob-section-link p.ob-title {color: #FFF; margin-bottom: 0; margin-left: 20px;}
.ob-section-link p.ob-snippet {color: #FFF; margin-bottom: 10px; margin-left: 20px; margin-top: 0;}
.ob-section-link p.ob-title .ob-link {color: #FFF; max-height: 42px; overflow: hidden;}
.ob-section-link p.ob-snippet {margin-bottom: 35px; max-height: 40px; overflow: hidden;}
.ob-section-link .ob-img {float: left; width: 170px;}
.ob-section-link .ob-desc {margin-top: 5px;}
/* Description */
.contenuArticle .ob-desc {font-size: 13px; font-style: italic;}
/* twitter box */
.ob-section .<TwitterConsumerkey> {max-width: 100% !important;}
.ob-section .twt-border {max-width: 100% !important;}
/* Share buttons */
.afterArticle {background: #141414; border: 2px solid #333; -moz-border-radius: 5px; -<API key>: 5px; -o-border-radius: 5px; border-radius: 5px; margin: 10px 0; -moz-opacity: 0.9; -webkit-opacity: 0.9; -o-opacity: 0.9; -ms-opacity: 0.9; opacity: 0.9; padding: 9px 13px 8px; position: relative; width: 600px; z-index: 1;/* iframe Facebook */}
.share h3,
.item-comments h3 {margin-bottom: 10px; font-size: 16px; line-height: 16px;}
.google-share,
.twitter-share,
.facebook-share,
.ob-share {float: left;}
.facebook-share {width: 105px;}
.ob-share {margin-top: -2px;}
.comment-number {-moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; display: block; float: right; font-weight: bold; line-height: 17px; padding: 2px 7px; text-align: center;}
.item-comments {
}
/* Contact */
.ob-contact .ob-form {margin-bottom: 80px;}
.ob-contact .ob-form-field {margin: 5px 0 0 80px;}
.ob-label {width: 20%; font-size: 14px;}
.ob-captcha .ob-input-text{
margin-left: 20%;
}
.ob-input-submit,
.ob-error {margin-left: 31%;}
.box-content .ob-input-submit,
.box-content .ob-error {margin-left: 20%;}
.ob-input-text,
.ob-input-email,
.ob-input-textarea {padding: 6px 0; border: 2px solid #333; -moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px;}
.ob-input-submit {-moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; display: block; font-weight: bold; line-height: 17px; margin-top: 5px; padding: 2px 7px; text-align: center;}
.ob-form + a {display: block; text-align: center;}
/** Sidebar **/
.box {background: #141414; border: 2px solid #333; margin-bottom:10px; -moz-opacity: 0.9; -webkit-opacity: 0.9; -o-opacity: 0.9; -ms-opacity: 0.9; opacity: 0.9; padding:10px; -moz-border-radius: 5px; -<API key>: 5px; -o-border-radius: 5px; border-radius: 5px;}
.box{/* ie6 hack */_background:#000;}
.box-titre h3 {border-bottom: 1px solid; font-family: Carter One; font-size: 20px; letter-spacing: 1px; margin-bottom: 10px; padding-bottom: 2px; text-shadow: 1px 1px 1px black; text-transform: uppercase;}
.box-content {font-size: 14px; line-height:18px;}
.box-content strong {font-weight:normal;}
.box-footer {display:none;}
/* Sidebar > About */
.profile .avatar {float: left; margin-right: 10px;}
.profile .avatar img {background: #333; -moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; -moz-opacity: 0.8; -webkit-opacity: 0.8; -o-opacity: 0.8; -ms-opacity: 0.8; opacity: 0.8; padding: 3px; -moz-transition: opacity 300ms; -webkit-transition: opacity 300ms; -o-transition: opacity 300ms; -ms-transition: opacity 300ms; transition: opacity 300ms;}
.profile .avatar img:hover {-moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -ms-opacity: 1; opacity: 1;}
.profile .blog-owner-nickname {font-style: italic; display: block; margin-top: 10px; text-align: right;}
/* Sidebar > Search */
.search form {position:relative;}
.search form input {border: 2px solid #333; -moz-border-radius: 3px; -<API key>: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; border-radius: 3px; color: #676767; padding: 5px 0; width: 70%;}
.search form button {border: 0; -moz-border-radius: 3px; -<API key>: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; border-radius: 3px; cursor: pointer; font-weight: bold; padding: 5px 0; width: 13%;}
/* Sidebar > Subscribe */
.<API key> .ob-form-field{
display: inline-block;
}
.<API key> .ob-form-field input{
width: 170px;
}
.<API key> .ob-input-submit{
display: inline-block;
margin:0;
}
/* Sidebar > Last Posts */
.last li {float: left;}
.last ul:hover img {-moz-opacity: 0.7; -webkit-opacity: 0.7; -o-opacity: 0.7; -ms-opacity: 0.7; opacity: 0.7; -moz-transition: opacity 300ms; -webkit-transition: opacity 300ms; -o-transition: opacity 300ms; -ms-transition: opacity 300ms; transition: opacity 300ms;}
.last ul img {background: #333; -moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; margin-bottom: 5px; -moz-transition: opacity 300ms; -webkit-transition: opacity 300ms; -o-transition: opacity 300ms; -ms-transition: opacity 300ms; transition: opacity 300ms;}
.last li.left img {margin-right: 8px;}
.last ul img:hover {-moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -ms-opacity: 1; opacity: 1; -moz-transition: opacity 300ms; -webkit-transition: opacity 300ms; -o-transition: opacity 300ms; -ms-transition: opacity 300ms; transition: opacity 300ms;}
/* Sidebar > Tags */
.tags li {
border-bottom: 1px solid #222;
margin: 10px 0;
padding: 10px 0;
word-wrap:break-word;
}
.tags li a {font-size: 16px;}
.tags .number {-moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; float: right; font-weight: bold; line-height: 17px; margin-top: -2px; padding: 2px 7px; text-align: center;}
/* Sidebar > Follow me */
.follow li {-moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; display: block; float: left; height: 83px; text-indent: -9999999%; width: 83px;}
.follow li a {background: url("http://assets.over-blog-kiwi.com/themes/5/images/follow-me.png") no-repeat; display: block; height: 100%; width: 100%;}
.follow .facebook-follow {margin-right: 10px;}
.follow .facebook-follow:hover {background: #3b5999; border-color: #3b5999;}
.follow .facebook-follow a {background-position: center 18px;}
.follow .twitter-follow {margin-right: 10px;}
.follow .twitter-follow:hover {background: #04bff2; border-color: #04bff2;}
.follow .twitter-follow a {background-position: center -74px;}
.follow .rss-follow:hover {background: #ff8604; border-color: #ff8604;}
.follow .rss-follow a {background-position: center -166px;}
/* Sidebar > Archives */
.plustext {font-size: 16px;}
.arch_month {margin-left: 20px;}
.arch_month li {border-bottom: 1px solid #222; margin: 10px 0; padding: 10px 0;}
.archives .number {-moz-border-radius: 4px; -<API key>: 4px; -o-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; float: right; font-weight: bold; line-height: 17px; margin-top: -2px; padding: 2px 7px; text-align: center;}
.share > div{
float:left;
height:20px;
margin-right:28px;
}
.share .google-share{
margin-right: 0;
}
.share iframe{
border:none;
width:100px;
}
/** Pagination **/
.pagination {
margin: 30px auto 20px; width: 600px;
font-size: 14px; padding: 2px 0;
}
.pagination a {
-moz-border-radius: 4px;
-<API key>: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
border-radius: 4px;
float: right;
line-height: 17px;
margin-top: -2px;
padding: 2px 7px;
text-align: center;
text-transform: uppercase;
}
.pagination .previous {float: left;}
.pagination .next {float: right;}
.ob-pagination{
margin: 20px 0;
text-align: center;
}
.ob-page{
display: inline-block;
margin: 0 1px;
padding: 2px 7px;
}
.ob-page-link{
border-radius: 4px;
}
/** Credits **/
.credits {display: block; margin: 20px 0; text-align: center; text-shadow: 1px 1px 1px #000;}
.ob-footer{
padding-bottom: 10px;
}
body.withDisplay{
background-position: 50% 68px;
}
#cl_1_1 .ads{
margin-bottom: 10px;
padding: 2px;
-moz-opacity: 0.9;
-webkit-opacity: 0.9;
-o-opacity: 0.9;
-ms-opacity: 0.9;
opacity: 0.9;
}
.ads{
background: #141414;
border: 2px solid #333;
border-radius: 2px;
margin: 0 auto;
}
.ads-600x250{
padding: 10px;
text-align: center;
}
.ads-728x90{
height: 90px;
width: 728px;
}
.ads-468x60{
height: 60px;
width: 468px;
}
.ads-468x60 + .before_articles,
.afterArticle + .ads-468x60{
margin-top:35px;
}
.ads-300x250{
height: 250px;
width: 300px;
}
.ads-600x250 div{
float: left;
}
.ads-300{
text-align: center;
}
.ob-top-posts h2{
font-size: 35px;
}
.ob-top-article{
margin-bottom: 20px;
}
.ob-top-article h3{
line-height: normal;
}
/*** Themes ***/
/** JUNGLE **/
/* BACKGROUND */
body {background-image: url("http://img.over-blog-kiwi.com/0/24/52/97/201311/<API key>.jpg"); <API key>: fixed; background-position: center center; -<API key>: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;background-repeat: no-repeat;}
/* TOP */
#top .title a,
#top .title a:visited {color: #9bb1c5;}
#top .title a:hover,
#top .description {color: #fff;}
/* POSTS */
.beforeArticle .tags a,
.beforeArticle .tags a:visited {color: #9bb1c5;}
.beforeArticle .tags a:hover {color: #fff;}
.post-title,
.special h3 {border-bottom-color: #1e3249;}
.post-title a,
.post-title a:visited,
.special h3,
.ob-text h3,
.ob-text h4,
.ob-text h5 {color: #9bb1c5;}
.post-title a:hover {color: #fff;}
.contenuArticle a,
.contenuArticle a:visited,
.readmore a {color: #9bb1c5;}
.contenuArticle a:hover,
.readmore a:hover {color: #fff;}
/* Section file */
.ob-section-file .ob-ctn a.ob-link,
.ob-section-file .ob-c a.ob-link:visited,
.ob-section-file .ob-ctn a.ob-link:hover {color: #9bb1c5;}
/* Section Quote */
.ob-section-quote p.ob-author,
.ob-section-quote p.ob-source,
.ob-section-quote p.ob-author .ob-link,
.ob-section-quote p.ob-author .ob-link:visited,
.ob-section-quote p.ob-source .ob-link,
.ob-section-quote p.ob-source .ob-link:visited {color: #9bb1c5;}
.ob-section-quote p.ob-author:hover,
.ob-section-quote p.ob-source:hover,
.ob-section-quote p.ob-author .ob-link:hover,
.ob-section-quote p.ob-source .ob-link:hover {color: #fff;}
/* Section Link */
.ob-section-link p.ob-url ,
.ob-section-link p.ob-url .ob-link,
.ob-section-link p.ob-url .ob-link,
.ob-section-link p.ob-url .ob-link {color: #9bb1c5;}
.ob-section-link p.ob-url .ob-link:hover {color: #fff;}
/* SIDEBAR */
.box-titre h3 {border-bottom-color: #254870; color: #fff;}
.box-content strong {color:#bebebe;}
.box-content a,
.box-content a:visited,
.ob-footer a,
.ob-footer a:visited{color: #9bb1c5;}
.box-content a:hover,
.ob-footer a:hover{color: #fff;}
.archives .number,
.box-content form button,
.comment-number,
.follow li,
.ob-input-submit,
.pagination a,
.ob-page-link,
.tags .number {
background: #2e5fa4; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,<API key>/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzJlNWZhNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjY1JSIgc3RvcC1jb2xvcj0iIzIyNDA2ZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, #2e5fa4 0%, #22406d 65%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2e5fa4), color-stop(65%,#22406d)); /* Chrome,Safari4+ */
background: -<API key>(top, #2e5fa4 0%,#22406d 65%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #2e5fa4 0%,#22406d 65%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #2e5fa4 0%,#22406d 65%); /* IE10+ */
background: linear-gradient(to bottom, #2e5fa4 0%,#22406d 65%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2e5fa4', endColorstr='#22406d',GradientType=0 ); /* IE6-8 */
border: 1px solid #2d5eab; color: #fff; text-shadow: 1px 1px 1px #141414;}
.box-content form button:active,
.comment-number:active,
.ob-input-submit:active,
.pagination a:active,
.ob-page-link:active{background: #22406d; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,<API key>/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIzNSUiIHN0b3AtY29sb3I9IiMyMjQwNmQiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMmU1ZmE0IiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
background: -moz-linear-gradient(top, #22406d 35%, #2e5fa4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(35%,#22406d), color-stop(100%,#2e5fa4)); /* Chrome,Safari4+ */
background: -<API key>(top, #22406d 35%,#2e5fa4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #22406d 35%,#2e5fa4 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #22406d 35%,#2e5fa4 100%); /* IE10+ */
background: linear-gradient(to bottom, #22406d 35%,#2e5fa4 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#22406d', endColorstr='#2e5fa4',GradientType=0 ); /* IE6-8 */
}
.blog-owner-nickname {color: #254870;}
/* CREDITS */
.credits a,
.credits a:visited {color: #fff;}
.credits a:hover {color: #9bb1c5;}
</style>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/ads.js?v2.35.0.0"></script>
<script>
(function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','
ga('create', 'UA-5354236-47', {
cookieDomain: '<API key>.overblog.com',
cookieExpires: 31536000,
name: 'ob',
allowLinker: true
});
ga('ob.require', 'displayfeatures');
ga('ob.require', 'linkid', 'linkid.js');
ga('ob.set', 'anonymizeIp', true);
ga('ob.set', 'dimension1', '__ads_loaded__' in window ? '1' : '0');
ga('ob.set', 'dimension2', 'fr');
ga('ob.set', 'dimension3', 'BS');
ga('ob.set', 'dimension4', '<API key>');
ga('ob.set', 'dimension5', '1');
ga('ob.set', 'dimension6', '0');
ga('ob.set', 'dimension7', '0');
ga('ob.set', 'dimension10', '245297');
ga('ob.set', 'dimension11', '1');
ga('ob.set', 'dimension12', '1');
ga('ob.set', 'dimension13', '1');
ga('ob.send', 'pageview');
</script>
<script>
var obconnected = 0
var obconnectedblog = 0
var obtimestamp = 0
function isConnected(connected, connected_owner, timestamp) {
obconnected = connected
obconnectedblog = connected_owner
obtimestamp = timestamp
if (obconnected) {
document.querySelector('html').className += ' ob-connected'
}
if (obconnectedblog) {
document.querySelector('html').className += ' ob-connected-blog'
}
}
</script>
<script src="//connect.over-blog.com/ping/245297/isConnected"></script>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/h.js?v2.35.0.0"></script>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/repost.js?v2.35.0.0"></script>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/slideshow.js?v2.35.0.0"></script>
<script src="//assets.over-blog-kiwi.com/b/blog/build/soundplayer.2940b52.js"></script>
<script>
var OB = OB || {};
OB.isPost = true;
</script>
<script src="//assets.over-blog-kiwi.com/blog/js/index.js?v2.35.0.0"></script>
<script src="https://assets.over-blog-kiwi.com/ads/js/appconsent.bundle.min.js"></script>
<!-- DFP -->
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var useSSL = 'https:' == document.location.protocol;
var gads = document.createElement('script');
var node = document.<API key>('script')[0];
gads.async = true;
gads.type = 'text/javascript';
gads.src = (useSSL ? 'https:' : 'http:') + '
node.parentNode.insertBefore(gads, node);
})();
</script>
<!-- DFP -->
<script>
googletag.cmd.push(function() {
googletag.defineSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', [728,90], '_464554e')
.set('<API key>','#111111')
.set('<API key>','#111111')
.set('adsense_text_color','#9bb1c5')
.set('adsense_link_color','#ffffff')
.set('adsense_url_color','#9bb1c5')
.addService(googletag.pubads());
});
googletag.cmd.push(function() {
googletag.defineSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', [300,250], '_2f650b0')
.set('<API key>','#111111')
.set('<API key>','#111111')
.set('adsense_text_color','#9bb1c5')
.set('adsense_link_color','#ffffff')
.set('adsense_url_color','#9bb1c5')
.addService(googletag.pubads());
});
googletag.cmd.push(function() {
googletag.defineSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', [300,250], '_dff4bfb')
.set('<API key>','#111111')
.set('<API key>','#111111')
.set('adsense_text_color','#9bb1c5')
.set('adsense_link_color','#ffffff')
.set('adsense_url_color','#9bb1c5')
.addService(googletag.pubads());
});
googletag.cmd.push(function() {
googletag.defineSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', [[300,250],[300,600]], '_9af72f7')
.set('<API key>','#111111')
.set('<API key>','#111111')
.set('adsense_text_color','#9bb1c5')
.set('adsense_link_color','#ffffff')
.set('adsense_url_color','#9bb1c5')
.addService(googletag.pubads());
});
googletag.cmd.push(function() {
googletag.defineOutOfPageSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', '_3f54110')
.setTargeting('Slot', 'interstitial')
.setTargeting('Sliding', 'Both')
.addService(googletag.pubads());
});
googletag.cmd.push(function() {
googletag.defineOutOfPageSlot('/6783/OverBlogKiwi/fr/<API key>.overblog.com', '_6c1aebd')
.setTargeting('Slot', 'pop')
.addService(googletag.pubads());
});
</script>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogpdafront/prebid.js?v2.35.0.0" async></script>
<script>
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});
function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.<API key>();
googletag.pubads().refresh();
});
});
}
var PREBID_TIMEOUT = 2000;
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
pbjs.enableAnalytics({
provider: 'ga',
options: {
global: 'ga',
enableDistribution: false,
sampling: 0.01
}
});
pbjs.setConfig({
userSync: {
enabledBidders: ['rubicon'],
iframeEnabled: false
} ,
consentManagement: {
cmpApi: 'iab',
timeout: 2500,
<API key>: true
}
});
pbjs.bidderSettings = {
standard: {
adserverTargeting: [{
key: "hb_bidder",
val: function(bidResponse) {
return bidResponse.bidderCode;
}
}, {
key: "hb_adid",
val: function(bidResponse) {
return bidResponse.adId;
}
}, {
key: "custom_bid_price",
val: function(bidResponse) {
var cpm = bidResponse.cpm;
if (cpm < 1.00) {
return (Math.floor(cpm * 20) / 20).toFixed(2);
} else if (cpm < 5.00) {
return (Math.floor(cpm * 10) / 10).toFixed(2);
} else if (cpm < 10.00) {
return (Math.floor(cpm * 5) / 5).toFixed(2);
} else if (cpm < 20.00) {
return (Math.floor(cpm * 2) / 2).toFixed(2);
} else if (cpm < 50.00) {
return (Math.floor(cpm * 1) / 1).toFixed(2);
} else if (cpm < 100.00) {
return (Math.floor(cpm * 0.2) / 0.2).toFixed(2);
} else if (cpm < 300.00) {
return (Math.floor(cpm * 0.04) / 0.04).toFixed(2);
} else {
return '300.00';
}
}
}]
}
};
});
setTimeout(sendAdserverRequest, PREBID_TIMEOUT);
</script>
<script>
pbjs.que.push(function() {
var adUnits = [];
adUnits.push({
code: '_464554e',
sizes: [[728,90]],
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: 6542403,
},
},
{
bidder: 'rubicon',
params: {
accountId: 16072,
siteId: 119536,
zoneId: 775434,
},
},
]
})
adUnits.push({
code: '_2f650b0',
sizes: [[300,250]],
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: 6531816,
},
},
{
bidder: 'rubicon',
params: {
accountId: 16072,
siteId: 119536,
zoneId: 775488,
},
},
]
})
adUnits.push({
code: '_dff4bfb',
sizes: [[300,250]],
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: 6531817,
},
},
{
bidder: 'rubicon',
params: {
accountId: 16072,
siteId: 119536,
zoneId: 775490,
},
},
]
})
adUnits.push({
code: '_9af72f7',
sizes: [[300,250],[300,600]],
bids: [
{
bidder: 'appnexusAst',
params: {
placementId: 6542408,
},
},
{
bidder: 'rubicon',
params: {
accountId: 16072,
siteId: 119536,
zoneId: 775484,
},
},
]
})
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: function(bidResponses) {
sendAdserverRequest();
}
});
});
</script>
<script>
try {
googletag.cmd.push(function() {
// DFP Global Targeting
googletag.pubads().setTargeting('Rating', 'BS');
googletag.pubads().setTargeting('Disused', 'Yes');
googletag.pubads().setTargeting('Adult', 'No');
googletag.pubads().setTargeting('Category', '<API key>');
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
}
catch(e) {}
</script>
<!-- DFP -->
<script>
var _eStat_Whap_loaded=0;
</script>
<script src="//w.estat.com/js/whap.js"></script>
<script>
if(_eStat_Whap_loaded) {
eStatWhap.serial("800000207013");
eStatWhap.send();
}
</script>
<script src="https://cdn.tradelab.fr/tag/208269514b.js" async></script>
</head>
<body class="withDisplay" >
<div class="ob-ShareBar ob-ShareBar--dark js-ob-ShareBar">
<div class="<API key> <API key>">
<a href="https:
<img class="<API key>" src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/images/<API key>.png?v2.35.0.0" alt="Overblog">
</a>
</div>
<div class="<API key> <API key>">
<a href="
<a href="
<a href="#" data-href="#" title=" pinterest"="PINTEREST"|trans }}"" class="ob-ShareBar-share <API key> <API key>"></a>
<form action="/search" method="post" accept-charset="utf-8" class="ob-ShareBar-search">
<input type="text" name="q" value="" class="ob-ShareBar-input" placeholder="Rechercher">
<button class="ob-ShareBar-submit"></button>
</form>
<a href="https://admin.over-blog.com/write/53299637?blog=245297" class="ob-ShareBar-edit <API key>">
<span>Editer l'article</span>
</a>
<a class="<API key> <API key> ob-ShareBar-follow" href="https://admin.over-blog.com/_follow/245297" target="_blank" rel="nofollow">
Suivre ce blog
</a>
<a href="https://admin.over-blog.com/" class="ob-ShareBar-admin <API key>">
<img src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/images/lock-alt-dark.svg?v2.35.0.0" class="ob-ShareBar-lock">
<span>Administration</span>
</a>
<a href="https://connect.over-blog.com/fr/login" class="ob-ShareBar-login <API key>">
<img src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/images/lock-alt-dark.svg?v2.35.0.0" class="ob-ShareBar-lock">
<span>Connexion</span>
</a>
<a href="https://connect.over-blog.com/fr/signup" class="ob-ShareBar-create <API key>">
<span class="ob-ShareBar-plus">+</span>
<span>Créer mon blog</span>
</a>
<span class="ob-ShareBar-toggle <API key> <API key>"></span>
</div>
</div>
<div class="ob-ShareBar <API key> <API key>">
<div class="<API key>">
<span class="ob-ShareBar-toggle <API key> <API key>"></span>
</div>
</div>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/sharebar.js?v2.35.0.0"></script>
<script>
var postTitle = "529"
socialShare(document.querySelector('.<API key>'), postTitle)
socialShare(document.querySelector('.<API key>'), postTitle)
</script> <!-- Init Facebook script -->
<div id="fb-root"></div>
<div class="ads ads-728x90">
<div id='_464554e'><script>
try {
if (!window.__464554e) {
window.__464554e = true;
googletag.cmd.push(function() { googletag.display('_464554e'); });
}
} catch(e) {}
</script></div> </div>
<div id="global">
<div id="ln_0" class="ln">
<div id="cl_0_0" class="cl">
<div class="column_content">
<div class="header">
<div id="top">
<h1 class="title">
<a href="http:
</h1>
<p class="description">Lecture des livres dont vous êtes le héros</p>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="ln_1" class="ln">
<div id="cl_1_0" class="cl">
<div class="column_content">
<div>
<!-- Title -->
<!-- list posts -->
<article>
<div class="article">
<div class="option beforeArticle">
<div class="date">
Publié le
<time datetime="2014-12-04T20:30:27+01:00">4 Décembre 2014</time>
</div>
<span class="tags">
</span>
</div>
<div class="divTitreArticle">
<h2 class="post-title">
<a href="http:
529
</a>
</h2>
</div>
<div class="contenuArticle">
<div class="ob-sections">
<div class="ob-section ob-section-text">
<div class="ob-text">
<p>Vous lisez à la hâte le papyrus acheté sur la place du marché de Thèbes. Les caractères a demi effaces sont presque indéchiffrables, mais vous avez à peine fini d&
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<!-- Share buttons + comments -->
<div class="afterArticle">
<div class="clear"></div>
<!-- Pagination -->
<div class="pagination clearfix">
<a href="http:
<a href="http:
</div>
<!-- Comments -->
</div>
</article>
</div>
<div class="ads ads-600x250 clearfix">
<div id='_2f650b0'><script>
try {
if (!window.__2f650b0) {
window.__2f650b0 = true;
googletag.cmd.push(function() { googletag.display('_2f650b0'); });
}
} catch(e) {}
</script></div> <div id='_dff4bfb'><script>
try {
if (!window.__dff4bfb) {
window.__dff4bfb = true;
googletag.cmd.push(function() { googletag.display('_dff4bfb'); });
}
} catch(e) {}
</script></div> </div>
<!-- Pagination -->
</div>
</div>
<div id="cl_1_1" class="cl">
<div class="column_content">
<div class="box freeModule">
<div class="box-titre">
<h3><span></span></h3>
</div>
<div class="box-content">
<div><script src="http://h1.flashvortex.com/display.php?id=<API key>" type="text/javascript"></script></div>
</div>
</div>
<!-- Search -->
<div class="ads ads-300">
<div id='_9af72f7'><script>
try {
if (!window.__9af72f7) {
window.__9af72f7 = true;
googletag.cmd.push(function() { googletag.display('_9af72f7'); });
}
} catch(e) {}
</script></div> </div>
<!-- Navigation -->
<div class="box blogroll">
<div class="box-titre">
<h3>
<span>Liens</span>
</h3>
</div>
<div class="box-content">
<ul class="list">
<li>
<a href="http:
LISTE DES SERIES
</a>
</li>
<li>
<a href="http:
AUTRES LIVRES DONT VOUS ETES LE HEROS
</a>
</li>
</ul>
</div>
</div>
<p class="credits">
Hébergé par <a href="http:
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://assets.over-blog-kiwi.com/themes/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script>
$(document).ready(function() {
// Fancybox
$(".ob-section-images a, .ob-link-img").attr("rel", "fancybox");
$("a[rel=fancybox]").fancybox({
'overlayShow' : true,
'transitionIn' : 'fadin',
'transitionOut' : 'fadin',
'type' : 'image'
});
});
// Twitter share + tweets
!function(d,s,id){
var js, fjs = d.<API key>(s)[0];
if(!d.getElementById(id)){
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}(document,"script","twitter-wjs");
// Google + button
window.___gcfg = {lang: 'fr'};
(function() {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.<API key>('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
<script src="//assets.over-blog-kiwi.com/b/blog/bundles/overblogblogblog/js/print.js?v2.35.0.0"></script>
<script>
var postTitle = "529"
printPost(postTitle)
</script>
<div class="ob-footer" id="legals" >
<ul>
<li class="ob-footer-item"><a href="https:
<li class="ob-footer-item"><a href="/top">Top articles</a></li>
<li class="ob-footer-item"><a href="/contact">Contact</a></li>
<li class="ob-footer-item"><a href="https:
<li class="ob-footer-item"><a href="https:
<li class="ob-footer-item"><a href="https:
<li class="ob-footer-item"><a href="https:
<li class="ob-footer-item"><a href="https:
</ul>
</div>
<div id='_3f54110'><script>
googletag.cmd.push(function() { googletag.display('_3f54110'); });
</script></div><div id='_6c1aebd'><script>
googletag.cmd.push(function() { googletag.display('_6c1aebd'); });
</script></div>
<!-- End Google Tag Manager -->
<script>
dataLayer = [{
'category' : 'Literature, Comics & Poetry',
'rating' : 'BS',
'unused' : 'Yes',
'adult' : 'No',
'pda' : 'No',
'hasAds' : 'Yes',
'lang' : 'fr',
'adblock' : '__ads_loaded__' in window ? 'No' : 'Yes'
}];
</script>
<!-- Google Tag Manager -->
<noscript><iframe src="
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
googletag.cmd.push(function() {
(function(w,d,s,l,i){
w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
var f=d.<API key>(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
j.async=true;j.src='
})(window,document,'script','dataLayer','GTM-KJ6B85');
});
</script>
<!-- Begin comScore Tag -->
<script>
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "6035191" });
(function() {
var s = document.createElement("script"), el = document.<API key>("script")[0]; s.async = true;
s.src = (document.location.protocol == "https:" ? "https:
el.parentNode.insertBefore(s, el);
})();
</script>
<noscript>
<img src="http://b.scorecardresearch.com/p?c1=2&c2=6035191&cv=2.0&cj=1" />
</noscript>
<!-- End comScore Tag -->
<script>
function <API key>(){
eStatWhap.serial("800000207013");
eStatWhap.send();
}
(function() {
var myscript = document.createElement('script');
myscript.src = ('https:' == document.location.protocol ? 'https:
myscript.setAttribute('async', 'true');
var s = document.<API key>('script')[0];
s.parentNode.insertBefore(myscript, s);
})();
</script>
<script>
(function() {
var alreadyAccept = getCookie('wbCookieNotifier');
if(alreadyAccept != 1) <API key>();
window.<API key> = function() {
setCookie('wbCookieNotifier', 1, 730);
window.document.getElementById("ob-cookies").style.display = "none";
}
function <API key>(){
var el = document.createElement("div");
var bo = document.body;
el.id = "ob-cookies";
el.className = "__wads_no_click ob-cookies";
var p = document.createElement("p");
p.className = "ob-cookies-content";
p.innerHTML = "En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies. Ces derniers assurent le bon fonctionnement de nos services, d'outils d'analyse et l’affichage de publicités pertinentes. <a class='ob-cookies-link' href='https:
document.body.appendChild(el); el.appendChild(p);
window.wbCookieNotifier = el;
}
function setCookie(e,t,n,d){var r=new Date;r.setDate(r.getDate()+n);var i=escape(t)+(n==null?"":"; expires="+r.toUTCString())+(d==null?"":"; domain="+d)+";path=/";document.cookie=e+"="+i}
function getCookie(e){var t,n,r,i=document.cookie.split(";");for(t=0;t<i.length;t++){n=i[t].substr(0,i[t].indexOf("="));r=i[t].substr(i[t].indexOf("=")+1);n=n.replace(/^\s+|\s+$/g,"");if(n==e){return unescape(r)}}}
})();
</script>
</body>
</html> |
<?php
namespace AppBundle\Model;
use Avanzu\AdminThemeBundle\Model\UserInterface;
class UserModel implements UserInterface {
/**
* @var string
*/
protected $avatar;
/**
* @var string
*/
protected $username;
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $title;
/**
* @var \DateTime
*/
protected $memberSince;
protected $id;
/**
* @var bool
*/
protected $isOnline = false;
function __construct($username='', $avatar = '', $memberSince = null, $isOnline = true, $name='', $title='')
{
$this->avatar = $avatar;
$this->isOnline = $isOnline;
$this->memberSince = $memberSince ?:new \DateTime();
$this->username = $username;
$this->name = $name;
$this->title = $title;
}
/**
* @param string $avatar
*
* @return $this
*/
public function setAvatar($avatar)
{
$this->avatar = $avatar;
return $this;
}
/**
* @return string
*/
public function getAvatar()
{
return $this->avatar;
}
/**
* @param boolean $isOnline
*
* @return $this
*/
public function setIsOnline($isOnline)
{
$this->isOnline = $isOnline;
return $this;
}
/**
* @return boolean
*/
public function getIsOnline()
{
return $this->isOnline;
}
/**
* @param \DateTime $memberSince
*
* @return $this
*/
public function setMemberSince(\DateTime $memberSince)
{
$this->memberSince = $memberSince;
return $this;
}
/**
* @return \DateTime
*/
public function getMemberSince()
{
return $this->memberSince;
}
/**
* @param string $username
*
* @return $this
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* @param string $name
*
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $title
*
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @return bool
*/
public function isOnline()
{
return $this->getIsOnline();
}
public function getIdentifier() {
return $this->id;
}
/**
* Gets the value of id.
*
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* Sets the value of id.
*
* @param mixed $id the id
*
* @return self
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
} |
// inflate(@LayoutRes int resource, @Nullable ViewGroup root, boolean attachToRoot)
View view = LayoutInflater.from(context).inflate(R.layout.resource,root,flase);
XML View LayoutInflater Context.getSystemService ``PhoneLayoutInflater``.


public View inflate(XmlPullParser parser, @Nullable ViewGroup root, boolean attachToRoot) {
synchronized (mConstructorArgs) {
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "inflate");
final Context inflaterContext = mContext;
final AttributeSet attrs = Xml.asAttributeSet(parser);
Context lastContext = (Context) mConstructorArgs[0];
mConstructorArgs[0] = inflaterContext;
// resultroot
View result = root;
try {
// Look for the root node.
int type;
while ((type = parser.next()) != XmlPullParser.START_TAG &&
type != XmlPullParser.END_DOCUMENT) {
// Empty
}
if (type != XmlPullParser.START_TAG) {
throw new InflateException(parser.<API key>()
+ ": No start tag found!");
}
// FrameLayout
final String name = parser.getName();
if (DEBUG) {
System.out.println("**************************");
System.out.println("Creating root view: "
+ name);
System.out.println("**************************");
}
// TAG_MERGE merge merge
if (TAG_MERGE.equals(name)) {
// merge
if (root == null || !attachToRoot) {
throw new InflateException("<merge /> can be used only with a valid "
+ "ViewGroup root and attachToRoot=true");
}
// merge rInflate merge
//false
rInflate(parser, root, inflaterContext, attrs, false);
} else {
// Temp is the root view that was found in the xml
// createViewFromTag View
// tempxmltop view,
final View temp = createViewFromTag(root, name, inflaterContext, attrs);
//LayoutParams
ViewGroup.LayoutParams params = null;
//rootnull
if (root != null) {
if (DEBUG) {
System.out.println("Creating params from root: " +
root);
}
// Create layout params that match root, if supplied
// rootgenerateLayoutParams LayoutParamas
params = root.<API key>(attrs);
//attachToRootfalseparamsView
if (!attachToRoot) {
// Set the layout params for temp if we are not
// attaching. (If we are, we use addView, below)
temp.setLayoutParams(params);
}
}
if (DEBUG) {
System.out.println("
}
// View~~
// Inflate all children under temp against its context.
rInflateChildren(parser, temp, attrs, true);
if (DEBUG) {
System.out.println("
}
// We are supposed to attach all the views we found (int temp)
// to root. Do that now.
// rootnull attachToRoot temproot
if (root != null && attachToRoot) {
root.addView(temp, params);
}
// Decide whether to return the root that was passed in or the
// top view found in xml.
// nullfalse top view
if (root == null || !attachToRoot) {
result = temp;
}
}
} catch (<API key> e) {
InflateException ex = new InflateException(e.getMessage());
ex.initCause(e);
throw ex;
} catch (Exception e) {
InflateException ex = new InflateException(
parser.<API key>()
+ ": " + e.getMessage());
ex.initCause(e);
throw ex;
} finally {
// Don't retain static reference on context.
mConstructorArgs[0] = lastContext;
mConstructorArgs[1] = null;
}
Trace.traceEnd(Trace.TRACE_TAG_VIEW);
return result;
}
}
LayoutParamas 3
+ new
+ ViewGroup.<API key>
+ ViewGroup.<API key> addView childView LayoutParams
addView paramas
public void addView(View child) {
addView(child, -1);
}
public void addView(View child, int index) {
if (child == null) {
throw new <API key>("Cannot add a null child view to a ViewGroup");
}
LayoutParams params = child.getLayoutParams();
if (params == null) {
// params <API key>
params = <API key>();
if (params == null) {
throw new <API key>("<API key>() cannot return null");
}
}
addView(child, index, params);
}
createViewFromTag
/**
* includeinclude
* Convenience method for calling through to the five-arg createViewFromTag
* method. This method passes {@code false} for the {@code ignoreThemeAttr}
* argument and should be used for everything except {@code >include>}
* tag parsing.
*/
private View createViewFromTag(View parent, String name, Context context, AttributeSet attrs) {
return createViewFromTag(parent, name, context, attrs, false);//false
}
ignoreThemeAttrfalse
/**
* Creates a view from a tag name using the supplied attribute set.
* @param ignoreThemeAttr {@code true} to ignore the {@code android:theme}
* attribute (if set) for the view being inflated,
* {@code false} otherwise
*/
View createViewFromTag(View parent, String name, Context context, AttributeSet attrs,
boolean ignoreThemeAttr) {
if (name.equals("view")) {
name = attrs.getAttributeValue(null, "class");
}
// Apply a theme wrapper, if allowed and one is specified.
// false
if (!ignoreThemeAttr) {
final TypedArray ta = context.<API key>(attrs, ATTRS_THEME);
final int themeResId = ta.getResourceId(0, 0);
//theme context ContextThemeWrapper
if (themeResId != 0) {
context = new ContextThemeWrapper(context, themeResId);
}
ta.recycle();
}
if (name.equals(TAG_1995)) {
// Let's party like it's 1995!
return new BlinkLayout(context, attrs);
}
// View
try {
View view;
//mFactory2null mFactory2
if (mFactory2 != null) {
view = mFactory2.onCreateView(parent, name, context, attrs);
} else if (mFactory != null) {
// mFactory
view = mFactory.onCreateView(name, context, attrs);
} else {
view = null;
}
// mFactory2 mFactorynull mPrivateFactorynull
if (view == null && mPrivateFactory != null) {
view = mPrivateFactory.onCreateView(parent, name, context, attrs);
}
// factorynull viewnull
if (view == null) {
final Object lastContext = mConstructorArgs[0];
mConstructorArgs[0] = context;
try {
// . View,TextViewme.yifeiyuan.XXXLayout
if (-1 == name.indexOf('.')) {
view = onCreateView(parent, name, attrs);
} else {
// View
view = createView(name, null, attrs);
}
} finally {
mConstructorArgs[0] = lastContext;
}
}
return view;
} catch (InflateException e) {
throw e;
} catch (<API key> e) {
final InflateException ie = new InflateException(attrs.<API key>()
+ ": Error inflating class " + name);
ie.initCause(e);
throw ie;
} catch (Exception e) {
final InflateException ie = new InflateException(attrs.<API key>()
+ ": Error inflating class " + name);
ie.initCause(e);
throw ie;
}
}
createViewFromTag ViewFactoryHookView
public final View createView(String name, String prefix, AttributeSet attrs)
throws <API key>, InflateException {
Constructor<? extends View> constructor = sConstructorMap.get(name);
Class<? extends View> clazz = null;
try {
// Trace
Trace.traceBegin(Trace.TRACE_TAG_VIEW, name);
// constructor
if (constructor == null) {
// Class not found in the cache, see if it's real, and try to add it
// ViewloadClass android.View.~
clazz = mContext.getClassLoader().loadClass(
prefix != null ? (prefix + name) : name).asSubclass(View.class);
// Filter clazz
if (mFilter != null && clazz != null) {
boolean allowed = mFilter.onLoadClass(clazz);
if (!allowed) {
// failNotAllowed
failNotAllowed(name, prefix, attrs);
}
}
constructor = clazz.getConstructor(<API key>);
constructor.setAccessible(true);
sConstructorMap.put(name, constructor);
} else {
// filter
// If we have a filter, apply it to cached constructor
if (mFilter != null) {
// Have we seen this name before?
Boolean allowedState = mFilterMap.get(name);
if (allowedState == null) {
// New class -- remember whether it is allowed
clazz = mContext.getClassLoader().loadClass(
prefix != null ? (prefix + name) : name).asSubclass(View.class);
// allowed
boolean allowed = clazz != null && mFilter.onLoadClass(clazz);
mFilterMap.put(name, allowed);
if (!allowed) {
failNotAllowed(name, prefix, attrs);
}
} else if (allowedState.equals(Boolean.FALSE)) {
failNotAllowed(name, prefix, attrs);
}
}
}
// mConstructorArgscontext args
Object[] args = mConstructorArgs;
args[1] = attrs;
// view
final View view = constructor.newInstance(args);
// ViewStub LayoutInflater
if (view instanceof ViewStub) {
// Use the same context when inflating ViewStub later.
final ViewStub viewStub = (ViewStub) view;
viewStub.setLayoutInflater(cloneInContext((Context) args[0]));
}
return view;
} catch (<API key> e) {
InflateException ie = new InflateException(attrs.<API key>()
+ ": Error inflating class "
+ (prefix != null ? (prefix + name) : name));
ie.initCause(e);
throw ie;
} catch (ClassCastException e) {
// If loaded class is not a View subclass
InflateException ie = new InflateException(attrs.<API key>()
+ ": Class is not a View "
+ (prefix != null ? (prefix + name) : name));
ie.initCause(e);
throw ie;
} catch (<API key> e) {
// If loadClass fails, we should propagate the exception.
throw e;
} catch (Exception e) {
InflateException ie = new InflateException(attrs.<API key>()
+ ": Error inflating class "
+ (clazz == null ? "<unknown>" : clazz.getName()));
ie.initCause(e);
throw ie;
} finally {
Trace.traceEnd(Trace.TRACE_TAG_VIEW);
}
}
clazz = mContext.getClassLoader().loadClass(prefix != null ? (prefix + name) : name).asSubclass(View.class) View
clazz.getConstructor(<API key>);Viewconstructor.newInstance(args);View
WebView android.webkit~
LayoutInflater com.android.internal.policy.PhoneLayoutInflaterandroid.widget.android.webkit.android.app.
merge
if (TAG_MERGE.equals(name)) {
if (root == null || !attachToRoot) {
throw new InflateException("<merge /> can be used only with a valid "
+ "ViewGroup root and attachToRoot=true");
}
// rInflate false
rInflate(parser, root, inflaterContext, attrs, false);
}
rInflate
/**
* Recursive method used to descend down the xml hierarchy and instantiate
* views, instantiate their children, and then call onFinishInflate().
* <p>
* <strong>Note:</strong> Default visibility so the BridgeInflater can
* override it.
* View View, onFinishInflate
*/
void rInflate(XmlPullParser parser, View parent, Context context,
AttributeSet attrs, boolean finishInflate) throws <API key>, IOException {
final int depth = parser.getDepth();
int type;
// while parser.next XML
while (((type = parser.next()) != XmlPullParser.END_TAG ||
parser.getDepth() > depth) && type != XmlPullParser.END_DOCUMENT) {
if (type != XmlPullParser.START_TAG) {
continue;
}
final String name = parser.getName();
// requestFocus
if (TAG_REQUEST_FOCUS.equals(name)) {
parseRequestFocus(parser, parent);
} else if (TAG_TAG.equals(name)) {
// tag
parseViewTag(parser, parent, attrs);
} else if (TAG_INCLUDE.equals(name)) {
if (parser.getDepth() == 0) {
throw new InflateException("<include /> cannot be the root element");
}
// include
parseInclude(parser, context, parent, attrs);
} else if (TAG_MERGE.equals(name)) {
// merge merge
throw new InflateException("<merge /> must be the root element");
} else {
// createViewFromTag
final View view = createViewFromTag(parent, name, context, attrs);
final ViewGroup viewGroup = (ViewGroup) parent;
final ViewGroup.LayoutParams params = viewGroup.<API key>(attrs);
rInflateChildren(parser, view, attrs, true);
viewGroup.addView(view, params);
}
}
// inflate false
// rInflateChildren true
if (finishInflate) {
parent.onFinishInflate();
}
}
rInflate
+ requestFocus,parseRequestFocus
+ tag parseViewTag
+ mergemerge
else
// createViewFromTag view
// createViewFromTag
final View view = createViewFromTag(parent, name, context, attrs);
// parent inflate root
final ViewGroup viewGroup = (ViewGroup) parent;
// paramas
final ViewGroup.LayoutParams params = viewGroup.<API key>(attrs);
// rInflateChildren view true
rInflateChildren(parser, view, attrs, true);
// viewGroup addView merge
viewGroup.addView(view, params);
final void rInflateChildren(XmlPullParser parser, View parent, AttributeSet attrs,
boolean finishInflate) throws <API key>, IOException {
rInflate(parser, parent, parent.getContext(), attrs, finishInflate);
}
rInflateChildren root ViewrInflate()
mergemerge View add root Viewmerge
inflatefinishInflate falseparent.onFinishInflate();
include
private void parseInclude(XmlPullParser parser, Context context, View parent,
AttributeSet attrs) throws <API key>, IOException {
int type;
if (parent instanceof ViewGroup) {
// Apply a theme wrapper, if requested. This is sort of a weird
// edge case, since developers think the <include> overwrites
// values in the AttributeSet of the included View. So, if the
// included View has a theme attribute, we'll need to ignore it.
final TypedArray ta = context.<API key>(attrs, ATTRS_THEME);
final int themeResId = ta.getResourceId(0, 0);
final boolean hasThemeOverride = themeResId != 0;
if (hasThemeOverride) {
context = new ContextThemeWrapper(context, themeResId);
}
ta.recycle();
// If the layout is pointing to a theme attribute, we have to
// massage the value to get a resource identifier out of it.
int layout = attrs.<API key>(null, ATTR_LAYOUT, 0);
if (layout == 0) {
// layout
final String value = attrs.getAttributeValue(null, ATTR_LAYOUT);
if (value == null || value.length() <= 0) {
throw new InflateException("You must specify a layout in the"
+ " include tag: <include layout=\"@layout/layoutID\" />");
}
// Attempt to resolve the "?attr/name" string to an identifier.
layout = context.getResources().getIdentifier(value.substring(1), null, null);
}
// The layout might be referencing a theme attribute.
if (mTempValue == null) {
mTempValue = new TypedValue();
}
if (layout != 0 && context.getTheme().resolveAttribute(layout, mTempValue, true)) {
layout = mTempValue.resourceId;
}
// theme layout
if (layout == 0) {
// layout
final String value = attrs.getAttributeValue(null, ATTR_LAYOUT);
throw new InflateException("You must specify a valid layout "
+ "reference. The layout ID " + value + " is not valid.");
} else {
final XmlResourceParser childParser = context.getResources().getLayout(layout);
try {
final AttributeSet childAttrs = Xml.asAttributeSet(childParser);
while ((type = childParser.next()) != XmlPullParser.START_TAG &&
type != XmlPullParser.END_DOCUMENT) {
// Empty.
}
if (type != XmlPullParser.START_TAG) {
throw new InflateException(childParser.<API key>() +
": No start tag found!");
}
final String childName = childParser.getName();
if (TAG_MERGE.equals(childName)) {
// The <merge> tag doesn't support android:theme, so
// nothing special to do here.
rInflate(childParser, parent, context, childAttrs, false);
} else {
// inlcude topview
final View view = createViewFromTag(parent, childName,
context, childAttrs, hasThemeOverride);
final ViewGroup group = (ViewGroup) parent;
final TypedArray a = context.<API key>(
attrs, R.styleable.Include);
final int id = a.getResourceId(R.styleable.Include_id, View.NO_ID);
final int visibility = a.getInt(R.styleable.Include_visibility, -1);
a.recycle();
// We try to load the layout params set in the <include /> tag.
// If the parent can't generate layout params (ex. missing width
// or height for the framework ViewGroups, though this is not
// necessarily true of all ViewGroups) then we expect it to throw
// a runtime exception.
// We catch this exception and set localParams accordingly: true
// means we successfully loaded layout params from the <include>
// tag, false means we need to rely on the included layout params.
ViewGroup.LayoutParams params = null;
try {// include params
params = group.<API key>(attrs);
} catch (RuntimeException e) {
// Ignore, just fail over to child attrs.
}
// include topview
if (params == null) {
params = group.<API key>(childAttrs);
}
view.setLayoutParams(params);
// Inflate all children.
rInflateChildren(childParser, view, childAttrs, true);
if (id != View.NO_ID) {
view.setId(id);
}
switch (visibility) {
case 0:
view.setVisibility(View.VISIBLE);
break;
case 1:
view.setVisibility(View.INVISIBLE);
break;
case 2:
view.setVisibility(View.GONE);
break;
}
// view group
group.addView(view);
}
} finally {
childParser.close();
}
}
} else {
throw new InflateException("<include /> can only be used inside of a ViewGroup");
}
LayoutInflater.<API key>(parser);
}
parent ViewGroup,
theme layout includelayout
layout
inflate
+ createViewFromTaginclude topview
+ paramsincludeinclude topview include
+ rInflateChildrenView
+ include id visibility topview
+ topView add group include topView
<fragment
android:layout_width="match_parent"
android:layout_height="match_parent"
class="me.yifeiyuan.MainFragment"
android:tag="Main"
android:id="@+id/main"
/>
FragmentActivity

Activity LayoutInflater.Factory2

Activity LayoutInflater.setFactory Activity fragment
abstract class <API key> extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT < 11 && getLayoutInflater().getFactory() == null) {
// On pre-HC devices we need to manually install ourselves as a Factory.
// On HC and above, we are automatically installed as a private factory
getLayoutInflater().setFactory(this);
}
super.onCreate(savedInstanceState);
}
// onCreateView
@Override
public View onCreateView(String name, Context context, AttributeSet attrs) {
// <API key>
final View v = <API key>(null, name, context, attrs);
if (v == null) {
return super.onCreateView(name, context, attrs);
}
return v;
}
abstract View <API key>(View parent, String name,
Context context, AttributeSet attrs);
}
// Honeycomb
abstract class <API key> extends <API key> {
@Override
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
final View v = <API key>(parent, name, context, attrs);
if (v == null && Build.VERSION.SDK_INT >= 11) {
// If we're running on HC or above, let the super have a go
return super.onCreateView(parent, name, context, attrs);
}
return v;
}
}
// FragmentActivity onCreateView
public class FragmentActivity extends <API key>{
@Override
final View <API key>(View parent, String name, Context context,
AttributeSet attrs) {
return mFragments.onCreateView(parent, name, context, attrs);
}
}
BaseFragmentActivityDonutsetFactorydispatchFragmentsOnCreateViewonCreateView View dispatchFragmentsOnCreateView
FragmentActivity dispatchFragmentsOnCreateViewmFragments
``mFragments.onCreateView(parent, name, context, attrs);``

``FragmentManagerImpl.onCreateView``
@Override
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
if (!"fragment".equals(name)) {
return null;
}
String fname = attrs.getAttributeValue(null, "class");
TypedArray a =
context.<API key>(attrs, com.android.internal.R.styleable.Fragment);
if (fname == null) {
fname = a.getString(com.android.internal.R.styleable.Fragment_name);
}
int id = a.getResourceId(com.android.internal.R.styleable.Fragment_id, View.NO_ID);
String tag = a.getString(com.android.internal.R.styleable.Fragment_tag);
a.recycle();
int containerId = parent != null ? parent.getId() : 0;
if (containerId == View.NO_ID && id == View.NO_ID && tag == null) {
throw new <API key>(attrs.<API key>()
+ ": Must specify unique android:id, android:tag, or have a parent with"
+ " an id for " + fname);
}
// If we restored from a previous state, we may already have
// instantiated this fragment from the state and should use
// that instance instead of making a new one.
Fragment fragment = id != View.NO_ID ? findFragmentById(id) : null;
if (fragment == null && tag != null) {
fragment = findFragmentByTag(tag);
}
if (fragment == null && containerId != View.NO_ID) {
fragment = findFragmentById(containerId);
}
if (FragmentManagerImpl.DEBUG) Log.v(TAG, "onCreateView: id=0x"
+ Integer.toHexString(id) + " fname=" + fname
+ " existing=" + fragment);
if (fragment == null) {
fragment = Fragment.instantiate(context, fname);
fragment.mFromLayout = true;
fragment.mFragmentId = id != 0 ? id : containerId;
fragment.mContainerId = containerId;
fragment.mTag = tag;
fragment.mInLayout = true;
fragment.mFragmentManager = this;
fragment.mHost = mHost;
fragment.onInflate(mHost.getContext(), attrs, fragment.mSavedFragmentState);
addFragment(fragment, true);
} else if (fragment.mInLayout) {
// A fragment already exists and it is not one we restored from
// previous state.
throw new <API key>(attrs.<API key>()
+ ": Duplicate id 0x" + Integer.toHexString(id)
+ ", tag " + tag + ", or parent id 0x" + Integer.toHexString(containerId)
+ " with another fragment for " + fname);
} else {
// This fragment was retained from a previous instance; get it
// going now.
fragment.mInLayout = true;
fragment.mHost = mHost;
// If this fragment is newly instantiated (either right now, or
// from last saved state), then give it the attributes to
// initialize itself.
if (!fragment.mRetaining) {
fragment.onInflate(mHost.getContext(), attrs, fragment.mSavedFragmentState);
}
}
// If we haven't finished entering the CREATED state ourselves yet,
// push the inflated child fragment along.
if (mCurState < Fragment.CREATED && fragment.mFromLayout) {
moveToState(fragment, Fragment.CREATED, 0, 0, false);
} else {
moveToState(fragment);
}
if (fragment.mView == null) {
throw new <API key>("Fragment " + fname
+ " did not create a view.");
}
if (id != 0) {
fragment.mView.setId(id);
}
if (fragment.mView.getTag() == null) {
fragment.mView.setTag(tag);
}
return fragment.mView;
}
@Override
public View onCreateView(String name, Context context, AttributeSet attrs) {
return null;
}
xml fragment ``fragment = Fragment.instantiate(context, fname);``
View
``moveToState````onCreateView``
// # FragmentManager
void moveToState(Fragment f, int newState, int transit, int transitionStyle,boolean keepActive) {
f.mView = f.performCreateView(xxx);
}
// # Fragment
View performCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (<API key> != null) {
<API key>.noteStateNotSaved();
}
// onCreateView
return onCreateView(inflater, container, savedInstanceState);
}
FragmentManagermoveToStateFragmentperformCreateViewonCreateView
FragmentActivity setFactoryfragment FragmentManageImplonCreateView
FragmentFragment.performCreateViewonCreateView
LayoutInflater.Factory Hook View AppCompactAppCompactViewInflater Hook View
DayNight AppCompactActivityAppCompactViewInflater. |
<?php
/* TwigBundle:Exception:error.json.twig */
class <API key> extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo <API key>(array("error" => array("code" => (isset($context["status_code"]) ? $context["status_code"] : $this->getContext($context, "status_code")), "message" => (isset($context["status_text"]) ? $context["status_text"] : $this->getContext($context, "status_text")))));
echo "
";
}
public function getTemplateName()
{
return "TwigBundle:Exception:error.json.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 19 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Twig_Source("{{ { 'error': { 'code': status_code, 'message': status_text } }|json_encode|raw }}
", "TwigBundle:Exception:error.json.twig", "C:\\wamp64\\www\\tunisiehologram\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\TwigBundle/Resources/views/Exception/error.json.twig");
}
} |
package ca.jamesreeve.smarthome;
import android.util.Log;
import java.util.Observable;
import java.util.Observer;
public class DoorController implements Observer {
static Door[] doors;
MainActivity viewController;
static final DoorController buildDoorController(int n, MainActivity viewController) {
DoorController result = new DoorController(n, viewController);
for (Door door: doors) {
door.addObserver(result);
};
return result;
};
private DoorController(int n, MainActivity viewController){
doors = new Door[n];
this.viewController = viewController;
for(int i = 0; i < n; i++){
Door door = new Door(i);
doors[i] = door;
}
}
public void changeState(int id){
doors[id].changeState();
}
public Door.State getState(int id){
return doors[id].getState();
}
@Override
public void update(Observable door, Object arg) {
Log.d("doorchange", "update: door status was changed to"+arg);
// DoorController observes all instances of Door. When a change is detected,
// the view is updated
viewController.setDoorDisplay(
((Door) door).getId(),
((Door) door).getState()
);
}
} |
package com.byteowls.vaadin.chartjs.options;
public enum InteractionMode {
/**
* Finds all of the items that intersect the point
*/
POINT,
/**
* Gets the item that is nearest to the point. The nearest item is determined based on the distance to the center of the chart item (point, bar).
* If 2 or more items are at the same distance, the one with the smallest area is used.
* If intersect is true, this is only triggered when the mouse position intersects an item in the graph.
* This is very useful for combo charts where points are hidden behind bars.
*/
NEAREST,
/**
* Finds item at the same index.
* If the intersect setting is true, the first intersecting item is used to determine the index in the data.
* If intersect false the nearest item is used to determine the index.
*/
INDEX,
/**
* Finds items in the same dataset. If the intersect setting is true, the first intersecting item is used to determine the index in the data.
* If intersect false the nearest item is used to determine the index.
*/
DATASET,
/**
* Returns all items that would intersect based on the X coordinate of the position only.
* Would be useful for a vertical cursor implementation. Note that this only applies to cartesian charts
*/
X,
/**
* Returns all items that would intersect based on the Y coordinate of the position.
* This would be useful for a horizontal cursor implementation. Note that this only applies to cartesian charts.
*/
Y
} |
from .scholar import * |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.