text
stringlengths 3
1.05M
|
|---|
from flask import Flask
def create_app(**config_overrides):
app = Flask(__name__)
app.config.from_pyfile('settings.py')
app.config.update(config_overrides)
from main.views import main_app
app.register_blueprint(main_app)
from stores.views import stores_app
app.register_blueprint(stores_app)
from strains.views import strains_app
app.register_blueprint(strains_app)
from auth.views import auth_app
app.register_blueprint(auth_app)
return app
|
"use strict";
const setLessonName = () => {
let header = document.getElementsByClassName('header-bar__tab--active')[0]
let lessonName = header.querySelector('.header-bar__tab-title').innerText
chrome.storage.local.set({lessonname: lessonName});
}
const getText = () => {
let selection = window.getSelection().toString();
chrome.storage.local.set({content: selection});
}
function getBlockName(e, header, name){
console.log(e.target.getAttribute('name'))
chrome.storage.local.set({blockname: header});
chrome.storage.local.set({blockid: name});
}
const addBlockListener = () => {
let section = document.getElementsByClassName('block html')
for(let i = 0; i < section.length; i++) {
let header = section[i].querySelector('h1').innerText
let name = section[i].getAttribute('name')
section[i].onclick = function(e) {
getBlockName(e, header, name)
}
section[i].onmouseup = function(e) {
getText();
}
}
}
chrome.runtime.onMessage.addListener(request => {
if (request && request.type === 'page-rendered') {
setLessonName();
}
return Promise.resolve({response: "Hi from content script"});
});
|
import React, { Component } from 'react';
import ChatRoomListItem from '../Rooms/ChatRoomListItem';
class Participant extends Component {
render() {
return (
<ChatRoomListItem src={this.props.src} message={this.props.status || "status"} name={this.props.name}/>
);
}
}
export default Participant;
|
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var projected_layer_1 = require("./projected-layer");
var classname_1 = require("./util/classname");
exports.defaultClassName = ['mapboxgl-popup'];
var Popup = (function (_super) {
__extends(Popup, _super);
function Popup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Popup.prototype.render = function () {
var _a = this.props, children = _a.children, className = _a.className;
var props = __assign({}, this.props, { children: undefined });
var childrenClassName = classname_1.getClassName(exports.defaultClassName, className);
return (React.createElement(projected_layer_1.default, __assign({}, props, { type: "popup", className: childrenClassName }),
React.createElement("div", { className: "mapboxgl-popup-tip" }),
React.createElement("div", { className: "mapboxgl-popup-content" }, children)));
};
return Popup;
}(React.Component));
exports.default = Popup;
//# sourceMappingURL=popup.js.map
|
from imagekit import ImageSpec
from imagekit.processors import Adjust
from imagekit.processors import ResizeToFill
from imagekit.processors import ResizeToFit
class GallerySlideshowImage(ImageSpec):
processors = [ResizeToFill(750, 500)]
format = 'JPEG'
options = {'quality': 30}
class GalleryCoverThumbnail(ImageSpec):
processors = [ResizeToFill(340, 250)]
format = 'JPEG'
options = {'quality': 60}
class GalleryCoverJumbotron(ImageSpec):
processors = [
ResizeToFill(940, 400),
Adjust(contrast=1.2, sharpness=2),
]
format = 'JPEG'
options = {'quality': 80}
class PortfolioThumbnail(ImageSpec):
processors = [ResizeToFill(340, 250)]
format = 'JPEG'
options = {'quality': 60}
class PortfolioItemImage(ImageSpec):
processors = [ResizeToFit(700, 500)]
format = 'JPEG'
options = {'quality': 60}
class FeedCardThumbnail(ImageSpec):
processors = [ResizeToFill(40, 40)]
format = 'JPEG'
options = {'quality': 60}
|
#ifndef _ZCEDXREF_H
#define _ZCEDXREF_H
#pragma pack (push, 8)
Zcad::ErrorStatus
zcedXrefAttach(const ZTCHAR* XrefPathname,
const ZTCHAR* XrefBlockname,
ZcDbObjectId* pXrefBTRid = NULL,
ZcDbObjectId* pXrefRefid = NULL,
const ZcGePoint3d* pXrefInsertPt = NULL,
const ZcGeScale3d* pXrefScale = NULL,
const double* pXrefRotateAngle = NULL,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL,
const wchar_t* wszPassword = NULL);
Zcad::ErrorStatus
zcedXrefOverlay(const ZTCHAR* XrefPathname,
const ZTCHAR* XrefBlockname,
ZcDbObjectId* pXrefBTRid = NULL,
ZcDbObjectId* pXrefRefid = NULL,
const ZcGePoint3d* pXrefInsertPt = NULL,
const ZcGeScale3d* pXrefScale = NULL,
const double* pXrefRotateAngle = NULL,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL,
const wchar_t* wszPassword = NULL);
Zcad::ErrorStatus
zcedXrefUnload(const ZTCHAR* XrefBlockname,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefDetach(const ZTCHAR* XrefBlockname,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefReload(const ZTCHAR* XrefBlockname,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefBind(const ZTCHAR* XrefBlockname,
const bool bInsertBind = false,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefCreateBlockname(const ZTCHAR* XrefPathname,
ZTCHAR*& XrefBlockname);
Zcad::ErrorStatus
zcedXrefReload(const ZcDbObjectIdArray& XrefBTRids,
bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefXBind(const ZcDbObjectIdArray symbolIds,
const bool bQuiet = true,
ZcDbDatabase* pHostDb = NULL);
Zcad::ErrorStatus
zcedXrefResolve(ZcDbDatabase* pHostDb, const bool bQuiet = true);
#pragma pack (pop)
#endif
|
/********************************************************************************
** Form generated from reading UI file 'EditorNameValue.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EDITORNAMEVALUE_H
#define UI_EDITORNAMEVALUE_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
QT_BEGIN_NAMESPACE
class Ui_EditorNameValue
{
public:
QGridLayout *gridLayout;
QHBoxLayout *horizontalLayout;
QLabel *label;
QLineEdit *txtName;
QComboBox *comboBox;
QHBoxLayout *horizontalLayout_7;
QLabel *lbl_info;
QSpacerItem *horizontalSpacer;
QPushButton *btnOk;
QPushButton *btnCancel;
void setupUi(QDialog *EditorNameValue)
{
if (EditorNameValue->objectName().isEmpty())
EditorNameValue->setObjectName(QString::fromUtf8("EditorNameValue"));
EditorNameValue->resize(381, 91);
gridLayout = new QGridLayout(EditorNameValue);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
horizontalLayout = new QHBoxLayout();
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setContentsMargins(6, 6, 6, 6);
label = new QLabel(EditorNameValue);
label->setObjectName(QString::fromUtf8("label"));
horizontalLayout->addWidget(label);
txtName = new QLineEdit(EditorNameValue);
txtName->setObjectName(QString::fromUtf8("txtName"));
horizontalLayout->addWidget(txtName);
comboBox = new QComboBox(EditorNameValue);
comboBox->setObjectName(QString::fromUtf8("comboBox"));
horizontalLayout->addWidget(comboBox);
gridLayout->addLayout(horizontalLayout, 0, 0, 1, 1);
horizontalLayout_7 = new QHBoxLayout();
horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
horizontalLayout_7->setContentsMargins(6, 6, 6, 6);
lbl_info = new QLabel(EditorNameValue);
lbl_info->setObjectName(QString::fromUtf8("lbl_info"));
lbl_info->setStyleSheet(QString::fromUtf8("color: rgb(255, 0, 0);"));
horizontalLayout_7->addWidget(lbl_info);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_7->addItem(horizontalSpacer);
btnOk = new QPushButton(EditorNameValue);
btnOk->setObjectName(QString::fromUtf8("btnOk"));
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(btnOk->sizePolicy().hasHeightForWidth());
btnOk->setSizePolicy(sizePolicy);
btnOk->setMaximumSize(QSize(16777215, 16777215));
horizontalLayout_7->addWidget(btnOk);
btnCancel = new QPushButton(EditorNameValue);
btnCancel->setObjectName(QString::fromUtf8("btnCancel"));
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Maximum);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(btnCancel->sizePolicy().hasHeightForWidth());
btnCancel->setSizePolicy(sizePolicy1);
btnCancel->setMaximumSize(QSize(16777215, 16777215));
horizontalLayout_7->addWidget(btnCancel);
gridLayout->addLayout(horizontalLayout_7, 1, 0, 1, 1);
retranslateUi(EditorNameValue);
QMetaObject::connectSlotsByName(EditorNameValue);
} // setupUi
void retranslateUi(QDialog *EditorNameValue)
{
EditorNameValue->setWindowTitle(QCoreApplication::translate("EditorNameValue", "Input name", nullptr));
label->setText(QCoreApplication::translate("EditorNameValue", "Name", nullptr));
lbl_info->setText(QString());
btnOk->setText(QCoreApplication::translate("EditorNameValue", "Ok", nullptr));
btnCancel->setText(QCoreApplication::translate("EditorNameValue", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class EditorNameValue: public Ui_EditorNameValue {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EDITORNAMEVALUE_H
|
void foo (int x, int c, char h);
int f(void) {
return 0;
}
int x = 3;
// int deklaracijaBezDefinicije(int x); // deklaracija bez definicije
int main(void) {
int a = 5;
const char c = 'i';
int niz[3];
void foo (int x, int c, char h);
int x = 5;
int y = x + 1;
a = a+3;
if (a > 2)
{
int a;
int b;
a = b;
x = 4;
}
return f();
}
int fact(int bzvz);
void foo (int x, int c, char h) {
int i = fact(x);
int a = a+1;
void foo3 (void);
int niz1[5] = { 1, 2, 3 };
// int niz[10] = a; // ne smije s desne strane biti niz, moze jedino biti konstantni niz
for (i = 0; i < 5; i++)
break;
while(1)
{
break;
i = i + 2;
}
// return 5; // vraca int a treba vracati void
return;
// break; // break izvan petlje
}
char proba3(void) {
x = 4; // globalni x;
if (0)
{
x = 6; // globalni x;
return 'a';
} else {
return (char)97;
// return 97; // int se ne moze implicitno u char castati
}
}
char proba(void) {
return (char)97;
}
int proba2(void) {
i = 5; // nije deklarirano
return 'a';
}
int fact(int n) {
foo(1,2,'h');
if (n > 0)
return n * fact(n-1);
else
return 1;
}
void foo3(void) {
int i = 8;
// main2(); // funkcija main2 je definirana tek kasnije, a nema deklaracije prije koja bi popravila ovu gresku
return;
}
void f2(int x, int a[]){
x = x + 1;
a[0] = a[0] + 1;
}
/*
int f2(int y) // vec postoji definicija funkcije s istim imenom
{
return 5;
}
*/
//char f2; // vec postoji funkcija s istim imenom
int main2(void) {
int x = 2147483647, y;
int a = 2147483648; // nije u rasponu int-a
(int)'a';
(const char)x;
(const int)'a';
(char)((const int)300 + (int)'a');
(int)(char)(const int)(const char)(x + y);
return 0;
}
|
#Credit: @r4v4n4
"""Emoji
Available Commands:
.fleave"""
from telethon import events
import asyncio
@borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True))
async def _(event):
if event.fwd_from:
return
animation_interval = 1
animation_ttl = range(0, 17)
input_str = event.pattern_match.group(1)
if input_str == "fleave":
await event.edit(input_str)
animation_chars = [
"⬛⬛⬛\n⬛⬛⬛\n⬛⬛⬛",
"⬛⬛⬛\n⬛🔄⬛\n⬛⬛⬛",
"⬛⬆️⬛\n⬛🔄⬛\n⬛⬛⬛",
"⬛⬆️↗️\n⬛🔄⬛\n⬛⬛⬛",
"⬛⬆️↗️\n⬛🔄➡️\n⬛⬛⬛",
"⬛⬆️↗️\n⬛🔄➡️\n⬛⬛↘️",
"⬛⬆️↗️\n⬛🔄➡️\n⬛⬇️↘️",
"⬛⬆️↗️\n⬛🔄➡️\n↙️⬇️↘️",
"⬛⬆️↗️\n⬅️🔄➡️\n↙️⬇️↘️",
"↖️⬆️↗️\n⬅️🔄➡️\n↙️⬇️↘️",
"**Chat Message Exported To** `./Inpu/`",
"**Chat Message Exported To** `./Inpu/homework/`",
"**Chat Message Exported To** `./Inpu/homework/groupchat.txt`",
"__Legend is leaving this chat.....! Gaand Marao Bc..__",
"__Legend is leaving this chat.....! Gaand Marao Bc..__"
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 17])
|
/**
* Select2 Finnish translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['fi'] = {
formatNoMatches: function () {
return "Ei tuloksia";
},
formatInputTooShort: function (input, min) {
var n = min - input.length;
return "Ole hyvä ja anna " + n + " merkkiä lisää";
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
return "Ole hyvä ja anna " + n + " merkkiä vähemmän";
},
formatSelectionTooBig: function (limit) {
return "Voit valita ainoastaan " + limit + " kpl";
},
formatLoadMore: function (pageNumber) {
return "Ladataan lisää tuloksia…";
},
formatSearching: function () {
return "Etsitään…";
}
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['fi']);
})(jQuery);
|
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
import numpy as np
import pytest
import mindspore.context as context
import mindspore.nn as nn
from mindspore import Tensor
from mindspore.common import dtype as mstype
from mindspore.ops.operations import _inner_ops as inner
from mindspore.ops import operations as P
context.set_context(device_target='GPU')
class UnsortedSegmentSumNet(nn.Cell):
def __init__(self, num_segments):
super(UnsortedSegmentSumNet, self).__init__()
self.unsorted_segment_sum = P.UnsortedSegmentSum()
self.num_segments = num_segments
def construct(self, data, ids):
return self.unsorted_segment_sum(data, ids, self.num_segments)
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_1D():
input_x = Tensor([1, 2, 3, 4], mstype.float32)
segment_ids = Tensor([0, 0, 1, 2], mstype.int32)
num_segments = 4
net = UnsortedSegmentSumNet(num_segments)
output = net(input_x, segment_ids)
expect = [3, 3, 4, 0]
assert (output.asnumpy() == expect).all()
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_2D():
input_x = Tensor([[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]], mstype.float32)
segment_ids = Tensor([2, 1, 1], mstype.int32)
num_segments = 4
net = UnsortedSegmentSumNet(num_segments)
output = net(input_x, segment_ids)
expect = [[0, 0, 0, 0],
[14, 16, 18, 20],
[1, 2, 3, 4],
[0, 0, 0, 0]]
assert (output.asnumpy() == expect).all()
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_3D():
input_x = Tensor(np.arange(4 * 5 * 3, dtype=np.float32).reshape(4, 5, 3))
segment_ids = Tensor([2, 1, 1, -1], mstype.int32)
num_segments = 5
net = UnsortedSegmentSumNet(num_segments)
output = net(input_x, segment_ids)
expect = [[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[45., 47., 49.],
[51., 53., 55.],
[57., 59., 61.],
[63., 65., 67.],
[69., 71., 73.]],
[[0., 1., 2.],
[3., 4., 5.],
[6., 7., 8.],
[9., 10., 11.],
[12., 13., 14.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]]]
assert (output.asnumpy() == expect).all()
# Testing Dynamic Shape
class UnsortedSegmentSumDynNet(nn.Cell):
def __init__(self, num_segments, dyn_a=True, dyn_b=True):
super(UnsortedSegmentSumDynNet, self).__init__()
self.unsorted_segment_sum = P.UnsortedSegmentSum()
self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape()
self.num_segments = num_segments
self.to_dyn_1 = dyn_a
self.to_dyn_2 = dyn_b
def construct(self, data, ids):
# testing selective inputs being dynamic
if self.to_dyn_1:
data = self.gpu_convert_to_dynamic_shape(data)
if self.to_dyn_2:
ids = self.gpu_convert_to_dynamic_shape(ids)
return self.unsorted_segment_sum(data, ids, self.num_segments)
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_dyn_ab():
"""
Tests for Dynamic shape with both inputs dynamic
"""
context.set_context(mode=context.GRAPH_MODE, device_target='GPU')
num_segments = 4
net = UnsortedSegmentSumDynNet(num_segments)
# test 1
input_x = Tensor([1, 2, 3, 4], mstype.float32)
segment_ids = Tensor([0, 0, 1, 2], mstype.int32)
output = net(input_x, segment_ids)
expect = [3, 3, 4, 0]
assert (output.asnumpy() == expect).all()
# test 2
input_x = Tensor([[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]], mstype.float32)
segment_ids = Tensor([2, 1, 1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[0, 0, 0, 0],
[14, 16, 18, 20],
[1, 2, 3, 4],
[0, 0, 0, 0]]
assert (output.asnumpy() == expect).all()
# test 3
input_x = Tensor(np.arange(4 * 5 * 3, dtype=np.float32).reshape(4, 5, 3))
segment_ids = Tensor([2, 1, 1, -1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[45., 47., 49.],
[51., 53., 55.],
[57., 59., 61.],
[63., 65., 67.],
[69., 71., 73.]],
[[0., 1., 2.],
[3., 4., 5.],
[6., 7., 8.],
[9., 10., 11.],
[12., 13., 14.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]]]
assert (output.asnumpy() == expect).all()
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_dyn_a():
"""
Tests for Dynamic shape with first input dynamic
"""
context.set_context(mode=context.GRAPH_MODE, device_target='GPU')
num_segments = 6
net = UnsortedSegmentSumDynNet(num_segments, True, False)
# test 1
input_x = Tensor([1, 2, 3, 4], mstype.float32)
segment_ids = Tensor([0, 0, 1, 2], mstype.int32)
output = net(input_x, segment_ids)
expect = [3, 3, 4, 0, 0, 0]
assert (output.asnumpy() == expect).all()
# test 2
input_x = Tensor([[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]], mstype.float32)
segment_ids = Tensor([2, 1, 1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[0, 0, 0, 0],
[14, 16, 18, 20],
[1, 2, 3, 4],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
assert (output.asnumpy() == expect).all()
# test 3
input_x = Tensor(np.arange(4 * 5 * 3, dtype=np.float32).reshape(4, 5, 3))
segment_ids = Tensor([2, 1, 1, -1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[45., 47., 49.],
[51., 53., 55.],
[57., 59., 61.],
[63., 65., 67.],
[69., 71., 73.]],
[[0., 1., 2.],
[3., 4., 5.],
[6., 7., 8.],
[9., 10., 11.],
[12., 13., 14.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]]]
assert (output.asnumpy() == expect).all()
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_dyn_b():
"""
Tests for Dynamic shape with second input dynamic
"""
context.set_context(mode=context.GRAPH_MODE, device_target='GPU')
num_segments = 6
net = UnsortedSegmentSumDynNet(num_segments, False, True)
# test 1
input_x = Tensor([1, 2, 3, 4], mstype.float32)
segment_ids = Tensor([0, 0, 1, 2], mstype.int32)
output = net(input_x, segment_ids)
expect = [3, 3, 4, 0, 0, 0]
assert (output.asnumpy() == expect).all()
# test 2
input_x = Tensor([[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]], mstype.float32)
segment_ids = Tensor([2, 1, 1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[0, 0, 0, 0],
[14, 16, 18, 20],
[1, 2, 3, 4],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
assert (output.asnumpy() == expect).all()
# test 3
input_x = Tensor(np.arange(4 * 5 * 3, dtype=np.float32).reshape(4, 5, 3))
segment_ids = Tensor([2, 1, 1, -1], mstype.int32)
output = net(input_x, segment_ids)
expect = [[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[45., 47., 49.],
[51., 53., 55.],
[57., 59., 61.],
[63., 65., 67.],
[69., 71., 73.]],
[[0., 1., 2.],
[3., 4., 5.],
[6., 7., 8.],
[9., 10., 11.],
[12., 13., 14.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]]]
assert (output.asnumpy() == expect).all()
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2020 Adobe Systems Incorporated
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
import {
MapTo,
Page,
withComponentMappingContext
} from '@adobe/aem-react-editable-components';
import { withRoute } from '../RouteHelper/RouteHelper';
require('./Page.css');
// This component is a variant of a Page component mapped to the
// "vivopoc/components/page" resource type. For now, the rendering is
// the same as the RootPage; this is more for illustration purposes
class AppPage extends Page {
get containerProps() {
let attrs = super.containerProps;
attrs.className =
(attrs.className || '') + ' page ' + (this.props.cssClassNames || '');
return attrs;
}
}
export default MapTo('vivopoc/components/page')(
withComponentMappingContext(withRoute(AppPage))
);
|
import React from 'react'
import { View } from 'react-sketchapp'
import headings from '../../data/headings'
import techData from '../../data/techs'
import { getDataLocale } from '../utils'
import Heading from '../components/Heading'
import Tech from '../components/Tech'
const heading = getDataLocale(headings.techs)
const techList = getDataLocale(techData)
const style = {
flexDirection: 'row',
flexWrap: 'wrap',
width: 600,
maxHeight: 355,
}
const Techs = () => (
<View name="Techs">
<Heading title={heading} />
<View style={style}>
{techList
.sort()
.map((techName, index) => <Tech key={index} name={techName} />)}
</View>
</View>
)
export default Techs
|
#FLM: AT rename (!)
from robofab.world import CurrentFont
string1='findText'
string2='replaceText'
f = CurrentFont()
for gname in f.selection:
#f[gname]
newname=gname.replace(string1,string2)
f[gname].name = newname
f.update()
|
import asyncio
import base64
import re
import subprocess
import time
from typing import Dict, Optional, Tuple, List
import oci # type: ignore
import yaml
__all__ = ["get_nodespace", "start_node", "start_nodes"]
def load_yaml(filename: str) -> dict:
with open(filename, "r") as f:
return yaml.safe_load(f)
def get_nodespace() -> Dict[str, str]:
"""
Get the information about the space into which we were creating nodes
This will be static for all nodes in this cluster
"""
return load_yaml("/etc/citc/startnode.yaml")
def get_subnet(oci_config, compartment_id: str, vcn_id: str, cluster_id: str) -> str:
"""
Get the relevant cluster subnet for a given compartment, VCN and AD
"""
return [s.id for s in oci.core.VirtualNetworkClient(oci_config).list_subnets(compartment_id, vcn_id=vcn_id).data if s.freeform_tags.get("cluster") == cluster_id][0]
def get_node_state(oci_config, log, compartment_id: str, hostname: str, cluster_id: str) -> str:
"""
Get the current node state of the VM for the given hostname
If there is no such VM, return "TERMINATED"
"""
matches = oci.core.ComputeClient(oci_config).list_instances(compartment_id=compartment_id, display_name=hostname).data
matches = [i for i in matches if i.freeform_tags.get("cluster") == cluster_id]
still_exist = [i for i in matches if i.lifecycle_state != "TERMINATED"]
if not still_exist:
return "TERMINATED"
if len(still_exist) > 1:
log.error(f"{hostname}: Multiple matches found for {hostname}")
return still_exist[0].lifecycle_state
def get_images(oci_config, compartment_id: str, cluster_id: str) -> Tuple[oci.core.models.Image, oci.core.models.Image]:
all_images = oci.pagination.list_call_get_all_results_generator(oci.core.ComputeClient(oci_config).list_images, 'record', compartment_id, operating_system="Oracle Linux")
our_images: List[oci.core.models.Image] = [i for i in all_images if i.freeform_tags.get("cluster") == cluster_id]
try:
non_gpu_image = [i for i in our_images if "GPU" not in i.display_name][0]
except IndexError:
non_gpu_image = None
try:
gpu_image = [i for i in our_images if "GPU" in i.display_name][0]
except IndexError:
gpu_image = None
return non_gpu_image, gpu_image
def create_node_config(oci_config, hostname: str, ip: Optional[str], nodespace: Dict[str, str], ssh_keys: str) -> oci.core.models.LaunchInstanceDetails:
"""
Create the configuration needed to create ``hostname`` in ``nodespace`` with ``ssh_keys``
"""
features = subprocess.run(["sinfo", "--Format=features:200", "--noheader", f"--nodes={hostname}"], stdout=subprocess.PIPE).stdout.decode().split(',')
ad_number = [f for f in features if f.startswith("ad=")][0].split("=")[1].strip()
ad = f"{nodespace['ad_root']}{ad_number}"
shape = [f for f in features if f.startswith("shape=")][0].split("=")[1].strip()
subnet = get_subnet(oci_config, nodespace["compartment_id"], nodespace["vcn_id"], nodespace["cluster_id"])
non_gpu_image, gpu_image = get_images(oci_config, nodespace["compartment_id"], nodespace["cluster_id"])
image = (gpu_image if "GPU" in shape else non_gpu_image).id # This will raise an exception if the image is not found
with open("/home/slurm/bootstrap.sh", "rb") as f:
user_data = base64.b64encode(f.read()).decode()
instance_details = oci.core.models.LaunchInstanceDetails(
compartment_id=nodespace["compartment_id"],
availability_domain=ad,
shape=shape,
subnet_id=subnet,
image_id=image,
display_name=hostname,
hostname_label=hostname,
create_vnic_details=oci.core.models.CreateVnicDetails(private_ip=ip, subnet_id=subnet) if ip else None,
metadata={
"ssh_authorized_keys": ssh_keys.strip(),
"user_data": user_data,
},
freeform_tags={
"type": "compute",
"cluster": nodespace["cluster_id"],
},
)
return instance_details
def get_ip(hostname: str) -> Tuple[Optional[str], Optional[str], Optional[str]]:
host_dns_match = re.match(r"(\d+\.){3}\d+", subprocess.run(["host", hostname], stdout=subprocess.PIPE).stdout.decode().split()[-1])
dns_ip = host_dns_match.group(0) if host_dns_match else None
slurm_dns_match = re.search(r"NodeAddr=((\d+\.){3}\d+)", subprocess.run(["scontrol", "show", "node", hostname], stdout=subprocess.PIPE).stdout.decode())
slurm_ip = slurm_dns_match.group(1) if slurm_dns_match else None
ip = dns_ip or slurm_ip
return ip, dns_ip, slurm_ip
async def start_node(log, host: str, nodespace: Dict[str, str], ssh_keys: str) -> None:
log.info(f"{host}: Starting")
oci_config = oci.config.from_file()
while get_node_state(oci_config, log, nodespace["compartment_id"], host, nodespace["cluster_id"]) == "TERMINATING":
log.info(f"{host}: host is currently terminating. Waiting...")
await asyncio.sleep(5)
node_state = get_node_state(oci_config, log, nodespace["compartment_id"], host, nodespace["cluster_id"])
if node_state != "TERMINATED":
log.warning(f"{host}: host is already running with state {node_state}")
return
ip, _dns_ip, slurm_ip = get_ip(host)
instance_details = create_node_config(oci_config, host, ip, nodespace, ssh_keys)
loop = asyncio.get_event_loop()
retry_strategy_builder = oci.retry.RetryStrategyBuilder()
retry_strategy_builder.add_max_attempts(max_attempts=10).add_total_elapsed_time(total_elapsed_time_seconds=600)
retry_strategy = retry_strategy_builder.get_retry_strategy()
client = oci.core.ComputeClient(oci_config, retry_strategy=retry_strategy)
try:
instance_result = await loop.run_in_executor(None, client.launch_instance, instance_details)
instance = instance_result.data
except oci.exceptions.ServiceError as e:
log.error(f"{host}: problem launching instance: {e}")
return
if not slurm_ip:
node_id = instance.id
while not oci.core.ComputeClient(oci_config).list_vnic_attachments(instance_details.compartment_id, instance_id=node_id).data:
log.info(f"{host}: No VNIC attachment yet. Waiting...")
await asyncio.sleep(5)
vnic_id = oci.core.ComputeClient(oci_config).list_vnic_attachments(instance_details.compartment_id, instance_id=node_id).data[0].vnic_id
private_ip = oci.core.VirtualNetworkClient(oci_config).get_vnic(vnic_id).data.private_ip
log.info(f"{host}: Private IP {private_ip}")
subprocess.run(["scontrol", "update", f"NodeName={host}", f"NodeAddr={private_ip}"])
log.info(f"{host}: Started")
return instance
async def start_nodes(log, hosts, nodespace: Dict[str, str], ssh_keys: str) -> None:
await asyncio.gather(*(
start_node( log, host, nodespace, ssh_keys)
for host in hosts
))
def terminate_instance(log, hosts):
config = oci.config.from_file()
nodespace = get_nodespace()
for host in hosts:
log.info(f"Stopping {host}")
try:
matching_nodes = oci.core.ComputeClient(config).list_instances(nodespace["compartment_id"], display_name=host).data
node_id = [n.id for n in matching_nodes if n.lifecycle_state not in {"TERMINATED", "TERMINATING"}][0]
oci.core.ComputeClient(config).terminate_instance(node_id)
except Exception as e:
log.error(f" problem while stopping: {e}")
continue
log.info(f" Stopped {host}")
|
import net from 'net';
var port = 22112;
var server = net.createServer(function(socket) {
console.log('# server connection1', socket.remoteAddress + ":" + socket.remotePort);
socket.on('data', function(data) {
console.log('# socket data |', data.length, '|', data.toString().trim());
});
socket.on('end', function () {
console.log('# socket end');
});
socket.on('close', function() {
console.log('# socket close');
});
socket.on('finish', function() {
console.log('# socket finish');
});
socket.on('error', function(err) {
console.log('# socket ERROR', JSON.stringify(err));
});
});
server.on('connection', function(socket) {
console.log('# server connection2', socket.remoteAddress + ":" + socket.remotePort);
});
server.on('close', function() {
console.log('# server close');
});
server.on('error', function(err) {
console.log('# server ERROR', JSON.stringify(err));
});
server.on('listening', function() {
console.log('# server listening');
});
server.listen(port);
|
/*
* textedit.c -- textedit widget, used to allow user edit text.
*
* Copyright (c) 2018, Liu chao <lc-soft@live.cn> All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of LCUI nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LCUI_TEXTBOX_H
#define LCUI_TEXTBOX_H
LCUI_BEGIN_HEADER
#define TextEdit_New() Widget_New("textedit")
/** 指定文本框是否处理控制符 */
LCUI_API void TextEdit_SetUsingStyleTags( LCUI_Widget widget, LCUI_BOOL is_true );
/** 指定文本框是否启用多行文本显示 */
LCUI_API void TextEdit_SetMultiline( LCUI_Widget widget, LCUI_BOOL is_true );
/** 清空文本内容 */
LCUI_API void TextEdit_ClearText( LCUI_Widget widget );
/** 获取文本内容 */
LCUI_API int TextEdit_GetTextW( LCUI_Widget widget, int start, int max_len, wchar_t *buf );
/** 获取文本长度 */
LCUI_API int TextEdit_GetTextLength( LCUI_Widget w );
/** 设置文本编辑框内的光标,指定是否闪烁、闪烁时间间隔 */
LCUI_API void TextEdit_SetCaretBlink( LCUI_Widget w, LCUI_BOOL enabled, int time );
/** 为文本框设置文本(宽字符版) */
LCUI_API int TextEdit_SetTextW( LCUI_Widget widget, const wchar_t *wstr );
LCUI_API int TextEdit_SetText( LCUI_Widget widget, const char *utf8_str );
/** 为文本框追加文本(宽字符版) */
LCUI_API int TextEdit_AppendTextW( LCUI_Widget widget, const wchar_t *wstr );
/** 为文本框插入文本(宽字符版) */
LCUI_API int TextEdit_InsertTextW( LCUI_Widget widget, const wchar_t *wstr );
/** 设置占位符,当文本编辑框内容为空时显示占位符 */
LCUI_API int TextEdit_SetPlaceHolderW( LCUI_Widget w, const wchar_t *wstr );
LCUI_API int TextEdit_SetPlaceHolder( LCUI_Widget w, const char *str );
/** 设置密码屏蔽符 */
LCUI_API void TextEdit_SetPasswordChar( LCUI_Widget w, wchar_t ch );
LCUI_API void LCUIWidget_AddTextEdit( void );
LCUI_END_HEADER
#endif
|
module.exports = new Date(2022, 4, 27)
|
// ____ _ __ _
// | _ \(_)/ _| | |
// | |_) |_| |_ _ __ ___ ___| |_
// | _ <| | _| '__/ _ \/ __| __|
// | |_) | | | | | | (_) \__ \ |_
// |____/|_|_| |_| \___/|___/\__| 2018 - 2019
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
//
// This dll implements the functionality which can be hooked by the test plugin (source/bifrost/api/test/data/hook_plugin.cpp). It is called in the hook
// executable (source/bifrost/api/test/data/hook_executable.cpp)
//
#pragma once
#ifdef BIFROST_HOOK_DLL_EXPORTS
#define BIFROST_HOOK_DLL_API __declspec(dllexport)
#else
#define BIFROST_HOOK_DLL_API __declspec(dllimport)
#endif
//
// C-Function
//
extern "C" {
BIFROST_HOOK_DLL_API int bifrost_add(int arg1, int arg2);
}
//
// VTable method
//
namespace bifrost {
class BIFROST_HOOK_DLL_API IAdder {
public:
int virtual add(int arg1, int arg2) = 0;
};
class BIFROST_HOOK_DLL_API Adder : IAdder {
public:
int virtual add(int arg1, int arg2) override;
};
} // namespace bifrost
//
// VTable hook
//
namespace bifrost {}
|
/**************************************************************************//**
* @file nor_MX29LV320T.c
* @version V1.0
* @brief NOR Flash - MX29LV320T driver source file
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2018 Nuvoton Technology Corp. All rights reserved.
******************************************************************************/
#include <stdio.h>
#include "NuMicro.h"
/**
* @brief Reset NOR Flash
*
* @param[in] u32Bank Bank number for EBI
*
* @return None
*
* @details Reset MX29LV320T NOR Flash.
*/
void NOR_MX29LV320T_RESET(uint32_t u32Bank)
{
EBI1_WRITE_DATA16((0x0 << 1), 0xF0);
}
/**
* @brief Check Command Status
*
* @param[in] u32DstAddr The base address for check status algorithm
* @param[in] u16Data The target data for check status algorithm
* @param[in] u32TimeoutMs Maximum time-out period time
*
* @retval 0 Command complete
* @retval -1 Command fail or time-out
*
* @details This function is used to check the previous command is complete or not.
*/
int32_t NOR_MX29LV320T_CheckStatus(uint32_t u32DstAddr, uint16_t u16Data, uint32_t u32TimeoutMs)
{
volatile uint16_t u16RData;
volatile uint32_t u32DelayLoop = 0;
if (u16Data != 0xEEEE)
{
/* Check normal write command status */
do
{
u16RData = EBI1_READ_DATA16(u32DstAddr) & 0xFF;
/* check DQ7 */
if ((u16RData & (1 << 7)) == (u16Data & (1 << 7)))
break;
/* check DQ5 */
if ((u16RData & (1 << 5)) == (1 << 5))
{
u16RData = EBI1_READ_DATA16(u32DstAddr) & 0xFF;
/* check DQ7 */
if ((u16RData & (1 << 7)) == (u16Data & (1 << 7)))
break;
else
return -1;
}
if (u32DelayLoop++ > u32TimeoutMs)
return -1;
CLK_SysTickDelay(1000);
}
while (1);
}
else
{
/* Check erase command status */
printf("Chip erase ");
do
{
u16RData = EBI1_READ_DATA16(u32DstAddr);
if (u32DelayLoop++ > u32TimeoutMs)
{
printf("\r \r");
return -1;
}
if ((u32DelayLoop % 1024) == 0)
printf(".");
CLK_SysTickDelay(1000);
}
while ((u16RData & (1 << 7)) != (1 << 7));
printf("\r \r");
}
return 0;
}
/**
* @brief Read NOR Flash
*
* @param[in] u32Bank Bank number for EBI
* @param[in] u32DstAddr The target address of read command
*
* @return Return the data
*
* @details Read date from specify EBI address.
*/
uint16_t NOR_MX29LV320T_READ(uint32_t u32Bank, uint32_t u32DstAddr)
{
return EBI1_READ_DATA16(u32DstAddr);
}
/**
* @brief Write NOR Flash
*
* @param[in] u32Bank Bank number for EBI
* @param[in] u32DstAddr The target address of write command
* @param[in] u16Data The target data for write command
*
* @retval 0 Write command pass
* @retval -1 Write command fail
*
* @details Write date to specify EBI address.
*/
int32_t NOR_MX29LV320T_WRITE(uint32_t u32Bank, uint32_t u32DstAddr, uint16_t u16Data)
{
/* Command */
EBI1_WRITE_DATA16((0x555 << 1), 0xAA);
EBI1_WRITE_DATA16((0x2AA << 1), 0x55);
EBI1_WRITE_DATA16((0x555 << 1), 0xA0);
EBI1_WRITE_DATA16(u32DstAddr, u16Data);
return NOR_MX29LV320T_CheckStatus(u32DstAddr, (u16Data & 0xFF), 100);
}
/**
* @brief Get NOR Flash ID
*
* @param[in] u32Bank Bank number for EBI
* @param[out] pu16IDTable The returned pointer is consist of Manufacture ID and Device ID
*
* @return Return Manufacture ID and Device ID
*
* @details Return the ID of MX29LV320T NOR flash.
*/
void NOR_MX29LV320T_GET_ID(uint32_t u32Bank, uint16_t *pu16IDTable)
{
NOR_MX29LV320T_RESET(u32Bank);
/* Command */
EBI1_WRITE_DATA16((0x555 << 1), 0xAA);
EBI1_WRITE_DATA16((0x2AA << 1), 0x55);
EBI1_WRITE_DATA16((0x555 << 1), 0x90);
CLK_SysTickDelay(1000);
/* Get Manufacture */
pu16IDTable[0] = EBI1_READ_DATA16((0x0 << 1));
/* Get DeviceID */
pu16IDTable[1] = EBI1_READ_DATA16((0x1 << 1));
NOR_MX29LV320T_RESET(u32Bank);
}
/**
* @brief NOR Flash Chip Erase
*
* @param[in] u32Bank Bank number for EBI
* @param[in] u32IsCheckBlank Determine run blank check or not
*
* @retval 0 Erase command pass
* @retval -1 Erase command fail
*
* @details W39L040P whole chip erase.
*/
int32_t NOR_MX29LV320T_EraseChip(uint32_t u32Bank, uint32_t u32IsCheckBlank)
{
int32_t i32Status = 0;;
NOR_MX29LV320T_RESET(u32Bank);
/* Command */
EBI1_WRITE_DATA16((0x555 << 1), 0xAA);
EBI1_WRITE_DATA16((0x2AA << 1), 0x55);
EBI1_WRITE_DATA16((0x555 << 1), 0x80);
EBI1_WRITE_DATA16((0x555 << 1), 0xAA);
EBI1_WRITE_DATA16((0x2AA << 1), 0x55);
EBI1_WRITE_DATA16((0x555 << 1), 0x10);
i32Status = NOR_MX29LV320T_CheckStatus(0, 0xEEEE, 30000);
if (i32Status < 0)
{
printf(">> Chip erase ... Time-out !!!\n\n");
return i32Status;
}
if (u32IsCheckBlank)
{
/* Run blank check */
volatile uint32_t u32Addr;
uint16_t u16RData;
for (u32Addr = 0; u32Addr < EBI_MAX_SIZE; u32Addr += 2)
{
u16RData = NOR_MX29LV320T_READ(u32Bank, u32Addr);
if (u16RData != 0xFFFF)
{
printf("> Chip erase done and blank check FAIL on 0x%08X (R:0x%X)!!!\n\n", u32Addr, u16RData);
return -1;
}
}
printf(">> Chip erase done and blank check OK !!!\n\n");
}
else
{
printf(">> Chip erase done !!!\n\n");
}
return 0;
}
/*** (C) COPYRIGHT 2017 Nuvoton Technology Corp. ***/
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Helper functions """
import logging
import os
from distutils.util import strtobool
log = logging.getLogger("csp")
def gather_environ(keys) -> dict:
"""
Return a dict of environment variables correlating to the keys dict
:param keys: The environ keys to use, each of them correlating to `int`, `list`, `string`, `boolean` or `filter`
:return: A dict of found environ values
"""
environs = {}
for key, key_type in keys.items():
if os.environ.get(key.upper()):
environs.update({key: os.environ[key.upper()]})
if key_type == 'int':
try:
environs[key] = int(environs[key])
except ValueError:
log.warning(f"`{environs[key]}` not understood for {key.upper()}. Ignoring.")
del environs[key]
continue
if key_type == 'list':
environs[key] = environs[key].split(' ')
if key_type == 'boolean':
try:
environs[key] = bool(strtobool(environs[key]))
except ValueError:
log.warning(f"`{environs[key]}` not understood for {key.upper()}. Setting to False.")
environs[key] = False
continue
if key_type == 'filter':
filters = environs[key].split('=', 1)
environs[key] = {filters[0]: filters[1]}
log.info(f'{key.upper()} is set')
return environs
|
from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@london.com', password='test123'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(TestCase):
def test_create_user_with_email_successful(self):
"""Test creating a new user with email is successful"""
email = 'test@london.com'
password = 'Testpass123'
user = get_user_model().objects.create_user(
email=email,
password=password
)
self.assertEqual(user.email, email)
self.assertTrue(user.check_password(password))
def test_new_user_email_normalized(self):
"""Test the email for a new user is normalizd"""
email = 'test@LONDON.COM'
user = get_user_model().objects.create_user(email, 'Test123')
self.assertEqual(user.email, email.lower())
def test_new_user_invalid_email(self):
"""Test creating user with no email raises error"""
with self.assertRaises(ValueError):
get_user_model().objects.create_user(None, 'test123')
def test_create_new_superuser(self):
"""Test creating a new superuser"""
user = get_user_model().objects.create_superuser(
'test@london.com',
'Test123'
)
self.assertTrue(user.is_superuser)
self.assertTrue(user.is_staff)
def test_tag_str(self):
"""Test the tag string representation"""
tag = models.Tag.objects.create(
user=sample_user(),
name='vegan'
)
self.assertEqual(str(tag), tag.name)
def test_ingredient_str(self):
"""Test the ingredient string representation"""
ingredient = models.Ingredient.objects.create(
user=sample_user(),
name='Cucumber'
)
self.assertEqual(str(ingredient), ingredient.name)
def test_recipe_str(self):
"""Test the recipe string representation"""
recipe = models.Recipe.objects.create(
user=sample_user(),
title='Steak and mushroom sauce',
time_minutes=5,
price=5.00
)
self.assertEqual(str(recipe), recipe.title)
@patch('uuid.uuid4')
def test_recipe_file_name_uuid(self, mock_uuid):
"""Test that image is saved in the correct location"""
uuid = 'test-uuid'
mock_uuid.return_value = uuid
file_path = models.recipe_image_file_path(None, 'myimage.jpg')
exp_path = f'uploads/recipe/{uuid}.jpg'
self.assertEqual(file_path, exp_path)
|
function verificar() {
var data = new Date()
var ano = data.getFullYear()
var fano = document.getElementById('txtano')
var res = document.getElementById('res')
if (fano.value.length == 0 || Number(fano.value) > ano) {
window.alert('[ERRO] Verifique os dados e tente novamente!')
} else {
var fsex = document.getElementsByName('radsex')
var idade = ano - Number(fano.value)
var genero = ''
var img = document.createElement('img')
img.setAttribute('id', 'foto')
if (fsex[0].checked) {
genero = 'Homem'
if (idade >=0 && idade <10) {
//Criança
img.setAttribute('src', 'foto-bebe-m.png')
} else if (idade < 21) {
//Jovem
img.setAttribute('src', 'foto-jovem-m.png')
} else if (idade < 50) {
//Adulto
img.setAttribute('src', 'foto-adulto-m.png')
} else {
//Idoso
img.setAttribute('src', 'foto-idoso-m.png')
}
} else if (fsex[1].checked) {
genero = 'Mulher'
if (idade >=0 && idade <10) {
//Criança
img.setAttribute('src', 'foto-bebe-f.png')
} else if (idade < 21) {
//Jovem
img.setAttribute('src', 'foto-jovem-f.png')
} else if (idade < 50) {
//Adulta
img.setAttribute('src', 'foto-adulto-f.png')
} else {
//Idosa
img.setAttribute('src', 'foto-idoso-f.png')
}
}
res.style.textAlign = 'center'
res.innerHTML = `Detectamos ${genero} com ${idade} anos.`
res.appendChild(img)
}
}
|
var express = require('express');
var bodyParser = require('body-parser')
var app = express();
var exec = require('child_process').exec;
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.get('/', function(req, res) {
res.sendFile(__dirname + "/index.htm");
console.log("GET / ::" + req.headers['x-forwarded-for']);
});
app.get('/payload', function(req, res) {
res.sendStatus(200);
});
app.post('/payload', function (req, res) {
exec ('git -C /var/www/pug-3-server reset --hard' , logActivity);
exec ('git -C /var/www/pug-3-server clean -d -f' , logActivity);
exec ('git -C /var/www/pug-3-server pull -f' , logActivity);
res.sendStatus(200);
res.end();
});
app.listen(65432, function () {
console.log('listening on port 65432')
});
function logActivity(err, stdout, stderr) {
if (stdout) console.log(stdout);
if (stderr) console.log(stderr);
}
|
'use strict';
const Util = require('../util.js');
const Relationship = require('../internal/relationship.js');
const Manga = require('./manga.js');
/**
* Represents an author or artist
* https://api.mangadex.org/docs.html#tag/Author
*/
class Author {
/**
* There is no reason to directly create an author object. Use static methods, ie 'get()'.
* @param {Object|String} context Either an API response or Mangadex id
*/
constructor(context) {
if (typeof context === 'string') {
this.id = context;
return;
} else if (!context) return;
if (context.data === undefined) context.data = {};
/**
* Mangadex id for this object
* @type {String}
*/
this.id = context.data.id;
if (context.data.attributes === undefined) context.data.attributes = {};
/**
* Name of this author/artist
* @type {String}
*/
this.name = context.data.attributes.name;
/**
* Image URL for this author/artist
* @type {String}
*/
this.imageUrl = context.data.attributes.imageUrl;
/**
* Author/Artist biography
* @type {String[]}
*/
this.biography = context.data.attributes.biography;
/**
* The date of this author/artist page creation
* @type {Date}
*/
this.createdAt = context.data.attributes.createdAt ? new Date(context.data.attributes.createdAt) : context.data.attributes.createdAt;
/**
* The date the author/artist was last updated
* @type {Date}
*/
this.updatedAt = context.data.attributes.updatedAt ? new Date(context.data.attributes.updatedAt) : context.data.attributes.updatedAt;
/**
* Manga this author/artist has been attributed to
* @type {Relationship[]}
*/
this.manga = Relationship.convertType('manga', context.data.relationships, this);
}
/**
* @private
* @typedef {Object} AuthorParameterObject
* @property {String} AuthorParameterObject.name
* @property {String[]} AuthorParameterObject.ids Max of 100 per request
* @property {Number} AuthorParameterObject.limit Not limited by API limits (more than 100). Use Infinity for maximum results (use at your own risk)
* @property {Number} AuthorParameterObject.offset
* @property {Object} AuthorParameterObject.order
* @property {'asc'|'desc'} AuthorParameterObject.order.name
*/
/**
* Peforms a search and returns an array of a authors/artists.
* https://api.mangadex.org/docs.html#operation/get-author
* @param {AuthorParameterObject|String} [searchParameters] An object of offical search parameters, or a string representing the name
* @param {Boolean} [includeSubObjects=false] Attempt to resolve sub objects (eg author, artists, etc) when available through the base request
* @returns {Promise<Author[]>}
*/
static search(searchParameters = {}, includeSubObjects = false) {
if (typeof searchParameters === 'string') searchParameters = { name: searchParameters };
if (includeSubObjects) searchParameters.includes = ['manga'];
return Util.apiCastedRequest('/author', Author, searchParameters);
}
/**
* Gets multiple authors
* @param {...String|Author|Relationship} ids
* @returns {Promise<Author[]>}
*/
static getMultiple(...ids) {
return Util.getMultipleIds(Author.search, ids);
}
/**
* Retrieves and returns a author by its id
* @param {String} id Mangadex id
* @param {Boolean} [includeSubObjects=false] Attempt to resolve sub objects (eg author, artists, etc) when available through the base request
* @returns {Promise<Author>}
*/
static async get(id, includeSubObjects = false) {
return new Author(await Util.apiRequest(`/author/${id}${includeSubObjects ? '?includes[]=manga' : ''}`));
}
/**
* Performs a search for one author and returns that author
* @param {AuthorParameterObject|String} [searchParameters] An object of offical search parameters, or a string representing the name
* @returns {Promise<Author>}
*/
static async getByQuery(searchParameters = {}) {
if (typeof searchParameters === 'string') searchParameters = { name: searchParameters, limit: 1 };
else searchParameters.limit = 1;
let res = await Author.search(searchParameters);
if (res.length === 0) throw new Error('Search returned no results.');
return res[0];
}
}
exports = module.exports = Author;
|
import torch
from torch import nn
from area_attention import AreaAttention
class MultiHeadAreaAttention(nn.Module):
""" Multi-Head version of Area Attention. """
def __init__(self, area_attention: AreaAttention, num_heads: int, key_query_size: int,
key_query_size_hidden: int, value_size: int, value_size_hidden: int):
"""
Initializes the Multi-Head Area Attention module.
:param area_attention: initialized single head Area Attention module
:param num_heads: number of heads
:param key_query_size: input size of keys and queries
:param key_query_size_hidden: hidden size of keys and queries
:param value_size: input size of values
:param value_size_hidden: hidden size of values
"""
super(MultiHeadAreaAttention, self).__init__()
self.area_attention = area_attention
self.num_heads = num_heads
self.key_query_size = key_query_size
self.key_query_size_hidden = key_query_size_hidden
self.value_size = value_size
self.value_size_hidden = value_size_hidden
self.query_projection = nn.Linear(key_query_size, num_heads * key_query_size_hidden)
self.key_projection = nn.Linear(key_query_size, num_heads * key_query_size_hidden)
self.value_projection = nn.Linear(value_size, num_heads * value_size_hidden)
self.output_projection = nn.Linear(num_heads * value_size_hidden, value_size)
def forward(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor) -> torch.Tensor:
"""
Forward pass of the Multi-Head Area Attention module.
:param q: queries Tensor with shape (batch_size, num_queries, key_query_size)
:param k: keys Tensor with shape (batch_size, num_keys_values, key_query_size)
:param v: values Tensor with shape (batch_size, num_keys_values, value_size)
:returns a Tensor with shape (batch_size, num_queries, value_size)
"""
batch_size, num_queries, _ = q.size()
num_keys_values = k.size(1)
q = self.query_projection(q).view(batch_size, num_queries, self.num_heads, self.key_query_size_hidden).permute(0, 2, 1, 3).contiguous().flatten(0, 1)
k = self.key_projection(k).view(batch_size, num_keys_values, self.num_heads, self.key_query_size_hidden).permute(0, 2, 1, 3).contiguous().flatten(0, 1)
v = self.value_projection(v).view(batch_size, num_keys_values, self.num_heads, self.value_size_hidden).permute(0, 2, 1, 3).contiguous().flatten(0, 1)
attention = self.area_attention(q, k, v)
attention = attention.view(batch_size, self.num_heads, num_queries, self.value_size_hidden)
attention = attention.permute(0, 2, 1, 3).contiguous().flatten(-2, -1)
output = self.output_projection(attention)
return output
|
export default function taskStatus(ev, index, list) {
list = list.map((task) => {
if (task.index === index) {
task.completed = ev.target.checked;
}
return task;
});
localStorage.setItem('tasks', JSON.stringify(list));
}
|
(function (root, factory) {
if (typeof module !== 'undefined' && module.exports) {
// CommonJS
if (typeof angular === 'undefined') {
factory(require('angular'));
} else {
factory(angular);
}
module.exports = 'quantacann2-message';
} else if (typeof define === 'function' && define.amd) {
// AMD
define(['angular'], factory);
} else {
// Global Variables
factory(root.angular);
}
}(this, function (angular) {
'use strict';
var m = angular.module('quantacann2-message', []);
m.component('quantacann2', {
bindings: {
message: '@'
},
template: '<p>{{ $ctrl.message }}</p>'
});
return m;
}));
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2018-09-16 16:22
from __future__ import unicode_literals
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0005_auto_20180916_1618'),
]
operations = [
migrations.AlterField(
model_name='driverinfo',
name='scanned',
field=cloudinary.models.CloudinaryField(blank=True, max_length=255, verbose_name="picture of driver's liscence"),
),
]
|
$(document).ready(function(){
$.ajaxSetup({ cache: false });
function getRequest(url, callback) {
$.get(url, function(data) {
data = $.parseJSON(data);
callback(data);
});
}
function generatePie(idDiv, data, title){
Highcharts.chart(idDiv, {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
credits: {
enabled: false
},
title: {
text: title
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: 'Pourcentage',
colorByPoint: true,
data: data
}]
});
}
function generateLine(idDiv, data, title) {
Highcharts.chart(idDiv, {
chart: {
type: 'line'
},
credits: {
enabled: false
},
title: {
text: title
},
xAxis: {
categories: data[1]
},
yAxis: {
title: {
text: 'Utilisateurs'
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
name: 'Nombre d\'utilisateur',
data: data[0]
}]
});
}
function generateBar(idDiv, data, title) {
Highcharts.chart(idDiv, {
chart: {
type: 'column'
},
credits: {
enabled: false
},
title: {
text: title
},
xAxis: {
categories: data[0],
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Utilisateur'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Nombre moyen d\'utilisateur',
data: data[1]
}],
legend: {
shadow: false
},
});
}
function generateArea(idDiv, data, title) {
Highcharts.chart(idDiv, {
chart: {
type: 'area'
},
title: {
text: title
},
xAxis: {
categories: data[0],
tickmarkPlacement: 'on',
title: {
enabled: false
}
},
yAxis: {
title: {
text: 'Oeuvre'
}
},
tooltip: {
split: true
},
plotOptions: {
area: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [{
name: 'Nombre d\'oeuvre',
data: data[1]
}]
});
}
getRequest("webservices/element_by_category.php", function(data) {
generatePie("element_by_category", data, 'Nombre d\'oeuvres par catégorie');
});
getRequest("webservices/room_by_category.php", function(data) {
generatePie("room_by_category", data, 'Nombre de salons par catégorie');
});
getRequest("webservices/evolution_nbr_user.php", function(data) {
generateLine("evolution_nbr_user", data, 'Evolution du nombre d\'utilisateurs');
});
getRequest('webservices/user_room_by_month.php', function(data) {
generateBar('user_room_by_month', data, 'Nombre moyen d\'utilisateurs par salon par mois');
});
getRequest('webservices/nbr_suggest.php', function(data) {
generateArea('nbr_suggest', data, 'Nombre d\'oeuvres suggérées par mois');
});
getRequest("webservices/nbr_message_by_room.php", function(data) {
$('#nbr_message_by_room').append(data);
});
});
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var DEBUG = exports.DEBUG = global.DEBUG = false;
var WATCHING = exports.WATCHING = global.WATCHING = false;
var DIR = exports.DIR = global.DIR = __dirname;
var R = exports.R = global.R = {
dev: './dev/',
dest: './dest/'
};
var P = exports.P = global.P = {
dev: {
root: R.dev + 'root/',
php: R.dev + 'php/',
py: R.dev + 'py/',
js: R.dev + 'js/',
html: R.dev + 'html/',
stylus: R.dev + 'stylus/',
pug: R.dev + 'pug/',
css: R.dev + 'css/',
public: R.dev + 'public/'
},
dest: {
root: '' + R.dest,
php: R.dest + 'php/',
py: R.dest + 'py/',
js: R.dest + 'js/',
html: R.dest + 'html/',
stylus: R.dest + 'stylus/',
pug: R.dest + 'pug/',
css: R.dest + 'css/',
public: '' + R.dest
}
};
|
/* SPIM S20 MIPS simulator.
Code to create, maintain and access memory.
Copyright (c) 1990-2010, James R. Larus.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the James R. Larus nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include <unordered_map>
#include "TODO/spim-utils.h"
#include "config.h"
#include "inst.h"
#include "mem.h"
#include "reg.h"
#include "scanner.h"
#include "sym-tbl.h"
#include "syscall.h"
#include "../../engine/controller.h"
/**
* Wrapper class that defines the topology and owns all the components
*/
class CPU {
private:
int id; // CPU id (used for easy identification). Be sure to use this for logging statements
CPUConfig config;
mem_image_t memory;
reg_image_t registers;
SymbolTable symbol_table;
std::unordered_map<mem_addr, bkpt> breakpoints;
mem_addr last_exception_addr;
bool force_break; /* => stop interpreter loop */
bool parser_error_occurred; /* => parse resulted in error */
int spim_return_value; /* Value returned when spim exits */
/* True when delayed_branches is true and instruction is executing in delay
* slot of another instruction.
*/
int running_in_delay_slot = 0;
/* Actual type of structure pointed to depends on X/terminal interface */
/* SpimBOT stuff */
bool map_click;
bool done; // Should the simulation stop with no hope of restarting?
/* Helper functions */
// raises the exception. Try to move this to register if possible
void _raise_exception(int excode);
// Resolves things based on config
bool is_file_io_enabled;
bool is_syscalls_enabled; // TODO: Make this a bitset to detemine which syscalls are enabled
bool debug; // TODO: Convert to enum and move to logger
bool quiet;
bool should_fail_on_exception; // Find a better name
bool data_dir;
bool text_dir;
/*
* MEMORY SPECIFIC METHODS
*/
/* Handle the infrequent and erroneous cases in memory accesses. */
instruction *bad_text_read(mem_addr addr);
void bad_text_write(mem_addr addr, instruction *inst);
mem_word bad_mem_read(mem_addr addr, int mask);
void bad_mem_write(mem_addr addr, mem_word value, int mask);
/* Memory-mapped IO routines. */
/**
* Check if input is available and output is possible. If so, update the
* memory-mapped control registers and buffers.
*/
void check_memory_mapped_IO();
/* Misc. routines */
void print_mem(mem_addr addr);
/* Instruction Routines */
void resolve_a_label_sub(label *sym, instruction *inst, mem_addr pc);
/* Data methods */
inline mem_addr DATA_PC() const;
public:
CPU(const CPUConfig &config);
bool at_breakpoint() const {return inst_is_breakpoint(this->registers.PC)}
MemoryBusMessage single_step(bool display, bool cont_bkpt, bool* continuable, UIEvent event);
bool run_program(int steps, bool display, bool cont_bkpt, bool *continuable);
/* Utilities */
/* Read file NAME, which should contain assembly code. Return true if
successful and false otherwise. */
bool read_assembly_file(const char *fpath, const char *file_name);
mem_addr starting_address();
/* Set a breakpoint at memory location ADDR. */
void add_breakpoint(mem_addr addr);
/* Delete all breakpoints at memory location ADDR. */
void delete_breakpoint(mem_addr addr);
void delete_all_breakpoints();
/* List all breakpoints. */
void list_breakpoints();
/* Initialize the SPIM stack with ARGC, ARGV, and ENVP data. */
void initialize_run_stack(int argc, char **argv);
mem_addr copy_str_to_stack(char *s);
mem_addr copy_int_to_stack(int n);
/* Decides which syscall to execute or simulate.
*
* Config Params:
* - enable_syscalls (if spimbot_tournament is true this should be false)
* - enable_file_io (if spimbot_tournament is true this should also be false)
* - debug (allows for print statements)
*
* Returns zero upon exit syscall and non-zero to continue execution.
*/
// int do_syscall(bool enable_syscalls = true, bool enable_file_io = false, bool debug = false);
int do_syscall();
/* Handles eceptions raised by the CPU
*
* Config Params:
* - fail_on_exception (if spimbot_tournament is true this should also be true)
* - quiet (disables error printouts)
*
* Returns zero upon exit syscall and non-zero to continue execution.
*/
// void handle_exception(bool fail_on_exception = false, bool quiet = false);
void handle_exception();
/*
* Run the program stored in memory, starting at address PC for
* STEPS_TO_RUN instruction executions. If flag DISPLAY is true, print
* each instruction before it executes. Return true if program's
* execution can continue.
*/
bool run_spim(bool display);
/**
* Returns true if you should
*/
bool RAISE_EXCEPTION(int CAUSE);
void RAISE_INTERRUPT(int32_t LEVEL);
void CLEAR_INTERRUPT(int32_t LEVEL);
/*
* MEMORY SPECIFIC METHODS
* Convert to Interface
*/
void *mem_reference(mem_addr addr) const;
instruction *read_mem_inst(mem_addr addr);
reg_word read_mem_byte(mem_addr addr);
reg_word read_mem_half(mem_addr addr);
reg_word read_mem_word(mem_addr addr);
void set_mem_inst(mem_addr addr, instruction *inst);
void set_mem_byte(mem_addr addr, reg_word value);
void set_mem_half(mem_addr addr, reg_word value);
void set_mem_word(mem_addr addr, reg_word value);
/*
* INSTRUCTION SPECIFIC METHODS
*/
/* Increment the current text segement PC. */
void increment_text_pc(int delta);
/**
* If FLAG is true, next instruction goes to kernel text segment,
* otherwise it goes to user segment.
*/
void user_kernel_text_segment(bool to_kernel);
/* Store an INSTRUCTION in memory at the next location. */
void store_instruction(instruction *inst);
/* Print the instruction stored at the memory ADDRESS. */
void print_inst(port message_out, mem_addr addr);
std::string inst_to_string(mem_addr addr);
/* Return an address expression of the form SYMBOL +/- IOFFSET (REGISTER).
Any of the three parts may be omitted. */
addr_expr *make_addr_expr(int offs, char *sym, int reg_no);
/* Symbol Table Methods */
/**
* Resolve the newly-defined label in INSTRUCTION.
*/
void resolve_a_label(label *sym, instruction *inst);
/**
* Given a newly-defined LABEL, resolve the previously encountered
* instructions and data locations that refer to the label.
*/
void resolve_label_uses(label *sym);
/**
* Record that the label named NAME refers to ADDRESS. If RESOLVE_USES is
* true, resolve all references to it. Return the label structure.
*/
label *record_label(const std::string &name, mem_addr address, bool resolve_uses) {
label *l = symbol_table.lookup_label(name);
if (!l->gp_flag) {
if (l->addr != 0) {
yyerror("Label is defined for the second time");
return (l);
}
l->addr = address;
}
if (resolve_uses) {
resolve_label_uses(l);
}
if (!l->global_flag) {
symbol_table.local_labels.push_front(std::ref(*l));
}
return l;
}
/* Return true if a breakpoint is set at ADDR. */
bool inst_is_breakpoint(mem_addr addr) const;
/* Return a jump-type instruction with the given OPCODE and TARGET
fields. NB, even the immediate value may not fit in the field, this
routine will not produce more than one instruction. */
void j_type_inst(int opcode, imm_expr *target);
/* Return a register-type instruction with the given OPCODE, FD, FS, and FT
fields. */
void r_co_type_inst(int opcode, int fd, int fs, int ft);
/* Return a register-type instruction with the given OPCODE, RD, RS, and RT
fields. */
void r_type_inst(int opcode, int rd, int rs, int rt);
/* Return a register-shift instruction with the given OPCODE, RD, RT, and
SHAMT fields.*/
void r_sh_type_inst(int opcode, int rd, int rt, int shamt);
/* Return a floating-point compare instruction with the given OPCODE,
FS, FT, and CC fields.*/
void r_cond_type_inst(int opcode, int fs, int ft, int cc);
/* Produce an immediate instruction with the OPCODE, RT, RS, and IMM
fields. NB, because the immediate value may not fit in the field,
this routine may produce more than one instruction. On the bare
machine, we resolve symbolic address, but they better produce values
that fit into instruction's immediate field. */
void i_type_inst(int opcode, int rt, int rs, imm_expr *expr);
void i_type_inst_free(int opcode, int rt, int rs, imm_expr *expr);
void free_inst(instruction *inst);
void i_type_inst_full_word(int opcode, int rt, int rs, imm_expr *expr, int value_known,
int32 value);
/* Code to test encode/decode of instructions. */
inline void test_assembly(instruction *inst) {
instruction *new_inst =
instruction::inst_decode(inst->inst_encode(config.correct_branches));
if (inst != new_inst) {
std::stringstream stream;
stream << "=================== Not Equal ===================\n";
instruction::format_an_inst(stream, inst, 0);
instruction::format_an_inst(stream, new_inst, 0);
stream << "=================== Not Equal ===================\n";
}
free_inst(new_inst);
}
/* DATA Methods */
void align_data(int alignment);
mem_addr current_data_pc() const;
void data_begins_at_point(mem_addr addr);
void enable_data_alignment();
void end_of_assembly_file();
void extern_directive(const std::string &name, int size);
void increment_data_pc(int value);
void k_data_begins_at_point(mem_addr addr);
void lcomm_directive(const std::string &name, int size);
void set_data_alignment(int);
void set_data_pc(mem_addr addr);
void set_text_pc(mem_addr addr);
void store_byte(int value);
void store_double(double *value);
void store_float(double *value);
void store_half(int value);
void store_string(char *string, int length, bool null_terminate);
void store_word(int value);
void user_kernel_data_segment(bool to_kernel);
friend struct mem_image_t;
friend struct reg_image_t;
friend struct instruction;
friend struct SymbolTable;
};
|
# Copyright (c) 2020 Sony Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
import numpy as np
mnist_data_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..', 'mnist-collection'))
sys.path.append(mnist_data_path)
from mnist_data import data_iterator_mnist
def mnist_iterator(config, comm, train=True):
data_iterator_ = data_iterator_mnist(batch_size=config['train']['batch_size'], train=train, rng=np.random.RandomState(config['model']['rng']),
with_memory_cache=config['dataset']['with_memory_cache'], with_file_cache=config['dataset']['with_file_cache'])
if comm.n_procs > 1:
data_iterator_ = data_iterator_.slice(
rng=None, num_of_slices=comm.n_procs, slice_pos=comm.rank)
return data_iterator_
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespamalloc/malloc/memblockboundscheck.h>
#define MALLOC_STACK_SAVE_LEN 16
namespace vespamalloc {
typedef MemBlockBoundsCheckBaseT<20, MALLOC_STACK_SAVE_LEN> MemBlockBoundsCheckBase;
class MemBlockBoundsCheck : public MemBlockBoundsCheckBase
{
public:
MemBlockBoundsCheck() : MemBlockBoundsCheckBase() { }
MemBlockBoundsCheck(void * p) : MemBlockBoundsCheckBase(p) { }
MemBlockBoundsCheck(void * p, size_t sz) : MemBlockBoundsCheckBase(p, sz) { }
MemBlockBoundsCheck(void * p, size_t sz, bool dummy) : MemBlockBoundsCheckBase(p, sz, dummy) { }
bool validAlloc() const { return validAlloc1(); }
bool validFree() const { return validFree1(); }
};
}
|
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from distutils.sysconfig import get_python_lib
from logging import getLogger
from os import chdir, getcwd
from os.path import (abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join,
normpath, sep)
try:
import pkg_resources
except ImportError:
pkg_resources = None
import sys
log = getLogger(__name__)
ROOT_PATH = abspath(sep)
def site_packages_paths():
if hasattr(sys, 'real_prefix'):
# in a virtualenv
log.debug('searching virtualenv')
return [p for p in sys.path if p.endswith('site-packages')]
else:
# not in a virtualenv
log.debug('searching outside virtualenv') # pragma: no cover
return [get_python_lib()] # pragma: no cover
class PackageFile(object):
def __init__(self, file_path, package_name):
self.file_path = file_path
self.package_name = package_name
def __enter__(self):
self.file_handle = open_package_file(self.file_path, self.package_name)
return self.file_handle
def __exit__(self, *args):
self.file_handle.close()
class ChangePath(object):
def __init__(self, path):
self.dirpath = dirname(path) if isfile(path) else path
if not isdir(self.dirpath):
raise IOError('File or directory not found: {0}'.format(path))
def __enter__(self):
self.cwd = getcwd()
chdir(self.dirpath)
return self
def __exit__(self, *args):
chdir(self.cwd)
def open_package_file(file_path, package_name):
file_path = expand(file_path)
# look for file at relative path
if exists(file_path):
log.info("found real file {0}".format(file_path))
return open(file_path)
# look for file in package resources
if (package_name and pkg_resources is not None and
pkg_resources.resource_exists(package_name, file_path)):
log.info("found package resource file {0} for package {1}".format(file_path, package_name))
return pkg_resources.resource_stream(package_name, file_path)
# look for file in site-packages
package_path = find_file_in_site_packages(file_path, package_name)
if package_path:
return open(package_path) # pragma: no cover
msg = "file for module [{0}] cannot be found at path {1}".format(package_name, file_path)
log.error(msg)
raise IOError(msg)
def find_file_in_site_packages(file_path, package_name):
package_path = package_name.replace('.', '/')
for site_packages_path in site_packages_paths():
test_path = join(site_packages_path, package_path, file_path)
if exists(test_path):
log.info("found site-package file {0} for package {1}".format(file_path, package_name))
return test_path
else:
log.error("No file found at {0}.".format(test_path))
return None
def expand(path):
return normpath(expanduser(expandvars(path)))
def absdirname(path):
return abspath(expanduser(dirname(path)))
|
function AddCategorySuccess(data) {
debugger
if (data.status == true) {
$("#addCategory").modal("hide");
$(".modal-backdrop").remove();
var popTimer = parseInt($("#hdnPopUpTimer").val()); setTimeout("$.each(BootstrapDialog.dialogs, function(id, dialog){dialog.close();});",popTimer);
BootstrapDialog.configDefaultOptions({ cssClass: 'bstDialg' });
BootstrapDialog.show({ title: "<span>Information</span>", type: BootstrapDialog.TYPE_SUCCESS, message: 'Category added successfully.' });
/// ShowMessage(BootstrapDialog.TYPE_SUCCESS, "Category added successfully");
RefreshGrid();
$('#loadercontainingdiv').addClass("hidden");
}
else {
$("#addCategory").modal("hide");
$(".modal-backdrop").remove();
$('#loadercontainingdiv').addClass("hidden");
///ShowMessage(BootstrapDialog.TYPE_DANGER, "Error occured");
var popTimer = parseInt($("#hdnPopUpTimer").val()); setTimeout("$.each(BootstrapDialog.dialogs, function(id, dialog){dialog.close();});",popTimer);
BootstrapDialog.configDefaultOptions({ cssClass: 'bstDialg' });
BootstrapDialog.show({ title: "<span>Information</span>", type: BootstrapDialog.TYPE_DANGER, message: 'Error occured.' });
RefreshGrid();
}
}
function ShowMessage(type, message) {
$messageData = $("<span>Information</span>");
BootstrapDialog.show({
title: $messageData,
type: type,
message: message,
closable: true,
closeByBackdrop: false,
closeByKeyboard: false,
buttons: [{
label: 'Ok',
action: function (dialogItself) {
dialogItself.close();
RefreshGrid();
$("#addCategory").modal("hide");
$(".modal-backdrop").remove();
}
}]
});
}
function RefreshGrid() {
$("#IndustryName", $('#AddCategory')).val("");
document.getElementById("btnFilter").click();
}
$('#btnaddcat').click(function () {
debugger;
$("#IndustryName", $('#AddCategory')).val("")
$("#IndustryShortName", $('#AddCategory')).val("")
})
|
import Vue from 'vue'
import App from './App.vue'
import VueResource from 'vue-resource';
import VueHead from 'vue-head'
import VueRouter from 'vue-router';
import { routes } from './routes';
import store from './store'
import './assets/css/reset.css';
Vue.use(VueResource);
Vue.use(VueRouter);
Vue.use(VueHead);
const router = new VueRouter({
routes,
mode: 'history'
});
new Vue({
el: '#app',
router,
store,
render: h => h(App)
});
|
#ifndef SAMPLE_SETMAPPROJECTIONS_REQUEST_DCPS_IMPL_H_
#define SAMPLE_SETMAPPROJECTIONS_REQUEST_DCPS_IMPL_H_
#include "ccpp.h"
#include "ccpp_Sample_SetMapProjections_Request_.h"
#include "TypeSupportMetaHolder.h"
#include "TypeSupport.h"
#include "FooDataWriter_impl.h"
#include "FooDataReader_impl.h"
#include "FooDataReaderView_impl.h"
#include "map_msgs/msg/rosidl_typesupport_opensplice_cpp__visibility_control.h"
namespace map_msgs {
namespace srv {
namespace dds_ {
class ROSIDL_TYPESUPPORT_OPENSPLICE_CPP_PUBLIC_map_msgs Sample_SetMapProjections_Request_TypeSupportMetaHolder : public ::DDS::OpenSplice::TypeSupportMetaHolder
{
public:
Sample_SetMapProjections_Request_TypeSupportMetaHolder ();
virtual ~Sample_SetMapProjections_Request_TypeSupportMetaHolder ();
private:
::DDS::OpenSplice::TypeSupportMetaHolder * clone();
::DDS::OpenSplice::DataWriter * create_datawriter ();
::DDS::OpenSplice::DataReader * create_datareader ();
::DDS::OpenSplice::DataReaderView * create_view ();
};
class ROSIDL_TYPESUPPORT_OPENSPLICE_CPP_PUBLIC_map_msgs Sample_SetMapProjections_Request_TypeSupport : public virtual Sample_SetMapProjections_Request_TypeSupportInterface,
public ::DDS::OpenSplice::TypeSupport
{
public:
Sample_SetMapProjections_Request_TypeSupport ();
virtual ~Sample_SetMapProjections_Request_TypeSupport ();
private:
Sample_SetMapProjections_Request_TypeSupport (const Sample_SetMapProjections_Request_TypeSupport &);
Sample_SetMapProjections_Request_TypeSupport & operator= (const Sample_SetMapProjections_Request_TypeSupport &);
};
typedef Sample_SetMapProjections_Request_TypeSupportInterface_var Sample_SetMapProjections_Request_TypeSupport_var;
typedef Sample_SetMapProjections_Request_TypeSupportInterface_ptr Sample_SetMapProjections_Request_TypeSupport_ptr;
class ROSIDL_TYPESUPPORT_OPENSPLICE_CPP_PUBLIC_map_msgs Sample_SetMapProjections_Request_DataWriter_impl : public virtual Sample_SetMapProjections_Request_DataWriter,
public ::DDS::OpenSplice::FooDataWriter_impl
{
friend class DDS::OpenSplice::Publisher;
friend class Sample_SetMapProjections_Request_TypeSupportMetaHolder;
public:
virtual ::DDS::InstanceHandle_t register_instance (
const Sample_SetMapProjections_Request_ & instance_data) THROW_ORB_EXCEPTIONS;
virtual ::DDS::InstanceHandle_t register_instance_w_timestamp (
const Sample_SetMapProjections_Request_ & instance_data,
const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t unregister_instance (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t unregister_instance_w_timestamp (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle,
const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t write (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t write_w_timestamp (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle,
const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t dispose (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t dispose_w_timestamp (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle,
const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t writedispose (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t writedispose_w_timestamp (
const Sample_SetMapProjections_Request_ & instance_data,
::DDS::InstanceHandle_t handle,
const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t get_key_value (
Sample_SetMapProjections_Request_ & key_holder,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::InstanceHandle_t lookup_instance (
const Sample_SetMapProjections_Request_ & instance_data) THROW_ORB_EXCEPTIONS;
protected:
Sample_SetMapProjections_Request_DataWriter_impl ();
virtual ~Sample_SetMapProjections_Request_DataWriter_impl ();
virtual DDS::ReturnCode_t init (
DDS::OpenSplice::Publisher *publisher,
DDS::OpenSplice::DomainParticipant *participant,
const DDS::DataWriterQos &qos,
DDS::OpenSplice::Topic *a_topic,
const char *name,
DDS::OpenSplice::cxxCopyIn copyIn,
DDS::OpenSplice::cxxCopyOut copyOut,
u_writerCopy writerCopy,
void *cdrMarshaler);
private:
Sample_SetMapProjections_Request_DataWriter_impl (const Sample_SetMapProjections_Request_DataWriter_impl &);
Sample_SetMapProjections_Request_DataWriter_impl & operator= (const Sample_SetMapProjections_Request_DataWriter_impl &);
};
class ROSIDL_TYPESUPPORT_OPENSPLICE_CPP_PUBLIC_map_msgs Sample_SetMapProjections_Request_DataReader_impl : public virtual Sample_SetMapProjections_Request_DataReader,
public ::DDS::OpenSplice::FooDataReader_impl
{
friend class DDS::OpenSplice::Subscriber;
friend class Sample_SetMapProjections_Request_TypeSupportMetaHolder;
friend class Sample_SetMapProjections_Request_DataReaderView_impl;
public:
virtual ::DDS::ReturnCode_t read (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_sample (
Sample_SetMapProjections_Request_ & received_data,
::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_sample (
Sample_SetMapProjections_Request_ & received_data,
::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_instance_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_instance_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t return_loan (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t get_key_value (
Sample_SetMapProjections_Request_ & key_holder,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::InstanceHandle_t lookup_instance (
const Sample_SetMapProjections_Request_ & instance) THROW_ORB_EXCEPTIONS;
protected:
Sample_SetMapProjections_Request_DataReader_impl ();
virtual ~Sample_SetMapProjections_Request_DataReader_impl ();
DDS::ReturnCode_t init (
DDS::OpenSplice::Subscriber *subscriber,
const DDS::DataReaderQos &qos,
DDS::OpenSplice::TopicDescription *a_topic,
const char *name,
DDS::OpenSplice::cxxCopyIn copyIn,
DDS::OpenSplice::cxxCopyOut copyOut,
DDS::OpenSplice::cxxReaderCopy readerCopy,
void *cdrMarshaler);
static void* dataSeqAlloc (
void * data_values,
DDS::ULong len);
static void dataSeqLength (
void * data_values,
DDS::ULong len);
static void * dataSeqGetBuffer (
void * data_values,
DDS::ULong index);
static void dataSeqCopyOut (
const void * from,
void * received_data);
static void copyDataOut(const void *from, void *to);
private:
Sample_SetMapProjections_Request_DataReader_impl (const Sample_SetMapProjections_Request_DataReader_impl &);
Sample_SetMapProjections_Request_DataReader_impl & operator= (const Sample_SetMapProjections_Request_DataReader_impl &);
static ::DDS::ReturnCode_t check_preconditions (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples);
};
class ROSIDL_TYPESUPPORT_OPENSPLICE_CPP_PUBLIC_map_msgs Sample_SetMapProjections_Request_DataReaderView_impl : public virtual Sample_SetMapProjections_Request_DataReaderView,
public ::DDS::OpenSplice::FooDataReaderView_impl
{
friend class DDS::OpenSplice::DataReader;
friend class Sample_SetMapProjections_Request_TypeSupportMetaHolder;
public:
virtual ::DDS::ReturnCode_t read (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_sample (
Sample_SetMapProjections_Request_ & received_data,
::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_sample (
Sample_SetMapProjections_Request_ & received_data,
::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_instance (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::SampleStateMask sample_states,
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t read_next_instance_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t take_next_instance_w_condition (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq,
::DDS::Long max_samples,
::DDS::InstanceHandle_t a_handle,
::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t return_loan (
Sample_SetMapProjections_Request_Seq & received_data,
::DDS::SampleInfoSeq & info_seq) THROW_ORB_EXCEPTIONS;
virtual ::DDS::ReturnCode_t get_key_value (
Sample_SetMapProjections_Request_ & key_holder,
::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS;
virtual ::DDS::InstanceHandle_t lookup_instance (
const Sample_SetMapProjections_Request_ & instance) THROW_ORB_EXCEPTIONS;
protected:
Sample_SetMapProjections_Request_DataReaderView_impl ();
virtual ~Sample_SetMapProjections_Request_DataReaderView_impl ();
virtual DDS::ReturnCode_t init (
DDS::OpenSplice::DataReader *reader,
const char *name,
const DDS::DataReaderViewQos &qos,
DDS::OpenSplice::cxxCopyIn copyIn,
DDS::OpenSplice::cxxCopyOut copyOut);
private:
Sample_SetMapProjections_Request_DataReaderView_impl (const Sample_SetMapProjections_Request_DataReaderView_impl &);
Sample_SetMapProjections_Request_DataReaderView_impl & operator= (const Sample_SetMapProjections_Request_DataReaderView_impl &);
};
}
}
}
#undef OS_API
#endif
|
#!/usr/bin/python
# Copyright (c) 2016 Hewlett-Packard Enterprise Corporation
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: os_keystone_domain_facts
short_description: Retrieve facts about one or more OpenStack domains
extends_documentation_fragment: openstack
version_added: "2.1"
author: "Ricardo Carrillo Cruz (@rcarrillocruz)"
description:
- Retrieve facts about a one or more OpenStack domains
requirements:
- "python >= 2.7"
- "sdk"
options:
name:
description:
- Name or ID of the domain
filters:
description:
- A dictionary of meta data to use for further filtering. Elements of
this dictionary may be additional dictionaries.
availability_zone:
description:
- Ignored. Present for backwards compatibility
'''
EXAMPLES = '''
# Gather facts about previously created domain
- os_keystone_domain_facts:
cloud: awesomecloud
- debug:
var: openstack_domains
# Gather facts about a previously created domain by name
- os_keystone_domain_facts:
cloud: awesomecloud
name: demodomain
- debug:
var: openstack_domains
# Gather facts about a previously created domain with filter
- os_keystone_domain_facts:
cloud: awesomecloud
name: demodomain
filters:
enabled: False
- debug:
var: openstack_domains
'''
RETURN = '''
openstack_domains:
description: has all the OpenStack facts about domains
returned: always, but can be null
type: complex
contains:
id:
description: Unique UUID.
returned: success
type: string
name:
description: Name given to the domain.
returned: success
type: string
description:
description: Description of the domain.
returned: success
type: string
enabled:
description: Flag to indicate if the domain is enabled.
returned: success
type: bool
'''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_module_kwargs, openstack_cloud_from_module
def main():
argument_spec = openstack_full_argument_spec(
name=dict(required=False, default=None),
filters=dict(required=False, type='dict', default=None),
)
module_kwargs = openstack_module_kwargs(
mutually_exclusive=[
['name', 'filters'],
]
)
module = AnsibleModule(argument_spec, **module_kwargs)
sdk, opcloud = openstack_cloud_from_module(module)
try:
name = module.params['name']
filters = module.params['filters']
if name:
# Let's suppose user is passing domain ID
try:
domains = opcloud.get_domain(name)
except:
domains = opcloud.search_domains(filters={'name': name})
else:
domains = opcloud.search_domains(filters)
module.exit_json(changed=False, ansible_facts=dict(
openstack_domains=domains))
except sdk.exceptions.OpenStackCloudException as e:
module.fail_json(msg=str(e))
if __name__ == '__main__':
main()
|
import CalendarLocale from '../../calendar/src/locale/he_IL';
import TimePickerLocale from '../../time-picker/locale/he_IL';
// Merge into a locale object
export default {
lang: {
placeholder: 'בחר תאריך',
rangePlaceholder: ['תאריך התחלה', 'תאריך סיום'],
...CalendarLocale
},
timePickerLocale: {
...TimePickerLocale
}
};
|
(function() {var implementors = {};
implementors["crossbeam_epoch"] = [{"text":"impl<T: ?<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a> + <a class=\"trait\" href=\"crossbeam_epoch/trait.Pointable.html\" title=\"trait crossbeam_epoch::Pointable\">Pointable</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"crossbeam_epoch/struct.Owned.html\" title=\"struct crossbeam_epoch::Owned\">Owned</a><T>","synthetic":false,"types":["crossbeam_epoch::atomic::Owned"]}];
implementors["crossbeam_utils"] = [{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"crossbeam_utils/struct.CachePadded.html\" title=\"struct crossbeam_utils::CachePadded\">CachePadded</a><T>","synthetic":false,"types":["crossbeam_utils::cache_padded::CachePadded"]},{"text":"impl<T: ?<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"crossbeam_utils/sync/struct.ShardedLockWriteGuard.html\" title=\"struct crossbeam_utils::sync::ShardedLockWriteGuard\">ShardedLockWriteGuard</a><'_, T>","synthetic":false,"types":["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]}];
implementors["either"] = [{"text":"impl<L, R> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"enum\" href=\"either/enum.Either.html\" title=\"enum either::Either\">Either</a><L, R> <span class=\"where fmt-newline\">where<br> L: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a>,<br> R: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a><Target = L::<a class=\"type\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target\" title=\"type core::ops::deref::Deref::Target\">Target</a>>, </span>","synthetic":false,"types":["either::Either"]}];
implementors["gltf"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"gltf/struct.Gltf.html\" title=\"struct gltf::Gltf\">Gltf</a>","synthetic":false,"types":["gltf::Gltf"]}];
implementors["image"] = [{"text":"impl<P, Container> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"image/struct.ImageBuffer.html\" title=\"struct image::ImageBuffer\">ImageBuffer</a><P, Container> <span class=\"where fmt-newline\">where<br> P: <a class=\"trait\" href=\"image/trait.Pixel.html\" title=\"trait image::Pixel\">Pixel</a> + 'static,<br> P::<a class=\"type\" href=\"image/trait.Pixel.html#associatedtype.Subpixel\" title=\"type image::Pixel::Subpixel\">Subpixel</a>: 'static,<br> Container: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a><Target = <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.slice.html\">[</a>P::<a class=\"type\" href=\"image/trait.Pixel.html#associatedtype.Subpixel\" title=\"type image::Pixel::Subpixel\">Subpixel</a><a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.slice.html\">]</a>> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a>, </span>","synthetic":false,"types":["image::buffer_::ImageBuffer"]}];
implementors["scopeguard"] = [{"text":"impl<T, F, S> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"scopeguard/struct.ScopeGuard.html\" title=\"struct scopeguard::ScopeGuard\">ScopeGuard</a><T, F, S> <span class=\"where fmt-newline\">where<br> F: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T),<br> S: <a class=\"trait\" href=\"scopeguard/trait.Strategy.html\" title=\"trait scopeguard::Strategy\">Strategy</a>, </span>","synthetic":false,"types":["scopeguard::ScopeGuard"]}];
implementors["syn"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Underscore.html\" title=\"struct syn::token::Underscore\">Underscore</a>","synthetic":false,"types":["syn::token::Underscore"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Add.html\" title=\"struct syn::token::Add\">Add</a>","synthetic":false,"types":["syn::token::Add"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.And.html\" title=\"struct syn::token::And\">And</a>","synthetic":false,"types":["syn::token::And"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.At.html\" title=\"struct syn::token::At\">At</a>","synthetic":false,"types":["syn::token::At"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Bang.html\" title=\"struct syn::token::Bang\">Bang</a>","synthetic":false,"types":["syn::token::Bang"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Caret.html\" title=\"struct syn::token::Caret\">Caret</a>","synthetic":false,"types":["syn::token::Caret"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Colon.html\" title=\"struct syn::token::Colon\">Colon</a>","synthetic":false,"types":["syn::token::Colon"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Comma.html\" title=\"struct syn::token::Comma\">Comma</a>","synthetic":false,"types":["syn::token::Comma"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Div.html\" title=\"struct syn::token::Div\">Div</a>","synthetic":false,"types":["syn::token::Div"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Dollar.html\" title=\"struct syn::token::Dollar\">Dollar</a>","synthetic":false,"types":["syn::token::Dollar"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Dot.html\" title=\"struct syn::token::Dot\">Dot</a>","synthetic":false,"types":["syn::token::Dot"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Eq.html\" title=\"struct syn::token::Eq\">Eq</a>","synthetic":false,"types":["syn::token::Eq"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Gt.html\" title=\"struct syn::token::Gt\">Gt</a>","synthetic":false,"types":["syn::token::Gt"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Lt.html\" title=\"struct syn::token::Lt\">Lt</a>","synthetic":false,"types":["syn::token::Lt"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Or.html\" title=\"struct syn::token::Or\">Or</a>","synthetic":false,"types":["syn::token::Or"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Pound.html\" title=\"struct syn::token::Pound\">Pound</a>","synthetic":false,"types":["syn::token::Pound"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Question.html\" title=\"struct syn::token::Question\">Question</a>","synthetic":false,"types":["syn::token::Question"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Rem.html\" title=\"struct syn::token::Rem\">Rem</a>","synthetic":false,"types":["syn::token::Rem"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Semi.html\" title=\"struct syn::token::Semi\">Semi</a>","synthetic":false,"types":["syn::token::Semi"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Star.html\" title=\"struct syn::token::Star\">Star</a>","synthetic":false,"types":["syn::token::Star"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Sub.html\" title=\"struct syn::token::Sub\">Sub</a>","synthetic":false,"types":["syn::token::Sub"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"syn/token/struct.Tilde.html\" title=\"struct syn::token::Tilde\">Tilde</a>","synthetic":false,"types":["syn::token::Tilde"]}];
implementors["vek"] = [{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/vec2/struct.Vec2.html\" title=\"struct vek::vec::repr_c::vec2::Vec2\">Vec2</a><T>","synthetic":false,"types":["vek::vec::repr_c::vec2::Vec2"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/vec3/struct.Vec3.html\" title=\"struct vek::vec::repr_c::vec3::Vec3\">Vec3</a><T>","synthetic":false,"types":["vek::vec::repr_c::vec3::Vec3"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/vec4/struct.Vec4.html\" title=\"struct vek::vec::repr_c::vec4::Vec4\">Vec4</a><T>","synthetic":false,"types":["vek::vec::repr_c::vec4::Vec4"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/extent3/struct.Extent3.html\" title=\"struct vek::vec::repr_c::extent3::Extent3\">Extent3</a><T>","synthetic":false,"types":["vek::vec::repr_c::extent3::Extent3"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/extent2/struct.Extent2.html\" title=\"struct vek::vec::repr_c::extent2::Extent2\">Extent2</a><T>","synthetic":false,"types":["vek::vec::repr_c::extent2::Extent2"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/rgba/struct.Rgba.html\" title=\"struct vek::vec::repr_c::rgba::Rgba\">Rgba</a><T>","synthetic":false,"types":["vek::vec::repr_c::rgba::Rgba"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_c/rgb/struct.Rgb.html\" title=\"struct vek::vec::repr_c::rgb::Rgb\">Rgb</a><T>","synthetic":false,"types":["vek::vec::repr_c::rgb::Rgb"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/vec2/struct.Vec2.html\" title=\"struct vek::vec::repr_simd::vec2::Vec2\">Vec2</a><T>","synthetic":false,"types":["vek::vec::repr_simd::vec2::Vec2"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/vec3/struct.Vec3.html\" title=\"struct vek::vec::repr_simd::vec3::Vec3\">Vec3</a><T>","synthetic":false,"types":["vek::vec::repr_simd::vec3::Vec3"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/vec4/struct.Vec4.html\" title=\"struct vek::vec::repr_simd::vec4::Vec4\">Vec4</a><T>","synthetic":false,"types":["vek::vec::repr_simd::vec4::Vec4"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/extent3/struct.Extent3.html\" title=\"struct vek::vec::repr_simd::extent3::Extent3\">Extent3</a><T>","synthetic":false,"types":["vek::vec::repr_simd::extent3::Extent3"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/extent2/struct.Extent2.html\" title=\"struct vek::vec::repr_simd::extent2::Extent2\">Extent2</a><T>","synthetic":false,"types":["vek::vec::repr_simd::extent2::Extent2"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/rgba/struct.Rgba.html\" title=\"struct vek::vec::repr_simd::rgba::Rgba\">Rgba</a><T>","synthetic":false,"types":["vek::vec::repr_simd::rgba::Rgba"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"vek/vec/repr_simd/rgb/struct.Rgb.html\" title=\"struct vek::vec::repr_simd::rgb::Rgb\">Rgb</a><T>","synthetic":false,"types":["vek::vec::repr_simd::rgb::Rgb"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
/*
Share.init(Str button class);
*/
; var Share;
;(function() {
'use strict';
var encodedHref = encodeURIComponent(window.location.href);
Share = {
network: function(elem) {
var net = elem.getAttribute('data-network');
if (!net) {
return;
}
var url;
switch (net) {
case 'vk':
url = 'http://vkontakte.ru/share.php?url='+ encodedHref;
break;
case 'fb':
url = 'http://www.facebook.com/sharer.php?u='+ encodedHref;
break;
case 'tw':
url = 'http://twitter.com/share?url='+ encodedHref;
break;
case 'ok':
url = 'https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl='+ encodedHref;
break;
}
this.popup(url);
},
popup: function(url) {
window.open(url, '', 'toolbar=0,status=0,width=626,height=436');
},
init: function(elementStr) {
document.addEventListener('click', (e) => {
var elem = e.target.closest(elementStr);
if (!elem) {
return;
}
e.preventDefault();
this.network(elem);
});
}
};
})();
|
import path from 'path'
const formidable = require('formidable');
import feathersErrors from 'feathers-errors'
import fs from 'fs';
import fsExtra from 'fs-extra'
const decompress = require('decompress')
const exec = require('child_process').exec
import compileIndex from '../../../components/compile-index';
import themes from '../../../components/seed/seed/themes'
import extensions from '../../../components/seed/seed/extensions'
const collections = [
"extensions",
"themes",
"bans",
"comments",
"custom",
"images",
"menus",
"pages",
"roles",
"settings",
"staging",
"users"
]
export default function(req, res, next) {
if(req.method !== "POST") { return next() }
function importCollection(collection) {
return new Promise(async (resolve, reject) => {
if(!collection || !req.app.get('importContentPath')) { return reject('missing either the collection, or importContentPath')}
const url = path.join(req.app.get('importContentPath'), 'data', collection + '.json');
try {
const items = JSON.parse(fs.readFileSync(url, 'utf8'))
const createdItems = await req.app.service(collection).create(items)
console.log(`Successfully imported ${collection}.`);
return resolve(`Successfully imported ${collection}.`)
} catch(err) {
console.log('Error parsing imported data and importing.', err);
return resolve('Error parsing imported data and importing.')
}
// const child = exec(`mongoimport --db ${req.app.get('db')} --collection ${collection} --file ${path.join(req.app.get('exportPath'), 'data', collection + '.json')} --jsonArray`)
// child.on('close', function(code) {
// console.log(`Import of ${collection} was successful`);
// return resolve(`Import of ${collection} was successful`)
// })
})
}
async function removeData(name) {
console.log('resetting ' + name);
await req.app.service(name).remove(null, {query:{}})
}
if(!req.app || !req.app.get('importPath')) {
next(new Error('importPath not found on server'));
}
var createdFolderName = '125098dsflkj1324';
var createdFolderPath = path.join(req.app.get('importPath'));
try {
var form = new formidable.IncomingForm();
form.keepExtensions = true;
form.parse(req, function(err, fields, files) {
if(err) {
console.log("Error parsing zip: ", err);
return next(new feathersErrors.NotAcceptable('The zip folder must be compressed in the correct format.'));
}
if(!files || !files.file) {
return next(new feathersErrors.NotAcceptable('The zip folder must be compressed.'));
}
var tempFilePath = files.file.path;
var fileName = files.file.name;
var contentType = files.file.type;
decompress(tempFilePath, req.app.get('importPath')).then(async () => {
let currentPath = path.join(req.app.get('importContentPath'))
try {
let includeThemes = req.query.includeThemes
if(typeof includeThemes === 'string') {
includeThemes = includeThemes.toLowerCase() === 'true'
}
if(includeThemes) {
console.log('loading themes');
fsExtra.copySync(path.join(currentPath, 'themes'), req.app.get('themesPath'))
}
let includeExtensions = req.query.includeExtensions
if(typeof includeExtensions === 'string') {
includeExtensions = includeExtensions.toLowerCase() === 'true'
}
if(includeExtensions) {
console.log('loading extensions');
fsExtra.copySync(path.join(currentPath, 'extensions'), req.app.get('extensionsPath'))
}
let includeImages = req.query.includeImages
if(typeof includeImages === 'string') {
includeImages = includeImages.toLowerCase() === 'true'
}
if(includeImages) {
console.log('loading images');
fsExtra.copySync(path.join(currentPath, 'images'), req.app.get('uploadsPath'))
}
let includeUsers = req.query.includeUsersAndRoles
if(typeof includeUsers === 'string') {
includeUsers = includeUsers.toLowerCase() === 'true'
}
let includePagesMenus = req.query.includePagesMenus
if(typeof includePagesMenus === 'string') {
includePagesMenus = includePagesMenus.toLowerCase() === 'true'
}
let includeComments = req.query.includeComments
if(typeof includeComments === 'string') {
includeComments = includeComments.toLowerCase() === 'true'
}
let includeSettings = req.query.includeSettings
if(typeof includeSettings === 'string') {
includeSettings = includeSettings.toLowerCase() === 'true'
}
for (var i = 0; i < collections.length; i++) {
let doesFileExist = fs.lstatSync(path.join(currentPath, 'data', collections[i] + '.json'))
try {
if(
( (collections[i] === 'users' || collections[i] === 'roles') && includeUsers) ||
( (collections[i] === 'pages' || collections[i] === 'menus') && includePagesMenus) ||
( collections[i] === 'comments' && includeComments) ||
( collections[i] === 'settings' && includeSettings)
) {
if(doesFileExist) {
console.log("loading collection", collections[i]);
await removeData(collections[i])
let response = await importCollection(collections[i])
}
}
} catch(err) {
console.log("Error importing data", err);
break
return next(err)
}
}
console.log("success!")
await themes.call(req.app)
await extensions.call(req.app)
compileIndex.call(req.app);
console.log('Recompiling index.html');
next()
} catch (err) {
console.error(err)
return next(err)
}
next()
}, function(err) {
console.log('Error unzipping import data from another meanbase site', err);
next(err)
})
});
} catch(err) {
return next(err);
}
}
|
import os
import torch
import sys
from utils import extend, get_printer
def generate_data(lms_clean_root: str):
torch.manual_seed(0)
# model
input = torch.randn(2, 1, 3, 3)
input.requires_grad = True
weight = torch.randn(2, 1, 3, 3)
weight.requires_grad = True
m = torch.nn.ELU(alpha=1.0)
loss = input + m(weight)
loss.sum().backward()
# printer
printer = get_printer(lms_clean_root, test_name = "elu")
printer("input", input, dim=0, degree=2)
printer("weight", weight, dim=0, degree=2)
printer("loss", loss, dim=0, degree=2)
printer("weight_grad", weight.grad, dim=0, degree=2)
printer("input_grad", input.grad, dim=0, degree=2)
if __name__ == '__main__':
assert len(sys.argv) > 1, "must provide lms_clean_root dir"
generate_data(sys.argv[1])
|
let calculator = prompt('Введіть математичну операцію в форматі "2 + 5" (також можна -, /, *, ^). Між числами та знаком дії ОБОВ\'ЯЗКОВО пробіл. Інший запис програма не розпізнає й видасть невірну відповідь!');
if(calculator === null){
alert('Я тут для того, щоб рахувати, а ви мене закриваєте. Грубо з вашого боку. Якщо це повториться, то я вже не запропоную вам провести операцію Т-Т');
calculator = prompt('Введіть математичну операцію в форматі "2 + 5" (також можна -, /, *, ^). Між числами та знаком дії ОБОВ\'ЯЗКОВО пробіл. Інший запис програма не розпізнає й видасть невірну відповідь!');
}
let calcArr = calculator.split(' ');
let solution;
if(calculator === '0.1 + 0.2' || calculator === '0.2 + 0.1'){
solution = (0.1 * 10 + 0.2 * 10) / 10;
} else{
switch(calcArr[1]){
case '+': solution = parseFloat(calcArr[0]) + parseFloat(calcArr[2]); break;
case '-': solution = parseFloat(calcArr[0]) - parseFloat(calcArr[2]); break;
case '*': solution = parseFloat(calcArr[0]) * parseFloat(calcArr[2]); break;
case '/': solution = parseFloat(calcArr[0]) / parseFloat(calcArr[2]); break;
case '^': solution = Math.pow(parseFloat(calcArr[0]) , parseFloat(calcArr[2])); break;
}
}
alert(solution);
// if(calcArr[1] === '+'){
// solution = parseFloat(calcArr[0]) + parseFloat(calcArr[2]);
// }
// if(calcArr[1] === '-'){
// solution = parseFloat(calcArr[0]) - parseFloat(calcArr[2]);
// }
// if(calcArr[1] === '*'){
// solution = parseFloat(calcArr[0]) * parseFloat(calcArr[2]);
// }
// if(calcArr[1] === '/'){
// solution = parseFloat(calcArr[0]) / parseFloat(calcArr[2]);
// }
// if(calcArr[1] === '^'){
// solution = Math.pow(parseFloat(calcArr[0]) , parseFloat(calcArr[2]));
// }
|
const sequelize = require('../config/connection');
const { User, Post } = require('../models');
const userdata = [
{
userId: '1',
username: 'alesmonde0',
email: 'nwestnedge0@cbc.ca',
password: 'password123'
},
{
userId: '2',
username: 'jwilloughway1',
email: 'rmebes1@sogou.com',
password: 'password123'
},
{
userId: '3',
username: 'iboddam2',
email: 'cstoneman2@last.fm',
password: 'password123'
},
{
userId: '4',
username: 'dstanmer3',
email: 'ihellier3@goo.ne.jp',
password: 'password123'
},
{
userId: '5',
username: 'djiri4',
email: 'gmidgley4@weather.com',
password: 'password123'
},
{
userId: '6',
username: 'msprague5',
email: 'larnout5@imdb.com',
password: 'password123'
},
{
userId: '7',
username: 'mpergens6',
email: 'hnapleton6@feedburner.com',
password: 'password123'
},
{
userId: '8',
username: 'tpenniell7',
email: 'kperigo7@china.com.cn',
password: 'password123'
},
{
userId: '9',
username: 'msabbins8',
email: 'lmongain8@google.ru',
password: 'password123'
},
{
userId: '10',
username: 'jmacarthur9',
email: 'bsteen9@epa.gov',
password: 'password123'
}
];
const seedUsers = () => User.bulkCreate(userdata, {individualHooks: true});
module.exports = seedUsers;
|
function show() {
'use strict';
// Generic setup, map is standard 960×500
var margin = {top: 100, bottom: 10, right: 70, left: 50},
width = 1200 - margin.left - margin.right,
height = 800 - margin.top - margin.bottom;
// create the standard chart
var svg = d3.select(".chart")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// contains data when loaded
var quakes = [];
var topo = {};
var currentYear = 1850;
// containers for the map and the circles on top
var map = svg.append("g").attr("class","map");
var circles = svg.append("g");
circles.attr("clip-path","url(#clip-1)");
// setup and connect the slider
d3.select(".year-select")
.attr("width", width + margin.left + margin.right);
d3.select("#slider").on("change", function() {
currentYear = +this.value;
updateYear(currentYear, quakes)
});
// setup the projection, and the path generator
var projection = d3.geoAiry();
var path = d3.geoPath().projection(projection);
// select and connect the dropdown
d3.select("#geoSelection").on("change", function() {
projection = d3[this.value]();
path = d3.geoPath().projection(projection);
updateYear(currentYear, quakes);
process(topo);
});
// setup the title
var text = svg.append("g")
.attr("transform", "translate(" + (width/2) + " -60)")
text.append("text").attr("class", "title").attr("text-anchor", "middle")
.text("World Earthquake data");
text.append("text").attr("class", "year").attr("transform", "translate(" + 0 + " 40)")
.attr("text-anchor", "middle");
// setup scales
var radiusScale = d3.scaleLinear().domain([5, 10]).range([0.2, 4]);
var colScale = d3.scaleLinear().domain([5, 10]).range([0,1]);
var color = function(m) { return d3.interpolateBlues((colScale(m)));};
// load the data, and pass it on to the updateYear function.
d3.queue()
.defer(d3.json, "./data/world-110m.v1.json")
.defer(d3.tsv, "./data/earthquakes.tsv")
.await(function (error, topoData, quakesData) {
topo = topoData;
quakes = quakesData;
process(topo);
quakes.forEach(function (d) {
d.LATITUDE = +d.LATITUDE;
d.LONGITUDE = +d.LONGITUDE;
d.EQ_PRIMARY = +d.EQ_PRIMARY;
d.YEAR = +d.YEAR;
})
updateYear(1850, quakes)
});
// update the earthquake circles
function updateYear(year, quakes) {
d3.select("text.year").text(year);
var toShow = quakes.filter(function(d) {return d.YEAR === year});
var circle = d3.geoCircle()
var paths = circles.selectAll("path")
.data(toShow);
var bpaths = paths.enter()
.append("path")
.merge(paths);
bpaths.attr("d", function(d) {
return path(circle.center([d.LONGITUDE, d.LATITUDE]).radius(radiusScale(d.EQ_PRIMARY))())
}).attr("style", function(d) {return "fill: " + color(d.EQ_PRIMARY)});
paths.exit().remove();
}
// display the map
function process (topo) {
// first remove everything, cause we might have switched projection
map.selectAll("path").remove();
d3.selectAll("defs").remove();
// define a custom feature, which creates the outline of the map
var f = {type: "Sphere"}
// make the complete map fit into the designated width and height
projection.fitSize([width, height], f)
// create a path and draw it.
var outline = path(f);
map.append("path").attr("class", "sphere").attr("d", outline);
// create and add a clippath to hide some artifacts
d3.select(".chart").append("defs").append("clipPath")
.attr("id","clip-1")
.append("path").attr("d", outline);
map.attr("clip-path","url(#clip-1)");
// first display all the counties.
map.selectAll(".country")
.data(topojson.feature(topo, topo.objects.countries).features)
.enter()
.append("path")
.attr("class","country")
.attr("d", path)
// add lines
map.append("path").datum(d3.geoGraticule()()).attr("class","graticule").attr("d", path);
// add the legend at the bottom
var legend = svg.append("g").attr("class","legend")
.attr("transform" ,"translate(" + (width+20) + " 70)")
legend.append("rect").attr('x', 0)
.attr('width', 20)
.attr('height', 500)
.style("fill", "url(#Gradient)");
legend.append("text")
.attr('x', 25)
.attr('y', 10)
.text("5");
legend.append("text")
.attr('x', 25)
.attr('y', 500)
.text("10");
legend.append("text")
.attr('x', 250)
.attr("text-anchor", "middle")
.attr('y', -30)
.attr('transform', 'rotate(90)')
.text("magnitude");
var defs = svg.append('defs');
var lg = defs.append('linearGradient')
.attr('id', 'Gradient')
.attr('x1', 0).attr('x2', 0).attr('y1', 0).attr('y2', 1);
lg.append('stop')
.attr('offset', '0%')
.attr('stop-color', color(5));
lg.append('stop')
.attr('offset', '100%')
.attr('stop-color', color(10));
};
}
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_CHECK_CLIENT_DOWNLOAD_REQUEST_H_
#define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_CHECK_CLIENT_DOWNLOAD_REQUEST_H_
#include <stdint.h>
#include <string>
#include <vector>
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.h"
#include "chrome/browser/safe_browsing/download_protection/check_client_download_request_base.h"
#include "chrome/browser/safe_browsing/download_protection/download_protection_util.h"
#include "components/download/public/common/download_item.h"
#include "content/public/browser/browser_thread.h"
#include "url/gurl.h"
namespace profile {
class Profile;
}
namespace safe_browsing {
class CheckClientDownloadRequest : public CheckClientDownloadRequestBase,
public download::DownloadItem::Observer {
public:
CheckClientDownloadRequest(
download::DownloadItem* item,
CheckDownloadRepeatingCallback callback,
DownloadProtectionService* service,
scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
scoped_refptr<BinaryFeatureExtractor> binary_feature_extractor);
~CheckClientDownloadRequest() override;
// download::DownloadItem::Observer:
void OnDownloadDestroyed(download::DownloadItem* download) override;
void OnDownloadUpdated(download::DownloadItem* download) override;
static bool IsSupportedDownload(const download::DownloadItem& item,
const base::FilePath& target_path,
DownloadCheckResultReason* reason);
private:
// CheckClientDownloadRequestBase overrides:
bool IsSupportedDownload(DownloadCheckResultReason* reason) override;
content::BrowserContext* GetBrowserContext() const override;
bool IsCancelled() override;
base::WeakPtr<CheckClientDownloadRequestBase> GetWeakPtr() override;
void NotifySendRequest(const ClientDownloadRequest* request) override;
void SetDownloadPingToken(const std::string& token) override;
void MaybeStorePingsForDownload(DownloadCheckResult result,
bool upload_requested,
const std::string& request_data,
const std::string& response_body) override;
// Uploads the binary for deep scanning if the reason and policies indicate
// it should be. ShouldUploadBinary will returns the settings to apply for
// deep scanning if it should occur, or absl::nullopt if no scan should be
// done.
absl::optional<enterprise_connectors::AnalysisSettings> ShouldUploadBinary(
DownloadCheckResultReason reason) override;
void UploadBinary(DownloadCheckResultReason reason,
enterprise_connectors::AnalysisSettings settings) override;
// Called when this request is completed.
void NotifyRequestFinished(DownloadCheckResult result,
DownloadCheckResultReason reason) override;
// Called when finishing the download, to decide whether to prompt the user
// for deep scanning or not.
bool ShouldPromptForDeepScanning(DownloadCheckResultReason reason,
bool server_requests_prompt) const override;
bool IsAllowlistedByPolicy() const override;
bool IsUnderAdvancedProtection(Profile* profile) const;
// The DownloadItem we are checking. Will be NULL if the request has been
// canceled. Must be accessed only on UI thread.
download::DownloadItem* item_;
CheckDownloadRepeatingCallback callback_;
// Upload start time used for UMA duration histograms.
base::TimeTicks upload_start_time_;
base::WeakPtrFactory<CheckClientDownloadRequest> weakptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(CheckClientDownloadRequest);
};
} // namespace safe_browsing
#endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_CHECK_CLIENT_DOWNLOAD_REQUEST_H_
|
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
this.iterationCombobox = this.add({
xtype: 'rallyiterationcombobox',
listeners: {
ready: this._onIterationComboboxLoad,
select: this._onIterationComboboxChanged,
scope: this
}
});
},
_onIterationComboboxLoad: function() {
var addNewConfig = {
xtype: 'rallyaddnew',
recordTypes: ['User Story', 'Defect'],
ignoredRequiredFields: ['Name', 'ScheduleState', 'Project'],
showAddWithDetails: false,
listeners: {
beforecreate: this._onBeforeCreate,
scope: this
}
};
this.addNew = this.add(addNewConfig);
var cardBoardConfig = {
xtype: 'rallycardboard',
types: ['Defect', 'User Story'],
attribute: 'ScheduleState',
storeConfig: {
filters: [this.iterationCombobox.getQueryFromSelected()]
}
};
this.cardBoard = this.add(cardBoardConfig);
},
_onBeforeCreate: function(addNewComponent, record) {
record.set('Iteration', this.iterationCombobox.getValue());
},
_onIterationComboboxChanged: function() {
var config = {
storeConfig: {
filters: [this.iterationCombobox.getQueryFromSelected()]
}
};
this.cardBoard.refresh(config);
}
});
|
/*
* # Semantic - Modal
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributor
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ( $, window, document, undefined ) {
"use strict";
$.fn.modal = function(parameters) {
var
$allModules = $(this),
$window = $(window),
$document = $(document),
$body = $('body'),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
requestAnimationFrame = window.requestAnimationFrame
|| window.mozRequestAnimationFrame
|| window.webkitRequestAnimationFrame
|| window.msRequestAnimationFrame
|| function(callback) { setTimeout(callback, 0); },
returnedValue
;
$allModules
.each(function() {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.modal.settings, parameters)
: $.extend({}, $.fn.modal.settings),
selector = settings.selector,
className = settings.className,
namespace = settings.namespace,
error = settings.error,
eventNamespace = '.' + namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$context = $(settings.context),
$close = $module.find(selector.close),
$allModals,
$otherModals,
$focusedElement,
$dimmable,
$dimmer,
element = this,
instance = $module.data(moduleNamespace),
elementNamespace,
id,
observer,
module
;
module = {
initialize: function() {
module.verbose('Initializing dimmer', $context);
if($.fn.dimmer === undefined) {
module.error(error.dimmer);
return;
}
id = module.get.uniqueID();
elementNamespace = '.' + id;
$dimmable = $context
.dimmer({
debug : settings.debug,
dimmerName : 'modals',
closable : false,
useCSS : true,
duration : {
show : settings.duration * 0.9,
hide : settings.duration * 1.1
}
})
;
if(settings.detachable) {
$dimmable.dimmer('add content', $module);
}
$dimmer = $dimmable.dimmer('get dimmer');
module.refreshModals();
module.verbose('Attaching close events', $close);
module.bind.events();
module.observeChanges();
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of modal');
instance = module;
$module
.data(moduleNamespace, instance)
;
},
destroy: function() {
module.verbose('Destroying previous modal');
$module
.removeData(moduleNamespace)
.off(eventNamespace)
;
$window.off(elementNamespace);
$close.off(eventNamespace);
$context.dimmer('destroy');
},
observeChanges: function() {
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
module.debug('DOM tree modified, refreshing');
module.refresh();
});
observer.observe(element, {
childList : true,
subtree : true
});
module.debug('Setting up mutation observer', observer);
}
},
refresh: function() {
module.remove.scrolling();
module.cacheSizes();
module.set.screenHeight();
module.set.type();
module.set.position();
},
refreshModals: function() {
$otherModals = $module.siblings(selector.modal);
$allModals = $otherModals.add($module);
},
attachEvents: function(selector, event) {
var
$toggle = $(selector)
;
event = $.isFunction(module[event])
? module[event]
: module.toggle
;
if($toggle.size() > 0) {
module.debug('Attaching modal events to element', selector, event);
$toggle
.off(eventNamespace)
.on('click' + eventNamespace, event)
;
}
else {
module.error(error.notFound, selector);
}
},
bind: {
events: function() {
$close
.on('click' + eventNamespace, module.event.close)
;
$window
.on('resize' + elementNamespace, module.event.resize)
;
}
},
get: {
uniqueID: function() {
return (Math.random().toString(16) + '000000000').substr(2,8);
}
},
event: {
close: function() {
module.verbose('Closing element pressed');
if( $(this).is(selector.approve) ) {
if($.proxy(settings.onApprove, element)() !== false) {
module.hide();
}
else {
module.verbose('Approve callback returned false cancelling hide');
}
}
else if( $(this).is(selector.deny) ) {
if($.proxy(settings.onDeny, element)() !== false) {
module.hide();
}
else {
module.verbose('Deny callback returned false cancelling hide');
}
}
else {
module.hide();
}
},
click: function(event) {
if( $(event.target).closest($module).size() === 0 ) {
module.debug('Dimmer clicked, hiding all modals');
if( module.is.active() ) {
module.remove.clickaway();
if(settings.allowMultiple) {
module.hide();
}
else {
module.hideAll();
}
}
}
},
debounce: function(method, delay) {
clearTimeout(module.timer);
module.timer = setTimeout(method, delay);
},
keyboard: function(event) {
var
keyCode = event.which,
escapeKey = 27
;
if(keyCode == escapeKey) {
if(settings.closable) {
module.debug('Escape key pressed hiding modal');
module.hide();
}
else {
module.debug('Escape key pressed, but closable is set to false');
}
event.preventDefault();
}
},
resize: function() {
if( $dimmable.dimmer('is active') ) {
requestAnimationFrame(module.refresh);
}
}
},
toggle: function() {
if( module.is.active() || module.is.animating() ) {
module.hide();
}
else {
module.show();
}
},
show: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
module.refreshModals();
module.showDimmer();
module.showModal(callback);
},
hide: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
module.refreshModals();
if( !module.othersActive() ) {
module.hideDimmer();
}
module.hideModal(callback);
},
showModal: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
if( !module.is.active() ) {
if( !settings.allowMultiple && $otherModals.filter(':visible').size() > 0) {
module.debug('Other modals visible, queueing show animation');
module.hideOthers(module.showModal);
}
else {
$.proxy(settings.onShow, element)();
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.debug('Showing modal with css animations');
module.cacheSizes();
module.set.position();
module.set.screenHeight();
module.set.type();
module.set.clickaway();
$module
.transition({
debug : settings.debug,
animation : settings.transition + ' in',
queue : false,
duration : settings.duration,
onComplete : function() {
$.proxy(settings.onVisible, element)();
module.add.keyboardShortcuts();
module.save.focus();
module.set.active();
module.set.autofocus();
callback();
}
})
;
}
else {
module.debug('Showing modal with javascript');
$module
.fadeIn(settings.duration, settings.easing, function() {
$.proxy(settings.onVisible, element)();
module.add.keyboardShortcuts();
module.save.focus();
module.set.active();
callback();
})
;
}
}
}
else {
module.debug('Modal is already visible');
}
},
showDimmer: function() {
if( !$dimmable.dimmer('is active') ) {
module.debug('Showing dimmer');
$dimmable.dimmer('show');
}
else {
module.debug('Dimmer already visible');
}
},
hideDimmer: function() {
if( !($dimmable.dimmer('is active') || $dimmable.dimmer('is animating')) ) {
module.debug('Dimmer is not visible cannot hide');
return;
}
module.debug('Hiding dimmer');
$dimmable.dimmer('hide', function() {
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.remove.clickaway();
module.remove.screenHeight();
}
});
},
hideModal: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
module.debug('Hiding modal');
$.proxy(settings.onHide, element)();
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.remove.active();
$module
.transition({
debug : settings.debug,
animation : settings.transition + ' out',
queue : false,
duration : settings.duration,
onStart : function() {
module.remove.keyboardShortcuts();
},
onComplete : function() {
$.proxy(settings.onHidden, element)();
module.restore.focus();
callback();
}
})
;
}
else {
module.remove.active();
module.remove.keyboardShortcuts();
$module
.fadeOut(settings.duration, settings.easing, function() {
$.proxy(settings.onHidden, element)();
module.restore.focus();
callback();
})
;
}
},
hideAll: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
if( $allModals.is(':visible') ) {
module.debug('Hiding all visible modals');
module.hideDimmer();
$allModals
.filter(':visible')
.modal('hide modal', callback)
;
}
},
hideOthers: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
if( $otherModals.is(':visible') ) {
module.debug('Hiding other modals', $otherModals);
$otherModals
.filter(':visible')
.modal('hide modal', callback)
;
}
},
othersActive: function() {
return ($otherModals.filter('.' + className.active).size() > 0);
},
add: {
keyboardShortcuts: function() {
module.verbose('Adding keyboard shortcuts');
$document
.on('keyup' + eventNamespace, module.event.keyboard)
;
}
},
save: {
focus: function() {
$focusedElement = $(document.activeElement).blur();
}
},
restore: {
focus: function() {
if($focusedElement && $focusedElement.size() > 0) {
$focusedElement.focus();
}
}
},
remove: {
active: function() {
$module.removeClass(className.active);
},
clickaway: function() {
if(settings.closable) {
$dimmer
.off('click' + elementNamespace)
;
}
},
screenHeight: function() {
if(module.cache.height > module.cache.pageHeight) {
module.debug('Removing page height');
$body
.css('height', '')
;
}
},
keyboardShortcuts: function() {
module.verbose('Removing keyboard shortcuts');
$document
.off('keyup' + eventNamespace)
;
},
scrolling: function() {
$dimmable.removeClass(className.scrolling);
$module.removeClass(className.scrolling);
}
},
cacheSizes: function() {
var
modalHeight = $module.outerHeight()
;
if(module.cache === undefined || modalHeight !== 0) {
module.cache = {
pageHeight : $(document).outerHeight(),
height : modalHeight + settings.offset,
contextHeight : (settings.context == 'body')
? $(window).height()
: $dimmable.height()
};
}
module.debug('Caching modal and container sizes', module.cache);
},
can: {
fit: function() {
return (module.cache.height < module.cache.contextHeight);
}
},
is: {
active: function() {
return $module.hasClass(className.active);
},
animating: function() {
return $module.transition('is supported')
? $module.transition('is animating')
: $module.is(':visible')
;
},
scrolling: function() {
return $dimmable.hasClass(className.scrolling);
},
modernBrowser: function() {
// appName for IE11 reports 'Netscape' can no longer use
return !(window.ActiveXObject || "ActiveXObject" in window);
}
},
set: {
autofocus: function() {
if(settings.autofocus) {
var
$inputs = $module.find(':input:visible'),
$autofocus = $inputs.filter('[autofocus]'),
$input = ($autofocus.size() > 0)
? $autofocus
: $inputs
;
$input.first().focus();
}
},
clickaway: function() {
if(settings.closable) {
$dimmer
.on('click' + elementNamespace, module.event.click)
;
}
},
screenHeight: function() {
if(module.cache.height > module.cache.pageHeight) {
module.debug('Modal is taller than page content, resizing page height');
$body
.css('height', module.cache.height + settings.padding)
;
}
else {
$body.css('height', '');
}
},
active: function() {
$module.addClass(className.active);
},
scrolling: function() {
$dimmable.addClass(className.scrolling);
$module.addClass(className.scrolling);
},
type: function() {
if(module.can.fit()) {
module.verbose('Modal fits on screen');
if(!module.othersActive) {
module.remove.scrolling();
}
}
else {
module.verbose('Modal cannot fit on screen setting to scrolling');
module.set.scrolling();
}
},
position: function() {
module.verbose('Centering modal on page', module.cache);
if(module.can.fit()) {
$module
.css({
top: '',
marginTop: -(module.cache.height / 2)
})
;
}
else {
$module
.css({
marginTop : '',
top : $document.scrollTop()
})
;
}
}
},
setting: function(name, value) {
module.debug('Changing setting', name, value);
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if($.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
module.destroy();
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
$.fn.modal.settings = {
name : 'Modal',
namespace : 'modal',
debug : false,
verbose : true,
performance : true,
allowMultiple : false,
detachable : true,
closable : true,
autofocus : true,
context : 'body',
duration : 500,
easing : 'easeOutExpo',
offset : 0,
transition : 'scale',
padding : 30,
onShow : function(){},
onHide : function(){},
onVisible : function(){},
onHidden : function(){},
onApprove : function(){ return true; },
onDeny : function(){ return true; },
selector : {
close : '.close, .actions .button',
approve : '.actions .positive, .actions .approve, .actions .ok',
deny : '.actions .negative, .actions .deny, .actions .cancel',
modal : '.ui.modal'
},
error : {
dimmer : 'UI Dimmer, a required component is not included in this page',
method : 'The method you called is not defined.',
notFound : 'The element you specified could not be found'
},
className : {
active : 'active',
scrolling : 'scrolling'
}
};
})( jQuery, window , document );
|
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
import muiRootWrapper from './src/mui-root-wrapper'
export const wrapRootElement = muiRootWrapper
require('typeface-roboto')
|
#!/usr/bin/env python
import numpy as np
from pycrazyswarm import *
import _thread
Z = 0.3
sleepRate = 30
def goCircle(timeHelper, cf, totalTime, radius, kPosition):
startTime = timeHelper.time()
pos = cf.position()
startPos = pos + np.array([0, 0, Z])
center_circle = startPos - np.array([radius, 0, 0])
while True:
time = timeHelper.time() - startTime
omega = 2 * np.pi / totalTime
vx = -radius * omega * np.sin(omega * time)
vy = radius * omega * np.cos(omega * time)
desiredPos = center_circle + radius * np.array(
[np.cos(omega * time), np.sin(omega * time), 0])
errorX = desiredPos - cf.position()
cf.cmdVelocityWorld(np.array([vx, vy, 0] + kPosition * errorX), yawRate=0)
timeHelper.sleepForRate(sleepRate)
if __name__ == "__main__":
swarm = Crazyswarm()
timeHelper = swarm.timeHelper
cf1 = swarm.allcfs.crazyflies[0]
# cf2 = swarm.allcfs.crazyflies[1]
cf1.takeoff(targetHeight=Z, duration=1.0+Z)
# cf2.takeoff(targetHeight=Z, duration=1.0+Z)
timeHelper.sleep(2 + Z)
cf1.goTo([0, 0, 0.5], 0, 2)
# cf2.goTo([1, 0, 0.5], 0, 2)
timeHelper.sleep(3)
_thread.start_new_thread(goCircle, (timeHelper, cf1, 4, -0.5, 1))
_thread.start_new_thread(goCircle, (timeHelper, cf2, 4, 0.5, 1))
|
from syft.execution.plan import func2plan
from syft.execution.plan import method2plan
from syft.execution.plan import Plan
|
from __future__ import absolute_import
from ..utils import BasicSegment
import time
class Segment(BasicSegment):
def add_to_powerline(self):
powerline = self.powerline
if powerline.args.shell == 'bash':
time_ = ' \\t '
elif powerline.args.shell == 'zsh':
time_ = ' %* '
else:
time_ = ' %s ' % time.strftime('%H:%M:%S')
powerline.append(time_,
powerline.theme.TIME_FG,
powerline.theme.TIME_BG)
|
import $ from 'jquery';
import BlueMap from './libs/BlueMap.js';
import '../style/style.scss';
$(document).ready(() => {
window.blueMap = new BlueMap($('#map-container')[0], 'data/');
});
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/enums/iap_item_category.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='pogoprotos/enums/iap_item_category.proto',
package='pogoprotos.enums',
syntax='proto3',
serialized_pb=_b('\n(pogoprotos/enums/iap_item_category.proto\x12\x10pogoprotos.enums*\xd1\x01\n\x13HoloIapItemCategory\x12\x15\n\x11IAP_CATEGORY_NONE\x10\x00\x12\x17\n\x13IAP_CATEGORY_BUNDLE\x10\x01\x12\x16\n\x12IAP_CATEGORY_ITEMS\x10\x02\x12\x19\n\x15IAP_CATEGORY_UPGRADES\x10\x03\x12\x1a\n\x16IAP_CATEGORY_POKECOINS\x10\x04\x12\x17\n\x13IAP_CATEGORY_AVATAR\x10\x05\x12\"\n\x1eIAP_CATEGORY_AVATAR_STORE_LINK\x10\x06\x62\x06proto3')
)
_HOLOIAPITEMCATEGORY = _descriptor.EnumDescriptor(
name='HoloIapItemCategory',
full_name='pogoprotos.enums.HoloIapItemCategory',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_NONE', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_BUNDLE', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_ITEMS', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_UPGRADES', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_POKECOINS', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_AVATAR', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IAP_CATEGORY_AVATAR_STORE_LINK', index=6, number=6,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=63,
serialized_end=272,
)
_sym_db.RegisterEnumDescriptor(_HOLOIAPITEMCATEGORY)
HoloIapItemCategory = enum_type_wrapper.EnumTypeWrapper(_HOLOIAPITEMCATEGORY)
IAP_CATEGORY_NONE = 0
IAP_CATEGORY_BUNDLE = 1
IAP_CATEGORY_ITEMS = 2
IAP_CATEGORY_UPGRADES = 3
IAP_CATEGORY_POKECOINS = 4
IAP_CATEGORY_AVATAR = 5
IAP_CATEGORY_AVATAR_STORE_LINK = 6
DESCRIPTOR.enum_types_by_name['HoloIapItemCategory'] = _HOLOIAPITEMCATEGORY
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
# @@protoc_insertion_point(module_scope)
|
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const Guild = require("../../database/schemas/Guild.js");
const Economy = require("../../models/economy.js")
const warnModel = require("../../models/moderation.js")
const mongoose = require("mongoose")
const Logging = require('../../database/schemas/logging.js')
const discord = require("discord.js")
module.exports = class extends Command {
constructor(...args) {
super(...args, {
name: 'removewarn',
aliases: [ 'rw', 'removewarns'],
description: 'Remove a certain users warn',
category: 'Moderation',
usage: '<user> [ID]',
examples: [ 'rw @peter iasdjas' ],
guildOnly: true,
userPermission: ['MANAGE_ROLES'],
});
}
async run(message, args) {
let client = message.client
const settings = await Guild.findOne({
guildId: message.guild.id
}, (err, guild) => {
if (err) console.error(err)
if (!guild) {
const newGuild = new Guild({
_id: mongoose.Types.ObjectId(),
guildId: message.guild.id,
guildName: message.guild.name,
prefix: client.config.prefix,
language: "english"
})
newGuild.save()
.then(result => console.log(result))
.catch(err => console.error(err));
return message.channel.send('This server was not in our database! We have added it, please retype this command.').then(m => m.delete({timeout: 10000}));
}
});
const logging = await Logging.findOne({ guildId: message.guild.id })
const guildDB = await Guild.findOne({
guildId: message.guild.id
});
const language = require(`../../data/language/${guildDB.language}.json`)
const mentionedMember = message.mentions.members.last()
|| message.guild.members.cache.get(args[0])
if (!mentionedMember) {
return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.banUserValid}`)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
}
const mentionedPotision = mentionedMember.roles.highest.position
const memberPotision = message.member.roles.highest.position
if (memberPotision <= mentionedPotision) {
return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmPosition}`)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
}
let reason = args.slice(2).join(' ');
if (!reason) reason = language.softbanNoReason;
if (reason.length > 1024) reason = reason.slice(0, 1021) + '...';
const warnDoc = await warnModel.findOne({
guildID: message.guild.id,
memberID: mentionedMember.id,
}).catch(err => console.log(err))
if (!warnDoc || !warnDoc.warnings.length) {
return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmNoWarning}`)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
}
let warningID = args[1]
if(!warningID) return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmWarnInvalid} `)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
let check = warnDoc.warningID.filter(word => args[1] === word);
if(!warnDoc.warningID.includes(warningID)) return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmWarnInvalid} `)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
if(!check) return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmWarnInvalid} `)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
if (check.length < 0) {
return message.channel.send(new discord.MessageEmbed()
.setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true }))
.setDescription(`${client.emoji.fail} | ${language.rmWarnInvalid} `)
.setTimestamp(message.createdAt)
.setColor(client.color.red))
}
let toReset = warnDoc.warningID.length
//warnDoc.memberID.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
//warnDoc.guildID.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
warnDoc.warnings.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
warnDoc.warningID.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
warnDoc.modType.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
warnDoc.moderator.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
warnDoc.date.splice(toReset - 1, toReset !== 1 ? toReset - 1 : 1)
await warnDoc.save().catch(err => console.log(err))
const removeEmbed = new discord.MessageEmbed()
.setDescription(`${message.client.emoji.success} | Cleared Warn **#${warningID}** from **${mentionedMember.user.tag}** ${logging && logging.moderation.include_reason === "true" ?`\n\n**Reason:** ${reason}`:``}`)
.setColor(message.client.color.green)
message.channel.send(removeEmbed)
.then(async(s)=>{
if(logging && logging.moderation.delete_reply === "true"){
setTimeout(()=>{
s.delete().catch(()=>{})
}, 5000)
}
})
.catch(()=>{});
if(logging){
if(logging.moderation.delete_after_executed === "true"){
message.delete().catch(()=>{})
}
const role = message.guild.roles.cache.get(logging.moderation.ignore_role);
const channel = message.guild.channels.cache.get(logging.moderation.channel)
if(logging.moderation.toggle == "true"){
if(channel){
if(message.channel.id !== logging.moderation.ignore_channel){
if(!role || role && !message.member.roles.cache.find(r => r.name.toLowerCase() === role.name)){
if(logging.moderation.warns == "true"){
let color = logging.moderation.color;
if(color == "#000000") color = message.client.color.green;
let logcase = logging.moderation.caseN
if(!logcase) logcase = `1`
const logEmbed = new MessageEmbed()
.setAuthor(`Action: \`Remove Warn\` | ${mentionedMember.user.tag} | Case #${logcase}`, mentionedMember.user.displayAvatarURL({ format: 'png' }))
.addField('User', mentionedMember, true)
.addField('Moderator', message.member, true)
.addField('Reason', reason, true)
.setFooter(`ID: ${mentionedMember.id} | Warn ID: ${warningID}`)
.setTimestamp()
.setColor(color)
channel.send(logEmbed).catch((e)=>{console.log(e)})
logging.moderation.caseN = logcase + 1
await logging.save().catch(()=>{})
}
}
}
}
}
}
}
};
|
import React from "react";
import faker from "faker/locale/en_US";
import {
Container,
Row,
Col,
Nav,
NavItem,
NavLink,
Table,
Button,
Card,
CardBody,
CardFooter,
UncontrolledButtonDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
Media,
Input,
InputGroup,
CustomInput,
InputGroupAddon,
Badge,
Avatar
} from "./../../../components";
import { randomAvatar } from "./../../../utilities";
import { HeaderMain } from "../../components/HeaderMain";
import { ProjectsSmHeader } from "../../components/Projects/ProjectsSmHeader";
import { Attachment } from "../../components/Attachment";
import { Comment } from "../../components/Comment";
const TasksDetails = () => (
<React.Fragment>
<Container>
<HeaderMain title="Tasks Details" className="mb-5 mt-4" />
{/* START Header 1 */}
<Row>
<Col lg={3}>
{/* START Left Nav */}
<div className="mb-5">
<div className="small mb-3">Task Details</div>
<Table size="sm">
<tbody>
<tr>
<td className="align-middle">Project</td>
<td className="text-right">
<a href="#" className="text-decoration-none">
Analytics Redo
</a>
</td>
</tr>
<tr>
<td className="align-middle">Assigned by</td>
<td className="text-right">
<a href="#" className="text-decoration-none">
{faker.name.firstName()} {faker.name.lastName()}
</a>
</td>
</tr>
<tr>
<td className="align-middle">Start Date</td>
<td className="text-right">Thu 12 May 2016</td>
</tr>
<tr>
<td className="align-middle">End Date</td>
<td className="text-right">Wed 18 May 2016</td>
</tr>
<tr>
<td className="align-middle">Priority</td>
<td className="text-right">
<UncontrolledButtonDropdown>
<DropdownToggle color="link" className="p-0 text-decoration-none">
<i className="fa fa-circle text-success mr-2"></i>
Small
<i className="fa fa-angle-down ml-2" />
</DropdownToggle>
<DropdownMenu right>
<DropdownItem header>Select Priority</DropdownItem>
<DropdownItem>
<i className="fa fa-circle text-danger mr-2"></i>
Big
</DropdownItem>
<DropdownItem>
<i className="fa fa-circle text-warning mr-2"></i>
High
</DropdownItem>
<DropdownItem>
<i className="fa fa-circle text-primary mr-2"></i>
Normal
</DropdownItem>
<DropdownItem active>
<i className="fa fa-circle text-success mr-2"></i>
Small
</DropdownItem>
</DropdownMenu>
</UncontrolledButtonDropdown>
</td>
</tr>
<tr>
<td className="align-middle">Progress</td>
<td className="align-middle text-right">30%</td>
</tr>
<tr>
<td className="align-middle">Task ID</td>
<td className="align-middle text-right"># 6726746</td>
</tr>
<tr>
<td className="align-middle">Date Assigned</td>
<td className="align-middle text-right">Wed, 16 Dec 2015, 12:17 PM</td>
</tr>
</tbody>
</Table>
</div>
{/* END Left Nav */}
{/* START Left Nav */}
<div className="mb-4">
<div className="small mb-3">Assigned to</div>
<Nav pills vertical>
<NavItem>
<NavLink href="#" className="d-flex">
<Media>
<Media left middle className="mr-3 align-self-center">
<Avatar.Image size="md" src={randomAvatar()} />
</Media>
<Media body>
<div className="mt-0">
{faker.name.firstName()} {faker.name.lastName()}
</div>
<span className="small">
{faker.address.state()}, {faker.address.stateAbbr()}
</span>
</Media>
</Media>
<i className="fa fa-fw fa-circle text-success ml-auto align-self-center ml-2"></i>
</NavLink>
</NavItem>
<NavItem>
<NavLink href="#" className="d-flex">
<Media>
<Media left middle className="mr-3 align-self-center">
<Avatar.Image size="md" src={randomAvatar()} />
</Media>
<Media body>
<div className="mt-0">
{faker.name.firstName()} {faker.name.lastName()}
</div>
<span className="small">
{faker.address.state()}, {faker.address.stateAbbr()}
</span>
</Media>
</Media>
<i className="fa fa-fw fa-circle text-warning ml-auto align-self-center ml-2"></i>
</NavLink>
</NavItem>
<NavItem>
<NavLink href="#" className="d-flex">
<Media>
<Media left middle className="mr-3 align-self-center">
<Avatar.Image size="md" src={randomAvatar()} />
</Media>
<Media body>
<div className="mt-0">
{faker.name.firstName()} {faker.name.lastName()}
</div>
<span className="small">
{faker.address.state()}, {faker.address.stateAbbr()}
</span>
</Media>
</Media>
<i className="fa fa-fw fa-circle text-danger ml-auto align-self-center ml-2"></i>
</NavLink>
</NavItem>
<NavItem>
<NavLink href="#">
<i className="fa fa-fw fa-plus mr-2"></i>
Add New People
</NavLink>
</NavItem>
</Nav>
</div>
{/* END Left Nav */}
</Col>
<Col lg={9}>
<ProjectsSmHeader subTitle="Tasks" subTitleLink="/apps/tasks/grid" title="Task Details" />
{/* START Right Content */}
<Card>
<CardBody>
<Media>
<Media left href="#">
<CustomInput type="checkbox" id="checkboxTaskDetails" label="" inline />
</Media>
<Media body>
<div className="mb-3">
<h5>
<span className="mr-2">#{faker.random.number()}</span>
{faker.hacker.phrase()}
</h5>
<Badge pill color="primary" className="mr-1">
{faker.commerce.department()}
</Badge>
<Badge pill color="secondary" className="mr-1">
{faker.commerce.department()}
</Badge>
<Badge pill color="secondary" className="mr-1">
{faker.commerce.department()}
</Badge>
</div>
</Media>
</Media>
<p className="lead">
Animi ea magni voluptates accusamus laboriosam. Unde repellat hic id et aliquam ut qui dignissimos.
</p>
<p className="mb-4">{faker.lorem.paragraphs()}</p>
{/* START Atachemnts */}
<div className="mb-4">
<div className="mb-3">
<span className="small mr-3">Attachments</span>
<Badge pill color="secondary">
3
</Badge>
</div>
<div className="mb-3">
<Attachment icon="file-word-o" iconClassName="text-white" BgIconClassName="text-primary" />
</div>
<div className="mb-3">
<Attachment icon="file-excel-o" iconClassName="text-white" BgIconClassName="text-success" />
</div>
<div className="mb-3">
<Attachment icon="file-powerpoint-o" iconClassName="text-white" BgIconClassName="text-warning" />
</div>
<div className="mb-5">
<a href="#">
<i className="fa fa-plus mr-2"></i>
Add More Files to this Task
</a>
</div>
</div>
{/* END Atachemnts */}
<div className="mb-3">
<span className="small mr-3">Comments</span>
<Badge pill color="secondary">
3
</Badge>
</div>
<Comment />
<Comment />
{/* END Comment Media */}
</CardBody>
<CardFooter>
<InputGroup>
<InputGroupAddon addonType="prepend">
<Button color="secondary" outline>
<i className="fa fa fa-paperclip"></i>
</Button>
</InputGroupAddon>
<Input placeholder="Your message..." />
<InputGroupAddon addonType="append">
<Button color="primary">
<i className="fa fa fa-send"></i>
</Button>
</InputGroupAddon>
</InputGroup>
</CardFooter>
</Card>
{/* END Right Content */}
</Col>
</Row>
{/* END Header 1 */}
</Container>
</React.Fragment>
);
export default TasksDetails;
|
#!/usr/bin/env node
'use strict';
/*
var fs = require('fs');
var path = require('path');
var package_json = path.join(process.cwd(), 'package.json');
var version = require(package_json).version;
console.log(version);
*/
/**
* Module dependencies
*/
var commander = require('commander');
var fs = require('fs');
var package_metadata = require('./package.json');
var CIBuildTools = (package_metadata.name == 'ci-build-tools' ? require('./') : require('ci-build-tools'));
var ci = new CIBuildTools(process.env.GIT_TAG_PUSHER);
var version = ci.GetVersion();
commander.version(version);
/**
* Build
*/
commander
.command('build')
.description('Setup require build files for npm package.')
.action(function() {
package_metadata.version = version;
fs.writeFile('./package.json', JSON.stringify(package_metadata, null, 2), function(err) {
if(err) { throw err; }
});
console.log("Building package %s (%s)", package_metadata.name, version);
console.log('');
});
/**
* After Build
*/
commander
.command('after_build')
.description('Publishes git tags and reports failures.')
.action(function() {
console.log("After build package %s (%s)", package_metadata.name, version);
console.log('');
ci.PublishGitTag();
ci.MergeDownstream('release/', 'master');
});
commander.parse(process.argv);
|
jest.setTimeout(20000)
jest.mock('inquirer')
const invoke = require('../lib/invoke')
const { expectPrompts } = require('inquirer')
const create = require('@vue/cli-test-utils/createTestProject')
const parseJS = file => {
const res = {}
;(new Function('module', file))(res)
return res.exports
}
const baseESLintConfig = Object.assign({}, require('@vue/cli-plugin-eslint/eslintOptions').config({
hasPlugin: () => false
}), {
rules: {
'no-console': 'off',
'no-debugger': 'off'
}
})
async function createAndInstall (name) {
const project = await create(name, {
plugins: {
'@vue/cli-plugin-babel': {}
}
})
// mock install
const pkg = JSON.parse(await project.read('package.json'))
pkg.devDependencies['@vue/cli-plugin-eslint'] = '*'
await project.write('package.json', JSON.stringify(pkg, null, 2))
return project
}
async function assertUpdates (project) {
const updatedPkg = JSON.parse(await project.read('package.json'))
expect(updatedPkg.scripts.lint).toBe('vue-cli-service lint')
expect(updatedPkg.devDependencies).toHaveProperty('lint-staged')
expect(updatedPkg.gitHooks).toEqual({
'pre-commit': 'lint-staged'
})
const eslintrc = parseJS(await project.read('.eslintrc.js'))
expect(eslintrc).toEqual(Object.assign({}, baseESLintConfig, {
extends: ['plugin:vue/essential', '@vue/airbnb']
}))
const lintedMain = await project.read('src/main.js')
expect(lintedMain).toMatch(';') // should've been linted in post-generate hook
}
test('invoke with inline options', async () => {
const project = await createAndInstall(`invoke-inline`)
await project.run(`${require.resolve('../bin/vue')} invoke eslint --config airbnb --lintOn save,commit`)
await assertUpdates(project)
})
test('invoke with prompts', async () => {
const project = await createAndInstall(`invoke-prompts`)
expectPrompts([
{
message: `Pick an ESLint config`,
choices: [`Error prevention only`, `Airbnb`, `Standard`, `Prettier`],
choose: 1
},
{
message: `Pick additional lint features`,
choices: [`on save`, 'on commit'],
check: [0, 1]
}
])
// need to be in the same process to have inquirer mocked
// so calling directly
await invoke(`eslint`, {}, project.dir)
await assertUpdates(project)
})
test('invoke with ts', async () => {
const project = await create(`invoke-existing`, {
useConfigFiles: true,
plugins: {
'@vue/cli-plugin-babel': {},
'@vue/cli-plugin-eslint': { config: 'base' }
}
})
// mock install
const pkg = JSON.parse(await project.read('package.json'))
pkg.devDependencies['@vue/cli-plugin-typescript'] = '*'
await project.write('package.json', JSON.stringify(pkg, null, 2))
// mock existing vue.config.js
await project.write('vue.config.js', `module.exports = { lintOnSave: 'default' }`)
const eslintrc = parseJS(await project.read('.eslintrc.js'))
expect(eslintrc).toEqual(Object.assign({}, baseESLintConfig, {
extends: ['plugin:vue/essential', 'eslint:recommended']
}))
await project.run(`${require.resolve('../bin/vue')} invoke typescript --classComponent --useTsWithBabel`)
const updatedESLintrc = parseJS(await project.read('.eslintrc.js'))
expect(updatedESLintrc).toEqual(Object.assign({}, baseESLintConfig, {
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript'],
parserOptions: {
parser: '@typescript-eslint/parser'
}
}))
})
test('invoke with existing files (yaml)', async () => {
const project = await create(`invoke-existing-yaml`, {
useConfigFiles: true,
plugins: {
'@vue/cli-plugin-babel': {},
'@vue/cli-plugin-eslint': {}
}
})
const eslintrc = parseJS(await project.read('.eslintrc.js'))
expect(eslintrc).toEqual(Object.assign({}, baseESLintConfig, {
extends: ['plugin:vue/essential', 'eslint:recommended']
}))
await project.rm(`.eslintrc.js`)
await project.write(`.eslintrc.yml`, `
root: true
extends:
- 'plugin:vue/essential'
- 'eslint:recommended'
`.trim())
await project.run(`${require.resolve('../bin/vue')} invoke eslint --config airbnb`)
const updated = await project.read('.eslintrc.yml')
expect(updated).toMatch(`
extends:
- 'plugin:vue/essential'
- 'eslint:recommended'
- '@vue/airbnb'
`.trim())
})
test('invoking a plugin that renames files', async () => {
const project = await create(`invoke-rename`, { plugins: {}})
const pkg = JSON.parse(await project.read('package.json'))
pkg.devDependencies['@vue/cli-plugin-typescript'] = '*'
await project.write('package.json', JSON.stringify(pkg, null, 2))
await project.run(`${require.resolve('../bin/vue')} invoke typescript -d`)
expect(project.has('src/main.js')).toBe(false)
})
|
import shutil
import textwrap
# Base class for exceptions
class AbbotException(Exception):
def __init__(self, message, *, expire_in=0):
self._message = message
self.expire_in = expire_in
@property
def message(self):
return self._message
@property
def message_no_format(self):
return self._message
# Something went wrong during the processing of a command
class CommandError(AbbotException):
pass
# Something went wrong during the processing of a song/ytdl stuff
class ExtractionError(AbbotException):
pass
# The no processing entry type failed and an entry was a playlist/vice versa
class WrongEntryTypeError(ExtractionError):
def __init__(self, message, is_playlist, use_url):
super().__init__(message)
self.is_playlist = is_playlist
self.use_url = use_url
# The user doesn't have permission to use a command
class PermissionsError(CommandError):
@property
def message(self):
return "You don't have permission to use that command.\nReason: " + self._message
# Error with pretty formatting for hand-holding users through various errors
class HelpfulError(AbbotException):
def __init__(self, issue, solution, *, preface="An error has occured:\n", expire_in=0):
self.issue = issue
self.solution = solution
self.preface = preface
self.expire_in = expire_in
@property
def message(self):
return ("\n{}\n{}\n{}\n").format(
self.preface,
self._pretty_wrap(self.issue, " Problem: "),
self._pretty_wrap(self.solution, " Solution: "))
@property
def message_no_format(self):
return "\n{}\n{}\n{}\n".format(
self.preface,
self._pretty_wrap(self.issue, " Problem: ", width=None),
self._pretty_wrap(self.solution, " Solution: ", width=None))
@staticmethod
def _pretty_wrap(text, pretext, *, width=-1):
if width is None:
return pretext + text
elif width == -1:
width = shutil.get_terminal_size().columns
l1, *lx = textwrap.wrap(text, width=width - 1 - len(pretext))
lx = [((' ' * len(pretext)) + l).rstrip().ljust(width) for l in lx]
l1 = (pretext + l1).ljust(width)
return ''.join([l1, *lx])
class HelpfulWarning(HelpfulError):
pass
# Base class for control signals
class Signal(Exception):
pass
# signal to restart the bot
class RestartSignal(Signal):
pass
# signal to end the bot "gracefully"
class TerminateSignal(Signal):
pass
|
# -*- coding: utf-8 -*-
#
# SelfTest/Hash/SHA.py: Self-test for the SHA-1 hash function
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# non-exclusive license to exercise all rights associated with the
# contents of this file for any purpose whatsoever.
# No rights are reserved.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ===================================================================
"""Self-test suite for Crypto.Hash.SHA"""
__revision__ = "$Id$"
from Crypto.Util.py3compat import *
# Test vectors from various sources
# This is a list of (expected_result, input[, description]) tuples.
test_data = [
# FIPS PUB 180-2, A.1 - "One-Block Message"
('a9993e364706816aba3e25717850c26c9cd0d89d', 'abc'),
# FIPS PUB 180-2, A.2 - "Multi-Block Message"
('84983e441c3bd26ebaae4aa1f95129e5e54670f1',
'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq'),
# FIPS PUB 180-2, A.3 - "Long Message"
# ('34aa973cd4c4daa4f61eeb2bdbad27316534016f',
# 'a' * 10**6,
# '"a" * 10**6'),
# RFC 3174: Section 7.3, "TEST4" (multiple of 512 bits)
('dea356a2cddd90c7a7ecedc5ebb563934f460452',
'01234567' * 80,
'"01234567" * 80'),
]
def get_tests(config={}):
from Crypto.Hash import SHA
from .common import make_hash_tests
return make_hash_tests(SHA, "SHA", test_data,
digest_size=20,
oid="\x06\x05\x2B\x0E\x03\x02\x1A")
if __name__ == '__main__':
import unittest
suite = lambda: unittest.TestSuite(get_tests())
unittest.main(defaultTest='suite')
# vim:set ts=4 sw=4 sts=4 expandtab:
|
from .command import volume
from typing import NoReturn
import logging
import sys
import typer
# Configure the root logger.
def config_logger(verbosity: int):
levels = {
0: logging.ERROR,
1: logging.WARN,
2: logging.INFO,
3: logging.DEBUG
}
if verbosity > 3:
verbosity = 3
logging.basicConfig(
format='%(name)s: %(message)s',
level=levels[verbosity]
)
return logging.getLogger(__name__)
# Improve error handling.
def handle_error(type, error: BaseException, trace) -> NoReturn:
'''Displays the error before exiting.
By default, any error that is handled will simply have its string
representation printed to stderr and the script will exit with a status
code of 1 (one). However, if the logging level for the root logger is set
to DEBUG, the default exception hook will be used to render the complete
error.
'''
if logging.getLogger().isEnabledFor(logging.DEBUG):
sys.__excepthook__(type, error, trace)
else:
typer.secho(str(error), fg=typer.colors.RED, file=sys.stderr)
sys.exit(1)
sys.excepthook = handle_error
# Configure Typer.
app = typer.Typer(
context_settings={
'help_option_names': ['-h', '--help']
},
add_completion=False
)
app.add_typer(volume.app)
# Run the requested command.
@app.callback(invoke_without_command=True)
def main(
context: typer.Context,
verbosity: int = typer.Option(
0,
'-v',
'--verbose',
count=True,
help='Increase logging verbosity.',
show_default=False
)
):
'''Creates and manages containerized development environments.'''
logger = config_logger(verbosity)
if context.invoked_subcommand is not None:
return
logger.debug('invoking default')
if __name__ == '__main__':
app()
|
"""Default formatting class for Flake8."""
from flake8.formatting import base
class SimpleFormatter(base.BaseFormatter):
"""Simple abstraction for Default and Pylint formatter commonality.
Sub-classes of this need to define an ``error_format`` attribute in order
to succeed. The ``format`` method relies on that attribute and expects the
``error_format`` string to use the old-style formatting strings with named
parameters:
* code
* text
* path
* row
* col
"""
error_format = None
def format(self, error):
"""Format and write error out.
If an output filename is specified, write formatted errors to that
file. Otherwise, print the formatted error to standard out.
"""
return self.error_format % {
"code": error.code,
"text": error.text,
"path": error.filename,
"row": error.line_number,
"col": error.column_number,
}
class Default(SimpleFormatter):
"""Default formatter for Flake8.
This also handles backwards compatibility for people specifying a custom
format string.
"""
error_format = '%(path)s:%(row)d:%(col)d: %(code)s %(text)s'
def after_init(self):
"""Check for a custom format string."""
if self.options.format.lower() != 'default':
self.error_format = self.options.format
class Pylint(SimpleFormatter):
"""Pylint formatter for Flake8."""
error_format = '%(path)s:%(row)d: [%(code)s] %(text)s'
class FilenameOnly(SimpleFormatter):
"""Only print filenames, e.g., flake8 -q."""
error_format = '%(path)s'
def after_init(self):
"""Initialize our set of filenames."""
self.filenames_already_printed = set()
def format(self, error):
"""Ensure we only print each error once."""
if error.filename not in self.filenames_already_printed:
self.filenames_already_printed.add(error.filename)
return super(FilenameOnly, self).format(error)
class Nothing(base.BaseFormatter):
"""Print absolutely nothing."""
def format(self, error):
"""Do nothing."""
pass
|
/* Tests for DOM 2 HTML 'HTMLScriptElement' object.
*/
var cvs = "$Id: htmlscriptelement.js 4838 2006-01-18 05:59:01Z hallvord $";
testmodule( "HTMLScriptElement", cvs );
var external1_timeout;
try {
var p1 = document.getElementById("myScript");
var p2 = document.getElementById("myScript2");
var p = p1;
testcase( "object" );
test("class",p,"[object HTMLScriptElement]");
testcase( "properties exists" );
if(is_phase(2))
{
tdef("text",p.text);
tdef("htmlFor",p.htmlFor);
tdef("event",p.event);
}
tdef("charset",p.charset);
tdef("defer",p.defer);
tdef("src",p.src);
tdef("type",p.type);
var p = p1;
testcase( "default property values" );
if(is_phase(2))
{
test("text",p.text,"");
test("htmlFor",p.htmlFor,"");
test("event",p.event,"");
}
test("charset",p.charset,"");
test("defer",p.defer,false);
test("src",p.src,"");
test("type",p.type,"");
p = p2;
testcase( "property values from attributes" );
if(is_phase(2))
{
test("text",p.text,"var a = 1;");
test("htmlFor",p.htmlFor,"?");
test("event",p.event,"?");
}
test("charset",p.charset,"utf-8");
test("defer",p.defer,true);
test("src",p.src,"http://www.opera.no/script/");
test("type",p.type,"text/javascript");
p = p1;
testcase( "properties are writable" );
if(is_phase(2)) // All attributes currently readonly
{
}
document.write("<script id='dynamic1'><" + "/script>");
var dynamic1 = document.getElementById("dynamic1");
dynamic1.text = "/* nothing */";
test("text", dynamic1.text, "/* nothing */");
testcase( "modifying .text" );
var flag = 1;
dynamic1.text = "flag = 2;";
test("flag updated by script", flag, 2);
dynamic1.text = "document.write('<div id=\"div1\"><" + "/div>')";
ttrue("DIV #1 written by script", document.getElementById("div1") != null &&
document.getElementById("div1") != undefined);
document.write("<script id='dynamic2'><" + "/script>");
var dynamic1 = document.getElementById("dynamic2");
testcase( "modifiying .src" );
test("src initial", dynamic2.src, "");
dynamic2.src = "scripts/htmlscriptelement_external1.js";
test("src changed", dynamic2.src.substring(dynamic2.src.lastIndexOf("/") + 1), "htmlscriptelement_external1.js");
test("flag updated by script", flag, 3);
dynamic2.src = "scripts/htmlscriptelement_external2.js";
test("src changed", dynamic2.src.substring(dynamic2.src.lastIndexOf("/") + 1), "htmlscriptelement_external2.js");
ttrue("DIV #2 written by script", document.getElementById("div2") != null &&
document.getElementById("div2") != undefined);
testmodule_finished();
} catch (e) { exception(e); }
/* eof */
|
/* @generated */
// prettier-ignore
if (Intl.DisplayNames && typeof Intl.DisplayNames.__addLocaleData === 'function') {
Intl.DisplayNames.__addLocaleData({"data":{"bm":{"types":{"language":{"long":{"af":"af","agq":"agq","ak":"akankan","am":"amarikikan","ar":"larabukan","ar-001":"larabukan (001)","as":"as","asa":"asa","ast":"ast","az":"az","bas":"bas","be":"biyelorisikan","bem":"bem","bez":"bez","bg":"buligarikan","bm":"bamanakan","bn":"bɛngalikan","bo":"bo","br":"br","brx":"brx","bs":"bs","ca":"ca","ccp":"ccp","ce":"ce","ceb":"ceb","cgg":"cgg","chr":"chr","ckb":"ckb","co":"co","cs":"cɛkikan","cu":"cu","cy":"cy","da":"da","dav":"dav","de":"alimaɲikan","de-AT":"alimaɲikan (Otirisi)","de-CH":"alimaɲikan (Suwisi)","dje":"dje","dsb":"dsb","dua":"dua","dyo":"dyo","dz":"dz","ebu":"ebu","ee":"ee","el":"gɛrɛsikan","en":"angilɛkan","en-AU":"angilɛkan (Ositirali)","en-CA":"angilɛkan (Kanada)","en-GB":"angilɛkan (Angilɛtɛri)","en-US":"angilɛkan (Ameriki)","eo":"eo","es":"esipaɲolkan","es-419":"esipaɲolkan (419)","es-ES":"esipaɲolkan (Esipaɲi)","es-MX":"esipaɲolkan (Meksiki)","et":"et","eu":"eu","ewo":"ewo","fa":"perisanikan","ff":"ff","fi":"fi","fil":"fil","fo":"fo","fr":"tubabukan","fr-CA":"tubabukan (Kanada)","fr-CH":"tubabukan (Suwisi)","frc":"frc","fur":"fur","fy":"fy","ga":"ga","gd":"gd","gl":"gl","gsw":"gsw","gu":"gu","guz":"guz","gv":"gv","ha":"awusakan","haw":"haw","he":"he","hi":"inidikan","hmn":"hmn","hr":"hr","hsb":"hsb","ht":"ht","hu":"oŋirikan","hy":"hy","ia":"ia","id":"Ɛndonezikan","ig":"igibokan","ii":"ii","is":"is","it":"italikan","ja":"zapɔnekan","jgo":"jgo","jmc":"jmc","jv":"javanekan","ka":"ka","kab":"kab","kam":"kam","kde":"kde","kea":"kea","khq":"khq","ki":"ki","kk":"kk","kkj":"kkj","kl":"kl","kln":"kln","km":"kambojikan","kn":"kn","ko":"korekan","kok":"kok","ks":"ks","ksb":"ksb","ksf":"ksf","ksh":"ksh","ku":"ku","kw":"kw","ky":"ky","la":"la","lag":"lag","lb":"lb","lg":"lg","lkt":"lkt","ln":"ln","lo":"lo","lou":"lou","lrc":"lrc","lt":"lt","lu":"lu","luo":"luo","luy":"luy","lv":"lv","mas":"mas","mer":"mer","mfe":"mfe","mg":"mg","mgh":"mgh","mgo":"mgo","mi":"mi","mk":"mk","ml":"ml","mn":"mn","mr":"mr","ms":"malɛzikan","mt":"mt","mua":"mua","mul":"mul","my":"birimanikan","mzn":"mzn","naq":"naq","nb":"nb","nd":"nd","nds":"nds","nds-NL":"nds (Peyiba)","ne":"nepalekan","nl":"olandekan","nl-BE":"olandekan (Bɛliziki)","nmg":"nmg","nn":"nn","nnh":"nnh","nus":"nus","ny":"ny","nyn":"nyn","om":"om","or":"or","os":"os","pa":"pɛnijabikan","pl":"polonekan","prg":"prg","ps":"ps","pt":"pɔritigalikan","pt-BR":"pɔritigalikan (Berezili)","pt-PT":"pɔritigalikan (Pɔritigali)","qu":"qu","rm":"rm","rn":"rn","ro":"rumanikan","ro-MD":"rumanikan (Molidavi)","rof":"rof","root":"root","ru":"irisikan","rw":"ruwandakan","rwk":"rwk","sa":"sa","sah":"sah","saq":"saq","sbp":"sbp","sd":"sd","se":"se","seh":"seh","ses":"ses","sg":"sg","shi":"shi","si":"si","sk":"sk","sl":"sl","sm":"sm","smn":"smn","sn":"sn","so":"somalikan","sq":"sq","sr":"sr","st":"st","su":"su","sv":"suwɛdikan","sw":"sw","sw-CD":"sw (Kongo ka republiki demɔkratiki)","ta":"tamulikan","te":"te","teo":"teo","tg":"tg","th":"tayikan","ti":"ti","tk":"tk","to":"to","tr":"turikikan","tt":"tt","twq":"twq","tzm":"tzm","ug":"ug","uk":"ukɛrɛnikan","und":"und","ur":"urudukan","uz":"uz","vai":"vai","vi":"wiyɛtinamukan","vo":"vo","vun":"vun","wae":"wae","wo":"wo","xh":"xh","xog":"xog","yav":"yav","yi":"yi","yo":"yorubakan","yue":"yue","zgh":"zgh","zh":"siniwakan","zh-Hans":"siniwakan (Hans)","zh-Hant":"siniwakan (Hant)","zu":"zulukan","zxx":"zxx"},"short":{"az":"az","en-GB":"angilɛkan (GB)","en-US":"angilɛkan (US)"},"narrow":{}},"region":{"long":{"142":"142","143":"143","145":"145","150":"150","151":"151","154":"154","155":"155","202":"202","419":"419","001":"001","002":"002","003":"003","005":"005","009":"009","011":"011","013":"013","014":"014","015":"015","017":"017","018":"018","019":"019","021":"021","029":"029","030":"030","034":"034","035":"035","039":"039","053":"053","054":"054","057":"057","061":"061","AC":"AC","AD":"Andɔr","AE":"Arabu mara kafoli","AF":"Afiganistaŋ","AG":"Antiga-ni-Barbuda","AI":"Angiya","AL":"Alibani","AM":"Arimeni","AO":"Angola","AQ":"AQ","AR":"Arizantin","AS":"Samowa amerikani","AT":"Otirisi","AU":"Ositirali","AW":"Aruba","AX":"AX","AZ":"Azɛrbayjaŋ","BA":"Bozni-Ɛrizigovini","BB":"Barbadi","BD":"Bɛngiladɛsi","BE":"Bɛliziki","BF":"Burukina Faso","BG":"Buligari","BH":"Bareyini","BI":"Burundi","BJ":"Benɛn","BL":"BL","BM":"Bermudi","BN":"Burinɛyi","BO":"Bolivi","BQ":"BQ","BR":"Berezili","BS":"Bahamasi","BT":"Butaŋ","BV":"BV","BW":"Bɔtisiwana","BY":"Belarusi","BZ":"Belizi","CA":"Kanada","CC":"CC","CD":"Kongo ka republiki demɔkratiki","CF":"Santarafiriki","CG":"Kongo","CH":"Suwisi","CI":"Kodiwari","CK":"Kuki Gun","CL":"Sili","CM":"Kameruni","CN":"Siniwajamana","CO":"Kolombi","CP":"CP","CR":"Kɔsitarika","CU":"Kuba","CV":"Capivɛrdi","CW":"CW","CX":"CX","CY":"Cipri","CZ":"Ceki republiki","DE":"Alimaɲi","DG":"DG","DJ":"Jibuti","DK":"Danemarki","DM":"Dɔminiki","DO":"Dɔmimiki republiki","DZ":"Alizeri","EA":"EA","EC":"Ekwatɔr","EE":"Esetoni","EG":"Eziputi","EH":"EH","ER":"Eritere","ES":"Esipaɲi","ET":"Etiopi","EU":"EU","EZ":"EZ","FI":"Finilandi","FJ":"Fiji","FK":"Maluwini Gun","FM":"Mikironesi","FO":"FO","FR":"Faransi","GA":"Gabɔŋ","GB":"Angilɛtɛri","GD":"Granadi","GE":"Zeyɔrzi","GF":"Faransi ka gwiyani","GG":"GG","GH":"Gana","GI":"Zibralitari","GL":"Gɔrɔhenelandi","GM":"Ganbi","GN":"Gine","GP":"Gwadelup","GQ":"Gine ekwatɔri","GR":"Gɛrɛsi","GS":"GS","GT":"Gwatemala","GU":"Gwam","GW":"Gine Bisawo","GY":"Gwiyana","HK":"HK","HM":"HM","HN":"Hɔndirasi","HR":"Kroasi","HT":"Ayiti","HU":"Hɔngri","IC":"IC","ID":"Ɛndonezi","IE":"Irilandi","IL":"Isirayeli","IM":"IM","IN":"Ɛndujamana","IO":"Angilɛ ka ɛndu dugukolo","IQ":"Iraki","IR":"Iraŋ","IS":"Isilandi","IT":"Itali","JE":"JE","JM":"Zamayiki","JO":"Zɔrdani","JP":"Zapɔn","KE":"Keniya","KG":"Kirigizisitaŋ","KH":"Kamboji","KI":"Kiribati","KM":"Komɔri","KN":"Kristɔfo-Senu-ni-Ɲevɛs","KP":"Kɛɲɛka Kore","KR":"Worodugu Kore","KW":"Kowɛti","KY":"Bama Gun","KZ":"Kazakistaŋ","LA":"Layosi","LB":"Libaŋ","LC":"Lusi-Senu","LI":"Lisɛnsitayini","LK":"Sirilanka","LR":"Liberiya","LS":"Lesoto","LT":"Lituyani","LU":"Likisanburu","LV":"Letoni","LY":"Libi","MA":"Marɔku","MC":"Monako","MD":"Molidavi","ME":"ME","MF":"MF","MG":"Madagasikari","MH":"Marisali Gun","MK":"MK","ML":"Mali","MM":"Myanimari","MN":"Moŋoli","MO":"MO","MP":"Kɛɲɛka Mariyani Gun","MQ":"Maritiniki","MR":"Mɔritani","MS":"Moŋsera","MT":"Malti","MU":"Morisi","MV":"Maldivi","MW":"Malawi","MX":"Meksiki","MY":"Malɛzi","MZ":"Mozanbiki","NA":"Namibi","NC":"Kaledoni Koura","NE":"Nizɛri","NF":"Nɔrofoliki Gun","NG":"Nizeriya","NI":"Nikaragwa","NL":"Peyiba","NO":"Nɔriwɛzi","NP":"Nepali","NR":"Nawuru","NU":"Nyuwe","NZ":"Zelandi Koura","OM":"Omaŋ","PA":"Panama","PE":"Peru","PF":"Faransi ka polinezi","PG":"Papuwasi-Gine-Koura","PH":"Filipini","PK":"Pakisitaŋ","PL":"Poloɲi","PM":"Piyɛri-Senu-ni-Mikelɔŋ","PN":"Pitikarini","PR":"Pɔrotoriko","PS":"Palesitini","PT":"Pɔritigali","PW":"Palawu","PY":"Paraguwayi","QA":"Katari","QO":"QO","RE":"Reyuɲɔŋ","RO":"Rumani","RS":"RS","RU":"Irisi","RW":"Ruwanda","SA":"Arabiya Sawudiya","SB":"Salomo Gun","SC":"Sesɛli","SD":"Sudaŋ","SE":"Suwɛdi","SG":"Sɛngapuri","SH":"Ɛlɛni Senu","SI":"Sloveni","SJ":"SJ","SK":"Slowaki","SL":"Siyera Lewɔni","SM":"Marini-Senu","SN":"Senegali","SO":"Somali","SR":"Surinami","SS":"SS","ST":"Sawo Tome-ni-Prinicipe","SV":"Salivadɔr","SX":"SX","SY":"Siri","SZ":"Swazilandi","TA":"TA","TC":"Turiki Gun ni Kayiki","TD":"Cadi","TF":"TF","TG":"Togo","TH":"Tayilandi","TJ":"Tajikisitani","TK":"Tokelo","TL":"Kɔrɔn Timɔr","TM":"Turikimenisitani","TN":"Tunizi","TO":"Tonga","TR":"Turiki","TT":"Trinite-ni-Tobago","TV":"Tuvalu","TW":"Tayiwani","TZ":"Tanzani","UA":"Ukɛrɛni","UG":"Uganda","UM":"UM","UN":"UN","US":"Ameriki","UY":"Urugwayi","UZ":"Uzebekisitani","VA":"Vatikaŋ","VC":"Vinisɛn-Senu-ni-Grenadini","VE":"Venezuwela","VG":"Angilɛ ka Sungurunnin Gun","VI":"Ameriki ka Sungurunnin Gun","VN":"Wiyɛtinamu","VU":"Vanuwatu","WF":"Walisi-ni-Futuna","WS":"Samowa","XA":"XA","XB":"XB","XK":"XK","YE":"Yemɛni","YT":"Mayoti","ZA":"Worodugu Afriki","ZM":"Zanbi","ZW":"Zimbabuwe","ZZ":"ZZ"},"short":{"GB":"GB","HK":"HK","MO":"MO","PS":"PS","US":"US"},"narrow":{}},"script":{"long":{"Adlm":"Adlm","Aghb":"Aghb","Ahom":"Ahom","Arab":"Arab","Armi":"Armi","Armn":"Armn","Avst":"Avst","Bali":"Bali","Bamu":"Bamu","Bass":"Bass","Batk":"Batk","Beng":"Beng","Bhks":"Bhks","Bopo":"Bopo","Brah":"Brah","Brai":"Brai","Bugi":"Bugi","Buhd":"Buhd","Cakm":"Cakm","Cans":"Cans","Cari":"Cari","Cham":"Cham","Cher":"Cher","Copt":"Copt","Cprt":"Cprt","Cyrl":"Cyrl","Deva":"Deva","Dogr":"Dogr","Dsrt":"Dsrt","Dupl":"Dupl","Egyp":"Egyp","Elba":"Elba","Elym":"Elym","Ethi":"Ethi","Geor":"Geor","Glag":"Glag","Gong":"Gong","Gonm":"Gonm","Goth":"Goth","Gran":"Gran","Grek":"Grek","Gujr":"Gujr","Guru":"Guru","Hanb":"Hanb","Hang":"Hang","Hani":"Hani","Hano":"Hano","Hans":"Hans","Hant":"Hant","Hatr":"Hatr","Hebr":"Hebr","Hira":"Hira","Hluw":"Hluw","Hmng":"Hmng","Hmnp":"Hmnp","Hrkt":"Hrkt","Hung":"Hung","Ital":"Ital","Jamo":"Jamo","Java":"Java","Jpan":"Jpan","Kali":"Kali","Kana":"Kana","Khar":"Khar","Khmr":"Khmr","Khoj":"Khoj","Knda":"Knda","Kore":"Kore","Kthi":"Kthi","Lana":"Lana","Laoo":"Laoo","Latn":"Latn","Lepc":"Lepc","Limb":"Limb","Lina":"Lina","Linb":"Linb","Lisu":"Lisu","Lyci":"Lyci","Lydi":"Lydi","Mahj":"Mahj","Maka":"Maka","Mand":"Mand","Mani":"Mani","Marc":"Marc","Medf":"Medf","Mend":"Mend","Merc":"Merc","Mero":"Mero","Mlym":"Mlym","Modi":"Modi","Mong":"Mong","Mroo":"Mroo","Mtei":"Mtei","Mult":"Mult","Mymr":"Mymr","Nand":"Nand","Narb":"Narb","Nbat":"Nbat","Newa":"Newa","Nkoo":"Nkoo","Nshu":"Nshu","Ogam":"Ogam","Olck":"Olck","Orkh":"Orkh","Orya":"Orya","Osge":"Osge","Osma":"Osma","Palm":"Palm","Pauc":"Pauc","Perm":"Perm","Phag":"Phag","Phli":"Phli","Phlp":"Phlp","Phnx":"Phnx","Plrd":"Plrd","Prti":"Prti","Qaag":"Qaag","Rjng":"Rjng","Rohg":"Rohg","Runr":"Runr","Samr":"Samr","Sarb":"Sarb","Saur":"Saur","Sgnw":"Sgnw","Shaw":"Shaw","Shrd":"Shrd","Sidd":"Sidd","Sind":"Sind","Sinh":"Sinh","Sogd":"Sogd","Sogo":"Sogo","Sora":"Sora","Soyo":"Soyo","Sund":"Sund","Sylo":"Sylo","Syrc":"Syrc","Tagb":"Tagb","Takr":"Takr","Tale":"Tale","Talu":"Talu","Taml":"Taml","Tang":"Tang","Tavt":"Tavt","Telu":"Telu","Tfng":"Tfng","Tglg":"Tglg","Thaa":"Thaa","Thai":"Thai","Tibt":"Tibt","Tirh":"Tirh","Ugar":"Ugar","Vaii":"Vaii","Wara":"Wara","Wcho":"Wcho","Xpeo":"Xpeo","Xsux":"Xsux","Yiii":"Yiii","Zanb":"Zanb","Zinh":"Zinh","Zmth":"Zmth","Zsye":"Zsye","Zsym":"Zsym","Zxxx":"Zxxx","Zyyy":"Zyyy","Zzzz":"Zzzz"},"short":{},"narrow":{}},"currency":{"long":{"ADP":"ADP","AED":"arabu mara kafoli Diram","AFA":"AFA","AFN":"AFN","ALK":"ALK","ALL":"ALL","AMD":"AMD","ANG":"ANG","AOA":"angola Kwanza","AOK":"AOK","AON":"AON","AOR":"AOR","ARA":"ARA","ARL":"ARL","ARM":"ARM","ARP":"ARP","ARS":"ARS","ATS":"ATS","AUD":"ositirali Dolar","AWG":"AWG","AZM":"AZM","AZN":"AZN","BAD":"BAD","BAM":"BAM","BAN":"BAN","BBD":"BBD","BDT":"BDT","BEC":"BEC","BEF":"BEF","BEL":"BEL","BGL":"BGL","BGM":"BGM","BGN":"BGN","BGO":"BGO","BHD":"bareyini Dinar","BIF":"burundi Fraŋ","BMD":"BMD","BND":"BND","BOB":"BOB","BOL":"BOL","BOP":"BOP","BOV":"BOV","BRB":"BRB","BRC":"BRC","BRE":"BRE","BRL":"BRL","BRN":"BRN","BRR":"BRR","BRZ":"BRZ","BSD":"BSD","BTN":"BTN","BUK":"BUK","BWP":"bɔtisiwana Pula","BYB":"BYB","BYN":"BYN","BYR":"BYR","BZD":"BZD","CAD":"kanada Dolar","CDF":"kongole Fraŋ","CHE":"CHE","CHF":"suwisi Fraŋ","CHW":"CHW","CLE":"CLE","CLF":"CLF","CLP":"CLP","CNH":"CNH","CNX":"CNX","CNY":"siniwa Yuwan","COP":"COP","COU":"COU","CRC":"CRC","CSD":"CSD","CSK":"CSK","CUC":"CUC","CUP":"CUP","CVE":"capivɛrdi Esekudo","CYP":"CYP","CZK":"CZK","DDM":"DDM","DEM":"DEM","DJF":"jibuti Fraŋ","DKK":"DKK","DOP":"DOP","DZD":"alizeri Dinar","ECS":"ECS","ECV":"ECV","EEK":"EEK","EGP":"eziputi Livri","ERN":"eritere Nafika","ESA":"ESA","ESB":"ESB","ESP":"ESP","ETB":"etiopi Bir","EUR":"ero","FIM":"FIM","FJD":"FJD","FKP":"FKP","FRF":"FRF","GBP":"angilɛ Livri","GEK":"GEK","GEL":"GEL","GHC":"gana Sedi","GHS":"GHS","GIP":"GIP","GMD":"gambi Dalasi","GNF":"GNF","GNS":"gine Fraŋ","GQE":"GQE","GRD":"GRD","GTQ":"GTQ","GWE":"GWE","GWP":"GWP","GYD":"GYD","HKD":"HKD","HNL":"HNL","HRD":"HRD","HRK":"HRK","HTG":"HTG","HUF":"HUF","IDR":"IDR","IEP":"IEP","ILP":"ILP","ILR":"ILR","ILS":"ILS","INR":"Ɛndu Rupi","IQD":"IQD","IRR":"IRR","ISJ":"ISJ","ISK":"ISK","ITL":"ITL","JMD":"JMD","JOD":"JOD","JPY":"zapɔne Yɛn","KES":"keniya Siling","KGS":"KGS","KHR":"KHR","KMF":"komɔri Fraŋ","KPW":"KPW","KRH":"KRH","KRO":"KRO","KRW":"KRW","KWD":"KWD","KYD":"KYD","KZT":"KZT","LAK":"LAK","LBP":"LBP","LKR":"LKR","LRD":"liberiya Dolar","LSL":"lesoto Loti","LTL":"LTL","LTT":"LTT","LUC":"LUC","LUF":"LUF","LUL":"LUL","LVL":"LVL","LVR":"LVR","LYD":"libi Dinar","MAD":"marɔku Diram","MAF":"MAF","MCF":"MCF","MDC":"MDC","MDL":"MDL","MGA":"madagasikari Fraŋ","MGF":"MGF","MKD":"MKD","MKN":"MKN","MLF":"MLF","MMK":"MMK","MNT":"MNT","MOP":"MOP","MRO":"mɔritani Uguwiya (1973–2017)","MRU":"mɔritani Uguwiya","MTL":"MTL","MTP":"MTP","MUR":"morisi Rupi","MVP":"MVP","MVR":"MVR","MWK":"malawi Kwaca","MXN":"MXN","MXP":"MXP","MXV":"MXV","MYR":"MYR","MZE":"MZE","MZM":"mozanbiki Metikali","MZN":"MZN","NAD":"namibi Dolar","NGN":"nizeriya Nɛra","NIC":"NIC","NIO":"NIO","NLG":"NLG","NOK":"NOK","NPR":"NPR","NZD":"NZD","OMR":"OMR","PAB":"PAB","PEI":"PEI","PEN":"PEN","PES":"PES","PGK":"PGK","PHP":"PHP","PKR":"PKR","PLN":"PLN","PLZ":"PLZ","PTE":"PTE","PYG":"PYG","QAR":"QAR","RHD":"RHD","ROL":"ROL","RON":"RON","RSD":"RSD","RUB":"RUB","RUR":"RUR","RWF":"ruwanda Fraŋ","SAR":"sawudiya Riyal","SBD":"SBD","SCR":"sesɛli Rupi","SDD":"SDD","SDG":"sudani Dinar","SDP":"sudani Livri","SEK":"SEK","SGD":"SGD","SHP":"Ɛlɛni-Senu Livri","SIT":"SIT","SKK":"SKK","SLL":"siyeralewɔni Lewɔni","SOS":"somali Siling","SRD":"SRD","SRG":"SRG","SSP":"SSP","STD":"sawotome Dobra (1977–2017)","STN":"sawotome Dobra","SUR":"SUR","SVC":"SVC","SYP":"SYP","SZL":"swazilandi Lilangeni","THB":"THB","TJR":"TJR","TJS":"TJS","TMM":"TMM","TMT":"TMT","TND":"tunizi Dinar","TOP":"TOP","TPE":"TPE","TRL":"TRL","TRY":"TRY","TTD":"TTD","TWD":"TWD","TZS":"tanzani Siling","UAH":"UAH","UAK":"UAK","UGS":"UGS","UGX":"uganda Siling","USD":"ameriki Dolar","USN":"USN","USS":"USS","UYI":"UYI","UYP":"UYP","UYU":"UYU","UYW":"UYW","UZS":"UZS","VEB":"VEB","VEF":"VEF","VES":"VES","VND":"VND","VNN":"VNN","VUV":"VUV","WST":"WST","XAF":"sefa Fraŋ (BEAC)","XAG":"XAG","XAU":"XAU","XBA":"XBA","XBB":"XBB","XBC":"XBC","XBD":"XBD","XCD":"XCD","XDR":"XDR","XEU":"XEU","XFO":"XFO","XFU":"XFU","XOF":"sefa Fraŋ (BCEAO)","XPD":"XPD","XPF":"XPF","XPT":"XPT","XRE":"XRE","XSU":"XSU","XTS":"XTS","XUA":"XUA","XXX":"XXX","YDD":"YDD","YER":"YER","YUD":"YUD","YUM":"YUM","YUN":"YUN","YUR":"YUR","ZAL":"ZAL","ZAR":"sudafriki Randi","ZMK":"zambi Kwaca (1968–2012)","ZMW":"zambi Kwaca","ZRN":"ZRN","ZRZ":"ZRZ","ZWD":"zimbabuwe Dolar","ZWL":"ZWL","ZWR":"ZWR"},"short":{},"narrow":{}}},"patterns":{"locale":"{0} ({1})"}}},"availableLocales":["bm"]})
}
|
from mod_pywebsocket import stream
def web_socket_do_extra_handshake(request):
pass
def web_socket_transfer_data(request):
# pywebsocket does not mask message by default. We need to build a frame manually to mask it.
request.connection.write(stream.create_text_frame('The Masked Message', mask=True))
|
import time
from typing import Optional
from prefect import context, Client
from prefect.exceptions import ClientError
def _running_with_backend() -> bool:
"""
Determine if running in context of a backend. This is always true when running
using the `CloudTaskRunner`.
Returns:
- bool: if `_running_with_backend` is set in context
"""
return bool(context.get("running_with_backend"))
def _create_task_run_artifact(kind: str, data: dict) -> str:
client = Client()
task_run_id = context.get("task_run_id")
# XXX: there's a race condition in the cloud backend for mapped tasks where
# the task run lookup might fail temporarily. This should last a few
# seconds max, for now we retry a few times.
retries = 5
while True:
try:
return client.create_task_run_artifact(
task_run_id=task_run_id, kind=kind, data=data
)
except ClientError as exc:
# If it's a not found error and we still have retries left, retry
if "not found" in str(exc).lower() and retries:
time.sleep(1)
retries -= 1
continue
raise
def create_link(link: str) -> Optional[str]:
"""
Create a link artifact
Args:
- link (str): the link to post
Returns:
- str: the task run artifact ID
"""
if not _running_with_backend():
return None
return _create_task_run_artifact("link", {"link": link})
def update_link(task_run_artifact_id: str, link: str) -> None:
"""
Update an existing link artifact. This function will replace the current link
artifact with the new link provided.
Args:
- task_run_artifact_id (str): the ID of an existing task run artifact
- link (str): the new link to update the artifact with
"""
if not _running_with_backend():
return
client = Client()
client.update_task_run_artifact(
task_run_artifact_id=task_run_artifact_id, data={"link": link}
)
def create_markdown(markdown: str) -> Optional[str]:
"""
Create a markdown artifact
Args:
- markdown (str): the markdown to post
Returns:
- str: the task run artifact ID
"""
if not _running_with_backend():
return None
return _create_task_run_artifact("markdown", {"markdown": markdown})
def update_markdown(task_run_artifact_id: str, markdown: str) -> None:
"""
Update an existing markdown artifact. This function will replace the current markdown
artifact with the new markdown provided.
Args:
- task_run_artifact_id (str): the ID of an existing task run artifact
- markdown (str): the new markdown to update the artifact with
"""
if not _running_with_backend():
return
client = Client()
client.update_task_run_artifact(
task_run_artifact_id=task_run_artifact_id, data={"markdown": markdown}
)
def delete_artifact(task_run_artifact_id: str) -> None:
"""
Delete an existing artifact
Args:
- task_run_artifact_id (str): the ID of an existing task run artifact
"""
if not _running_with_backend():
return
client = Client()
client.delete_task_run_artifact(task_run_artifact_id=task_run_artifact_id)
|
'''Text progress bar library for Python.
A text progress bar is typically used to display the progress of a long
running operation, providing a visual cue that processing is underway.
The ProgressBar class manages the current progress, and the format of the line
is given by a number of widgets. A widget is an object that may display
differently depending on the state of the progress bar.
The progressbar module is very easy to use, yet very powerful. It will also
automatically enable features like auto-resizing when the system supports it.
'''
__title__ = 'Python Progressbar'
__package_name__ = 'progressbar2'
__author__ = 'Rick van Hattem (Wolph)'
__description__ = '''
A Python Progressbar library to provide visual (yet text based) progress to
long running operations.
'''.strip()
__email__ = 'wolph@wol.ph'
__version__ = '3.10.0'
__license__ = 'BSD'
__copyright__ = 'Copyright 2015 Rick van Hattem (Wolph)'
__url__ = 'https://github.com/WoLpH/python-progressbar'
|
var path = require('path');
module.exports = {
entry: './src/main/js/app.js',
devtool: 'hidden-source-map',
cache: true,
mode: 'production',
output: {
path: __dirname,
filename: './src/resources/public/js/bundle.js'
},
devServer: {
inline: false,
contentBase: "./dist",
},
module: {
rules: [
{
test: path.join(__dirname, '.'),
exclude: /(node_modules)/,
use: [{
loader: 'babel-loader',
options: {
presets: ["@babel/preset-env", "@babel/preset-react"]
}
}]
},{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
]
},
};
|
import React, { Component } from 'react';
import { StyleSheet, View, Text, Animated, Linking, Button } from 'react-native';
import Mapbox from '@mapbox/react-native-mapbox-gl';
import TextModule from './components/TextModule.js';
import SwipeCards from './components/SwipeCards.js';
import Footer from './components/Footer.js';
import Swiper from 'react-native-swiper';
import Event from './components/Event.js'
import Profilemodule from './components/Profilemodule.js';
Mapbox.setAccessToken('pk.eyJ1Ijoic3RlZmZlbnNvcm5wYW8iLCJhIjoiY2pnNnAzZmwyOGo4dzJxbXN3N2ZqNmVsNyJ9.IqeZUG-DDe9E4nTdZEZI9g');
export default class MainPage extends Component {
static navigationOptions = {
header: null
}
constructor(props) {
super(props);
this.state = {
animate: new Animated.Value(1),
index: 1,
toggleCard: 1,
user: undefined
}
this.shrinkFade = Animated.timing(
this.state.animate,
{ toValue: 0, duration: 500 }
)
this.growFade = Animated.timing(
this.state.animate,
{ toValue: 1, duration: 500 }
)
this.fadeOutHalf = Animated.timing(
this.state.animate,
{ toValue: 0.8, duration: 100 }
)
this.fadeIn = Animated.timing(
this.state.animate,
{ toValue: 1, duration: 100 }
)
}
beginDrag = (e, state, context) => {
if (this.state.toggleCard == 1 && state.index == 1) {
this.fadeOutHalf.start()
}
}
endDrag = (e, state, context) => {
this.setState({ index: state.index })
if (this.state.toggleCard == 0) {
return
} else {
if (state.index !== 1) {
this.shrinkFade.start();
} else {
this.growFade.start();
}
}
}
checkIndex = () => {
if (this.state.toggleCard == 0) {
return
} else {
setTimeout(() => {
if (this.state.index == 1 && this.state.toggleCard == 1) {
this.fadeIn.start()
}
}, 500)
}
}
toggleCards = () => {
if (this.state.toggleCard == 1) {
this.setState({ toggleCard: 0 })
this.shrinkFade.start()
} else {
this.setState({ toggleCard: 1 })
this.growFade.start()
}
}
render() {
const { animate } = this.state
const Animate = { transform: [{ scale: animate }], opacity: animate };
return (
<View style={styles.body}>
<Swiper
showsPagination={false}
loop={false}
index={1}
onScrollBeginDrag={this.beginDrag}
onMomentumScrollEnd={this.endDrag}
onTouchEnd={this.checkIndex}>
<View style={styles.slide}>
<View style={styles.slideBody}>
<Profilemodule />
</View>
<View style={styles.footer}>
<Text style={styles.pageName}>Profile</Text>
</View>
</View>
<View style={styles.slide}>
<View style={styles.slideBody}>
<Mapbox.MapView style={styles.map}>
</Mapbox.MapView>
</View>
<View style={styles.footer}>
<Button
style={styles.pageName}
title="TurnUp"
onPress={this.toggleCards}
/>
</View>
</View>
<View style={styles.slide}>
<View style={styles.slideBody}>
<Event />
</View>
<View style={styles.footer}>
<Text style={styles.pageName}>Event</Text>
</View>
</View>
</Swiper>
<Animated.View style={[styles.animated, Animate]}>
<SwipeCards />
</Animated.View>
</View>
);
}
}
const styles = StyleSheet.create({
body: {
flex: 1,
},
slide: {
flex: 9,
},
slideBody: {
flex: 9,
},
map: {
flex: 1
},
footer: {
flex: 1,
alignItems: "center",
justifyContent: "center"
},
pageName: {
fontSize: 50
},
animated: {
position: "absolute",
zIndex: 2,
width: "100%",
height: "90%",
}
});
|
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Link from '../../Link';
import Button from '../../Button';
import TextInput from '../../TextInput';
import RadioTile from '../../RadioTile';
import {
ClickableTile,
ExpandableTile,
SelectableTile,
Tile,
TileAboveTheFoldContent,
TileBelowTheFoldContent,
} from '../';
import TileGroup from '../../TileGroup';
import { Layer } from '../../Layer';
import './tile-story.scss';
export default {
title: 'Components/Tile',
component: Tile,
subcomponents: {
ClickableTile,
SelectableTile,
ExpandableTile,
RadioTile,
TileGroup,
TileAboveTheFoldContent,
TileBelowTheFoldContent,
},
};
export const Default = () => {
return (
<Tile>
Default tile
<br />
<br />
<Link href="https://www.carbondesignsystem.com">Link</Link>
</Tile>
);
};
export const DefaultWithLayer = () => {
return (
<>
<Tile>
First layer
<br />
<br />
<Link href="https://www.carbondesignsystem.com">Link</Link>
</Tile>
<Layer>
<Tile>
Second layer
<br />
<br />
<Link href="https://www.carbondesignsystem.com">Link</Link>
</Tile>
<Layer>
<Tile>
Third layer
<br />
<br />
<Link href="https://www.carbondesignsystem.com">Link</Link>
</Tile>
</Layer>
</Layer>
</>
);
};
export const Clickable = () => {
return <ClickableTile>Clickable Tile</ClickableTile>;
};
export const ClickableWithLayer = () => {
return (
<>
<ClickableTile>First layer</ClickableTile>
<Layer>
<ClickableTile>Second layer</ClickableTile>
<Layer>
<ClickableTile>Third layer</ClickableTile>
</Layer>
</Layer>
</>
);
};
export const MultiSelect = () => {
return (
<div role="group" aria-label="selectable tiles">
<SelectableTile id="tile-1" name="tiles">
Option 1
</SelectableTile>
<SelectableTile id="tile-2" name="tiles">
Option 2
</SelectableTile>
<SelectableTile id="tile-3" name="tiles">
Option 3
</SelectableTile>
</div>
);
};
export const SelectableWithLayer = () => {
<>
<SelectableTile id="tile-3" name="tiles">
First layer
</SelectableTile>
<Layer>
<SelectableTile id="tile-3" name="tiles">
Second layer
</SelectableTile>
<Layer>
<SelectableTile id="tile-3" name="tiles">
Third layer
</SelectableTile>
</Layer>
</Layer>
</>;
};
export const Radio = () => {
return (
<TileGroup
defaultSelected="default-selected"
legend="Radio Tile Group"
name="radio tile group">
<RadioTile value="standard" style={{ marginBottom: '.5rem' }}>
Option 1
</RadioTile>
<RadioTile value="default-selected" id="tile-2">
Option 2
</RadioTile>
<RadioTile value="selected" id="tile-3">
Option 3
</RadioTile>
</TileGroup>
);
};
export const RadioWithLayer = () => {
return (
<>
<TileGroup
defaultSelected="default-selected"
legend="First layer"
name="radio tile group">
<RadioTile value="standard" style={{ marginBottom: '.5rem' }}>
Option 1
</RadioTile>
<RadioTile value="default-selected" id="tile-2">
Option 2
</RadioTile>
</TileGroup>
<Layer>
<TileGroup
defaultSelected="default-selected"
legend="Second Layer"
name="radio tile group">
<RadioTile value="standard" style={{ marginBottom: '.5rem' }}>
Option 1
</RadioTile>
<RadioTile value="default-selected" id="tile-2">
Option 2
</RadioTile>
</TileGroup>
<Layer>
<TileGroup
defaultSelected="default-selected"
legend="Third Layer"
name="radio tile group">
<RadioTile value="standard" style={{ marginBottom: '.5rem' }}>
Option 1
</RadioTile>
<RadioTile value="default-selected" id="tile-2">
Option 2
</RadioTile>
</TileGroup>
</Layer>
</Layer>
</>
);
};
export const Expandable = () => (
<div style={{ width: '400px' }}>
<ExpandableTile
tileCollapsedIconText="Interact to Expand tile"
tileExpandedIconText="Interact to Collapse tile">
<TileAboveTheFoldContent>
<div style={{ height: '200px' }}>Above the fold content here</div>
</TileAboveTheFoldContent>
<TileBelowTheFoldContent>
<div style={{ height: '400px' }}>Below the fold content here</div>
</TileBelowTheFoldContent>
</ExpandableTile>
</div>
);
export const ExpandableWithInteractive = () => (
<div style={{ width: '400px' }}>
<ExpandableTile
tileCollapsedIconText="Interact to Expand tile"
tileExpandedIconText="Interact to Collapse tile">
<TileAboveTheFoldContent>
<div style={{ height: '200px', width: '200px' }}>
Above the fold content here
<div style={{ paddingTop: '1rem' }}>
<Button>Example</Button>
</div>
</div>
</TileAboveTheFoldContent>
<TileBelowTheFoldContent>
<div style={{ height: '200px', width: '200px' }}>
Below the fold content here
<TextInput id="test2" invalidText="A valid value is required" />
</div>
</TileBelowTheFoldContent>
</ExpandableTile>
</div>
);
export const ExpandableWithLayer = () => {
return (
<div style={{ width: '400px' }}>
<ExpandableTile
tileCollapsedIconText="Interact to Expand tile"
tileExpandedIconText="Interact to Collapse tile">
<TileAboveTheFoldContent>
<div style={{ height: '100px', width: '200px' }}>First layer</div>
</TileAboveTheFoldContent>
<TileBelowTheFoldContent>
<div style={{ height: '200px', width: '200px' }}>
Below the fold content here
<TextInput id="test2" invalidText="A valid value is required" />
</div>
</TileBelowTheFoldContent>
</ExpandableTile>
<Layer>
<ExpandableTile
tileCollapsedIconText="Interact to Expand tile"
tileExpandedIconText="Interact to Collapse tile">
<TileAboveTheFoldContent>
<div style={{ height: '100px' }}>Second layer</div>
</TileAboveTheFoldContent>
<TileBelowTheFoldContent>
<div style={{ height: '200px' }}>
Below the fold content here
<TextInput id="test2" invalidText="A valid value is required" />
</div>
</TileBelowTheFoldContent>
</ExpandableTile>
<Layer>
<ExpandableTile
tileCollapsedIconText="Interact to Expand tile"
tileExpandedIconText="Interact to Collapse tile">
<TileAboveTheFoldContent>
<div style={{ height: '100px' }}>Third layer</div>
</TileAboveTheFoldContent>
<TileBelowTheFoldContent>
<div style={{ height: '100px' }}>
Below the fold content here
<TextInput id="test2" invalidText="A valid value is required" />
</div>
</TileBelowTheFoldContent>
</ExpandableTile>
</Layer>
</Layer>
</div>
);
};
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
from geometry_msgs.msg import Twist
import tf
import sys
import tf2_ros
import geometry_msgs.msg
import logging
logging.basicConfig()
if __name__ == '__main__':
if len(sys.argv) < 8:
rospy.logerr('Invalid number of parameters\nusage: '
'./static_turtle_tf2_broadcaster.py '
'child_frame_name x y z roll pitch yaw')
sys.exit(0)
else:
if sys.argv[1] == 'world':
rospy.logerr('Your static turtle name cannot be "world"')
sys.exit(0)
rospy.init_node('my_static_tf2_broadcaster')
broadcaster = tf2_ros.StaticTransformBroadcaster()
static_transformStamped = geometry_msgs.msg.TransformStamped()
static_transformStamped.header.stamp = rospy.Time.now()
static_transformStamped.header.frame_id = "world"
static_transformStamped.child_frame_id = sys.argv[1]
static_transformStamped.transform.translation.x = float(sys.argv[2])
static_transformStamped.transform.translation.y = float(sys.argv[3])
static_transformStamped.transform.translation.z = float(sys.argv[4])
quat = tf.transformations.quaternion_from_euler(
float(sys.argv[5]),float(sys.argv[6]),float(sys.argv[7]))
static_transformStamped.transform.rotation.x = quat[0]
static_transformStamped.transform.rotation.y = quat[1]
static_transformStamped.transform.rotation.z = quat[2]
static_transformStamped.transform.rotation.w = quat[3]
broadcaster.sendTransform(static_transformStamped)
rospy.spin()
|
from django.db import models
from django.contrib.postgres.indexes import GinIndex
from treebeard.mp_tree import MP_Node
from treebeard.mp_tree import MP_NodeManager, MP_NodeQuerySet
from django.contrib.postgres.search import TrigramSimilarity
from wazimap_ng.extensions.index import GinTrgmIndex
from wazimap_ng.general.models import BaseModel
class GeographyQuerySet(MP_NodeQuerySet):
def search(self, text, similarity=0.3):
return (
self
.annotate(similarity=TrigramSimilarity("name", text))
.filter(similarity__gt=similarity)
.order_by("-similarity")
)
class GeographyManager(MP_NodeManager):
def get_queryset(self):
return GeographyQuerySet(self.model, using=self._db)
def search(self, text, similarity=0.3):
return self.get_queryset().search(text, similarity)
class Geography(MP_Node, BaseModel):
name = models.CharField(max_length=50)
code = models.CharField(max_length=20)
level = models.CharField(max_length=20)
version = models.CharField(max_length=20, blank=True)
def __str__(self):
return f"{self.name} ({self.version})"
objects = GeographyManager()
class Meta:
verbose_name_plural = "geographies"
indexes = [
GinTrgmIndex(fields=["name"]),
models.Index(fields=["code"], name="idx_datasets_geography_code"),
]
ordering = ["id"]
constraints = [
models.UniqueConstraint(fields=["version", "code"], name="unique_geography_code_version")
]
def get_siblings(self):
siblings = super(Geography, self).get_siblings()
return siblings.filter(version=self.version)
def get_child_boundaries(self):
from ...boundaries.models import GeographyBoundary
children = self.get_children()
codes = [c.code for c in children]
levels = set(c.level for c in children)
child_types = {}
if len(children) > 0:
for child_level in levels:
child_types[child_level] = (
GeographyBoundary.objects
.filter(geography__code__in=codes, geography__level=child_level, geography__version=self.version)
.select_related("geography")
)
return child_types
class GeographyHierarchy(BaseModel):
name = models.CharField(max_length=50)
root_geography = models.ForeignKey(Geography, null=False, on_delete=models.CASCADE)
description = models.TextField(blank=True)
@property
def version(self):
return self.root_geography.version
def help_text(self):
return f"{self.name} : {self.description}"
def __str__(self):
return f"{self.name}"
class Meta:
verbose_name_plural = "Geography Hierarchies"
|
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, text, select } from '@storybook/addon-knobs';
import { withInfo } from '@storybook/addon-info';
import { defaultTemplate } from 'storybook/decorators/storyTemplates';
import {
storybookPackageName,
DOCUMENTATION_URL,
STORYBOOK_CATEGORY
} from 'storybook/constants/siteConstants';
import { FieldLevelHelp } from './index';
import { name } from '../../../package.json';
const stories = storiesOf(
`${storybookPackageName(name)}/${
STORYBOOK_CATEGORY.FORMS_AND_CONTROLS
}/Help On Forms`,
module
);
stories.addDecorator(withKnobs);
stories.addDecorator(
defaultTemplate({
title: 'FieldLevelHelp',
documentationLink: `${
DOCUMENTATION_URL.PATTERNFLY_ORG_COMMUNICATION
}inline-notifications/`
})
);
stories.add(
'FieldLevelHelp',
withInfo()(() => {
const close = select('Close Popover', ['true', 'false']);
const content = text(
'content',
'Enter the hostname in a valid format <br> <a target="_blank" href="http://www.test.example.com">Click here for examples of valid hostnames</a>'
);
const fieldLabel = text('Field Label', 'Hostname');
const htmlContent = (
<div
dangerouslySetInnerHTML={{
__html: content
}}
/>
);
return (
<div style={{ textAlign: 'center' }}>
{fieldLabel}
<FieldLevelHelp content={htmlContent} close={close} />
</div>
);
})
);
|
/*-
* Copyright (c) 1999 Doug Rabson
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/isa/pnpvar.h,v 1.4 1999/12/29 04:54:36 peter Exp $
*/
#ifndef _ISA_PNPVAR_H_
#define _ISA_PNPVAR_H_
#ifdef _KERNEL
#if 0
void pnp_write(int d, u_char r); /* used by Luigi's sound driver */
u_char pnp_read(int d); /* currently unused, but who knows... */
#endif
#define PNP_HEXTONUM(c) ((c) >= 'a' \
? (c) - 'a' + 10 \
: ((c) >= 'A' \
? (c) - 'A' + 10 \
: (c) - '0'))
#define PNP_EISAID(s) \
((((s[0] - '@') & 0x1f) << 2) \
| (((s[1] - '@') & 0x18) >> 3) \
| (((s[1] - '@') & 0x07) << 13) \
| (((s[2] - '@') & 0x1f) << 8) \
| (PNP_HEXTONUM(s[4]) << 16) \
| (PNP_HEXTONUM(s[3]) << 20) \
| (PNP_HEXTONUM(s[6]) << 24) \
| (PNP_HEXTONUM(s[5]) << 28))
char *pnp_eisaformat(u_int32_t id);
void pnp_parse_resources(device_t dev, u_char *resources, int len);
#endif /* _KERNEL */
#endif /* !_ISA_PNPVAR_H_ */
|
from contextlib import contextmanager
from piestats.update.filemanager import FileManager
import os
import logging
import click
from fnmatch import fnmatch
from io import BytesIO
import ftplib
class FtpFileManager(FileManager):
def __init__(self, r, keys, root, retention, connect_settings):
self.r = r
self.keys = keys
self.root = root
self.retention = retention
self.connect_settings = connect_settings
self.ftp = None
self.init_stats()
def get_file_paths(self, sub_path, pattern='*'):
if not self.ftp:
return []
return sorted(os.path.join(self.root, sub_path, filename) for filename in self.ftp.nlst(os.path.join(self.root, sub_path)) if fnmatch(filename, pattern))
def get_paths_with_size(self, sub_path, pattern='*'):
''' Try to get a list of tuples of (path, size). If we can't get size, it is then None '''
data = BytesIO()
self.ftp.retrbinary('MLSD %s' % os.path.join(self.root, sub_path), data.write)
lines = data.getvalue().splitlines()
result = []
for line in lines:
parts = line.split(';')
filename = parts[-1].strip()
if not fnmatch(filename, pattern):
continue
size = None
for fact in parts[:-1]:
if fact.lower().startswith('size='):
try:
size = int(fact.split('=')[1])
break
except Exception:
break
result.append((os.path.join(self.root, sub_path, filename), size))
return sorted(result)
def get_files(self, sub_path, pattern='*'):
if not self.ftp:
return
files = self.get_paths_with_size(sub_path, pattern)
with click.progressbar(files,
show_eta=False,
label='Parsing {0} logs from ftp'.format(len(files)),
item_show_func=self.progressbar_callback) as progressbar:
for (path, size) in progressbar:
if self.retention.too_old_filename(os.path.basename(path)):
continue
if size is None:
try:
size = self.ftp.size(path)
except ftplib.error_perm:
print 'Could not get size of %s' % path
continue
key = self.filename_key(path)
prev = self.r.hget(self.keys.log_positions, key)
if prev is None:
pos = 0
else:
pos = int(prev)
if size > pos:
if progressbar.is_hidden:
print('Reading {filename} from offset {pos}'.format(filename=path, pos=pos))
yield path, pos
self.r.hset(self.keys.log_positions, key, size)
def get_data(self, path, position):
data = BytesIO()
self.ftp.retrbinary('RETR %s' % path, data.write)
data.seek(position, 0)
return data.getvalue()
@contextmanager
def initialize(self):
try:
self.ftp = ftplib.FTP()
self.ftp.connect(self.connect_settings['hostname'], int(self.connect_settings['port']))
self.ftp.login(self.connect_settings['username'], self.connect_settings['password'])
except ftplib.error_perm as e:
logging.error('Accessing FTP failed: %s', e)
self.ftp = None
yield
if self.ftp:
self.ftp.close()
def filename_key(self, filename):
return 'ftp://{username}@{hostname}:{port}/{filename}'.format(
filename=filename,
username=self.connect_settings['username'],
hostname=self.connect_settings['hostname'],
port=self.connect_settings['port'])
|
/****************************************************************************
**
** Copyright (C) 2020 @scriptiot
**
** EVM是一款通用化设计的虚拟机引擎,拥有语法解析前端接口、编译器、虚拟机和虚拟机扩展接口框架。
** 支持js、python、qml、lua等多种脚本语言,纯C开发,零依赖,内置REPL,支持主流 ROM > 40KB, RAM > 2KB的MCU;
** 自带垃圾回收(GC)先进的内存管理,采用最复杂的压缩算法,无内存碎片(大部分解释器都存在内存碎片)
** Version : 1.0
** Email : scriptiot@aliyun.com
** Website : https://github.com/scriptiot/evm
** https://gitee.com/scriptiot/evm
** Licence: Apache-2.0
****************************************************************************/
#ifdef CONFIG_EVM_ECMA_ARRAY
#include "ecma.h"
evm_val_t * ecma_Array;
#ifdef CONFIG_EVM_ECMA_OBJECT
void ecma_object_attrs_set(evm_t * e, evm_val_t * o, evm_val_t * object, evm_val_t * prototype);
#endif
evm_val_t ecma_array_concat(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_fill(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_indexOf(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_push(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_pop(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_shift(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_slice(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_copyWithin(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_unshift(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_filter(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_map(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_find(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
evm_val_t ecma_array_join(evm_t * e, evm_val_t * p, int argc, evm_val_t * v);
void ecma_array_set_length(evm_t * e, evm_val_t * o, int len){
#ifdef CONFIG_EVM_ECMA_OBJECT
evm_attr_set_by_index(e, o, ECMA_OBJECT_ATTR_SIZE, evm_mk_number(len));
#else
evm_attr_set_by_index(e, o, 0, evm_mk_number(len));
#endif
}
int ecma_array_get_length(evm_t * e, evm_val_t * o){
#ifdef CONFIG_EVM_ECMA_OBJECT
return evm_2_integer( evm_attr_get_by_index(e, o, ECMA_OBJECT_ATTR_SIZE) );
#else
return evm_2_integer( evm_attr_get_by_index(e, o, 0) );
#endif
}
void ecma_array_attrs_apply(evm_t * e, evm_val_t * o){
int index = 0;
#ifdef CONFIG_EVM_ECMA_OBJECT
if( evm_attr_create(e, o, ECMA_OBJECT_ATTR_SIZE + ECMA_ARRAY_ATTR_SIZE) == ec_ok ){
ecma_object_attrs_set(e, o, ecma_Array, ecma_object_prototype);
index = ECMA_OBJECT_ATTR_SIZE;
#else
if( evm_attr_create(e, o, ECMA_ARRAY_ATTR_SIZE) == ec_ok ){
#endif
evm_attr_set(e, o, index++, "length", evm_mk_number( evm_list_len(o) ));
evm_attr_set(e, o, index++, "push", evm_mk_native((intptr_t)ecma_array_push));
evm_attr_set(e, o, index++, "pop", evm_mk_native((intptr_t)ecma_array_pop));
evm_attr_set(e, o, index++, "concat", evm_mk_native((intptr_t)ecma_array_concat));
evm_attr_set(e, o, index++, "fill", evm_mk_native((intptr_t)ecma_array_fill));
evm_attr_set(e, o, index++, "indexOf", evm_mk_native((intptr_t)ecma_array_indexOf));
evm_attr_set(e, o, index++, "shift", evm_mk_native((intptr_t)ecma_array_shift));
evm_attr_set(e, o, index++, "slice", evm_mk_native((intptr_t)ecma_array_slice));
evm_attr_set(e, o, index++, "copyWithin", evm_mk_native((intptr_t)ecma_array_copyWithin));
evm_attr_set(e, o, index++, "unshift", evm_mk_native((intptr_t)ecma_array_unshift));
evm_attr_set(e, o, index++, "filter", evm_mk_native((intptr_t)ecma_array_filter));
evm_attr_set(e, o, index++, "map", evm_mk_native((intptr_t)ecma_array_map));
evm_attr_set(e, o, index++, "find", evm_mk_native((intptr_t)ecma_array_find));
evm_attr_set(e, o, index++, "join", evm_mk_native((intptr_t)ecma_array_join));
evm_set_parent(o, ecma_object_prototype);
}
}
evm_val_t ecma_array_push(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) && argc >= 1 ){
int len = ecma_array_get_length(e, p);
int real_len = evm_list_len(p);
if( real_len > 0 && len < real_len )
evm_list_set(e, p, len, *v);
else
evm_list_push(e, p, argc, v);
ecma_array_set_length(e, p, len + argc);
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_pop(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
(void)argc;
(void)v;
if( evm_list_len(p) ){
int len = ecma_array_get_length(e, p);
evm_val_t val = *evm_list_get(e, p, len - 1);
evm_list_set(e, p, len - 1, EVM_VAL_UNDEFINED);
ecma_array_set_length(e, p, len - 1);
return val;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_concat(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( p && evm_is_list(p) && argc >= 1 ){
int len = evm_list_len(p);
evm_val_t * o = evm_list_create(e, GC_LIST, len + argc);
for(int i = 0; i < len; i++){
evm_list_set(e, o, i, *evm_list_get(e, p, i));
}
for(int i = 0; i < argc; i++){
evm_list_set(e, o, i + len, *(v + i));
}
ecma_array_attrs_apply(e, o);
return *o;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_fill(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) && argc >= 1 ){
int len = evm_list_len(p);
int start = 0;
int end = len;
if (argc == 2 && evm_is_integer(v + 1)) start = evm_2_integer(v + 1);
if (argc == 3 && evm_is_integer(v + 2)) end = evm_2_integer(v + 2);
for(int i = start; i < end; i++){
evm_list_set(e, p, i, *v);
}
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_shift(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
(void)argc;
(void)v;
if( evm_is_list(p) && evm_list_len(p) ){
int len = ecma_array_get_length(e, p);
evm_val_t val = * evm_list_get(e, p, 0);
for(int i = 0; i < len - 1; i++){
evm_list_set(e, p, i, *evm_list_get(e, p, i + 1));
}
ecma_array_set_length(e, p, len - 1);
evm_list_set(e, p, len - 1, EVM_VAL_UNDEFINED);
return val;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_slice(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) ){
int len = evm_list_len(p);
int begin = 0;
int end = len;
evm_val_t *o = NULL;
if (argc >= 1 && evm_is_integer(v)) begin = evm_2_integer(v);
if (begin < 0) begin = begin + len;
if (argc == 2 && evm_is_integer(v + 1)) end = evm_2_integer(v + 1);
if (end < 0) end = end + len;
if (end < begin) len = 0;
else len = end - begin;
o = evm_list_create(e, GC_LIST, len);
for(int i = 0; i < len; i++){
evm_list_set(e, o, i, *evm_list_get(e, p, i + begin));
}
ecma_array_attrs_apply(e, o);
return *o;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_copyWithin(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) && argc > 0 ){
int len = evm_list_len(p);
int target = 0;
int begin = 0;
int end = len;
if (argc >= 1 && evm_is_integer(v)) {
target = evm_2_integer(v);
if (target >= len) return EVM_VAL_UNDEFINED;
if (argc >= 2 && evm_is_integer(v+1)) begin = evm_2_integer(v+1);
if (begin < 0) begin = begin + len;
if (argc == 3 && evm_is_integer(v+2)) end = evm_2_integer(v+2);
if (end < 0) end = end + len;
if (end < begin) return EVM_VAL_UNDEFINED;
for (int i = begin; i < end; i++) {
evm_list_set(e, p, target + (i - begin), *evm_list_get(e, p, i));
}
return *p;
}
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_unshift(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) ){
int len = ecma_array_get_length(e, p);
int real_len = evm_list_len(p);
if( real_len > 0 && len < real_len )
evm_list_set(e, p, len, *v);
else
evm_list_push(e, p, argc, v);
for(int i = len - 1; i > -1; i--){
evm_list_set(e, p, i + argc, *evm_list_get(e, p, i));
}
for(int i = 0; i < argc; i++){
evm_list_set(e, p, i, *(v + i));
}
ecma_array_set_length(e, p, len + argc);
return evm_mk_number(len + argc);
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_join(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if( evm_is_list(p) && evm_list_len(p) ){
int c_len = 1;
int s_len = 0;
char * ch = ",";
if (argc == 1 && evm_is_string(v)) {
ch = (char*)evm_2_string(v);
c_len = strlen(ch);
}
int len = evm_list_len(p);
if (len == 1) return *evm_list_get(e, p, 0);
evm_val_t *t = NULL;
for (int i = 0; i < len; i++) {
t = evm_list_get(e, p, i);
if (evm_is_string(t)) {
s_len = s_len + strlen(evm_2_string(t));
} else {
evm_val_t * toString_val = evm_attr_get(e, t, "toString");
if( toString_val ) {
evm_val_t local_str_val = evm_run_callback(e, toString_val, t, NULL, 0);
if( evm_is_string(&local_str_val) ) {
char * local_addr = (char *)evm_2_string(&local_str_val);
int local_len = strlen(local_addr);
s_len += local_len;
}
}
}
}
evm_val_t *s = evm_heap_string_create(e, "", s_len + (c_len * (len - 1)));
int current_idx = 0;
for (int i = 0; i < len; i++) {
t = evm_list_get(e, p, i);
if( evm_is_string(t) ){
char * local_addr = (char *)evm_2_string(t);
int local_len = strlen(local_addr);
evm_heap_string_set(s, local_addr, current_idx, local_len);
current_idx += local_len;
} else {
evm_val_t * toString_val = evm_attr_get(e, t, "toString");
if( toString_val ) {
evm_val_t local_str_val = evm_run_callback(e, toString_val, t, NULL, 0);
if( evm_is_string(&local_str_val) ) {
char * local_addr = (char *)evm_2_string(&local_str_val);
int local_len = strlen(local_addr);
evm_heap_string_set(s, local_addr, current_idx, local_len);
current_idx += local_len;
}
}
}
if (i < len - 1) {
evm_heap_string_set(s, ch, current_idx, c_len);
current_idx += c_len;
}
}
return *s;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_filter(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if (evm_is_list(p) && argc > 0 && evm_is_script(v)) {
evm_val_t *o = evm_list_create(e, GC_LIST, 0);
int len = evm_list_len(p);
int arr_len = 0;
for (int i = 0; i < len; i++) {
evm_val_t * arg = evm_list_get(e, p, i);
if (evm_run_callback(e, v, p, arg, 1) == EVM_VAL_TRUE) {
arr_len++;
evm_list_push(e, o, 1, arg);
}
}
ecma_array_attrs_apply(e, o);
return *o;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_map(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if (evm_is_list(p) && argc > 0 && evm_is_script(v)) {
int len = evm_list_len(p);
evm_val_t *o = evm_list_create(e, GC_LIST, len);
for (int i = 0; i < len; i++) {
evm_val_t * arg = evm_list_get(e, p, i);
evm_val_t val = evm_run_callback(e, v, p, arg, 1);
evm_list_set(e, o, i, val);
}
ecma_array_attrs_apply(e, o);
return *o;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_find(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if (evm_is_list(p) && argc > 0 && evm_is_script(v)) {
int len = evm_list_len(p);
evm_val_t * o = NULL;
for (int i = 0; i < len; i++) {
o = evm_list_get(e, p, i);
if (evm_run_callback(e, v, p, o, 1) == EVM_VAL_TRUE) break;
}
if (evm_is_null(o)) return EVM_VAL_UNDEFINED;
else return *o;
}
return EVM_VAL_UNDEFINED;
}
evm_val_t ecma_array_indexOf(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
if(argc == 0) ARG_LENGTH_ERR;
int len = evm_list_len(p);
int fromIndex = 0;
if(argc == 2 && evm_is_integer(v+1)){
fromIndex = evm_2_integer(v+1);
}
if (fromIndex >= len){
return evm_mk_number(-1);
}
for(int i = fromIndex; i < len; i++){
evm_val_t * local_val = evm_list_get(e, p, i);
if (evm_is_string(local_val) && strcmp(evm_2_string(local_val), evm_2_string(v)) == 0){
return evm_mk_number(i);
} else if (*evm_list_get(e, p, i) == *v){
return evm_mk_number(i);
}
}
return evm_mk_number(-1);
}
evm_val_t ecma_array(evm_t * e, evm_val_t * p, int argc, evm_val_t * v){
(void)e;
(void)v;
(void)p;
evm_val_t *o = NULL;
if(argc == 0) {
o = evm_list_create(e, GC_LIST, 0);
} else if( argc == 1){
if( evm_is_number(v) ) {
o = evm_list_create(e, GC_LIST, evm_2_integer(v));
} else {
o = evm_list_create(e, GC_LIST, 1);
evm_list_set(e, o, 0, *v);
}
} else {
o = evm_list_create(e, GC_LIST, argc);
for(int i = 0; i < argc; i++){
evm_list_set(e, o, i, *(v + i));
}
}
if( o != NULL){
ecma_array_attrs_apply(e, o);
return *o;
} else {
return EVM_VAL_UNDEFINED;
}
}
evm_val_t * ecma_array_init(evm_t * e){
evm_val_t * o = evm_native_function_create(e, (evm_native_fn)ecma_array, 1);
evm_attr_set(e, o, 0, "prototype", *ecma_object_prototype);
return o;
}
#endif
|
# -*- coding: utf-8 -*-
'''
File name: code\split_divisibilities\sol_598.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #598 :: Split Divisibilities
#
# For more information see:
# https://projecteuler.net/problem=598
# Problem Statement
'''
Consider the number 48.
There are five pairs of integers $a$ and $b$ ($a \leq b$) such that $a \times b=48$: (1,48), (2,24), (3,16), (4,12) and (6,8).
It can be seen that both 6 and 8 have 4 divisors.
So of those five pairs one consists of two integers with the same number of divisors.
In general:
Let $C(n)$ be the number of pairs of positive integers $a \times b=n$, ($a \leq b$) such that $a$ and $b$ have the same number of divisors; so $C(48)=1$.
You are given $C(10!)=3$: (1680, 2160), (1800, 2016) and (1890,1920).
Find $C(100!)$
'''
# Solution
# Solution Approach
'''
'''
|
//
// Created by 凌空 on 16/1/2.
// Copyright (c) 2016 fharmony. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HexExt)
+ (UIColor *)colorWithHexString:(NSString *)rgb;
+ (NSArray *)colorComponent:(UIColor *)color;
+ (NSString *)colorHexStringFromUIColor:(UIColor *)color;
+ (NSArray *)hslarryColorMapper:(UIColor *)color;
@end
|
/**
* Module date
*/
// Inclure l'interface Date.h
#include "date.h"
// Inclure les bibliothèques uniquement nécessaire à Date.c
#include <stdio.h>
#include <math.h>
/** */
void initialiser(Date *date){
date->jour = 1;
date->nomJour = JEUDI;
date->mois = JAN;
date->annee = 1970;
}
void convertir_vers_date(time_t t, Date* date){
struct tm now;
localtime_r(&t, &now);//convertion fuseau horaire
date->jour = now.tm_mday;//jour
date->nomJour = now.tm_wday;//jour de la semaine
date->mois = now.tm_mon;//mois
date->annee = now.tm_year+1900;//annee (a partir de 1900)
}
Date date_aujourd_hui(){
time_t t = time(0); // date systeme avec #include <time.h>
Date auj;
convertir_vers_date(t, &auj);
return auj;
}
void afficher_date(Date d){
printf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);
}
|
import { ERROR, FULLSCREEN, MEDIA_COMPLETE, PLAYER_STATE, STATE_PLAYING, STATE_PAUSED } from 'events/events';
import ProgramController from 'program/program-controller';
import Model from 'controller/model';
import changeStateEvent from 'events/change-state-event';
import SharedMediaPool from 'program/shared-media-pool';
export default class AdProgramController extends ProgramController {
constructor(model, mediaPool) {
super(model, mediaPool);
const adModel = this.model = new Model();
this.playerModel = model;
this.provider = null;
this.backgroundLoading = model.get('backgroundLoading');
adModel.mediaModel.attributes.mediaType = 'video';
// Ad plugins must use only one element, and must use the same element during playback of an item
// (i.e. prerolls, midrolls, and postrolls must use the same tag)
let mediaElement;
if (this.backgroundLoading) {
// The media pool has reserves an element for ads to use. It is reserved on setup and is not used by other media
mediaElement = mediaPool.getAdElement();
} else {
// Take the tag that we're using to play the current item. The tag has been freed before reaching this point
mediaElement = model.get('mediaElement');
adModel.attributes.mediaElement = mediaElement;
adModel.attributes.mediaSrc = mediaElement.src;
// Listen to media element for events that indicate src was reset or load() was called
const srcResetListener = this.srcResetListener = () => {
this.srcReset();
};
mediaElement.addEventListener('emptied', srcResetListener);
mediaElement.playbackRate = mediaElement.defaultPlaybackRate = 1;
}
this.mediaPool = SharedMediaPool(mediaElement, mediaPool);
}
setup() {
const { model, playerModel, primedElement } = this;
const playerAttributes = playerModel.attributes;
const mediaModelContext = playerModel.mediaModel;
model.setup({
id: playerAttributes.id,
volume: playerAttributes.volume,
instreamMode: true,
edition: playerAttributes.edition,
mediaContext: mediaModelContext,
mute: playerAttributes.mute,
streamType: 'VOD',
autostartMuted: playerAttributes.autostartMuted,
autostart: playerAttributes.autostart,
advertising: playerAttributes.advertising,
sdkplatform: playerAttributes.sdkplatform,
skipButton: false
});
model.on('fullscreenchange', this._nativeFullscreenHandler);
model.on('change:state', changeStateEvent, this);
model.on(ERROR, function(data) {
this.trigger(ERROR, data);
}, this);
if (!primedElement.paused) {
primedElement.pause();
}
}
setActiveItem(index) {
this.stopVideo();
this.provider = null;
super.setActiveItem(index)
.then((mediaController) => {
this._setProvider(mediaController.provider);
});
return this.playVideo();
}
usePsuedoProvider(provider) {
this.provider = provider;
if (!provider) {
return;
}
this._setProvider(provider);
// Match the main player's controls state
provider.off(ERROR);
provider.on(ERROR, function(data) {
this.trigger(ERROR, data);
}, this);
}
_setProvider(provider) {
// Clear current provider when applyProviderListeners(null) is called
if (!provider || !this.mediaPool) {
return;
}
const { model, playerModel } = this;
const isVpaidProvider = provider.type === 'vpaid';
provider.off();
provider.on('all', function(type, data) {
if (isVpaidProvider && (type === MEDIA_COMPLETE)) {
return;
}
this.trigger(type, Object.assign({}, data, { type: type }));
}, this);
const adMediaModelContext = model.mediaModel;
provider.on(PLAYER_STATE, (event) => {
adMediaModelContext.set('mediaState', event.newstate);
});
adMediaModelContext.on('change:mediaState', (changeAdModel, state) => {
this._stateHandler(state);
});
provider.attachMedia();
provider.volume(playerModel.get('volume'));
provider.mute(playerModel.getMute());
if (provider.setPlaybackRate) {
provider.setPlaybackRate(1);
}
playerModel.on('change:volume', function(data, value) {
this.volume = value;
}, this);
playerModel.on('change:mute', function(data, mute) {
this.mute = mute;
if (!mute) {
this.volume = playerModel.get('volume');
}
}, this);
playerModel.on('change:autostartMuted', function(data, value) {
if (!value) {
model.set('autostartMuted', value);
this.mute = playerModel.get('mute');
}
}, this);
}
destroy() {
const { model, mediaPool, playerModel } = this;
model.off();
// We only use one media element from ads; getPrimedElement will return it
const mediaElement = mediaPool.getPrimedElement();
if (!this.backgroundLoading) {
if (mediaElement) {
mediaElement.removeEventListener('emptied', this.srcResetListener);
// Reset the player media model if the src was changed externally
if (mediaElement.src !== model.get('mediaSrc')) {
this.srcReset();
}
}
} else {
mediaPool.clean();
const mediaContainer = playerModel.get('mediaContainer');
if (mediaElement.parentNode === mediaContainer) {
mediaContainer.removeChild(mediaElement);
}
}
}
srcReset() {
const { playerModel } = this;
const mediaModel = playerModel.get('mediaModel');
const provider = playerModel.getVideo();
mediaModel.srcReset();
// Set hlsjs.src to null so that it reloads it's item source
if (provider) {
provider.src = null;
}
}
_nativeFullscreenHandler(evt) {
const { model } = this;
model.trigger(evt.type, evt);
this.trigger(FULLSCREEN, {
fullscreen: evt.jwstate
});
}
_stateHandler(state) {
const { model } = this;
switch (state) {
case STATE_PLAYING:
case STATE_PAUSED:
model.set(PLAYER_STATE, state);
break;
default:
break;
}
}
set mute(mute) {
const { mediaController, model, provider } = this;
model.set('mute', mute);
super.mute = mute;
if (!mediaController) {
provider.mute(mute);
}
}
set volume(volume) {
const { mediaController, model, provider } = this;
model.set('volume', volume);
super.volume = volume;
if (!mediaController) {
provider.volume(volume);
}
}
}
|
import React, { Component, Fragment } from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import Helmet from 'react-helmet'
import includes from 'nanoutils/cjs/includes'
import ScrollToTop from './components/ScrollToTop'
import Meta from './components/Meta'
import Home from './views/Home'
import Gallery from './views/Gallery'
import Benefits from './views/Benefits'
import Blog from './views/Blog'
import SinglePost from './views/SinglePost'
import Contact from './views/Contact'
import NoMatch from './views/NoMatch'
import Nav from './components/Nav'
import Footer from './components/Footer'
import ServiceWorkerNotifications from './components/ServiceWorkerNotifications'
import data from './data.json'
import { slugify } from './util/url'
import { documentHasTerm, getCollectionTerms } from './util/collection'
const RouteWithMeta = ({ component: Component, ...props }) => (
<Route
{...props}
render={routeProps => (
<Fragment>
<Meta {...props} />
<Component {...routeProps} {...props} />
</Fragment>
)}
/>
)
class App extends Component {
state = {
data
}
getDocument = (collection, name) =>
this.state.data[collection] &&
this.state.data[collection].filter(page => page.name === name)[0]
getDocuments = collection => this.state.data[collection] || []
render () {
const globalSettings = this.getDocument('settings', 'global')
const {
siteTitle,
siteUrl,
siteDescription,
socialMediaCard,
headerScripts
} = globalSettings
const posts = this.getDocuments('posts').filter(
post => post.status !== 'Draft'
)
const categoriesFromPosts = getCollectionTerms(posts, 'categories')
const postCategories = this.getDocuments('postCategories').filter(
category => includes(category.name.toLowerCase(), categoriesFromPosts)
)
return (
<Router>
<div className='React-Wrap'>
<ScrollToTop />
<ServiceWorkerNotifications reloadOnUpdate />
<Helmet
defaultTitle={siteTitle}
titleTemplate={`${siteTitle} | %s`}
/>
<Meta
headerScripts={headerScripts}
absoluteImageUrl={
socialMediaCard &&
socialMediaCard.image &&
siteUrl + socialMediaCard.image
}
twitter={
socialMediaCard && socialMediaCard.twitter
}
/>
<Nav />
<Switch>
<RouteWithMeta
path='/'
exact
component={Home}
description={siteDescription}
fields={this.getDocument('pages', 'home')}
/>
<RouteWithMeta
path='/gallery/'
exact
component={Gallery}
fields={this.getDocument('pages', 'gallery')}
/>
<RouteWithMeta
path='/benefits/'
exact
component={Benefits}
fields={this.getDocument('pages', 'benefits')}
/>
<RouteWithMeta
path='/contact/'
exact
component={Contact}
fields={this.getDocument('pages', 'contact')}
siteTitle={siteTitle}
/>
<RouteWithMeta
path='/blog/'
exact
component={Blog}
fields={this.getDocument('pages', 'blog')}
posts={posts}
postCategories={postCategories}
/>
{posts.map((post, index) => {
const path = slugify(`/blog/${post.title}`)
const nextPost = posts[index - 1]
const prevPost = posts[index + 1]
return (
<RouteWithMeta
key={path}
path={path}
exact
component={SinglePost}
fields={post}
nextPostURL={nextPost && slugify(`/blog/${nextPost.title}/`)}
prevPostURL={prevPost && slugify(`/blog/${prevPost.title}/`)}
/>
)
})}
{postCategories.map(postCategory => {
const slug = slugify(postCategory.title)
const path = slugify(`/blog/category/${slug}`)
const categoryPosts = posts.filter(post =>
documentHasTerm(post, 'categories', slug)
)
return (
<RouteWithMeta
key={path}
path={path}
exact
component={Blog}
fields={this.getDocument('pages', 'blog')}
posts={categoryPosts}
postCategories={postCategories}
/>
)
})}
<Route render={() => <NoMatch siteUrl={siteUrl} />} />
</Switch>
<Footer socialMediaCard={socialMediaCard} />
</div>
</Router>
)
}
}
export default App
|
import random
from river import base
__all__ = ['PoissonInclusion']
class PoissonInclusion(base.Transformer):
"""Randomly selects features with an inclusion trial.
When a new feature is encountered, it is selected with probability `p`. The number of times a
feature needs to beseen before it is added to the model follows a geometric distribution with
expected value `1 / p`. This feature selection method is meant to be used when you have a
very large amount of sparse features.
Parameters
----------
p
Probability of including a feature the first time it is encountered.
seed
Random seed value used for reproducibility.
References
----------
[^1]: [McMahan, H.B., Holt, G., Sculley, D., Young, M., Ebner, D., Grady, J., Nie, L., Phillips, T., Davydov, E., Golovin, D. and Chikkerur, S., 2013, August. Ad click prediction: a view from the trenches. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining (pp. 1222-1230)](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41159.pdf)
"""
def __init__(self, p: float, seed: int = None):
self.p = p
self.seed = seed
self.rng = random.Random(seed)
self.included = set()
def transform_one(self, x):
xt = {}
for i, xi in x.items():
if i not in self.included and self.rng.random() < self.p:
self.included.add(i)
xt[i] = xi
xt[i] = xi
return xt
|
/*
* Copyright © 2017 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {MyMetadataApi} from 'api/metadata';
import NamespaceStore from 'services/NamespaceStore';
import map from 'lodash/map';
import uuidV4 from 'uuid/v4';
import AddPropertyModal from 'components/PropertiesEditor/AddPropertyModal';
import T from 'i18n-react';
import DeleteConfirmation from 'components/PropertiesEditor/DeleteConfirmation';
import EditProperty from 'components/PropertiesEditor/EditProperty';
import classnames from 'classnames';
import {SCOPES} from 'services/global-constants';
require('./PropertiesEditor.scss');
const convertObjToArr = (obj) => {
let properties = map(obj, (value, key) => ({key, value}))
.map((row) => {
row.id = uuidV4();
return row;
});
return properties;
};
export default class PropertiesEditor extends Component {
constructor(props) {
super(props);
this.state = {
systemProperties: [],
userProperties: [],
activeEdit: null,
newValue: '',
editedKey: null
};
this.fetchUserProperties = this.fetchUserProperties.bind(this);
}
componentWillMount() {
let namespace = NamespaceStore.getState().selectedNamespace;
const baseRequestObject = {
namespace,
entityType: this.props.entityType,
entityId: this.props.entityId
};
let systemParams = Object.assign({}, baseRequestObject, { scope: SCOPES.SYSTEM });
let userParams = Object.assign({}, baseRequestObject, { scope: SCOPES.USER });
MyMetadataApi.getProperties(systemParams)
.map(convertObjToArr)
.combineLatest(MyMetadataApi.getProperties(userParams).map(convertObjToArr))
.subscribe((res) => {
this.setState({
systemProperties: res[0].filter((row) => row.key !== 'schema'),
userProperties: res[1]
});
}, (err) => {
console.log('Error', err);
});
}
fetchUserProperties() {
let namespace = NamespaceStore.getState().selectedNamespace;
const params = {
namespace,
entityType: this.props.entityType,
entityId: this.props.entityId,
scope: SCOPES.USER
};
MyMetadataApi.getProperties(params)
.map(convertObjToArr)
.subscribe((res) => {
this.setState({
userProperties: res,
activeEdit: null,
newValue: ''
});
});
}
renderSystemProperties() {
return this.state.systemProperties.map((row) => {
return (
<tr key={row.id}>
<td>{row.key}</td>
<td>{row.value}</td>
<td>{T.translate('features.PropertiesEditor.system')}</td>
<td></td>
</tr>
);
});
}
renderActions(row) {
return (
<span>
<EditProperty
property={row}
onSave={this.setEditProperty.bind(this, row)}
entityType={this.props.entityType}
entityId={this.props.entityId}
/>
<DeleteConfirmation
property={row}
onDelete={this.fetchUserProperties}
entityType={this.props.entityType}
entityId={this.props.entityId}
/>
</span>
);
}
renderUserProperties() {
return this.state.userProperties.map((row) => {
return (
<tr
key={row.id}
className={classnames({'text-success': row.key === this.state.editedKey})}
>
<td>{row.key}</td>
<td>{row.value}</td>
<td>{T.translate('features.PropertiesEditor.user')}</td>
<td className="actions">
{this.renderActions(row)}
</td>
</tr>
);
});
}
setEditProperty(row) {
this.setState({ editedKey: row.key });
this.fetchUserProperties();
setTimeout(() => {
this.setState({editedKey: null});
}, 3000);
}
render() {
return (
<div className="properties-editor-container">
<AddPropertyModal
entityId={this.props.entityId}
entityType={this.props.entityType}
existingProperties={this.state.userProperties}
onSave={this.setEditProperty.bind(this)}
/>
<table className="table">
<thead>
<tr>
<th className="key">{T.translate('features.PropertiesEditor.name')}</th>
<th className="value">{T.translate('features.PropertiesEditor.value')}</th>
<th className="scope">{T.translate('features.PropertiesEditor.scope')}</th>
<th className="actions"></th>
</tr>
</thead>
<tbody>
{this.renderUserProperties()}
{this.renderSystemProperties()}
</tbody>
</table>
</div>
);
}
}
PropertiesEditor.propTypes = {
entityId: PropTypes.string,
entityType: PropTypes.oneOf(['datasets', 'streams', 'apps'])
};
|
import argparse
import os
import ctypes
import pathlib
import subprocess
class RegistrarActionRequiresAdmin(PermissionError):
''' Used to denote that this action requires admin permissions '''
pass
class Registrar:
''' A collection of methods relating to registering and unregistering PyDeskband via regsvr32.exe '''
@classmethod
def is_64_bit(cls) -> bool:
return '64' in subprocess.check_output([
'wmic', 'os', 'get', 'osarchitecture'
]).decode()
@classmethod
def is_admin(cls) -> bool:
''' Asks Windows if we are running as admin '''
return bool(ctypes.windll.shell32.IsUserAnAdmin())
@classmethod
def get_dll_path(cls) -> pathlib.Path:
''' Returns the path to the PyDeskband dll for the OS architecture '''
arch = '64' if cls.is_64_bit() else '86'
dll_path = (pathlib.Path(__file__).parent / f"dlls/PyDeskband_x{arch}.dll").resolve()
if not dll_path.is_file():
raise FileNotFoundError(f"dll_path: {dll_path} is missing")
return dll_path
@classmethod
def get_regsvr32_path(cls) -> pathlib.Path:
''' Returns the path to regsvr32.exe '''
path = pathlib.Path(os.path.expandvars(r'%systemroot%\System32\regsvr32.exe'))
if not path.is_file():
raise FileNotFoundError(f"regsvr32.exe {path} is missing")
return path
@classmethod
def register(cls) -> int:
'''
Attempts to register the PyDeskband DLL with the OS. Will return the exit code from that attempt. 0 typically means success.
Requires admin privledges to run.
Funny enough, on register, you may need to view right click and view the Toolbars list twice before the option PyDeskband option comes up.
(This is even if you restart Windows Explorer). This is a known Windows behavior and not a bug with PyDeskband.
'''
if not cls.is_admin():
raise RegistrarActionRequiresAdmin("Registering pyDeskband requires admin permissions!")
return subprocess.call([cls.get_regsvr32_path(), cls.get_dll_path(), '/s'])
@classmethod
def unregister(cls) -> int:
'''
Attempts to unregister the PyDeskband DLL with the OS. Will return the exit code from that attempt. 0 typically means success.
Requires admin privledges to run.
'''
if not cls.is_admin():
raise RegistrarActionRequiresAdmin("Unregistering pyDeskband requires admin permissions!")
return subprocess.call([cls.get_regsvr32_path(), '/u', cls.get_dll_path(), '/s'])
@classmethod
def restart_windows_explorer(cls) -> None:
'''
Uses the knowledge of us being on Windows to use a subprocess to restart Windows Explorer.
Technically a Windows Explorer restart is not necessary though on an unregister, it will force the dll to be unloaded.
'''
subprocess.call('taskkill /F /IM explorer.exe && start explorer', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="CLI to register/unregister PyDeskband with the registry")
action = parser.add_mutually_exclusive_group()
action.add_argument('-r', '--register', help='Registers the PyDeskband DLL with the OS.', action='store_true')
action.add_argument('-u', '--unregister', help='Unregisters the PyDeskband DLL with the OS. Unless -x/--no-restart-explorer is given, Windows Explorer will restart after success.', action='store_true')
parser.add_argument('-x', '--no-restart-explorer', help='If given, do not restart Windows Explorer after registering or unregistering.', action='store_true')
args = parser.parse_args()
ret_code = None
if args.register:
ret_code = Registrar.register()
elif args.unregister:
ret_code = Registrar.unregister()
if ret_code is not None:
if ret_code == 0 and not args.no_restart_explorer:
Registrar.restart_windows_explorer()
exit(ret_code)
|
/**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview Insert and remove numbered and bulleted lists.
*/
( function() {
var listNodeNames = { ol: 1, ul: 1 },
emptyTextRegex = /^[\n\r\t ]*$/;
var whitespaces = CKEDITOR.dom.walker.whitespaces(),
bookmarks = CKEDITOR.dom.walker.bookmark(),
nonEmpty = function( node ) {
return !( whitespaces( node ) || bookmarks( node ) );
},
blockBogus = CKEDITOR.dom.walker.bogus();
function cleanUpDirection( element ) {
var dir, parent, parentDir;
if ( ( dir = element.getDirection() ) ) {
parent = element.getParent();
while ( parent && !( parentDir = parent.getDirection() ) )
parent = parent.getParent();
if ( dir == parentDir )
element.removeAttribute( 'dir' );
}
}
// Inherit inline styles from another element.
function inheritInlineStyles( parent, el ) {
var style = parent.getAttribute( 'style' );
// Put parent styles before child styles.
style && el.setAttribute( 'style', style.replace( /([^;])$/, '$1;' ) + ( el.getAttribute( 'style' ) || '' ) );
}
CKEDITOR.plugins.list = {
/**
* Convert a DOM list tree into a data structure that is easier to
* manipulate. This operation should be non-intrusive in the sense that it
* does not change the DOM tree, with the exception that it may add some
* markers to the list item nodes when database is specified.
*
* @member CKEDITOR.plugins.list
* @todo params
*/
listToArray: function( listNode, database, baseArray, baseIndentLevel, grandparentNode ) {
if ( !listNodeNames[ listNode.getName() ] )
return [];
if ( !baseIndentLevel )
baseIndentLevel = 0;
if ( !baseArray )
baseArray = [];
// Iterate over all list items to and look for inner lists.
for ( var i = 0, count = listNode.getChildCount(); i < count; i++ ) {
var listItem = listNode.getChild( i );
// Fixing malformed nested lists by moving it into a previous list item. (#6236)
if ( listItem.type == CKEDITOR.NODE_ELEMENT && listItem.getName() in CKEDITOR.dtd.$list )
CKEDITOR.plugins.list.listToArray( listItem, database, baseArray, baseIndentLevel + 1 );
// It may be a text node or some funny stuff.
if ( listItem.$.nodeName.toLowerCase() != 'li' )
continue;
var itemObj = { 'parent': listNode, indent: baseIndentLevel, element: listItem, contents: [] };
if ( !grandparentNode ) {
itemObj.grandparent = listNode.getParent();
if ( itemObj.grandparent && itemObj.grandparent.$.nodeName.toLowerCase() == 'li' )
itemObj.grandparent = itemObj.grandparent.getParent();
} else
itemObj.grandparent = grandparentNode;
if ( database )
CKEDITOR.dom.element.setMarker( database, listItem, 'listarray_index', baseArray.length );
baseArray.push( itemObj );
for ( var j = 0, itemChildCount = listItem.getChildCount(), child; j < itemChildCount; j++ ) {
child = listItem.getChild( j );
if ( child.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ child.getName() ] )
// Note the recursion here, it pushes inner list items with
// +1 indentation in the correct order.
CKEDITOR.plugins.list.listToArray( child, database, baseArray, baseIndentLevel + 1, itemObj.grandparent );
else
itemObj.contents.push( child );
}
}
return baseArray;
},
/**
* Convert our internal representation of a list back to a DOM forest.
*
* @member CKEDITOR.plugins.list
* @todo params
*/
arrayToList: function( listArray, database, baseIndex, paragraphMode, dir ) {
if ( !baseIndex )
baseIndex = 0;
if ( !listArray || listArray.length < baseIndex + 1 )
return null;
var i,
doc = listArray[ baseIndex ].parent.getDocument(),
retval = new CKEDITOR.dom.documentFragment( doc ),
rootNode = null,
currentIndex = baseIndex,
indentLevel = Math.max( listArray[ baseIndex ].indent, 0 ),
currentListItem = null,
orgDir, block,
paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
while ( 1 ) {
var item = listArray[ currentIndex ],
itemGrandParent = item.grandparent;
orgDir = item.element.getDirection( 1 );
if ( item.indent == indentLevel ) {
if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() ) {
rootNode = listArray[ currentIndex ].parent.clone( false, 1 );
dir && rootNode.setAttribute( 'dir', dir );
retval.append( rootNode );
}
currentListItem = rootNode.append( item.element.clone( 0, 1 ) );
if ( orgDir != rootNode.getDirection( 1 ) )
currentListItem.setAttribute( 'dir', orgDir );
for ( i = 0; i < item.contents.length; i++ )
currentListItem.append( item.contents[ i ].clone( 1, 1 ) );
currentIndex++;
} else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) {
// Maintain original direction (#6861).
var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ),
listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir : null );
// If the next block is an <li> with another list tree as the first
// child, we'll need to append a filler (<br>/NBSP) or the list item
// wouldn't be editable. (#6724)
if ( !currentListItem.getChildCount() && CKEDITOR.env.needsNbspFiller && !( doc.$.documentMode > 7 ) )
currentListItem.append( doc.createText( '\xa0' ) );
currentListItem.append( listData.listNode );
currentIndex = listData.nextIndex;
} else if ( item.indent == -1 && !baseIndex && itemGrandParent ) {
if ( listNodeNames[ itemGrandParent.getName() ] ) {
currentListItem = item.element.clone( false, true );
if ( orgDir != itemGrandParent.getDirection( 1 ) )
currentListItem.setAttribute( 'dir', orgDir );
} else
currentListItem = new CKEDITOR.dom.documentFragment( doc );
// Migrate all children to the new container,
// apply the proper text direction.
var dirLoose = itemGrandParent.getDirection( 1 ) != orgDir,
li = item.element,
className = li.getAttribute( 'class' ),
style = li.getAttribute( 'style' );
var needsBlock = currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && ( paragraphMode != CKEDITOR.ENTER_BR || dirLoose || style || className );
var child,
count = item.contents.length,
cachedBookmark;
for ( i = 0; i < count; i++ ) {
child = item.contents[ i ];
// Append bookmark if we can, or cache it and append it when we'll know
// what to do with it. Generally - we want to keep it next to its original neighbour.
// Exception: if bookmark is the only child it hasn't got any neighbour, so handle it normally
// (wrap with block if needed).
if ( bookmarks( child ) && count > 1 ) {
// If we don't need block, it's simple - append bookmark directly to the current list item.
if ( !needsBlock )
currentListItem.append( child.clone( 1, 1 ) );
else
cachedBookmark = child.clone( 1, 1 );
}
// Block content goes directly to the current list item, without wrapping.
else if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() ) {
// Apply direction on content blocks.
if ( dirLoose && !child.getDirection() )
child.setAttribute( 'dir', orgDir );
inheritInlineStyles( li, child );
className && child.addClass( className );
// Close the block which we started for inline content.
block = null;
// Append bookmark directly before current child.
if ( cachedBookmark ) {
currentListItem.append( cachedBookmark );
cachedBookmark = null;
}
// Append this block element to the list item.
currentListItem.append( child.clone( 1, 1 ) );
}
// Some inline content was found - wrap it with block and append that
// block to the current list item or append it to the block previously created.
else if ( needsBlock ) {
// Establish new block to hold text direction and styles.
if ( !block ) {
block = doc.createElement( paragraphName );
currentListItem.append( block );
dirLoose && block.setAttribute( 'dir', orgDir );
}
// Copy over styles to new block;
style && block.setAttribute( 'style', style );
className && block.setAttribute( 'class', className );
// Append bookmark directly before current child.
if ( cachedBookmark ) {
block.append( cachedBookmark );
cachedBookmark = null;
}
block.append( child.clone( 1, 1 ) );
}
// E.g. BR mode - inline content appended directly to the list item.
else
currentListItem.append( child.clone( 1, 1 ) );
}
// No content after bookmark - append it to the block if we had one
// or directly to the current list item if we finished directly in the current list item.
if ( cachedBookmark ) {
( block || currentListItem ).append( cachedBookmark );
cachedBookmark = null;
}
if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && currentIndex != listArray.length - 1 ) {
var last;
// Remove bogus <br> if this browser uses them.
if ( CKEDITOR.env.needsBrFiller ) {
last = currentListItem.getLast();
if ( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( 'br' ) )
last.remove();
}
// If the last element is not a block, append <br> to separate merged list items.
last = currentListItem.getLast( nonEmpty );
if ( !( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( CKEDITOR.dtd.$block ) ) )
currentListItem.append( doc.createElement( 'br' ) );
}
var currentListItemName = currentListItem.$.nodeName.toLowerCase();
if ( currentListItemName == 'div' || currentListItemName == 'p' )
currentListItem.appendBogus();
retval.append( currentListItem );
rootNode = null;
currentIndex++;
} else
return null;
block = null;
if ( listArray.length <= currentIndex || Math.max( listArray[ currentIndex ].indent, 0 ) < indentLevel )
break;
}
if ( database ) {
var currentNode = retval.getFirst(),
listRoot = listArray[ 0 ].parent;
while ( currentNode ) {
if ( currentNode.type == CKEDITOR.NODE_ELEMENT ) {
// Clear marker attributes for the new list tree made of cloned nodes, if any.
CKEDITOR.dom.element.clearMarkers( database, currentNode );
// Clear redundant direction attribute specified on list items.
if ( currentNode.getName() in CKEDITOR.dtd.$listItem )
cleanUpDirection( currentNode );
}
currentNode = currentNode.getNextSourceNode();
}
}
return { listNode: retval, nextIndex: currentIndex };
}
};
function changeListType( editor, groupObj, database, listsCreated ) {
// This case is easy...
// 1. Convert the whole list into a one-dimensional array.
// 2. Change the list type by modifying the array.
// 3. Recreate the whole list by converting the array to a list.
// 4. Replace the original list with the recreated list.
var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ),
selectedListItems = [];
for ( var i = 0; i < groupObj.contents.length; i++ ) {
var itemNode = groupObj.contents[ i ];
itemNode = itemNode.getAscendant( 'li', true );
if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) )
continue;
selectedListItems.push( itemNode );
CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );
}
var root = groupObj.root,
doc = root.getDocument(),
listNode, newListNode;
for ( i = 0; i < selectedListItems.length; i++ ) {
var listIndex = selectedListItems[ i ].getCustomData( 'listarray_index' );
listNode = listArray[ listIndex ].parent;
// Switch to new list node for this particular item.
if ( !listNode.is( this.type ) ) {
newListNode = doc.createElement( this.type );
// Copy all attributes, except from 'start' and 'type'.
listNode.copyAttributes( newListNode, { start: 1, type: 1 } );
// The list-style-type property should be ignored.
newListNode.removeStyle( 'list-style-type' );
listArray[ listIndex ].parent = newListNode;
}
}
var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode );
var child,
length = newList.listNode.getChildCount();
for ( i = 0; i < length && ( child = newList.listNode.getChild( i ) ); i++ ) {
if ( child.getName() == this.type )
listsCreated.push( child );
}
newList.listNode.replace( groupObj.root );
editor.fire( 'contentDomInvalidated' );
}
function createList( editor, groupObj, listsCreated ) {
var contents = groupObj.contents,
doc = groupObj.root.getDocument(),
listContents = [];
// It is possible to have the contents returned by DomRangeIterator to be the same as the root.
// e.g. when we're running into table cells.
// In such a case, enclose the childNodes of contents[0] into a <div>.
if ( contents.length == 1 && contents[ 0 ].equals( groupObj.root ) ) {
var divBlock = doc.createElement( 'div' );
contents[ 0 ].moveChildren && contents[ 0 ].moveChildren( divBlock );
contents[ 0 ].append( divBlock );
contents[ 0 ] = divBlock;
}
// Calculate the common parent node of all content blocks.
var commonParent = groupObj.contents[ 0 ].getParent();
for ( var i = 0; i < contents.length; i++ )
commonParent = commonParent.getCommonAncestor( contents[ i ].getParent() );
var useComputedState = editor.config.useComputedState,
listDir, explicitDirection;
useComputedState = useComputedState === undefined || useComputedState;
// We want to insert things that are in the same tree level only, so calculate the contents again
// by expanding the selected blocks to the same tree level.
for ( i = 0; i < contents.length; i++ ) {
var contentNode = contents[ i ],
parentNode;
while ( ( parentNode = contentNode.getParent() ) ) {
if ( parentNode.equals( commonParent ) ) {
listContents.push( contentNode );
// Determine the lists's direction.
if ( !explicitDirection && contentNode.getDirection() )
explicitDirection = 1;
var itemDir = contentNode.getDirection( useComputedState );
if ( listDir !== null ) {
// If at least one LI have a different direction than current listDir, we can't have listDir.
if ( listDir && listDir != itemDir )
listDir = null;
else
listDir = itemDir;
}
break;
}
contentNode = parentNode;
}
}
if ( listContents.length < 1 )
return;
// Insert the list to the DOM tree.
var insertAnchor = listContents[ listContents.length - 1 ].getNext(),
listNode = doc.createElement( this.type );
listsCreated.push( listNode );
var contentBlock, listItem;
while ( listContents.length ) {
contentBlock = listContents.shift();
listItem = doc.createElement( 'li' );
// If current block should be preserved, append it to list item instead of
// transforming it to <li> element.
if ( shouldPreserveBlock( contentBlock ) )
contentBlock.appendTo( listItem );
else {
contentBlock.copyAttributes( listItem );
// Remove direction attribute after it was merged into list root. (#7657)
if ( listDir && contentBlock.getDirection() ) {
listItem.removeStyle( 'direction' );
listItem.removeAttribute( 'dir' );
}
contentBlock.moveChildren( listItem );
contentBlock.remove();
}
listItem.appendTo( listNode );
}
// Apply list root dir only if it has been explicitly declared.
if ( listDir && explicitDirection )
listNode.setAttribute( 'dir', listDir );
if ( insertAnchor )
listNode.insertBefore( insertAnchor );
else
listNode.appendTo( commonParent );
}
function removeList( editor, groupObj, database ) {
// This is very much like the change list type operation.
// Except that we're changing the selected items' indent to -1 in the list array.
var listArray = CKEDITOR.plugins.list.listToArray( groupObj.root, database ),
selectedListItems = [];
for ( var i = 0; i < groupObj.contents.length; i++ ) {
var itemNode = groupObj.contents[ i ];
itemNode = itemNode.getAscendant( 'li', true );
if ( !itemNode || itemNode.getCustomData( 'list_item_processed' ) )
continue;
selectedListItems.push( itemNode );
CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );
}
var lastListIndex = null;
for ( i = 0; i < selectedListItems.length; i++ ) {
var listIndex = selectedListItems[ i ].getCustomData( 'listarray_index' );
listArray[ listIndex ].indent = -1;
lastListIndex = listIndex;
}
// After cutting parts of the list out with indent=-1, we still have to maintain the array list
// model's nextItem.indent <= currentItem.indent + 1 invariant. Otherwise the array model of the
// list cannot be converted back to a real DOM list.
for ( i = lastListIndex + 1; i < listArray.length; i++ ) {
if ( listArray[ i ].indent > listArray[ i - 1 ].indent + 1 ) {
var indentOffset = listArray[ i - 1 ].indent + 1 - listArray[ i ].indent;
var oldIndent = listArray[ i ].indent;
while ( listArray[ i ] && listArray[ i ].indent >= oldIndent ) {
listArray[ i ].indent += indentOffset;
i++;
}
i--;
}
}
var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, groupObj.root.getAttribute( 'dir' ) );
// Compensate <br> before/after the list node if the surrounds are non-blocks.(#3836)
var docFragment = newList.listNode,
boundaryNode, siblingNode;
function compensateBrs( isStart ) {
if ( ( boundaryNode = docFragment[ isStart ? 'getFirst' : 'getLast' ]() ) && !( boundaryNode.is && boundaryNode.isBlockBoundary() ) && ( siblingNode = groupObj.root[ isStart ? 'getPrevious' : 'getNext' ]
( CKEDITOR.dom.walker.invisible( true ) ) ) && !( siblingNode.is && siblingNode.isBlockBoundary( { br: 1 } ) ) )
editor.document.createElement( 'br' )[ isStart ? 'insertBefore' : 'insertAfter' ]( boundaryNode );
}
compensateBrs( true );
compensateBrs();
docFragment.replace( groupObj.root );
editor.fire( 'contentDomInvalidated' );
}
var headerTagRegex = /^h[1-6]$/;
// Checks wheather this block should be element preserved (not transformed to <li>) when creating list.
function shouldPreserveBlock( block ) {
return (
// #5335
block.is( 'pre' ) ||
// #5271 - this is a header.
headerTagRegex.test( block.getName() ) ||
// 11083 - this is a non-editable element.
block.getAttribute( 'contenteditable' ) == 'false'
);
}
function listCommand( name, type ) {
this.name = name;
this.type = type;
this.context = type;
this.allowedContent = type + ' li';
this.requiredContent = type;
}
var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT );
// Merge child nodes with direction preserved. (#7448)
function mergeChildren( from, into, refNode, forward ) {
var child, itemDir;
while ( ( child = from[ forward ? 'getLast' : 'getFirst' ]( elementType ) ) ) {
if ( ( itemDir = child.getDirection( 1 ) ) !== into.getDirection( 1 ) )
child.setAttribute( 'dir', itemDir );
child.remove();
refNode ? child[ forward ? 'insertBefore' : 'insertAfter' ]( refNode ) : into.append( child, forward );
}
}
listCommand.prototype = {
exec: function( editor ) {
// Run state check first of all.
this.refresh( editor, editor.elementPath() );
var doc = editor.document,
config = editor.config,
selection = editor.getSelection(),
ranges = selection && selection.getRanges();
// Midas lists rule #1 says we can create a list even in an empty document.
// But DOM iterator wouldn't run if the document is really empty.
// So create a paragraph if the document is empty and we're going to create a list.
if ( this.state == CKEDITOR.TRISTATE_OFF ) {
var editable = editor.editable();
if ( !editable.getFirst( nonEmpty ) ) {
config.enterMode == CKEDITOR.ENTER_BR ? editable.appendBogus() : ranges[ 0 ].fixBlock( 1, config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
selection.selectRanges( ranges );
}
// Maybe a single range there enclosing the whole list,
// turn on the list state manually(#4129).
else {
var range = ranges.length == 1 && ranges[ 0 ],
enclosedNode = range && range.getEnclosedNode();
if ( enclosedNode && enclosedNode.is && this.type == enclosedNode.getName() )
this.setState( CKEDITOR.TRISTATE_ON );
}
}
var bookmarks = selection.createBookmarks( true );
// Group the blocks up because there are many cases where multiple lists have to be created,
// or multiple lists have to be cancelled.
var listGroups = [],
database = {},
rangeIterator = ranges.createIterator(),
index = 0;
while ( ( range = rangeIterator.getNextRange() ) && ++index ) {
var boundaryNodes = range.getBoundaryNodes(),
startNode = boundaryNodes.startNode,
endNode = boundaryNodes.endNode;
if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' )
range.setStartAt( boundaryNodes.startNode, CKEDITOR.POSITION_AFTER_START );
if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' )
range.setEndAt( boundaryNodes.endNode, CKEDITOR.POSITION_BEFORE_END );
var iterator = range.createIterator(),
block;
iterator.forceBrBreak = ( this.state == CKEDITOR.TRISTATE_OFF );
while ( ( block = iterator.getNextParagraph() ) ) {
// Avoid duplicate blocks get processed across ranges.
if ( block.getCustomData( 'list_block' ) )
continue;
else
CKEDITOR.dom.element.setMarker( database, block, 'list_block', 1 );
var path = editor.elementPath( block ),
pathElements = path.elements,
pathElementsCount = pathElements.length,
listNode = null,
processedFlag = 0,
blockLimit = path.blockLimit,
element;
// First, try to group by a list ancestor.
for ( var i = pathElementsCount - 1; i >= 0 && ( element = pathElements[ i ] ); i-- ) {
if ( listNodeNames[ element.getName() ] && blockLimit.contains( element ) ) // Don't leak outside block limit (#3940).
{
// If we've encountered a list inside a block limit
// The last group object of the block limit element should
// no longer be valid. Since paragraphs after the list
// should belong to a different group of paragraphs before
// the list. (Bug #1309)
blockLimit.removeCustomData( 'list_group_object_' + index );
var groupObj = element.getCustomData( 'list_group_object' );
if ( groupObj )
groupObj.contents.push( block );
else {
groupObj = { root: element, contents: [ block ] };
listGroups.push( groupObj );
CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
}
processedFlag = 1;
break;
}
}
if ( processedFlag )
continue;
// No list ancestor? Group by block limit, but don't mix contents from different ranges.
var root = blockLimit;
if ( root.getCustomData( 'list_group_object_' + index ) )
root.getCustomData( 'list_group_object_' + index ).contents.push( block );
else {
groupObj = { root: root, contents: [ block ] };
CKEDITOR.dom.element.setMarker( database, root, 'list_group_object_' + index, groupObj );
listGroups.push( groupObj );
}
}
}
// Now we have two kinds of list groups, groups rooted at a list, and groups rooted at a block limit element.
// We either have to build lists or remove lists, for removing a list does not makes sense when we are looking
// at the group that's not rooted at lists. So we have three cases to handle.
var listsCreated = [];
while ( listGroups.length > 0 ) {
groupObj = listGroups.shift();
if ( this.state == CKEDITOR.TRISTATE_OFF ) {
if ( listNodeNames[ groupObj.root.getName() ] )
changeListType.call( this, editor, groupObj, database, listsCreated );
else
createList.call( this, editor, groupObj, listsCreated );
} else if ( this.state == CKEDITOR.TRISTATE_ON && listNodeNames[ groupObj.root.getName() ] )
removeList.call( this, editor, groupObj, database );
}
// For all new lists created, merge into adjacent, same type lists.
for ( i = 0; i < listsCreated.length; i++ )
mergeListSiblings( listsCreated[ i ] );
// Clean up, restore selection and update toolbar button states.
CKEDITOR.dom.element.clearAllMarkers( database );
selection.selectBookmarks( bookmarks );
editor.focus();
},
refresh: function( editor, path ) {
var list = path.contains( listNodeNames, 1 ),
limit = path.blockLimit || path.root;
// 1. Only a single type of list activate.
// 2. Do not show list outside of block limit.
if ( list && limit.contains( list ) )
this.setState( list.is( this.type ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
else
this.setState( CKEDITOR.TRISTATE_OFF );
}
};
var dtd = CKEDITOR.dtd;
var tailNbspRegex = /[\t\r\n ]*(?: |\xa0)$/;
// Merge list adjacent, of same type lists.
function mergeListSiblings( listNode )
{
var mergeSibling;
( mergeSibling = function( rtl )
{
var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( nonEmpty );
if ( sibling &&
sibling.type == CKEDITOR.NODE_ELEMENT &&
sibling.is( listNode.getName() ) )
{
// Move children order by merge direction.(#3820)
mergeChildren( listNode, sibling, null, !rtl );
listNode.remove();
listNode = sibling;
}
} )();
mergeSibling( 1 );
}
function indexOfFirstChildElement( element, tagNameList ) {
var child,
children = element.children,
length = children.length;
for ( var i = 0; i < length; i++ ) {
child = children[ i ];
if ( child.name && ( child.name in tagNameList ) )
return i;
}
return length;
}
// Check if node is block element that recieves text.
function isTextBlock( node ) {
return node.type == CKEDITOR.NODE_ELEMENT && ( node.getName() in CKEDITOR.dtd.$block || node.getName() in CKEDITOR.dtd.$listItem ) && CKEDITOR.dtd[ node.getName() ][ '#' ];
}
// Join visually two block lines.
function joinNextLineToCursor( editor, cursor, nextCursor ) {
editor.fire( 'saveSnapshot' );
// Merge with previous block's content.
nextCursor.enlarge( CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS );
var frag = nextCursor.extractContents();
cursor.trim( false, true );
var bm = cursor.createBookmark();
// Kill original bogus;
var currentPath = new CKEDITOR.dom.elementPath( cursor.startContainer ),
pathBlock = currentPath.block,
currentBlock = currentPath.lastElement.getAscendant( 'li', 1 ) || pathBlock,
nextPath = new CKEDITOR.dom.elementPath( nextCursor.startContainer ),
nextLi = nextPath.contains( CKEDITOR.dtd.$listItem ),
nextList = nextPath.contains( CKEDITOR.dtd.$list ),
last;
// Remove bogus node the current block/pseudo block.
if ( pathBlock ) {
var bogus = pathBlock.getBogus();
bogus && bogus.remove();
}
else if ( nextList ) {
last = nextList.getPrevious( nonEmpty );
if ( last && blockBogus( last ) )
last.remove();
}
// Kill the tail br in extracted.
last = frag.getLast();
if ( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( 'br' ) )
last.remove();
// Insert fragment at the range position.
var nextNode = cursor.startContainer.getChild( cursor.startOffset );
if ( nextNode )
frag.insertBefore( nextNode );
else
cursor.startContainer.append( frag );
// Move the sub list nested in the next list item.
if ( nextLi ) {
var sublist = getSubList( nextLi );
if ( sublist ) {
// If next line is in the sub list of the current list item.
if ( currentBlock.contains( nextLi ) ) {
mergeChildren( sublist, nextLi.getParent(), nextLi );
sublist.remove();
}
// Migrate the sub list to current list item.
else
currentBlock.append( sublist );
}
}
var nextBlock, parent;
// Remove any remaining zombies path blocks at the end after line merged.
while ( nextCursor.checkStartOfBlock() && nextCursor.checkEndOfBlock() ) {
nextPath = nextCursor.startPath();
nextBlock = nextPath.block;
// Abort when nothing to be removed (#10890).
if ( !nextBlock )
break;
// Check if also to remove empty list.
if ( nextBlock.is( 'li' ) ) {
parent = nextBlock.getParent();
if ( nextBlock.equals( parent.getLast( nonEmpty ) ) && nextBlock.equals( parent.getFirst( nonEmpty ) ) )
nextBlock = parent;
}
nextCursor.moveToPosition( nextBlock, CKEDITOR.POSITION_BEFORE_START );
nextBlock.remove();
}
// Check if need to further merge with the list resides after the merged block. (#9080)
var walkerRng = nextCursor.clone(), editable = editor.editable();
walkerRng.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END );
var walker = new CKEDITOR.dom.walker( walkerRng );
walker.evaluator = function( node ) { return nonEmpty( node ) && !blockBogus( node ); };
var next = walker.next();
if ( next && next.type == CKEDITOR.NODE_ELEMENT && next.getName() in CKEDITOR.dtd.$list )
mergeListSiblings( next );
cursor.moveToBookmark( bm );
// Make fresh selection.
cursor.select();
editor.fire( 'saveSnapshot' );
}
function getSubList( li ) {
var last = li.getLast( nonEmpty );
return last && last.type == CKEDITOR.NODE_ELEMENT && last.getName() in listNodeNames ? last : null;
}
CKEDITOR.plugins.add( 'list', {
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
icons: 'bulletedlist,bulletedlist-rtl,numberedlist,numberedlist-rtl', // %REMOVE_LINE_CORE%
hidpi: true, // %REMOVE_LINE_CORE%
requires: 'indentlist',
init: function( editor ) {
if ( editor.blockless )
return;
// Register commands.
editor.addCommand( 'numberedlist', new listCommand( 'numberedlist', 'ol' ) );
editor.addCommand( 'bulletedlist', new listCommand( 'bulletedlist', 'ul' ) );
// Register the toolbar button.
if ( editor.ui.addButton ) {
editor.ui.addButton( 'NumberedList', {
label: editor.lang.list.numberedlist,
command: 'numberedlist',
directional: true,
toolbar: 'list,10'
} );
editor.ui.addButton( 'BulletedList', {
label: editor.lang.list.bulletedlist,
command: 'bulletedlist',
directional: true,
toolbar: 'list,20'
} );
}
// Handled backspace/del key to join list items. (#8248,#9080)
editor.on( 'key', function( evt ) {
// Use getKey directly in order to ignore modifiers.
// Justification: http://dev.ckeditor.com/ticket/11861#comment:13
var key = evt.data.domEvent.getKey();
// DEl/BACKSPACE
if ( editor.mode == 'wysiwyg' && key in { 8: 1, 46: 1 } ) {
var sel = editor.getSelection(),
range = sel.getRanges()[ 0 ],
path = range && range.startPath();
if ( !range || !range.collapsed )
return;
var isBackspace = key == 8;
var editable = editor.editable();
var walker = new CKEDITOR.dom.walker( range.clone() );
walker.evaluator = function( node ) {
return nonEmpty( node ) && !blockBogus( node );
};
// Backspace/Del behavior at the start/end of table is handled in core.
walker.guard = function( node, isOut ) {
return !( isOut && node.type == CKEDITOR.NODE_ELEMENT && node.is( 'table' ) );
};
var cursor = range.clone();
if ( isBackspace ) {
var previous, joinWith;
// Join a sub list's first line, with the previous visual line in parent.
if ( ( previous = path.contains( listNodeNames ) ) &&
range.checkBoundaryOfElement( previous, CKEDITOR.START ) &&
( previous = previous.getParent() ) && previous.is( 'li' ) &&
( previous = getSubList( previous ) ) ) {
joinWith = previous;
previous = previous.getPrevious( nonEmpty );
// Place cursor before the nested list.
cursor.moveToPosition(
previous && blockBogus( previous ) ? previous : joinWith,
CKEDITOR.POSITION_BEFORE_START );
}
// Join any line following a list, with the last visual line of the list.
else {
walker.range.setStartAt( editable, CKEDITOR.POSITION_AFTER_START );
walker.range.setEnd( range.startContainer, range.startOffset );
previous = walker.previous();
if ( previous && previous.type == CKEDITOR.NODE_ELEMENT &&
( previous.getName() in listNodeNames ||
previous.is( 'li' ) ) ) {
if ( !previous.is( 'li' ) ) {
walker.range.selectNodeContents( previous );
walker.reset();
walker.evaluator = isTextBlock;
previous = walker.previous();
}
joinWith = previous;
// Place cursor at the end of previous block.
cursor.moveToElementEditEnd( joinWith );
}
}
if ( joinWith ) {
joinNextLineToCursor( editor, cursor, range );
evt.cancel();
}
else {
var list = path.contains( listNodeNames );
// Backspace pressed at the start of list outdents the first list item. (#9129)
if ( list && range.checkBoundaryOfElement( list, CKEDITOR.START ) ) {
li = list.getFirst( nonEmpty );
if ( range.checkBoundaryOfElement( li, CKEDITOR.START ) ) {
previous = list.getPrevious( nonEmpty );
// Only if the list item contains a sub list, do nothing but
// simply move cursor backward one character.
if ( getSubList( li ) ) {
if ( previous ) {
range.moveToElementEditEnd( previous );
range.select();
}
evt.cancel();
}
else {
editor.execCommand( 'outdent' );
evt.cancel();
}
}
}
}
} else {
var next, nextLine, li = path.contains( 'li' );
if ( li ) {
walker.range.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END );
var last = li.getLast( nonEmpty );
var block = last && isTextBlock( last ) ? last : li;
// Indicate cursor at the visual end of an list item.
var isAtEnd = 0;
next = walker.next();
// When list item contains a sub list.
if ( next && next.type == CKEDITOR.NODE_ELEMENT &&
next.getName() in listNodeNames &&
next.equals( last ) )
{
isAtEnd = 1;
// Move to the first item in sub list.
next = walker.next();
}
// Right at the end of list item.
else if ( range.checkBoundaryOfElement( block, CKEDITOR.END ) )
isAtEnd = 1;
if ( isAtEnd && next ) {
// Put cursor range there.
nextLine = range.clone();
nextLine.moveToElementEditStart( next );
joinNextLineToCursor( editor, cursor, nextLine );
evt.cancel();
}
}
else
{
// Handle Del key pressed before the list.
walker.range.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END );
next = walker.next();
if ( next && next.type == CKEDITOR.NODE_ELEMENT &&
next.is( listNodeNames ) ) {
// The start <li>
next = next.getFirst( nonEmpty );
// Simply remove the current empty block, move cursor to the
// subsequent list.
if ( path.block &&
range.checkStartOfBlock() &&
range.checkEndOfBlock() ) {
path.block.remove();
range.moveToElementEditStart( next );
range.select();
evt.cancel();
}
// Preventing the default (merge behavior), but simply move
// the cursor one character forward if subsequent list item
// contains sub list.
else if ( getSubList( next ) ) {
range.moveToElementEditStart( next );
range.select();
evt.cancel();
}
// Merge the first list item with the current line.
else {
nextLine = range.clone();
nextLine.moveToElementEditStart( next );
joinNextLineToCursor( editor, cursor, nextLine );
evt.cancel();
}
}
}
}
// The backspace/del could potentially put cursor at a bad position,
// being it handled or not, check immediately the selection to have it fixed.
setTimeout( function() { editor.selectionChange( 1 ); } );
}
} );
}
} );
} )();
|
"""
========================
Broadcasting over arrays
========================
.. note::
See `this article
<https://numpy.org/devdocs/user/theory.broadcasting.html>`_
for illustrations of broadcasting concepts.
The term broadcasting describes how numpy treats arrays with different
shapes during arithmetic operations. Subject to certain constraints,
the smaller array is "broadcast" across the larger array so that they
have compatible shapes. Broadcasting provides a means of vectorizing
array operations so that looping occurs in C instead of Python. It does
this without making needless copies of data and usually leads to
efficient algorithm implementations. There are, however, cases where
broadcasting is a bad idea because it leads to inefficient use of memory
that slows computation.
NumPy operations are usually done on pairs of arrays on an
element-by-element basis. In the simplest case, the two arrays must
have exactly the same shape, as in the following example:
>>> a = np.array([1.0, 2.0, 3.0])
>>> b = np.array([2.0, 2.0, 2.0])
>>> a * b
array([ 2., 4., 6.])
NumPy's broadcasting rule relaxes this constraint when the arrays'
shapes meet certain constraints. The simplest broadcasting example occurs
when an array and a scalar value are combined in an operation:
>>> a = np.array([1.0, 2.0, 3.0])
>>> b = 2.0
>>> a * b
array([ 2., 4., 6.])
The result is equivalent to the previous example where ``b`` was an array.
We can think of the scalar ``b`` being *stretched* during the arithmetic
operation into an array with the same shape as ``a``. The new elements in
``b`` are simply copies of the original scalar. The stretching analogy is
only conceptual. NumPy is smart enough to use the original scalar value
without actually making copies so that broadcasting operations are as
memory and computationally efficient as possible.
The code in the second example is more efficient than that in the first
because broadcasting moves less memory around during the multiplication
(``b`` is a scalar rather than an array).
General Broadcasting Rules
==========================
When operating on two arrays, NumPy compares their shapes element-wise.
It starts with the trailing dimensions and works its way forward. Two
dimensions are compatible when
1) they are equal, or
2) one of them is 1
If these conditions are not met, a
``ValueError: operands could not be broadcast together`` exception is
thrown, indicating that the arrays have incompatible shapes. The size of
the resulting array is the size that is not 1 along each axis of the inputs.
Arrays do not need to have the same *number* of dimensions. For example,
if you have a ``256x256x3`` array of RGB values, and you want to scale
each font in the image by a different value, you can multiply the image
by a one-dimensional array with 3 values. Lining up the sizes of the
trailing axes of these arrays according to the broadcast rules, shows that
they are compatible::
Image (3d array): 256 x 256 x 3
Scale (1d array): 3
Result (3d array): 256 x 256 x 3
When either of the dimensions compared is one, the other is
used. In other words, dimensions with size 1 are stretched or "copied"
to match the other.
In the following example, both the ``A`` and ``B`` arrays have axes with
length one that are expanded to a larger size during the broadcast
operation::
A (4d array): 8 x 1 x 6 x 1
B (3d array): 7 x 1 x 5
Result (4d array): 8 x 7 x 6 x 5
Here are some more examples::
A (2d array): 5 x 4
B (1d array): 1
Result (2d array): 5 x 4
A (2d array): 5 x 4
B (1d array): 4
Result (2d array): 5 x 4
A (3d array): 15 x 3 x 5
B (3d array): 15 x 1 x 5
Result (3d array): 15 x 3 x 5
A (3d array): 15 x 3 x 5
B (2d array): 3 x 5
Result (3d array): 15 x 3 x 5
A (3d array): 15 x 3 x 5
B (2d array): 3 x 1
Result (3d array): 15 x 3 x 5
Here are examples of shapes that do not broadcast::
A (1d array): 3
B (1d array): 4 # trailing dimensions do not match
A (2d array): 2 x 1
B (3d array): 8 x 4 x 3 # second from last dimensions mismatched
An example of broadcasting in practice::
>>> x = np.arange(4)
>>> xx = x.reshape(4,1)
>>> y = np.ones(5)
>>> z = np.ones((3,4))
>>> x.shape
(4,)
>>> y.shape
(5,)
>>> x + y
ValueError: operands could not be broadcast together with shapes (4,) (5,)
>>> xx.shape
(4, 1)
>>> y.shape
(5,)
>>> (xx + y).shape
(4, 5)
>>> xx + y
array([[ 1., 1., 1., 1., 1.],
[ 2., 2., 2., 2., 2.],
[ 3., 3., 3., 3., 3.],
[ 4., 4., 4., 4., 4.]])
>>> x.shape
(4,)
>>> z.shape
(3, 4)
>>> (x + z).shape
(3, 4)
>>> x + z
array([[ 1., 2., 3., 4.],
[ 1., 2., 3., 4.],
[ 1., 2., 3., 4.]])
Broadcasting provides a convenient way of taking the outer product (or
any other outer operation) of two arrays. The following example shows an
outer addition operation of two 1-d arrays::
>>> a = np.array([0.0, 10.0, 20.0, 30.0])
>>> b = np.array([1.0, 2.0, 3.0])
>>> a[:, np.newaxis] + b
array([[ 1., 2., 3.],
[ 11., 12., 13.],
[ 21., 22., 23.],
[ 31., 32., 33.]])
Here the ``newaxis`` index operator inserts a new axis into ``a``,
making it a two-dimensional ``4x1`` array. Combining the ``4x1`` array
with ``b``, which has shape ``(3,)``, yields a ``4x3`` array.
"""
from __future__ import division, absolute_import, print_function
|
/*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* The Original Code is Fluendo MPEG Demuxer plugin.
*
* The Initial Developer of the Original Code is Fluendo, S.L.
* Portions created by Fluendo, S.L. are Copyright (C) 2005
* Fluendo, S.L. All Rights Reserved.
*
* Contributor(s): Wim Taymans <wim@fluendo.com>
*
*/
#ifndef __GST_MPEG_DESC_H__
#define __GST_MPEG_DESC_H__
#include <glib.h>
/* Others */
/* 0xFF is forbidden */
/* common for all descriptors */
#define DESC_TAG(desc) (desc[0])
#define DESC_LENGTH(desc) (desc[1])
/* video_stream_descriptor */
#define DESC_VIDEO_STREAM_multiple_framerate_flag(desc) (((desc)[2] & 0x80) == 0x80)
#define DESC_VIDEO_STREAM_frame_rate_code(desc) (((desc)[2] & 0x38) >> 3)
#define DESC_VIDEO_STREAM_MPEG_1_only_flag(desc) (((desc)[2] & 0x04) == 0x04)
#define DESC_VIDEO_STREAM_constrained_parameter_flag(desc) (((desc)[2] & 0x02) == 0x02)
#define DESC_VIDEO_STREAM_still_picture_flag(desc) (((desc)[2] & 0x01) == 0x01)
/* if (MPEG_1_only_flag == 1) */
#define DESC_VIDEO_STREAM_profile_and_level_indication(desc) ((desc)[3])
#define DESC_VIDEO_STREAM_chroma_format(desc) (((desc)[4] & 0xc0) >> 6)
#define DESC_VIDEO_STREAM_frame_rate_extension_flag(desc) (((desc)[4] & 0x20) == 0x20)
/* audio_stream_descriptor */
#define DESC_AUDIO_STREAM_free_format_flag(desc) (((desc)[2] & 0x80) == 0x80)
#define DESC_AUDIO_STREAM_ID(desc) (((desc)[2] & 0x40) == 0x40)
#define DESC_AUDIO_STREAM_layer(desc) (((desc)[2] & 0x30) >> 4)
#define DESC_AUDIO_STREAM_variable_rate_audio_indicator(desc) (((desc)[2] & 0x08) == 0x08)
/* hierarchy_descriptor */
#define DESC_HIERARCHY_hierarchy_type(desc) (((desc)[2] & 0x0f))
#define DESC_HIERARCHY_hierarchy_layer_index(desc) (((desc)[3] & 0x3f))
#define DESC_HIERARCHY_hierarchy_embedded_layer_index(desc) (((desc)[4] & 0x3f))
#define DESC_HIERARCHY_hierarchy_channel(desc) (((desc)[5] & 0x3f))
/* registration_descriptor */
#define DESC_REGISTRATION_format_identifier(desc) (GST_READ_UINT32_BE ((desc)+2))
#define DESC_REGISTRATION_additional_ident_info_len(desc) ((desc)[1] - 4)
#define DESC_REGISTRATION_additional_ident_info(desc) (&(desc)[6])
/* data_stream_alignment_descriptor */
#define DESC_DATA_STREAM_ALIGNMENT_alignment_type(desc) ((desc)[2])
/* target_background_grid_descriptor */
#define DESC_TARGET_BACKGROUND_GRID_horizontal_size(desc) (GST_READ_UINT16_BE ((desc)+2) >> 2)
#define DESC_TARGET_BACKGROUND_GRID_vertical_size(desc) ((GST_READ_UINT32_BE ((desc)+2) & 0x0003fff0) >> 4)
#define DESC_TARGET_BACKGROUND_GRID_aspect_ratio_information(desc) ((desc)[5] & 0x0f)
/* video_window_descriptor */
#define DESC_VIDEO_WINDOW_horizontal_offset(desc) (GST_READ_UINT16_BE ((desc)+2) >> 2)
#define DESC_VIDEO_WINDOW_vertical_offset(desc) ((GST_READ_UINT32_BE ((desc)+2) & 0x0003fff0) >> 4)
#define DESC_VIDEO_WINDOW_window_priority(desc) ((desc)[5] & 0x0f)
/* CA_descriptor */
#define DESC_CA_system_ID(desc) (GST_READ_UINT16_BE ((desc)+2))
#define DESC_CA_PID(desc) (GST_READ_UINT16_BE ((desc)+2) & 0x1fff)
/* ISO_639_language_descriptor */
#define DESC_ISO_639_LANGUAGE_codes_n(desc) ((desc[1]) >> 2)
#define DESC_ISO_639_LANGUAGE_language_code_nth(desc,i) (&(desc[2 + (4*i)]))
#define DESC_ISO_639_LANGUAGE_audio_type_nth(desc,i) ((desc)[5 + (4*i)])
/* system_clock_descriptor */
#define DESC_SYSTEM_CLOCK_external_clock_reference_indicator(desc) (((desc)[2] & 0x80) == 0x80)
#define DESC_SYSTEM_CLOCK_clock_accuracy_integer(desc) ((desc)[2] & 0x3f)
#define DESC_SYSTEM_CLOCK_clock_accuracy_exponent(desc) (((desc)[3] & 0xe0) >> 5)
/* multiplex_buffer_utilization_descriptor */
#define DESC_MULTIPLEX_BUFFER_UTILISATION_bound_valid_flag(desc) (((desc)[2] & 0x80) == 0x80)
#define DESC_MULTIPLEX_BUFFER_UTILISATION_LTW_offset_lower_bound(desc) (GST_READ_UINT16_BE ((desc)+2) & 0x7fff)
#define DESC_MULTIPLEX_BUFFER_UTILISATION_LTW_offset_upper_bound(desc) (GST_READ_UINT16_BE ((desc)+4) & 0x7fff)
/* copyright_descriptor */
#define DESC_COPYRIGHT_copyright_identifier(desc) (GST_READ_UINT32_BE ((desc)+2))
#define DESC_COPYRIGHT_additional_copyright_info_len(desc) ((desc)[1] - 4)
#define DESC_COPYRIGHT_additional_copyright_info(desc) (&(desc)[6])
/* maximum_bitrate_descriptor */
#define DESC_MAXIMUM_BITRAT_maximum_bitrate(desc) (((((guint32)desc[2]) & 0x3f) << 16) | \
GST_READ_UINT16_BE ((desc)+3))
/* private_data_indicator_descriptor */
#define DESC_PRIVATE_DATA_INDICATOR_indicator(desc) (GST_READ_UINT32_BE(&desc[2]))
/* smoothing_buffer_descriptor */
#define DESC_SMOOTHING_BUFFER_sb_leak_rate(desc) (((((guint32)desc[2]) & 0x3f) << 16) | \
GST_READ_UINT16_BE ((desc)+3))
#define DESC_SMOOTHING_BUFFER_sb_size(desc) (((((guint32)desc[5]) & 0x3f) << 16) | \
GST_READ_UINT16_BE ((desc)+6))
/* STD_descriptor */
#define DESC_STD_leak_valid_flag(desc) (((desc)[2] & 0x01) == 0x01)
/* ibp_descriptor */
#define DESC_IBP_closed_gop_flag(desc) (((desc)[2] & 0x80) == 0x80)
#define DESC_IBP_identical_gop_flag(desc) (((desc)[2] & 0x40) == 0x40)
#define DESC_IBP_max_gop_length(desc) (GST_READ_UINT16_BE ((desc)+6) & 0x3fff)
/* time_code descriptor */
#define DESC_TIMECODE_video_pid(desc) (GST_READ_UINT16_BE ((desc) + 2) & 0x1fff)
/* Stream identifier descriptor */
#define DESC_DVB_STREAM_IDENTIFIER_component_tag(desc) (desc[2])
/* DVB Network Name descriptor */
#define DESC_DVB_NETWORK_NAME_length(desc) (GST_READ_UINT8((desc)+1))
#define DESC_DVB_NETWORK_NAME_text(desc) (desc+2)
/* DVB Service Descriptor */
#define DESC_DVB_SERVICE_type(desc) (desc[2])
#define DESC_DVB_SERVICE_provider_name_length(desc) (desc[3])
#define DESC_DVB_SERVICE_provider_name_text(desc) (desc+4)
#define DESC_DVB_SERVICE_name_length(desc) (desc[4 + DESC_DVB_SERVICE_provider_name_length(desc)])
#define DESC_DVB_SERVICE_name_text(desc) (desc + 5 + DESC_DVB_SERVICE_provider_name_length(desc))
/* DVB Component Descriptor */
#define DESC_DVB_COMPONENT_stream_content(desc) (desc[2] & 0x0F)
#define DESC_DVB_COMPONENT_type(desc) (desc[3])
#define DESC_DVB_COMPONENT_tag(desc) (desc[4])
#define DESC_DVB_COMPONENT_language(desc) (desc + 5)
/* DVB Bouquet Name Descriptor */
#define DESC_DVB_BOUQUET_NAME_text(desc) (desc + 2)
/* DVB Short Event Descriptor */
#define DESC_DVB_SHORT_EVENT_name_text(desc) (desc + 6)
#define DESC_DVB_SHORT_EVENT_name_length(desc) (desc[5])
#define DESC_DVB_SHORT_EVENT_description_text(desc) (desc + 6 + DESC_DVB_SHORT_EVENT_name_length(desc) + 1)
#define DESC_DVB_SHORT_EVENT_description_length(desc) (desc[6 + DESC_DVB_SHORT_EVENT_name_length(desc)])
/* DVB Extended Event Descriptor */
#define DESC_DVB_EXTENDED_EVENT_descriptor_number(desc) ((desc[2] & 0xF0) >> 4)
#define DESC_DVB_EXTENDED_EVENT_last_descriptor_number(desc) (desc[2] & 0x0F)
#define DESC_DVB_EXTENDED_EVENT_iso639_language_code(desc) (desc + 3)
#define DESC_DVB_EXTENDED_EVENT_items_length(desc) (desc[6])
#define DESC_DVB_EXTENDED_EVENT_items(desc) (desc + 7)
#define DESC_DVB_EXTENDED_EVENT_text_length(desc) (desc[7 + DESC_DVB_EXTENDED_EVENT_items_length(desc)])
#define DESC_DVB_EXTENDED_EVENT_text(desc) (desc + 7 + DESC_DVB_EXTENDED_EVENT_items_length(desc) + 1)
/* DVB Satellite Delivery System Descriptor */
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_frequency(desc) (desc + 2)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_orbital_position(desc) (desc + 6)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_west_east_flag(desc) ((desc[8] & 0x80) == 0x80)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_polarization(desc) ((desc[8] >> 5) & 0x3)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_modulation(desc) (desc[8] & 0x3)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_symbol_rate(desc) (desc + 9)
#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_fec_inner(desc) (desc[12] & 0x0F)
/* DVB Terrestrial Delivery System Descriptor */
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_frequency(desc) (GST_READ_UINT32_BE((desc) + 2))
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_bandwidth(desc) ((desc[6] >> 5) & 0x7)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_constellation(desc) ((desc[7] >> 6) & 0x3)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_hierarchy(desc) ((desc[7] >> 3) & 0x7)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_code_rate_hp(desc) (desc[7] & 0x7)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_code_rate_lp(desc) ((desc[8] >> 5) & 0x7)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_guard_interval(desc) ((desc[8] >> 3) & 0x3)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_transmission_mode(desc) ((desc[8] >> 1) & 0x3)
#define DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_other_frequency(desc) ((desc[8] & 0x01) == 0x01)
/* DVB Cable Delivery System Descriptor */
#define DESC_DVB_CABLE_DELIVERY_SYSTEM_frequency(desc) (desc + 2)
#define DESC_DVB_CABLE_DELIVERY_SYSTEM_fec_outer(desc) (desc[7] & 0x0F)
#define DESC_DVB_CABLE_DELIVERY_SYSTEM_modulation(desc) (desc[8])
#define DESC_DVB_CABLE_DELIVERY_SYSTEM_symbol_rate(desc) (desc + 9)
#define DESC_DVB_CABLE_DELIVERY_SYSTEM_fec_inner(desc) (desc[12] & 0x0F)
/* DVB Data Broadcast Descriptor */
#define DESC_DVB_DATA_BROADCAST_data_broadcast_id(desc) (GST_READ_UINT16_BE((desc) + 2))
#define DESC_DVB_DATA_BROADCAST_component_tag(desc) (desc[4])
#define DESC_DVB_DATA_BROADCAST_selector_length(desc) (desc[5])
#define DESC_DVB_DATA_BROADCAST_selector(desc) (desc + 6)
#define DESC_DVB_DATA_BROADCAST_iso639_language_code(desc) (desc + 6 + DESC_DVB_DATA_BROADCAST_selector_length(desc))
#define DESC_DVB_DATA_BROADCAST_text_length(desc) (desc + 9 + DESC_DVB_DATA_BROADCAST_selector_length(desc))
#define DESC_DVB_DATA_BROADCAST_text(desc) (desc + 10 + DESC_DVB_DATA_BROADCAST_selector_length(desc))
/* DVB Data Broadcast Id Descriptor */
#define DESC_DVB_DATA_BROADCAST_ID_data_broadcast_id(desc) (GST_READ_UINT16_BE((desc) + 2))
#define DESC_DVB_DATA_BROADCAST_ID_id_selector_byte(desc) (desc + 4)
/* DVB Carousel Identifier Descriptor */
#define DESC_DVB_CAROUSEL_IDENTIFIER_carousel_id(desc) (GST_READ_UINT32_BE((desc) + 2))
/* AC3_audio_stream_descriptor */
#define DESC_AC_AUDIO_STREAM_bsid(desc) ((desc)[2] & 0x1f)
/* FIXME : Move list of well know registration ids to an enum
* in the mpegts library.
*
* See http://www.smpte-ra.org/mpegreg/mpegreg.html for a full list
* */
/* registration_descriptor format IDs */
#define DRF_ID_HDMV 0x48444d56
#define DRF_ID_VC1 0x56432D31 /* defined in RP227 */
#define DRF_ID_DTS1 0x44545331
#define DRF_ID_DTS2 0x44545332
#define DRF_ID_DTS3 0x44545333
#define DRF_ID_S302M 0x42535344
#define DRF_ID_TSHV 0x54534856
#define DRF_ID_AC3 0x41432d33
#define DRF_ID_GA94 0x47413934
#define DRF_ID_CUEI 0x43554549
#define DRF_ID_ETV1 0x45545631
#define DRF_ID_HEVC 0x48455643
#define DRF_ID_KLVA 0x4b4c5641 /* defined in RP217 */
#define DRF_ID_OPUS 0x4f707573
#define DRF_ID_EAC3 0x45414333 /* defined in A/52 Annex G */
#define DRF_ID_AC4 0x41432D34 /* defined in ETSI TS 103 190-2 Annex D */
#endif /* __GST_MPEG_DESC_H__ */
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[367],{430:function(e,r,t){"use strict";t.r(r),t.d(r,"frontMatter",(function(){return i})),t.d(r,"metadata",(function(){return a})),t.d(r,"rightToc",(function(){return l})),t.d(r,"default",(function(){return u}));var o=t(3),n=t(7),s=(t(0),t(446)),i={id:"user-logout",title:"User Logout"},a={unversionedId:"self-service/flows/user-logout",id:"version-v0.1/self-service/flows/user-logout",isDocsHomePage:!1,title:"User Logout",description:"ORY Kratos supports two logout flows:",source:"@site/versioned_docs/version-v0.1/self-service/flows/user-logout.md",slug:"/self-service/flows/user-logout",permalink:"/kratos/docs/v0.1/self-service/flows/user-logout",editUrl:"https://github.com/ory/kratos/edit/master/docs/versioned_docs/version-v0.1/self-service/flows/user-logout.md",version:"v0.1",lastUpdatedBy:"hackerman",lastUpdatedAt:1586177162,sidebar:"version-v0.1/docs",previous:{title:"User Login and User Registration",permalink:"/kratos/docs/v0.1/self-service/flows/user-login-user-registration"},next:{title:"user-profile-management",permalink:"/kratos/docs/v0.1/self-service/flows/user-profile-management"}},l=[{value:"Self-Service User Logout for Browser Applications",id:"self-service-user-logout-for-browser-applications",children:[]},{value:"Self-Service User Logout for API Clients",id:"self-service-user-logout-for-api-clients",children:[]}],c={rightToc:l};function u(e){var r=e.components,t=Object(n.a)(e,["components"]);return Object(s.b)("wrapper",Object(o.a)({},c,t,{components:r,mdxType:"MDXLayout"}),Object(s.b)("p",null,"ORY Kratos supports two logout flows:"),Object(s.b)("ul",null,Object(s.b)("li",{parentName:"ul"},"Browser-based (easy): This flow works for all applications running on top of a\nbrowser. Websites, single-page apps, Cordova/Ionic, and so on."),Object(s.b)("li",{parentName:"ul"},"API-based (advanced): This flow works for native applications like iOS\n(Swift), Android (Java), Microsoft (.NET), React Native, Electron, and others.")),Object(s.b)("h2",{id:"self-service-user-logout-for-browser-applications"},"Self-Service User Logout for Browser Applications"),Object(s.b)("blockquote",null,Object(s.b)("p",{parentName:"blockquote"},"WARNING - This flow is currently vulnerable to CSRF attacks because anyone can\ndirect your users to the logout endpoint. A future release of ORY Kratos will\nuse POST Forms with Anti-CSRF Tokens to prevent this problem. This is tracked\nas ",Object(s.b)("a",Object(o.a)({parentName:"p"},{href:"https://github.com/ory/kratos/issues/142"}),"kratos#142"),".")),Object(s.b)("p",null,"To log a user out, all you have to do is to direct the browser to\n",Object(s.b)("inlineCode",{parentName:"p"},"http://ory-kratos-public/auth/browser/logout"),". After successful logout, the\nbrowser will be redirected to the ",Object(s.b)("inlineCode",{parentName:"p"},"redirect_to")," value set in ORY Krato's\nconfiguration file:"),Object(s.b)("pre",null,Object(s.b)("code",Object(o.a)({parentName:"pre"},{}),"selfservice:\n logout:\n redirect_to: http://test.kratos.ory.sh:4000/\n")),Object(s.b)("h2",{id:"self-service-user-logout-for-api-clients"},"Self-Service User Logout for API Clients"),Object(s.b)("p",null,"This will be addressed in a future release of ORY Kratos."))}u.isMDXComponent=!0},446:function(e,r,t){"use strict";t.d(r,"a",(function(){return p})),t.d(r,"b",(function(){return d}));var o=t(0),n=t.n(o);function s(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function l(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},s=Object.keys(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var c=n.a.createContext({}),u=function(e){var r=n.a.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},p=function(e){var r=u(e.components);return n.a.createElement(c.Provider,{value:r},e.children)},f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.a.createElement(n.a.Fragment,{},r)}},b=n.a.forwardRef((function(e,r){var t=e.components,o=e.mdxType,s=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(t),b=o,d=p["".concat(i,".").concat(b)]||p[b]||f[b]||s;return t?n.a.createElement(d,a(a({ref:r},c),{},{components:t})):n.a.createElement(d,a({ref:r},c))}));function d(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var s=t.length,i=new Array(s);i[0]=b;var a={};for(var l in r)hasOwnProperty.call(r,l)&&(a[l]=r[l]);a.originalType=e,a.mdxType="string"==typeof e?e:o,i[1]=a;for(var c=2;c<s;c++)i[c]=t[c];return n.a.createElement.apply(null,i)}return n.a.createElement.apply(null,t)}b.displayName="MDXCreateElement"}}]);
|
from src.Logging.Logger import *
import configparser
@HttpClientLogger
class AuthenticationBypassViaOAth():
pass
|
import snscrape.modules.twitter as sntwitter
import pandas as pd
# list to store tweet data
tweets = []
# scrape data and append to list
for i, tweet in enumberate(sntwitter.TwitterSearchScraper('fake news since:2020-03-01 until:2020-04-01').get_items()):
print(i)
tweets.append([tweet.date, tweet.id, tweet.content, tweet.user.username,])
|
const gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
browserify = require('browserify'),
babelify = require('babelify'),
stringify = require('stringify'),
buffer = require('vinyl-buffer'),
source = require('vinyl-source-stream'),
runSequence = require('run-sequence'),
rimraf = require('rimraf');
const app = {
src: 'app/',
build: 'build/'
};
const paths = {
styles: '**/*.css',
scripts: '**/*.js',
views: {
main: 'index.html',
templates: 'view/**/*.html'
}
};
gulp.task('css', function() {
gulp.src(app.src + paths.styles)
.pipe(gulp.dest(app.build + 'css'));
});
gulp.task('copy:libs', function() {
return gulp
.src([
'node_modules/es6-shim/es6-shim.min.js',
'node_modules/systemjs/dist/system-polyfills.js',
'node_modules/systemjs/dist/system.src.js',
'node_modules/rxjs/bundles/Rx.js',
'node_modules/knockout/build/output/knockout-latest.js'
])
.pipe($.uglify())
.pipe($.concat('libs.min.js'))
.pipe(gulp.dest(app.build + 'js/lib'));
});
gulp.task('js', function () {
browserify(app.src + '/main.js', { debug: true })
.add(require.resolve('babel-polyfill'))
.transform(babelify)
.transform(stringify, {
appliesTo: { includeExtendsions: ['.html']}
})
.bundle()
.on('error', $.util.log.bind($.util, 'Browserify Error'))
.pipe(source('app.js'))
.pipe(buffer())
.pipe($.sourcemaps.init({loadMaps: true}))
.pipe($.uglify({ mangle: false }))
.pipe($.sourcemaps.write('./'))
.pipe(gulp.dest(app.build + 'js/'));
});
gulp.task('watch', function() {
gulp.watch(app.src + paths.scripts, ['js']);
gulp.watch(app.src + paths.styles, ['css']);
gulp.watch([app.src + paths.views.main, app.src + paths.views.templates], ['html']);
});
gulp.task('webserver', function() {
gulp.src(app.build)
.pipe($.webserver({
livereload: true,
host: '0.0.0.0',
port: '8080'
}));
});
gulp.task('clean:build', function(cb) {
rimraf(app.build, cb);
});
gulp.task('build', function() {
runSequence(['copy:libs', 'js', 'css', 'watch', 'webserver']);
});
gulp.task('default', ['build']);
|
/**
* Created by yuehaiming on 2019/8/12.
*/
import fetch from '@/libs/fetch/fetch';
const urlPrefix = '/madara/in/caseMonitor';
// 警情查询 初始化表格
export function sendMonitorCase(obj) {
return fetch({
url: `${urlPrefix}/sendMonitorCase`,
method: 'post',
data: obj
});
}
// 上控信息查询
export function getPage(obj) {
return fetch({
url: `${urlPrefix}/page`,
method: 'get',
data: obj
});
}
// 导出数据
export function exportExcel(obj) {
return fetch({
url: `${urlPrefix}/export/excel`,
method: 'get',
data: obj,
responseType: 'blob'
});
}
|
import reducer from './reducer';
import routes from './routes';
import moduleConfig from './config';
import { Module } from '../core/index';
import './template';
const module = globalConfig => (
new Module('{MODULE_NAME}', {
routes,
reducer,
config: { ...moduleConfig, ...globalConfig },
actions: {},
})
);
export default module;
|
Meteor.startup(function () {
Template[getTemplate('pageItem')].helpers({
formId: function () {
return 'updatePage-'+ this._id
}
});
Template[getTemplate('pageItem')].events({
'click .delete-link': function(e, instance){
e.preventDefault();
if (confirm("Delete page?")) {
Pages.collection.remove(instance.data._id);
}
}
});
});
|
// Copyright (c) 2018 The PIVX developers
// Copyright (c) 2018 The Betfint developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BETFINT_ZBETFTRACKER_H
#define BETFINT_ZBETFTRACKER_H
#include "primitives/zerocoin.h"
#include <list>
class CDeterministicMint;
class CzBETFTracker
{
private:
bool fInitialized;
std::string strWalletFile;
std::map<uint256, CMintMeta> mapSerialHashes;
std::map<uint256, uint256> mapPendingSpends; //serialhash, txid of spend
bool UpdateStatusInternal(const std::set<uint256>& setMempool, CMintMeta& mint);
public:
CzBETFTracker(std::string strWalletFile);
~CzBETFTracker();
void Add(const CDeterministicMint& dMint, bool isNew = false, bool isArchived = false);
void Add(const CZerocoinMint& mint, bool isNew = false, bool isArchived = false);
bool Archive(CMintMeta& meta);
bool HasPubcoin(const CBigNum& bnValue) const;
bool HasPubcoinHash(const uint256& hashPubcoin) const;
bool HasSerial(const CBigNum& bnSerial) const;
bool HasSerialHash(const uint256& hashSerial) const;
bool HasMintTx(const uint256& txid);
bool IsEmpty() const { return mapSerialHashes.empty(); }
void Init();
CMintMeta Get(const uint256& hashSerial);
CMintMeta GetMetaFromPubcoin(const uint256& hashPubcoin);
bool GetMetaFromStakeHash(const uint256& hashStake, CMintMeta& meta) const;
CAmount GetBalance(bool fConfirmedOnly, bool fUnconfirmedOnly) const;
std::vector<uint256> GetSerialHashes();
std::vector<CMintMeta> GetMints(bool fConfirmedOnly) const;
CAmount GetUnconfirmedBalance() const;
std::set<CMintMeta> ListMints(bool fUnusedOnly, bool fMatureOnly, bool fUpdateStatus);
void RemovePending(const uint256& txid);
void SetPubcoinUsed(const uint256& hashPubcoin, const uint256& txid);
void SetPubcoinNotUsed(const uint256& hashPubcoin);
bool UnArchive(const uint256& hashPubcoin, bool isDeterministic);
bool UpdateZerocoinMint(const CZerocoinMint& mint);
bool UpdateState(const CMintMeta& meta);
void Clear();
};
#endif //BETFINT_ZBETFTRACKER_H
|
import { tournamentEngine } from '../..';
import fs from 'fs';
import { DOUBLES, TEAM } from '../../constants/matchUpTypes';
const tournamentRecordJSON = fs.readFileSync(
'./src/global/testHarness/assignTieMatchUpParticipant.tods.json',
'utf-8'
);
it.skip('populates matchUp sides', () => {
const tournamentRecord = JSON.parse(tournamentRecordJSON);
tournamentEngine.setState(tournamentRecord);
const {
matchUps: [matchUp],
} = tournamentEngine.allTournamentMatchUps({
matchUpFilters: { matchUpTypes: [TEAM] },
});
const lineUps = matchUp.sides.map(({ lineUp }) => lineUp);
const originalLineUp = lineUps[1];
const { matchUps } = tournamentEngine.allTournamentMatchUps({
matchUpFilters: { matchUpTypes: [DOUBLES] },
});
const a = matchUps
.filter((matchUp) => !matchUp.sides[1].participant)
.map(({ sides, collectionPosition, collectionId }) => {
const assignments = originalLineUp.filter((assignment) =>
assignment.collectionAssignments.find(
(a) =>
a.collectionId === collectionId &&
a.collectionPosition === collectionPosition
)
);
return {
side: sides[1],
collectionId,
collectionPosition,
assignments,
};
});
console.log(a[0].assignments);
});
it('assignMatchUpParticipantId will remove prior assignments', () => {
const tournamentRecord = JSON.parse(tournamentRecordJSON);
tournamentEngine.setState(tournamentRecord);
let result, params;
const {
matchUps: [matchUp],
} = tournamentEngine.allTournamentMatchUps({
matchUpFilters: { matchUpTypes: [TEAM] },
});
const lineUps = matchUp.sides.map(({ lineUp }) => lineUp);
const originalLineUp = lineUps[1];
params = {
drawId: 'b64103e5-7e63-4a9f-a62c-8569b0a2fcae',
participantId: 'A84C3E42-C60C-4772-BEAF-135E313CB90B',
tieMatchUpId: '9e3b56a2-69a5-45ce-b363-c3d67c5a5d26',
};
result = tournamentEngine.assignTieMatchUpParticipantId(params);
expect(originalLineUp).not.toEqual(result.modifiedLineUp);
params = {
drawId: 'b64103e5-7e63-4a9f-a62c-8569b0a2fcae',
participantId: '24641B6A-6EFB-4599-8052-802576F8F332',
tieMatchUpId: '9e3b56a2-69a5-45ce-b363-c3d67c5a5d26',
};
result = tournamentEngine.assignTieMatchUpParticipantId(params);
expect(originalLineUp).not.toEqual(result.modifiedLineUp);
params = {
drawId: 'b64103e5-7e63-4a9f-a62c-8569b0a2fcae',
participantId: '51FC341B-506B-4598-9880-AF7A9F4B8243',
tieMatchUpId: '9e3b56a2-69a5-45ce-b363-c3d67c5a5d26',
};
result = tournamentEngine.assignTieMatchUpParticipantId(params);
expect(originalLineUp).not.toEqual(result.modifiedLineUp);
params = {
drawId: 'b64103e5-7e63-4a9f-a62c-8569b0a2fcae',
participantId: '24641B6A-6EFB-4599-8052-802576F8F332',
tieMatchUpId: '9e3b56a2-69a5-45ce-b363-c3d67c5a5d26',
};
result = tournamentEngine.assignTieMatchUpParticipantId(params);
expect(originalLineUp).not.toEqual(result.modifiedLineUp);
expect(result.success).toEqual(true);
});
|
import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-redux"
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp
} from "react-native-responsive-screen"
import { getNavigationScreen } from "@screens"
export class Blank extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
render = () => (
<ScrollView
contentContainerStyle={{ flexGrow: 1 }}
style={styles.ScrollView_1}
>
<View style={styles.View_2} />
<View style={styles.View_200_896}>
<View style={styles.View_200_897} />
<View style={styles.View_200_898}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/c78a/5bdf/8df1323d87ff79c5a7d36f96b0228975"
}}
style={styles.ImageBackground_200_899}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/2f57/50f0/bb5307b43df4eff3538c7fe14a630797"
}}
style={styles.ImageBackground_200_901}
/>
<View style={styles.View_200_904}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/a930/9c43/f8be4578e6cc748227b7f11f9761136a"
}}
style={styles.ImageBackground_200_905}
/>
<View style={styles.View_200_906}>
<Text style={styles.Text_200_906}>5</Text>
</View>
</View>
<View style={styles.View_200_907}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7623/4d95/23fbe9ab8b5cc002ef4d04d2f4cee898"
}}
style={styles.ImageBackground_200_908}
/>
<View style={styles.View_200_909}>
<Text style={styles.Text_200_909}>5</Text>
</View>
</View>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7549/914c/1b9c5fd1fb1faf161873a8a253ed3c42"
}}
style={styles.ImageBackground_200_910}
/>
</View>
<View style={styles.View_200_911}>
<View style={styles.View_200_912}>
<View style={styles.View_200_913} />
<View style={styles.View_200_914} />
<View style={styles.View_200_915}>
<Text style={styles.Text_200_915}>12</Text>
</View>
<View style={styles.View_200_916}>
<Text style={styles.Text_200_916}>New Appointments</Text>
</View>
</View>
<View style={styles.View_200_917}>
<View style={styles.View_200_918} />
<View style={styles.View_200_919}>
<Text style={styles.Text_200_919}>Wallet Balance</Text>
</View>
<View style={styles.View_200_920}>
<Text style={styles.Text_200_920}>N350,000:89</Text>
</View>
<View style={styles.View_200_921} />
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/cbc1/621a/61f3cbc1bd5ad9361be4287ff5644821"
}}
style={styles.ImageBackground_200_922}
/>
</View>
<View style={styles.View_200_923}>
<View style={styles.View_200_924} />
<View style={styles.View_200_925} />
<View style={styles.View_200_926}>
<Text style={styles.Text_200_926}>12</Text>
</View>
<View style={styles.View_200_927}>
<Text style={styles.Text_200_927}>Total Patients</Text>
</View>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/ceb8/3de2/43f7c8aa714aaa374d2a66d30b0bab62"
}}
style={styles.ImageBackground_200_928}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/b8cf/b0e4/399ef3896f388c335a50a1a95d1ae74f"
}}
style={styles.ImageBackground_200_930}
/>
</View>
<View style={styles.View_200_937}>
<View style={styles.View_200_938} />
<View style={styles.View_200_939}>
<Text style={styles.Text_200_939}>Dr. Yemi Osinbajo</Text>
</View>
<View style={styles.View_200_940}>
<Text style={styles.Text_200_940}>Welcome to your Page</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/0ad8/b987/23d22bd2e778701dc9c2a7578bf781b0"
}}
style={styles.ImageBackground_200_941}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7db2/25b5/37acbf3ab08751e3e5fd5f43ea251ce2"
}}
style={styles.ImageBackground_200_942}
/>
</View>
<View style={styles.View_200_943}>
<View style={styles.View_200_944} />
<View style={styles.View_200_945} />
<View style={styles.View_200_946}>
<Text style={styles.Text_200_946}>Notifications</Text>
</View>
<View style={styles.View_200_947}>
<Text style={styles.Text_200_947}>
Someone has booked an appointment
</Text>
</View>
<View style={styles.View_200_948}>
<Text style={styles.Text_200_948}>20/08/2020 8:04pm</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/4b66/b78d/0c2cfb26dab15445bd743bdcb87aad3c"
}}
style={styles.ImageBackground_200_949}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/a8f9/ebd1/a841a6d46cf894de5a68510317cdc506"
}}
style={styles.ImageBackground_200_950}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/2698/ad1b/30a9109cb63d875efc7b03e32817c9c5"
}}
style={styles.ImageBackground_200_951}
/>
</View>
<View style={styles.View_200_954}>
<View style={styles.View_200_955} />
<View style={styles.View_200_956} />
<View style={styles.View_200_957}>
<Text style={styles.Text_200_957}>Your Stats</Text>
</View>
<View style={styles.View_200_958}>
<Text style={styles.Text_200_958}>No. of attended to</Text>
</View>
<View style={styles.View_200_959}>
<Text style={styles.Text_200_959}>118</Text>
</View>
<View style={styles.View_200_960}>
<Text style={styles.Text_200_960}>Wallet Balance</Text>
</View>
<View style={styles.View_200_961}>
<Text style={styles.Text_200_961}>Customers</Text>
</View>
<View style={styles.View_200_962}>
<Text style={styles.Text_200_962}>N450,610:97</Text>
</View>
<View style={styles.View_200_963}>
<Text style={styles.Text_200_963}>1800</Text>
</View>
<View style={styles.View_200_964}>
<Text style={styles.Text_200_964}>Rating</Text>
</View>
<View style={styles.View_200_965}>
<Text style={styles.Text_200_965}>2005</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/3d5f/a1f6/7a52bf26ba701ce120ac54430acf1b21"
}}
style={styles.ImageBackground_200_966}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/0a50/fae0/34d7729257447aef845ca6c73e369a85"
}}
style={styles.ImageBackground_200_967}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/0a50/fae0/34d7729257447aef845ca6c73e369a85"
}}
style={styles.ImageBackground_200_968}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/0a50/fae0/34d7729257447aef845ca6c73e369a85"
}}
style={styles.ImageBackground_200_969}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/61db/fc61/67658cc9504e06fc6a4743a8573b9189"
}}
style={styles.ImageBackground_200_970}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/4ec3/0544/e9da0edda46274e721b0c022cadf4a4c"
}}
style={styles.ImageBackground_200_973}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/0ec2/345c/d439935c2ede06876c1ece2fdafb1a54"
}}
style={styles.ImageBackground_200_976}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/5af2/28cf/c625ed86eaa3e3e74bbbc3a88cb44929"
}}
style={styles.ImageBackground_200_977}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/3c0b/088a/983d7f189244e11eb814f9f574c6d081"
}}
style={styles.ImageBackground_200_981}
/>
</View>
<View style={styles.View_200_987}>
<View style={styles.View_200_988} />
<View style={styles.View_200_989} />
<View style={styles.View_200_990}>
<Text style={styles.Text_200_990}>Customer Reviews</Text>
</View>
<View style={styles.View_200_991} />
<View style={styles.View_200_992}>
<Text style={styles.Text_200_992}>Ibrahim Mohammed</Text>
</View>
<View style={styles.View_200_993}>
<Text style={styles.Text_200_993}>Adewale Bala</Text>
</View>
<View style={styles.View_200_994}>
<Text style={styles.Text_200_994}>Great Experience.</Text>
</View>
<View style={styles.View_200_995}>
<Text style={styles.Text_200_995}>
A very nice and friendly doctor
</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/07fe/c3f4/4c2c13388a5e5d82469adc85fddb63a9"
}}
style={styles.ImageBackground_200_996}
/>
<View style={styles.View_200_997} />
<View style={styles.View_200_998} />
<View style={styles.View_200_999}>
<Text style={styles.Text_200_999}>Customer Name</Text>
</View>
<View style={styles.View_200_1000}>
<Text style={styles.Text_200_1000}>Comment</Text>
</View>
<View style={styles.View_200_1001}>
<Text style={styles.Text_200_1001}>Star & Date</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/3c0b/088a/983d7f189244e11eb814f9f574c6d081"
}}
style={styles.ImageBackground_200_1002}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/28d8/6273/739301bc18545d01033bafd56fb16747"
}}
style={styles.ImageBackground_200_1008}
/>
<View style={styles.View_200_1014}>
<Text style={styles.Text_200_1014}>20/10/2020</Text>
</View>
<View style={styles.View_200_1015}>
<Text style={styles.Text_200_1015}>20/10/2020</Text>
</View>
<View style={styles.View_200_1016}>
<View style={styles.View_200_1017}>
<Text style={styles.Text_200_1017}>View All</Text>
</View>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/be36/e6bd/5ee746915266b0bd45fc78dac5789ba6"
}}
style={styles.ImageBackground_200_1018}
/>
</View>
<View style={styles.View_200_1022}>
<View style={styles.View_200_1023} />
<View style={styles.View_200_1024} />
<View style={styles.View_200_1025}>
<Text style={styles.Text_200_1025}>New Appointments</Text>
</View>
<View style={styles.View_200_1026}>
<View style={styles.View_200_1027}>
<Text style={styles.Text_200_1027}>View All</Text>
</View>
</View>
<View style={styles.View_200_1028} />
<View style={styles.View_200_1029} />
<View style={styles.View_200_1030} />
<View style={styles.View_200_1031}>
<Text style={styles.Text_200_1031}>Time</Text>
</View>
<View style={styles.View_200_1032}>
<Text style={styles.Text_200_1032}>Tue, 22/082020 10PM - 11PM</Text>
</View>
<View style={styles.View_200_1033}>
<Text style={styles.Text_200_1033}>22/08/2020 12PM-1PM</Text>
</View>
<View style={styles.View_200_1034}>
<Text style={styles.Text_200_1034}>22/08/2020 10:08PM</Text>
</View>
<View style={styles.View_200_1035}>
<Text style={styles.Text_200_1035}>Customer Name</Text>
</View>
<View style={styles.View_200_1036}>
<Text style={styles.Text_200_1036}>Ibrahim Mohammed</Text>
</View>
<View style={styles.View_200_1037}>
<Text style={styles.Text_200_1037}>Adewale Basmus</Text>
</View>
<View style={styles.View_200_1038}>
<Text style={styles.Text_200_1038}>Adewale Basmus</Text>
</View>
<View style={styles.View_200_1039}>
<View style={styles.View_200_1040}>
<Text style={styles.Text_200_1040}>View</Text>
</View>
</View>
<View style={styles.View_200_1041}>
<View style={styles.View_200_1042}>
<Text style={styles.Text_200_1042}>View</Text>
</View>
</View>
<View style={styles.View_200_1043}>
<View style={styles.View_200_1044}>
<Text style={styles.Text_200_1044}>View</Text>
</View>
</View>
<View style={styles.View_200_1045}>
<Text style={styles.Text_200_1045}>Action</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/9949/7fef/c89287b9288d9a527460a17160e207d3"
}}
style={styles.ImageBackground_200_1046}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/9949/7fef/c89287b9288d9a527460a17160e207d3"
}}
style={styles.ImageBackground_200_1047}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/b642/8918/5c6d72432e4f12e9df8e67ea96683e23"
}}
style={styles.ImageBackground_200_1048}
/>
</View>
</ScrollView>
)
}
const styles = StyleSheet.create({
ScrollView_1: { backgroundColor: "rgba(252, 252, 252, 1)" },
View_2: { height: hp("182%") },
View_200_896: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("8%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_897: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_898: {
width: wp("16%"),
minWidth: wp("16%"),
height: hp("3%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("80%"),
top: hp("2%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
ImageBackground_200_899: {
width: wp("3%"),
height: hp("2%"),
top: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%")
},
ImageBackground_200_901: {
width: wp("4%"),
height: hp("2%"),
top: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%")
},
View_200_904: {
width: wp("3%"),
minWidth: wp("3%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%"),
top: hp("0%")
},
ImageBackground_200_905: {
width: wp("3%"),
minWidth: wp("3%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
View_200_906: {
width: wp("1%"),
minWidth: wp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("1%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_906: {
color: "rgba(255, 255, 255, 1)",
fontSize: 4.285236358642578,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_907: {
width: wp("3%"),
minWidth: wp("3%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("13%"),
top: hp("0%")
},
ImageBackground_200_908: {
width: wp("3%"),
minWidth: wp("3%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
View_200_909: {
width: wp("1%"),
minWidth: wp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("1%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_909: {
color: "rgba(255, 255, 255, 1)",
fontSize: 4.285236358642578,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_910: {
width: wp("5%"),
height: hp("2%"),
top: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%")
},
View_200_911: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("19%"),
minHeight: hp("19%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("30%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_912: {
width: wp("44%"),
minWidth: wp("44%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("12%")
},
View_200_913: {
width: wp("44%"),
minWidth: wp("44%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_914: {
width: wp("9%"),
minWidth: wp("9%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 185, 185, 1)"
},
View_200_915: {
width: wp("4%"),
minWidth: wp("4%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("22%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_915: {
color: "rgba(48, 157, 143, 1)",
fontSize: 11.856117248535156,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_916: {
width: wp("29%"),
minWidth: wp("29%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("13%"),
top: hp("5%"),
justifyContent: "flex-start"
},
Text_200_916: {
color: "rgba(0, 0, 0, 1)",
fontSize: 9.389691352844238,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_917: {
width: wp("40%"),
minWidth: wp("40%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
View_200_918: {
width: wp("40%"),
minWidth: wp("40%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_919: {
width: wp("23%"),
minWidth: wp("23%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("12%"),
top: hp("5%"),
justifyContent: "flex-start"
},
Text_200_919: {
color: "rgba(0, 0, 0, 1)",
fontSize: 9.389691352844238,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_920: {
width: wp("25%"),
minWidth: wp("25%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("11%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_920: {
color: "rgba(48, 157, 143, 1)",
fontSize: 11.856117248535156,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_921: {
width: wp("9%"),
minWidth: wp("9%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 201, 94, 1)"
},
ImageBackground_200_922: {
width: wp("4%"),
height: hp("2%"),
top: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%")
},
View_200_923: {
width: wp("40%"),
minWidth: wp("40%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("46%"),
top: hp("0%")
},
View_200_924: {
width: wp("40%"),
minWidth: wp("40%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_925: {
width: wp("9%"),
minWidth: wp("9%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(198, 248, 153, 1)"
},
View_200_926: {
width: wp("4%"),
minWidth: wp("4%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("20%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_926: {
color: "rgba(48, 157, 143, 1)",
fontSize: 11.856117248535156,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_927: {
width: wp("21%"),
minWidth: wp("21%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("11%"),
top: hp("5%"),
justifyContent: "flex-start"
},
Text_200_927: {
color: "rgba(0, 0, 0, 1)",
fontSize: 9.389691352844238,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_928: {
width: wp("3%"),
height: hp("2%"),
top: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("50%")
},
ImageBackground_200_930: {
width: wp("4%"),
height: hp("2%"),
top: hp("15%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%")
},
View_200_937: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("11%"),
minHeight: hp("11%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("17%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_938: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("11%"),
minHeight: hp("11%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_939: {
width: wp("30%"),
minWidth: wp("30%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("25%"),
top: hp("3%"),
justifyContent: "flex-start"
},
Text_200_939: {
color: "rgba(48, 157, 143, 1)",
fontSize: 10.490567207336426,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_940: {
width: wp("38%"),
minWidth: wp("38%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("26%"),
top: hp("6%"),
justifyContent: "flex-start"
},
Text_200_940: {
color: "rgba(0, 0, 0, 1)",
fontSize: 10.490567207336426,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_941: {
width: wp("14%"),
minWidth: wp("14%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%"),
top: hp("2%")
},
ImageBackground_200_942: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%"),
top: hp("3%")
},
View_200_943: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("30%"),
minHeight: hp("30%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("84%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_944: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("30%"),
minHeight: hp("30%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_945: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(48, 157, 143, 1)",
borderTopLeftRadius: 10.065255165100098,
borderTopRightRadius: 10.065255165100098,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_200_946: {
width: wp("25%"),
minWidth: wp("25%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("10%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_946: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12.097882270812988,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_947: {
width: wp("39%"),
minWidth: wp("39%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("12%"),
top: hp("8%"),
justifyContent: "flex-start"
},
Text_200_947: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.548941135406494,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_948: {
width: wp("21%"),
minWidth: wp("21%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("62%"),
top: hp("8%"),
justifyContent: "flex-start"
},
Text_200_948: {
color: "rgba(48, 157, 143, 1)",
fontSize: 5.548941135406494,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_949: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("11%")
},
ImageBackground_200_950: {
width: wp("2%"),
height: hp("1%"),
top: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%")
},
ImageBackground_200_951: {
width: wp("3%"),
height: hp("2%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("5%")
},
View_200_954: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("30%"),
minHeight: hp("30%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("118%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_955: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("30%"),
minHeight: hp("30%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_956: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("5%"),
minHeight: hp("5%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(48, 157, 143, 1)",
borderTopLeftRadius: 9.988943099975586,
borderTopRightRadius: 9.988943099975586,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_200_957: {
width: wp("22%"),
minWidth: wp("22%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("10%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_957: {
color: "rgba(255, 255, 255, 1)",
fontSize: 11.983414649963379,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_958: {
width: wp("32%"),
minWidth: wp("32%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("14%"),
top: hp("7%"),
justifyContent: "flex-start"
},
Text_200_958: {
color: "rgba(0, 0, 0, 1)",
fontSize: 10.277118682861328,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_959: {
width: wp("5%"),
minWidth: wp("5%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("77%"),
top: hp("7%"),
justifyContent: "flex-start"
},
Text_200_959: {
color: "rgba(48, 157, 143, 1)",
fontSize: 10.277118682861328,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_960: {
width: wp("27%"),
minWidth: wp("27%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("14%"),
top: hp("18%"),
justifyContent: "flex-start"
},
Text_200_960: {
color: "rgba(0, 0, 0, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_961: {
width: wp("20%"),
minWidth: wp("20%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("14%"),
top: hp("25%"),
justifyContent: "flex-start"
},
Text_200_961: {
color: "rgba(0, 0, 0, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_962: {
width: wp("21%"),
minWidth: wp("21%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("61%"),
top: hp("18%"),
justifyContent: "flex-start"
},
Text_200_962: {
color: "rgba(48, 157, 143, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_963: {
width: wp("8%"),
minWidth: wp("8%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("73%"),
top: hp("25%"),
justifyContent: "flex-start"
},
Text_200_963: {
color: "rgba(48, 157, 143, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_964: {
width: wp("12%"),
minWidth: wp("12%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("14%"),
top: hp("13%"),
justifyContent: "flex-start"
},
Text_200_964: {
color: "rgba(0, 0, 0, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_965: {
width: wp("9%"),
minWidth: wp("9%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("73%"),
top: hp("14%"),
justifyContent: "flex-start"
},
Text_200_965: {
color: "rgba(48, 157, 143, 1)",
fontSize: 10.26876163482666,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_966: {
width: wp("4%"),
height: hp("2%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%")
},
ImageBackground_200_967: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("11%")
},
ImageBackground_200_968: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("17%")
},
ImageBackground_200_969: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("23%")
},
ImageBackground_200_970: {
width: wp("4%"),
height: hp("2%"),
top: hp("19%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%")
},
ImageBackground_200_973: {
width: wp("3%"),
height: hp("2%"),
top: hp("13%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%")
},
ImageBackground_200_976: {
width: wp("3%"),
height: hp("2%"),
top: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%")
},
ImageBackground_200_977: {
width: wp("5%"),
height: hp("2%"),
top: hp("25%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%")
},
ImageBackground_200_981: {
width: wp("12%"),
height: hp("1%"),
top: hp("13%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("70%")
},
View_200_987: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("28%"),
minHeight: hp("28%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%"),
top: hp("152%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_988: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("26%"),
minHeight: hp("26%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_989: {
width: wp("85%"),
minWidth: wp("85%"),
height: hp("5%"),
minHeight: hp("5%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(48, 157, 143, 1)",
borderTopLeftRadius: 4.820018291473389,
borderTopRightRadius: 4.820018291473389,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_200_990: {
width: wp("37%"),
minWidth: wp("37%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("10%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_990: {
color: "rgba(255, 255, 255, 1)",
fontSize: 11.979952812194824,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_991: {
width: wp("78%"),
minWidth: wp("78%"),
height: hp("13%"),
minHeight: hp("13%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("12%"),
borderColor: "rgba(189, 189, 189, 1)",
borderWidth: 0.2410009205341339
},
View_200_992: {
width: wp("20%"),
minWidth: wp("20%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("14%"),
justifyContent: "flex-start"
},
Text_200_992: {
color: "rgba(0, 0, 0, 1)",
fontSize: 6.230027675628662,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_993: {
width: wp("13%"),
minWidth: wp("13%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("20%"),
justifyContent: "flex-start"
},
Text_200_993: {
color: "rgba(0, 0, 0, 1)",
fontSize: 6.230027675628662,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_994: {
width: wp("17%"),
minWidth: wp("17%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("34%"),
top: hp("14%"),
justifyContent: "flex-start"
},
Text_200_994: {
color: "rgba(0, 0, 0, 1)",
fontSize: 6.230027675628662,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_995: {
width: wp("24%"),
minWidth: wp("24%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("34%"),
top: hp("19%"),
justifyContent: "flex-start"
},
Text_200_995: {
color: "rgba(0, 0, 0, 1)",
fontSize: 6.230027675628662,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_996: {
width: wp("78%"),
minWidth: wp("78%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("18%")
},
View_200_997: {
width: wp("76%"),
minWidth: wp("76%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%"),
top: hp("9%"),
backgroundColor: "rgba(255, 255, 255, 1)",
borderColor: "rgba(0, 0, 0, 1)",
borderWidth: 0.2410009205341339
},
View_200_998: {
width: wp("78%"),
minWidth: wp("78%"),
height: hp("3%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("8%"),
backgroundColor: "rgba(255, 255, 255, 1)",
borderColor: "rgba(196, 196, 196, 1)",
borderWidth: 0.2410009205341339
},
View_200_999: {
width: wp("16%"),
minWidth: wp("16%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("5%"),
top: hp("8%"),
justifyContent: "flex-start"
},
Text_200_999: {
color: "rgba(48, 157, 143, 1)",
fontSize: 6.230027675628662,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1000: {
width: wp("10%"),
minWidth: wp("10%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("34%"),
top: hp("8%"),
justifyContent: "flex-start"
},
Text_200_1000: {
color: "rgba(48, 157, 143, 1)",
fontSize: 6.230027675628662,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1001: {
width: wp("11%"),
minWidth: wp("11%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("66%"),
top: hp("8%"),
justifyContent: "flex-start"
},
Text_200_1001: {
color: "rgba(48, 157, 143, 1)",
fontSize: 6.230027675628662,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_1002: {
width: wp("12%"),
height: hp("1%"),
top: hp("20%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("66%")
},
ImageBackground_200_1008: {
width: wp("12%"),
height: hp("1%"),
top: hp("13%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("66%")
},
View_200_1014: {
width: wp("7%"),
minWidth: wp("7%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("67%"),
top: hp("15%"),
justifyContent: "flex-start"
},
Text_200_1014: {
color: "rgba(48, 157, 143, 1)",
fontSize: 3.8200182914733887,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1015: {
width: wp("7%"),
minWidth: wp("7%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("67%"),
top: hp("22%"),
justifyContent: "flex-start"
},
Text_200_1015: {
color: "rgba(48, 157, 143, 1)",
fontSize: 3.8200182914733887,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1016: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("2%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("37%"),
top: hp("26%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_1017: {
width: wp("6%"),
minWidth: wp("6%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_1017: {
color: "rgba(255, 255, 255, 1)",
fontSize: 4.276017189025879,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_1018: {
width: wp("4%"),
height: hp("2%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%")
},
View_200_1022: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("27%"),
minHeight: hp("27%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("53%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_200_1023: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("27%"),
minHeight: hp("27%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_200_1024: {
width: wp("86%"),
minWidth: wp("86%"),
height: hp("5%"),
minHeight: hp("5%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(48, 157, 143, 1)",
borderTopLeftRadius: 4.851893424987793,
borderTopRightRadius: 4.851893424987793,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_200_1025: {
width: wp("39%"),
minWidth: wp("39%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("10%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_200_1025: {
color: "rgba(255, 255, 255, 1)",
fontSize: 11.960002899169922,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1026: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("2%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("37%"),
top: hp("25%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_1027: {
width: wp("6%"),
minWidth: wp("6%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_1027: {
color: "rgba(255, 255, 255, 1)",
fontSize: 4.310905933380127,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1028: {
width: wp("77%"),
minWidth: wp("77%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%"),
top: hp("8%"),
backgroundColor: "rgba(255, 255, 255, 1)",
borderColor: "rgba(0, 0, 0, 1)",
borderWidth: 0.2425946593284607
},
View_200_1029: {
width: wp("79%"),
minWidth: wp("79%"),
height: hp("3%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("6%"),
backgroundColor: "rgba(255, 255, 255, 1)",
borderColor: "rgba(196, 196, 196, 1)",
borderWidth: 0.2425946593284607
},
View_200_1030: {
width: wp("79%"),
minWidth: wp("79%"),
height: hp("13%"),
minHeight: hp("13%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("10%"),
borderColor: "rgba(189, 189, 189, 1)",
borderWidth: 0.2425946593284607
},
View_200_1031: {
width: wp("5%"),
minWidth: wp("5%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("41%"),
top: hp("7%"),
justifyContent: "flex-start"
},
Text_200_1031: {
color: "rgba(48, 157, 143, 1)",
fontSize: 5.981335163116455,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1032: {
width: wp("12%"),
minWidth: wp("12%"),
minHeight: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("41%"),
top: hp("11%"),
justifyContent: "flex-start"
},
Text_200_1032: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1033: {
width: wp("10%"),
minWidth: wp("10%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("41%"),
top: hp("15%"),
justifyContent: "flex-start"
},
Text_200_1033: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1034: {
width: wp("10%"),
minWidth: wp("10%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("41%"),
top: hp("20%"),
justifyContent: "flex-start"
},
Text_200_1034: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1035: {
width: wp("16%"),
minWidth: wp("16%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%"),
top: hp("7%"),
justifyContent: "flex-start"
},
Text_200_1035: {
color: "rgba(48, 157, 143, 1)",
fontSize: 5.981335163116455,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1036: {
width: wp("17%"),
minWidth: wp("17%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%"),
top: hp("11%"),
justifyContent: "flex-start"
},
Text_200_1036: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1037: {
width: wp("14%"),
minWidth: wp("14%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%"),
top: hp("15%"),
justifyContent: "flex-start"
},
Text_200_1037: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1038: {
width: wp("14%"),
minWidth: wp("14%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("9%"),
top: hp("20%"),
justifyContent: "flex-start"
},
Text_200_1038: {
color: "rgba(0, 0, 0, 1)",
fontSize: 5.064866065979004,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1039: {
width: wp("5%"),
minWidth: wp("5%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("72%"),
top: hp("12%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_1040: {
width: wp("2%"),
minWidth: wp("2%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("1%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_1040: {
color: "rgba(255, 255, 255, 1)",
fontSize: 2.3014702796936035,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1041: {
width: wp("5%"),
minWidth: wp("5%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("72%"),
top: hp("16%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_1042: {
width: wp("2%"),
minWidth: wp("2%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("1%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_1042: {
color: "rgba(255, 255, 255, 1)",
fontSize: 2.3014702796936035,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1043: {
width: wp("5%"),
minWidth: wp("5%"),
height: hp("1%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("72%"),
top: hp("20%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_200_1044: {
width: wp("2%"),
minWidth: wp("2%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("1%"),
top: hp("0%"),
justifyContent: "flex-start"
},
Text_200_1044: {
color: "rgba(255, 255, 255, 1)",
fontSize: 2.3014702796936035,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_200_1045: {
width: wp("6%"),
minWidth: wp("6%"),
minHeight: hp("1%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("72%"),
top: hp("7%"),
justifyContent: "flex-start"
},
Text_200_1045: {
color: "rgba(48, 157, 143, 1)",
fontSize: 5.981335163116455,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_200_1046: {
width: wp("79%"),
minWidth: wp("79%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("15%")
},
ImageBackground_200_1047: {
width: wp("79%"),
minWidth: wp("79%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%"),
top: hp("19%")
},
ImageBackground_200_1048: {
width: wp("5%"),
height: hp("2%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%")
}
})
const mapStateToProps = state => {
return {}
}
const mapDispatchToProps = () => {
return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(Blank)
|
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CorrectionInvoiceReversal = void 0;
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
var CorrectionInvoiceReversalRequestBuilder_1 = require("./CorrectionInvoiceReversalRequestBuilder");
var DocumentApprovalRequest_1 = require("./DocumentApprovalRequest");
var DocumentLine_1 = require("./DocumentLine");
var DocumentAdditionalExpense_1 = require("./DocumentAdditionalExpense");
var WithholdingTaxDataWtx_1 = require("./WithholdingTaxDataWtx");
var WithholdingTaxData_1 = require("./WithholdingTaxData");
var DocumentPackage_1 = require("./DocumentPackage");
var DocumentSpecialLine_1 = require("./DocumentSpecialLine");
var DocumentInstallment_1 = require("./DocumentInstallment");
var DownPaymentToDraw_1 = require("./DownPaymentToDraw");
var TaxExtension_1 = require("./TaxExtension");
var AddressExtension_1 = require("./AddressExtension");
var core_1 = require("@sap-cloud-sdk/core");
/**
* This class represents the entity "CorrectionInvoiceReversal" of service "SAPB1".
*/
var CorrectionInvoiceReversal = /** @class */ (function (_super) {
__extends(CorrectionInvoiceReversal, _super);
function CorrectionInvoiceReversal() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Returns an entity builder to construct instances of `CorrectionInvoiceReversal`.
* @returns A builder that constructs instances of entity type `CorrectionInvoiceReversal`.
*/
CorrectionInvoiceReversal.builder = function () {
return core_1.EntityV4.entityBuilder(CorrectionInvoiceReversal);
};
/**
* Returns a request builder to construct requests for operations on the `CorrectionInvoiceReversal` entity type.
* @returns A `CorrectionInvoiceReversal` request builder.
*/
CorrectionInvoiceReversal.requestBuilder = function () {
return new CorrectionInvoiceReversalRequestBuilder_1.CorrectionInvoiceReversalRequestBuilder();
};
/**
* Returns a selectable object that allows the selection of custom field in a get request for the entity `CorrectionInvoiceReversal`.
* @param fieldName Name of the custom field to select
* @returns A builder that constructs instances of entity type `CorrectionInvoiceReversal`.
*/
CorrectionInvoiceReversal.customField = function (fieldName) {
return core_1.EntityV4.customFieldSelector(fieldName, CorrectionInvoiceReversal);
};
/**
* Overwrites the default toJSON method so that all instance variables as well as all custom fields of the entity are returned.
* @returns An object containing all instance variables + custom fields.
*/
CorrectionInvoiceReversal.prototype.toJSON = function () {
return __assign(__assign({}, this), this._customFields);
};
/**
* Technical entity name for CorrectionInvoiceReversal.
*/
CorrectionInvoiceReversal._entityName = 'CorrectionInvoiceReversal';
/**
* Default url path for the according service.
*/
CorrectionInvoiceReversal._defaultServicePath = '/b1s/v2/';
return CorrectionInvoiceReversal;
}(core_1.EntityV4));
exports.CorrectionInvoiceReversal = CorrectionInvoiceReversal;
var BusinessPartners_1 = require("./BusinessPartners");
var Currencies_1 = require("./Currencies");
var PaymentTermsTypes_1 = require("./PaymentTermsTypes");
var SalesPersons_1 = require("./SalesPersons");
var ShippingTypes_1 = require("./ShippingTypes");
var FactoringIndicators_1 = require("./FactoringIndicators");
var JournalEntries_1 = require("./JournalEntries");
var Forms1099_1 = require("./Forms1099");
var WizardPaymentMethods_1 = require("./WizardPaymentMethods");
var PaymentBlocks_1 = require("./PaymentBlocks");
var Projects_1 = require("./Projects");
var EmployeesInfo_1 = require("./EmployeesInfo");
var Countries_1 = require("./Countries");
var BusinessPlaces_1 = require("./BusinessPlaces");
var UserLanguages_1 = require("./UserLanguages");
var NfModels_1 = require("./NfModels");
var ChartOfAccounts_1 = require("./ChartOfAccounts");
var TaxWebSites_1 = require("./TaxWebSites");
var Branches_1 = require("./Branches");
var Departments_1 = require("./Departments");
var PosDailySummary_1 = require("./PosDailySummary");
(function (CorrectionInvoiceReversal) {
/**
* Static representation of the [[docEntry]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_ENTRY = new core_1.NumberField('DocEntry', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[docNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_NUM = new core_1.NumberField('DocNum', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[docType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_TYPE = new core_1.EnumField('DocType', CorrectionInvoiceReversal);
/**
* Static representation of the [[handWritten]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.HAND_WRITTEN = new core_1.EnumField('HandWritten', CorrectionInvoiceReversal);
/**
* Static representation of the [[printed]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PRINTED = new core_1.EnumField('Printed', CorrectionInvoiceReversal);
/**
* Static representation of the [[docDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_DATE = new core_1.DateField('DocDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[docDueDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_DUE_DATE = new core_1.DateField('DocDueDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[cardCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CARD_CODE = new core_1.StringField('CardCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[cardName]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CARD_NAME = new core_1.StringField('CardName', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[address]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ADDRESS = new core_1.StringField('Address', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[numAtCard]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NUM_AT_CARD = new core_1.StringField('NumAtCard', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[docTotal]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_TOTAL = new core_1.NumberField('DocTotal', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[attachmentEntry]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ATTACHMENT_ENTRY = new core_1.NumberField('AttachmentEntry', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[docCurrency]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_CURRENCY = new core_1.StringField('DocCurrency', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[docRate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_RATE = new core_1.NumberField('DocRate', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[reference1]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REFERENCE_1 = new core_1.StringField('Reference1', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[reference2]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REFERENCE_2 = new core_1.StringField('Reference2', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[comments]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.COMMENTS = new core_1.StringField('Comments', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[journalMemo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.JOURNAL_MEMO = new core_1.StringField('JournalMemo', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[paymentGroupCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_GROUP_CODE = new core_1.NumberField('PaymentGroupCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[docTime]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_TIME = new core_1.TimeField('DocTime', CorrectionInvoiceReversal, 'Edm.TimeOfDay');
/**
* Static representation of the [[salesPersonCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SALES_PERSON_CODE = new core_1.NumberField('SalesPersonCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[transportationCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TRANSPORTATION_CODE = new core_1.NumberField('TransportationCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[confirmed]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CONFIRMED = new core_1.EnumField('Confirmed', CorrectionInvoiceReversal);
/**
* Static representation of the [[importFileNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.IMPORT_FILE_NUM = new core_1.NumberField('ImportFileNum', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[summeryType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SUMMERY_TYPE = new core_1.EnumField('SummeryType', CorrectionInvoiceReversal);
/**
* Static representation of the [[contactPersonCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CONTACT_PERSON_CODE = new core_1.NumberField('ContactPersonCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[showScn]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SHOW_SCN = new core_1.EnumField('ShowSCN', CorrectionInvoiceReversal);
/**
* Static representation of the [[series]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SERIES = new core_1.NumberField('Series', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[taxDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_DATE = new core_1.DateField('TaxDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[partialSupply]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PARTIAL_SUPPLY = new core_1.EnumField('PartialSupply', CorrectionInvoiceReversal);
/**
* Static representation of the [[docObjectCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_OBJECT_CODE = new core_1.EnumField('DocObjectCode', CorrectionInvoiceReversal);
/**
* Static representation of the [[shipToCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SHIP_TO_CODE = new core_1.StringField('ShipToCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[indicator]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.INDICATOR = new core_1.StringField('Indicator', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[federalTaxId]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FEDERAL_TAX_ID = new core_1.StringField('FederalTaxID', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[discountPercent]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DISCOUNT_PERCENT = new core_1.NumberField('DiscountPercent', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[paymentReference]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_REFERENCE = new core_1.StringField('PaymentReference', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[creationDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CREATION_DATE = new core_1.DateField('CreationDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[updateDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.UPDATE_DATE = new core_1.DateField('UpdateDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[financialPeriod]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FINANCIAL_PERIOD = new core_1.NumberField('FinancialPeriod', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[transNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TRANS_NUM = new core_1.NumberField('TransNum', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[vatSum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_SUM = new core_1.NumberField('VatSum', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[vatSumSys]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_SUM_SYS = new core_1.NumberField('VatSumSys', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[vatSumFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_SUM_FC = new core_1.NumberField('VatSumFc', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[netProcedure]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NET_PROCEDURE = new core_1.EnumField('NetProcedure', CorrectionInvoiceReversal);
/**
* Static representation of the [[docTotalFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_TOTAL_FC = new core_1.NumberField('DocTotalFc', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[docTotalSys]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOC_TOTAL_SYS = new core_1.NumberField('DocTotalSys', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[form1099]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FORM_1099 = new core_1.NumberField('Form1099', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[box1099]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BOX_1099 = new core_1.StringField('Box1099', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[revisionPo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REVISION_PO = new core_1.EnumField('RevisionPo', CorrectionInvoiceReversal);
/**
* Static representation of the [[requriedDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQURIED_DATE = new core_1.DateField('RequriedDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[cancelDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CANCEL_DATE = new core_1.DateField('CancelDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[blockDunning]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BLOCK_DUNNING = new core_1.EnumField('BlockDunning', CorrectionInvoiceReversal);
/**
* Static representation of the [[submitted]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SUBMITTED = new core_1.EnumField('Submitted', CorrectionInvoiceReversal);
/**
* Static representation of the [[segment]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SEGMENT = new core_1.NumberField('Segment', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[pickStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PICK_STATUS = new core_1.EnumField('PickStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[pick]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PICK = new core_1.EnumField('Pick', CorrectionInvoiceReversal);
/**
* Static representation of the [[paymentMethod]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_METHOD = new core_1.StringField('PaymentMethod', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[paymentBlock]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_BLOCK = new core_1.EnumField('PaymentBlock', CorrectionInvoiceReversal);
/**
* Static representation of the [[paymentBlockEntry]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_BLOCK_ENTRY = new core_1.NumberField('PaymentBlockEntry', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[centralBankIndicator]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CENTRAL_BANK_INDICATOR = new core_1.StringField('CentralBankIndicator', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[maximumCashDiscount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.MAXIMUM_CASH_DISCOUNT = new core_1.EnumField('MaximumCashDiscount', CorrectionInvoiceReversal);
/**
* Static representation of the [[reserve]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RESERVE = new core_1.EnumField('Reserve', CorrectionInvoiceReversal);
/**
* Static representation of the [[project]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PROJECT = new core_1.StringField('Project', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[exemptionValidityDateFrom]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXEMPTION_VALIDITY_DATE_FROM = new core_1.DateField('ExemptionValidityDateFrom', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[exemptionValidityDateTo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXEMPTION_VALIDITY_DATE_TO = new core_1.DateField('ExemptionValidityDateTo', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[wareHouseUpdateType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WARE_HOUSE_UPDATE_TYPE = new core_1.EnumField('WareHouseUpdateType', CorrectionInvoiceReversal);
/**
* Static representation of the [[rounding]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ROUNDING = new core_1.EnumField('Rounding', CorrectionInvoiceReversal);
/**
* Static representation of the [[externalCorrectedDocNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXTERNAL_CORRECTED_DOC_NUM = new core_1.StringField('ExternalCorrectedDocNum', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[internalCorrectedDocNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.INTERNAL_CORRECTED_DOC_NUM = new core_1.NumberField('InternalCorrectedDocNum', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[nextCorrectingDocument]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NEXT_CORRECTING_DOCUMENT = new core_1.NumberField('NextCorrectingDocument', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[deferredTax]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DEFERRED_TAX = new core_1.EnumField('DeferredTax', CorrectionInvoiceReversal);
/**
* Static representation of the [[taxExemptionLetterNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_EXEMPTION_LETTER_NUM = new core_1.StringField('TaxExemptionLetterNum', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[wtApplied]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_APPLIED = new core_1.NumberField('WTApplied', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtAppliedFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_APPLIED_FC = new core_1.NumberField('WTAppliedFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[billOfExchangeReserved]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BILL_OF_EXCHANGE_RESERVED = new core_1.EnumField('BillOfExchangeReserved', CorrectionInvoiceReversal);
/**
* Static representation of the [[agentCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.AGENT_CODE = new core_1.StringField('AgentCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[wtAppliedSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_APPLIED_SC = new core_1.NumberField('WTAppliedSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[totalEqualizationTax]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX = new core_1.NumberField('TotalEqualizationTax', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[totalEqualizationTaxFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX_FC = new core_1.NumberField('TotalEqualizationTaxFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[totalEqualizationTaxSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX_SC = new core_1.NumberField('TotalEqualizationTaxSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[numberOfInstallments]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NUMBER_OF_INSTALLMENTS = new core_1.NumberField('NumberOfInstallments', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[applyTaxOnFirstInstallment]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.APPLY_TAX_ON_FIRST_INSTALLMENT = new core_1.EnumField('ApplyTaxOnFirstInstallment', CorrectionInvoiceReversal);
/**
* Static representation of the [[wtNonSubjectAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT = new core_1.NumberField('WTNonSubjectAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtNonSubjectAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT_SC = new core_1.NumberField('WTNonSubjectAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtNonSubjectAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT_FC = new core_1.NumberField('WTNonSubjectAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtExemptedAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT = new core_1.NumberField('WTExemptedAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtExemptedAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT_SC = new core_1.NumberField('WTExemptedAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtExemptedAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT_FC = new core_1.NumberField('WTExemptedAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[baseAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BASE_AMOUNT = new core_1.NumberField('BaseAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[baseAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BASE_AMOUNT_SC = new core_1.NumberField('BaseAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[baseAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BASE_AMOUNT_FC = new core_1.NumberField('BaseAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_AMOUNT = new core_1.NumberField('WTAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_AMOUNT_SC = new core_1.NumberField('WTAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[wtAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WT_AMOUNT_FC = new core_1.NumberField('WTAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[vatDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_DATE = new core_1.DateField('VatDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[documentsOwner]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENTS_OWNER = new core_1.NumberField('DocumentsOwner', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[folioPrefixString]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FOLIO_PREFIX_STRING = new core_1.StringField('FolioPrefixString', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[folioNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FOLIO_NUMBER = new core_1.NumberField('FolioNumber', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[documentSubType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_SUB_TYPE = new core_1.EnumField('DocumentSubType', CorrectionInvoiceReversal);
/**
* Static representation of the [[bpChannelCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BP_CHANNEL_CODE = new core_1.StringField('BPChannelCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[bpChannelContact]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BP_CHANNEL_CONTACT = new core_1.NumberField('BPChannelContact', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[address2]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ADDRESS_2 = new core_1.StringField('Address2', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[documentStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_STATUS = new core_1.EnumField('DocumentStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[periodIndicator]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PERIOD_INDICATOR = new core_1.StringField('PeriodIndicator', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[payToCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAY_TO_CODE = new core_1.StringField('PayToCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[manualNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.MANUAL_NUMBER = new core_1.StringField('ManualNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[useShpdGoodsAct]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.USE_SHPD_GOODS_ACT = new core_1.EnumField('UseShpdGoodsAct', CorrectionInvoiceReversal);
/**
* Static representation of the [[isPayToBank]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.IS_PAY_TO_BANK = new core_1.EnumField('IsPayToBank', CorrectionInvoiceReversal);
/**
* Static representation of the [[payToBankCountry]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAY_TO_BANK_COUNTRY = new core_1.StringField('PayToBankCountry', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[payToBankCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAY_TO_BANK_CODE = new core_1.StringField('PayToBankCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[payToBankAccountNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAY_TO_BANK_ACCOUNT_NO = new core_1.StringField('PayToBankAccountNo', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[payToBankBranch]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAY_TO_BANK_BRANCH = new core_1.StringField('PayToBankBranch', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[bplIdAssignedToInvoice]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BPL_ID_ASSIGNED_TO_INVOICE = new core_1.NumberField('BPL_IDAssignedToInvoice', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[downPayment]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT = new core_1.NumberField('DownPayment', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[reserveInvoice]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RESERVE_INVOICE = new core_1.EnumField('ReserveInvoice', CorrectionInvoiceReversal);
/**
* Static representation of the [[languageCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.LANGUAGE_CODE = new core_1.NumberField('LanguageCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[trackingNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TRACKING_NUMBER = new core_1.StringField('TrackingNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[pickRemark]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PICK_REMARK = new core_1.StringField('PickRemark', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[closingDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CLOSING_DATE = new core_1.DateField('ClosingDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[sequenceCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SEQUENCE_CODE = new core_1.NumberField('SequenceCode', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[sequenceSerial]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SEQUENCE_SERIAL = new core_1.NumberField('SequenceSerial', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[seriesString]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SERIES_STRING = new core_1.StringField('SeriesString', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[subSeriesString]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SUB_SERIES_STRING = new core_1.StringField('SubSeriesString', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[sequenceModel]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SEQUENCE_MODEL = new core_1.StringField('SequenceModel', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[useCorrectionVatGroup]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.USE_CORRECTION_VAT_GROUP = new core_1.EnumField('UseCorrectionVATGroup', CorrectionInvoiceReversal);
/**
* Static representation of the [[totalDiscount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_DISCOUNT = new core_1.NumberField('TotalDiscount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[downPaymentAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT = new core_1.NumberField('DownPaymentAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[downPaymentPercentage]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_PERCENTAGE = new core_1.NumberField('DownPaymentPercentage', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[downPaymentType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_TYPE = new core_1.EnumField('DownPaymentType', CorrectionInvoiceReversal);
/**
* Static representation of the [[downPaymentAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT_SC = new core_1.NumberField('DownPaymentAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[downPaymentAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT_FC = new core_1.NumberField('DownPaymentAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[vatPercent]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_PERCENT = new core_1.NumberField('VatPercent', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[serviceGrossProfitPercent]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SERVICE_GROSS_PROFIT_PERCENT = new core_1.NumberField('ServiceGrossProfitPercent', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[openingRemarks]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.OPENING_REMARKS = new core_1.StringField('OpeningRemarks', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[closingRemarks]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CLOSING_REMARKS = new core_1.StringField('ClosingRemarks', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[roundingDiffAmount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT = new core_1.NumberField('RoundingDiffAmount', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[roundingDiffAmountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT_FC = new core_1.NumberField('RoundingDiffAmountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[roundingDiffAmountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT_SC = new core_1.NumberField('RoundingDiffAmountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[cancelled]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CANCELLED = new core_1.EnumField('Cancelled', CorrectionInvoiceReversal);
/**
* Static representation of the [[signatureInputMessage]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SIGNATURE_INPUT_MESSAGE = new core_1.StringField('SignatureInputMessage', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[signatureDigest]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SIGNATURE_DIGEST = new core_1.StringField('SignatureDigest', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[certificationNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CERTIFICATION_NUMBER = new core_1.StringField('CertificationNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[privateKeyVersion]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PRIVATE_KEY_VERSION = new core_1.NumberField('PrivateKeyVersion', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[controlAccount]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CONTROL_ACCOUNT = new core_1.StringField('ControlAccount', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[insuranceOperation347]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.INSURANCE_OPERATION_347 = new core_1.EnumField('InsuranceOperation347', CorrectionInvoiceReversal);
/**
* Static representation of the [[archiveNonremovableSalesQuotation]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ARCHIVE_NONREMOVABLE_SALES_QUOTATION = new core_1.EnumField('ArchiveNonremovableSalesQuotation', CorrectionInvoiceReversal);
/**
* Static representation of the [[gtsChecker]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GTS_CHECKER = new core_1.NumberField('GTSChecker', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[gtsPayee]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GTS_PAYEE = new core_1.NumberField('GTSPayee', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[extraMonth]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXTRA_MONTH = new core_1.NumberField('ExtraMonth', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[extraDays]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXTRA_DAYS = new core_1.NumberField('ExtraDays', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[cashDiscountDateOffset]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CASH_DISCOUNT_DATE_OFFSET = new core_1.NumberField('CashDiscountDateOffset', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[startFrom]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.START_FROM = new core_1.EnumField('StartFrom', CorrectionInvoiceReversal);
/**
* Static representation of the [[ntsApproved]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NTS_APPROVED = new core_1.EnumField('NTSApproved', CorrectionInvoiceReversal);
/**
* Static representation of the [[eTaxWebSite]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_TAX_WEB_SITE = new core_1.NumberField('ETaxWebSite', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[eTaxNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_TAX_NUMBER = new core_1.StringField('ETaxNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[ntsApprovedNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NTS_APPROVED_NUMBER = new core_1.StringField('NTSApprovedNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[eDocGenerationType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_GENERATION_TYPE = new core_1.EnumField('EDocGenerationType', CorrectionInvoiceReversal);
/**
* Static representation of the [[eDocSeries]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_SERIES = new core_1.NumberField('EDocSeries', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[eDocNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_NUM = new core_1.StringField('EDocNum', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[eDocExportFormat]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_EXPORT_FORMAT = new core_1.NumberField('EDocExportFormat', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[eDocStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_STATUS = new core_1.EnumField('EDocStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[eDocErrorCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_ERROR_CODE = new core_1.StringField('EDocErrorCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[eDocErrorMessage]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_DOC_ERROR_MESSAGE = new core_1.StringField('EDocErrorMessage', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[downPaymentStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_STATUS = new core_1.EnumField('DownPaymentStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[groupSeries]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GROUP_SERIES = new core_1.NumberField('GroupSeries', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[groupNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GROUP_NUMBER = new core_1.NumberField('GroupNumber', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[groupHandWritten]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GROUP_HAND_WRITTEN = new core_1.EnumField('GroupHandWritten', CorrectionInvoiceReversal);
/**
* Static representation of the [[reopenOriginalDocument]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REOPEN_ORIGINAL_DOCUMENT = new core_1.EnumField('ReopenOriginalDocument', CorrectionInvoiceReversal);
/**
* Static representation of the [[reopenManuallyClosedOrCanceledDocument]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REOPEN_MANUALLY_CLOSED_OR_CANCELED_DOCUMENT = new core_1.EnumField('ReopenManuallyClosedOrCanceledDocument', CorrectionInvoiceReversal);
/**
* Static representation of the [[createOnlineQuotation]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CREATE_ONLINE_QUOTATION = new core_1.EnumField('CreateOnlineQuotation', CorrectionInvoiceReversal);
/**
* Static representation of the [[posEquipmentNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_EQUIPMENT_NUMBER = new core_1.StringField('POSEquipmentNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[posManufacturerSerialNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_MANUFACTURER_SERIAL_NUMBER = new core_1.StringField('POSManufacturerSerialNumber', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[posCashierNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_CASHIER_NUMBER = new core_1.NumberField('POSCashierNumber', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[applyCurrentVatRatesForDownPaymentsToDraw]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.APPLY_CURRENT_VAT_RATES_FOR_DOWN_PAYMENTS_TO_DRAW = new core_1.EnumField('ApplyCurrentVATRatesForDownPaymentsToDraw', CorrectionInvoiceReversal);
/**
* Static representation of the [[closingOption]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CLOSING_OPTION = new core_1.EnumField('ClosingOption', CorrectionInvoiceReversal);
/**
* Static representation of the [[specifiedClosingDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SPECIFIED_CLOSING_DATE = new core_1.DateField('SpecifiedClosingDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[openForLandedCosts]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.OPEN_FOR_LANDED_COSTS = new core_1.EnumField('OpenForLandedCosts', CorrectionInvoiceReversal);
/**
* Static representation of the [[authorizationStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.AUTHORIZATION_STATUS = new core_1.EnumField('AuthorizationStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[totalDiscountFc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_DISCOUNT_FC = new core_1.NumberField('TotalDiscountFC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[totalDiscountSc]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TOTAL_DISCOUNT_SC = new core_1.NumberField('TotalDiscountSC', CorrectionInvoiceReversal, 'Edm.Double');
/**
* Static representation of the [[relevantToGts]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RELEVANT_TO_GTS = new core_1.EnumField('RelevantToGTS', CorrectionInvoiceReversal);
/**
* Static representation of the [[bplName]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BPL_NAME = new core_1.StringField('BPLName', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[vatRegNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VAT_REG_NUM = new core_1.StringField('VATRegNum', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[annualInvoiceDeclarationReference]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ANNUAL_INVOICE_DECLARATION_REFERENCE = new core_1.NumberField('AnnualInvoiceDeclarationReference', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[supplier]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SUPPLIER = new core_1.StringField('Supplier', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[releaser]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RELEASER = new core_1.NumberField('Releaser', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[receiver]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RECEIVER = new core_1.NumberField('Receiver', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[blanketAgreementNumber]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BLANKET_AGREEMENT_NUMBER = new core_1.NumberField('BlanketAgreementNumber', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[isAlteration]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.IS_ALTERATION = new core_1.EnumField('IsAlteration', CorrectionInvoiceReversal);
/**
* Static representation of the [[cancelStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CANCEL_STATUS = new core_1.EnumField('CancelStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[assetValueDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ASSET_VALUE_DATE = new core_1.DateField('AssetValueDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[requester]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQUESTER = new core_1.StringField('Requester', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[requesterName]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQUESTER_NAME = new core_1.StringField('RequesterName', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[requesterBranch]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQUESTER_BRANCH = new core_1.NumberField('RequesterBranch', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[requesterDepartment]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQUESTER_DEPARTMENT = new core_1.NumberField('RequesterDepartment', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[requesterEmail]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQUESTER_EMAIL = new core_1.StringField('RequesterEmail', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[sendNotification]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SEND_NOTIFICATION = new core_1.EnumField('SendNotification', CorrectionInvoiceReversal);
/**
* Static representation of the [[reqType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REQ_TYPE = new core_1.NumberField('ReqType', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[documentDelivery]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_DELIVERY = new core_1.EnumField('DocumentDelivery', CorrectionInvoiceReversal);
/**
* Static representation of the [[authorizationCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.AUTHORIZATION_CODE = new core_1.StringField('AuthorizationCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[startDeliveryDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.START_DELIVERY_DATE = new core_1.DateField('StartDeliveryDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[startDeliveryTime]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.START_DELIVERY_TIME = new core_1.TimeField('StartDeliveryTime', CorrectionInvoiceReversal, 'Edm.TimeOfDay');
/**
* Static representation of the [[endDeliveryDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.END_DELIVERY_DATE = new core_1.DateField('EndDeliveryDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[endDeliveryTime]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.END_DELIVERY_TIME = new core_1.TimeField('EndDeliveryTime', CorrectionInvoiceReversal, 'Edm.TimeOfDay');
/**
* Static representation of the [[vehiclePlate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.VEHICLE_PLATE = new core_1.StringField('VehiclePlate', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[atDocumentType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.AT_DOCUMENT_TYPE = new core_1.StringField('ATDocumentType', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[elecCommStatus]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ELEC_COMM_STATUS = new core_1.EnumField('ElecCommStatus', CorrectionInvoiceReversal);
/**
* Static representation of the [[elecCommMessage]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ELEC_COMM_MESSAGE = new core_1.StringField('ElecCommMessage', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[reuseDocumentNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REUSE_DOCUMENT_NUM = new core_1.EnumField('ReuseDocumentNum', CorrectionInvoiceReversal);
/**
* Static representation of the [[reuseNotaFiscalNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REUSE_NOTA_FISCAL_NUM = new core_1.EnumField('ReuseNotaFiscalNum', CorrectionInvoiceReversal);
/**
* Static representation of the [[printSepaDirect]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PRINT_SEPA_DIRECT = new core_1.EnumField('PrintSEPADirect', CorrectionInvoiceReversal);
/**
* Static representation of the [[fiscalDocNum]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FISCAL_DOC_NUM = new core_1.StringField('FiscalDocNum', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[posDailySummaryNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_DAILY_SUMMARY_NO = new core_1.NumberField('POSDailySummaryNo', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[posReceiptNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_RECEIPT_NO = new core_1.NumberField('POSReceiptNo', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[pointOfIssueCode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POINT_OF_ISSUE_CODE = new core_1.StringField('PointOfIssueCode', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[letter]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.LETTER = new core_1.EnumField('Letter', CorrectionInvoiceReversal);
/**
* Static representation of the [[folioNumberFrom]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FOLIO_NUMBER_FROM = new core_1.NumberField('FolioNumberFrom', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[folioNumberTo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FOLIO_NUMBER_TO = new core_1.NumberField('FolioNumberTo', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[interimType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.INTERIM_TYPE = new core_1.EnumField('InterimType', CorrectionInvoiceReversal);
/**
* Static representation of the [[relatedType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RELATED_TYPE = new core_1.NumberField('RelatedType', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[relatedEntry]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.RELATED_ENTRY = new core_1.NumberField('RelatedEntry', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[documentTaxId]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_TAX_ID = new core_1.StringField('DocumentTaxID', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[dateOfReportingControlStatementVat]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DATE_OF_REPORTING_CONTROL_STATEMENT_VAT = new core_1.DateField('DateOfReportingControlStatementVAT', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[reportingSectionControlStatementVat]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REPORTING_SECTION_CONTROL_STATEMENT_VAT = new core_1.StringField('ReportingSectionControlStatementVAT', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[excludeFromTaxReportControlStatementVat]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EXCLUDE_FROM_TAX_REPORT_CONTROL_STATEMENT_VAT = new core_1.EnumField('ExcludeFromTaxReportControlStatementVAT', CorrectionInvoiceReversal);
/**
* Static representation of the [[posCashRegister]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_CASH_REGISTER = new core_1.NumberField('POS_CashRegister', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[updateTime]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.UPDATE_TIME = new core_1.TimeField('UpdateTime', CorrectionInvoiceReversal, 'Edm.TimeOfDay');
/**
* Static representation of the [[priceMode]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PRICE_MODE = new core_1.EnumField('PriceMode', CorrectionInvoiceReversal);
/**
* Static representation of the [[downPaymentTrasactionId]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENT_TRASACTION_ID = new core_1.StringField('DownPaymentTrasactionID', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[revision]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.REVISION = new core_1.EnumField('Revision', CorrectionInvoiceReversal);
/**
* Static representation of the [[originalRefNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ORIGINAL_REF_NO = new core_1.StringField('OriginalRefNo', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[originalRefDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ORIGINAL_REF_DATE = new core_1.DateField('OriginalRefDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[gstTransactionType]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.GST_TRANSACTION_TYPE = new core_1.EnumField('GSTTransactionType', CorrectionInvoiceReversal);
/**
* Static representation of the [[originalCreditOrDebitNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ORIGINAL_CREDIT_OR_DEBIT_NO = new core_1.StringField('OriginalCreditOrDebitNo', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[originalCreditOrDebitDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ORIGINAL_CREDIT_OR_DEBIT_DATE = new core_1.DateField('OriginalCreditOrDebitDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[eCommerceOperator]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_COMMERCE_OPERATOR = new core_1.StringField('ECommerceOperator', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[eCommerceGstin]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.E_COMMERCE_GSTIN = new core_1.StringField('ECommerceGSTIN', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[taxInvoiceNo]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_INVOICE_NO = new core_1.StringField('TaxInvoiceNo', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[taxInvoiceDate]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_INVOICE_DATE = new core_1.DateField('TaxInvoiceDate', CorrectionInvoiceReversal, 'Edm.DateTimeOffset');
/**
* Static representation of the [[shipFrom]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SHIP_FROM = new core_1.StringField('ShipFrom', CorrectionInvoiceReversal, 'Edm.String');
/**
* Static representation of the [[commissionTrade]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.COMMISSION_TRADE = new core_1.EnumField('CommissionTrade', CorrectionInvoiceReversal);
/**
* Static representation of the [[commissionTradeReturn]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.COMMISSION_TRADE_RETURN = new core_1.EnumField('CommissionTradeReturn', CorrectionInvoiceReversal);
/**
* Static representation of the [[useBillToAddrToDetermineTax]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.USE_BILL_TO_ADDR_TO_DETERMINE_TAX = new core_1.EnumField('UseBillToAddrToDetermineTax', CorrectionInvoiceReversal);
/**
* Static representation of the [[issuingReason]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ISSUING_REASON = new core_1.NumberField('IssuingReason', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the [[documentApprovalRequests]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_APPROVAL_REQUESTS = new core_1.CollectionField('Document_ApprovalRequests', CorrectionInvoiceReversal, DocumentApprovalRequest_1.DocumentApprovalRequest);
/**
* Static representation of the [[documentLines]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_LINES = new core_1.CollectionField('DocumentLines', CorrectionInvoiceReversal, DocumentLine_1.DocumentLine);
/**
* Static representation of the [[documentAdditionalExpenses]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_ADDITIONAL_EXPENSES = new core_1.CollectionField('DocumentAdditionalExpenses', CorrectionInvoiceReversal, DocumentAdditionalExpense_1.DocumentAdditionalExpense);
/**
* Static representation of the [[withholdingTaxDataWtxCollection]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WITHHOLDING_TAX_DATA_WTX_COLLECTION = new core_1.CollectionField('WithholdingTaxDataWTXCollection', CorrectionInvoiceReversal, WithholdingTaxDataWtx_1.WithholdingTaxDataWtx);
/**
* Static representation of the [[withholdingTaxDataCollection]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WITHHOLDING_TAX_DATA_COLLECTION = new core_1.CollectionField('WithholdingTaxDataCollection', CorrectionInvoiceReversal, WithholdingTaxData_1.WithholdingTaxData);
/**
* Static representation of the [[documentPackages]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_PACKAGES = new core_1.CollectionField('DocumentPackages', CorrectionInvoiceReversal, DocumentPackage_1.DocumentPackage);
/**
* Static representation of the [[documentSpecialLines]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_SPECIAL_LINES = new core_1.CollectionField('DocumentSpecialLines', CorrectionInvoiceReversal, DocumentSpecialLine_1.DocumentSpecialLine);
/**
* Static representation of the [[documentInstallments]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOCUMENT_INSTALLMENTS = new core_1.CollectionField('DocumentInstallments', CorrectionInvoiceReversal, DocumentInstallment_1.DocumentInstallment);
/**
* Static representation of the [[downPaymentsToDraw]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DOWN_PAYMENTS_TO_DRAW = new core_1.CollectionField('DownPaymentsToDraw', CorrectionInvoiceReversal, DownPaymentToDraw_1.DownPaymentToDraw);
/**
* Static representation of the [[taxExtension]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_EXTENSION = new TaxExtension_1.TaxExtensionField('TaxExtension', CorrectionInvoiceReversal);
/**
* Static representation of the [[addressExtension]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.ADDRESS_EXTENSION = new AddressExtension_1.AddressExtensionField('AddressExtension', CorrectionInvoiceReversal);
/**
* Static representation of the [[soiWizardId]] property for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SOI_WIZARD_ID = new core_1.NumberField('SOIWizardId', CorrectionInvoiceReversal, 'Edm.Int32');
/**
* Static representation of the one-to-one navigation property [[businessPartner]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BUSINESS_PARTNER = new core_1.OneToOneLink('BusinessPartner', CorrectionInvoiceReversal, BusinessPartners_1.BusinessPartners);
/**
* Static representation of the one-to-one navigation property [[currency]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CURRENCY = new core_1.OneToOneLink('Currency', CorrectionInvoiceReversal, Currencies_1.Currencies);
/**
* Static representation of the one-to-one navigation property [[paymentTermsType]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_TERMS_TYPE = new core_1.OneToOneLink('PaymentTermsType', CorrectionInvoiceReversal, PaymentTermsTypes_1.PaymentTermsTypes);
/**
* Static representation of the one-to-one navigation property [[salesPerson]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SALES_PERSON = new core_1.OneToOneLink('SalesPerson', CorrectionInvoiceReversal, SalesPersons_1.SalesPersons);
/**
* Static representation of the one-to-one navigation property [[shippingType]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.SHIPPING_TYPE = new core_1.OneToOneLink('ShippingType', CorrectionInvoiceReversal, ShippingTypes_1.ShippingTypes);
/**
* Static representation of the one-to-one navigation property [[factoringIndicator]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FACTORING_INDICATOR = new core_1.OneToOneLink('FactoringIndicator', CorrectionInvoiceReversal, FactoringIndicators_1.FactoringIndicators);
/**
* Static representation of the one-to-one navigation property [[journalEntry]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.JOURNAL_ENTRY = new core_1.OneToOneLink('JournalEntry', CorrectionInvoiceReversal, JournalEntries_1.JournalEntries);
/**
* Static representation of the one-to-one navigation property [[forms1099]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.FORMS_1099 = new core_1.OneToOneLink('Forms1099', CorrectionInvoiceReversal, Forms1099_1.Forms1099);
/**
* Static representation of the one-to-one navigation property [[wizardPaymentMethod]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.WIZARD_PAYMENT_METHOD = new core_1.OneToOneLink('WizardPaymentMethod', CorrectionInvoiceReversal, WizardPaymentMethods_1.WizardPaymentMethods);
/**
* Static representation of the one-to-one navigation property [[paymentBlock2]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PAYMENT_BLOCK_2 = new core_1.OneToOneLink('PaymentBlock2', CorrectionInvoiceReversal, PaymentBlocks_1.PaymentBlocks);
/**
* Static representation of the one-to-one navigation property [[project2]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.PROJECT_2 = new core_1.OneToOneLink('Project2', CorrectionInvoiceReversal, Projects_1.Projects);
/**
* Static representation of the one-to-one navigation property [[employeeInfo]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.EMPLOYEE_INFO = new core_1.OneToOneLink('EmployeeInfo', CorrectionInvoiceReversal, EmployeesInfo_1.EmployeesInfo);
/**
* Static representation of the one-to-one navigation property [[country]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.COUNTRY = new core_1.OneToOneLink('Country', CorrectionInvoiceReversal, Countries_1.Countries);
/**
* Static representation of the one-to-one navigation property [[businessPlace]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BUSINESS_PLACE = new core_1.OneToOneLink('BusinessPlace', CorrectionInvoiceReversal, BusinessPlaces_1.BusinessPlaces);
/**
* Static representation of the one-to-one navigation property [[userLanguage]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.USER_LANGUAGE = new core_1.OneToOneLink('UserLanguage', CorrectionInvoiceReversal, UserLanguages_1.UserLanguages);
/**
* Static representation of the one-to-one navigation property [[nfModel]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.NF_MODEL = new core_1.OneToOneLink('NFModel', CorrectionInvoiceReversal, NfModels_1.NfModels);
/**
* Static representation of the one-to-one navigation property [[chartOfAccount]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.CHART_OF_ACCOUNT = new core_1.OneToOneLink('ChartOfAccount', CorrectionInvoiceReversal, ChartOfAccounts_1.ChartOfAccounts);
/**
* Static representation of the one-to-one navigation property [[taxWebSite]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.TAX_WEB_SITE = new core_1.OneToOneLink('TaxWebSite', CorrectionInvoiceReversal, TaxWebSites_1.TaxWebSites);
/**
* Static representation of the one-to-one navigation property [[branch]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.BRANCH = new core_1.OneToOneLink('Branch', CorrectionInvoiceReversal, Branches_1.Branches);
/**
* Static representation of the one-to-one navigation property [[department]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.DEPARTMENT = new core_1.OneToOneLink('Department', CorrectionInvoiceReversal, Departments_1.Departments);
/**
* Static representation of the one-to-one navigation property [[posDailySummary]] for query construction.
* Use to reference this property in query operations such as 'select' in the fluent request API.
*/
CorrectionInvoiceReversal.POS_DAILY_SUMMARY = new core_1.OneToOneLink('POSDailySummary', CorrectionInvoiceReversal, PosDailySummary_1.PosDailySummary);
/**
* All fields of the CorrectionInvoiceReversal entity.
*/
CorrectionInvoiceReversal._allFields = [
CorrectionInvoiceReversal.DOC_ENTRY,
CorrectionInvoiceReversal.DOC_NUM,
CorrectionInvoiceReversal.DOC_TYPE,
CorrectionInvoiceReversal.HAND_WRITTEN,
CorrectionInvoiceReversal.PRINTED,
CorrectionInvoiceReversal.DOC_DATE,
CorrectionInvoiceReversal.DOC_DUE_DATE,
CorrectionInvoiceReversal.CARD_CODE,
CorrectionInvoiceReversal.CARD_NAME,
CorrectionInvoiceReversal.ADDRESS,
CorrectionInvoiceReversal.NUM_AT_CARD,
CorrectionInvoiceReversal.DOC_TOTAL,
CorrectionInvoiceReversal.ATTACHMENT_ENTRY,
CorrectionInvoiceReversal.DOC_CURRENCY,
CorrectionInvoiceReversal.DOC_RATE,
CorrectionInvoiceReversal.REFERENCE_1,
CorrectionInvoiceReversal.REFERENCE_2,
CorrectionInvoiceReversal.COMMENTS,
CorrectionInvoiceReversal.JOURNAL_MEMO,
CorrectionInvoiceReversal.PAYMENT_GROUP_CODE,
CorrectionInvoiceReversal.DOC_TIME,
CorrectionInvoiceReversal.SALES_PERSON_CODE,
CorrectionInvoiceReversal.TRANSPORTATION_CODE,
CorrectionInvoiceReversal.CONFIRMED,
CorrectionInvoiceReversal.IMPORT_FILE_NUM,
CorrectionInvoiceReversal.SUMMERY_TYPE,
CorrectionInvoiceReversal.CONTACT_PERSON_CODE,
CorrectionInvoiceReversal.SHOW_SCN,
CorrectionInvoiceReversal.SERIES,
CorrectionInvoiceReversal.TAX_DATE,
CorrectionInvoiceReversal.PARTIAL_SUPPLY,
CorrectionInvoiceReversal.DOC_OBJECT_CODE,
CorrectionInvoiceReversal.SHIP_TO_CODE,
CorrectionInvoiceReversal.INDICATOR,
CorrectionInvoiceReversal.FEDERAL_TAX_ID,
CorrectionInvoiceReversal.DISCOUNT_PERCENT,
CorrectionInvoiceReversal.PAYMENT_REFERENCE,
CorrectionInvoiceReversal.CREATION_DATE,
CorrectionInvoiceReversal.UPDATE_DATE,
CorrectionInvoiceReversal.FINANCIAL_PERIOD,
CorrectionInvoiceReversal.TRANS_NUM,
CorrectionInvoiceReversal.VAT_SUM,
CorrectionInvoiceReversal.VAT_SUM_SYS,
CorrectionInvoiceReversal.VAT_SUM_FC,
CorrectionInvoiceReversal.NET_PROCEDURE,
CorrectionInvoiceReversal.DOC_TOTAL_FC,
CorrectionInvoiceReversal.DOC_TOTAL_SYS,
CorrectionInvoiceReversal.FORM_1099,
CorrectionInvoiceReversal.BOX_1099,
CorrectionInvoiceReversal.REVISION_PO,
CorrectionInvoiceReversal.REQURIED_DATE,
CorrectionInvoiceReversal.CANCEL_DATE,
CorrectionInvoiceReversal.BLOCK_DUNNING,
CorrectionInvoiceReversal.SUBMITTED,
CorrectionInvoiceReversal.SEGMENT,
CorrectionInvoiceReversal.PICK_STATUS,
CorrectionInvoiceReversal.PICK,
CorrectionInvoiceReversal.PAYMENT_METHOD,
CorrectionInvoiceReversal.PAYMENT_BLOCK,
CorrectionInvoiceReversal.PAYMENT_BLOCK_ENTRY,
CorrectionInvoiceReversal.CENTRAL_BANK_INDICATOR,
CorrectionInvoiceReversal.MAXIMUM_CASH_DISCOUNT,
CorrectionInvoiceReversal.RESERVE,
CorrectionInvoiceReversal.PROJECT,
CorrectionInvoiceReversal.EXEMPTION_VALIDITY_DATE_FROM,
CorrectionInvoiceReversal.EXEMPTION_VALIDITY_DATE_TO,
CorrectionInvoiceReversal.WARE_HOUSE_UPDATE_TYPE,
CorrectionInvoiceReversal.ROUNDING,
CorrectionInvoiceReversal.EXTERNAL_CORRECTED_DOC_NUM,
CorrectionInvoiceReversal.INTERNAL_CORRECTED_DOC_NUM,
CorrectionInvoiceReversal.NEXT_CORRECTING_DOCUMENT,
CorrectionInvoiceReversal.DEFERRED_TAX,
CorrectionInvoiceReversal.TAX_EXEMPTION_LETTER_NUM,
CorrectionInvoiceReversal.WT_APPLIED,
CorrectionInvoiceReversal.WT_APPLIED_FC,
CorrectionInvoiceReversal.BILL_OF_EXCHANGE_RESERVED,
CorrectionInvoiceReversal.AGENT_CODE,
CorrectionInvoiceReversal.WT_APPLIED_SC,
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX,
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX_FC,
CorrectionInvoiceReversal.TOTAL_EQUALIZATION_TAX_SC,
CorrectionInvoiceReversal.NUMBER_OF_INSTALLMENTS,
CorrectionInvoiceReversal.APPLY_TAX_ON_FIRST_INSTALLMENT,
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT,
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT_SC,
CorrectionInvoiceReversal.WT_NON_SUBJECT_AMOUNT_FC,
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT,
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT_SC,
CorrectionInvoiceReversal.WT_EXEMPTED_AMOUNT_FC,
CorrectionInvoiceReversal.BASE_AMOUNT,
CorrectionInvoiceReversal.BASE_AMOUNT_SC,
CorrectionInvoiceReversal.BASE_AMOUNT_FC,
CorrectionInvoiceReversal.WT_AMOUNT,
CorrectionInvoiceReversal.WT_AMOUNT_SC,
CorrectionInvoiceReversal.WT_AMOUNT_FC,
CorrectionInvoiceReversal.VAT_DATE,
CorrectionInvoiceReversal.DOCUMENTS_OWNER,
CorrectionInvoiceReversal.FOLIO_PREFIX_STRING,
CorrectionInvoiceReversal.FOLIO_NUMBER,
CorrectionInvoiceReversal.DOCUMENT_SUB_TYPE,
CorrectionInvoiceReversal.BP_CHANNEL_CODE,
CorrectionInvoiceReversal.BP_CHANNEL_CONTACT,
CorrectionInvoiceReversal.ADDRESS_2,
CorrectionInvoiceReversal.DOCUMENT_STATUS,
CorrectionInvoiceReversal.PERIOD_INDICATOR,
CorrectionInvoiceReversal.PAY_TO_CODE,
CorrectionInvoiceReversal.MANUAL_NUMBER,
CorrectionInvoiceReversal.USE_SHPD_GOODS_ACT,
CorrectionInvoiceReversal.IS_PAY_TO_BANK,
CorrectionInvoiceReversal.PAY_TO_BANK_COUNTRY,
CorrectionInvoiceReversal.PAY_TO_BANK_CODE,
CorrectionInvoiceReversal.PAY_TO_BANK_ACCOUNT_NO,
CorrectionInvoiceReversal.PAY_TO_BANK_BRANCH,
CorrectionInvoiceReversal.BPL_ID_ASSIGNED_TO_INVOICE,
CorrectionInvoiceReversal.DOWN_PAYMENT,
CorrectionInvoiceReversal.RESERVE_INVOICE,
CorrectionInvoiceReversal.LANGUAGE_CODE,
CorrectionInvoiceReversal.TRACKING_NUMBER,
CorrectionInvoiceReversal.PICK_REMARK,
CorrectionInvoiceReversal.CLOSING_DATE,
CorrectionInvoiceReversal.SEQUENCE_CODE,
CorrectionInvoiceReversal.SEQUENCE_SERIAL,
CorrectionInvoiceReversal.SERIES_STRING,
CorrectionInvoiceReversal.SUB_SERIES_STRING,
CorrectionInvoiceReversal.SEQUENCE_MODEL,
CorrectionInvoiceReversal.USE_CORRECTION_VAT_GROUP,
CorrectionInvoiceReversal.TOTAL_DISCOUNT,
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT,
CorrectionInvoiceReversal.DOWN_PAYMENT_PERCENTAGE,
CorrectionInvoiceReversal.DOWN_PAYMENT_TYPE,
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT_SC,
CorrectionInvoiceReversal.DOWN_PAYMENT_AMOUNT_FC,
CorrectionInvoiceReversal.VAT_PERCENT,
CorrectionInvoiceReversal.SERVICE_GROSS_PROFIT_PERCENT,
CorrectionInvoiceReversal.OPENING_REMARKS,
CorrectionInvoiceReversal.CLOSING_REMARKS,
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT,
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT_FC,
CorrectionInvoiceReversal.ROUNDING_DIFF_AMOUNT_SC,
CorrectionInvoiceReversal.CANCELLED,
CorrectionInvoiceReversal.SIGNATURE_INPUT_MESSAGE,
CorrectionInvoiceReversal.SIGNATURE_DIGEST,
CorrectionInvoiceReversal.CERTIFICATION_NUMBER,
CorrectionInvoiceReversal.PRIVATE_KEY_VERSION,
CorrectionInvoiceReversal.CONTROL_ACCOUNT,
CorrectionInvoiceReversal.INSURANCE_OPERATION_347,
CorrectionInvoiceReversal.ARCHIVE_NONREMOVABLE_SALES_QUOTATION,
CorrectionInvoiceReversal.GTS_CHECKER,
CorrectionInvoiceReversal.GTS_PAYEE,
CorrectionInvoiceReversal.EXTRA_MONTH,
CorrectionInvoiceReversal.EXTRA_DAYS,
CorrectionInvoiceReversal.CASH_DISCOUNT_DATE_OFFSET,
CorrectionInvoiceReversal.START_FROM,
CorrectionInvoiceReversal.NTS_APPROVED,
CorrectionInvoiceReversal.E_TAX_WEB_SITE,
CorrectionInvoiceReversal.E_TAX_NUMBER,
CorrectionInvoiceReversal.NTS_APPROVED_NUMBER,
CorrectionInvoiceReversal.E_DOC_GENERATION_TYPE,
CorrectionInvoiceReversal.E_DOC_SERIES,
CorrectionInvoiceReversal.E_DOC_NUM,
CorrectionInvoiceReversal.E_DOC_EXPORT_FORMAT,
CorrectionInvoiceReversal.E_DOC_STATUS,
CorrectionInvoiceReversal.E_DOC_ERROR_CODE,
CorrectionInvoiceReversal.E_DOC_ERROR_MESSAGE,
CorrectionInvoiceReversal.DOWN_PAYMENT_STATUS,
CorrectionInvoiceReversal.GROUP_SERIES,
CorrectionInvoiceReversal.GROUP_NUMBER,
CorrectionInvoiceReversal.GROUP_HAND_WRITTEN,
CorrectionInvoiceReversal.REOPEN_ORIGINAL_DOCUMENT,
CorrectionInvoiceReversal.REOPEN_MANUALLY_CLOSED_OR_CANCELED_DOCUMENT,
CorrectionInvoiceReversal.CREATE_ONLINE_QUOTATION,
CorrectionInvoiceReversal.POS_EQUIPMENT_NUMBER,
CorrectionInvoiceReversal.POS_MANUFACTURER_SERIAL_NUMBER,
CorrectionInvoiceReversal.POS_CASHIER_NUMBER,
CorrectionInvoiceReversal.APPLY_CURRENT_VAT_RATES_FOR_DOWN_PAYMENTS_TO_DRAW,
CorrectionInvoiceReversal.CLOSING_OPTION,
CorrectionInvoiceReversal.SPECIFIED_CLOSING_DATE,
CorrectionInvoiceReversal.OPEN_FOR_LANDED_COSTS,
CorrectionInvoiceReversal.AUTHORIZATION_STATUS,
CorrectionInvoiceReversal.TOTAL_DISCOUNT_FC,
CorrectionInvoiceReversal.TOTAL_DISCOUNT_SC,
CorrectionInvoiceReversal.RELEVANT_TO_GTS,
CorrectionInvoiceReversal.BPL_NAME,
CorrectionInvoiceReversal.VAT_REG_NUM,
CorrectionInvoiceReversal.ANNUAL_INVOICE_DECLARATION_REFERENCE,
CorrectionInvoiceReversal.SUPPLIER,
CorrectionInvoiceReversal.RELEASER,
CorrectionInvoiceReversal.RECEIVER,
CorrectionInvoiceReversal.BLANKET_AGREEMENT_NUMBER,
CorrectionInvoiceReversal.IS_ALTERATION,
CorrectionInvoiceReversal.CANCEL_STATUS,
CorrectionInvoiceReversal.ASSET_VALUE_DATE,
CorrectionInvoiceReversal.REQUESTER,
CorrectionInvoiceReversal.REQUESTER_NAME,
CorrectionInvoiceReversal.REQUESTER_BRANCH,
CorrectionInvoiceReversal.REQUESTER_DEPARTMENT,
CorrectionInvoiceReversal.REQUESTER_EMAIL,
CorrectionInvoiceReversal.SEND_NOTIFICATION,
CorrectionInvoiceReversal.REQ_TYPE,
CorrectionInvoiceReversal.DOCUMENT_DELIVERY,
CorrectionInvoiceReversal.AUTHORIZATION_CODE,
CorrectionInvoiceReversal.START_DELIVERY_DATE,
CorrectionInvoiceReversal.START_DELIVERY_TIME,
CorrectionInvoiceReversal.END_DELIVERY_DATE,
CorrectionInvoiceReversal.END_DELIVERY_TIME,
CorrectionInvoiceReversal.VEHICLE_PLATE,
CorrectionInvoiceReversal.AT_DOCUMENT_TYPE,
CorrectionInvoiceReversal.ELEC_COMM_STATUS,
CorrectionInvoiceReversal.ELEC_COMM_MESSAGE,
CorrectionInvoiceReversal.REUSE_DOCUMENT_NUM,
CorrectionInvoiceReversal.REUSE_NOTA_FISCAL_NUM,
CorrectionInvoiceReversal.PRINT_SEPA_DIRECT,
CorrectionInvoiceReversal.FISCAL_DOC_NUM,
CorrectionInvoiceReversal.POS_DAILY_SUMMARY_NO,
CorrectionInvoiceReversal.POS_RECEIPT_NO,
CorrectionInvoiceReversal.POINT_OF_ISSUE_CODE,
CorrectionInvoiceReversal.LETTER,
CorrectionInvoiceReversal.FOLIO_NUMBER_FROM,
CorrectionInvoiceReversal.FOLIO_NUMBER_TO,
CorrectionInvoiceReversal.INTERIM_TYPE,
CorrectionInvoiceReversal.RELATED_TYPE,
CorrectionInvoiceReversal.RELATED_ENTRY,
CorrectionInvoiceReversal.DOCUMENT_TAX_ID,
CorrectionInvoiceReversal.DATE_OF_REPORTING_CONTROL_STATEMENT_VAT,
CorrectionInvoiceReversal.REPORTING_SECTION_CONTROL_STATEMENT_VAT,
CorrectionInvoiceReversal.EXCLUDE_FROM_TAX_REPORT_CONTROL_STATEMENT_VAT,
CorrectionInvoiceReversal.POS_CASH_REGISTER,
CorrectionInvoiceReversal.UPDATE_TIME,
CorrectionInvoiceReversal.PRICE_MODE,
CorrectionInvoiceReversal.DOWN_PAYMENT_TRASACTION_ID,
CorrectionInvoiceReversal.REVISION,
CorrectionInvoiceReversal.ORIGINAL_REF_NO,
CorrectionInvoiceReversal.ORIGINAL_REF_DATE,
CorrectionInvoiceReversal.GST_TRANSACTION_TYPE,
CorrectionInvoiceReversal.ORIGINAL_CREDIT_OR_DEBIT_NO,
CorrectionInvoiceReversal.ORIGINAL_CREDIT_OR_DEBIT_DATE,
CorrectionInvoiceReversal.E_COMMERCE_OPERATOR,
CorrectionInvoiceReversal.E_COMMERCE_GSTIN,
CorrectionInvoiceReversal.TAX_INVOICE_NO,
CorrectionInvoiceReversal.TAX_INVOICE_DATE,
CorrectionInvoiceReversal.SHIP_FROM,
CorrectionInvoiceReversal.COMMISSION_TRADE,
CorrectionInvoiceReversal.COMMISSION_TRADE_RETURN,
CorrectionInvoiceReversal.USE_BILL_TO_ADDR_TO_DETERMINE_TAX,
CorrectionInvoiceReversal.ISSUING_REASON,
CorrectionInvoiceReversal.DOCUMENT_APPROVAL_REQUESTS,
CorrectionInvoiceReversal.DOCUMENT_LINES,
CorrectionInvoiceReversal.DOCUMENT_ADDITIONAL_EXPENSES,
CorrectionInvoiceReversal.WITHHOLDING_TAX_DATA_WTX_COLLECTION,
CorrectionInvoiceReversal.WITHHOLDING_TAX_DATA_COLLECTION,
CorrectionInvoiceReversal.DOCUMENT_PACKAGES,
CorrectionInvoiceReversal.DOCUMENT_SPECIAL_LINES,
CorrectionInvoiceReversal.DOCUMENT_INSTALLMENTS,
CorrectionInvoiceReversal.DOWN_PAYMENTS_TO_DRAW,
CorrectionInvoiceReversal.TAX_EXTENSION,
CorrectionInvoiceReversal.ADDRESS_EXTENSION,
CorrectionInvoiceReversal.SOI_WIZARD_ID,
CorrectionInvoiceReversal.BUSINESS_PARTNER,
CorrectionInvoiceReversal.CURRENCY,
CorrectionInvoiceReversal.PAYMENT_TERMS_TYPE,
CorrectionInvoiceReversal.SALES_PERSON,
CorrectionInvoiceReversal.SHIPPING_TYPE,
CorrectionInvoiceReversal.FACTORING_INDICATOR,
CorrectionInvoiceReversal.JOURNAL_ENTRY,
CorrectionInvoiceReversal.FORMS_1099,
CorrectionInvoiceReversal.WIZARD_PAYMENT_METHOD,
CorrectionInvoiceReversal.PAYMENT_BLOCK_2,
CorrectionInvoiceReversal.PROJECT_2,
CorrectionInvoiceReversal.EMPLOYEE_INFO,
CorrectionInvoiceReversal.COUNTRY,
CorrectionInvoiceReversal.BUSINESS_PLACE,
CorrectionInvoiceReversal.USER_LANGUAGE,
CorrectionInvoiceReversal.NF_MODEL,
CorrectionInvoiceReversal.CHART_OF_ACCOUNT,
CorrectionInvoiceReversal.TAX_WEB_SITE,
CorrectionInvoiceReversal.BRANCH,
CorrectionInvoiceReversal.DEPARTMENT,
CorrectionInvoiceReversal.POS_DAILY_SUMMARY
];
/**
* All fields selector.
*/
CorrectionInvoiceReversal.ALL_FIELDS = new core_1.AllFields('*', CorrectionInvoiceReversal);
/**
* All key fields of the CorrectionInvoiceReversal entity.
*/
CorrectionInvoiceReversal._keyFields = [CorrectionInvoiceReversal.DOC_ENTRY];
/**
* Mapping of all key field names to the respective static field property CorrectionInvoiceReversal.
*/
CorrectionInvoiceReversal._keys = CorrectionInvoiceReversal._keyFields.reduce(function (acc, field) {
acc[field._fieldName] = field;
return acc;
}, {});
})(CorrectionInvoiceReversal = exports.CorrectionInvoiceReversal || (exports.CorrectionInvoiceReversal = {}));
exports.CorrectionInvoiceReversal = CorrectionInvoiceReversal;
//# sourceMappingURL=CorrectionInvoiceReversal.js.map
|