text
stringlengths 2
99.9k
| meta
dict |
---|---|
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
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.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) {
*out = *in
in.ClientConfig.DeepCopyInto(&out.ClientConfig)
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]RuleWithOperations, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.FailurePolicy != nil {
in, out := &in.FailurePolicy, &out.FailurePolicy
*out = new(FailurePolicyType)
**out = **in
}
if in.MatchPolicy != nil {
in, out := &in.MatchPolicy, &out.MatchPolicy
*out = new(MatchPolicyType)
**out = **in
}
if in.NamespaceSelector != nil {
in, out := &in.NamespaceSelector, &out.NamespaceSelector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.ObjectSelector != nil {
in, out := &in.ObjectSelector, &out.ObjectSelector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.SideEffects != nil {
in, out := &in.SideEffects, &out.SideEffects
*out = new(SideEffectClass)
**out = **in
}
if in.TimeoutSeconds != nil {
in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
*out = new(int32)
**out = **in
}
if in.AdmissionReviewVersions != nil {
in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ReinvocationPolicy != nil {
in, out := &in.ReinvocationPolicy, &out.ReinvocationPolicy
*out = new(ReinvocationPolicyType)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhook.
func (in *MutatingWebhook) DeepCopy() *MutatingWebhook {
if in == nil {
return nil
}
out := new(MutatingWebhook)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MutatingWebhookConfiguration) DeepCopyInto(out *MutatingWebhookConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Webhooks != nil {
in, out := &in.Webhooks, &out.Webhooks
*out = make([]MutatingWebhook, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration.
func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration {
if in == nil {
return nil
}
out := new(MutatingWebhookConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]MutatingWebhookConfiguration, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList.
func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList {
if in == nil {
return nil
}
out := new(MutatingWebhookConfigurationList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Rule) DeepCopyInto(out *Rule) {
*out = *in
if in.APIGroups != nil {
in, out := &in.APIGroups, &out.APIGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIVersions != nil {
in, out := &in.APIVersions, &out.APIVersions
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Scope != nil {
in, out := &in.Scope, &out.Scope
*out = new(ScopeType)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (in *Rule) DeepCopy() *Rule {
if in == nil {
return nil
}
out := new(Rule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) {
*out = *in
if in.Operations != nil {
in, out := &in.Operations, &out.Operations
*out = make([]OperationType, len(*in))
copy(*out, *in)
}
in.Rule.DeepCopyInto(&out.Rule)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
func (in *RuleWithOperations) DeepCopy() *RuleWithOperations {
if in == nil {
return nil
}
out := new(RuleWithOperations)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceReference) DeepCopyInto(out *ServiceReference) {
*out = *in
if in.Path != nil {
in, out := &in.Path, &out.Path
*out = new(string)
**out = **in
}
if in.Port != nil {
in, out := &in.Port, &out.Port
*out = new(int32)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
func (in *ServiceReference) DeepCopy() *ServiceReference {
if in == nil {
return nil
}
out := new(ServiceReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValidatingWebhook) DeepCopyInto(out *ValidatingWebhook) {
*out = *in
in.ClientConfig.DeepCopyInto(&out.ClientConfig)
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]RuleWithOperations, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.FailurePolicy != nil {
in, out := &in.FailurePolicy, &out.FailurePolicy
*out = new(FailurePolicyType)
**out = **in
}
if in.MatchPolicy != nil {
in, out := &in.MatchPolicy, &out.MatchPolicy
*out = new(MatchPolicyType)
**out = **in
}
if in.NamespaceSelector != nil {
in, out := &in.NamespaceSelector, &out.NamespaceSelector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.ObjectSelector != nil {
in, out := &in.ObjectSelector, &out.ObjectSelector
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.SideEffects != nil {
in, out := &in.SideEffects, &out.SideEffects
*out = new(SideEffectClass)
**out = **in
}
if in.TimeoutSeconds != nil {
in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
*out = new(int32)
**out = **in
}
if in.AdmissionReviewVersions != nil {
in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhook.
func (in *ValidatingWebhook) DeepCopy() *ValidatingWebhook {
if in == nil {
return nil
}
out := new(ValidatingWebhook)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Webhooks != nil {
in, out := &in.Webhooks, &out.Webhooks
*out = make([]ValidatingWebhook, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration.
func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration {
if in == nil {
return nil
}
out := new(ValidatingWebhookConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ValidatingWebhookConfiguration, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList.
func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList {
if in == nil {
return nil
}
out := new(ValidatingWebhookConfigurationList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) {
*out = *in
if in.URL != nil {
in, out := &in.URL, &out.URL
*out = new(string)
**out = **in
}
if in.Service != nil {
in, out := &in.Service, &out.Service
*out = new(ServiceReference)
(*in).DeepCopyInto(*out)
}
if in.CABundle != nil {
in, out := &in.CABundle, &out.CABundle
*out = make([]byte, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig.
func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig {
if in == nil {
return nil
}
out := new(WebhookClientConfig)
in.DeepCopyInto(out)
return out
}
| {
"pile_set_name": "Github"
} |
-- Test a for-loop with inner state that is used as an expression.
def f() -> List
result = for i in [0 1 2]
state s = 0
s += i
s
return result
vm = make_vm(f)
result = vm.call
print('step1, result = ' result ', s = ' vm.get_state)
result = vm.call
print('step2, result = ' result ', s = ' vm.get_state)
| {
"pile_set_name": "Github"
} |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ImageViewDemo.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
| {
"pile_set_name": "Github"
} |
{
"id": "marpaia",
"username": "marpaia",
"comment": "Mike Arpaia",
"password": "$1$UBN5FRA6$LurZdnqoSDMjRZmrZ6PIE.",
"admin" : true,
"ssh_keys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmfxxhgRNngIfrhKQqTnOOdI+DpJlVDmpzpjZuNFvczIwtlzSxr0yKzV9nYTC86W7Q47TVH7x8USlnYQ3g7C2pM7+6W61T5kMCDJNq+vztn9BZIRLCArUENULeVXMXyBQV6RRXt2rmdmOIN81zd8Q0zdZHvG0ayaD0AyS0dviJJB/YcwAnvNxU0lxi8yTpS/Ew25G/ubEoLvtF1GveyzbkGxZcQm6YgMxxwqOrm7jSEd2lObQXZnqxj/dtP5uWNBi8/Z6Lz7kr0SYa462muWPRk1gNAu9ewg/X+3k4zKNP1sXk0yQMEVGngPv5qaUCyBJ3mf00wpaW/vijqwqUXcpH marpaia@etsy"
]
}
| {
"pile_set_name": "Github"
} |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/storagehelper.hxx>
#include <officecfg/Office/Common.hxx>
using namespace ::com::sun::star;
/// embeddedobj general tests.
class EmbeddedobjGeneralTest : public test::BootstrapFixture, public unotest::MacrosTest
{
private:
uno::Reference<lang::XComponent> mxComponent;
public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
};
void EmbeddedobjGeneralTest::setUp()
{
test::BootstrapFixture::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
}
void EmbeddedobjGeneralTest::tearDown()
{
if (mxComponent.is())
mxComponent->dispose();
test::BootstrapFixture::tearDown();
}
CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfig)
{
// Explicitly disable Word->Writer mapping for this test.
std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::set(false, pBatch);
pBatch->commit();
comphelper::ScopeGuard g([]() {
std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::set(true,
pBatchReset);
pBatchReset->commit();
});
getComponent().set(
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
// Insert a file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
= m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.doc");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
= aContainer.InsertEmbeddedObject(aMedium, aName);
// Make sure that the insertion fails:
// 1) the user explicitly requested that the data is not loaded into Writer
// 2) this is non-Windows, so OLE embedding is not an option
// so silently still loading the data into Writer would be bad.
CPPUNIT_ASSERT(!xObject.is());
}
CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigVsdx)
{
// Explicitly disable Word->Writer mapping for this test.
std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::set(false, pBatch);
pBatch->commit();
comphelper::ScopeGuard g([]() {
std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::set(true, pBatchReset);
pBatchReset->commit();
});
getComponent().set(
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
// Insert a file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
= m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
= aContainer.InsertEmbeddedObject(aMedium, aName);
// Make sure that the insertion fails:
// 1) the user explicitly requested that the data is not loaded into Writer
// 2) this is non-Windows, so OLE embedding is not an option
// so silently still loading the data into Writer would be bad.
CPPUNIT_ASSERT(!xObject.is());
}
CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigPdf)
{
// Explicitly disable Word->Writer mapping for this test.
std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(false, pBatch);
pBatch->commit();
comphelper::ScopeGuard g([]() {
std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, pBatchReset);
pBatchReset->commit();
});
getComponent().set(
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
// Insert a PDF file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
= m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.pdf");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
= aContainer.InsertEmbeddedObject(aMedium, aName);
// Make sure that the insertion fails:
// 1) the user explicitly requested that the data is not loaded into Writer
// 2) this is non-Windows, so OLE embedding is not an option
// so silently still loading the data into Writer would be bad.
CPPUNIT_ASSERT(!xObject.is());
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
| {
"pile_set_name": "Github"
} |
import { set } from '@ember/object';
import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:task', 'Unit | Adapter | task', {
needs: [
'service:session'
]
});
test('"sortQueryParams" passes through (and underscores) any keys that arent special', function(assert) {
assert.expect(2);
let adapter = this.subject();
assert.deepEqual(
adapter.sortQueryParams({ foo: 'bar' }),
{ foo: 'bar' },
'Leaves single-word keys untouched.'
);
assert.deepEqual(
adapter.sortQueryParams({ camelFoo: 'bar' }),
{ camel_foo: 'bar' },
'Underscores camelCase keys.'
);
});
test('"sortQueryParams" moves page param into query sub-object if present', function(assert) {
assert.expect(5);
let adapter = this.subject();
assert.deepEqual(
adapter.sortQueryParams({ page: 'foo' }),
{ page: { page: 'foo' } },
'When there is a page key, it needs to be nested.'
);
assert.deepEqual(
adapter.sortQueryParams({ page: undefined }),
{ },
'An undefined value is discarded.'
);
assert.deepEqual(
adapter.sortQueryParams({ page: null }),
{ },
'A null value is discarded.'
);
assert.deepEqual(
adapter.sortQueryParams({ page: null }),
{ },
'An empty string value is discarded.'
);
assert.deepEqual(
adapter.sortQueryParams({ page: '' }),
{ },
'An empty string value is discarded.'
);
});
test('"sortQueryParams" discards "projectId"', function(assert) {
assert.expect(6);
let adapter = this.subject();
assert.deepEqual(
adapter.sortQueryParams({ projectId: 'bar' }),
{ },
'Discards "projectId" when it has a value.'
);
assert.deepEqual(
adapter.sortQueryParams({ projectId: '' }),
{ },
'Discards "projectId" when empty string.'
);
assert.deepEqual(
adapter.sortQueryParams({ projectId: null }),
{ },
'Discards "projectId" when null.'
);
assert.deepEqual(
adapter.sortQueryParams({ projectId: undefined }),
{ },
'Discards "projectId" undefined.'
);
assert.deepEqual(
adapter.sortQueryParams({ projectId: [] }),
{ },
'Discards "projectId" when blank array.'
);
assert.deepEqual(
adapter.sortQueryParams({ }),
{ },
'Works on blank object.'
);
});
test('"urlForQuery" makes "projectId" part of the path', function(assert) {
assert.expect(1);
let adapter = this.subject();
set(adapter, 'host', 'test');
assert.equal(
adapter.urlForQuery({ projectId: 2 }),
'test/projects/2/tasks',
'"projectId" is correctly made part of the path.'
);
});
test('"urlForQueryRecord" makes "projectId" and "number" part of the path', function(assert) {
assert.expect(1);
let adapter = this.subject();
set(adapter, 'host', 'test');
assert.equal(
adapter.urlForQueryRecord({ projectId: 2, number: 5 }),
'test/projects/2/tasks/5',
'"projectId" and "number" are correctly made part of the path.'
);
});
| {
"pile_set_name": "Github"
} |
/**********************************************************************
* Copyright (c) 2014 Pieter Wuille *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
**********************************************************************/
#ifndef _SECP256K1_SCALAR_IMPL_H_
#define _SECP256K1_SCALAR_IMPL_H_
#include "group.h"
#include "scalar.h"
#if defined HAVE_CONFIG_H
#include "libsecp256k1-config.h"
#endif
#if defined(EXHAUSTIVE_TEST_ORDER)
#include "scalar_low_impl.h"
#elif defined(USE_SCALAR_4X64)
#include "scalar_4x64_impl.h"
#elif defined(USE_SCALAR_8X32)
#include "scalar_8x32_impl.h"
#else
#error "Please select scalar implementation"
#endif
#ifndef USE_NUM_NONE
static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a) {
unsigned char c[32];
secp256k1_scalar_get_b32(c, a);
secp256k1_num_set_bin(r, c, 32);
}
/** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */
static void secp256k1_scalar_order_get_num(secp256k1_num *r) {
#if defined(EXHAUSTIVE_TEST_ORDER)
static const unsigned char order[32] = {
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,EXHAUSTIVE_TEST_ORDER
};
#else
static const unsigned char order[32] = {
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
};
#endif
secp256k1_num_set_bin(r, order, 32);
}
#endif
static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) {
#if defined(EXHAUSTIVE_TEST_ORDER)
int i;
*r = 0;
for (i = 0; i < EXHAUSTIVE_TEST_ORDER; i++)
if ((i * *x) % EXHAUSTIVE_TEST_ORDER == 1)
*r = i;
/* If this VERIFY_CHECK triggers we were given a noninvertible scalar (and thus
* have a composite group order; fix it in exhaustive_tests.c). */
VERIFY_CHECK(*r != 0);
}
#else
secp256k1_scalar *t;
int i;
/* First compute x ^ (2^N - 1) for some values of N. */
secp256k1_scalar x2, x3, x4, x6, x7, x8, x15, x30, x60, x120, x127;
secp256k1_scalar_sqr(&x2, x);
secp256k1_scalar_mul(&x2, &x2, x);
secp256k1_scalar_sqr(&x3, &x2);
secp256k1_scalar_mul(&x3, &x3, x);
secp256k1_scalar_sqr(&x4, &x3);
secp256k1_scalar_mul(&x4, &x4, x);
secp256k1_scalar_sqr(&x6, &x4);
secp256k1_scalar_sqr(&x6, &x6);
secp256k1_scalar_mul(&x6, &x6, &x2);
secp256k1_scalar_sqr(&x7, &x6);
secp256k1_scalar_mul(&x7, &x7, x);
secp256k1_scalar_sqr(&x8, &x7);
secp256k1_scalar_mul(&x8, &x8, x);
secp256k1_scalar_sqr(&x15, &x8);
for (i = 0; i < 6; i++) {
secp256k1_scalar_sqr(&x15, &x15);
}
secp256k1_scalar_mul(&x15, &x15, &x7);
secp256k1_scalar_sqr(&x30, &x15);
for (i = 0; i < 14; i++) {
secp256k1_scalar_sqr(&x30, &x30);
}
secp256k1_scalar_mul(&x30, &x30, &x15);
secp256k1_scalar_sqr(&x60, &x30);
for (i = 0; i < 29; i++) {
secp256k1_scalar_sqr(&x60, &x60);
}
secp256k1_scalar_mul(&x60, &x60, &x30);
secp256k1_scalar_sqr(&x120, &x60);
for (i = 0; i < 59; i++) {
secp256k1_scalar_sqr(&x120, &x120);
}
secp256k1_scalar_mul(&x120, &x120, &x60);
secp256k1_scalar_sqr(&x127, &x120);
for (i = 0; i < 6; i++) {
secp256k1_scalar_sqr(&x127, &x127);
}
secp256k1_scalar_mul(&x127, &x127, &x7);
/* Then accumulate the final result (t starts at x127). */
t = &x127;
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 4; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 4; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 3; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 4; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 5; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 4; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 5; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x4); /* 1111 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 3; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 4; i++) { /* 000 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 10; i++) { /* 0000000 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 4; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x3); /* 111 */
for (i = 0; i < 9; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x8); /* 11111111 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 3; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 3; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 5; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x4); /* 1111 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 5; i++) { /* 000 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 4; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 2; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 8; i++) { /* 000000 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 3; i++) { /* 0 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, &x2); /* 11 */
for (i = 0; i < 3; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 6; i++) { /* 00000 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(t, t, x); /* 1 */
for (i = 0; i < 8; i++) { /* 00 */
secp256k1_scalar_sqr(t, t);
}
secp256k1_scalar_mul(r, t, &x6); /* 111111 */
}
SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) {
return !(a->d[0] & 1);
}
#endif
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
#if defined(USE_SCALAR_INV_BUILTIN)
secp256k1_scalar_inverse(r, x);
#elif defined(USE_SCALAR_INV_NUM)
unsigned char b[32];
secp256k1_num n, m;
secp256k1_scalar t = *x;
secp256k1_scalar_get_b32(b, &t);
secp256k1_num_set_bin(&n, b, 32);
secp256k1_scalar_order_get_num(&m);
secp256k1_num_mod_inverse(&n, &n, &m);
secp256k1_num_get_bin(b, 32, &n);
secp256k1_scalar_set_b32(r, b, NULL);
/* Verify that the inverse was computed correctly, without GMP code. */
secp256k1_scalar_mul(&t, &t, r);
CHECK(secp256k1_scalar_is_one(&t));
#else
#error "Please select scalar inverse implementation"
#endif
}
#ifdef USE_ENDOMORPHISM
#if defined(EXHAUSTIVE_TEST_ORDER)
/**
* Find k1 and k2 given k, such that k1 + k2 * lambda == k mod n; unlike in the
* full case we don't bother making k1 and k2 be small, we just want them to be
* nontrivial to get full test coverage for the exhaustive tests. We therefore
* (arbitrarily) set k2 = k + 5 and k1 = k - k2 * lambda.
*/
static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) {
*r2 = (*a + 5) % EXHAUSTIVE_TEST_ORDER;
*r1 = (*a + (EXHAUSTIVE_TEST_ORDER - *r2) * EXHAUSTIVE_TEST_LAMBDA) % EXHAUSTIVE_TEST_ORDER;
}
#else
/**
* The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where
* lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a,
* 0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72}
*
* "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm
* (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1
* and k2 have a small size.
* It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are:
*
* - a1 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15}
* - b1 = -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3}
* - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8}
* - b2 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15}
*
* The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives
* k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and
* compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2.
*
* g1, g2 are precomputed constants used to replace division with a rounded multiplication
* when decomposing the scalar for an endomorphism-based point multiplication.
*
* The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve
* Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5.
*
* The derivation is described in the paper "Efficient Software Implementation of Public-Key
* Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez),
* Section 4.3 (here we use a somewhat higher-precision estimate):
* d = a1*b2 - b1*a2
* g1 = round((2^272)*b2/d)
* g2 = round((2^272)*b1/d)
*
* (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found
* as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda').
*
* The function below splits a in r1 and r2, such that r1 + lambda * r2 == a (mod order).
*/
static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) {
secp256k1_scalar c1, c2;
static const secp256k1_scalar minus_lambda = SECP256K1_SCALAR_CONST(
0xAC9C52B3UL, 0x3FA3CF1FUL, 0x5AD9E3FDUL, 0x77ED9BA4UL,
0xA880B9FCUL, 0x8EC739C2UL, 0xE0CFC810UL, 0xB51283CFUL
);
static const secp256k1_scalar minus_b1 = SECP256K1_SCALAR_CONST(
0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL
);
static const secp256k1_scalar minus_b2 = SECP256K1_SCALAR_CONST(
0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL,
0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL
);
static const secp256k1_scalar g1 = SECP256K1_SCALAR_CONST(
0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00003086UL,
0xD221A7D4UL, 0x6BCDE86CUL, 0x90E49284UL, 0xEB153DABUL
);
static const secp256k1_scalar g2 = SECP256K1_SCALAR_CONST(
0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0000E443UL,
0x7ED6010EUL, 0x88286F54UL, 0x7FA90ABFUL, 0xE4C42212UL
);
VERIFY_CHECK(r1 != a);
VERIFY_CHECK(r2 != a);
/* these _var calls are constant time since the shift amount is constant */
secp256k1_scalar_mul_shift_var(&c1, a, &g1, 272);
secp256k1_scalar_mul_shift_var(&c2, a, &g2, 272);
secp256k1_scalar_mul(&c1, &c1, &minus_b1);
secp256k1_scalar_mul(&c2, &c2, &minus_b2);
secp256k1_scalar_add(r2, &c1, &c2);
secp256k1_scalar_mul(r1, r2, &minus_lambda);
secp256k1_scalar_add(r1, r1, a);
}
#endif
#endif
#endif
| {
"pile_set_name": "Github"
} |
/*
----------------------------------------------------
httpry - HTTP logging and information retrieval tool
----------------------------------------------------
Copyright (c) 2005-2014 Jason Bittel <[email protected]>
Licensed under GPLv2. For further information, see COPYING file.
*/
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "error.h"
/* Strip leading and trailing spaces from parameter string, modifying
the string in place and returning a pointer to the (potentially)
new starting point */
char *str_strip_whitespace(char *str) {
size_t len = strlen(str);
#ifdef DEBUG
ASSERT(str);
ASSERT(strlen(str) > 0);
#endif
while (isspace(*str)) str++;
while (len && isspace(*(str + len - 1)))
*(str + (len--) - 1) = '\0';
return str;
}
/* Convert the paramter string to lowercase */
char *str_tolower(char *str) {
char *c;
#ifdef DEBUG
ASSERT(str);
ASSERT(strlen(str) > 0);
#endif
for (c = str; *c != '\0'; c++) {
*c = tolower(*c);
}
return str;
}
/* Compare two strings, ignoring the case of str1 and
assuming str2 is lowercase. Break if we find a string
terminator in str2 and consider it a match as str1
will not always have a string terminator. */
int str_compare(const char *str1, const char *str2) {
#ifdef DEBUG
ASSERT(str2);
ASSERT(strlen(str2) > 0);
ASSERT(str1 != str2);
#endif
while (tolower(*str1) == *str2) {
str1++;
str2++;
if (*str2 == '\0') return 0;
}
return tolower(*str1) - *str2;
}
/* Copy at most len characters from src to dest, guaranteeing
dest will be properly terminated. Returns the total number of
characters copied, not including the string terminator. */
int str_copy(char *dest, const char *src, size_t len) {
const char *start = dest;
if (len > 0) {
while ((*src != '\0') && --len) {
*dest++ = *src++;
}
*dest = '\0';
}
return dest - start;
}
/* Wrapper function around str_copy() that first allocates
memory for the destination string and then copies the
parameter string into it. */
char *str_duplicate(const char *str) {
char *new;
size_t len = strlen(str);
if ((new = malloc(len + 1)) == NULL)
return NULL;
#ifdef DEBUG
ASSERT(str_copy(new, str, len + 1) <= (len + 1));
#else
str_copy(new, str, len + 1);
#endif
return new;
}
/* Implementation of Jenkins's One-at-a-Time hash, as described on
this page: http://www.burtleburtle.net/bob/hash/doobs.html */
unsigned int hash_str(char *str, unsigned int hashsize) {
unsigned long int hash;
#ifdef DEBUG
ASSERT(str);
ASSERT(strlen(str) > 0);
#endif
for (hash = 0; *str != '\0'; str++) {
hash += tolower(*str);
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
/* Restrict hash value to a maximum of hashsize;
hashsize must be a power of 2 */
return (unsigned int) (hash & (hashsize - 1));
}
| {
"pile_set_name": "Github"
} |
<?php
// $Header: /cvsroot/html2ps/css.border.style.inc.php,v 1.6 2006/11/11 13:43:52 Konstantin Exp $
require_once(HTML2PS_DIR.'value.border.style.class.php');
class CSSBorderStyle extends CSSSubProperty {
var $_defaultValue;
function CSSBorderStyle(&$owner) {
$this->CSSSubProperty($owner);
$this->_defaultValue = new BorderStyle(BS_NONE,
BS_NONE,
BS_NONE,
BS_NONE);
}
function setValue(&$owner_value, &$value) {
if ($value != CSS_PROPERTY_INHERIT) {
$owner_value->top->style = $value->top;
$owner_value->right->style = $value->right;
$owner_value->bottom->style = $value->bottom;
$owner_value->left->style = $value->left;
} else {
$owner_value->top->style = CSS_PROPERTY_INHERIT;
$owner_value->right->style = CSS_PROPERTY_INHERIT;
$owner_value->bottom->style = CSS_PROPERTY_INHERIT;
$owner_value->left->style = CSS_PROPERTY_INHERIT;
};
}
function getValue(&$owner_value) {
return new BorderStyle($owner_value->top->style,
$owner_value->right->style,
$owner_value->bottom->style,
$owner_value->left->style);
}
function getPropertyCode() {
return CSS_BORDER_STYLE;
}
function getPropertyName() {
return 'border-style';
}
function default_value() {
return $this->_defaultValue;
}
function parse_style($value) {
switch ($value) {
case "solid":
return BS_SOLID;
case "dashed":
return BS_DASHED;
case "dotted":
return BS_DOTTED;
case "double":
return BS_DOUBLE;
case "inset":
return BS_INSET;
case "outset":
return BS_OUTSET;
case "groove":
return BS_GROOVE;
case "ridge":
return BS_RIDGE;
default:
return BS_NONE;
};
}
function parse_in($value) {
$values = explode(" ",$value);
switch (count($values)) {
case 1:
$v1 = $this->parse_style($values[0]);
return array($v1, $v1, $v1, $v1);
case 2:
$v1 = $this->parse_style($values[0]);
$v2 = $this->parse_style($values[1]);
return array($v1, $v2, $v1, $v2);
case 3:
$v1 = $this->parse_style($values[0]);
$v2 = $this->parse_style($values[1]);
$v3 = $this->parse_style($values[2]);
return array($v1, $v2, $v3, $v2);
case 4:
$v1 = $this->parse_style($values[0]);
$v2 = $this->parse_style($values[1]);
$v3 = $this->parse_style($values[2]);
$v4 = $this->parse_style($values[3]);
return array($v1, $v2, $v3, $v4);
default:
return $this->default_value();
};
}
function parse($value) {
if ($value == 'inherit') {
return CSS_PROPERTY_INHERIT;
}
$values = $this->parse_in($value);
return new BorderStyle($values[0],
$values[1],
$values[2],
$values[3]);
}
}
?> | {
"pile_set_name": "Github"
} |
// +build windows
package winio
import (
"bytes"
"encoding/binary"
"fmt"
"runtime"
"sync"
"syscall"
"unicode/utf16"
"golang.org/x/sys/windows"
)
//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges
//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf
//sys revertToSelf() (err error) = advapi32.RevertToSelf
//sys openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken
//sys getCurrentThread() (h syscall.Handle) = GetCurrentThread
//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW
//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
const (
SE_PRIVILEGE_ENABLED = 2
ERROR_NOT_ALL_ASSIGNED syscall.Errno = 1300
SeBackupPrivilege = "SeBackupPrivilege"
SeRestorePrivilege = "SeRestorePrivilege"
)
const (
securityAnonymous = iota
securityIdentification
securityImpersonation
securityDelegation
)
var (
privNames = make(map[string]uint64)
privNameMutex sync.Mutex
)
// PrivilegeError represents an error enabling privileges.
type PrivilegeError struct {
privileges []uint64
}
func (e *PrivilegeError) Error() string {
s := ""
if len(e.privileges) > 1 {
s = "Could not enable privileges "
} else {
s = "Could not enable privilege "
}
for i, p := range e.privileges {
if i != 0 {
s += ", "
}
s += `"`
s += getPrivilegeName(p)
s += `"`
}
return s
}
// RunWithPrivilege enables a single privilege for a function call.
func RunWithPrivilege(name string, fn func() error) error {
return RunWithPrivileges([]string{name}, fn)
}
// RunWithPrivileges enables privileges for a function call.
func RunWithPrivileges(names []string, fn func() error) error {
privileges, err := mapPrivileges(names)
if err != nil {
return err
}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
token, err := newThreadToken()
if err != nil {
return err
}
defer releaseThreadToken(token)
err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)
if err != nil {
return err
}
return fn()
}
func mapPrivileges(names []string) ([]uint64, error) {
var privileges []uint64
privNameMutex.Lock()
defer privNameMutex.Unlock()
for _, name := range names {
p, ok := privNames[name]
if !ok {
err := lookupPrivilegeValue("", name, &p)
if err != nil {
return nil, err
}
privNames[name] = p
}
privileges = append(privileges, p)
}
return privileges, nil
}
// EnableProcessPrivileges enables privileges globally for the process.
func EnableProcessPrivileges(names []string) error {
return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)
}
// DisableProcessPrivileges disables privileges globally for the process.
func DisableProcessPrivileges(names []string) error {
return enableDisableProcessPrivilege(names, 0)
}
func enableDisableProcessPrivilege(names []string, action uint32) error {
privileges, err := mapPrivileges(names)
if err != nil {
return err
}
p, _ := windows.GetCurrentProcess()
var token windows.Token
err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)
if err != nil {
return err
}
defer token.Close()
return adjustPrivileges(token, privileges, action)
}
func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {
var b bytes.Buffer
binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))
for _, p := range privileges {
binary.Write(&b, binary.LittleEndian, p)
binary.Write(&b, binary.LittleEndian, action)
}
prevState := make([]byte, b.Len())
reqSize := uint32(0)
success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)
if !success {
return err
}
if err == ERROR_NOT_ALL_ASSIGNED {
return &PrivilegeError{privileges}
}
return nil
}
func getPrivilegeName(luid uint64) string {
var nameBuffer [256]uint16
bufSize := uint32(len(nameBuffer))
err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize)
if err != nil {
return fmt.Sprintf("<unknown privilege %d>", luid)
}
var displayNameBuffer [256]uint16
displayBufSize := uint32(len(displayNameBuffer))
var langID uint32
err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)
if err != nil {
return fmt.Sprintf("<unknown privilege %s>", string(utf16.Decode(nameBuffer[:bufSize])))
}
return string(utf16.Decode(displayNameBuffer[:displayBufSize]))
}
func newThreadToken() (windows.Token, error) {
err := impersonateSelf(securityImpersonation)
if err != nil {
return 0, err
}
var token windows.Token
err = openThreadToken(getCurrentThread(), syscall.TOKEN_ADJUST_PRIVILEGES|syscall.TOKEN_QUERY, false, &token)
if err != nil {
rerr := revertToSelf()
if rerr != nil {
panic(rerr)
}
return 0, err
}
return token, nil
}
func releaseThreadToken(h windows.Token) {
err := revertToSelf()
if err != nil {
panic(err)
}
h.Close()
}
| {
"pile_set_name": "Github"
} |
/* $OpenBSD: roaming_common.c,v 1.8 2010/01/12 00:59:29 djm Exp $ */
/*
* Copyright (c) 2004-2009 AppGate Network Security AB
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include "atomicio.h"
#include "log.h"
#include "packet.h"
#include "xmalloc.h"
#include "cipher.h"
#include "buffer.h"
#include "roaming.h"
static size_t out_buf_size = 0;
static char *out_buf = NULL;
static size_t out_start;
static size_t out_last;
static u_int64_t write_bytes = 0;
static u_int64_t read_bytes = 0;
int roaming_enabled = 0;
int resume_in_progress = 0;
int
get_snd_buf_size()
{
int fd = packet_get_connection_out();
int optval;
socklen_t optvallen = sizeof(optval);
if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0)
optval = DEFAULT_ROAMBUF;
return optval;
}
int
get_recv_buf_size()
{
int fd = packet_get_connection_in();
int optval;
socklen_t optvallen = sizeof(optval);
if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0)
optval = DEFAULT_ROAMBUF;
return optval;
}
void
set_out_buffer_size(size_t size)
{
/*
* The buffer size can only be set once and the buffer will live
* as long as the session lives.
*/
if (out_buf == NULL) {
out_buf_size = size;
out_buf = xmalloc(size);
out_start = 0;
out_last = 0;
}
}
u_int64_t
get_recv_bytes(void)
{
return read_bytes;
}
void
add_recv_bytes(u_int64_t num)
{
read_bytes += num;
}
u_int64_t
get_sent_bytes(void)
{
return write_bytes;
}
void
roam_set_bytes(u_int64_t sent, u_int64_t recvd)
{
read_bytes = recvd;
write_bytes = sent;
}
static void
buf_append(const char *buf, size_t count)
{
if (count > out_buf_size) {
buf += count - out_buf_size;
count = out_buf_size;
}
if (count < out_buf_size - out_last) {
memcpy(out_buf + out_last, buf, count);
if (out_start > out_last)
out_start += count;
out_last += count;
} else {
/* data will wrap */
size_t chunk = out_buf_size - out_last;
memcpy(out_buf + out_last, buf, chunk);
memcpy(out_buf, buf + chunk, count - chunk);
out_last = count - chunk;
out_start = out_last + 1;
}
}
ssize_t
roaming_write(int fd, const void *buf, size_t count, int *cont)
{
ssize_t ret;
ret = write(fd, buf, count);
if (ret > 0 && !resume_in_progress) {
write_bytes += ret;
if (out_buf_size > 0)
buf_append(buf, ret);
}
if (out_buf_size > 0 &&
(ret == 0 || (ret == -1 && errno == EPIPE))) {
if (wait_for_roaming_reconnect() != 0) {
ret = 0;
*cont = 1;
} else {
ret = -1;
errno = EAGAIN;
}
}
return ret;
}
ssize_t
roaming_read(int fd, void *buf, size_t count, int *cont)
{
ssize_t ret = read(fd, buf, count);
if (ret > 0) {
if (!resume_in_progress) {
read_bytes += ret;
}
} else if (out_buf_size > 0 &&
(ret == 0 || (ret == -1 && (errno == ECONNRESET
|| errno == ECONNABORTED || errno == ETIMEDOUT
|| errno == EHOSTUNREACH)))) {
debug("roaming_read failed for %d ret=%ld errno=%d",
fd, (long)ret, errno);
ret = 0;
if (wait_for_roaming_reconnect() == 0)
*cont = 1;
}
return ret;
}
size_t
roaming_atomicio(ssize_t(*f)(int, void*, size_t), int fd, void *buf,
size_t count)
{
size_t ret = atomicio(f, fd, buf, count);
if (f == vwrite && ret > 0 && !resume_in_progress) {
write_bytes += ret;
} else if (f == read && ret > 0 && !resume_in_progress) {
read_bytes += ret;
}
return ret;
}
void
resend_bytes(int fd, u_int64_t *offset)
{
size_t available, needed;
if (out_start < out_last)
available = out_last - out_start;
else
available = out_buf_size;
needed = write_bytes - *offset;
debug3("resend_bytes: resend %lu bytes from %llu",
(unsigned long)needed, (unsigned long long)*offset);
if (needed > available)
fatal("Needed to resend more data than in the cache");
if (out_last < needed) {
int chunkend = needed - out_last;
atomicio(vwrite, fd, out_buf + out_buf_size - chunkend,
chunkend);
atomicio(vwrite, fd, out_buf, out_last);
} else {
atomicio(vwrite, fd, out_buf + (out_last - needed), needed);
}
}
/*
* Caclulate a new key after a reconnect
*/
void
calculate_new_key(u_int64_t *key, u_int64_t cookie, u_int64_t challenge)
{
const EVP_MD *md = EVP_sha1();
EVP_MD_CTX ctx;
char hash[EVP_MAX_MD_SIZE];
Buffer b;
buffer_init(&b);
buffer_put_int64(&b, *key);
buffer_put_int64(&b, cookie);
buffer_put_int64(&b, challenge);
EVP_DigestInit(&ctx, md);
EVP_DigestUpdate(&ctx, buffer_ptr(&b), buffer_len(&b));
EVP_DigestFinal(&ctx, hash, NULL);
buffer_clear(&b);
buffer_append(&b, hash, EVP_MD_size(md));
*key = buffer_get_int64(&b);
buffer_free(&b);
}
| {
"pile_set_name": "Github"
} |
/*
* JAVE - A Java Audio/Video Encoder (based on FFMPEG)
*
* Copyright (C) 2008-2009 Carlo Pelliccia (www.sauronsoftware.it)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package it.sauronsoftware.jave;
/**
* This expection is thrown if a source file format is not recognized.
*
* @author Carlo Pelliccia
*/
public class InputFormatException extends EncoderException {
private static final long serialVersionUID = 1L;
InputFormatException() {
super();
}
InputFormatException(String message) {
super(message);
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="zh">
<head>
<!-- Generated by javadoc (1.8.0_181) on Tue Oct 29 14:27:39 CST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DataSearchController</title>
<meta name="date" content="2019-10-29">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DataSearchController";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10};
var tabs = {65535:["t0","所有方法"],2:["t2","实例方法"],8:["t4","具体方法"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>您的浏览器已禁用 JavaScript。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../../../overview-summary.html">概览</a></li>
<li><a href="package-summary.html">程序包</a></li>
<li class="navBarCell1Rev">类</li>
<li><a href="package-tree.html">树</a></li>
<li><a href="../../../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../../help-doc.html">帮助</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/ppdai/das/console/controller/DatabaseSetEntryControllerTest.html" title="com.ppdai.das.console.controller中的类"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../../com/ppdai/das/console/controller/GroupController.html" title="com.ppdai.das.console.controller中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/ppdai/das/console/controller/DataSearchController.html" target="_top">框架</a></li>
<li><a href="DataSearchController.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">所有类</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>概要: </li>
<li>嵌套 | </li>
<li>字段 | </li>
<li><a href="#constructor.summary">构造器</a> | </li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料: </li>
<li>字段 | </li>
<li><a href="#constructor.detail">构造器</a> | </li>
<li><a href="#method.detail">方法</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.ppdai.das.console.controller</div>
<h2 title="类 DataSearchController" class="title">类 DataSearchController</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.ppdai.das.console.controller.DataSearchController</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>@RestController
@RequestMapping(value="/dataSearch")
public class <span class="typeNameLabel">DataSearchController</span>
extends java.lang.Object</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>构造器概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="构造器概要表, 列表构造器和解释">
<caption><span>构造器</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">构造器和说明</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/ppdai/das/console/controller/DataSearchController.html#DataSearchController--">DataSearchController</a></span>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>方法概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释">
<caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">实例方法</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">具体方法</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">限定符和类型</th>
<th class="colLast" scope="col">方法和说明</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/ppdai/das/console/controller/DataSearchController.html#download-java.lang.String-java.lang.Integer-java.lang.String-java.lang.String-java.lang.Integer-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-com.ppdai.das.console.dto.entry.das.LoginUser-">download</a></span>(java.lang.String dbsetName,
java.lang.Integer dbSetId,
java.lang.String dbSetEntryIds,
java.lang.String sql,
java.lang.Integer limit,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a><<a href="../../../../../com/ppdai/das/console/dto/model/page/ListResult.html" title="com.ppdai.das.console.dto.model.page中的类">ListResult</a><<a href="../../../../../com/ppdai/das/console/dto/view/DataSearchLogView.html" title="com.ppdai.das.console.dto.view中的类">DataSearchLogView</a>>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/ppdai/das/console/controller/DataSearchController.html#list-com.ppdai.das.console.dto.model.Paging-com.ppdai.das.console.dto.entry.das.LoginUser-">list</a></span>(<a href="../../../../../com/ppdai/das/console/dto/model/Paging.html" title="com.ppdai.das.console.dto.model中的类">Paging</a><<a href="../../../../../com/ppdai/das/console/dto/view/DataSearchLogView.html" title="com.ppdai.das.console.dto.view中的类">DataSearchLogView</a>> paging,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)</code>
<div class="block">1、翻页查询LOG</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/ppdai/das/console/controller/DataSearchController.html#searchlog-java.lang.Integer-">searchlog</a></span>(java.lang.Integer limit)</code> </td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/ppdai/das/console/controller/DataSearchController.html#select-com.ppdai.das.console.dto.model.dataSearch.DataSearchRequest-javax.servlet.http.HttpServletRequest-com.ppdai.das.console.dto.entry.das.LoginUser-">select</a></span>(<a href="../../../../../com/ppdai/das/console/dto/model/dataSearch/DataSearchRequest.html" title="com.ppdai.das.console.dto.model.dataSearch中的类">DataSearchRequest</a> dataSearchRequest,
javax.servlet.http.HttpServletRequest request,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>从类继承的方法 java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>构造器详细资料</h3>
<a name="DataSearchController--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DataSearchController</h4>
<pre>public DataSearchController()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>方法详细资料</h3>
<a name="select-com.ppdai.das.console.dto.model.dataSearch.DataSearchRequest-javax.servlet.http.HttpServletRequest-com.ppdai.das.console.dto.entry.das.LoginUser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>select</h4>
<pre>@RequestMapping(value="/select")
public <a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a> select(@RequestBody
<a href="../../../../../com/ppdai/das/console/dto/model/dataSearch/DataSearchRequest.html" title="com.ppdai.das.console.dto.model.dataSearch中的类">DataSearchRequest</a> dataSearchRequest,
javax.servlet.http.HttpServletRequest request,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)
throws java.lang.Exception</pre>
<dl>
<dt><span class="throwsLabel">抛出:</span></dt>
<dd><code>java.lang.Exception</code></dd>
</dl>
</li>
</ul>
<a name="searchlog-java.lang.Integer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>searchlog</h4>
<pre>@RequestMapping(value="/searchlog")
public <a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a> searchlog(@RequestParam(value="limit",defaultValue="100")
java.lang.Integer limit)
throws java.sql.SQLException</pre>
<dl>
<dt><span class="throwsLabel">抛出:</span></dt>
<dd><code>java.sql.SQLException</code></dd>
</dl>
</li>
</ul>
<a name="list-com.ppdai.das.console.dto.model.Paging-com.ppdai.das.console.dto.entry.das.LoginUser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>list</h4>
<pre>@RequestMapping(value="/log/list",
method=POST)
public <a href="../../../../../com/ppdai/das/console/dto/model/ServiceResult.html" title="com.ppdai.das.console.dto.model中的类">ServiceResult</a><<a href="../../../../../com/ppdai/das/console/dto/model/page/ListResult.html" title="com.ppdai.das.console.dto.model.page中的类">ListResult</a><<a href="../../../../../com/ppdai/das/console/dto/view/DataSearchLogView.html" title="com.ppdai.das.console.dto.view中的类">DataSearchLogView</a>>> list(@RequestBody
<a href="../../../../../com/ppdai/das/console/dto/model/Paging.html" title="com.ppdai.das.console.dto.model中的类">Paging</a><<a href="../../../../../com/ppdai/das/console/dto/view/DataSearchLogView.html" title="com.ppdai.das.console.dto.view中的类">DataSearchLogView</a>> paging,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)
throws java.sql.SQLException</pre>
<div class="block">1、翻页查询LOG</div>
<dl>
<dt><span class="throwsLabel">抛出:</span></dt>
<dd><code>java.sql.SQLException</code></dd>
</dl>
</li>
</ul>
<a name="download-java.lang.String-java.lang.Integer-java.lang.String-java.lang.String-java.lang.Integer-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-com.ppdai.das.console.dto.entry.das.LoginUser-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>download</h4>
<pre>@RequestMapping(value="/download/{dbsetName}/{dbSetId}")
public java.lang.String download(@PathVariable
java.lang.String dbsetName,
@PathVariable
java.lang.Integer dbSetId,
@RequestParam(value="dbSetEntryIds")
java.lang.String dbSetEntryIds,
@RequestParam(value="sql")
java.lang.String sql,
@RequestParam(value="limit")
java.lang.Integer limit,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
<a href="../../../../../com/ppdai/das/console/dto/entry/das/LoginUser.html" title="com.ppdai.das.console.dto.entry.das中的类">LoginUser</a> user)
throws java.lang.Exception</pre>
<dl>
<dt><span class="throwsLabel">抛出:</span></dt>
<dd><code>java.lang.Exception</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../../../overview-summary.html">概览</a></li>
<li><a href="package-summary.html">程序包</a></li>
<li class="navBarCell1Rev">类</li>
<li><a href="package-tree.html">树</a></li>
<li><a href="../../../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../../help-doc.html">帮助</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/ppdai/das/console/controller/DatabaseSetEntryControllerTest.html" title="com.ppdai.das.console.controller中的类"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../../com/ppdai/das/console/controller/GroupController.html" title="com.ppdai.das.console.controller中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/ppdai/das/console/controller/DataSearchController.html" target="_top">框架</a></li>
<li><a href="DataSearchController.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">所有类</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>概要: </li>
<li>嵌套 | </li>
<li>字段 | </li>
<li><a href="#constructor.summary">构造器</a> | </li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料: </li>
<li>字段 | </li>
<li><a href="#constructor.detail">构造器</a> | </li>
<li><a href="#method.detail">方法</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"pile_set_name": "Github"
} |
.index-container {
-webkit-flex-direction: column;
flex-direction: column;
@media (min-width: $desktop-min-width) {
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.index-column {
-webkit-flex: 1 1 33%;
flex: 1 1 33%;
}
}
| {
"pile_set_name": "Github"
} |
2
2
2
21
0
18
0
2
2
2
0
2
2
3
2
4
2
0
0
0
2
4
2
0
0
5
4
0
2
2
2
2
0
6
0
0
2
0
2
2
0
0
0
0
3
2
2
2
0
0
2
2
2
0
2
4
0
0
0
4
0
4
2
2
0
2
2
5
0
0
2
0
0
2
0
2
0
4
0
0
0
2
0
2
4
0
0
2
0
0
2
0
0
0
0
0
2
2
3
0
0
0
0
2
2
4
4
2
2
2
0
4
5
0
0
0
4
0
2
2
2
0
4
0
0
2
2
0
0
2
4
0
0
0
2
0
2
2
2
0
2
0
0
0
3
0
2
0
2
2
0
2
0
0
2
0
0
2
0
0
0
2
2
0
3
5
2
0
2
2
0
0
0
2
0
0
0
0
2
0
0
2
0
2
4
0
0
0
2
2
0
0
2
2
0
4
2
2
0
0
0
2
0
2
0
6
2
0
2
2
2
2
0
0
0
2
2
2
3
2
0
0
2
2
2
2
2
0
0
6
0
2
0
4
4
5
0
2
2
0
10
0
3
0
2
1
0
0
2
0
0
2
0
2
2
2
0
2
0
0
2
2
0
2
2
2
0
0
5
2
0
0
0
3
0
2
5
2
3
3
3
2
5
0
7
2
0
6
| {
"pile_set_name": "Github"
} |
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated January 1, 2020. Replaces all prior versions.
*
* Copyright (c) 2013-2020, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "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 ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) 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
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
using UnityEngine;
using System.Collections;
namespace Spine.Unity.Examples {
public class SkeletonUtilityEyeConstraint : SkeletonUtilityConstraint {
public Transform[] eyes;
public float radius = 0.5f;
public Transform target;
public Vector3 targetPosition;
public float speed = 10;
Vector3[] origins;
Vector3 centerPoint;
protected override void OnEnable () {
if (!Application.isPlaying) return;
base.OnEnable();
Bounds centerBounds = new Bounds(eyes[0].localPosition, Vector3.zero);
origins = new Vector3[eyes.Length];
for (int i = 0; i < eyes.Length; i++) {
origins[i] = eyes[i].localPosition;
centerBounds.Encapsulate(origins[i]);
}
centerPoint = centerBounds.center;
}
protected override void OnDisable () {
if (!Application.isPlaying) return;
for (int i = 0; i < eyes.Length; i++) {
eyes[i].localPosition = origins[i];
}
base.OnDisable();
}
public override void DoUpdate () {
if (target != null) targetPosition = target.position;
Vector3 goal = targetPosition;
Vector3 center = transform.TransformPoint(centerPoint);
Vector3 dir = goal - center;
if (dir.magnitude > 1)
dir.Normalize();
for (int i = 0; i < eyes.Length; i++) {
center = transform.TransformPoint(origins[i]);
eyes[i].position = Vector3.MoveTowards(eyes[i].position, center + (dir * radius * hierarchy.PositionScale),
speed * hierarchy.PositionScale * Time.deltaTime);
}
}
}
}
| {
"pile_set_name": "Github"
} |
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_AdExchangeBuyerII_ListLosingBidsResponse extends Google_Collection
{
protected $collection_key = 'creativeStatusRows';
protected $creativeStatusRowsType = 'Google_Service_AdExchangeBuyerII_CreativeStatusRow';
protected $creativeStatusRowsDataType = 'array';
public $nextPageToken;
/**
* @param Google_Service_AdExchangeBuyerII_CreativeStatusRow
*/
public function setCreativeStatusRows($creativeStatusRows)
{
$this->creativeStatusRows = $creativeStatusRows;
}
/**
* @return Google_Service_AdExchangeBuyerII_CreativeStatusRow
*/
public function getCreativeStatusRows()
{
return $this->creativeStatusRows;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
| {
"pile_set_name": "Github"
} |
{
"$schema": "http://json-schema.org/schema#",
"required": [
"kind",
"name"
],
"type": "object",
"description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
"properties": {
"apiGroup": {
"type": [
"string",
"null"
],
"description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects."
},
"kind": {
"type": [
"string",
"null"
],
"description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error."
},
"namespace": {
"type": [
"string",
"null"
],
"description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error."
},
"name": {
"type": [
"string",
"null"
],
"description": "Name of the object being referenced."
}
}
} | {
"pile_set_name": "Github"
} |
/*
* FreeRTOS Kernel V10.1.0
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/******************************************************************************
* NOTE 1: This project provides two demo applications. A simple blinky
* style project, and a more comprehensive test and demo application. The
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to
* select between the two. See the notes on using
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY in main.c. This file implements the
* comprehensive version.
*
* NOTE 2: This file only contains the source code that is specific to the
* full demo. Generic functions, such FreeRTOS hook functions, and functions
* required to configure the hardware, are defined in main.c.
*
******************************************************************************
*
* main_full() creates a set of demo application tasks and software timers, then
* starts the scheduler. The web documentation provides more details of the
* standard demo application tasks, which provide no particular functionality,
* but do provide a good example of how to use the FreeRTOS API.
*
* In addition to the standard demo tasks, the following tasks and tests are
* defined and/or created within this file:
*
* "Reg test" tasks - These fill both the core and floating point registers with
* known values, then check that each register maintains its expected value for
* the lifetime of the task. Each task uses a different set of values. The reg
* test tasks execute with a very low priority, so get preempted very
* frequently. A register containing an unexpected value is indicative of an
* error in the context switching mechanism.
*
* "Check" task - The check task period is initially set to three seconds. The
* task checks that all the standard demo tasks are not only still executing,
* but are executing without reporting any errors. If the check task discovers
* that a task has either stalled, or reported an error, then it changes its own
* execution period from the initial three seconds, to just 200ms. The check
* task also toggles an LED on each iteration of its loop. This provides a
* visual indication of the system status: If the LED toggles every three
* seconds, then no issues have been discovered. If the LED toggles every
* 200ms, then an issue has been discovered with at least one task.
*/
/* Standard includes. */
#include <stdio.h>
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "semphr.h"
/* Standard demo application includes. */
#include "flop.h"
#include "semtest.h"
#include "dynamic.h"
#include "BlockQ.h"
#include "blocktim.h"
#include "countsem.h"
#include "GenQTest.h"
#include "recmutex.h"
#include "death.h"
#include "partest.h"
#include "comtest2.h"
#include "serial.h"
#include "TimerDemo.h"
#include "QueueOverwrite.h"
#include "IntQueue.h"
#include "EventGroupsDemo.h"
#include "TaskNotify.h"
#include "IntSemTest.h"
/* Renesas includes. */
#include "rskrx231def.h"
/* Priorities for the demo application tasks. */
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
/* The period of the check task, in ms, provided no errors have been reported by
any of the standard demo tasks. ms are converted to the equivalent in ticks
using the portTICK_PERIOD_MS constant. */
#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
/* The period of the check task, in ms, if an error has been reported in one of
the standard demo tasks. ms are converted to the equivalent in ticks using the
portTICK_PERIOD_MS constant. */
#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
/* Parameters that are passed into the register check tasks solely for the
purpose of ensuring parameters are passed into tasks correctly. */
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
/* The base period used by the timer test tasks. */
#define mainTIMER_TEST_PERIOD ( 50 )
/*-----------------------------------------------------------*/
/*
* Entry point for the comprehensive demo (as opposed to the simple blinky
* demo).
*/
void main_full( void );
/*
* The full demo includes some functionality called from the tick hook.
*/
void vFullDemoTickHook( void );
/*
* The check task, as described at the top of this file.
*/
static void prvCheckTask( void *pvParameters );
/*
* Register check tasks, and the tasks used to write over and check the contents
* of the registers, as described at the top of this file. The nature of these
* files necessitates that they are written in assembly, but the entry points
* are kept in the C file for the convenience of checking the task parameter.
*/
static void prvRegTest1Task( void *pvParameters );
static void prvRegTest2Task( void *pvParameters );
void vRegTest1Implementation( void );
void vRegTest2Implementation( void );
/*
* A high priority task that does nothing other than execute at a pseudo random
* time to ensure the other test tasks don't just execute in a repeating
* pattern.
*/
static void prvPseudoRandomiser( void *pvParameters );
/*-----------------------------------------------------------*/
/* The following two variables are used to communicate the status of the
register check tasks to the check task. If the variables keep incrementing,
then the register check tasks have not discovered any errors. If a variable
stops incrementing, then an error has been found. */
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
/*-----------------------------------------------------------*/
void main_full( void )
{
/* Start all the other standard demo/test tasks. They have no particular
functionality, but do demonstrate how to use the FreeRTOS API and test the
kernel port. */
vStartInterruptQueueTasks();
vStartDynamicPriorityTasks();
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vCreateBlockTimeTasks();
vStartCountingSemaphoreTasks();
vStartGenericQueueTasks( tskIDLE_PRIORITY );
vStartRecursiveMutexTasks();
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartMathTasks( mainFLOP_TASK_PRIORITY );
vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
vStartEventGroupTasks();
vStartTaskNotifyTask();
vStartInterruptSemaphoreTasks();
/* Create the register check tasks, as described at the top of this file */
xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
/* Create the task that just adds a little random behaviour. */
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 2, NULL );
/* Create the task that performs the 'check' functionality, as described at
the top of this file. */
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* The set of tasks created by the following function call have to be
created last as they keep account of the number of tasks they expect to see
running. */
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* Start the scheduler. */
vTaskStartScheduler();
/* If all is well, the scheduler will now be running, and the following
line will never be reached. If the following line does execute, then
there was insufficient FreeRTOS heap memory available for the Idle and/or
timer tasks to be created. See the memory management section on the
FreeRTOS web site for more details on the FreeRTOS heap
http://www.freertos.org/a00111.html. */
for( ;; );
}
/*-----------------------------------------------------------*/
static void prvCheckTask( void *pvParameters )
{
TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;
TickType_t xLastExecutionTime;
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
unsigned long ulErrorFound = pdFALSE;
/* Just to stop compiler warnings. */
( void ) pvParameters;
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
works correctly. */
xLastExecutionTime = xTaskGetTickCount();
/* Cycle for ever, delaying then checking all the other tasks are still
operating without error. The onboard LED is toggled on each iteration.
If an error is detected then the delay period is decreased from
mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD. This has the
effect of increasing the rate at which the onboard LED toggles, and in so
doing gives visual feedback of the system status. */
for( ;; )
{
/* Delay until it is time to execute again. */
vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none have detected an error. */
if( xAreIntQueueTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 0UL;
}
if( xAreMathsTaskStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 1UL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 2UL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 3UL;
}
if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 4UL;
}
if ( xAreGenericQueueTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 5UL;
}
if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 6UL;
}
if( xIsCreateTaskStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 7UL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 8UL;
}
if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )
{
ulErrorFound |= 1UL << 9UL;
}
if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 10UL;
}
if( xIsQueueOverwriteTaskStillRunning() != pdPASS )
{
ulErrorFound |= 1UL << 11UL;
}
if( xAreEventGroupTasksStillRunning() != pdPASS )
{
ulErrorFound |= 1UL << 12UL;
}
if( xAreTaskNotificationTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 13UL;
}
if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 14UL;
}
/* Check that the register test 1 task is still running. */
if( ulLastRegTest1Value == ulRegTest1LoopCounter )
{
ulErrorFound |= 1UL << 15UL;
}
ulLastRegTest1Value = ulRegTest1LoopCounter;
/* Check that the register test 2 task is still running. */
if( ulLastRegTest2Value == ulRegTest2LoopCounter )
{
ulErrorFound |= 1UL << 16UL;
}
ulLastRegTest2Value = ulRegTest2LoopCounter;
/* Toggle the check LED to give an indication of the system status. If
the LED toggles every mainNO_ERROR_CHECK_TASK_PERIOD milliseconds then
everything is ok. A faster toggle indicates an error. */
LED0 = !LED0;
if( ulErrorFound != pdFALSE )
{
/* An error has been detected in one of the tasks - flash the LED
at a higher frequency to give visible feedback that something has
gone wrong (it might just be that the loop back connector required
by the comtest tasks has not been fitted). */
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
}
}
}
/*-----------------------------------------------------------*/
static void prvPseudoRandomiser( void *pvParameters )
{
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = pdMS_TO_TICKS( 35 );
volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
/* This task does nothing other than ensure there is a little bit of
disruption in the scheduling pattern of the other tasks. Normally this is
done by generating interrupts at pseudo random times. */
for( ;; )
{
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;
ulValue = ( ulNextRand >> 16UL ) & 0xffUL;
if( ulValue < ulMinDelay )
{
ulValue = ulMinDelay;
}
vTaskDelay( ulValue );
while( ulValue > 0 )
{
__asm volatile( "NOP" );
__asm volatile( "NOP" );
__asm volatile( "NOP" );
__asm volatile( "NOP" );
__asm volatile( "NOP" );
__asm volatile( "NOP" );
__asm volatile( "NOP" );
ulValue--;
}
}
}
/*-----------------------------------------------------------*/
void vFullDemoTickHook( void )
{
/* The full demo includes a software timer demo/test that requires
prodding periodically from the tick interrupt. */
vTimerPeriodicISRTests();
/* Call the periodic queue overwrite from ISR demo. */
vQueueOverwritePeriodicISRDemo();
/* Call the periodic event group from ISR demo. */
vPeriodicEventGroupsProcessing();
/* Use task notifications from an interrupt. */
xNotifyTaskFromISR();
/* Use mutexes from interrupts. */
vInterruptSemaphorePeriodicTest();
}
/*-----------------------------------------------------------*/
/* This function is explained in the comments at the top of this file. */
static void prvRegTest1Task( void *pvParameters )
{
if( pvParameters != mainREG_TEST_1_PARAMETER )
{
/* The parameter did not contain the expected value. */
for( ;; )
{
/* Stop the tick interrupt so its obvious something has gone wrong. */
taskDISABLE_INTERRUPTS();
}
}
/* This is an inline asm function that never returns. */
vRegTest1Implementation();
}
/*-----------------------------------------------------------*/
/* This function is explained in the comments at the top of this file. */
static void prvRegTest2Task( void *pvParameters )
{
if( pvParameters != mainREG_TEST_2_PARAMETER )
{
/* The parameter did not contain the expected value. */
for( ;; )
{
/* Stop the tick interrupt so its obvious something has gone wrong. */
taskDISABLE_INTERRUPTS();
}
}
/* This is an inline asm function that never returns. */
vRegTest2Implementation();
}
/*-----------------------------------------------------------*/
| {
"pile_set_name": "Github"
} |
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
| {
"pile_set_name": "Github"
} |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"# Image classification from scratch\n",
"\n",
"**Author:** [fchollet](https://twitter.com/fchollet)<br>\n",
"**Date created:** 2020/04/27<br>\n",
"**Last modified:** 2020/04/28<br>\n",
"**Description:** Training an image classifier from scratch on the Kaggle Cats vs Dogs dataset."
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Introduction\n",
"\n",
"This example shows how to do image classification from scratch, starting from JPEG\n",
"image files on disk, without leveraging pre-trained weights or a pre-made Keras\n",
"Application model. We demonstrate the workflow on the Kaggle Cats vs Dogs binary\n",
" classification dataset.\n",
"\n",
"We use the `image_dataset_from_directory` utility to generate the datasets, and\n",
"we use Keras image preprocessing layers for image standardization and data augmentation.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Setup\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"import tensorflow as tf\n",
"from tensorflow import keras\n",
"from tensorflow.keras import layers\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Load the data: the Cats vs Dogs dataset\n",
"\n",
"### Raw data download\n",
"\n",
"First, let's download the 786M ZIP archive of the raw data:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"!curl -O https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_3367a.zip\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"!unzip -q kagglecatsanddogs_3367a.zip\n",
"!ls\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"Now we have a `PetImages` folder which contain two subfolders, `Cat` and `Dog`. Each\n",
" subfolder contains image files for each category.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"!ls PetImages\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"### Filter out corrupted images\n",
"\n",
"When working with lots of real-world image data, corrupted images are a common\n",
"occurence. Let's filter out badly-encoded images that do not feature the string \"JFIF\"\n",
" in their header.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"import os\n",
"\n",
"num_skipped = 0\n",
"for folder_name in (\"Cat\", \"Dog\"):\n",
" folder_path = os.path.join(\"PetImages\", folder_name)\n",
" for fname in os.listdir(folder_path):\n",
" fpath = os.path.join(folder_path, fname)\n",
" try:\n",
" fobj = open(fpath, \"rb\")\n",
" is_jfif = tf.compat.as_bytes(\"JFIF\") in fobj.peek(10)\n",
" finally:\n",
" fobj.close()\n",
"\n",
" if not is_jfif:\n",
" num_skipped += 1\n",
" # Delete corrupted image\n",
" os.remove(fpath)\n",
"\n",
"print(\"Deleted %d images\" % num_skipped)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Generate a `Dataset`\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"image_size = (180, 180)\n",
"batch_size = 32\n",
"\n",
"train_ds = tf.keras.preprocessing.image_dataset_from_directory(\n",
" \"PetImages\",\n",
" validation_split=0.2,\n",
" subset=\"training\",\n",
" seed=1337,\n",
" image_size=image_size,\n",
" batch_size=batch_size,\n",
")\n",
"val_ds = tf.keras.preprocessing.image_dataset_from_directory(\n",
" \"PetImages\",\n",
" validation_split=0.2,\n",
" subset=\"validation\",\n",
" seed=1337,\n",
" image_size=image_size,\n",
" batch_size=batch_size,\n",
")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Visualize the data\n",
"\n",
"Here are the first 9 images in the training dataset. As you can see, label 1 is \"dog\"\n",
" and label 0 is \"cat\".\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"plt.figure(figsize=(10, 10))\n",
"for images, labels in train_ds.take(1):\n",
" for i in range(9):\n",
" ax = plt.subplot(3, 3, i + 1)\n",
" plt.imshow(images[i].numpy().astype(\"uint8\"))\n",
" plt.title(int(labels[i]))\n",
" plt.axis(\"off\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Using image data augmentation\n",
"\n",
"When you don't have a large image dataset, it's a good practice to artificially\n",
"introduce sample diversity by applying random yet realistic transformations to the\n",
"training images, such as random horizontal flipping or small random rotations. This\n",
"helps expose the model to different aspects of the training data while slowing down\n",
" overfitting.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"data_augmentation = keras.Sequential(\n",
" [\n",
" layers.experimental.preprocessing.RandomFlip(\"horizontal\"),\n",
" layers.experimental.preprocessing.RandomRotation(0.1),\n",
" ]\n",
")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"Let's visualize what the augmented samples look like, by applying `data_augmentation`\n",
" repeatedly to the first image in the dataset:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"plt.figure(figsize=(10, 10))\n",
"for images, _ in train_ds.take(1):\n",
" for i in range(9):\n",
" augmented_images = data_augmentation(images)\n",
" ax = plt.subplot(3, 3, i + 1)\n",
" plt.imshow(augmented_images[0].numpy().astype(\"uint8\"))\n",
" plt.axis(\"off\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Standardizing the data\n",
"\n",
"Our image are already in a standard size (180x180), as they are being yielded as\n",
"contiguous `float32` batches by our dataset. However, their RGB channel values are in\n",
" the `[0, 255]` range. This is not ideal for a neural network;\n",
"in general you should seek to make your input values small. Here, we will\n",
"standardize values to be in the `[0, 1]` by using a `Rescaling` layer at the start of\n",
" our model.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Two options to preprocess the data\n",
"\n",
"There are two ways you could be using the `data_augmentation` preprocessor:\n",
"\n",
"**Option 1: Make it part of the model**, like this:\n",
"\n",
"```python\n",
"inputs = keras.Input(shape=input_shape)\n",
"x = data_augmentation(inputs)\n",
"x = layers.experimental.preprocessing.Rescaling(1./255)(x)\n",
"... # Rest of the model\n",
"```\n",
"\n",
"With this option, your data augmentation will happen *on device*, synchronously\n",
"with the rest of the model execution, meaning that it will benefit from GPU\n",
" acceleration.\n",
"\n",
"Note that data augmentation is inactive at test time, so the input samples will only be\n",
" augmented during `fit()`, not when calling `evaluate()` or `predict()`.\n",
"\n",
"If you're training on GPU, this is the better option.\n",
"\n",
"**Option 2: apply it to the dataset**, so as to obtain a dataset that yields batches of\n",
" augmented images, like this:\n",
"\n",
"```python\n",
"augmented_train_ds = train_ds.map(\n",
" lambda x, y: (data_augmentation(x, training=True), y))\n",
"```\n",
"\n",
"With this option, your data augmentation will happen **on CPU**, asynchronously, and will\n",
" be buffered before going into the model.\n",
"\n",
"If you're training on CPU, this is the better option, since it makes data augmentation\n",
" asynchronous and non-blocking.\n",
"\n",
"In our case, we'll go with the first option.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Configure the dataset for performance\n",
"\n",
"Let's make sure to use buffered prefetching so we can yield data from disk without\n",
" having I/O becoming blocking:\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"train_ds = train_ds.prefetch(buffer_size=32)\n",
"val_ds = val_ds.prefetch(buffer_size=32)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Build a model\n",
"\n",
"We'll build a small version of the Xception network. We haven't particularly tried to\n",
"optimize the architecture; if you want to do a systematic search for the best model\n",
" configuration, consider using\n",
"[Keras Tuner](https://github.com/keras-team/keras-tuner).\n",
"\n",
"Note that:\n",
"\n",
"- We start the model with the `data_augmentation` preprocessor, followed by a\n",
" `Rescaling` layer.\n",
"- We include a `Dropout` layer before the final classification layer.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"\n",
"def make_model(input_shape, num_classes):\n",
" inputs = keras.Input(shape=input_shape)\n",
" # Image augmentation block\n",
" x = data_augmentation(inputs)\n",
"\n",
" # Entry block\n",
" x = layers.experimental.preprocessing.Rescaling(1.0 / 255)(x)\n",
" x = layers.Conv2D(32, 3, strides=2, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
" x = layers.Activation(\"relu\")(x)\n",
"\n",
" x = layers.Conv2D(64, 3, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
" x = layers.Activation(\"relu\")(x)\n",
"\n",
" previous_block_activation = x # Set aside residual\n",
"\n",
" for size in [128, 256, 512, 728]:\n",
" x = layers.Activation(\"relu\")(x)\n",
" x = layers.SeparableConv2D(size, 3, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
"\n",
" x = layers.Activation(\"relu\")(x)\n",
" x = layers.SeparableConv2D(size, 3, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
"\n",
" x = layers.MaxPooling2D(3, strides=2, padding=\"same\")(x)\n",
"\n",
" # Project residual\n",
" residual = layers.Conv2D(size, 1, strides=2, padding=\"same\")(\n",
" previous_block_activation\n",
" )\n",
" x = layers.add([x, residual]) # Add back residual\n",
" previous_block_activation = x # Set aside next residual\n",
"\n",
" x = layers.SeparableConv2D(1024, 3, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
" x = layers.Activation(\"relu\")(x)\n",
"\n",
" x = layers.GlobalAveragePooling2D()(x)\n",
" if num_classes == 2:\n",
" activation = \"sigmoid\"\n",
" units = 1\n",
" else:\n",
" activation = \"softmax\"\n",
" units = num_classes\n",
"\n",
" x = layers.Dropout(0.5)(x)\n",
" outputs = layers.Dense(units, activation=activation)(x)\n",
" return keras.Model(inputs, outputs)\n",
"\n",
"\n",
"model = make_model(input_shape=image_size + (3,), num_classes=2)\n",
"keras.utils.plot_model(model, show_shapes=True)\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Train the model\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"epochs = 50\n",
"\n",
"callbacks = [\n",
" keras.callbacks.ModelCheckpoint(\"save_at_{epoch}.h5\"),\n",
"]\n",
"model.compile(\n",
" optimizer=keras.optimizers.Adam(1e-3),\n",
" loss=\"binary_crossentropy\",\n",
" metrics=[\"accuracy\"],\n",
")\n",
"model.fit(\n",
" train_ds, epochs=epochs, callbacks=callbacks, validation_data=val_ds,\n",
")\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"We get to ~96% validation accuracy after training for 50 epochs on the full dataset.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"## Run inference on new data\n",
"\n",
"Note that data augmentation and dropout are inactive at inference time.\n"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab_type": "code"
},
"outputs": [],
"source": [
"img = keras.preprocessing.image.load_img(\n",
" \"PetImages/Cat/6779.jpg\", target_size=image_size\n",
")\n",
"img_array = keras.preprocessing.image.img_to_array(img)\n",
"img_array = tf.expand_dims(img_array, 0) # Create batch axis\n",
"\n",
"predictions = model.predict(img_array)\n",
"score = predictions[0]\n",
"print(\n",
" \"This image is %.2f percent cat and %.2f percent dog.\"\n",
" % (100 * (1 - score), 100 * score)\n",
")\n"
]
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"name": "image_classification_from_scratch",
"private_outputs": false,
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
} | {
"pile_set_name": "Github"
} |
# a10disp
local package_name="a10disp"
local package_repo="https://github.com/hglm/a10disp.git"
local package_ref="branch:master"
local package_builddeps="linux-headers-armmp"
local package_install_target="a10disp"
local package_component="${release}-utils"
package_checkbuild()
{
# we don't support running kernels < 3.13 on Stretch or Bionic
[[ $arch == armhf && $release == jessie ]]
}
package_checkinstall()
{
[[ ( $LINUXFAMILY == sun4i || $LINUXFAMILY == sun7i ) && $RELEASE != stretch && $RELEASE != bionic && $BRANCH == default ]]
}
| {
"pile_set_name": "Github"
} |
<h1 align=center>JavaScript and TypeScript tooling overview</h1>
<p align=center aria-hidden=true>
<a href="https://GitHub.com/slikts/tooling/graphs/contributors/" target="_blank"><img src="https://img.shields.io/github/contributors/slikts/tooling.svg" alt="GitHub contributors"></a>
<a href="https://GitHub.com/slikts/tooling/issues/" target="_blank"><img src="https://img.shields.io/github/issues/slikts/tooling.svg" alt="GitHub issues"></a>
<img alt="GitHub" src="https://img.shields.io/github/license/slikts/tooling">
<a href="https://github.com/slikts/tooling/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/slikts/tooling?style=social"></a>
</p>
A quick and up-to-date overview of existing build and developer tools for JavaScript and TypeScript.
The intended audience is project maintainers and tool authors. The list is selective; [non-recommended][non-rec] tools are listed separately. Existing resources with a similar focus on tooling are [listed][also] at the end; the motivation for this list is filling a gap in them.
The list format includes links to project homepages (if they exist), GitHub pages, and [npm trends] comparisons where applicable. The format differs from the [awesome] template by being slightly more detailed and opinionated.
Criticism, adding omissions and other contributions are [welcome][issues].
[issues]: https://github.com/slikts/tooling/issues
[also]: #🙈-see-also
[awesome]: https://github.com/sindresorhus/awesome
[npm trends]: https://www.npmtrends.com/
## 🔥 Zero-config presets
> [_npm trends_](https://www.npmtrends.com/create-react-app-vs-neutrino-vs-@pika/pack-vs-nwb-vs-tsdx) 📈
Presets, generators or [initializers](https://docs.npmjs.com/cli/init) that don't require configuration to start using them. Presets are recommended when starting out and to save the time and effort of building and maintaing a custom stack, but can be limited in certain aspects.
- [**@pika/pack**](https://www.pika.dev/blog/introducing-pika-pack/) ([GitHub](https://github.com/pikapkg/pack))
- Build `npm` packages using composable plugins
- **nwb** ([GitHub](https://github.com/insin/nwb))
- Toolkit for quick development with React, Inferno, Preact or vanilla JavaScript
- **TSDX** ([GitHub](https://github.com/jaredpalmer/tsdx))
- Library-oriented preset for TypeScript
- [**Neutrino**](https://neutrinojs.org/) ([GitHub](https://github.com/neutrinojs/neutrino/))
- Zero-configuration presets for React, Preact, Vue, web and Node.js projects and libraries; lacks TypeScript support
### React presets and frameworks
- [**Create React App**](https://create-react-app.dev/) ([GitHub](https://github.com/facebook/create-react-app))
- The most popular React project initializer; supports TypeScript and many other tools, and is a safe choice for starting a React app
- [**Next.js**](https://nextjs.org/) ([GitHub](https://github.com/zeit/next.js))
- React framework for server-side rendering
- [**Gatsby**](https://www.gatsbyjs.org/) ([GitHub](https://github.com/gatsbyjs/gatsby))
- PWA and static site generator
- [**React Starter Kit**](https://reactstarter.com/) ([GitHub](https://github.com/kriasoft/react-starter-kit))
- "[Isomorphic](https://medium.com/airbnb-engineering/isomorphic-javascript-the-future-of-web-apps-10882b7a2ebc#.4nyzv6jea)" (universal) web app boilerplate
### Toolchains
- [**Rome**](https://romejs.dev/) ([GitHub](https://github.com/facebookexperimental/rome))
- Rome is an experimental JavaScript toolchain from Facebook which includes a compiler, linter, formatter, bundler, testing framework and more
## 🚚 Bundlers
> [_npm trends_](https://www.npmtrends.com/parcel-vs-webpack-vs-rollup-vs-fuse-box-vs-poi-vs-microbundle-vs-happypack-vs-fastpack-vs-webpack-jarvis-vs-browserify) 📈
- [**webpack**](https://webpack.js.org/) ([GitHub](https://github.com/webpack/webpack))
- The most popular bundler with a wide ecosystem of plugins; used by popular tools like Create React App
- [**Rollup**](https://rollupjs.org/) ([GitHub](https://github.com/rollup/rollup))
- A bundler often used specifically for bundling libraries; requires plugins for TypeScript support (see TypeScript section below)
- [**Parcel**](https://parceljs.org/) ([GitHub](https://github.com/parcel-bundler/parcel))
- A fast, zero-configuration bundler; builtin TypeScript support
- [**FuseBox**](https://fuse-box.org/) ([GitHub](https://github.com/fuse-box/fuse-box))
- Fast bundler with many features and builtin publishing and TypeScript support
- **microbundle** ([GitHub](https://github.com/developit/microbundle))
- Fast, zero-configuration bundler that aims to reduce bundle size; supports TypeScript out of the box
- [**Poi**](https://poi.js.org/) ([GitHub](https://github.com/egoist/poi))
- Zero-config bundler based on webpack
- [**browserify**](http://browserify.org/) ([GitHub](https://github.com/browserify/browserify))
- The first JavaScript bundler around
### Other
- [**Prepack**](https://prepack.io/) ([GitHub](https://github.com/facebook/prepack))
- Bundle optimizer
- [**Snowpack**](https://snowpack.dev/) ([GitHub](https://github.com/pikapkg/snowpack))
- Used by Pika
## 👨💻 Compilers
Tools that allow "transcompiling" or "transpiling" JavaScript.
- [**Babel**](https://babeljs.io/) ([GitHub](https://github.com/babel/babel))
- A tool to "downlevel compile" modern JavaScript to support older browsers; also used to add features like JSX to the language
- [**`@babel/preset-env`**](https://babeljs.io/docs/en/babel-preset-env)
- Tune Babel output for the minimum required level of browser support
- [**swc**](https://swc-project.github.io/) ([GitHub](https://github.com/swc-project/swc))
- Very fast Babel alternative written in Rust
- [**TypeScript**](https://www.typescriptlang.org/) ([GitHub](https://github.com/microsoft/TypeScript))<span id="typescript"></span>
- JavaScript with gradual typing; particularly useful for library authors and larger projects
## 🧫 Code generators
> [_npm trends_](https://www.npmtrends.com/hygen-vs-plop) 📈
- [**hygen**](http://www.hygen.io/) ([GitHub](https://github.com/jondot/hygen))
- Ad-hoc generator or project scaffold tool
- [**plop**](http://plopjs.com/) ([GitHub](https://github.com/plopjs/plop))
- Boilerplate micro-generator framework
## 💅 Formatters and linters
> [_npm trends_](https://www.npmtrends.com/eslint-vs-prettier-vs-xo-vs-standard-vs-eslint-config-airbnb-vs-tslint-vs-eslint-config-google-vs-jshint-vs-js-beautify-vs-zoe) 📈
- [**ESLint**](https://eslint.org/) ([GitHub](https://github.com/eslint/eslint))
- The defacto standard linter for JavaScript (and TypeScript since `typescript-eslint`)
- `eslint-config-airbnb` ([GitHub](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb))
- The most popular ruleset for ESLint; relatively conservative
- [**Standard**](https://standardjs.com/) ([GitHub](https://github.com/standard/standard))
- A popular ruleset, although the "standard" name is more tongue in cheek
- [**`typescript-eslint`**](https://typescript-eslint.io/) ([GitHub](https://github.com/typescript-eslint/typescript-eslint))
- Replacement for the now-deprecated TSLint
- **`eslint-config-es`** ([GitHub](https://github.com/thenativeweb/eslint-config-es))
- ESLint configuration with a focus on strictness; supports TypeScript, React
- [**Prettier**](https://prettier.io/) ([GitHub](https://github.com/prettier/prettier))
- Opinionated formatter for JavaScript and TypeScript; useful for automatically enforcing consistent formatting and hence, for example, simplifying code reviews
- `prettier-eslint` ([GitHub](https://github.com/prettier/prettier-eslint))
- Allows using Prettier as an ESLint plugin
- `eslint-config-prettier` ([GitHub](https://github.com/prettier/eslint-config-prettier))
- Prevents ESLint conflicts with Prettier
- `pretty-quick` ([GitHub](https://github.com/azz/pretty-quick))
- Skips running Prettier on unchanged files
- **XO** ([GitHub](https://github.com/xojs/xo))
- Opinionated (zero-config), configurable ESLint wrapper
- **vscode-linter-xo** ([GitHub](https://github.com/SamVerschueren/vscode-linter-xo))
- XO doesn't integrate with ESLint tools, so it requires special support in editors
- **Zoe** ([GitHub](https://github.com/jorgegonzalez/zoe))
- Zero-config ESLint toolchain; includes Prettier and supports Jest and React
- [**dprint**](https://dprint.dev) ([GitHub](https://github.com/dprint/dprint))
- TypeScript, JavaScript, and JSONC formatter implemented in Rust; supports Prettier 2.0's ruleset
## 🐌 Runtimes
- [**Node.js**](https://nodejs.org/) ([GitHub](https://github.com/nodejs/node))
- The de facto standard runtime for JavaScript; includes the `npm` and `npx` tools
- [**`babel-node`**](https://babeljs.io/docs/en/next/babel-node.html)
- Can execute or provide a REPL for, e.g., TypeScript
- [**Deno**](https://deno.land/) ([GitHub](https://github.com/denoland/deno))
- JavaScript and TypeScript runtime with an alternative module design
- **ts-node** ([GitHub](https://github.com/TypeStrong/ts-node))
### Version managers
- **`nvm`** ([GitHub](https://github.com/nvm-sh/nvm))
- A commonly used version manager for Node.js
- **`fnm`** ([GitHub](https://github.com/Schniz/fnm))
- Fast Node Manager; built in native ReasonML
- [**Volta**](https://volta.sh/) ([GitHub](https://github.com/volta-cli/volta))
- Fast, reliable and universal version manager for the whole Node.js toolchain; written in Rust
## 🏃 Testing
Tools for end-to-end, integration and unit testing.
### Test libraries and frameworks
> [_npm trends_](https://www.npmtrends.com/mocha-vs-chai-vs-jest-vs-jasmine-vs-expect.js-vs-should-vs-sinon-vs-testdouble) 📈
- [**Mocha**](https://mochajs.org/) ([GitHub](https://github.com/mochajs/mocha))
- Test framework
- [**Jasmine**](https://jasmine.github.io/) ([GitHub](https://github.com/jasmine/jasmine))
- BDD testing framework
- [**Chai**](https://www.chaijs.com/) ([GitHub](https://github.com/chaijs/chai))
- BDD or TDD assertion library for Node.js and browsers
- [**Sinon**](https://sinonjs.org/) ([GitHub](https://github.com/sinonjs/sinon))
- Test spies, stubs and mocks
- **testdouble.js** ([GitHub](https://github.com/testdouble/testdouble.js))
- A minimal test double library for TDD
- **Doctest** ([GitHub](https://github.com/davidchambers/doctest))
- Executable usage examples in comments for JavaScript and CoffeeScript
#### "Over the wire" test doubles
> [_npm trends_](https://www.npmtrends.com/nock-vs-supertest-vs-mountebank-vs-chai-http) 📈
- **Nock** ([GitHub](https://github.com/nock/nock#readme))
- HTTP server mocking and expectations library for Node.js
- **SuperTest** ([GitHub](https://github.com/visionmedia/supertest))
- HTTP assertions using [superagent](http://github.com/visionmedia/superagent)
- [**Mountebank**](http://www.mbtest.org/) ([GitHub](https://github.com/bbyars/mountebank))
- Service virtualization tool with support for mock verification, stubbing with advanced predicates, JavaScript injection, and record-playback through proxying; supports HTTP, TCP and SMTP and can support custom protocols
- [**Chai HTTP**](http://chaijs.com/plugins/chai-http) ([GitHub](https://github.com/chaijs/chai-http))
- HTTP integration testing addon for Chai
### Test runners
> [_npm trends_](https://www.npmtrends.com/testcafe-vs-cypress-vs-jest-vs-karma-vs-ava-vs-nightwatch-vs-puppeteer) 📈
- [**Jest**](https://jestjs.io/) ([GitHub](https://github.com/facebook/jest))
- Popular, well-polished test runner; supports TypeScript via `@babel/preset-typescript` and `babel-jest`; includes tools for spies, stubs, mocks and assertions
- **Majestic** ([GitHub](https://github.com/Raathigesh/majestic))
- GUI for Jest
- [**`jest-stare`**](https://dkelosky.github.io/jest-stare/) ([GitHub](https://github.com/dkelosky/jest-stare))
- Jest HTML reporter
- [**Karma**](https://karma-runner.github.io/) ([GitHub](https://github.com/karma-runner/karma))
- Test runner for browsers
- **AVA** ([GitHub](https://github.com/avajs/ava))
- [**Wallaby**](https://wallabyjs.com/) ([GitHub](https://github.com/wallabyjs/public))
- Non-free; integrates test output in the editor
- **Teston** ([GitHub](https://github.com/testonjs/teston))
- Fast test runner similar to [tape](https://github.com/substack/tape), but with ES6 module support and simpler subtest syntax
#### End-to-end testing focused frameworks
- [**TestCafe**](https://devexpress.github.io/testcafe/) ([GitHub](https://github.com/DevExpress/testcafe))
- Automate end-to-end web testing
- [**Cypress**](https://www.cypress.io/)
- End-to-end test runner
- **`cypress-testing-library`** ([GitHub](https://github.com/testing-library/cypress-testing-library))
- Custom Cypress commands and utilities to avoid testing implementation details
- [**Nightwatch**](https://nightwatchjs.org/) ([GitHub](https://github.com/nightwatchjs/nightwatch))
- [**Puppeteer**](https://pptr.dev/) ([GitHub](https://github.com/puppeteer/puppeteer))
- Library for controlling headless Chrome or Chromium instances
- **Playwright** ([GitHub](https://github.com/microsoft/playwright))
- Node library to automate the Chromium, WebKit and Firefox browsers with a single API; made by Microsoft
### React testing
- [**Enzyme**](https://enzymejs.github.io/enzyme/) ([GitHub](https://github.com/enzymejs/enzyme))
- Assert, manipulate and traverse React components
- [**React Testing Library**](https://testing-library.com/react) ([GitHub](https://github.com/testing-library/react-testing-library))
- Focused on avoiding testing implementation details
## 🐇 Performance
### Benchmarking and profiling
- **Benny** ([GitHub](https://github.com/caderek/benny))
- Simple benchmark framework
- [**Clinic.js**](https://clinicjs.org) ([GitHub](https://github.com/nearform/node-clinic))
- Node.js performance profiling suite
### Performance monitoring
- [**Falco**](https://getfal.co) ([GitHub](https://github.com/theodo/falco))
- Automatically audit performance with [WebPageTest](https://www.webpagetest.org/)
### React performance
- [**`storybook-addon-performance`**](https://storybook-addon-performance.netlify.com) ([GitHub](https://github.com/atlassian-labs/storybook-addon-performance))
- Storybook addon for debugging React component performance
## 📚 Documentation generators
> [_npm trends_](https://www.npmtrends.com/docz-vs-docusaurus-vs-docsify-vs-docute-vs-jsdoc-vs-esdoc-vs-typedoc) 📈
- [**Docz**](https://www.docz.site/) ([GitHub](https://github.com/doczjs/docz))
- Creates live-reloading, seo-friendly, production-ready documentation sites with MDX; based on Gatsby
- [**Docusaurus**](https://docusaurus.io/) ([GitHub](https://github.com/facebook/Docusaurus))
- A popular, full-featured documentation generator
- [**docsify**](https://docsify.js.org/) ([GitHub](https://github.com/docsifyjs/docsify/))
- Simple docs with an option to skip generating static files
- [**TypeDoc**](https://typedoc.org/) ([GitHub](https://github.com/TypeStrong/typedoc))
- Generates API documentation from TypeScript
- `typedoc-plugin-markdown` ([GitHub](https://github.com/tom-grey/typedoc-plugin-markdown))
- Allows using the generated docs with Docusaurus
- [**ESDoc**](https://esdoc.org/) ([GitHub](https://github.com/esdoc/esdoc))
- JavaScript API documentation generator
## ☂️ Monorepos
- [**awesome-monorepo**](https://github.com/korfuri/awesome-monorepo)
- List of monorepo resources
### Monorepo managers
> [_npm trends_](https://www.npmtrends.com/lerna-vs-bolt-vs-mondorepo-vs-oao-vs-@microsoft/rush-vs-create-nx-workspace) 📈
- [**Lerna**](https://lerna.js.org/) ([GitHub](https://github.com/lerna/lerna))
- The most popular solution for managing monorepos
- [**Rush**](https://rushjs.io/) ([GitHub](https://github.com/microsoft/rushstack/))
- Part of the Rush stack by Microsoft
- **Yarn** [**workspaces**](https://classic.yarnpkg.com/en/docs/workspaces/)
- Can be used alone or in conjunction with Lerna
- [**Bolt**](http://boltpkg.com/) ([GitHub](https://github.com/boltpkg/bolt))
- JavaScript project management based on Yarn
- **oao** ([GitHub](https://github.com/guigrpa/oao))
- Yarn-based, opinionated
### Other
- [**nx**](https://nx.dev/) ([GitHub](https://github.com/nrwl/nx))
- Automated (zero-config), extensible dev tool setup for monorepos
- **syncpack** ([GitHub](https://github.com/JamieMason/syncpack))
- Manage multiple `package.json` files
## 🚀 Deployment and release tools
> [_npm trends_](https://www.npmtrends.com/semantic-release-vs-standard-version-vs-release-it-vs-shipit-cli-vs-gh-pages-vs-shipjs-vs-publish-please) 📈
- [**semantic-release**](https://semantic-release.gitbook.io/) ([GitHub](https://github.com/semantic-release/semantic-release))
- Automated version management and package publishing based on [semver](https://semver.org/)
- **Shipit** ([GitHub](https://github.com/shipitjs/shipit))
- Automation engine and a deployment tool; alternative to Capistrano
- **`release-it`** ([GitHub](https://github.com/release-it/release-it))
- Automated versioning and package publishing
- [**Ship.js**](https://community.algolia.com/shipjs/) ([GitHub](https://github.com/algolia/shipjs))
- [**Conventional Commits**](https://www.conventionalcommits.org/)
- A specification for adding human and machine readable meaning to commit messages
- **Standard Version** ([GitHub](https://github.com/conventional-changelog/standard-version))
- Like **semantic-release** but without the automatic publishing
- **`gh-pages`** ([GitHub](https://github.com/tschaub/gh-pages))
- Publish files to a `gh-pages` branch on GitHub (or any other branch)
- [**Tutorial**](https://github.com/gitname/react-gh-pages) about using `gh-pages` with CRA
- **`publish-please`** ([GitHub](https://github.com/inikulin/publish-please))
- Replacement for `npm publish`
## 🚩 TypeScript
- [**GraphQL Code Generator**](https://graphql-code-generator.com/) ([GitHub](https://github.com/dotansimha/graphql-code-generator))
- Generate TypeScript types from GraphQL schema; invaluable for large projects
- **graphql-let** ([GitHub](https://github.com/piglovesyou/graphql-let))
- **tsd** ([GitHub](https://github.com/SamVerschueren/tsd))
- Check TypeScript type definitions with assertions
- A recent alternative is [`@ts-expect-error`](https://github.com/microsoft/TypeScript/pull/36014)
- [**AssemblyScript**](https://docs.assemblyscript.org/) ([GitHub](https://github.com/AssemblyScript/assemblyscript))
- Compile TypeScript to WASM
- [**ts-jest**](https://kulshekhar.github.io/ts-jest) ([GitHub](https://github.com/kulshekhar/ts-jest))
- TypeScript preprocessor with sourcemap support for Jest
- **`gts`** ([GitHub](https://github.com/google/gts))
- Google TypeScript Style; zero-configuration formatting, linting and code fixing
- **`tsc-watch`** ([GitHub](https://github.com/gilamran/tsc-watch))
- `nodemon` for TypeScript
- [**Tsearch**](https://tsearch.io) ([GitHub](https://github.com/tsearch-io/tsearch))
- Search functions in different packages by their type signature
- **`dts-bundle-generator`** ([GitHub](https://github.com/timocov/dts-bundle-generator))
- Tool to generate a single bundle of dts
### Documentation
- [**TSDoc**](https://microsoft.github.io/tsdoc/) ([GitHub](https://github.com/microsoft/tsdoc))
- A documentation comment standard
- [**API Extractor**](https://api-extractor.com/) ([GitHub](https://github.com/microsoft/rushstack/blob/master/apps/api-extractor/README.md))
- Analysis tool that can extract API reports for an API review workflow, bundle multiple declaration files into one, and extract a documentation model and generate an API reference website from it
- See also: [**TypeDoc**](#📚-documentation-generators)
### Rollup plugins
> [_npm trends_](https://www.npmtrends.com/@wessberg/rollup-plugin-ts-vs-rollup-plugin-typescript2) 📈
Useful for generating library type definitions; can be replaced with `tsc` for applications.
- **`@wessberg/rollup-plugin-ts`** ([GitHub](https://github.com/wessberg/rollup-plugin-ts))
- A more modern but slightly less mature alternative to `rollup-plugin-typescript2`
- **`rollup-plugin-typescript2`** ([GitHub](https://github.com/ezolenko/rollup-plugin-typescript2/))
## 📦 Package management
### Package managers
> [_npm trends_](https://www.npmtrends.com/yarn-vs-pnpm-vs-tink-vs-npm) 📈
- **npm** ([GitHub](https://github.com/npm/cli))
- The package manager included with Node.js
- [**Yarn**](https://yarnpkg.com/) ([GitHub](https://github.com/yarnpkg/yarn))
- Replacement for `npm`
- Recently released [Yarn 2](https://dev.to/arcanis/introducing-yarn-2-4eh1)
- **tink** ([GitHub](https://github.com/npm/tink))
- Experimental "dependency unwinder"
- [**pnpm**](https://pnpm.js.org/en/) ([GitHub](https://github.com/pnpm/pnpm))
- Links dependencies instead of copying to save space
- [**entropic**](https://discourse.entropic.dev/) ([GitHub](https://github.com/entropic-dev/entropic))
- Federated package registry aiming to [replace npm](https://youtu.be/MO8hZlgK5zc)
### Package search, vetting
- [**Pika**](https://www.pika.dev/search)
- [**npm trends**](https://www.npmtrends.com/)
- [**npms**](https://npms.io/)
### Git hook managers
> [_npm trends_](https://www.npmtrends.com/husky-vs-@arkweid/lefthook-vs-pre-commit) 📈
- **Husky** ([GitHub](https://github.com/typicode/husky))
- **`lint-staged`** ([GitHub](https://github.com/okonet/lint-staged))
- **Lefthook** ([GitHub](https://github.com/Arkweid/lefthook))
- [**Comparison**](https://github.com/Arkweid/lefthook/wiki/Comparison-with-other-solutions) with other solutions
### Desktop packaging
- **Electron Packager** ([GitHub](https://github.com/electron/electron-packager))
- **nexe** ([GitHub](https://github.com/nexe/nexe))
### Executables
- **`pkg`** ([GitHub](https://github.com/zeit/pkg))
### Other
- **`patch-package`** ([GitHub](https://github.com/ds300/patch-package))
- Fix issues with packages without having to fork them or waiting
- **`npm-package-scripts`** (`nps`) ([GitHub](https://github.com/sezna/nps))
- A specialized tool for having complex `npm` scripts
- **`bundlesize`** ([GitHub](https://github.com/siddharthkp/bundlesize))
- Set configurable bundle size limits
- **Size Limit** ([GitHub](https://github.com/ai/size-limit))
- Performance budget tool
- **Depcheck** ([GitHub](https://github.com/depcheck/depcheck))
- Check `npm` packages for unused dependencies
- **`why-npm-i-so-long`** ([GitHub](https://github.com/antonk52/why-npm-i-so-long))
- [**Package Phobia**](https://packagephobia.now.sh/) ([GitHub](https://github.com/styfle/packagephobia))
- **`nrm`** ([GitHub](https://github.com/Pana/nrm))
- `npm` registry manager; fast switch between different registries
- [**Open-Registry**](https://open-registry.dev/)
- Community-funded mirror of the `npm` registry
- [**Dependency cruiser**](https://npmjs.com/dependency-cruiser) ([GitHub](https://github.com/sverweij/dependency-cruiser))
- Validate and visualize dependencies
## 💡 Create React App
> [_npm trends_](https://www.npmtrends.com/react-app-rewired-vs-@craco/craco-vs-customize-cra) 📈
Create React App purposely limits its configurability to be able to give developer guarantees, but there are advanced use cases that require configuration while still avoiding "ejecting" from Create React App.
- **craco** ([GitHub](https://github.com/gsoft-inc/craco))
- **react-app-rewired** ([GitHub](https://github.com/timarney/react-app-rewired))
## 🎨 Design systems and prototyping
> [_npm trends_](https://www.npmtrends.com/@storybook/cli-vs-react-styleguidist-vs-@compodoc/compodoc-vs-react-cosmos-vs-playroom) 📈
Tools for developing and testing components and for creating style guides and reusable collections of components.
- [**Storybook**](https://storybook.js.org/) ([GitHub](https://github.com/storybookjs/storybook))
- The most popular solution for developing and testing component libraries
- [**React Styleguidist**](https://react-styleguidist.js.org/) ([GitHub](https://github.com/styleguidist/react-styleguidist))
- Isolated React component development environment with a living style guide
- **Playroom** ([GitHub](https://github.com/seek-oss/playroom))
- Design for different screen sizes and themes at the same time using React
- [**React Cosmos**](https://reactcosmos.org/) ([GitHub](https://github.com/react-cosmos/react-cosmos))
- A development environment for scalable, high-quality UIs and visual TDD
- [**Diez**](https://diez.org/) ([GitHub](https://github.com/diez/diez))
- Developer toolkit for building [design tokens](https://diez.org/glossary/#tokens)
- [**React Figma**](https://react-figma.now.sh/) ([GitHub](https://github.com/react-figma/react-figma))
- Render React components to [Figma](https://www.figma.com/)
## ❌ Cross-platform
- **`cross-env`** ([GitHub](https://github.com/kentcdodds/cross-env))
- Set and use environment variables across platforms
- **`shx`** ([GitHub](https://github.com/shelljs/shx))
- Unix-like shell commands
## 🗿 GraphQL
- **`eslint-plugin-graphql`** ([GitHub](https://github.com/apollographql/eslint-plugin-graphql))
- ESLint plugin to validate GraphQL query strings against a schema
## ✔ Static type checkers
- [**Hegel**](https://hegel.js.org) ([GitHub](https://github.com/JSMonk/hegel))
- [**Flow**](https://flow.org/) ([GitHub](https://github.com/facebook/flow))
- See also: [**TypeScript**](#typescript)
## 🚧 Unvetted or uncategorized
### TypeScript
- **`node-typescript-boilerplate`** ([GitHub](https://github.com/jsynowiec/node-typescript-boilerplate))
- **`ttypescript`** ([GitHub](https://github.com/cevek/ttypescript))
- Wraps `tsc` to enable transforming the compiled code
- **TypeScript Node Starter** ([GitHub](https://github.com/microsoft/TypeScript-Node-Starter))
- Microsoft's end-to-end project setup for Node.js using TypeScript
#### webpack plugins
- **`ts-loader`** ([GitHub](https://github.com/TypeStrong/ts-loader))
- TypeScript loader for webpack
- [**Fork TS Checker Webpack Plugin**](https://blog.johnnyreilly.com/2019/07/typescript-and-eslint-meet-fork-ts-checker-webpack-plugin.html) ([GitHub](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin))
- Runs TypeScript type checker in a separate process from webpack
### React
- **`react-axe`** ([GitHub](https://github.com/dequelabs/react-axe))
- Accessibility auditing for React apps
- [**Loadable Components**](https://loadable-components.com/) ([GitHub](https://github.com/gregberge/loadable-components))
- **`react-loadable`** ([GitHub](https://github.com/jamiebuilds/react-loadable))
### Package management
- **`reg`** ([GitHub](https://github.com/mikeal/reg))
- Experimental package manager for native ES modules
- **Yarn deduplicate** ([GitHub](https://github.com/atlassian/yarn-deduplicate))
- Deduplication tool for `yarn.lock` files
### GraphQL
- [**`babel-blade`**](https://babel-blade.netlify.com/) ([GitHub](https://github.com/babel-blade/babel-blade))
- Babel plugin/macro that generates GraphQL query strings inline to solve the [double declaration problem](https://babel-blade.netlify.com/docs/declarationdeclaration.html)
### React
- **`jest-react-profiler`** ([GitHub](https://github.com/bvaughn/jest-react-profiler))
- Jest helpers for working with the React Profiler API
### Linting
- **`eslint-plugin-filenames`** ([GitHub](https://github.com/selaux/eslint-plugin-filenames))
- **`ls-lint`** ([GitHub](https://github.com/loeffel-io/ls-lint))
### WebExtensions
- **web-extension-starter** ([GitHub](https://github.com/abhijithvijayan/web-extension-starter))
- **Chrome Extension CLI** ([GitHub](https://github.com/dutiyesh/chrome-extension-cli))
- **Chrome Extension Boilerplate** ([GitHub](https://github.com/duo-labs/chrome-extension-boilerplate))
- **Web Store Upload CLI** ([GitHub](https://github.com/DrewML/chrome-webstore-upload-cli))
#### Extension testing
- **`sinon-chrome`** ([GitHub](https://github.com/acvetkov/sinon-chrome))
### Other
- [**Metro**](https://facebook.github.io/metro/) ([GitHub](https://github.com/facebook/metro))
- Bundler for React Native
- **Bundle Buddy** ([GitHub](https://github.com/samccone/bundle-buddy))
- Identify bundle duplication across splits
- [**terser**](https://terser.org/) ([GitHub](https://github.com/terser/terser))
- A more modern alternative to UglifyJS for "minifying" and obfuscating code
- [**Danger.js**](https://danger.systems/js/) ([GitHub](https://github.com/danger/danger-js))
- Automated code review chores
- **`npm-run-all`** ([GitHub](https://github.com/mysticatea/npm-run-all))
- **`svgo`** ([GitHub](https://github.com/svg/svgo))
- SVG file optimizer
- **Vue Enterprise Boilerplate** ([GitHub](https://github.com/chrisvfritz/vue-enterprise-boilerplate))
- [**nyc**](https://istanbul.js.org/) ([GitHub](https://github.com/istanbuljs/nyc))
- [**React PWA**](https://www.reactpwa.com/) ([GitHub](https://github.com/Atyantik/react-pwa))
- **Electron Packager** ([GitHub](https://github.com/electron/electron-packager))
- **Angular Webpack Starter** ([GitHub](https://github.com/PatrickJS/starter))
- [**Capybara**](https://teamcapybara.github.io/capybara/) ([GitHub](https://github.com/teamcapybara/capybara))
- **`generact`** ([GitHub](https://github.com/diegohaz/generact))
- Generate React components by replicating your own
- **react-redux-typescript-guide** ([GitHub](https://github.com/piotrwitek/react-redux-typescript-guide))
- **react-typescript-cheetsheet** ([GitHub](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet))
- **`ifdef-loader`** ([GitHub](https://github.com/nippur72/ifdef-loader))
- **`ncc`** ([GitHub](https://github.com/zeit/ncc))
- [**BundlePhobia**](https://bundlephobia.com/)
- [**Neutralino**](https://neutralino.js.org/) ([GitHub](https://github.com/neutralinojs/neutralinojs))
- Portable and lightweight cross platform application development framework
- [**Phenomic**](https://phenomic.io/) ([GitHub](https://github.com/phenomic/phenomic))
- Static site generator
- **tomo** ([GitHub](https://github.com/jhwohlgemuth/tomo-cli))
- Zero-config React app generator
- **Mrm** ([GitHub](https://github.com/sapegin/mrm))
- Sync configuration files between projects
- **`try`** ([GitHub](https://github.com/BrunnerLivio/try))
- Quickly try out `npm` packages in a container
- **`webpack-nano`** ([GitHub](https://github.com/shellscape/webpack-nano))
- Lightweight, configurable alternative to `webpack-cli`
- [**`npkill`**](https://voidcosmos.github.io/npkill/) ([GitHub](https://github.com/voidcosmos/npkill))
- List and clean up all `node_modules` directories
- [**TypL**](https://TypL.dev) ([GitHub](https://github.com/getify/TypL))
- JavaScript Type Linter; alternative to TypeScript
- **`format-graphql`** ([GitHub](https://github.com/gajus/format-graphql))
- Alphabetically sorts definitions, fields and arguments in GraphQL schema definition language (SDL)
- [**Universal PWA Builder**](https://pwa.cafe) ([GitHub](https://github.com/lukeed/pwa))
- Zero-configuration PWA presets for Preact, React, Vue and Svelte
- **StackTracey** ([GitHub](https://github.com/xpl/stacktracey))
- Parses, cleans, filters and logs stack traces with source maps
- [**Codecrumbs**](https://codecrumbs.io) ([GitHub](https://github.com/Bogdan-Lyashenko/codecrumbs))
- Visualize codebases
- [**Static Site Boilerplate**](http://staticsiteboilerplate.com) ([GitHub](https://github.com/ericalli/static-site-boilerplate))
- [**nodemon**](http://nodemon.io/) ([GitHub](https://github.com/remy/nodemon/))
- Development tool for restarting a process on source changes
- [**PM2**](https://pm2.io) ([GitHub](https://github.com/Unitech/pm2))
- Node.js production process manager with a built-in load balancer
- [**NPMCompare.com**](https://npmcompare.com/)
- [**ts-engine**](https://ts-engine.dev) ([GitHub](https://github.com/ts-engine/ts-engine))
- Build, lint, test and typechecking functionality for TypeScript packages
- [**react-typescript-eslint-starter**](https://vtereshyn.github.io/react-typescript-eslint-starter/)([Github])(https://github.com/vtereshyn/react-typescript-eslint-starter)
- Quick start with React/TypeScript without Create React App
- `dts2hx` ([GitHub](https://github.com/haxiomic/dts2hx))
- Converts TypeScript definition files (d.ts) to haxe externs (.hx)
## 💀 Legacy or not recommended tools
[Listed separately][non-rec] to avoid confusion.
[non-rec]: https://github.com/slikts/tooling/blob/master/not-recommended.md
## 🙈 See also
- [**JSter**](http://jster.net/blog)
- Popular blog about libraries and tools
- [**StackShare**](https://stackshare.io/)
- Social network centered around finding and vetting developer tools
- [Top 100 developer tools of 2019](https://stackshare.io/posts/top-developer-tools-2019) by StackShare
- [**Free for developers**](https://free-for.dev/)
- List of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev
- [**awesome-web-dev-resources**](https://github.com/mrmartineau/awesome-web-dev-resources)
- [**Awesome lists**](https://github.com/sindresorhus/awesome)
- [**SurviveJS**](https://survivejs.com/)
- [**DevTips**](https://umaar.com/dev-tips/)
- Valuable developer tips related to Chrome DevTools, VS Code and other tooling
### Outdated resources
- **JavaScript Stack from Scratch** ([GitHub](https://github.com/verekia/js-stack-from-scratch))
- [**frontend-dev-bookmarks Build Tools**](https://github.com/dypsilon/frontend-dev-bookmarks/blob/master/workflow/build-tools.md)
- [**awesome-javascript**](https://github.com/sorrycc/awesome-javascript)
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package org.glassfish.contextpropagation.bootstrap;
import org.glassfish.contextpropagation.bootstrap.LoggerAdapter.Level;
import org.glassfish.contextpropagation.bootstrap.LoggerAdapter.MessageID;
import org.glassfish.contextpropagation.internal.DependencyProviderImpl;
import org.glassfish.contextpropagation.wireadapters.WireAdapter;
/**
* The classes in this package were designed to facilitate the integration of
* the context propagation feature in a server. Through the use of inversion of
* control, we were able to abstract all the dependencies needed by context
* propagation thus making this feature easy to port to another server. In this
* way, we hope to encourage the use of context propagation on other servers.
*/
public class ContextBootstrap {
private static LoggerAdapter loggerAdapter;
private static ThreadLocalAccessor threadLocalAccessor;
private static ContextAccessController contextAccessController;
private static boolean isConfigured;
private static WireAdapter wireAdapter;
private static String guid;
public static boolean IS_DEBUG;
private static DependencyProvider dependencyProvider;
static {
if (dependencyProvider == null) {
dependencyProvider = new DependencyProviderImpl(); // The service should have been injected, But we are not taking any chances.
}
if (dependencyProvider != null) {
configure(dependencyProvider.getLoggerAdapter(),
dependencyProvider.getDefaultWireAdapter(),
dependencyProvider.getThreadLocalAccessor(),
dependencyProvider.getContextAccessController(),
dependencyProvider.getGuid());
}
}
/**
* This function must be called by the server prior to using context propagation.
* @param loggerAdapter An adaptor to the logger that is appropriate for
* context propagation messages.
* @param tla An adaptor to the thread management system that allows safe
* storage of the ContextMap on the current thread.
* @param contextAccessController An adaptor to the security manager that
* is used to determine access to particular work contexts by the user
* associated to the current thread.
* @param aGuid a unique identifier for this process that is suitable for
* transmission over the wire.
*/
public static void configure(LoggerAdapter aLoggerAdapter,
WireAdapter aWireAdapter, ThreadLocalAccessor aThreadLocalAccessor,
ContextAccessController aContextAccessController, String aGuid) {
if (isConfigured) {
throw new IllegalStateException("WorkArea is already configured");
}
if (aLoggerAdapter == null || aWireAdapter == null ||
aThreadLocalAccessor == null || aContextAccessController == null ) {
throw new IllegalArgumentException(
"logger and wire adapters, threadLocalAccessor and " +
"contextAccessController must be specified.");
}
loggerAdapter = aLoggerAdapter;
wireAdapter = aWireAdapter;
threadLocalAccessor = aThreadLocalAccessor;
contextAccessController = aContextAccessController;
guid = aGuid;
IS_DEBUG = loggerAdapter.isLoggable(Level.DEBUG);
isConfigured = true;
}
/**
* @return The bootstrapped WireAdapter
*/
public static WireAdapter getWireAdapter() {
checkIfConfigured();
return wireAdapter;
}
private static void checkIfConfigured() {
if (!isConfigured) {
throw new IllegalStateException("Context propagation is not yet configured.");
}
}
/**
* @return The bootstrapped LoggerAdapter
*/
public static LoggerAdapter getLoggerAdapter() {
checkIfConfigured();
return loggerAdapter;
}
/**
* @param messageID a MessageID
* @param args The objects to in the message
*/
public static void debug(MessageID messageID, Object... args) {
if (loggerAdapter.isLoggable(Level.DEBUG)) {
loggerAdapter.log(Level.DEBUG, messageID, args);
}
}
/**
* @param t a Throwable to include in the debug message
* @param messageID a MessageID
* @param args The objects to in the message
*/
public static void debug(Throwable t, MessageID messageID, Object... args) {
if (loggerAdapter.isLoggable(Level.DEBUG)) {
loggerAdapter.log(Level.DEBUG, t, messageID, args);
}
}
/**
* @return The adaptor to access the ContextMap stored on the curren thread
*/
public static ThreadLocalAccessor getThreadLocalAccessor() {
checkIfConfigured();
return threadLocalAccessor;
}
/**
* @return The adapter that checks acccess permissions.
*/
public static ContextAccessController getContextAccessController() {
checkIfConfigured();
return contextAccessController;
}
/**
* @return a String that uniquely identifies this process
*/
public static String getGuid() {
checkIfConfigured();
return guid;
}
}
| {
"pile_set_name": "Github"
} |
Alex A. Skinner
Andrew Tunnell-Jones
Ask Bjørn Hansen
Dave Cheney
Dusty Wilson
Marek Majkowski
Peter van Dijk
Omri Bahumi
Alex Sergeyev
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/PlayMusicExporter.iml" filepath="$PROJECT_DIR$/PlayMusicExporter.iml" />
<module fileurl="file://$PROJECT_DIR$/framework/framework.iml" filepath="$PROJECT_DIR$/framework/framework.iml" />
<module fileurl="file://$PROJECT_DIR$/playmusicexporter/playmusicexporter.iml" filepath="$PROJECT_DIR$/playmusicexporter/playmusicexporter.iml" />
<module fileurl="file://$PROJECT_DIR$/playmusiclib/playmusiclib.iml" filepath="$PROJECT_DIR$/playmusiclib/playmusiclib.iml" />
</modules>
</component>
</project> | {
"pile_set_name": "Github"
} |
package org.bukkit.craftbukkit.block;
import net.minecraft.block.BlockJukebox;
import net.minecraft.block.BlockJukebox.TileEntityJukebox;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Jukebox;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
public class CraftJukebox extends CraftBlockState implements Jukebox {
private final CraftWorld world;
private final TileEntityJukebox jukebox;
public CraftJukebox(final Block block) {
super(block);
world = (CraftWorld) block.getWorld();
jukebox = (TileEntityJukebox) world.getTileEntityAt(getX(), getY(), getZ());
}
@Override
public Material getPlaying() {
ItemStack record = jukebox.func_145856_a();
if (record == null) {
return Material.AIR;
}
return CraftMagicNumbers.getMaterial(record.getItem());
}
@Override
public void setPlaying(Material record) {
if (record == null || CraftMagicNumbers.getItem(record) == null) {
record = Material.AIR;
jukebox.func_145857_a(null);
} else {
jukebox.func_145857_a(new ItemStack(CraftMagicNumbers.getItem(record), 1));
}
jukebox.markDirty();
if (record == Material.AIR) {
world.getHandle().setBlockMetadataWithNotify(getX(), getY(), getZ(), 0, 3);
} else {
world.getHandle().setBlockMetadataWithNotify(getX(), getY(), getZ(), 1, 3);
}
world.playEffect(getLocation(), Effect.RECORD_PLAY, record.getId());
}
public boolean isPlaying() {
return getRawData() == 1;
}
public boolean eject() {
boolean result = isPlaying();
((BlockJukebox) Blocks.jukebox).func_149925_e(world.getHandle(), getX(), getY(), getZ());
return result;
}
}
| {
"pile_set_name": "Github"
} |
<div class="term-archive">
<section>
<div class="mini-posts archive">
{% for page in pages %}
<article class="post">
<header>
<div class="title">
<h2><a href="{{ page.link }}">{{ page.title }}</a></h2>
</div>
{% if page.key == 'post' %}
<div class="meta">
<time class="published" datetime="{{ page.publishDate|localDate('yyyy-MM-dd') }}">
{{ page.publishDate|localDate('MMMM dd, yyyy') }}
</time>
{% if page.author is not empty %}
{% if page.author.link is not empty %}
<a href="{{ page.author.link }}" class="author">
<span class="name">{{ page.author.name }}</span>
<img src="{{ page.author.avatar }}" alt="{{ page.author.name }}"/>
</a>
{% else %}
<span class="author">
<span class="name">{{ page.author.name }}</span>
<img src="{{ page.author.avatar }}" alt="{{ page.author.name }}"/>
</span>
{% endif %}
{% endif %}
</div>
{% endif %}
</header>
{% if post.featuredImage.exists %}
{% set featuredImage = post.featuredImage.get() %}
<a href="{{ page.link }}" class="image featured"><img src="{{ featuredImage.link }}" alt="{{ page.title }}"/></a>
{% endif %}
<p>{{ page | excerpt | raw }}</p>
<footer>
<ul class="actions">
<li><a href="{{ page.link }}" class="button big">Continue Reading</a></li>
</ul>
<ul class="stats">
{% if page.categories is not empty %}
{% for category in page.categories %}
<li>{{ anchor(title=(category|title), itemId=category, collectionType="taxonomies", collectionId="category") | raw }}</li>
{% if not loop.last -%} > {% endif %}
{% endfor %}
{% endif %}
</ul>
</footer>
</article>
{% endfor %}
</div>
</section>
</div>
| {
"pile_set_name": "Github"
} |
//! Synchronization primitives.
use core::cell::UnsafeCell;
use core::ops;
use core::sync::atomic::{self, AtomicBool};
use shim;
/// A mutual exclusive container.
///
/// This assures that only one holds mutability of the inner value. To get the inner value, you
/// need acquire the "lock". If you try to lock it while a lock is already held elsewhere, it will
/// block the thread until the lock is released.
pub struct Mutex<T> {
/// The inner value.
inner: UnsafeCell<T>,
/// The lock boolean.
///
/// This is true, if and only if the lock is currently held.
locked: AtomicBool,
}
impl<T> Mutex<T> {
/// Create a new mutex with some inner value.
#[inline]
pub const fn new(inner: T) -> Mutex<T> {
Mutex {
inner: UnsafeCell::new(inner),
locked: AtomicBool::new(false),
}
}
/// Lock this mutex.
///
/// If another lock is held, this will block the thread until it is released.
#[inline]
pub fn lock(&self) -> MutexGuard<T> {
// Lock the mutex.
#[cfg(not(feature = "unsafe_no_mutex_lock"))]
while self
.locked
.compare_and_swap(false, true, atomic::Ordering::SeqCst)
{
// ,___,
// {O,o}
// |)``)
// SRSLY?
shim::syscalls::sched_yield();
}
MutexGuard { mutex: self }
}
}
/// A mutex guard.
///
/// This acts as the lock.
#[must_use]
pub struct MutexGuard<'a, T: 'a> {
/// The parent mutex.
mutex: &'a Mutex<T>,
}
/// Release the mutex.
impl<'a, T> Drop for MutexGuard<'a, T> {
#[inline]
fn drop(&mut self) {
self.mutex.locked.store(false, atomic::Ordering::SeqCst);
}
}
impl<'a, T> ops::Deref for MutexGuard<'a, T> {
type Target = T;
#[inline]
fn deref(&self) -> &T {
unsafe {
// LAST AUDIT: 2016-08-21 (Ticki).
// Aliasing is allowed due to the lock representing mutual exclusive access.
&*self.mutex.inner.get()
}
}
}
impl<'a, T> ops::DerefMut for MutexGuard<'a, T> {
fn deref_mut(&mut self) -> &mut T {
unsafe {
// LAST AUDIT: 2016-08-21 (Ticki).
// Aliasing is allowed due to the lock representing mutual exclusive access.
&mut *self.mutex.inner.get()
}
}
}
unsafe impl<T: Send> Send for Mutex<T> {}
unsafe impl<T: Send> Sync for Mutex<T> {}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_mutex() {
let mutex = Mutex::new(3);
assert_eq!(*mutex.lock(), 3);
*mutex.lock() = 4;
assert_eq!(*mutex.lock(), 4);
*mutex.lock() = 0xFF;
assert_eq!(*mutex.lock(), 0xFF);
}
}
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2012 Désiré Nuentsa-Wakam <[email protected]>
// Copyright (C) 2012 Gael Guennebaud <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
/*
* NOTE: This file is the modified version of [s,d,c,z]panel_bmod.c file in SuperLU
* -- SuperLU routine (version 3.0) --
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
* and Lawrence Berkeley National Lab.
* October 15, 2003
*
* Copyright (c) 1994 by Xerox Corporation. All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
* EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
*
* Permission is hereby granted to use or copy this program for any
* purpose, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is
* granted, provided the above notices are retained, and a notice that
* the code was modified is included with the above copyright notice.
*/
#ifndef SPARSELU_PANEL_BMOD_H
#define SPARSELU_PANEL_BMOD_H
namespace Eigen {
namespace internal {
/**
* \brief Performs numeric block updates (sup-panel) in topological order.
*
* Before entering this routine, the original nonzeros in the panel
* were already copied i nto the spa[m,w]
*
* \param m number of rows in the matrix
* \param w Panel size
* \param jcol Starting column of the panel
* \param nseg Number of segments in the U part
* \param dense Store the full representation of the panel
* \param tempv working array
* \param segrep segment representative... first row in the segment
* \param repfnz First nonzero rows
* \param glu Global LU data.
*
*
*/
template <typename Scalar, typename StorageIndex>
void SparseLUImpl<Scalar,StorageIndex>::panel_bmod(const Index m, const Index w, const Index jcol,
const Index nseg, ScalarVector& dense, ScalarVector& tempv,
IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu)
{
Index ksub,jj,nextl_col;
Index fsupc, nsupc, nsupr, nrow;
Index krep, kfnz;
Index lptr; // points to the row subscripts of a supernode
Index luptr; // ...
Index segsize,no_zeros ;
// For each nonz supernode segment of U[*,j] in topological order
Index k = nseg - 1;
const Index PacketSize = internal::packet_traits<Scalar>::size;
for (ksub = 0; ksub < nseg; ksub++)
{ // For each updating supernode
/* krep = representative of current k-th supernode
* fsupc = first supernodal column
* nsupc = number of columns in a supernode
* nsupr = number of rows in a supernode
*/
krep = segrep(k); k--;
fsupc = glu.xsup(glu.supno(krep));
nsupc = krep - fsupc + 1;
nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
nrow = nsupr - nsupc;
lptr = glu.xlsub(fsupc);
// loop over the panel columns to detect the actual number of columns and rows
Index u_rows = 0;
Index u_cols = 0;
for (jj = jcol; jj < jcol + w; jj++)
{
nextl_col = (jj-jcol) * m;
VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row
kfnz = repfnz_col(krep);
if ( kfnz == emptyIdxLU )
continue; // skip any zero segment
segsize = krep - kfnz + 1;
u_cols++;
u_rows = (std::max)(segsize,u_rows);
}
if(nsupc >= 2)
{
Index ldu = internal::first_multiple<Index>(u_rows, PacketSize);
Map<ScalarMatrix, Aligned, OuterStride<> > U(tempv.data(), u_rows, u_cols, OuterStride<>(ldu));
// gather U
Index u_col = 0;
for (jj = jcol; jj < jcol + w; jj++)
{
nextl_col = (jj-jcol) * m;
VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row
VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here
kfnz = repfnz_col(krep);
if ( kfnz == emptyIdxLU )
continue; // skip any zero segment
segsize = krep - kfnz + 1;
luptr = glu.xlusup(fsupc);
no_zeros = kfnz - fsupc;
Index isub = lptr + no_zeros;
Index off = u_rows-segsize;
for (Index i = 0; i < off; i++) U(i,u_col) = 0;
for (Index i = 0; i < segsize; i++)
{
Index irow = glu.lsub(isub);
U(i+off,u_col) = dense_col(irow);
++isub;
}
u_col++;
}
// solve U = A^-1 U
luptr = glu.xlusup(fsupc);
Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc);
no_zeros = (krep - u_rows + 1) - fsupc;
luptr += lda * no_zeros + no_zeros;
MappedMatrixBlock A(glu.lusup.data()+luptr, u_rows, u_rows, OuterStride<>(lda) );
U = A.template triangularView<UnitLower>().solve(U);
// update
luptr += u_rows;
MappedMatrixBlock B(glu.lusup.data()+luptr, nrow, u_rows, OuterStride<>(lda) );
eigen_assert(tempv.size()>w*ldu + nrow*w + 1);
Index ldl = internal::first_multiple<Index>(nrow, PacketSize);
Index offset = (PacketSize-internal::first_default_aligned(B.data(), PacketSize)) % PacketSize;
MappedMatrixBlock L(tempv.data()+w*ldu+offset, nrow, u_cols, OuterStride<>(ldl));
L.setZero();
internal::sparselu_gemm<Scalar>(L.rows(), L.cols(), B.cols(), B.data(), B.outerStride(), U.data(), U.outerStride(), L.data(), L.outerStride());
// scatter U and L
u_col = 0;
for (jj = jcol; jj < jcol + w; jj++)
{
nextl_col = (jj-jcol) * m;
VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row
VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here
kfnz = repfnz_col(krep);
if ( kfnz == emptyIdxLU )
continue; // skip any zero segment
segsize = krep - kfnz + 1;
no_zeros = kfnz - fsupc;
Index isub = lptr + no_zeros;
Index off = u_rows-segsize;
for (Index i = 0; i < segsize; i++)
{
Index irow = glu.lsub(isub++);
dense_col(irow) = U.coeff(i+off,u_col);
U.coeffRef(i+off,u_col) = 0;
}
// Scatter l into SPA dense[]
for (Index i = 0; i < nrow; i++)
{
Index irow = glu.lsub(isub++);
dense_col(irow) -= L.coeff(i,u_col);
L.coeffRef(i,u_col) = 0;
}
u_col++;
}
}
else // level 2 only
{
// Sequence through each column in the panel
for (jj = jcol; jj < jcol + w; jj++)
{
nextl_col = (jj-jcol) * m;
VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row
VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here
kfnz = repfnz_col(krep);
if ( kfnz == emptyIdxLU )
continue; // skip any zero segment
segsize = krep - kfnz + 1;
luptr = glu.xlusup(fsupc);
Index lda = glu.xlusup(fsupc+1)-glu.xlusup(fsupc);// nsupr
// Perform a trianglar solve and block update,
// then scatter the result of sup-col update to dense[]
no_zeros = kfnz - fsupc;
if(segsize==1) LU_kernel_bmod<1>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
else if(segsize==2) LU_kernel_bmod<2>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
else if(segsize==3) LU_kernel_bmod<3>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
else LU_kernel_bmod<Dynamic>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
} // End for each column in the panel
}
} // End for each updating supernode
} // end panel bmod
} // end namespace internal
} // end namespace Eigen
#endif // SPARSELU_PANEL_BMOD_H
| {
"pile_set_name": "Github"
} |
---
title: "Firewall client settings on the cache host are incorrect (SharePoint Server)"
ms.reviewer:
ms.author: serdars
author: SerdarSoysal
manager: serdars
ms.date: 8/29/2017
audience: ITPro
f1.keywords:
- NOCSH
ms.topic: troubleshooting
ms.prod: sharepoint-server-itpro
localization_priority: Normal
ms.collection:
- IT_Sharepoint_Server
- IT_Sharepoint_Server_Top
ms.assetid: f8dcfd5c-aaec-46cd-b25e-94e14bf98c7d
description: "Learn how to resolve the SharePoint Health Analyzer rule: Firewall client settings on the cache host are incorrect, for SharePoint Server."
---
# Firewall client settings on the cache host are incorrect (SharePoint Server)
[!INCLUDE[appliesto-2013-2016-2019-xxx-md](../includes/appliesto-2013-2016-2019-xxx-md.md)]
**Rule Name:** Firewall client settings on the cache host are incorrect.
**Summary:** Firewall rule settings for App fabric caching are disabled.
**Cause:** Firewall rule settings for App fabric caching are disabled.
**Resolution: Enable the firewall rules for the AppFabric Caching service.**
1. Verify that the user account that is performing this procedure is a member of the Administrators group on the local computer.
2. On **Server Manager**, click **Tools**, and then select **Windows Firewall with Advanced Security**.
3. In the **Windows Firewall with Advanced Security** console tree, click **Inbound Rules**.
4. In the **Inbound Rules** list, right-click **AppFabric Caching Service (TCP-In)**, and then select **Enable Rule**.
5. In the **Windows Firewall with Advanced Security** console tree, click **Outbound Rules**.
6. In the **Outbound Rules** list, right-click **AppFabric Caching Service (TCP-Out)** and then select **Enable Rule**.
By default, the **Repair Automatically** option is enabled for this rule. You can restore the default setting for this rule by doing the following:
1. On the SharePoint Central Administration website, click **Monitoring**.
2. On the Monitoring page, in the **Health Analyzer** section, click **Review rule definitions**.
3. On the Health Analyzer Rule Definitions - All Rules page, in the **Category: Configuration** section, click the name of the rule.
4. On the **Health Analyzer Rule Definitions** page, click **Edit Item**.
5. Select the **Repair Automatically** check box, and then click **Save**.
| {
"pile_set_name": "Github"
} |
'use strict';
var utils = require('../utils');
var rotr32 = utils.rotr32;
function ft_1(s, x, y, z) {
if (s === 0)
return ch32(x, y, z);
if (s === 1 || s === 3)
return p32(x, y, z);
if (s === 2)
return maj32(x, y, z);
}
exports.ft_1 = ft_1;
function ch32(x, y, z) {
return (x & y) ^ ((~x) & z);
}
exports.ch32 = ch32;
function maj32(x, y, z) {
return (x & y) ^ (x & z) ^ (y & z);
}
exports.maj32 = maj32;
function p32(x, y, z) {
return x ^ y ^ z;
}
exports.p32 = p32;
function s0_256(x) {
return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
}
exports.s0_256 = s0_256;
function s1_256(x) {
return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
}
exports.s1_256 = s1_256;
function g0_256(x) {
return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
}
exports.g0_256 = g0_256;
function g1_256(x) {
return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
}
exports.g1_256 = g1_256;
| {
"pile_set_name": "Github"
} |
package main
import (
"context"
"flag"
"log"
"time"
example "github.com/rpcxio/rpcx-examples"
"github.com/smallnest/rpcx/client"
)
var (
addr = flag.String("addr", "localhost:8972", "server address")
)
func main() {
flag.Parse()
d := client.NewPeer2PeerDiscovery("tcp@"+*addr, "")
xclient := client.NewXClient("Arith", client.Failtry, client.RandomSelect, d, client.DefaultOption)
defer xclient.Close()
args := &example.Args{
A: 10,
B: 20,
}
for i := 0; i < 8; i++ {
go func() {
for {
reply := &example.Reply{}
err := xclient.Call(context.Background(), "Mul", args, reply)
if err != nil {
log.Fatalf("failed to call: %v", err)
}
log.Printf("%d * %d = %d", args.A, args.B, reply.C)
time.Sleep(time.Second)
}
}()
}
select {}
}
| {
"pile_set_name": "Github"
} |
package org.sang.controller;
import org.sang.bean.RespBean;
import org.sang.bean.User;
import org.sang.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by sang on 2017/12/17.
*/
@RestController
public class LoginRegController {
@Autowired
UserService userService;
@RequestMapping("/login_error")
public RespBean loginError() {
return new RespBean("error", "登录失败!");
}
@RequestMapping("/login_success")
public RespBean loginSuccess() {
return new RespBean("success", "登录成功!");
}
/**
* 如果自动跳转到这个页面,说明用户未登录,返回相应的提示即可
* <p>
* 如果要支持表单登录,可以在这个方法中判断请求的类型,进而决定返回JSON还是HTML页面
*
* @return
*/
@RequestMapping("/login_page")
public RespBean loginPage() {
return new RespBean("error", "尚未登录,请登录!");
}
@PostMapping("/reg")
public RespBean reg(User user) {
int result = userService.reg(user);
if (result == 0) {
//成功
return new RespBean("success", "注册成功!");
} else if (result == 1) {
return new RespBean("error", "用户名重复,注册失败!");
} else {
//失败
return new RespBean("error", "注册失败!");
}
}
}
| {
"pile_set_name": "Github"
} |
package com.fishercoder;
import com.fishercoder.solutions._1200;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
public class _1200Test {
private static _1200.Solution1 solution1;
private static int[] arr;
private static List<List<Integer>> expected;
@BeforeClass
public static void setup() {
solution1 = new _1200.Solution1();
}
@Test
public void test1() {
arr = new int[]{4, 2, 1, 3};
expected = new ArrayList<>();
expected.add(Arrays.asList(1, 2));
expected.add(Arrays.asList(2, 3));
expected.add(Arrays.asList(3, 4));
assertEquals(expected, solution1.minimumAbsDifference(arr));
}
@Test
public void test2() {
arr = new int[]{40, 11, 26, 27, -20};
expected = new ArrayList<>();
expected.add(Arrays.asList(26, 27));
assertEquals(expected, solution1.minimumAbsDifference(arr));
}
} | {
"pile_set_name": "Github"
} |
#ifndef PAGINATOR_H
#define PAGINATOR_H
#include <QObject>
#include <QStandardPaths>
#include <QDir>
#include <QDebug>
#include <QFile>
class paginator: public QObject
{
Q_OBJECT
public:
explicit paginator(QObject *parent = 0);
Q_INVOKABLE void save(QString pageType, QString dataType, QString query, QString data);
Q_INVOKABLE bool isOffline(QString pageType, QString dataType, QString query);
Q_INVOKABLE QString load(QString pageType, QString dataType, QString query);
Q_INVOKABLE void deleteCache(QString pageType, QString dataType, QString query);
Q_INVOKABLE QString getList(QString page, QString dataType);
Q_INVOKABLE void clearRecentSearches();
QString load_json(QString pageType, QString dataType, QString query);
public slots:
void save_json(QString pageType, QString dataType, QString query, QString data);
signals:
void reloadRequested(QString dataType,QString query);
private slots:
QString createDir(QString name);
QString getPath(QString pageType, QString dataType, QString query);
private:
QString paginator_path;
};
#endif // PAGINATOR_H
| {
"pile_set_name": "Github"
} |
sha256:23df7cc0ea3e2c2f94d22b1925cd338c346f6bf864ad693f677d82ede856251b
| {
"pile_set_name": "Github"
} |
#include <vector>
#include "gtest/gtest.h"
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/filler.hpp"
#include "caffe/layers/batch_reindex_layer.hpp"
#include "caffe/test/test_caffe_main.hpp"
#include "caffe/test/test_gradient_check_util.hpp"
namespace caffe {
template<typename TypeParam>
class BatchReindexLayerTest : public MultiDeviceTest<TypeParam> {
typedef typename TypeParam::Dtype Dtype;
protected:
BatchReindexLayerTest()
: blob_bottom_(new Blob<Dtype>()),
blob_bottom_permute_(new Blob<Dtype>()),
blob_top_(new Blob<Dtype>()) {
}
virtual void SetUp() {
Caffe::set_random_seed(1701);
vector<int> sz;
sz.push_back(5);
sz.push_back(4);
sz.push_back(3);
sz.push_back(2);
blob_bottom_->Reshape(sz);
vector<int> permsz;
permsz.push_back(6);
blob_bottom_permute_->Reshape(permsz);
// fill the values
FillerParameter filler_param;
GaussianFiller<Dtype> filler(filler_param);
filler.Fill(this->blob_bottom_);
int perm[] = { 4, 0, 4, 0, 1, 2 };
for (int i = 0; i < blob_bottom_permute_->count(); ++i) {
blob_bottom_permute_->mutable_cpu_data()[i] = perm[i];
}
blob_bottom_vec_.push_back(blob_bottom_);
blob_bottom_vec_.push_back(blob_bottom_permute_);
blob_top_vec_.push_back(blob_top_);
}
virtual ~BatchReindexLayerTest() {
delete blob_bottom_permute_;
delete blob_bottom_;
delete blob_top_;
}
Blob<Dtype>* const blob_bottom_;
Blob<Dtype>* const blob_bottom_permute_;
Blob<Dtype>* const blob_top_;
vector<Blob<Dtype>*> blob_bottom_vec_;
vector<Blob<Dtype>*> blob_top_vec_;
void TestForward() {
LayerParameter layer_param;
vector<int> sz;
sz.push_back(5);
sz.push_back(4);
sz.push_back(3);
sz.push_back(2);
blob_bottom_->Reshape(sz);
for (int i = 0; i < blob_bottom_->count(); ++i) {
blob_bottom_->mutable_cpu_data()[i] = i;
}
vector<int> permsz;
permsz.push_back(6);
blob_bottom_permute_->Reshape(permsz);
int perm[] = { 4, 0, 4, 0, 1, 2 };
for (int i = 0; i < blob_bottom_permute_->count(); ++i) {
blob_bottom_permute_->mutable_cpu_data()[i] = perm[i];
}
BatchReindexLayer<Dtype> layer(layer_param);
layer.SetUp(blob_bottom_vec_, blob_top_vec_);
EXPECT_EQ(blob_top_->num(), blob_bottom_permute_->num());
EXPECT_EQ(blob_top_->channels(), blob_bottom_->channels());
EXPECT_EQ(blob_top_->height(), blob_bottom_->height());
EXPECT_EQ(blob_top_->width(), blob_bottom_->width());
layer.Forward(blob_bottom_vec_, blob_top_vec_);
int channels = blob_top_->channels();
int height = blob_top_->height();
int width = blob_top_->width();
for (int i = 0; i < blob_top_->count(); ++i) {
int n = i / (channels * width * height);
int inner_idx = (i % (channels * width * height));
EXPECT_EQ(
blob_top_->cpu_data()[i],
blob_bottom_->cpu_data()[perm[n] * channels * width * height
+ inner_idx]);
}
}
};
TYPED_TEST_CASE(BatchReindexLayerTest, TestDtypesAndDevices);
TYPED_TEST(BatchReindexLayerTest, TestForward) {
this->TestForward();
}
TYPED_TEST(BatchReindexLayerTest, TestGradient) {
typedef typename TypeParam::Dtype Dtype;
LayerParameter layer_param;
BatchReindexLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-4, 1e-2);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_, 0);
}
} // namespace caffe
| {
"pile_set_name": "Github"
} |
A calligraphic font in the handwriting style of the author,
Peter Vanroose. The font is supplied as Metafont source. LaTeX
support of the font is provided in the calligra package in the
fundus bundle.
| {
"pile_set_name": "Github"
} |
//
// immer: immutable data structures for C++
// Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
//
// This software is distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
//
#pragma once
#ifndef IMMER_DEBUG_TRACES
#define IMMER_DEBUG_TRACES 0
#endif
#ifndef IMMER_DEBUG_PRINT
#define IMMER_DEBUG_PRINT 0
#endif
#ifndef IMMER_DEBUG_DEEP_CHECK
#define IMMER_DEBUG_DEEP_CHECK 0
#endif
#if IMMER_DEBUG_TRACES || IMMER_DEBUG_PRINT
#include <iostream>
#include <prettyprint.hpp>
#endif
#if IMMER_DEBUG_TRACES
#define IMMER_TRACE(...) std::cout << __VA_ARGS__ << std::endl
#else
#define IMMER_TRACE(...)
#endif
#define IMMER_TRACE_F(...) \
IMMER_TRACE(__FILE__ << ":" << __LINE__ << ": " << __VA_ARGS__)
#define IMMER_TRACE_E(expr) \
IMMER_TRACE(" " << #expr << " = " << (expr))
#if defined(_MSC_VER)
#define IMMER_UNREACHABLE __assume(false)
#define IMMER_LIKELY(cond) cond
#define IMMER_UNLIKELY(cond) cond
#define IMMER_FORCEINLINE __forceinline
#define IMMER_PREFETCH(p)
#else
#define IMMER_UNREACHABLE __builtin_unreachable()
#define IMMER_LIKELY(cond) __builtin_expect(!!(cond), 1)
#define IMMER_UNLIKELY(cond) __builtin_expect(!!(cond), 0)
#define IMMER_FORCEINLINE inline __attribute__ ((always_inline))
#define IMMER_PREFETCH(p)
// #define IMMER_PREFETCH(p) __builtin_prefetch(p)
#endif
#define IMMER_DESCENT_DEEP 0
#ifdef NDEBUG
#define IMMER_ENABLE_DEBUG_SIZE_HEAP 0
#else
#define IMMER_ENABLE_DEBUG_SIZE_HEAP 1
#endif
namespace immer {
const auto default_bits = 5;
const auto default_free_list_size = 1 << 10;
} // namespace immer
| {
"pile_set_name": "Github"
} |
<html>
<head>
<script src="../OLLoader.js"></script>
<script type="text/javascript">
function test_getParameters(t) {
t.plan(4);
var c = new OpenLayers.Control.ArgParser(), p;
p = c.getParameters('http://example.com?fook=foov&bark=barv');
t.eq(p, {fook: 'foov', bark: 'barv'}, 'a) params are correct');
p = c.getParameters('http://example.com#fook=foov&bark=barv');
t.eq(p, {fook: 'foov', bark: 'barv'}, 'b) params are correct');
p = c.getParameters('http://example.com?a=b&b=c#fook=foov&bark=barv');
t.eq(p, {a: 'b', b: 'c', fook: 'foov', bark: 'barv'},
'c) params are correct');
p = c.getParameters('http://example.com?a=b&b=c&fook=a&bark=b#fook=foov&bark=barv');
t.eq(p, {a: 'b', b: 'c', fook: 'foov', bark: 'barv'},
'd) params are correct');
}
</script>
</head>
</html>
| {
"pile_set_name": "Github"
} |
<input
autocapitalize="off"
autocorrect="off"
autocomplete="off"
class="TwoFA-input"
type="text"
ng-minlength="6"
ng-maxlength="8"
required
>
| {
"pile_set_name": "Github"
} |
/*
* stv0367_regs.h
*
* Driver for ST STV0367 DVB-T & DVB-C demodulator IC.
*
* Copyright (C) ST Microelectronics.
* Copyright (C) 2010,2011 NetUP Inc.
* Copyright (C) 2010,2011 Igor M. Liplianin <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef STV0367_REGS_H
#define STV0367_REGS_H
/* ID */
#define R367TER_ID 0xf000
#define F367TER_IDENTIFICATIONREG 0xf00000ff
/* I2CRPT */
#define R367TER_I2CRPT 0xf001
#define F367TER_I2CT_ON 0xf0010080
#define F367TER_ENARPT_LEVEL 0xf0010070
#define F367TER_SCLT_DELAY 0xf0010008
#define F367TER_SCLT_NOD 0xf0010004
#define F367TER_STOP_ENABLE 0xf0010002
#define F367TER_SDAT_NOD 0xf0010001
/* TOPCTRL */
#define R367TER_TOPCTRL 0xf002
#define F367TER_STDBY 0xf0020080
#define F367TER_STDBY_FEC 0xf0020040
#define F367TER_STDBY_CORE 0xf0020020
#define F367TER_QAM_COFDM 0xf0020010
#define F367TER_TS_DIS 0xf0020008
#define F367TER_DIR_CLK_216 0xf0020004
#define F367TER_TUNER_BB 0xf0020002
#define F367TER_DVBT_H 0xf0020001
/* IOCFG0 */
#define R367TER_IOCFG0 0xf003
#define F367TER_OP0_SD 0xf0030080
#define F367TER_OP0_VAL 0xf0030040
#define F367TER_OP0_OD 0xf0030020
#define F367TER_OP0_INV 0xf0030010
#define F367TER_OP0_DACVALUE_HI 0xf003000f
/* DAc0R */
#define R367TER_DAC0R 0xf004
#define F367TER_OP0_DACVALUE_LO 0xf00400ff
/* IOCFG1 */
#define R367TER_IOCFG1 0xf005
#define F367TER_IP0 0xf0050040
#define F367TER_OP1_OD 0xf0050020
#define F367TER_OP1_INV 0xf0050010
#define F367TER_OP1_DACVALUE_HI 0xf005000f
/* DAC1R */
#define R367TER_DAC1R 0xf006
#define F367TER_OP1_DACVALUE_LO 0xf00600ff
/* IOCFG2 */
#define R367TER_IOCFG2 0xf007
#define F367TER_OP2_LOCK_CONF 0xf00700e0
#define F367TER_OP2_OD 0xf0070010
#define F367TER_OP2_VAL 0xf0070008
#define F367TER_OP1_LOCK_CONF 0xf0070007
/* SDFR */
#define R367TER_SDFR 0xf008
#define F367TER_OP0_FREQ 0xf00800f0
#define F367TER_OP1_FREQ 0xf008000f
/* STATUS */
#define R367TER_STATUS 0xf009
#define F367TER_TPS_LOCK 0xf0090080
#define F367TER_SYR_LOCK 0xf0090040
#define F367TER_AGC_LOCK 0xf0090020
#define F367TER_PRF 0xf0090010
#define F367TER_LK 0xf0090008
#define F367TER_PR 0xf0090007
/* AUX_CLK */
#define R367TER_AUX_CLK 0xf00a
#define F367TER_AUXFEC_CTL 0xf00a00c0
#define F367TER_DIS_CKX4 0xf00a0020
#define F367TER_CKSEL 0xf00a0018
#define F367TER_CKDIV_PROG 0xf00a0006
#define F367TER_AUXCLK_ENA 0xf00a0001
/* FREESYS1 */
#define R367TER_FREESYS1 0xf00b
#define F367TER_FREE_SYS1 0xf00b00ff
/* FREESYS2 */
#define R367TER_FREESYS2 0xf00c
#define F367TER_FREE_SYS2 0xf00c00ff
/* FREESYS3 */
#define R367TER_FREESYS3 0xf00d
#define F367TER_FREE_SYS3 0xf00d00ff
/* GPIO_CFG */
#define R367TER_GPIO_CFG 0xf00e
#define F367TER_GPIO7_NOD 0xf00e0080
#define F367TER_GPIO7_CFG 0xf00e0040
#define F367TER_GPIO6_NOD 0xf00e0020
#define F367TER_GPIO6_CFG 0xf00e0010
#define F367TER_GPIO5_NOD 0xf00e0008
#define F367TER_GPIO5_CFG 0xf00e0004
#define F367TER_GPIO4_NOD 0xf00e0002
#define F367TER_GPIO4_CFG 0xf00e0001
/* GPIO_CMD */
#define R367TER_GPIO_CMD 0xf00f
#define F367TER_GPIO7_VAL 0xf00f0008
#define F367TER_GPIO6_VAL 0xf00f0004
#define F367TER_GPIO5_VAL 0xf00f0002
#define F367TER_GPIO4_VAL 0xf00f0001
/* AGC2MAX */
#define R367TER_AGC2MAX 0xf010
#define F367TER_AGC2_MAX 0xf01000ff
/* AGC2MIN */
#define R367TER_AGC2MIN 0xf011
#define F367TER_AGC2_MIN 0xf01100ff
/* AGC1MAX */
#define R367TER_AGC1MAX 0xf012
#define F367TER_AGC1_MAX 0xf01200ff
/* AGC1MIN */
#define R367TER_AGC1MIN 0xf013
#define F367TER_AGC1_MIN 0xf01300ff
/* AGCR */
#define R367TER_AGCR 0xf014
#define F367TER_RATIO_A 0xf01400e0
#define F367TER_RATIO_B 0xf0140018
#define F367TER_RATIO_C 0xf0140007
/* AGC2TH */
#define R367TER_AGC2TH 0xf015
#define F367TER_AGC2_THRES 0xf01500ff
/* AGC12c */
#define R367TER_AGC12C 0xf016
#define F367TER_AGC1_IV 0xf0160080
#define F367TER_AGC1_OD 0xf0160040
#define F367TER_AGC1_LOAD 0xf0160020
#define F367TER_AGC2_IV 0xf0160010
#define F367TER_AGC2_OD 0xf0160008
#define F367TER_AGC2_LOAD 0xf0160004
#define F367TER_AGC12_MODE 0xf0160003
/* AGCCTRL1 */
#define R367TER_AGCCTRL1 0xf017
#define F367TER_DAGC_ON 0xf0170080
#define F367TER_INVERT_AGC12 0xf0170040
#define F367TER_AGC1_MODE 0xf0170008
#define F367TER_AGC2_MODE 0xf0170007
/* AGCCTRL2 */
#define R367TER_AGCCTRL2 0xf018
#define F367TER_FRZ2_CTRL 0xf0180060
#define F367TER_FRZ1_CTRL 0xf0180018
#define F367TER_TIME_CST 0xf0180007
/* AGC1VAL1 */
#define R367TER_AGC1VAL1 0xf019
#define F367TER_AGC1_VAL_LO 0xf01900ff
/* AGC1VAL2 */
#define R367TER_AGC1VAL2 0xf01a
#define F367TER_AGC1_VAL_HI 0xf01a000f
/* AGC2VAL1 */
#define R367TER_AGC2VAL1 0xf01b
#define F367TER_AGC2_VAL_LO 0xf01b00ff
/* AGC2VAL2 */
#define R367TER_AGC2VAL2 0xf01c
#define F367TER_AGC2_VAL_HI 0xf01c000f
/* AGC2PGA */
#define R367TER_AGC2PGA 0xf01d
#define F367TER_AGC2_PGA 0xf01d00ff
/* OVF_RATE1 */
#define R367TER_OVF_RATE1 0xf01e
#define F367TER_OVF_RATE_HI 0xf01e000f
/* OVF_RATE2 */
#define R367TER_OVF_RATE2 0xf01f
#define F367TER_OVF_RATE_LO 0xf01f00ff
/* GAIN_SRC1 */
#define R367TER_GAIN_SRC1 0xf020
#define F367TER_INV_SPECTR 0xf0200080
#define F367TER_IQ_INVERT 0xf0200040
#define F367TER_INR_BYPASS 0xf0200020
#define F367TER_STATUS_INV_SPECRUM 0xf0200010
#define F367TER_GAIN_SRC_HI 0xf020000f
/* GAIN_SRC2 */
#define R367TER_GAIN_SRC2 0xf021
#define F367TER_GAIN_SRC_LO 0xf02100ff
/* INC_DEROT1 */
#define R367TER_INC_DEROT1 0xf022
#define F367TER_INC_DEROT_HI 0xf02200ff
/* INC_DEROT2 */
#define R367TER_INC_DEROT2 0xf023
#define F367TER_INC_DEROT_LO 0xf02300ff
/* PPM_CPAMP_DIR */
#define R367TER_PPM_CPAMP_DIR 0xf024
#define F367TER_PPM_CPAMP_DIRECT 0xf02400ff
/* PPM_CPAMP_INV */
#define R367TER_PPM_CPAMP_INV 0xf025
#define F367TER_PPM_CPAMP_INVER 0xf02500ff
/* FREESTFE_1 */
#define R367TER_FREESTFE_1 0xf026
#define F367TER_SYMBOL_NUMBER_INC 0xf02600c0
#define F367TER_SEL_LSB 0xf0260004
#define F367TER_AVERAGE_ON 0xf0260002
#define F367TER_DC_ADJ 0xf0260001
/* FREESTFE_2 */
#define R367TER_FREESTFE_2 0xf027
#define F367TER_SEL_SRCOUT 0xf02700c0
#define F367TER_SEL_SYRTHR 0xf027001f
/* DCOFFSET */
#define R367TER_DCOFFSET 0xf028
#define F367TER_SELECT_I_Q 0xf0280080
#define F367TER_DC_OFFSET 0xf028007f
/* EN_PROCESS */
#define R367TER_EN_PROCESS 0xf029
#define F367TER_FREE 0xf02900f0
#define F367TER_ENAB_MANUAL 0xf0290001
/* SDI_SMOOTHER */
#define R367TER_SDI_SMOOTHER 0xf02a
#define F367TER_DIS_SMOOTH 0xf02a0080
#define F367TER_SDI_INC_SMOOTHER 0xf02a007f
/* FE_LOOP_OPEN */
#define R367TER_FE_LOOP_OPEN 0xf02b
#define F367TER_TRL_LOOP_OP 0xf02b0002
#define F367TER_CRL_LOOP_OP 0xf02b0001
/* FREQOFF1 */
#define R367TER_FREQOFF1 0xf02c
#define F367TER_FREQ_OFFSET_LOOP_OPEN_VHI 0xf02c00ff
/* FREQOFF2 */
#define R367TER_FREQOFF2 0xf02d
#define F367TER_FREQ_OFFSET_LOOP_OPEN_HI 0xf02d00ff
/* FREQOFF3 */
#define R367TER_FREQOFF3 0xf02e
#define F367TER_FREQ_OFFSET_LOOP_OPEN_LO 0xf02e00ff
/* TIMOFF1 */
#define R367TER_TIMOFF1 0xf02f
#define F367TER_TIM_OFFSET_LOOP_OPEN_HI 0xf02f00ff
/* TIMOFF2 */
#define R367TER_TIMOFF2 0xf030
#define F367TER_TIM_OFFSET_LOOP_OPEN_LO 0xf03000ff
/* EPQ */
#define R367TER_EPQ 0xf031
#define F367TER_EPQ1 0xf03100ff
/* EPQAUTO */
#define R367TER_EPQAUTO 0xf032
#define F367TER_EPQ2 0xf03200ff
/* SYR_UPDATE */
#define R367TER_SYR_UPDATE 0xf033
#define F367TER_SYR_PROTV 0xf0330080
#define F367TER_SYR_PROTV_GAIN 0xf0330060
#define F367TER_SYR_FILTER 0xf0330010
#define F367TER_SYR_TRACK_THRES 0xf033000c
/* CHPFREE */
#define R367TER_CHPFREE 0xf034
#define F367TER_CHP_FREE 0xf03400ff
/* PPM_STATE_MAC */
#define R367TER_PPM_STATE_MAC 0xf035
#define F367TER_PPM_STATE_MACHINE_DECODER 0xf035003f
/* INR_THRESHOLD */
#define R367TER_INR_THRESHOLD 0xf036
#define F367TER_INR_THRESH 0xf03600ff
/* EPQ_TPS_ID_CELL */
#define R367TER_EPQ_TPS_ID_CELL 0xf037
#define F367TER_ENABLE_LGTH_TO_CF 0xf0370080
#define F367TER_DIS_TPS_RSVD 0xf0370040
#define F367TER_DIS_BCH 0xf0370020
#define F367TER_DIS_ID_CEL 0xf0370010
#define F367TER_TPS_ADJUST_SYM 0xf037000f
/* EPQ_CFG */
#define R367TER_EPQ_CFG 0xf038
#define F367TER_EPQ_RANGE 0xf0380002
#define F367TER_EPQ_SOFT 0xf0380001
/* EPQ_STATUS */
#define R367TER_EPQ_STATUS 0xf039
#define F367TER_SLOPE_INC 0xf03900fc
#define F367TER_TPS_FIELD 0xf0390003
/* AUTORELOCK */
#define R367TER_AUTORELOCK 0xf03a
#define F367TER_BYPASS_BER_TEMPO 0xf03a0080
#define F367TER_BER_TEMPO 0xf03a0070
#define F367TER_BYPASS_COFDM_TEMPO 0xf03a0008
#define F367TER_COFDM_TEMPO 0xf03a0007
/* BER_THR_VMSB */
#define R367TER_BER_THR_VMSB 0xf03b
#define F367TER_BER_THRESHOLD_HI 0xf03b00ff
/* BER_THR_MSB */
#define R367TER_BER_THR_MSB 0xf03c
#define F367TER_BER_THRESHOLD_MID 0xf03c00ff
/* BER_THR_LSB */
#define R367TER_BER_THR_LSB 0xf03d
#define F367TER_BER_THRESHOLD_LO 0xf03d00ff
/* CCD */
#define R367TER_CCD 0xf03e
#define F367TER_CCD_DETECTED 0xf03e0080
#define F367TER_CCD_RESET 0xf03e0040
#define F367TER_CCD_THRESHOLD 0xf03e000f
/* SPECTR_CFG */
#define R367TER_SPECTR_CFG 0xf03f
#define F367TER_SPECT_CFG 0xf03f0003
/* CONSTMU_MSB */
#define R367TER_CONSTMU_MSB 0xf040
#define F367TER_CONSTMU_FREEZE 0xf0400080
#define F367TER_CONSTNU_FORCE_EN 0xf0400040
#define F367TER_CONST_MU_MSB 0xf040003f
/* CONSTMU_LSB */
#define R367TER_CONSTMU_LSB 0xf041
#define F367TER_CONST_MU_LSB 0xf04100ff
/* CONSTMU_MAX_MSB */
#define R367TER_CONSTMU_MAX_MSB 0xf042
#define F367TER_CONST_MU_MAX_MSB 0xf042003f
/* CONSTMU_MAX_LSB */
#define R367TER_CONSTMU_MAX_LSB 0xf043
#define F367TER_CONST_MU_MAX_LSB 0xf04300ff
/* ALPHANOISE */
#define R367TER_ALPHANOISE 0xf044
#define F367TER_USE_ALLFILTER 0xf0440080
#define F367TER_INTER_ON 0xf0440040
#define F367TER_ALPHA_NOISE 0xf044001f
/* MAXGP_MSB */
#define R367TER_MAXGP_MSB 0xf045
#define F367TER_MUFILTER_LENGTH 0xf04500f0
#define F367TER_MAX_GP_MSB 0xf045000f
/* MAXGP_LSB */
#define R367TER_MAXGP_LSB 0xf046
#define F367TER_MAX_GP_LSB 0xf04600ff
/* ALPHAMSB */
#define R367TER_ALPHAMSB 0xf047
#define F367TER_CHC_DATARATE 0xf04700c0
#define F367TER_ALPHA_MSB 0xf047003f
/* ALPHALSB */
#define R367TER_ALPHALSB 0xf048
#define F367TER_ALPHA_LSB 0xf04800ff
/* PILOT_ACCU */
#define R367TER_PILOT_ACCU 0xf049
#define F367TER_USE_SCAT4ADDAPT 0xf0490080
#define F367TER_PILOT_ACC 0xf049001f
/* PILOTMU_ACCU */
#define R367TER_PILOTMU_ACCU 0xf04a
#define F367TER_DISCARD_BAD_SP 0xf04a0080
#define F367TER_DISCARD_BAD_CP 0xf04a0040
#define F367TER_PILOT_MU_ACCU 0xf04a001f
/* FILT_CHANNEL_EST */
#define R367TER_FILT_CHANNEL_EST 0xf04b
#define F367TER_USE_FILT_PILOT 0xf04b0080
#define F367TER_FILT_CHANNEL 0xf04b007f
/* ALPHA_NOPISE_FREQ */
#define R367TER_ALPHA_NOPISE_FREQ 0xf04c
#define F367TER_NOISE_FREQ_FILT 0xf04c0040
#define F367TER_ALPHA_NOISE_FREQ 0xf04c003f
/* RATIO_PILOT */
#define R367TER_RATIO_PILOT 0xf04d
#define F367TER_RATIO_MEAN_SP 0xf04d00f0
#define F367TER_RATIO_MEAN_CP 0xf04d000f
/* CHC_CTL */
#define R367TER_CHC_CTL 0xf04e
#define F367TER_TRACK_EN 0xf04e0080
#define F367TER_NOISE_NORM_EN 0xf04e0040
#define F367TER_FORCE_CHC_RESET 0xf04e0020
#define F367TER_SHORT_TIME 0xf04e0010
#define F367TER_FORCE_STATE_EN 0xf04e0008
#define F367TER_FORCE_STATE 0xf04e0007
/* EPQ_ADJUST */
#define R367TER_EPQ_ADJUST 0xf04f
#define F367TER_ADJUST_SCAT_IND 0xf04f00c0
#define F367TER_ONE_SYMBOL 0xf04f0010
#define F367TER_EPQ_DECAY 0xf04f000e
#define F367TER_HOLD_SLOPE 0xf04f0001
/* EPQ_THRES */
#define R367TER_EPQ_THRES 0xf050
#define F367TER_EPQ_THR 0xf05000ff
/* OMEGA_CTL */
#define R367TER_OMEGA_CTL 0xf051
#define F367TER_OMEGA_RST 0xf0510080
#define F367TER_FREEZE_OMEGA 0xf0510040
#define F367TER_OMEGA_SEL 0xf051003f
/* GP_CTL */
#define R367TER_GP_CTL 0xf052
#define F367TER_CHC_STATE 0xf05200e0
#define F367TER_FREEZE_GP 0xf0520010
#define F367TER_GP_SEL 0xf052000f
/* MUMSB */
#define R367TER_MUMSB 0xf053
#define F367TER_MU_MSB 0xf053007f
/* MULSB */
#define R367TER_MULSB 0xf054
#define F367TER_MU_LSB 0xf05400ff
/* GPMSB */
#define R367TER_GPMSB 0xf055
#define F367TER_CSI_THRESHOLD 0xf05500e0
#define F367TER_GP_MSB 0xf055000f
/* GPLSB */
#define R367TER_GPLSB 0xf056
#define F367TER_GP_LSB 0xf05600ff
/* OMEGAMSB */
#define R367TER_OMEGAMSB 0xf057
#define F367TER_OMEGA_MSB 0xf057007f
/* OMEGALSB */
#define R367TER_OMEGALSB 0xf058
#define F367TER_OMEGA_LSB 0xf05800ff
/* SCAT_NB */
#define R367TER_SCAT_NB 0xf059
#define F367TER_CHC_TEST 0xf05900f8
#define F367TER_SCAT_NUMB 0xf0590003
/* CHC_DUMMY */
#define R367TER_CHC_DUMMY 0xf05a
#define F367TER_CHC_DUM 0xf05a00ff
/* INC_CTL */
#define R367TER_INC_CTL 0xf05b
#define F367TER_INC_BYPASS 0xf05b0080
#define F367TER_INC_NDEPTH 0xf05b000c
#define F367TER_INC_MADEPTH 0xf05b0003
/* INCTHRES_COR1 */
#define R367TER_INCTHRES_COR1 0xf05c
#define F367TER_INC_THRES_COR1 0xf05c00ff
/* INCTHRES_COR2 */
#define R367TER_INCTHRES_COR2 0xf05d
#define F367TER_INC_THRES_COR2 0xf05d00ff
/* INCTHRES_DET1 */
#define R367TER_INCTHRES_DET1 0xf05e
#define F367TER_INC_THRES_DET1 0xf05e003f
/* INCTHRES_DET2 */
#define R367TER_INCTHRES_DET2 0xf05f
#define F367TER_INC_THRES_DET2 0xf05f003f
/* IIR_CELLNB */
#define R367TER_IIR_CELLNB 0xf060
#define F367TER_NRST_IIR 0xf0600080
#define F367TER_IIR_CELL_NB 0xf0600007
/* IIRCX_COEFF1_MSB */
#define R367TER_IIRCX_COEFF1_MSB 0xf061
#define F367TER_IIR_CX_COEFF1_MSB 0xf06100ff
/* IIRCX_COEFF1_LSB */
#define R367TER_IIRCX_COEFF1_LSB 0xf062
#define F367TER_IIR_CX_COEFF1_LSB 0xf06200ff
/* IIRCX_COEFF2_MSB */
#define R367TER_IIRCX_COEFF2_MSB 0xf063
#define F367TER_IIR_CX_COEFF2_MSB 0xf06300ff
/* IIRCX_COEFF2_LSB */
#define R367TER_IIRCX_COEFF2_LSB 0xf064
#define F367TER_IIR_CX_COEFF2_LSB 0xf06400ff
/* IIRCX_COEFF3_MSB */
#define R367TER_IIRCX_COEFF3_MSB 0xf065
#define F367TER_IIR_CX_COEFF3_MSB 0xf06500ff
/* IIRCX_COEFF3_LSB */
#define R367TER_IIRCX_COEFF3_LSB 0xf066
#define F367TER_IIR_CX_COEFF3_LSB 0xf06600ff
/* IIRCX_COEFF4_MSB */
#define R367TER_IIRCX_COEFF4_MSB 0xf067
#define F367TER_IIR_CX_COEFF4_MSB 0xf06700ff
/* IIRCX_COEFF4_LSB */
#define R367TER_IIRCX_COEFF4_LSB 0xf068
#define F367TER_IIR_CX_COEFF4_LSB 0xf06800ff
/* IIRCX_COEFF5_MSB */
#define R367TER_IIRCX_COEFF5_MSB 0xf069
#define F367TER_IIR_CX_COEFF5_MSB 0xf06900ff
/* IIRCX_COEFF5_LSB */
#define R367TER_IIRCX_COEFF5_LSB 0xf06a
#define F367TER_IIR_CX_COEFF5_LSB 0xf06a00ff
/* FEPATH_CFG */
#define R367TER_FEPATH_CFG 0xf06b
#define F367TER_DEMUX_SWAP 0xf06b0004
#define F367TER_DIGAGC_SWAP 0xf06b0002
#define F367TER_LONGPATH_IF 0xf06b0001
/* PMC1_FUNC */
#define R367TER_PMC1_FUNC 0xf06c
#define F367TER_SOFT_RSTN 0xf06c0080
#define F367TER_PMC1_AVERAGE_TIME 0xf06c0078
#define F367TER_PMC1_WAIT_TIME 0xf06c0006
#define F367TER_PMC1_2N_SEL 0xf06c0001
/* PMC1_FOR */
#define R367TER_PMC1_FOR 0xf06d
#define F367TER_PMC1_FORCE 0xf06d0080
#define F367TER_PMC1_FORCE_VALUE 0xf06d007c
/* PMC2_FUNC */
#define R367TER_PMC2_FUNC 0xf06e
#define F367TER_PMC2_SOFT_STN 0xf06e0080
#define F367TER_PMC2_ACCU_TIME 0xf06e0070
#define F367TER_PMC2_CMDP_MN 0xf06e0008
#define F367TER_PMC2_SWAP 0xf06e0004
/* STATUS_ERR_DA */
#define R367TER_STATUS_ERR_DA 0xf06f
#define F367TER_COM_USEGAINTRK 0xf06f0080
#define F367TER_COM_AGCLOCK 0xf06f0040
#define F367TER_AUT_AGCLOCK 0xf06f0020
#define F367TER_MIN_ERR_X_LSB 0xf06f000f
/* DIG_AGC_R */
#define R367TER_DIG_AGC_R 0xf070
#define F367TER_COM_SOFT_RSTN 0xf0700080
#define F367TER_COM_AGC_ON 0xf0700040
#define F367TER_COM_EARLY 0xf0700020
#define F367TER_AUT_SOFT_RESETN 0xf0700010
#define F367TER_AUT_AGC_ON 0xf0700008
#define F367TER_AUT_EARLY 0xf0700004
#define F367TER_AUT_ROT_EN 0xf0700002
#define F367TER_LOCK_SOFT_RESETN 0xf0700001
/* COMAGC_TARMSB */
#define R367TER_COMAGC_TARMSB 0xf071
#define F367TER_COM_AGC_TARGET_MSB 0xf07100ff
/* COM_AGC_TAR_ENMODE */
#define R367TER_COM_AGC_TAR_ENMODE 0xf072
#define F367TER_COM_AGC_TARGET_LSB 0xf07200f0
#define F367TER_COM_ENMODE 0xf072000f
/* COM_AGC_CFG */
#define R367TER_COM_AGC_CFG 0xf073
#define F367TER_COM_N 0xf07300f8
#define F367TER_COM_STABMODE 0xf0730006
#define F367TER_ERR_SEL 0xf0730001
/* COM_AGC_GAIN1 */
#define R367TER_COM_AGC_GAIN1 0xf074
#define F367TER_COM_GAIN1aCK 0xf07400f0
#define F367TER_COM_GAIN1TRK 0xf074000f
/* AUT_AGC_TARGETMSB */
#define R367TER_AUT_AGC_TARGETMSB 0xf075
#define F367TER_AUT_AGC_TARGET_MSB 0xf07500ff
/* LOCK_DET_MSB */
#define R367TER_LOCK_DET_MSB 0xf076
#define F367TER_LOCK_DETECT_MSB 0xf07600ff
/* AGCTAR_LOCK_LSBS */
#define R367TER_AGCTAR_LOCK_LSBS 0xf077
#define F367TER_AUT_AGC_TARGET_LSB 0xf07700f0
#define F367TER_LOCK_DETECT_LSB 0xf077000f
/* AUT_GAIN_EN */
#define R367TER_AUT_GAIN_EN 0xf078
#define F367TER_AUT_ENMODE 0xf07800f0
#define F367TER_AUT_GAIN2 0xf078000f
/* AUT_CFG */
#define R367TER_AUT_CFG 0xf079
#define F367TER_AUT_N 0xf07900f8
#define F367TER_INT_CHOICE 0xf0790006
#define F367TER_INT_LOAD 0xf0790001
/* LOCKN */
#define R367TER_LOCKN 0xf07a
#define F367TER_LOCK_N 0xf07a00f8
#define F367TER_SEL_IQNTAR 0xf07a0004
#define F367TER_LOCK_DETECT_CHOICE 0xf07a0003
/* INT_X_3 */
#define R367TER_INT_X_3 0xf07b
#define F367TER_INT_X3 0xf07b00ff
/* INT_X_2 */
#define R367TER_INT_X_2 0xf07c
#define F367TER_INT_X2 0xf07c00ff
/* INT_X_1 */
#define R367TER_INT_X_1 0xf07d
#define F367TER_INT_X1 0xf07d00ff
/* INT_X_0 */
#define R367TER_INT_X_0 0xf07e
#define F367TER_INT_X0 0xf07e00ff
/* MIN_ERRX_MSB */
#define R367TER_MIN_ERRX_MSB 0xf07f
#define F367TER_MIN_ERR_X_MSB 0xf07f00ff
/* COR_CTL */
#define R367TER_COR_CTL 0xf080
#define F367TER_CORE_ACTIVE 0xf0800020
#define F367TER_HOLD 0xf0800010
#define F367TER_CORE_STATE_CTL 0xf080000f
/* COR_STAT */
#define R367TER_COR_STAT 0xf081
#define F367TER_SCATT_LOCKED 0xf0810080
#define F367TER_TPS_LOCKED 0xf0810040
#define F367TER_SYR_LOCKED_COR 0xf0810020
#define F367TER_AGC_LOCKED_STAT 0xf0810010
#define F367TER_CORE_STATE_STAT 0xf081000f
/* COR_INTEN */
#define R367TER_COR_INTEN 0xf082
#define F367TER_INTEN 0xf0820080
#define F367TER_INTEN_SYR 0xf0820020
#define F367TER_INTEN_FFT 0xf0820010
#define F367TER_INTEN_AGC 0xf0820008
#define F367TER_INTEN_TPS1 0xf0820004
#define F367TER_INTEN_TPS2 0xf0820002
#define F367TER_INTEN_TPS3 0xf0820001
/* COR_INTSTAT */
#define R367TER_COR_INTSTAT 0xf083
#define F367TER_INTSTAT_SYR 0xf0830020
#define F367TER_INTSTAT_FFT 0xf0830010
#define F367TER_INTSAT_AGC 0xf0830008
#define F367TER_INTSTAT_TPS1 0xf0830004
#define F367TER_INTSTAT_TPS2 0xf0830002
#define F367TER_INTSTAT_TPS3 0xf0830001
/* COR_MODEGUARD */
#define R367TER_COR_MODEGUARD 0xf084
#define F367TER_FORCE 0xf0840010
#define F367TER_MODE 0xf084000c
#define F367TER_GUARD 0xf0840003
/* AGC_CTL */
#define R367TER_AGC_CTL 0xf085
#define F367TER_AGC_TIMING_FACTOR 0xf08500e0
#define F367TER_AGC_LAST 0xf0850010
#define F367TER_AGC_GAIN 0xf085000c
#define F367TER_AGC_NEG 0xf0850002
#define F367TER_AGC_SET 0xf0850001
/* AGC_MANUAL1 */
#define R367TER_AGC_MANUAL1 0xf086
#define F367TER_AGC_VAL_LO 0xf08600ff
/* AGC_MANUAL2 */
#define R367TER_AGC_MANUAL2 0xf087
#define F367TER_AGC_VAL_HI 0xf087000f
/* AGC_TARG */
#define R367TER_AGC_TARG 0xf088
#define F367TER_AGC_TARGET 0xf08800ff
/* AGC_GAIN1 */
#define R367TER_AGC_GAIN1 0xf089
#define F367TER_AGC_GAIN_LO 0xf08900ff
/* AGC_GAIN2 */
#define R367TER_AGC_GAIN2 0xf08a
#define F367TER_AGC_LOCKED_GAIN2 0xf08a0010
#define F367TER_AGC_GAIN_HI 0xf08a000f
/* RESERVED_1 */
#define R367TER_RESERVED_1 0xf08b
#define F367TER_RESERVED1 0xf08b00ff
/* RESERVED_2 */
#define R367TER_RESERVED_2 0xf08c
#define F367TER_RESERVED2 0xf08c00ff
/* RESERVED_3 */
#define R367TER_RESERVED_3 0xf08d
#define F367TER_RESERVED3 0xf08d00ff
/* CAS_CTL */
#define R367TER_CAS_CTL 0xf08e
#define F367TER_CCS_ENABLE 0xf08e0080
#define F367TER_ACS_DISABLE 0xf08e0040
#define F367TER_DAGC_DIS 0xf08e0020
#define F367TER_DAGC_GAIN 0xf08e0018
#define F367TER_CCSMU 0xf08e0007
/* CAS_FREQ */
#define R367TER_CAS_FREQ 0xf08f
#define F367TER_CCS_FREQ 0xf08f00ff
/* CAS_DAGCGAIN */
#define R367TER_CAS_DAGCGAIN 0xf090
#define F367TER_CAS_DAGC_GAIN 0xf09000ff
/* SYR_CTL */
#define R367TER_SYR_CTL 0xf091
#define F367TER_SICTH_ENABLE 0xf0910080
#define F367TER_LONG_ECHO 0xf0910078
#define F367TER_AUTO_LE_EN 0xf0910004
#define F367TER_SYR_BYPASS 0xf0910002
#define F367TER_SYR_TR_DIS 0xf0910001
/* SYR_STAT */
#define R367TER_SYR_STAT 0xf092
#define F367TER_SYR_LOCKED_STAT 0xf0920010
#define F367TER_SYR_MODE 0xf092000c
#define F367TER_SYR_GUARD 0xf0920003
/* SYR_NCO1 */
#define R367TER_SYR_NCO1 0xf093
#define F367TER_SYR_NCO_LO 0xf09300ff
/* SYR_NCO2 */
#define R367TER_SYR_NCO2 0xf094
#define F367TER_SYR_NCO_HI 0xf094003f
/* SYR_OFFSET1 */
#define R367TER_SYR_OFFSET1 0xf095
#define F367TER_SYR_OFFSET_LO 0xf09500ff
/* SYR_OFFSET2 */
#define R367TER_SYR_OFFSET2 0xf096
#define F367TER_SYR_OFFSET_HI 0xf096003f
/* FFT_CTL */
#define R367TER_FFT_CTL 0xf097
#define F367TER_SHIFT_FFT_TRIG 0xf0970018
#define F367TER_FFT_TRIGGER 0xf0970004
#define F367TER_FFT_MANUAL 0xf0970002
#define F367TER_IFFT_MODE 0xf0970001
/* SCR_CTL */
#define R367TER_SCR_CTL 0xf098
#define F367TER_SYRADJDECAY 0xf0980070
#define F367TER_SCR_CPEDIS 0xf0980002
#define F367TER_SCR_DIS 0xf0980001
/* PPM_CTL1 */
#define R367TER_PPM_CTL1 0xf099
#define F367TER_PPM_MAXFREQ 0xf0990030
#define F367TER_PPM_MAXTIM 0xf0990008
#define F367TER_PPM_INVSEL 0xf0990004
#define F367TER_PPM_SCATDIS 0xf0990002
#define F367TER_PPM_BYP 0xf0990001
/* TRL_CTL */
#define R367TER_TRL_CTL 0xf09a
#define F367TER_TRL_NOMRATE_LSB 0xf09a0080
#define F367TER_TRL_GAIN_FACTOR 0xf09a0078
#define F367TER_TRL_LOOPGAIN 0xf09a0007
/* TRL_NOMRATE1 */
#define R367TER_TRL_NOMRATE1 0xf09b
#define F367TER_TRL_NOMRATE_LO 0xf09b00ff
/* TRL_NOMRATE2 */
#define R367TER_TRL_NOMRATE2 0xf09c
#define F367TER_TRL_NOMRATE_HI 0xf09c00ff
/* TRL_TIME1 */
#define R367TER_TRL_TIME1 0xf09d
#define F367TER_TRL_TOFFSET_LO 0xf09d00ff
/* TRL_TIME2 */
#define R367TER_TRL_TIME2 0xf09e
#define F367TER_TRL_TOFFSET_HI 0xf09e00ff
/* CRL_CTL */
#define R367TER_CRL_CTL 0xf09f
#define F367TER_CRL_DIS 0xf09f0080
#define F367TER_CRL_GAIN_FACTOR 0xf09f0078
#define F367TER_CRL_LOOPGAIN 0xf09f0007
/* CRL_FREQ1 */
#define R367TER_CRL_FREQ1 0xf0a0
#define F367TER_CRL_FOFFSET_LO 0xf0a000ff
/* CRL_FREQ2 */
#define R367TER_CRL_FREQ2 0xf0a1
#define F367TER_CRL_FOFFSET_HI 0xf0a100ff
/* CRL_FREQ3 */
#define R367TER_CRL_FREQ3 0xf0a2
#define F367TER_CRL_FOFFSET_VHI 0xf0a200ff
/* TPS_SFRAME_CTL */
#define R367TER_TPS_SFRAME_CTL 0xf0a3
#define F367TER_TPS_SFRAME_SYNC 0xf0a30001
/* CHC_SNR */
#define R367TER_CHC_SNR 0xf0a4
#define F367TER_CHCSNR 0xf0a400ff
/* BDI_CTL */
#define R367TER_BDI_CTL 0xf0a5
#define F367TER_BDI_LPSEL 0xf0a50002
#define F367TER_BDI_SERIAL 0xf0a50001
/* DMP_CTL */
#define R367TER_DMP_CTL 0xf0a6
#define F367TER_DMP_SCALING_FACTOR 0xf0a6001e
#define F367TER_DMP_SDDIS 0xf0a60001
/* TPS_RCVD1 */
#define R367TER_TPS_RCVD1 0xf0a7
#define F367TER_TPS_CHANGE 0xf0a70040
#define F367TER_BCH_OK 0xf0a70020
#define F367TER_TPS_SYNC 0xf0a70010
#define F367TER_TPS_FRAME 0xf0a70003
/* TPS_RCVD2 */
#define R367TER_TPS_RCVD2 0xf0a8
#define F367TER_TPS_HIERMODE 0xf0a80070
#define F367TER_TPS_CONST 0xf0a80003
/* TPS_RCVD3 */
#define R367TER_TPS_RCVD3 0xf0a9
#define F367TER_TPS_LPCODE 0xf0a90070
#define F367TER_TPS_HPCODE 0xf0a90007
/* TPS_RCVD4 */
#define R367TER_TPS_RCVD4 0xf0aa
#define F367TER_TPS_GUARD 0xf0aa0030
#define F367TER_TPS_MODE 0xf0aa0003
/* TPS_ID_CELL1 */
#define R367TER_TPS_ID_CELL1 0xf0ab
#define F367TER_TPS_ID_CELL_LO 0xf0ab00ff
/* TPS_ID_CELL2 */
#define R367TER_TPS_ID_CELL2 0xf0ac
#define F367TER_TPS_ID_CELL_HI 0xf0ac00ff
/* TPS_RCVD5_SET1 */
#define R367TER_TPS_RCVD5_SET1 0xf0ad
#define F367TER_TPS_NA 0xf0ad00fC
#define F367TER_TPS_SETFRAME 0xf0ad0003
/* TPS_SET2 */
#define R367TER_TPS_SET2 0xf0ae
#define F367TER_TPS_SETHIERMODE 0xf0ae0070
#define F367TER_TPS_SETCONST 0xf0ae0003
/* TPS_SET3 */
#define R367TER_TPS_SET3 0xf0af
#define F367TER_TPS_SETLPCODE 0xf0af0070
#define F367TER_TPS_SETHPCODE 0xf0af0007
/* TPS_CTL */
#define R367TER_TPS_CTL 0xf0b0
#define F367TER_TPS_IMM 0xf0b00004
#define F367TER_TPS_BCHDIS 0xf0b00002
#define F367TER_TPS_UPDDIS 0xf0b00001
/* CTL_FFTOSNUM */
#define R367TER_CTL_FFTOSNUM 0xf0b1
#define F367TER_SYMBOL_NUMBER 0xf0b1007f
/* TESTSELECT */
#define R367TER_TESTSELECT 0xf0b2
#define F367TER_TEST_SELECT 0xf0b2001f
/* MSC_REV */
#define R367TER_MSC_REV 0xf0b3
#define F367TER_REV_NUMBER 0xf0b300ff
/* PIR_CTL */
#define R367TER_PIR_CTL 0xf0b4
#define F367TER_FREEZE 0xf0b40001
/* SNR_CARRIER1 */
#define R367TER_SNR_CARRIER1 0xf0b5
#define F367TER_SNR_CARRIER_LO 0xf0b500ff
/* SNR_CARRIER2 */
#define R367TER_SNR_CARRIER2 0xf0b6
#define F367TER_MEAN 0xf0b600c0
#define F367TER_SNR_CARRIER_HI 0xf0b6001f
/* PPM_CPAMP */
#define R367TER_PPM_CPAMP 0xf0b7
#define F367TER_PPM_CPC 0xf0b700ff
/* TSM_AP0 */
#define R367TER_TSM_AP0 0xf0b8
#define F367TER_ADDRESS_BYTE_0 0xf0b800ff
/* TSM_AP1 */
#define R367TER_TSM_AP1 0xf0b9
#define F367TER_ADDRESS_BYTE_1 0xf0b900ff
/* TSM_AP2 */
#define R367TER_TSM_AP2 0xf0bA
#define F367TER_DATA_BYTE_0 0xf0ba00ff
/* TSM_AP3 */
#define R367TER_TSM_AP3 0xf0bB
#define F367TER_DATA_BYTE_1 0xf0bb00ff
/* TSM_AP4 */
#define R367TER_TSM_AP4 0xf0bC
#define F367TER_DATA_BYTE_2 0xf0bc00ff
/* TSM_AP5 */
#define R367TER_TSM_AP5 0xf0bD
#define F367TER_DATA_BYTE_3 0xf0bd00ff
/* TSM_AP6 */
#define R367TER_TSM_AP6 0xf0bE
#define F367TER_TSM_AP_6 0xf0be00ff
/* TSM_AP7 */
#define R367TER_TSM_AP7 0xf0bF
#define F367TER_MEM_SELECT_BYTE 0xf0bf00ff
/* TSTRES */
#define R367TER_TSTRES 0xf0c0
#define F367TER_FRES_DISPLAY 0xf0c00080
#define F367TER_FRES_FIFO_AD 0xf0c00020
#define F367TER_FRESRS 0xf0c00010
#define F367TER_FRESACS 0xf0c00008
#define F367TER_FRESFEC 0xf0c00004
#define F367TER_FRES_PRIF 0xf0c00002
#define F367TER_FRESCORE 0xf0c00001
/* ANACTRL */
#define R367TER_ANACTRL 0xf0c1
#define F367TER_BYPASS_XTAL 0xf0c10040
#define F367TER_BYPASS_PLLXN 0xf0c1000c
#define F367TER_DIS_PAD_OSC 0xf0c10002
#define F367TER_STDBY_PLLXN 0xf0c10001
/* TSTBUS */
#define R367TER_TSTBUS 0xf0c2
#define F367TER_TS_BYTE_CLK_INV 0xf0c20080
#define F367TER_CFG_IP 0xf0c20070
#define F367TER_CFG_TST 0xf0c2000f
/* TSTRATE */
#define R367TER_TSTRATE 0xf0c6
#define F367TER_FORCEPHA 0xf0c60080
#define F367TER_FNEWPHA 0xf0c60010
#define F367TER_FROT90 0xf0c60008
#define F367TER_FR 0xf0c60007
/* CONSTMODE */
#define R367TER_CONSTMODE 0xf0cb
#define F367TER_TST_PRIF 0xf0cb00e0
#define F367TER_CAR_TYPE 0xf0cb0018
#define F367TER_CONST_MODE 0xf0cb0003
/* CONSTCARR1 */
#define R367TER_CONSTCARR1 0xf0cc
#define F367TER_CONST_CARR_LO 0xf0cc00ff
/* CONSTCARR2 */
#define R367TER_CONSTCARR2 0xf0cd
#define F367TER_CONST_CARR_HI 0xf0cd001f
/* ICONSTEL */
#define R367TER_ICONSTEL 0xf0ce
#define F367TER_PICONSTEL 0xf0ce00ff
/* QCONSTEL */
#define R367TER_QCONSTEL 0xf0cf
#define F367TER_PQCONSTEL 0xf0cf00ff
/* TSTBISTRES0 */
#define R367TER_TSTBISTRES0 0xf0d0
#define F367TER_BEND_PPM 0xf0d00080
#define F367TER_BBAD_PPM 0xf0d00040
#define F367TER_BEND_FFTW 0xf0d00020
#define F367TER_BBAD_FFTW 0xf0d00010
#define F367TER_BEND_FFT_BUF 0xf0d00008
#define F367TER_BBAD_FFT_BUF 0xf0d00004
#define F367TER_BEND_SYR 0xf0d00002
#define F367TER_BBAD_SYR 0xf0d00001
/* TSTBISTRES1 */
#define R367TER_TSTBISTRES1 0xf0d1
#define F367TER_BEND_CHC_CP 0xf0d10080
#define F367TER_BBAD_CHC_CP 0xf0d10040
#define F367TER_BEND_CHCI 0xf0d10020
#define F367TER_BBAD_CHCI 0xf0d10010
#define F367TER_BEND_BDI 0xf0d10008
#define F367TER_BBAD_BDI 0xf0d10004
#define F367TER_BEND_SDI 0xf0d10002
#define F367TER_BBAD_SDI 0xf0d10001
/* TSTBISTRES2 */
#define R367TER_TSTBISTRES2 0xf0d2
#define F367TER_BEND_CHC_INC 0xf0d20080
#define F367TER_BBAD_CHC_INC 0xf0d20040
#define F367TER_BEND_CHC_SPP 0xf0d20020
#define F367TER_BBAD_CHC_SPP 0xf0d20010
#define F367TER_BEND_CHC_CPP 0xf0d20008
#define F367TER_BBAD_CHC_CPP 0xf0d20004
#define F367TER_BEND_CHC_SP 0xf0d20002
#define F367TER_BBAD_CHC_SP 0xf0d20001
/* TSTBISTRES3 */
#define R367TER_TSTBISTRES3 0xf0d3
#define F367TER_BEND_QAM 0xf0d30080
#define F367TER_BBAD_QAM 0xf0d30040
#define F367TER_BEND_SFEC_VIT 0xf0d30020
#define F367TER_BBAD_SFEC_VIT 0xf0d30010
#define F367TER_BEND_SFEC_DLINE 0xf0d30008
#define F367TER_BBAD_SFEC_DLINE 0xf0d30004
#define F367TER_BEND_SFEC_HW 0xf0d30002
#define F367TER_BBAD_SFEC_HW 0xf0d30001
/* RF_AGC1 */
#define R367TER_RF_AGC1 0xf0d4
#define F367TER_RF_AGC1_LEVEL_HI 0xf0d400ff
/* RF_AGC2 */
#define R367TER_RF_AGC2 0xf0d5
#define F367TER_REF_ADGP 0xf0d50080
#define F367TER_STDBY_ADCGP 0xf0d50020
#define F367TER_CHANNEL_SEL 0xf0d5001c
#define F367TER_RF_AGC1_LEVEL_LO 0xf0d50003
/* ANADIGCTRL */
#define R367TER_ANADIGCTRL 0xf0d7
#define F367TER_SEL_CLKDEM 0xf0d70020
#define F367TER_EN_BUFFER_Q 0xf0d70010
#define F367TER_EN_BUFFER_I 0xf0d70008
#define F367TER_ADC_RIS_EGDE 0xf0d70004
#define F367TER_SGN_ADC 0xf0d70002
#define F367TER_SEL_AD12_SYNC 0xf0d70001
/* PLLMDIV */
#define R367TER_PLLMDIV 0xf0d8
#define F367TER_PLL_MDIV 0xf0d800ff
/* PLLNDIV */
#define R367TER_PLLNDIV 0xf0d9
#define F367TER_PLL_NDIV 0xf0d900ff
/* PLLSETUP */
#define R367TER_PLLSETUP 0xf0dA
#define F367TER_PLL_PDIV 0xf0da0070
#define F367TER_PLL_KDIV 0xf0da000f
/* DUAL_AD12 */
#define R367TER_DUAL_AD12 0xf0dB
#define F367TER_FS20M 0xf0db0020
#define F367TER_FS50M 0xf0db0010
#define F367TER_INMODe0 0xf0db0008
#define F367TER_POFFQ 0xf0db0004
#define F367TER_POFFI 0xf0db0002
#define F367TER_INMODE1 0xf0db0001
/* TSTBIST */
#define R367TER_TSTBIST 0xf0dC
#define F367TER_TST_BYP_CLK 0xf0dc0080
#define F367TER_TST_GCLKENA_STD 0xf0dc0040
#define F367TER_TST_GCLKENA 0xf0dc0020
#define F367TER_TST_MEMBIST 0xf0dc001f
/* PAD_COMP_CTRL */
#define R367TER_PAD_COMP_CTRL 0xf0dD
#define F367TER_COMPTQ 0xf0dd0010
#define F367TER_COMPEN 0xf0dd0008
#define F367TER_FREEZE2 0xf0dd0004
#define F367TER_SLEEP_INHBT 0xf0dd0002
#define F367TER_CHIP_SLEEP 0xf0dd0001
/* PAD_COMP_WR */
#define R367TER_PAD_COMP_WR 0xf0de
#define F367TER_WR_ASRC 0xf0de007f
/* PAD_COMP_RD */
#define R367TER_PAD_COMP_RD 0xf0df
#define F367TER_COMPOK 0xf0df0080
#define F367TER_RD_ASRC 0xf0df007f
/* SYR_TARGET_FFTADJT_MSB */
#define R367TER_SYR_TARGET_FFTADJT_MSB 0xf100
#define F367TER_SYR_START 0xf1000080
#define F367TER_SYR_TARGET_FFTADJ_HI 0xf100000f
/* SYR_TARGET_FFTADJT_LSB */
#define R367TER_SYR_TARGET_FFTADJT_LSB 0xf101
#define F367TER_SYR_TARGET_FFTADJ_LO 0xf10100ff
/* SYR_TARGET_CHCADJT_MSB */
#define R367TER_SYR_TARGET_CHCADJT_MSB 0xf102
#define F367TER_SYR_TARGET_CHCADJ_HI 0xf102000f
/* SYR_TARGET_CHCADJT_LSB */
#define R367TER_SYR_TARGET_CHCADJT_LSB 0xf103
#define F367TER_SYR_TARGET_CHCADJ_LO 0xf10300ff
/* SYR_FLAG */
#define R367TER_SYR_FLAG 0xf104
#define F367TER_TRIG_FLG1 0xf1040080
#define F367TER_TRIG_FLG0 0xf1040040
#define F367TER_FFT_FLG1 0xf1040008
#define F367TER_FFT_FLG0 0xf1040004
#define F367TER_CHC_FLG1 0xf1040002
#define F367TER_CHC_FLG0 0xf1040001
/* CRL_TARGET1 */
#define R367TER_CRL_TARGET1 0xf105
#define F367TER_CRL_START 0xf1050080
#define F367TER_CRL_TARGET_VHI 0xf105000f
/* CRL_TARGET2 */
#define R367TER_CRL_TARGET2 0xf106
#define F367TER_CRL_TARGET_HI 0xf10600ff
/* CRL_TARGET3 */
#define R367TER_CRL_TARGET3 0xf107
#define F367TER_CRL_TARGET_LO 0xf10700ff
/* CRL_TARGET4 */
#define R367TER_CRL_TARGET4 0xf108
#define F367TER_CRL_TARGET_VLO 0xf10800ff
/* CRL_FLAG */
#define R367TER_CRL_FLAG 0xf109
#define F367TER_CRL_FLAG1 0xf1090002
#define F367TER_CRL_FLAG0 0xf1090001
/* TRL_TARGET1 */
#define R367TER_TRL_TARGET1 0xf10a
#define F367TER_TRL_TARGET_HI 0xf10a00ff
/* TRL_TARGET2 */
#define R367TER_TRL_TARGET2 0xf10b
#define F367TER_TRL_TARGET_LO 0xf10b00ff
/* TRL_CHC */
#define R367TER_TRL_CHC 0xf10c
#define F367TER_TRL_START 0xf10c0080
#define F367TER_CHC_START 0xf10c0040
#define F367TER_TRL_FLAG1 0xf10c0002
#define F367TER_TRL_FLAG0 0xf10c0001
/* CHC_SNR_TARG */
#define R367TER_CHC_SNR_TARG 0xf10d
#define F367TER_CHC_SNR_TARGET 0xf10d00ff
/* TOP_TRACK */
#define R367TER_TOP_TRACK 0xf10e
#define F367TER_TOP_START 0xf10e0080
#define F367TER_FIRST_FLAG 0xf10e0070
#define F367TER_TOP_FLAG1 0xf10e0008
#define F367TER_TOP_FLAG0 0xf10e0004
#define F367TER_CHC_FLAG1 0xf10e0002
#define F367TER_CHC_FLAG0 0xf10e0001
/* TRACKER_FREE1 */
#define R367TER_TRACKER_FREE1 0xf10f
#define F367TER_TRACKER_FREE_1 0xf10f00ff
/* ERROR_CRL1 */
#define R367TER_ERROR_CRL1 0xf110
#define F367TER_ERROR_CRL_VHI 0xf11000ff
/* ERROR_CRL2 */
#define R367TER_ERROR_CRL2 0xf111
#define F367TER_ERROR_CRL_HI 0xf11100ff
/* ERROR_CRL3 */
#define R367TER_ERROR_CRL3 0xf112
#define F367TER_ERROR_CRL_LOI 0xf11200ff
/* ERROR_CRL4 */
#define R367TER_ERROR_CRL4 0xf113
#define F367TER_ERROR_CRL_VLO 0xf11300ff
/* DEC_NCO1 */
#define R367TER_DEC_NCO1 0xf114
#define F367TER_DEC_NCO_VHI 0xf11400ff
/* DEC_NCO2 */
#define R367TER_DEC_NCO2 0xf115
#define F367TER_DEC_NCO_HI 0xf11500ff
/* DEC_NCO3 */
#define R367TER_DEC_NCO3 0xf116
#define F367TER_DEC_NCO_LO 0xf11600ff
/* SNR */
#define R367TER_SNR 0xf117
#define F367TER_SNRATIO 0xf11700ff
/* SYR_FFTADJ1 */
#define R367TER_SYR_FFTADJ1 0xf118
#define F367TER_SYR_FFTADJ_HI 0xf11800ff
/* SYR_FFTADJ2 */
#define R367TER_SYR_FFTADJ2 0xf119
#define F367TER_SYR_FFTADJ_LO 0xf11900ff
/* SYR_CHCADJ1 */
#define R367TER_SYR_CHCADJ1 0xf11a
#define F367TER_SYR_CHCADJ_HI 0xf11a00ff
/* SYR_CHCADJ2 */
#define R367TER_SYR_CHCADJ2 0xf11b
#define F367TER_SYR_CHCADJ_LO 0xf11b00ff
/* SYR_OFF */
#define R367TER_SYR_OFF 0xf11c
#define F367TER_SYR_OFFSET 0xf11c00ff
/* PPM_OFFSET1 */
#define R367TER_PPM_OFFSET1 0xf11d
#define F367TER_PPM_OFFSET_HI 0xf11d00ff
/* PPM_OFFSET2 */
#define R367TER_PPM_OFFSET2 0xf11e
#define F367TER_PPM_OFFSET_LO 0xf11e00ff
/* TRACKER_FREE2 */
#define R367TER_TRACKER_FREE2 0xf11f
#define F367TER_TRACKER_FREE_2 0xf11f00ff
/* DEBG_LT10 */
#define R367TER_DEBG_LT10 0xf120
#define F367TER_DEBUG_LT10 0xf12000ff
/* DEBG_LT11 */
#define R367TER_DEBG_LT11 0xf121
#define F367TER_DEBUG_LT11 0xf12100ff
/* DEBG_LT12 */
#define R367TER_DEBG_LT12 0xf122
#define F367TER_DEBUG_LT12 0xf12200ff
/* DEBG_LT13 */
#define R367TER_DEBG_LT13 0xf123
#define F367TER_DEBUG_LT13 0xf12300ff
/* DEBG_LT14 */
#define R367TER_DEBG_LT14 0xf124
#define F367TER_DEBUG_LT14 0xf12400ff
/* DEBG_LT15 */
#define R367TER_DEBG_LT15 0xf125
#define F367TER_DEBUG_LT15 0xf12500ff
/* DEBG_LT16 */
#define R367TER_DEBG_LT16 0xf126
#define F367TER_DEBUG_LT16 0xf12600ff
/* DEBG_LT17 */
#define R367TER_DEBG_LT17 0xf127
#define F367TER_DEBUG_LT17 0xf12700ff
/* DEBG_LT18 */
#define R367TER_DEBG_LT18 0xf128
#define F367TER_DEBUG_LT18 0xf12800ff
/* DEBG_LT19 */
#define R367TER_DEBG_LT19 0xf129
#define F367TER_DEBUG_LT19 0xf12900ff
/* DEBG_LT1a */
#define R367TER_DEBG_LT1A 0xf12a
#define F367TER_DEBUG_LT1A 0xf12a00ff
/* DEBG_LT1b */
#define R367TER_DEBG_LT1B 0xf12b
#define F367TER_DEBUG_LT1B 0xf12b00ff
/* DEBG_LT1c */
#define R367TER_DEBG_LT1C 0xf12c
#define F367TER_DEBUG_LT1C 0xf12c00ff
/* DEBG_LT1D */
#define R367TER_DEBG_LT1D 0xf12d
#define F367TER_DEBUG_LT1D 0xf12d00ff
/* DEBG_LT1E */
#define R367TER_DEBG_LT1E 0xf12e
#define F367TER_DEBUG_LT1E 0xf12e00ff
/* DEBG_LT1F */
#define R367TER_DEBG_LT1F 0xf12f
#define F367TER_DEBUG_LT1F 0xf12f00ff
/* RCCFGH */
#define R367TER_RCCFGH 0xf200
#define F367TER_TSRCFIFO_DVBCI 0xf2000080
#define F367TER_TSRCFIFO_SERIAL 0xf2000040
#define F367TER_TSRCFIFO_DISABLE 0xf2000020
#define F367TER_TSFIFO_2TORC 0xf2000010
#define F367TER_TSRCFIFO_HSGNLOUT 0xf2000008
#define F367TER_TSRCFIFO_ERRMODE 0xf2000006
#define F367TER_RCCFGH_0 0xf2000001
/* RCCFGM */
#define R367TER_RCCFGM 0xf201
#define F367TER_TSRCFIFO_MANSPEED 0xf20100c0
#define F367TER_TSRCFIFO_PERMDATA 0xf2010020
#define F367TER_TSRCFIFO_NONEWSGNL 0xf2010010
#define F367TER_RCBYTE_OVERSAMPLING 0xf201000e
#define F367TER_TSRCFIFO_INVDATA 0xf2010001
/* RCCFGL */
#define R367TER_RCCFGL 0xf202
#define F367TER_TSRCFIFO_BCLKDEL1cK 0xf20200c0
#define F367TER_RCCFGL_5 0xf2020020
#define F367TER_TSRCFIFO_DUTY50 0xf2020010
#define F367TER_TSRCFIFO_NSGNL2dATA 0xf2020008
#define F367TER_TSRCFIFO_DISSERMUX 0xf2020004
#define F367TER_RCCFGL_1 0xf2020002
#define F367TER_TSRCFIFO_STOPCKDIS 0xf2020001
/* RCINSDELH */
#define R367TER_RCINSDELH 0xf203
#define F367TER_TSRCDEL_SYNCBYTE 0xf2030080
#define F367TER_TSRCDEL_XXHEADER 0xf2030040
#define F367TER_TSRCDEL_BBHEADER 0xf2030020
#define F367TER_TSRCDEL_DATAFIELD 0xf2030010
#define F367TER_TSRCINSDEL_ISCR 0xf2030008
#define F367TER_TSRCINSDEL_NPD 0xf2030004
#define F367TER_TSRCINSDEL_RSPARITY 0xf2030002
#define F367TER_TSRCINSDEL_CRC8 0xf2030001
/* RCINSDELM */
#define R367TER_RCINSDELM 0xf204
#define F367TER_TSRCINS_BBPADDING 0xf2040080
#define F367TER_TSRCINS_BCHFEC 0xf2040040
#define F367TER_TSRCINS_LDPCFEC 0xf2040020
#define F367TER_TSRCINS_EMODCOD 0xf2040010
#define F367TER_TSRCINS_TOKEN 0xf2040008
#define F367TER_TSRCINS_XXXERR 0xf2040004
#define F367TER_TSRCINS_MATYPE 0xf2040002
#define F367TER_TSRCINS_UPL 0xf2040001
/* RCINSDELL */
#define R367TER_RCINSDELL 0xf205
#define F367TER_TSRCINS_DFL 0xf2050080
#define F367TER_TSRCINS_SYNCD 0xf2050040
#define F367TER_TSRCINS_BLOCLEN 0xf2050020
#define F367TER_TSRCINS_SIGPCOUNT 0xf2050010
#define F367TER_TSRCINS_FIFO 0xf2050008
#define F367TER_TSRCINS_REALPACK 0xf2050004
#define F367TER_TSRCINS_TSCONFIG 0xf2050002
#define F367TER_TSRCINS_LATENCY 0xf2050001
/* RCSTATUS */
#define R367TER_RCSTATUS 0xf206
#define F367TER_TSRCFIFO_LINEOK 0xf2060080
#define F367TER_TSRCFIFO_ERROR 0xf2060040
#define F367TER_TSRCFIFO_DATA7 0xf2060020
#define F367TER_RCSTATUS_4 0xf2060010
#define F367TER_TSRCFIFO_DEMODSEL 0xf2060008
#define F367TER_TSRC1FIFOSPEED_STORE 0xf2060004
#define F367TER_RCSTATUS_1 0xf2060002
#define F367TER_TSRCSERIAL_IMPOSSIBLE 0xf2060001
/* RCSPEED */
#define R367TER_RCSPEED 0xf207
#define F367TER_TSRCFIFO_OUTSPEED 0xf20700ff
/* RCDEBUGM */
#define R367TER_RCDEBUGM 0xf208
#define F367TER_SD_UNSYNC 0xf2080080
#define F367TER_ULFLOCK_DETECTM 0xf2080040
#define F367TER_SUL_SELECTOS 0xf2080020
#define F367TER_DILUL_NOSCRBLE 0xf2080010
#define F367TER_NUL_SCRB 0xf2080008
#define F367TER_UL_SCRB 0xf2080004
#define F367TER_SCRAULBAD 0xf2080002
#define F367TER_SCRAUL_UNSYNC 0xf2080001
/* RCDEBUGL */
#define R367TER_RCDEBUGL 0xf209
#define F367TER_RS_ERR 0xf2090080
#define F367TER_LLFLOCK_DETECTM 0xf2090040
#define F367TER_NOT_SUL_SELECTOS 0xf2090020
#define F367TER_DILLL_NOSCRBLE 0xf2090010
#define F367TER_NLL_SCRB 0xf2090008
#define F367TER_LL_SCRB 0xf2090004
#define F367TER_SCRALLBAD 0xf2090002
#define F367TER_SCRALL_UNSYNC 0xf2090001
/* RCOBSCFG */
#define R367TER_RCOBSCFG 0xf20a
#define F367TER_TSRCFIFO_OBSCFG 0xf20a00ff
/* RCOBSM */
#define R367TER_RCOBSM 0xf20b
#define F367TER_TSRCFIFO_OBSDATA_HI 0xf20b00ff
/* RCOBSL */
#define R367TER_RCOBSL 0xf20c
#define F367TER_TSRCFIFO_OBSDATA_LO 0xf20c00ff
/* RCFECSPY */
#define R367TER_RCFECSPY 0xf210
#define F367TER_SPYRC_ENABLE 0xf2100080
#define F367TER_RCNO_SYNCBYTE 0xf2100040
#define F367TER_RCSERIAL_MODE 0xf2100020
#define F367TER_RCUNUSUAL_PACKET 0xf2100010
#define F367TER_BERRCMETER_DATAMODE 0xf210000c
#define F367TER_BERRCMETER_LMODE 0xf2100002
#define F367TER_BERRCMETER_RESET 0xf2100001
/* RCFSPYCFG */
#define R367TER_RCFSPYCFG 0xf211
#define F367TER_FECSPYRC_INPUT 0xf21100c0
#define F367TER_RCRST_ON_ERROR 0xf2110020
#define F367TER_RCONE_SHOT 0xf2110010
#define F367TER_RCI2C_MODE 0xf211000c
#define F367TER_SPYRC_HSTERESIS 0xf2110003
/* RCFSPYDATA */
#define R367TER_RCFSPYDATA 0xf212
#define F367TER_SPYRC_STUFFING 0xf2120080
#define F367TER_RCNOERR_PKTJITTER 0xf2120040
#define F367TER_SPYRC_CNULLPKT 0xf2120020
#define F367TER_SPYRC_OUTDATA_MODE 0xf212001f
/* RCFSPYOUT */
#define R367TER_RCFSPYOUT 0xf213
#define F367TER_FSPYRC_DIRECT 0xf2130080
#define F367TER_RCFSPYOUT_6 0xf2130040
#define F367TER_SPYRC_OUTDATA_BUS 0xf2130038
#define F367TER_RCSTUFF_MODE 0xf2130007
/* RCFSTATUS */
#define R367TER_RCFSTATUS 0xf214
#define F367TER_SPYRC_ENDSIM 0xf2140080
#define F367TER_RCVALID_SIM 0xf2140040
#define F367TER_RCFOUND_SIGNAL 0xf2140020
#define F367TER_RCDSS_SYNCBYTE 0xf2140010
#define F367TER_RCRESULT_STATE 0xf214000f
/* RCFGOODPACK */
#define R367TER_RCFGOODPACK 0xf215
#define F367TER_RCGOOD_PACKET 0xf21500ff
/* RCFPACKCNT */
#define R367TER_RCFPACKCNT 0xf216
#define F367TER_RCPACKET_COUNTER 0xf21600ff
/* RCFSPYMISC */
#define R367TER_RCFSPYMISC 0xf217
#define F367TER_RCLABEL_COUNTER 0xf21700ff
/* RCFBERCPT4 */
#define R367TER_RCFBERCPT4 0xf218
#define F367TER_FBERRCMETER_CPT_MMMMSB 0xf21800ff
/* RCFBERCPT3 */
#define R367TER_RCFBERCPT3 0xf219
#define F367TER_FBERRCMETER_CPT_MMMSB 0xf21900ff
/* RCFBERCPT2 */
#define R367TER_RCFBERCPT2 0xf21a
#define F367TER_FBERRCMETER_CPT_MMSB 0xf21a00ff
/* RCFBERCPT1 */
#define R367TER_RCFBERCPT1 0xf21b
#define F367TER_FBERRCMETER_CPT_MSB 0xf21b00ff
/* RCFBERCPT0 */
#define R367TER_RCFBERCPT0 0xf21c
#define F367TER_FBERRCMETER_CPT_LSB 0xf21c00ff
/* RCFBERERR2 */
#define R367TER_RCFBERERR2 0xf21d
#define F367TER_FBERRCMETER_ERR_HI 0xf21d00ff
/* RCFBERERR1 */
#define R367TER_RCFBERERR1 0xf21e
#define F367TER_FBERRCMETER_ERR 0xf21e00ff
/* RCFBERERR0 */
#define R367TER_RCFBERERR0 0xf21f
#define F367TER_FBERRCMETER_ERR_LO 0xf21f00ff
/* RCFSTATESM */
#define R367TER_RCFSTATESM 0xf220
#define F367TER_RCRSTATE_F 0xf2200080
#define F367TER_RCRSTATE_E 0xf2200040
#define F367TER_RCRSTATE_D 0xf2200020
#define F367TER_RCRSTATE_C 0xf2200010
#define F367TER_RCRSTATE_B 0xf2200008
#define F367TER_RCRSTATE_A 0xf2200004
#define F367TER_RCRSTATE_9 0xf2200002
#define F367TER_RCRSTATE_8 0xf2200001
/* RCFSTATESL */
#define R367TER_RCFSTATESL 0xf221
#define F367TER_RCRSTATE_7 0xf2210080
#define F367TER_RCRSTATE_6 0xf2210040
#define F367TER_RCRSTATE_5 0xf2210020
#define F367TER_RCRSTATE_4 0xf2210010
#define F367TER_RCRSTATE_3 0xf2210008
#define F367TER_RCRSTATE_2 0xf2210004
#define F367TER_RCRSTATE_1 0xf2210002
#define F367TER_RCRSTATE_0 0xf2210001
/* RCFSPYBER */
#define R367TER_RCFSPYBER 0xf222
#define F367TER_RCFSPYBER_7 0xf2220080
#define F367TER_SPYRCOBS_XORREAD 0xf2220040
#define F367TER_FSPYRCBER_OBSMODE 0xf2220020
#define F367TER_FSPYRCBER_SYNCBYT 0xf2220010
#define F367TER_FSPYRCBER_UNSYNC 0xf2220008
#define F367TER_FSPYRCBER_CTIME 0xf2220007
/* RCFSPYDISTM */
#define R367TER_RCFSPYDISTM 0xf223
#define F367TER_RCPKTTIME_DISTANCE_HI 0xf22300ff
/* RCFSPYDISTL */
#define R367TER_RCFSPYDISTL 0xf224
#define F367TER_RCPKTTIME_DISTANCE_LO 0xf22400ff
/* RCFSPYOBS7 */
#define R367TER_RCFSPYOBS7 0xf228
#define F367TER_RCSPYOBS_SPYFAIL 0xf2280080
#define F367TER_RCSPYOBS_SPYFAIL1 0xf2280040
#define F367TER_RCSPYOBS_ERROR 0xf2280020
#define F367TER_RCSPYOBS_STROUT 0xf2280010
#define F367TER_RCSPYOBS_RESULTSTATE1 0xf228000f
/* RCFSPYOBS6 */
#define R367TER_RCFSPYOBS6 0xf229
#define F367TER_RCSPYOBS_RESULTSTATe0 0xf22900f0
#define F367TER_RCSPYOBS_RESULTSTATEM1 0xf229000f
/* RCFSPYOBS5 */
#define R367TER_RCFSPYOBS5 0xf22a
#define F367TER_RCSPYOBS_BYTEOFPACKET1 0xf22a00ff
/* RCFSPYOBS4 */
#define R367TER_RCFSPYOBS4 0xf22b
#define F367TER_RCSPYOBS_BYTEVALUE1 0xf22b00ff
/* RCFSPYOBS3 */
#define R367TER_RCFSPYOBS3 0xf22c
#define F367TER_RCSPYOBS_DATA1 0xf22c00ff
/* RCFSPYOBS2 */
#define R367TER_RCFSPYOBS2 0xf22d
#define F367TER_RCSPYOBS_DATa0 0xf22d00ff
/* RCFSPYOBS1 */
#define R367TER_RCFSPYOBS1 0xf22e
#define F367TER_RCSPYOBS_DATAM1 0xf22e00ff
/* RCFSPYOBS0 */
#define R367TER_RCFSPYOBS0 0xf22f
#define F367TER_RCSPYOBS_DATAM2 0xf22f00ff
/* TSGENERAL */
#define R367TER_TSGENERAL 0xf230
#define F367TER_TSGENERAL_7 0xf2300080
#define F367TER_TSGENERAL_6 0xf2300040
#define F367TER_TSFIFO_BCLK1aLL 0xf2300020
#define F367TER_TSGENERAL_4 0xf2300010
#define F367TER_MUXSTREAM_OUTMODE 0xf2300008
#define F367TER_TSFIFO_PERMPARAL 0xf2300006
#define F367TER_RST_REEDSOLO 0xf2300001
/* RC1SPEED */
#define R367TER_RC1SPEED 0xf231
#define F367TER_TSRCFIFO1_OUTSPEED 0xf23100ff
/* TSGSTATUS */
#define R367TER_TSGSTATUS 0xf232
#define F367TER_TSGSTATUS_7 0xf2320080
#define F367TER_TSGSTATUS_6 0xf2320040
#define F367TER_RSMEM_FULL 0xf2320020
#define F367TER_RS_MULTCALC 0xf2320010
#define F367TER_RSIN_OVERTIME 0xf2320008
#define F367TER_TSFIFO3_DEMODSEL 0xf2320004
#define F367TER_TSFIFO2_DEMODSEL 0xf2320002
#define F367TER_TSFIFO1_DEMODSEL 0xf2320001
/* FECM */
#define R367TER_FECM 0xf233
#define F367TER_DSS_DVB 0xf2330080
#define F367TER_DEMOD_BYPASS 0xf2330040
#define F367TER_CMP_SLOWMODE 0xf2330020
#define F367TER_DSS_SRCH 0xf2330010
#define F367TER_FECM_3 0xf2330008
#define F367TER_DIFF_MODEVIT 0xf2330004
#define F367TER_SYNCVIT 0xf2330002
#define F367TER_I2CSYM 0xf2330001
/* VTH12 */
#define R367TER_VTH12 0xf234
#define F367TER_VTH_12 0xf23400ff
/* VTH23 */
#define R367TER_VTH23 0xf235
#define F367TER_VTH_23 0xf23500ff
/* VTH34 */
#define R367TER_VTH34 0xf236
#define F367TER_VTH_34 0xf23600ff
/* VTH56 */
#define R367TER_VTH56 0xf237
#define F367TER_VTH_56 0xf23700ff
/* VTH67 */
#define R367TER_VTH67 0xf238
#define F367TER_VTH_67 0xf23800ff
/* VTH78 */
#define R367TER_VTH78 0xf239
#define F367TER_VTH_78 0xf23900ff
/* VITCURPUN */
#define R367TER_VITCURPUN 0xf23a
#define F367TER_VIT_MAPPING 0xf23a00e0
#define F367TER_VIT_CURPUN 0xf23a001f
/* VERROR */
#define R367TER_VERROR 0xf23b
#define F367TER_REGERR_VIT 0xf23b00ff
/* PRVIT */
#define R367TER_PRVIT 0xf23c
#define F367TER_PRVIT_7 0xf23c0080
#define F367TER_DIS_VTHLOCK 0xf23c0040
#define F367TER_E7_8VIT 0xf23c0020
#define F367TER_E6_7VIT 0xf23c0010
#define F367TER_E5_6VIT 0xf23c0008
#define F367TER_E3_4VIT 0xf23c0004
#define F367TER_E2_3VIT 0xf23c0002
#define F367TER_E1_2VIT 0xf23c0001
/* VAVSRVIT */
#define R367TER_VAVSRVIT 0xf23d
#define F367TER_AMVIT 0xf23d0080
#define F367TER_FROZENVIT 0xf23d0040
#define F367TER_SNVIT 0xf23d0030
#define F367TER_TOVVIT 0xf23d000c
#define F367TER_HYPVIT 0xf23d0003
/* VSTATUSVIT */
#define R367TER_VSTATUSVIT 0xf23e
#define F367TER_VITERBI_ON 0xf23e0080
#define F367TER_END_LOOPVIT 0xf23e0040
#define F367TER_VITERBI_DEPRF 0xf23e0020
#define F367TER_PRFVIT 0xf23e0010
#define F367TER_LOCKEDVIT 0xf23e0008
#define F367TER_VITERBI_DELOCK 0xf23e0004
#define F367TER_VIT_DEMODSEL 0xf23e0002
#define F367TER_VITERBI_COMPOUT 0xf23e0001
/* VTHINUSE */
#define R367TER_VTHINUSE 0xf23f
#define F367TER_VIT_INUSE 0xf23f00ff
/* KDIV12 */
#define R367TER_KDIV12 0xf240
#define F367TER_KDIV12_MANUAL 0xf2400080
#define F367TER_K_DIVIDER_12 0xf240007f
/* KDIV23 */
#define R367TER_KDIV23 0xf241
#define F367TER_KDIV23_MANUAL 0xf2410080
#define F367TER_K_DIVIDER_23 0xf241007f
/* KDIV34 */
#define R367TER_KDIV34 0xf242
#define F367TER_KDIV34_MANUAL 0xf2420080
#define F367TER_K_DIVIDER_34 0xf242007f
/* KDIV56 */
#define R367TER_KDIV56 0xf243
#define F367TER_KDIV56_MANUAL 0xf2430080
#define F367TER_K_DIVIDER_56 0xf243007f
/* KDIV67 */
#define R367TER_KDIV67 0xf244
#define F367TER_KDIV67_MANUAL 0xf2440080
#define F367TER_K_DIVIDER_67 0xf244007f
/* KDIV78 */
#define R367TER_KDIV78 0xf245
#define F367TER_KDIV78_MANUAL 0xf2450080
#define F367TER_K_DIVIDER_78 0xf245007f
/* SIGPOWER */
#define R367TER_SIGPOWER 0xf246
#define F367TER_SIGPOWER_MANUAL 0xf2460080
#define F367TER_SIG_POWER 0xf246007f
/* DEMAPVIT */
#define R367TER_DEMAPVIT 0xf247
#define F367TER_DEMAPVIT_7 0xf2470080
#define F367TER_K_DIVIDER_VIT 0xf247007f
/* VITSCALE */
#define R367TER_VITSCALE 0xf248
#define F367TER_NVTH_NOSRANGE 0xf2480080
#define F367TER_VERROR_MAXMODE 0xf2480040
#define F367TER_KDIV_MODE 0xf2480030
#define F367TER_NSLOWSN_LOCKED 0xf2480008
#define F367TER_DELOCK_PRFLOSS 0xf2480004
#define F367TER_DIS_RSFLOCK 0xf2480002
#define F367TER_VITSCALE_0 0xf2480001
/* FFEC1PRG */
#define R367TER_FFEC1PRG 0xf249
#define F367TER_FDSS_DVB 0xf2490080
#define F367TER_FDSS_SRCH 0xf2490040
#define F367TER_FFECPROG_5 0xf2490020
#define F367TER_FFECPROG_4 0xf2490010
#define F367TER_FFECPROG_3 0xf2490008
#define F367TER_FFECPROG_2 0xf2490004
#define F367TER_FTS1_DISABLE 0xf2490002
#define F367TER_FTS2_DISABLE 0xf2490001
/* FVITCURPUN */
#define R367TER_FVITCURPUN 0xf24a
#define F367TER_FVIT_MAPPING 0xf24a00e0
#define F367TER_FVIT_CURPUN 0xf24a001f
/* FVERROR */
#define R367TER_FVERROR 0xf24b
#define F367TER_FREGERR_VIT 0xf24b00ff
/* FVSTATUSVIT */
#define R367TER_FVSTATUSVIT 0xf24c
#define F367TER_FVITERBI_ON 0xf24c0080
#define F367TER_F1END_LOOPVIT 0xf24c0040
#define F367TER_FVITERBI_DEPRF 0xf24c0020
#define F367TER_FPRFVIT 0xf24c0010
#define F367TER_FLOCKEDVIT 0xf24c0008
#define F367TER_FVITERBI_DELOCK 0xf24c0004
#define F367TER_FVIT_DEMODSEL 0xf24c0002
#define F367TER_FVITERBI_COMPOUT 0xf24c0001
/* DEBUG_LT1 */
#define R367TER_DEBUG_LT1 0xf24d
#define F367TER_DBG_LT1 0xf24d00ff
/* DEBUG_LT2 */
#define R367TER_DEBUG_LT2 0xf24e
#define F367TER_DBG_LT2 0xf24e00ff
/* DEBUG_LT3 */
#define R367TER_DEBUG_LT3 0xf24f
#define F367TER_DBG_LT3 0xf24f00ff
/* TSTSFMET */
#define R367TER_TSTSFMET 0xf250
#define F367TER_TSTSFEC_METRIQUES 0xf25000ff
/* SELOUT */
#define R367TER_SELOUT 0xf252
#define F367TER_EN_SYNC 0xf2520080
#define F367TER_EN_TBUSDEMAP 0xf2520040
#define F367TER_SELOUT_5 0xf2520020
#define F367TER_SELOUT_4 0xf2520010
#define F367TER_TSTSYNCHRO_MODE 0xf2520002
/* TSYNC */
#define R367TER_TSYNC 0xf253
#define F367TER_CURPUN_INCMODE 0xf2530080
#define F367TER_CERR_TSTMODE 0xf2530040
#define F367TER_SHIFTSOF_MODE 0xf2530030
#define F367TER_SLOWPHA_MODE 0xf2530008
#define F367TER_PXX_BYPALL 0xf2530004
#define F367TER_FROTA45_FIRST 0xf2530002
#define F367TER_TST_BCHERROR 0xf2530001
/* TSTERR */
#define R367TER_TSTERR 0xf254
#define F367TER_TST_LONGPKT 0xf2540080
#define F367TER_TST_ISSYION 0xf2540040
#define F367TER_TST_NPDON 0xf2540020
#define F367TER_TSTERR_4 0xf2540010
#define F367TER_TRACEBACK_MODE 0xf2540008
#define F367TER_TST_RSPARITY 0xf2540004
#define F367TER_METRIQUE_MODE 0xf2540003
/* TSFSYNC */
#define R367TER_TSFSYNC 0xf255
#define F367TER_EN_SFECSYNC 0xf2550080
#define F367TER_EN_SFECDEMAP 0xf2550040
#define F367TER_SFCERR_TSTMODE 0xf2550020
#define F367TER_SFECPXX_BYPALL 0xf2550010
#define F367TER_SFECTSTSYNCHRO_MODE 0xf255000f
/* TSTSFERR */
#define R367TER_TSTSFERR 0xf256
#define F367TER_TSTSTERR_7 0xf2560080
#define F367TER_TSTSTERR_6 0xf2560040
#define F367TER_TSTSTERR_5 0xf2560020
#define F367TER_TSTSTERR_4 0xf2560010
#define F367TER_SFECTRACEBACK_MODE 0xf2560008
#define F367TER_SFEC_NCONVPROG 0xf2560004
#define F367TER_SFECMETRIQUE_MODE 0xf2560003
/* TSTTSSF1 */
#define R367TER_TSTTSSF1 0xf258
#define F367TER_TSTERSSF 0xf2580080
#define F367TER_TSTTSSFEN 0xf2580040
#define F367TER_SFEC_OUTMODE 0xf2580030
#define F367TER_XLSF_NOFTHRESHOLD 0xf2580008
#define F367TER_TSTTSSF_STACKSEL 0xf2580007
/* TSTTSSF2 */
#define R367TER_TSTTSSF2 0xf259
#define F367TER_DILSF_DBBHEADER 0xf2590080
#define F367TER_TSTTSSF_DISBUG 0xf2590040
#define F367TER_TSTTSSF_NOBADSTART 0xf2590020
#define F367TER_TSTTSSF_SELECT 0xf259001f
/* TSTTSSF3 */
#define R367TER_TSTTSSF3 0xf25a
#define F367TER_TSTTSSF3_7 0xf25a0080
#define F367TER_TSTTSSF3_6 0xf25a0040
#define F367TER_TSTTSSF3_5 0xf25a0020
#define F367TER_TSTTSSF3_4 0xf25a0010
#define F367TER_TSTTSSF3_3 0xf25a0008
#define F367TER_TSTTSSF3_2 0xf25a0004
#define F367TER_TSTTSSF3_1 0xf25a0002
#define F367TER_DISSF_CLKENABLE 0xf25a0001
/* TSTTS1 */
#define R367TER_TSTTS1 0xf25c
#define F367TER_TSTERS 0xf25c0080
#define F367TER_TSFIFO_DSSSYNCB 0xf25c0040
#define F367TER_TSTTS_FSPYBEFRS 0xf25c0020
#define F367TER_NFORCE_SYNCBYTE 0xf25c0010
#define F367TER_XL_NOFTHRESHOLD 0xf25c0008
#define F367TER_TSTTS_FRFORCEPKT 0xf25c0004
#define F367TER_DESCR_NOTAUTO 0xf25c0002
#define F367TER_TSTTSEN 0xf25c0001
/* TSTTS2 */
#define R367TER_TSTTS2 0xf25d
#define F367TER_DIL_DBBHEADER 0xf25d0080
#define F367TER_TSTTS_NOBADXXX 0xf25d0040
#define F367TER_TSFIFO_DELSPEEDUP 0xf25d0020
#define F367TER_TSTTS_SELECT 0xf25d001f
/* TSTTS3 */
#define R367TER_TSTTS3 0xf25e
#define F367TER_TSTTS_NOPKTGAIN 0xf25e0080
#define F367TER_TSTTS_NOPKTENE 0xf25e0040
#define F367TER_TSTTS_ISOLATION 0xf25e0020
#define F367TER_TSTTS_DISBUG 0xf25e0010
#define F367TER_TSTTS_NOBADSTART 0xf25e0008
#define F367TER_TSTTS_STACKSEL 0xf25e0007
/* TSTTS4 */
#define R367TER_TSTTS4 0xf25f
#define F367TER_TSTTS4_7 0xf25f0080
#define F367TER_TSTTS4_6 0xf25f0040
#define F367TER_TSTTS4_5 0xf25f0020
#define F367TER_TSTTS_DISDSTATE 0xf25f0010
#define F367TER_TSTTS_FASTNOSYNC 0xf25f0008
#define F367TER_EXT_FECSPYIN 0xf25f0004
#define F367TER_TSTTS_NODPZERO 0xf25f0002
#define F367TER_TSTTS_NODIV3 0xf25f0001
/* TSTTSRC */
#define R367TER_TSTTSRC 0xf26c
#define F367TER_TSTTSRC_7 0xf26c0080
#define F367TER_TSRCFIFO_DSSSYNCB 0xf26c0040
#define F367TER_TSRCFIFO_DPUNACTIVE 0xf26c0020
#define F367TER_TSRCFIFO_DELSPEEDUP 0xf26c0010
#define F367TER_TSTTSRC_NODIV3 0xf26c0008
#define F367TER_TSTTSRC_FRFORCEPKT 0xf26c0004
#define F367TER_SAT25_SDDORIGINE 0xf26c0002
#define F367TER_TSTTSRC_INACTIVE 0xf26c0001
/* TSTTSRS */
#define R367TER_TSTTSRS 0xf26d
#define F367TER_TSTTSRS_7 0xf26d0080
#define F367TER_TSTTSRS_6 0xf26d0040
#define F367TER_TSTTSRS_5 0xf26d0020
#define F367TER_TSTTSRS_4 0xf26d0010
#define F367TER_TSTTSRS_3 0xf26d0008
#define F367TER_TSTTSRS_2 0xf26d0004
#define F367TER_TSTRS_DISRS2 0xf26d0002
#define F367TER_TSTRS_DISRS1 0xf26d0001
/* TSSTATEM */
#define R367TER_TSSTATEM 0xf270
#define F367TER_TSDIL_ON 0xf2700080
#define F367TER_TSSKIPRS_ON 0xf2700040
#define F367TER_TSRS_ON 0xf2700020
#define F367TER_TSDESCRAMB_ON 0xf2700010
#define F367TER_TSFRAME_MODE 0xf2700008
#define F367TER_TS_DISABLE 0xf2700004
#define F367TER_TSACM_MODE 0xf2700002
#define F367TER_TSOUT_NOSYNC 0xf2700001
/* TSSTATEL */
#define R367TER_TSSTATEL 0xf271
#define F367TER_TSNOSYNCBYTE 0xf2710080
#define F367TER_TSPARITY_ON 0xf2710040
#define F367TER_TSSYNCOUTRS_ON 0xf2710020
#define F367TER_TSDVBS2_MODE 0xf2710010
#define F367TER_TSISSYI_ON 0xf2710008
#define F367TER_TSNPD_ON 0xf2710004
#define F367TER_TSCRC8_ON 0xf2710002
#define F367TER_TSDSS_PACKET 0xf2710001
/* TSCFGH */
#define R367TER_TSCFGH 0xf272
#define F367TER_TSFIFO_DVBCI 0xf2720080
#define F367TER_TSFIFO_SERIAL 0xf2720040
#define F367TER_TSFIFO_TEIUPDATE 0xf2720020
#define F367TER_TSFIFO_DUTY50 0xf2720010
#define F367TER_TSFIFO_HSGNLOUT 0xf2720008
#define F367TER_TSFIFO_ERRMODE 0xf2720006
#define F367TER_RST_HWARE 0xf2720001
/* TSCFGM */
#define R367TER_TSCFGM 0xf273
#define F367TER_TSFIFO_MANSPEED 0xf27300c0
#define F367TER_TSFIFO_PERMDATA 0xf2730020
#define F367TER_TSFIFO_NONEWSGNL 0xf2730010
#define F367TER_TSFIFO_BITSPEED 0xf2730008
#define F367TER_NPD_SPECDVBS2 0xf2730004
#define F367TER_TSFIFO_STOPCKDIS 0xf2730002
#define F367TER_TSFIFO_INVDATA 0xf2730001
/* TSCFGL */
#define R367TER_TSCFGL 0xf274
#define F367TER_TSFIFO_BCLKDEL1cK 0xf27400c0
#define F367TER_BCHERROR_MODE 0xf2740030
#define F367TER_TSFIFO_NSGNL2dATA 0xf2740008
#define F367TER_TSFIFO_EMBINDVB 0xf2740004
#define F367TER_TSFIFO_DPUNACT 0xf2740002
#define F367TER_TSFIFO_NPDOFF 0xf2740001
/* TSSYNC */
#define R367TER_TSSYNC 0xf275
#define F367TER_TSFIFO_PERMUTE 0xf2750080
#define F367TER_TSFIFO_FISCR3B 0xf2750060
#define F367TER_TSFIFO_SYNCMODE 0xf2750018
#define F367TER_TSFIFO_SYNCSEL 0xf2750007
/* TSINSDELH */
#define R367TER_TSINSDELH 0xf276
#define F367TER_TSDEL_SYNCBYTE 0xf2760080
#define F367TER_TSDEL_XXHEADER 0xf2760040
#define F367TER_TSDEL_BBHEADER 0xf2760020
#define F367TER_TSDEL_DATAFIELD 0xf2760010
#define F367TER_TSINSDEL_ISCR 0xf2760008
#define F367TER_TSINSDEL_NPD 0xf2760004
#define F367TER_TSINSDEL_RSPARITY 0xf2760002
#define F367TER_TSINSDEL_CRC8 0xf2760001
/* TSINSDELM */
#define R367TER_TSINSDELM 0xf277
#define F367TER_TSINS_BBPADDING 0xf2770080
#define F367TER_TSINS_BCHFEC 0xf2770040
#define F367TER_TSINS_LDPCFEC 0xf2770020
#define F367TER_TSINS_EMODCOD 0xf2770010
#define F367TER_TSINS_TOKEN 0xf2770008
#define F367TER_TSINS_XXXERR 0xf2770004
#define F367TER_TSINS_MATYPE 0xf2770002
#define F367TER_TSINS_UPL 0xf2770001
/* TSINSDELL */
#define R367TER_TSINSDELL 0xf278
#define F367TER_TSINS_DFL 0xf2780080
#define F367TER_TSINS_SYNCD 0xf2780040
#define F367TER_TSINS_BLOCLEN 0xf2780020
#define F367TER_TSINS_SIGPCOUNT 0xf2780010
#define F367TER_TSINS_FIFO 0xf2780008
#define F367TER_TSINS_REALPACK 0xf2780004
#define F367TER_TSINS_TSCONFIG 0xf2780002
#define F367TER_TSINS_LATENCY 0xf2780001
/* TSDIVN */
#define R367TER_TSDIVN 0xf279
#define F367TER_TSFIFO_LOWSPEED 0xf2790080
#define F367TER_BYTE_OVERSAMPLING 0xf2790070
#define F367TER_TSMANUAL_PACKETNBR 0xf279000f
/* TSDIVPM */
#define R367TER_TSDIVPM 0xf27a
#define F367TER_TSMANUAL_P_HI 0xf27a00ff
/* TSDIVPL */
#define R367TER_TSDIVPL 0xf27b
#define F367TER_TSMANUAL_P_LO 0xf27b00ff
/* TSDIVQM */
#define R367TER_TSDIVQM 0xf27c
#define F367TER_TSMANUAL_Q_HI 0xf27c00ff
/* TSDIVQL */
#define R367TER_TSDIVQL 0xf27d
#define F367TER_TSMANUAL_Q_LO 0xf27d00ff
/* TSDILSTKM */
#define R367TER_TSDILSTKM 0xf27e
#define F367TER_TSFIFO_DILSTK_HI 0xf27e00ff
/* TSDILSTKL */
#define R367TER_TSDILSTKL 0xf27f
#define F367TER_TSFIFO_DILSTK_LO 0xf27f00ff
/* TSSPEED */
#define R367TER_TSSPEED 0xf280
#define F367TER_TSFIFO_OUTSPEED 0xf28000ff
/* TSSTATUS */
#define R367TER_TSSTATUS 0xf281
#define F367TER_TSFIFO_LINEOK 0xf2810080
#define F367TER_TSFIFO_ERROR 0xf2810040
#define F367TER_TSFIFO_DATA7 0xf2810020
#define F367TER_TSFIFO_NOSYNC 0xf2810010
#define F367TER_ISCR_INITIALIZED 0xf2810008
#define F367TER_ISCR_UPDATED 0xf2810004
#define F367TER_SOFFIFO_UNREGUL 0xf2810002
#define F367TER_DIL_READY 0xf2810001
/* TSSTATUS2 */
#define R367TER_TSSTATUS2 0xf282
#define F367TER_TSFIFO_DEMODSEL 0xf2820080
#define F367TER_TSFIFOSPEED_STORE 0xf2820040
#define F367TER_DILXX_RESET 0xf2820020
#define F367TER_TSSERIAL_IMPOSSIBLE 0xf2820010
#define F367TER_TSFIFO_UNDERSPEED 0xf2820008
#define F367TER_BITSPEED_EVENT 0xf2820004
#define F367TER_UL_SCRAMBDETECT 0xf2820002
#define F367TER_ULDTV67_FALSELOCK 0xf2820001
/* TSBITRATEM */
#define R367TER_TSBITRATEM 0xf283
#define F367TER_TSFIFO_BITRATE_HI 0xf28300ff
/* TSBITRATEL */
#define R367TER_TSBITRATEL 0xf284
#define F367TER_TSFIFO_BITRATE_LO 0xf28400ff
/* TSPACKLENM */
#define R367TER_TSPACKLENM 0xf285
#define F367TER_TSFIFO_PACKCPT 0xf28500e0
#define F367TER_DIL_RPLEN_HI 0xf285001f
/* TSPACKLENL */
#define R367TER_TSPACKLENL 0xf286
#define F367TER_DIL_RPLEN_LO 0xf28600ff
/* TSBLOCLENM */
#define R367TER_TSBLOCLENM 0xf287
#define F367TER_TSFIFO_PFLEN_HI 0xf28700ff
/* TSBLOCLENL */
#define R367TER_TSBLOCLENL 0xf288
#define F367TER_TSFIFO_PFLEN_LO 0xf28800ff
/* TSDLYH */
#define R367TER_TSDLYH 0xf289
#define F367TER_SOFFIFO_TSTIMEVALID 0xf2890080
#define F367TER_SOFFIFO_SPEEDUP 0xf2890040
#define F367TER_SOFFIFO_STOP 0xf2890020
#define F367TER_SOFFIFO_REGULATED 0xf2890010
#define F367TER_SOFFIFO_REALSBOFF_HI 0xf289000f
/* TSDLYM */
#define R367TER_TSDLYM 0xf28a
#define F367TER_SOFFIFO_REALSBOFF_MED 0xf28a00ff
/* TSDLYL */
#define R367TER_TSDLYL 0xf28b
#define F367TER_SOFFIFO_REALSBOFF_LO 0xf28b00ff
/* TSNPDAV */
#define R367TER_TSNPDAV 0xf28c
#define F367TER_TSNPD_AVERAGE 0xf28c00ff
/* TSBUFSTATH */
#define R367TER_TSBUFSTATH 0xf28d
#define F367TER_TSISCR_3BYTES 0xf28d0080
#define F367TER_TSISCR_NEWDATA 0xf28d0040
#define F367TER_TSISCR_BUFSTAT_HI 0xf28d003f
/* TSBUFSTATM */
#define R367TER_TSBUFSTATM 0xf28e
#define F367TER_TSISCR_BUFSTAT_MED 0xf28e00ff
/* TSBUFSTATL */
#define R367TER_TSBUFSTATL 0xf28f
#define F367TER_TSISCR_BUFSTAT_LO 0xf28f00ff
/* TSDEBUGM */
#define R367TER_TSDEBUGM 0xf290
#define F367TER_TSFIFO_ILLPACKET 0xf2900080
#define F367TER_DIL_NOSYNC 0xf2900040
#define F367TER_DIL_ISCR 0xf2900020
#define F367TER_DILOUT_BSYNCB 0xf2900010
#define F367TER_TSFIFO_EMPTYPKT 0xf2900008
#define F367TER_TSFIFO_EMPTYRD 0xf2900004
#define F367TER_SOFFIFO_STOPM 0xf2900002
#define F367TER_SOFFIFO_SPEEDUPM 0xf2900001
/* TSDEBUGL */
#define R367TER_TSDEBUGL 0xf291
#define F367TER_TSFIFO_PACKLENFAIL 0xf2910080
#define F367TER_TSFIFO_SYNCBFAIL 0xf2910040
#define F367TER_TSFIFO_VITLIBRE 0xf2910020
#define F367TER_TSFIFO_BOOSTSPEEDM 0xf2910010
#define F367TER_TSFIFO_UNDERSPEEDM 0xf2910008
#define F367TER_TSFIFO_ERROR_EVNT 0xf2910004
#define F367TER_TSFIFO_FULL 0xf2910002
#define F367TER_TSFIFO_OVERFLOWM 0xf2910001
/* TSDLYSETH */
#define R367TER_TSDLYSETH 0xf292
#define F367TER_SOFFIFO_OFFSET 0xf29200e0
#define F367TER_SOFFIFO_SYMBOFFSET_HI 0xf292001f
/* TSDLYSETM */
#define R367TER_TSDLYSETM 0xf293
#define F367TER_SOFFIFO_SYMBOFFSET_MED 0xf29300ff
/* TSDLYSETL */
#define R367TER_TSDLYSETL 0xf294
#define F367TER_SOFFIFO_SYMBOFFSET_LO 0xf29400ff
/* TSOBSCFG */
#define R367TER_TSOBSCFG 0xf295
#define F367TER_TSFIFO_OBSCFG 0xf29500ff
/* TSOBSM */
#define R367TER_TSOBSM 0xf296
#define F367TER_TSFIFO_OBSDATA_HI 0xf29600ff
/* TSOBSL */
#define R367TER_TSOBSL 0xf297
#define F367TER_TSFIFO_OBSDATA_LO 0xf29700ff
/* ERRCTRL1 */
#define R367TER_ERRCTRL1 0xf298
#define F367TER_ERR_SRC1 0xf29800f0
#define F367TER_ERRCTRL1_3 0xf2980008
#define F367TER_NUM_EVT1 0xf2980007
/* ERRCNT1H */
#define R367TER_ERRCNT1H 0xf299
#define F367TER_ERRCNT1_OLDVALUE 0xf2990080
#define F367TER_ERR_CNT1 0xf299007f
/* ERRCNT1M */
#define R367TER_ERRCNT1M 0xf29a
#define F367TER_ERR_CNT1_HI 0xf29a00ff
/* ERRCNT1L */
#define R367TER_ERRCNT1L 0xf29b
#define F367TER_ERR_CNT1_LO 0xf29b00ff
/* ERRCTRL2 */
#define R367TER_ERRCTRL2 0xf29c
#define F367TER_ERR_SRC2 0xf29c00f0
#define F367TER_ERRCTRL2_3 0xf29c0008
#define F367TER_NUM_EVT2 0xf29c0007
/* ERRCNT2H */
#define R367TER_ERRCNT2H 0xf29d
#define F367TER_ERRCNT2_OLDVALUE 0xf29d0080
#define F367TER_ERR_CNT2_HI 0xf29d007f
/* ERRCNT2M */
#define R367TER_ERRCNT2M 0xf29e
#define F367TER_ERR_CNT2_MED 0xf29e00ff
/* ERRCNT2L */
#define R367TER_ERRCNT2L 0xf29f
#define F367TER_ERR_CNT2_LO 0xf29f00ff
/* FECSPY */
#define R367TER_FECSPY 0xf2a0
#define F367TER_SPY_ENABLE 0xf2a00080
#define F367TER_NO_SYNCBYTE 0xf2a00040
#define F367TER_SERIAL_MODE 0xf2a00020
#define F367TER_UNUSUAL_PACKET 0xf2a00010
#define F367TER_BERMETER_DATAMODE 0xf2a0000c
#define F367TER_BERMETER_LMODE 0xf2a00002
#define F367TER_BERMETER_RESET 0xf2a00001
/* FSPYCFG */
#define R367TER_FSPYCFG 0xf2a1
#define F367TER_FECSPY_INPUT 0xf2a100c0
#define F367TER_RST_ON_ERROR 0xf2a10020
#define F367TER_ONE_SHOT 0xf2a10010
#define F367TER_I2C_MOD 0xf2a1000c
#define F367TER_SPY_HYSTERESIS 0xf2a10003
/* FSPYDATA */
#define R367TER_FSPYDATA 0xf2a2
#define F367TER_SPY_STUFFING 0xf2a20080
#define F367TER_NOERROR_PKTJITTER 0xf2a20040
#define F367TER_SPY_CNULLPKT 0xf2a20020
#define F367TER_SPY_OUTDATA_MODE 0xf2a2001f
/* FSPYOUT */
#define R367TER_FSPYOUT 0xf2a3
#define F367TER_FSPY_DIRECT 0xf2a30080
#define F367TER_FSPYOUT_6 0xf2a30040
#define F367TER_SPY_OUTDATA_BUS 0xf2a30038
#define F367TER_STUFF_MODE 0xf2a30007
/* FSTATUS */
#define R367TER_FSTATUS 0xf2a4
#define F367TER_SPY_ENDSIM 0xf2a40080
#define F367TER_VALID_SIM 0xf2a40040
#define F367TER_FOUND_SIGNAL 0xf2a40020
#define F367TER_DSS_SYNCBYTE 0xf2a40010
#define F367TER_RESULT_STATE 0xf2a4000f
/* FGOODPACK */
#define R367TER_FGOODPACK 0xf2a5
#define F367TER_FGOOD_PACKET 0xf2a500ff
/* FPACKCNT */
#define R367TER_FPACKCNT 0xf2a6
#define F367TER_FPACKET_COUNTER 0xf2a600ff
/* FSPYMISC */
#define R367TER_FSPYMISC 0xf2a7
#define F367TER_FLABEL_COUNTER 0xf2a700ff
/* FBERCPT4 */
#define R367TER_FBERCPT4 0xf2a8
#define F367TER_FBERMETER_CPT5 0xf2a800ff
/* FBERCPT3 */
#define R367TER_FBERCPT3 0xf2a9
#define F367TER_FBERMETER_CPT4 0xf2a900ff
/* FBERCPT2 */
#define R367TER_FBERCPT2 0xf2aa
#define F367TER_FBERMETER_CPT3 0xf2aa00ff
/* FBERCPT1 */
#define R367TER_FBERCPT1 0xf2ab
#define F367TER_FBERMETER_CPT2 0xf2ab00ff
/* FBERCPT0 */
#define R367TER_FBERCPT0 0xf2ac
#define F367TER_FBERMETER_CPT1 0xf2ac00ff
/* FBERERR2 */
#define R367TER_FBERERR2 0xf2ad
#define F367TER_FBERMETER_ERR_HI 0xf2ad00ff
/* FBERERR1 */
#define R367TER_FBERERR1 0xf2ae
#define F367TER_FBERMETER_ERR_MED 0xf2ae00ff
/* FBERERR0 */
#define R367TER_FBERERR0 0xf2af
#define F367TER_FBERMETER_ERR_LO 0xf2af00ff
/* FSTATESM */
#define R367TER_FSTATESM 0xf2b0
#define F367TER_RSTATE_F 0xf2b00080
#define F367TER_RSTATE_E 0xf2b00040
#define F367TER_RSTATE_D 0xf2b00020
#define F367TER_RSTATE_C 0xf2b00010
#define F367TER_RSTATE_B 0xf2b00008
#define F367TER_RSTATE_A 0xf2b00004
#define F367TER_RSTATE_9 0xf2b00002
#define F367TER_RSTATE_8 0xf2b00001
/* FSTATESL */
#define R367TER_FSTATESL 0xf2b1
#define F367TER_RSTATE_7 0xf2b10080
#define F367TER_RSTATE_6 0xf2b10040
#define F367TER_RSTATE_5 0xf2b10020
#define F367TER_RSTATE_4 0xf2b10010
#define F367TER_RSTATE_3 0xf2b10008
#define F367TER_RSTATE_2 0xf2b10004
#define F367TER_RSTATE_1 0xf2b10002
#define F367TER_RSTATE_0 0xf2b10001
/* FSPYBER */
#define R367TER_FSPYBER 0xf2b2
#define F367TER_FSPYBER_7 0xf2b20080
#define F367TER_FSPYOBS_XORREAD 0xf2b20040
#define F367TER_FSPYBER_OBSMODE 0xf2b20020
#define F367TER_FSPYBER_SYNCBYTE 0xf2b20010
#define F367TER_FSPYBER_UNSYNC 0xf2b20008
#define F367TER_FSPYBER_CTIME 0xf2b20007
/* FSPYDISTM */
#define R367TER_FSPYDISTM 0xf2b3
#define F367TER_PKTTIME_DISTANCE_HI 0xf2b300ff
/* FSPYDISTL */
#define R367TER_FSPYDISTL 0xf2b4
#define F367TER_PKTTIME_DISTANCE_LO 0xf2b400ff
/* FSPYOBS7 */
#define R367TER_FSPYOBS7 0xf2b8
#define F367TER_FSPYOBS_SPYFAIL 0xf2b80080
#define F367TER_FSPYOBS_SPYFAIL1 0xf2b80040
#define F367TER_FSPYOBS_ERROR 0xf2b80020
#define F367TER_FSPYOBS_STROUT 0xf2b80010
#define F367TER_FSPYOBS_RESULTSTATE1 0xf2b8000f
/* FSPYOBS6 */
#define R367TER_FSPYOBS6 0xf2b9
#define F367TER_FSPYOBS_RESULTSTATe0 0xf2b900f0
#define F367TER_FSPYOBS_RESULTSTATEM1 0xf2b9000f
/* FSPYOBS5 */
#define R367TER_FSPYOBS5 0xf2ba
#define F367TER_FSPYOBS_BYTEOFPACKET1 0xf2ba00ff
/* FSPYOBS4 */
#define R367TER_FSPYOBS4 0xf2bb
#define F367TER_FSPYOBS_BYTEVALUE1 0xf2bb00ff
/* FSPYOBS3 */
#define R367TER_FSPYOBS3 0xf2bc
#define F367TER_FSPYOBS_DATA1 0xf2bc00ff
/* FSPYOBS2 */
#define R367TER_FSPYOBS2 0xf2bd
#define F367TER_FSPYOBS_DATa0 0xf2bd00ff
/* FSPYOBS1 */
#define R367TER_FSPYOBS1 0xf2be
#define F367TER_FSPYOBS_DATAM1 0xf2be00ff
/* FSPYOBS0 */
#define R367TER_FSPYOBS0 0xf2bf
#define F367TER_FSPYOBS_DATAM2 0xf2bf00ff
/* SFDEMAP */
#define R367TER_SFDEMAP 0xf2c0
#define F367TER_SFDEMAP_7 0xf2c00080
#define F367TER_SFEC_K_DIVIDER_VIT 0xf2c0007f
/* SFERROR */
#define R367TER_SFERROR 0xf2c1
#define F367TER_SFEC_REGERR_VIT 0xf2c100ff
/* SFAVSR */
#define R367TER_SFAVSR 0xf2c2
#define F367TER_SFEC_SUMERRORS 0xf2c20080
#define F367TER_SERROR_MAXMODE 0xf2c20040
#define F367TER_SN_SFEC 0xf2c20030
#define F367TER_KDIV_MODE_SFEC 0xf2c2000c
#define F367TER_SFAVSR_1 0xf2c20002
#define F367TER_SFAVSR_0 0xf2c20001
/* SFECSTATUS */
#define R367TER_SFECSTATUS 0xf2c3
#define F367TER_SFEC_ON 0xf2c30080
#define F367TER_SFSTATUS_6 0xf2c30040
#define F367TER_SFSTATUS_5 0xf2c30020
#define F367TER_SFSTATUS_4 0xf2c30010
#define F367TER_LOCKEDSFEC 0xf2c30008
#define F367TER_SFEC_DELOCK 0xf2c30004
#define F367TER_SFEC_DEMODSEL1 0xf2c30002
#define F367TER_SFEC_OVFON 0xf2c30001
/* SFKDIV12 */
#define R367TER_SFKDIV12 0xf2c4
#define F367TER_SFECKDIV12_MAN 0xf2c40080
#define F367TER_SFEC_K_DIVIDER_12 0xf2c4007f
/* SFKDIV23 */
#define R367TER_SFKDIV23 0xf2c5
#define F367TER_SFECKDIV23_MAN 0xf2c50080
#define F367TER_SFEC_K_DIVIDER_23 0xf2c5007f
/* SFKDIV34 */
#define R367TER_SFKDIV34 0xf2c6
#define F367TER_SFECKDIV34_MAN 0xf2c60080
#define F367TER_SFEC_K_DIVIDER_34 0xf2c6007f
/* SFKDIV56 */
#define R367TER_SFKDIV56 0xf2c7
#define F367TER_SFECKDIV56_MAN 0xf2c70080
#define F367TER_SFEC_K_DIVIDER_56 0xf2c7007f
/* SFKDIV67 */
#define R367TER_SFKDIV67 0xf2c8
#define F367TER_SFECKDIV67_MAN 0xf2c80080
#define F367TER_SFEC_K_DIVIDER_67 0xf2c8007f
/* SFKDIV78 */
#define R367TER_SFKDIV78 0xf2c9
#define F367TER_SFECKDIV78_MAN 0xf2c90080
#define F367TER_SFEC_K_DIVIDER_78 0xf2c9007f
/* SFDILSTKM */
#define R367TER_SFDILSTKM 0xf2ca
#define F367TER_SFEC_PACKCPT 0xf2ca00e0
#define F367TER_SFEC_DILSTK_HI 0xf2ca001f
/* SFDILSTKL */
#define R367TER_SFDILSTKL 0xf2cb
#define F367TER_SFEC_DILSTK_LO 0xf2cb00ff
/* SFSTATUS */
#define R367TER_SFSTATUS 0xf2cc
#define F367TER_SFEC_LINEOK 0xf2cc0080
#define F367TER_SFEC_ERROR 0xf2cc0040
#define F367TER_SFEC_DATA7 0xf2cc0020
#define F367TER_SFEC_OVERFLOW 0xf2cc0010
#define F367TER_SFEC_DEMODSEL2 0xf2cc0008
#define F367TER_SFEC_NOSYNC 0xf2cc0004
#define F367TER_SFEC_UNREGULA 0xf2cc0002
#define F367TER_SFEC_READY 0xf2cc0001
/* SFDLYH */
#define R367TER_SFDLYH 0xf2cd
#define F367TER_SFEC_TSTIMEVALID 0xf2cd0080
#define F367TER_SFEC_SPEEDUP 0xf2cd0040
#define F367TER_SFEC_STOP 0xf2cd0020
#define F367TER_SFEC_REGULATED 0xf2cd0010
#define F367TER_SFEC_REALSYMBOFFSET 0xf2cd000f
/* SFDLYM */
#define R367TER_SFDLYM 0xf2ce
#define F367TER_SFEC_REALSYMBOFFSET_HI 0xf2ce00ff
/* SFDLYL */
#define R367TER_SFDLYL 0xf2cf
#define F367TER_SFEC_REALSYMBOFFSET_LO 0xf2cf00ff
/* SFDLYSETH */
#define R367TER_SFDLYSETH 0xf2d0
#define F367TER_SFEC_OFFSET 0xf2d000e0
#define F367TER_SFECDLYSETH_4 0xf2d00010
#define F367TER_RST_SFEC 0xf2d00008
#define F367TER_SFECDLYSETH_2 0xf2d00004
#define F367TER_SFEC_DISABLE 0xf2d00002
#define F367TER_SFEC_UNREGUL 0xf2d00001
/* SFDLYSETM */
#define R367TER_SFDLYSETM 0xf2d1
#define F367TER_SFECDLYSETM_7 0xf2d10080
#define F367TER_SFEC_SYMBOFFSET_HI 0xf2d1007f
/* SFDLYSETL */
#define R367TER_SFDLYSETL 0xf2d2
#define F367TER_SFEC_SYMBOFFSET_LO 0xf2d200ff
/* SFOBSCFG */
#define R367TER_SFOBSCFG 0xf2d3
#define F367TER_SFEC_OBSCFG 0xf2d300ff
/* SFOBSM */
#define R367TER_SFOBSM 0xf2d4
#define F367TER_SFEC_OBSDATA_HI 0xf2d400ff
/* SFOBSL */
#define R367TER_SFOBSL 0xf2d5
#define F367TER_SFEC_OBSDATA_LO 0xf2d500ff
/* SFECINFO */
#define R367TER_SFECINFO 0xf2d6
#define F367TER_SFECINFO_7 0xf2d60080
#define F367TER_SFEC_SYNCDLSB 0xf2d60070
#define F367TER_SFCE_S1cPHASE 0xf2d6000f
/* SFERRCTRL */
#define R367TER_SFERRCTRL 0xf2d8
#define F367TER_SFEC_ERR_SOURCE 0xf2d800f0
#define F367TER_SFERRCTRL_3 0xf2d80008
#define F367TER_SFEC_NUM_EVENT 0xf2d80007
/* SFERRCNTH */
#define R367TER_SFERRCNTH 0xf2d9
#define F367TER_SFERRC_OLDVALUE 0xf2d90080
#define F367TER_SFEC_ERR_CNT 0xf2d9007f
/* SFERRCNTM */
#define R367TER_SFERRCNTM 0xf2da
#define F367TER_SFEC_ERR_CNT_HI 0xf2da00ff
/* SFERRCNTL */
#define R367TER_SFERRCNTL 0xf2db
#define F367TER_SFEC_ERR_CNT_LO 0xf2db00ff
/* SYMBRATEM */
#define R367TER_SYMBRATEM 0xf2e0
#define F367TER_DEFGEN_SYMBRATE_HI 0xf2e000ff
/* SYMBRATEL */
#define R367TER_SYMBRATEL 0xf2e1
#define F367TER_DEFGEN_SYMBRATE_LO 0xf2e100ff
/* SYMBSTATUS */
#define R367TER_SYMBSTATUS 0xf2e2
#define F367TER_SYMBDLINE2_OFF 0xf2e20080
#define F367TER_SDDL_REINIT1 0xf2e20040
#define F367TER_SDD_REINIT1 0xf2e20020
#define F367TER_TOKENID_ERROR 0xf2e20010
#define F367TER_SYMBRATE_OVERFLOW 0xf2e20008
#define F367TER_SYMBRATE_UNDERFLOW 0xf2e20004
#define F367TER_TOKENID_RSTEVENT 0xf2e20002
#define F367TER_TOKENID_RESET1 0xf2e20001
/* SYMBCFG */
#define R367TER_SYMBCFG 0xf2e3
#define F367TER_SYMBCFG_7 0xf2e30080
#define F367TER_SYMBCFG_6 0xf2e30040
#define F367TER_SYMBCFG_5 0xf2e30020
#define F367TER_SYMBCFG_4 0xf2e30010
#define F367TER_SYMRATE_FSPEED 0xf2e3000c
#define F367TER_SYMRATE_SSPEED 0xf2e30003
/* SYMBFIFOM */
#define R367TER_SYMBFIFOM 0xf2e4
#define F367TER_SYMBFIFOM_7 0xf2e40080
#define F367TER_SYMBFIFOM_6 0xf2e40040
#define F367TER_DEFGEN_SYMFIFO_HI 0xf2e4003f
/* SYMBFIFOL */
#define R367TER_SYMBFIFOL 0xf2e5
#define F367TER_DEFGEN_SYMFIFO_LO 0xf2e500ff
/* SYMBOFFSM */
#define R367TER_SYMBOFFSM 0xf2e6
#define F367TER_TOKENID_RESET2 0xf2e60080
#define F367TER_SDDL_REINIT2 0xf2e60040
#define F367TER_SDD_REINIT2 0xf2e60020
#define F367TER_SYMBOFFSM_4 0xf2e60010
#define F367TER_SYMBOFFSM_3 0xf2e60008
#define F367TER_DEFGEN_SYMBOFFSET_HI 0xf2e60007
/* SYMBOFFSL */
#define R367TER_SYMBOFFSL 0xf2e7
#define F367TER_DEFGEN_SYMBOFFSET_LO 0xf2e700ff
/* DEBUG_LT4 */
#define R367TER_DEBUG_LT4 0xf400
#define F367TER_F_DEBUG_LT4 0xf40000ff
/* DEBUG_LT5 */
#define R367TER_DEBUG_LT5 0xf401
#define F367TER_F_DEBUG_LT5 0xf40100ff
/* DEBUG_LT6 */
#define R367TER_DEBUG_LT6 0xf402
#define F367TER_F_DEBUG_LT6 0xf40200ff
/* DEBUG_LT7 */
#define R367TER_DEBUG_LT7 0xf403
#define F367TER_F_DEBUG_LT7 0xf40300ff
/* DEBUG_LT8 */
#define R367TER_DEBUG_LT8 0xf404
#define F367TER_F_DEBUG_LT8 0xf40400ff
/* DEBUG_LT9 */
#define R367TER_DEBUG_LT9 0xf405
#define F367TER_F_DEBUG_LT9 0xf40500ff
#define STV0367TER_NBREGS 445
/* ID */
#define R367CAB_ID 0xf000
#define F367CAB_IDENTIFICATIONREGISTER 0xf00000ff
/* I2CRPT */
#define R367CAB_I2CRPT 0xf001
#define F367CAB_I2CT_ON 0xf0010080
#define F367CAB_ENARPT_LEVEL 0xf0010070
#define F367CAB_SCLT_DELAY 0xf0010008
#define F367CAB_SCLT_NOD 0xf0010004
#define F367CAB_STOP_ENABLE 0xf0010002
#define F367CAB_SDAT_NOD 0xf0010001
/* TOPCTRL */
#define R367CAB_TOPCTRL 0xf002
#define F367CAB_STDBY 0xf0020080
#define F367CAB_STDBY_CORE 0xf0020020
#define F367CAB_QAM_COFDM 0xf0020010
#define F367CAB_TS_DIS 0xf0020008
#define F367CAB_DIR_CLK_216 0xf0020004
/* IOCFG0 */
#define R367CAB_IOCFG0 0xf003
#define F367CAB_OP0_SD 0xf0030080
#define F367CAB_OP0_VAL 0xf0030040
#define F367CAB_OP0_OD 0xf0030020
#define F367CAB_OP0_INV 0xf0030010
#define F367CAB_OP0_DACVALUE_HI 0xf003000f
/* DAc0R */
#define R367CAB_DAC0R 0xf004
#define F367CAB_OP0_DACVALUE_LO 0xf00400ff
/* IOCFG1 */
#define R367CAB_IOCFG1 0xf005
#define F367CAB_IP0 0xf0050040
#define F367CAB_OP1_OD 0xf0050020
#define F367CAB_OP1_INV 0xf0050010
#define F367CAB_OP1_DACVALUE_HI 0xf005000f
/* DAC1R */
#define R367CAB_DAC1R 0xf006
#define F367CAB_OP1_DACVALUE_LO 0xf00600ff
/* IOCFG2 */
#define R367CAB_IOCFG2 0xf007
#define F367CAB_OP2_LOCK_CONF 0xf00700e0
#define F367CAB_OP2_OD 0xf0070010
#define F367CAB_OP2_VAL 0xf0070008
#define F367CAB_OP1_LOCK_CONF 0xf0070007
/* SDFR */
#define R367CAB_SDFR 0xf008
#define F367CAB_OP0_FREQ 0xf00800f0
#define F367CAB_OP1_FREQ 0xf008000f
/* AUX_CLK */
#define R367CAB_AUX_CLK 0xf00a
#define F367CAB_AUXFEC_CTL 0xf00a00c0
#define F367CAB_DIS_CKX4 0xf00a0020
#define F367CAB_CKSEL 0xf00a0018
#define F367CAB_CKDIV_PROG 0xf00a0006
#define F367CAB_AUXCLK_ENA 0xf00a0001
/* FREESYS1 */
#define R367CAB_FREESYS1 0xf00b
#define F367CAB_FREESYS_1 0xf00b00ff
/* FREESYS2 */
#define R367CAB_FREESYS2 0xf00c
#define F367CAB_FREESYS_2 0xf00c00ff
/* FREESYS3 */
#define R367CAB_FREESYS3 0xf00d
#define F367CAB_FREESYS_3 0xf00d00ff
/* GPIO_CFG */
#define R367CAB_GPIO_CFG 0xf00e
#define F367CAB_GPIO7_OD 0xf00e0080
#define F367CAB_GPIO7_CFG 0xf00e0040
#define F367CAB_GPIO6_OD 0xf00e0020
#define F367CAB_GPIO6_CFG 0xf00e0010
#define F367CAB_GPIO5_OD 0xf00e0008
#define F367CAB_GPIO5_CFG 0xf00e0004
#define F367CAB_GPIO4_OD 0xf00e0002
#define F367CAB_GPIO4_CFG 0xf00e0001
/* GPIO_CMD */
#define R367CAB_GPIO_CMD 0xf00f
#define F367CAB_GPIO7_VAL 0xf00f0008
#define F367CAB_GPIO6_VAL 0xf00f0004
#define F367CAB_GPIO5_VAL 0xf00f0002
#define F367CAB_GPIO4_VAL 0xf00f0001
/* TSTRES */
#define R367CAB_TSTRES 0xf0c0
#define F367CAB_FRES_DISPLAY 0xf0c00080
#define F367CAB_FRES_FIFO_AD 0xf0c00020
#define F367CAB_FRESRS 0xf0c00010
#define F367CAB_FRESACS 0xf0c00008
#define F367CAB_FRESFEC 0xf0c00004
#define F367CAB_FRES_PRIF 0xf0c00002
#define F367CAB_FRESCORE 0xf0c00001
/* ANACTRL */
#define R367CAB_ANACTRL 0xf0c1
#define F367CAB_BYPASS_XTAL 0xf0c10040
#define F367CAB_BYPASS_PLLXN 0xf0c1000c
#define F367CAB_DIS_PAD_OSC 0xf0c10002
#define F367CAB_STDBY_PLLXN 0xf0c10001
/* TSTBUS */
#define R367CAB_TSTBUS 0xf0c2
#define F367CAB_TS_BYTE_CLK_INV 0xf0c20080
#define F367CAB_CFG_IP 0xf0c20070
#define F367CAB_CFG_TST 0xf0c2000f
/* RF_AGC1 */
#define R367CAB_RF_AGC1 0xf0d4
#define F367CAB_RF_AGC1_LEVEL_HI 0xf0d400ff
/* RF_AGC2 */
#define R367CAB_RF_AGC2 0xf0d5
#define F367CAB_REF_ADGP 0xf0d50080
#define F367CAB_STDBY_ADCGP 0xf0d50020
#define F367CAB_RF_AGC1_LEVEL_LO 0xf0d50003
/* ANADIGCTRL */
#define R367CAB_ANADIGCTRL 0xf0d7
#define F367CAB_SEL_CLKDEM 0xf0d70020
#define F367CAB_EN_BUFFER_Q 0xf0d70010
#define F367CAB_EN_BUFFER_I 0xf0d70008
#define F367CAB_ADC_RIS_EGDE 0xf0d70004
#define F367CAB_SGN_ADC 0xf0d70002
#define F367CAB_SEL_AD12_SYNC 0xf0d70001
/* PLLMDIV */
#define R367CAB_PLLMDIV 0xf0d8
#define F367CAB_PLL_MDIV 0xf0d800ff
/* PLLNDIV */
#define R367CAB_PLLNDIV 0xf0d9
#define F367CAB_PLL_NDIV 0xf0d900ff
/* PLLSETUP */
#define R367CAB_PLLSETUP 0xf0da
#define F367CAB_PLL_PDIV 0xf0da0070
#define F367CAB_PLL_KDIV 0xf0da000f
/* DUAL_AD12 */
#define R367CAB_DUAL_AD12 0xf0db
#define F367CAB_FS20M 0xf0db0020
#define F367CAB_FS50M 0xf0db0010
#define F367CAB_INMODe0 0xf0db0008
#define F367CAB_POFFQ 0xf0db0004
#define F367CAB_POFFI 0xf0db0002
#define F367CAB_INMODE1 0xf0db0001
/* TSTBIST */
#define R367CAB_TSTBIST 0xf0dc
#define F367CAB_TST_BYP_CLK 0xf0dc0080
#define F367CAB_TST_GCLKENA_STD 0xf0dc0040
#define F367CAB_TST_GCLKENA 0xf0dc0020
#define F367CAB_TST_MEMBIST 0xf0dc001f
/* CTRL_1 */
#define R367CAB_CTRL_1 0xf402
#define F367CAB_SOFT_RST 0xf4020080
#define F367CAB_EQU_RST 0xf4020008
#define F367CAB_CRL_RST 0xf4020004
#define F367CAB_TRL_RST 0xf4020002
#define F367CAB_AGC_RST 0xf4020001
/* CTRL_2 */
#define R367CAB_CTRL_2 0xf403
#define F367CAB_DEINT_RST 0xf4030008
#define F367CAB_RS_RST 0xf4030004
/* IT_STATUS1 */
#define R367CAB_IT_STATUS1 0xf408
#define F367CAB_SWEEP_OUT 0xf4080080
#define F367CAB_FSM_CRL 0xf4080040
#define F367CAB_CRL_LOCK 0xf4080020
#define F367CAB_MFSM 0xf4080010
#define F367CAB_TRL_LOCK 0xf4080008
#define F367CAB_TRL_AGC_LIMIT 0xf4080004
#define F367CAB_ADJ_AGC_LOCK 0xf4080002
#define F367CAB_AGC_QAM_LOCK 0xf4080001
/* IT_STATUS2 */
#define R367CAB_IT_STATUS2 0xf409
#define F367CAB_TSMF_CNT 0xf4090080
#define F367CAB_TSMF_EOF 0xf4090040
#define F367CAB_TSMF_RDY 0xf4090020
#define F367CAB_FEC_NOCORR 0xf4090010
#define F367CAB_SYNCSTATE 0xf4090008
#define F367CAB_DEINT_LOCK 0xf4090004
#define F367CAB_FADDING_FRZ 0xf4090002
#define F367CAB_TAPMON_ALARM 0xf4090001
/* IT_EN1 */
#define R367CAB_IT_EN1 0xf40a
#define F367CAB_SWEEP_OUTE 0xf40a0080
#define F367CAB_FSM_CRLE 0xf40a0040
#define F367CAB_CRL_LOCKE 0xf40a0020
#define F367CAB_MFSME 0xf40a0010
#define F367CAB_TRL_LOCKE 0xf40a0008
#define F367CAB_TRL_AGC_LIMITE 0xf40a0004
#define F367CAB_ADJ_AGC_LOCKE 0xf40a0002
#define F367CAB_AGC_LOCKE 0xf40a0001
/* IT_EN2 */
#define R367CAB_IT_EN2 0xf40b
#define F367CAB_TSMF_CNTE 0xf40b0080
#define F367CAB_TSMF_EOFE 0xf40b0040
#define F367CAB_TSMF_RDYE 0xf40b0020
#define F367CAB_FEC_NOCORRE 0xf40b0010
#define F367CAB_SYNCSTATEE 0xf40b0008
#define F367CAB_DEINT_LOCKE 0xf40b0004
#define F367CAB_FADDING_FRZE 0xf40b0002
#define F367CAB_TAPMON_ALARME 0xf40b0001
/* CTRL_STATUS */
#define R367CAB_CTRL_STATUS 0xf40c
#define F367CAB_QAMFEC_LOCK 0xf40c0004
#define F367CAB_TSMF_LOCK 0xf40c0002
#define F367CAB_TSMF_ERROR 0xf40c0001
/* TEST_CTL */
#define R367CAB_TEST_CTL 0xf40f
#define F367CAB_TST_BLK_SEL 0xf40f0060
#define F367CAB_TST_BUS_SEL 0xf40f001f
/* AGC_CTL */
#define R367CAB_AGC_CTL 0xf410
#define F367CAB_AGC_LCK_TH 0xf41000f0
#define F367CAB_AGC_ACCUMRSTSEL 0xf4100007
/* AGC_IF_CFG */
#define R367CAB_AGC_IF_CFG 0xf411
#define F367CAB_AGC_IF_BWSEL 0xf41100f0
#define F367CAB_AGC_IF_FREEZE 0xf4110002
/* AGC_RF_CFG */
#define R367CAB_AGC_RF_CFG 0xf412
#define F367CAB_AGC_RF_BWSEL 0xf4120070
#define F367CAB_AGC_RF_FREEZE 0xf4120002
/* AGC_PWM_CFG */
#define R367CAB_AGC_PWM_CFG 0xf413
#define F367CAB_AGC_RF_PWM_TST 0xf4130080
#define F367CAB_AGC_RF_PWM_INV 0xf4130040
#define F367CAB_AGC_IF_PWM_TST 0xf4130008
#define F367CAB_AGC_IF_PWM_INV 0xf4130004
#define F367CAB_AGC_PWM_CLKDIV 0xf4130003
/* AGC_PWR_REF_L */
#define R367CAB_AGC_PWR_REF_L 0xf414
#define F367CAB_AGC_PWRREF_LO 0xf41400ff
/* AGC_PWR_REF_H */
#define R367CAB_AGC_PWR_REF_H 0xf415
#define F367CAB_AGC_PWRREF_HI 0xf4150003
/* AGC_RF_TH_L */
#define R367CAB_AGC_RF_TH_L 0xf416
#define F367CAB_AGC_RF_TH_LO 0xf41600ff
/* AGC_RF_TH_H */
#define R367CAB_AGC_RF_TH_H 0xf417
#define F367CAB_AGC_RF_TH_HI 0xf417000f
/* AGC_IF_LTH_L */
#define R367CAB_AGC_IF_LTH_L 0xf418
#define F367CAB_AGC_IF_THLO_LO 0xf41800ff
/* AGC_IF_LTH_H */
#define R367CAB_AGC_IF_LTH_H 0xf419
#define F367CAB_AGC_IF_THLO_HI 0xf419000f
/* AGC_IF_HTH_L */
#define R367CAB_AGC_IF_HTH_L 0xf41a
#define F367CAB_AGC_IF_THHI_LO 0xf41a00ff
/* AGC_IF_HTH_H */
#define R367CAB_AGC_IF_HTH_H 0xf41b
#define F367CAB_AGC_IF_THHI_HI 0xf41b000f
/* AGC_PWR_RD_L */
#define R367CAB_AGC_PWR_RD_L 0xf41c
#define F367CAB_AGC_PWR_WORD_LO 0xf41c00ff
/* AGC_PWR_RD_M */
#define R367CAB_AGC_PWR_RD_M 0xf41d
#define F367CAB_AGC_PWR_WORD_ME 0xf41d00ff
/* AGC_PWR_RD_H */
#define R367CAB_AGC_PWR_RD_H 0xf41e
#define F367CAB_AGC_PWR_WORD_HI 0xf41e0003
/* AGC_PWM_IFCMD_L */
#define R367CAB_AGC_PWM_IFCMD_L 0xf420
#define F367CAB_AGC_IF_PWMCMD_LO 0xf42000ff
/* AGC_PWM_IFCMD_H */
#define R367CAB_AGC_PWM_IFCMD_H 0xf421
#define F367CAB_AGC_IF_PWMCMD_HI 0xf421000f
/* AGC_PWM_RFCMD_L */
#define R367CAB_AGC_PWM_RFCMD_L 0xf422
#define F367CAB_AGC_RF_PWMCMD_LO 0xf42200ff
/* AGC_PWM_RFCMD_H */
#define R367CAB_AGC_PWM_RFCMD_H 0xf423
#define F367CAB_AGC_RF_PWMCMD_HI 0xf423000f
/* IQDEM_CFG */
#define R367CAB_IQDEM_CFG 0xf424
#define F367CAB_IQDEM_CLK_SEL 0xf4240004
#define F367CAB_IQDEM_INVIQ 0xf4240002
#define F367CAB_IQDEM_A2dTYPE 0xf4240001
/* MIX_NCO_LL */
#define R367CAB_MIX_NCO_LL 0xf425
#define F367CAB_MIX_NCO_INC_LL 0xf42500ff
/* MIX_NCO_HL */
#define R367CAB_MIX_NCO_HL 0xf426
#define F367CAB_MIX_NCO_INC_HL 0xf42600ff
/* MIX_NCO_HH */
#define R367CAB_MIX_NCO_HH 0xf427
#define F367CAB_MIX_NCO_INVCNST 0xf4270080
#define F367CAB_MIX_NCO_INC_HH 0xf427007f
/* SRC_NCO_LL */
#define R367CAB_SRC_NCO_LL 0xf428
#define F367CAB_SRC_NCO_INC_LL 0xf42800ff
/* SRC_NCO_LH */
#define R367CAB_SRC_NCO_LH 0xf429
#define F367CAB_SRC_NCO_INC_LH 0xf42900ff
/* SRC_NCO_HL */
#define R367CAB_SRC_NCO_HL 0xf42a
#define F367CAB_SRC_NCO_INC_HL 0xf42a00ff
/* SRC_NCO_HH */
#define R367CAB_SRC_NCO_HH 0xf42b
#define F367CAB_SRC_NCO_INC_HH 0xf42b007f
/* IQDEM_GAIN_SRC_L */
#define R367CAB_IQDEM_GAIN_SRC_L 0xf42c
#define F367CAB_GAIN_SRC_LO 0xf42c00ff
/* IQDEM_GAIN_SRC_H */
#define R367CAB_IQDEM_GAIN_SRC_H 0xf42d
#define F367CAB_GAIN_SRC_HI 0xf42d0003
/* IQDEM_DCRM_CFG_LL */
#define R367CAB_IQDEM_DCRM_CFG_LL 0xf430
#define F367CAB_DCRM0_DCIN_L 0xf43000ff
/* IQDEM_DCRM_CFG_LH */
#define R367CAB_IQDEM_DCRM_CFG_LH 0xf431
#define F367CAB_DCRM1_I_DCIN_L 0xf43100fc
#define F367CAB_DCRM0_DCIN_H 0xf4310003
/* IQDEM_DCRM_CFG_HL */
#define R367CAB_IQDEM_DCRM_CFG_HL 0xf432
#define F367CAB_DCRM1_Q_DCIN_L 0xf43200f0
#define F367CAB_DCRM1_I_DCIN_H 0xf432000f
/* IQDEM_DCRM_CFG_HH */
#define R367CAB_IQDEM_DCRM_CFG_HH 0xf433
#define F367CAB_DCRM1_FRZ 0xf4330080
#define F367CAB_DCRM0_FRZ 0xf4330040
#define F367CAB_DCRM1_Q_DCIN_H 0xf433003f
/* IQDEM_ADJ_COEFf0 */
#define R367CAB_IQDEM_ADJ_COEFF0 0xf434
#define F367CAB_ADJIIR_COEFF10_L 0xf43400ff
/* IQDEM_ADJ_COEFF1 */
#define R367CAB_IQDEM_ADJ_COEFF1 0xf435
#define F367CAB_ADJIIR_COEFF11_L 0xf43500fc
#define F367CAB_ADJIIR_COEFF10_H 0xf4350003
/* IQDEM_ADJ_COEFF2 */
#define R367CAB_IQDEM_ADJ_COEFF2 0xf436
#define F367CAB_ADJIIR_COEFF12_L 0xf43600f0
#define F367CAB_ADJIIR_COEFF11_H 0xf436000f
/* IQDEM_ADJ_COEFF3 */
#define R367CAB_IQDEM_ADJ_COEFF3 0xf437
#define F367CAB_ADJIIR_COEFF20_L 0xf43700c0
#define F367CAB_ADJIIR_COEFF12_H 0xf437003f
/* IQDEM_ADJ_COEFF4 */
#define R367CAB_IQDEM_ADJ_COEFF4 0xf438
#define F367CAB_ADJIIR_COEFF20_H 0xf43800ff
/* IQDEM_ADJ_COEFF5 */
#define R367CAB_IQDEM_ADJ_COEFF5 0xf439
#define F367CAB_ADJIIR_COEFF21_L 0xf43900ff
/* IQDEM_ADJ_COEFF6 */
#define R367CAB_IQDEM_ADJ_COEFF6 0xf43a
#define F367CAB_ADJIIR_COEFF22_L 0xf43a00fc
#define F367CAB_ADJIIR_COEFF21_H 0xf43a0003
/* IQDEM_ADJ_COEFF7 */
#define R367CAB_IQDEM_ADJ_COEFF7 0xf43b
#define F367CAB_ADJIIR_COEFF22_H 0xf43b000f
/* IQDEM_ADJ_EN */
#define R367CAB_IQDEM_ADJ_EN 0xf43c
#define F367CAB_ALLPASSFILT_EN 0xf43c0008
#define F367CAB_ADJ_AGC_EN 0xf43c0004
#define F367CAB_ADJ_COEFF_FRZ 0xf43c0002
#define F367CAB_ADJ_EN 0xf43c0001
/* IQDEM_ADJ_AGC_REF */
#define R367CAB_IQDEM_ADJ_AGC_REF 0xf43d
#define F367CAB_ADJ_AGC_REF 0xf43d00ff
/* ALLPASSFILT1 */
#define R367CAB_ALLPASSFILT1 0xf440
#define F367CAB_ALLPASSFILT_COEFF1_LO 0xf44000ff
/* ALLPASSFILT2 */
#define R367CAB_ALLPASSFILT2 0xf441
#define F367CAB_ALLPASSFILT_COEFF1_ME 0xf44100ff
/* ALLPASSFILT3 */
#define R367CAB_ALLPASSFILT3 0xf442
#define F367CAB_ALLPASSFILT_COEFF2_LO 0xf44200c0
#define F367CAB_ALLPASSFILT_COEFF1_HI 0xf442003f
/* ALLPASSFILT4 */
#define R367CAB_ALLPASSFILT4 0xf443
#define F367CAB_ALLPASSFILT_COEFF2_MEL 0xf44300ff
/* ALLPASSFILT5 */
#define R367CAB_ALLPASSFILT5 0xf444
#define F367CAB_ALLPASSFILT_COEFF2_MEH 0xf44400ff
/* ALLPASSFILT6 */
#define R367CAB_ALLPASSFILT6 0xf445
#define F367CAB_ALLPASSFILT_COEFF3_LO 0xf44500f0
#define F367CAB_ALLPASSFILT_COEFF2_HI 0xf445000f
/* ALLPASSFILT7 */
#define R367CAB_ALLPASSFILT7 0xf446
#define F367CAB_ALLPASSFILT_COEFF3_MEL 0xf44600ff
/* ALLPASSFILT8 */
#define R367CAB_ALLPASSFILT8 0xf447
#define F367CAB_ALLPASSFILT_COEFF3_MEH 0xf44700ff
/* ALLPASSFILT9 */
#define R367CAB_ALLPASSFILT9 0xf448
#define F367CAB_ALLPASSFILT_COEFF4_LO 0xf44800fc
#define F367CAB_ALLPASSFILT_COEFF3_HI 0xf4480003
/* ALLPASSFILT10 */
#define R367CAB_ALLPASSFILT10 0xf449
#define F367CAB_ALLPASSFILT_COEFF4_ME 0xf44900ff
/* ALLPASSFILT11 */
#define R367CAB_ALLPASSFILT11 0xf44a
#define F367CAB_ALLPASSFILT_COEFF4_HI 0xf44a00ff
/* TRL_AGC_CFG */
#define R367CAB_TRL_AGC_CFG 0xf450
#define F367CAB_TRL_AGC_FREEZE 0xf4500080
#define F367CAB_TRL_AGC_REF 0xf450007f
/* TRL_LPF_CFG */
#define R367CAB_TRL_LPF_CFG 0xf454
#define F367CAB_NYQPOINT_INV 0xf4540040
#define F367CAB_TRL_SHIFT 0xf4540030
#define F367CAB_NYQ_COEFF_SEL 0xf454000c
#define F367CAB_TRL_LPF_FREEZE 0xf4540002
#define F367CAB_TRL_LPF_CRT 0xf4540001
/* TRL_LPF_ACQ_GAIN */
#define R367CAB_TRL_LPF_ACQ_GAIN 0xf455
#define F367CAB_TRL_GDIR_ACQ 0xf4550070
#define F367CAB_TRL_GINT_ACQ 0xf4550007
/* TRL_LPF_TRK_GAIN */
#define R367CAB_TRL_LPF_TRK_GAIN 0xf456
#define F367CAB_TRL_GDIR_TRK 0xf4560070
#define F367CAB_TRL_GINT_TRK 0xf4560007
/* TRL_LPF_OUT_GAIN */
#define R367CAB_TRL_LPF_OUT_GAIN 0xf457
#define F367CAB_TRL_GAIN_OUT 0xf4570007
/* TRL_LOCKDET_LTH */
#define R367CAB_TRL_LOCKDET_LTH 0xf458
#define F367CAB_TRL_LCK_THLO 0xf4580007
/* TRL_LOCKDET_HTH */
#define R367CAB_TRL_LOCKDET_HTH 0xf459
#define F367CAB_TRL_LCK_THHI 0xf45900ff
/* TRL_LOCKDET_TRGVAL */
#define R367CAB_TRL_LOCKDET_TRGVAL 0xf45a
#define F367CAB_TRL_LCK_TRG 0xf45a00ff
/* IQ_QAM */
#define R367CAB_IQ_QAM 0xf45c
#define F367CAB_IQ_INPUT 0xf45c0008
#define F367CAB_DETECT_MODE 0xf45c0007
/* FSM_STATE */
#define R367CAB_FSM_STATE 0xf460
#define F367CAB_CRL_DFE 0xf4600080
#define F367CAB_DFE_START 0xf4600040
#define F367CAB_CTRLG_START 0xf4600030
#define F367CAB_FSM_FORCESTATE 0xf460000f
/* FSM_CTL */
#define R367CAB_FSM_CTL 0xf461
#define F367CAB_FEC2_EN 0xf4610040
#define F367CAB_SIT_EN 0xf4610020
#define F367CAB_TRL_AHEAD 0xf4610010
#define F367CAB_TRL2_EN 0xf4610008
#define F367CAB_FSM_EQA1_EN 0xf4610004
#define F367CAB_FSM_BKP_DIS 0xf4610002
#define F367CAB_FSM_FORCE_EN 0xf4610001
/* FSM_STS */
#define R367CAB_FSM_STS 0xf462
#define F367CAB_FSM_STATUS 0xf462000f
/* FSM_SNR0_HTH */
#define R367CAB_FSM_SNR0_HTH 0xf463
#define F367CAB_SNR0_HTH 0xf46300ff
/* FSM_SNR1_HTH */
#define R367CAB_FSM_SNR1_HTH 0xf464
#define F367CAB_SNR1_HTH 0xf46400ff
/* FSM_SNR2_HTH */
#define R367CAB_FSM_SNR2_HTH 0xf465
#define F367CAB_SNR2_HTH 0xf46500ff
/* FSM_SNR0_LTH */
#define R367CAB_FSM_SNR0_LTH 0xf466
#define F367CAB_SNR0_LTH 0xf46600ff
/* FSM_SNR1_LTH */
#define R367CAB_FSM_SNR1_LTH 0xf467
#define F367CAB_SNR1_LTH 0xf46700ff
/* FSM_EQA1_HTH */
#define R367CAB_FSM_EQA1_HTH 0xf468
#define F367CAB_SNR3_HTH_LO 0xf46800f0
#define F367CAB_EQA1_HTH 0xf468000f
/* FSM_TEMPO */
#define R367CAB_FSM_TEMPO 0xf469
#define F367CAB_SIT 0xf46900c0
#define F367CAB_WST 0xf4690038
#define F367CAB_ELT 0xf4690006
#define F367CAB_SNR3_HTH_HI 0xf4690001
/* FSM_CONFIG */
#define R367CAB_FSM_CONFIG 0xf46a
#define F367CAB_FEC2_DFEOFF 0xf46a0004
#define F367CAB_PRIT_STATE 0xf46a0002
#define F367CAB_MODMAP_STATE 0xf46a0001
/* EQU_I_TESTTAP_L */
#define R367CAB_EQU_I_TESTTAP_L 0xf474
#define F367CAB_I_TEST_TAP_L 0xf47400ff
/* EQU_I_TESTTAP_M */
#define R367CAB_EQU_I_TESTTAP_M 0xf475
#define F367CAB_I_TEST_TAP_M 0xf47500ff
/* EQU_I_TESTTAP_H */
#define R367CAB_EQU_I_TESTTAP_H 0xf476
#define F367CAB_I_TEST_TAP_H 0xf476001f
/* EQU_TESTAP_CFG */
#define R367CAB_EQU_TESTAP_CFG 0xf477
#define F367CAB_TEST_FFE_DFE_SEL 0xf4770040
#define F367CAB_TEST_TAP_SELECT 0xf477003f
/* EQU_Q_TESTTAP_L */
#define R367CAB_EQU_Q_TESTTAP_L 0xf478
#define F367CAB_Q_TEST_TAP_L 0xf47800ff
/* EQU_Q_TESTTAP_M */
#define R367CAB_EQU_Q_TESTTAP_M 0xf479
#define F367CAB_Q_TEST_TAP_M 0xf47900ff
/* EQU_Q_TESTTAP_H */
#define R367CAB_EQU_Q_TESTTAP_H 0xf47a
#define F367CAB_Q_TEST_TAP_H 0xf47a001f
/* EQU_TAP_CTRL */
#define R367CAB_EQU_TAP_CTRL 0xf47b
#define F367CAB_MTAP_FRZ 0xf47b0010
#define F367CAB_PRE_FREEZE 0xf47b0008
#define F367CAB_DFE_TAPMON_EN 0xf47b0004
#define F367CAB_FFE_TAPMON_EN 0xf47b0002
#define F367CAB_MTAP_ONLY 0xf47b0001
/* EQU_CTR_CRL_CONTROL_L */
#define R367CAB_EQU_CTR_CRL_CONTROL_L 0xf47c
#define F367CAB_EQU_CTR_CRL_CONTROL_LO 0xf47c00ff
/* EQU_CTR_CRL_CONTROL_H */
#define R367CAB_EQU_CTR_CRL_CONTROL_H 0xf47d
#define F367CAB_EQU_CTR_CRL_CONTROL_HI 0xf47d00ff
/* EQU_CTR_HIPOW_L */
#define R367CAB_EQU_CTR_HIPOW_L 0xf47e
#define F367CAB_CTR_HIPOW_L 0xf47e00ff
/* EQU_CTR_HIPOW_H */
#define R367CAB_EQU_CTR_HIPOW_H 0xf47f
#define F367CAB_CTR_HIPOW_H 0xf47f00ff
/* EQU_I_EQU_LO */
#define R367CAB_EQU_I_EQU_LO 0xf480
#define F367CAB_EQU_I_EQU_L 0xf48000ff
/* EQU_I_EQU_HI */
#define R367CAB_EQU_I_EQU_HI 0xf481
#define F367CAB_EQU_I_EQU_H 0xf4810003
/* EQU_Q_EQU_LO */
#define R367CAB_EQU_Q_EQU_LO 0xf482
#define F367CAB_EQU_Q_EQU_L 0xf48200ff
/* EQU_Q_EQU_HI */
#define R367CAB_EQU_Q_EQU_HI 0xf483
#define F367CAB_EQU_Q_EQU_H 0xf4830003
/* EQU_MAPPER */
#define R367CAB_EQU_MAPPER 0xf484
#define F367CAB_QUAD_AUTO 0xf4840080
#define F367CAB_QUAD_INV 0xf4840040
#define F367CAB_QAM_MODE 0xf4840007
/* EQU_SWEEP_RATE */
#define R367CAB_EQU_SWEEP_RATE 0xf485
#define F367CAB_SNR_PER 0xf48500c0
#define F367CAB_SWEEP_RATE 0xf485003f
/* EQU_SNR_LO */
#define R367CAB_EQU_SNR_LO 0xf486
#define F367CAB_SNR_LO 0xf48600ff
/* EQU_SNR_HI */
#define R367CAB_EQU_SNR_HI 0xf487
#define F367CAB_SNR_HI 0xf48700ff
/* EQU_GAMMA_LO */
#define R367CAB_EQU_GAMMA_LO 0xf488
#define F367CAB_GAMMA_LO 0xf48800ff
/* EQU_GAMMA_HI */
#define R367CAB_EQU_GAMMA_HI 0xf489
#define F367CAB_GAMMA_ME 0xf48900ff
/* EQU_ERR_GAIN */
#define R367CAB_EQU_ERR_GAIN 0xf48a
#define F367CAB_EQA1MU 0xf48a0070
#define F367CAB_CRL2MU 0xf48a000e
#define F367CAB_GAMMA_HI 0xf48a0001
/* EQU_RADIUS */
#define R367CAB_EQU_RADIUS 0xf48b
#define F367CAB_RADIUS 0xf48b00ff
/* EQU_FFE_MAINTAP */
#define R367CAB_EQU_FFE_MAINTAP 0xf48c
#define F367CAB_FFE_MAINTAP_INIT 0xf48c00ff
/* EQU_FFE_LEAKAGE */
#define R367CAB_EQU_FFE_LEAKAGE 0xf48e
#define F367CAB_LEAK_PER 0xf48e00f0
#define F367CAB_EQU_OUTSEL 0xf48e0002
#define F367CAB_PNT2dFE 0xf48e0001
/* EQU_FFE_MAINTAP_POS */
#define R367CAB_EQU_FFE_MAINTAP_POS 0xf48f
#define F367CAB_FFE_LEAK_EN 0xf48f0080
#define F367CAB_DFE_LEAK_EN 0xf48f0040
#define F367CAB_FFE_MAINTAP_POS 0xf48f003f
/* EQU_GAIN_WIDE */
#define R367CAB_EQU_GAIN_WIDE 0xf490
#define F367CAB_DFE_GAIN_WIDE 0xf49000f0
#define F367CAB_FFE_GAIN_WIDE 0xf490000f
/* EQU_GAIN_NARROW */
#define R367CAB_EQU_GAIN_NARROW 0xf491
#define F367CAB_DFE_GAIN_NARROW 0xf49100f0
#define F367CAB_FFE_GAIN_NARROW 0xf491000f
/* EQU_CTR_LPF_GAIN */
#define R367CAB_EQU_CTR_LPF_GAIN 0xf492
#define F367CAB_CTR_GTO 0xf4920080
#define F367CAB_CTR_GDIR 0xf4920070
#define F367CAB_SWEEP_EN 0xf4920008
#define F367CAB_CTR_GINT 0xf4920007
/* EQU_CRL_LPF_GAIN */
#define R367CAB_EQU_CRL_LPF_GAIN 0xf493
#define F367CAB_CRL_GTO 0xf4930080
#define F367CAB_CRL_GDIR 0xf4930070
#define F367CAB_SWEEP_DIR 0xf4930008
#define F367CAB_CRL_GINT 0xf4930007
/* EQU_GLOBAL_GAIN */
#define R367CAB_EQU_GLOBAL_GAIN 0xf494
#define F367CAB_CRL_GAIN 0xf49400f8
#define F367CAB_CTR_INC_GAIN 0xf4940004
#define F367CAB_CTR_FRAC 0xf4940003
/* EQU_CRL_LD_SEN */
#define R367CAB_EQU_CRL_LD_SEN 0xf495
#define F367CAB_CTR_BADPOINT_EN 0xf4950080
#define F367CAB_CTR_GAIN 0xf4950070
#define F367CAB_LIMANEN 0xf4950008
#define F367CAB_CRL_LD_SEN 0xf4950007
/* EQU_CRL_LD_VAL */
#define R367CAB_EQU_CRL_LD_VAL 0xf496
#define F367CAB_CRL_BISTH_LIMIT 0xf4960080
#define F367CAB_CARE_EN 0xf4960040
#define F367CAB_CRL_LD_PER 0xf4960030
#define F367CAB_CRL_LD_WST 0xf496000c
#define F367CAB_CRL_LD_TFS 0xf4960003
/* EQU_CRL_TFR */
#define R367CAB_EQU_CRL_TFR 0xf497
#define F367CAB_CRL_LD_TFR 0xf49700ff
/* EQU_CRL_BISTH_LO */
#define R367CAB_EQU_CRL_BISTH_LO 0xf498
#define F367CAB_CRL_BISTH_LO 0xf49800ff
/* EQU_CRL_BISTH_HI */
#define R367CAB_EQU_CRL_BISTH_HI 0xf499
#define F367CAB_CRL_BISTH_HI 0xf49900ff
/* EQU_SWEEP_RANGE_LO */
#define R367CAB_EQU_SWEEP_RANGE_LO 0xf49a
#define F367CAB_SWEEP_RANGE_LO 0xf49a00ff
/* EQU_SWEEP_RANGE_HI */
#define R367CAB_EQU_SWEEP_RANGE_HI 0xf49b
#define F367CAB_SWEEP_RANGE_HI 0xf49b00ff
/* EQU_CRL_LIMITER */
#define R367CAB_EQU_CRL_LIMITER 0xf49c
#define F367CAB_BISECTOR_EN 0xf49c0080
#define F367CAB_PHEST128_EN 0xf49c0040
#define F367CAB_CRL_LIM 0xf49c003f
/* EQU_MODULUS_MAP */
#define R367CAB_EQU_MODULUS_MAP 0xf49d
#define F367CAB_PNT_DEPTH 0xf49d00e0
#define F367CAB_MODULUS_CMP 0xf49d001f
/* EQU_PNT_GAIN */
#define R367CAB_EQU_PNT_GAIN 0xf49e
#define F367CAB_PNT_EN 0xf49e0080
#define F367CAB_MODULUSMAP_EN 0xf49e0040
#define F367CAB_PNT_GAIN 0xf49e003f
/* FEC_AC_CTR_0 */
#define R367CAB_FEC_AC_CTR_0 0xf4a8
#define F367CAB_BE_BYPASS 0xf4a80020
#define F367CAB_REFRESH47 0xf4a80010
#define F367CAB_CT_NBST 0xf4a80008
#define F367CAB_TEI_ENA 0xf4a80004
#define F367CAB_DS_ENA 0xf4a80002
#define F367CAB_TSMF_EN 0xf4a80001
/* FEC_AC_CTR_1 */
#define R367CAB_FEC_AC_CTR_1 0xf4a9
#define F367CAB_DEINT_DEPTH 0xf4a900ff
/* FEC_AC_CTR_2 */
#define R367CAB_FEC_AC_CTR_2 0xf4aa
#define F367CAB_DEINT_M 0xf4aa00f8
#define F367CAB_DIS_UNLOCK 0xf4aa0004
#define F367CAB_DESCR_MODE 0xf4aa0003
/* FEC_AC_CTR_3 */
#define R367CAB_FEC_AC_CTR_3 0xf4ab
#define F367CAB_DI_UNLOCK 0xf4ab0080
#define F367CAB_DI_FREEZE 0xf4ab0040
#define F367CAB_MISMATCH 0xf4ab0030
#define F367CAB_ACQ_MODE 0xf4ab000c
#define F367CAB_TRK_MODE 0xf4ab0003
/* FEC_STATUS */
#define R367CAB_FEC_STATUS 0xf4ac
#define F367CAB_DEINT_SMCNTR 0xf4ac00e0
#define F367CAB_DEINT_SYNCSTATE 0xf4ac0018
#define F367CAB_DEINT_SYNLOST 0xf4ac0004
#define F367CAB_DESCR_SYNCSTATE 0xf4ac0002
/* RS_COUNTER_0 */
#define R367CAB_RS_COUNTER_0 0xf4ae
#define F367CAB_BK_CT_L 0xf4ae00ff
/* RS_COUNTER_1 */
#define R367CAB_RS_COUNTER_1 0xf4af
#define F367CAB_BK_CT_H 0xf4af00ff
/* RS_COUNTER_2 */
#define R367CAB_RS_COUNTER_2 0xf4b0
#define F367CAB_CORR_CT_L 0xf4b000ff
/* RS_COUNTER_3 */
#define R367CAB_RS_COUNTER_3 0xf4b1
#define F367CAB_CORR_CT_H 0xf4b100ff
/* RS_COUNTER_4 */
#define R367CAB_RS_COUNTER_4 0xf4b2
#define F367CAB_UNCORR_CT_L 0xf4b200ff
/* RS_COUNTER_5 */
#define R367CAB_RS_COUNTER_5 0xf4b3
#define F367CAB_UNCORR_CT_H 0xf4b300ff
/* BERT_0 */
#define R367CAB_BERT_0 0xf4b4
#define F367CAB_RS_NOCORR 0xf4b40004
#define F367CAB_CT_HOLD 0xf4b40002
#define F367CAB_CT_CLEAR 0xf4b40001
/* BERT_1 */
#define R367CAB_BERT_1 0xf4b5
#define F367CAB_BERT_ON 0xf4b50020
#define F367CAB_BERT_ERR_SRC 0xf4b50010
#define F367CAB_BERT_ERR_MODE 0xf4b50008
#define F367CAB_BERT_NBYTE 0xf4b50007
/* BERT_2 */
#define R367CAB_BERT_2 0xf4b6
#define F367CAB_BERT_ERRCOUNT_L 0xf4b600ff
/* BERT_3 */
#define R367CAB_BERT_3 0xf4b7
#define F367CAB_BERT_ERRCOUNT_H 0xf4b700ff
/* OUTFORMAT_0 */
#define R367CAB_OUTFORMAT_0 0xf4b8
#define F367CAB_CLK_POLARITY 0xf4b80080
#define F367CAB_FEC_TYPE 0xf4b80040
#define F367CAB_SYNC_STRIP 0xf4b80008
#define F367CAB_TS_SWAP 0xf4b80004
#define F367CAB_OUTFORMAT 0xf4b80003
/* OUTFORMAT_1 */
#define R367CAB_OUTFORMAT_1 0xf4b9
#define F367CAB_CI_DIVRANGE 0xf4b900ff
/* SMOOTHER_2 */
#define R367CAB_SMOOTHER_2 0xf4be
#define F367CAB_FIFO_BYPASS 0xf4be0020
/* TSMF_CTRL_0 */
#define R367CAB_TSMF_CTRL_0 0xf4c0
#define F367CAB_TS_NUMBER 0xf4c0001e
#define F367CAB_SEL_MODE 0xf4c00001
/* TSMF_CTRL_1 */
#define R367CAB_TSMF_CTRL_1 0xf4c1
#define F367CAB_CHECK_ERROR_BIT 0xf4c10080
#define F367CAB_CHCK_F_SYNC 0xf4c10040
#define F367CAB_H_MODE 0xf4c10008
#define F367CAB_D_V_MODE 0xf4c10004
#define F367CAB_MODE 0xf4c10003
/* TSMF_CTRL_3 */
#define R367CAB_TSMF_CTRL_3 0xf4c3
#define F367CAB_SYNC_IN_COUNT 0xf4c300f0
#define F367CAB_SYNC_OUT_COUNT 0xf4c3000f
/* TS_ON_ID_0 */
#define R367CAB_TS_ON_ID_0 0xf4c4
#define F367CAB_TS_ID_L 0xf4c400ff
/* TS_ON_ID_1 */
#define R367CAB_TS_ON_ID_1 0xf4c5
#define F367CAB_TS_ID_H 0xf4c500ff
/* TS_ON_ID_2 */
#define R367CAB_TS_ON_ID_2 0xf4c6
#define F367CAB_ON_ID_L 0xf4c600ff
/* TS_ON_ID_3 */
#define R367CAB_TS_ON_ID_3 0xf4c7
#define F367CAB_ON_ID_H 0xf4c700ff
/* RE_STATUS_0 */
#define R367CAB_RE_STATUS_0 0xf4c8
#define F367CAB_RECEIVE_STATUS_L 0xf4c800ff
/* RE_STATUS_1 */
#define R367CAB_RE_STATUS_1 0xf4c9
#define F367CAB_RECEIVE_STATUS_LH 0xf4c900ff
/* RE_STATUS_2 */
#define R367CAB_RE_STATUS_2 0xf4ca
#define F367CAB_RECEIVE_STATUS_HL 0xf4ca00ff
/* RE_STATUS_3 */
#define R367CAB_RE_STATUS_3 0xf4cb
#define F367CAB_RECEIVE_STATUS_HH 0xf4cb003f
/* TS_STATUS_0 */
#define R367CAB_TS_STATUS_0 0xf4cc
#define F367CAB_TS_STATUS_L 0xf4cc00ff
/* TS_STATUS_1 */
#define R367CAB_TS_STATUS_1 0xf4cd
#define F367CAB_TS_STATUS_H 0xf4cd007f
/* TS_STATUS_2 */
#define R367CAB_TS_STATUS_2 0xf4ce
#define F367CAB_ERROR 0xf4ce0080
#define F367CAB_EMERGENCY 0xf4ce0040
#define F367CAB_CRE_TS 0xf4ce0030
#define F367CAB_VER 0xf4ce000e
#define F367CAB_M_LOCK 0xf4ce0001
/* TS_STATUS_3 */
#define R367CAB_TS_STATUS_3 0xf4cf
#define F367CAB_UPDATE_READY 0xf4cf0080
#define F367CAB_END_FRAME_HEADER 0xf4cf0040
#define F367CAB_CONTCNT 0xf4cf0020
#define F367CAB_TS_IDENTIFIER_SEL 0xf4cf000f
/* T_O_ID_0 */
#define R367CAB_T_O_ID_0 0xf4d0
#define F367CAB_ON_ID_I_L 0xf4d000ff
/* T_O_ID_1 */
#define R367CAB_T_O_ID_1 0xf4d1
#define F367CAB_ON_ID_I_H 0xf4d100ff
/* T_O_ID_2 */
#define R367CAB_T_O_ID_2 0xf4d2
#define F367CAB_TS_ID_I_L 0xf4d200ff
/* T_O_ID_3 */
#define R367CAB_T_O_ID_3 0xf4d3
#define F367CAB_TS_ID_I_H 0xf4d300ff
#define STV0367CAB_NBREGS 187
#endif
| {
"pile_set_name": "Github"
} |
# SPDX-License-Identifier: GPL-2.0
#
# Generic HWSPINLOCK framework
#
menuconfig HWSPINLOCK
bool "Hardware Spinlock drivers"
config HWSPINLOCK_OMAP
tristate "OMAP Hardware Spinlock device"
depends on HWSPINLOCK
depends on ARCH_OMAP4 || SOC_OMAP5 || SOC_DRA7XX || SOC_AM33XX || SOC_AM43XX || ARCH_K3 || COMPILE_TEST
help
Say y here to support the OMAP Hardware Spinlock device (firstly
introduced in OMAP4).
If unsure, say N.
config HWSPINLOCK_QCOM
tristate "Qualcomm Hardware Spinlock device"
depends on HWSPINLOCK
depends on ARCH_QCOM || COMPILE_TEST
select MFD_SYSCON
help
Say y here to support the Qualcomm Hardware Mutex functionality, which
provides a synchronisation mechanism for the various processors on
the SoC.
If unsure, say N.
config HWSPINLOCK_SIRF
tristate "SIRF Hardware Spinlock device"
depends on HWSPINLOCK
depends on ARCH_SIRF || COMPILE_TEST
help
Say y here to support the SIRF Hardware Spinlock device, which
provides a synchronisation mechanism for the various processors
on the SoC.
It's safe to say n here if you're not interested in SIRF hardware
spinlock or just want a bare minimum kernel.
config HWSPINLOCK_SPRD
tristate "SPRD Hardware Spinlock device"
depends on ARCH_SPRD || COMPILE_TEST
depends on HWSPINLOCK
help
Say y here to support the SPRD Hardware Spinlock device.
If unsure, say N.
config HWSPINLOCK_STM32
tristate "STM32 Hardware Spinlock device"
depends on MACH_STM32MP157 || COMPILE_TEST
depends on HWSPINLOCK
help
Say y here to support the STM32 Hardware Spinlock device.
If unsure, say N.
config HSEM_U8500
tristate "STE Hardware Semaphore functionality"
depends on HWSPINLOCK
depends on ARCH_U8500 || COMPILE_TEST
help
Say y here to support the STE Hardware Semaphore functionality, which
provides a synchronisation mechanism for the various processor on the
SoC.
If unsure, say N.
| {
"pile_set_name": "Github"
} |
# AccessiWeb 2.2 - Rule 10.15.1
## Summary
No-check rule
## Business description
Criterion : 10.15
Test : [10.15.1](http://www.accessiweb.org/index.php/accessiweb-22-english-version.html#test-10-15-1)
Test description :
On each Web page, for each text or set of text, information must not be
provided by its shape or location alone. Does this rule have been
implemented in a relevant way?
Level : Bronze
## Technical description
Scope : page
Decision level :
semidecidable
## Algorithm
### Selection
None
### Process
None
### Analysis
##### Not Tested
In all cases
## Notes
| {
"pile_set_name": "Github"
} |
import Utils from '../utils/utils';
import Mixins from '../utils/mixins';
import F7PageContent from './page-content';
import __vueComponentSetState from '../runtime-helpers/vue-component-set-state.js';
import __vueComponentDispatchEvent from '../runtime-helpers/vue-component-dispatch-event.js';
import __vueComponentProps from '../runtime-helpers/vue-component-props.js';
export default {
name: 'f7-page',
props: Object.assign({
id: [String, Number],
name: String,
stacked: Boolean,
withSubnavbar: {
type: Boolean,
default: undefined
},
subnavbar: {
type: Boolean,
default: undefined
},
withNavbarLarge: {
type: Boolean,
default: undefined
},
navbarLarge: {
type: Boolean,
default: undefined
},
noNavbar: Boolean,
noToolbar: Boolean,
tabs: Boolean,
pageContent: {
type: Boolean,
default: true
},
noSwipeback: Boolean,
ptr: Boolean,
ptrDistance: Number,
ptrPreloader: {
type: Boolean,
default: true
},
ptrBottom: Boolean,
ptrMousewheel: Boolean,
infinite: Boolean,
infiniteTop: Boolean,
infiniteDistance: Number,
infinitePreloader: {
type: Boolean,
default: true
},
hideBarsOnScroll: Boolean,
hideNavbarOnScroll: Boolean,
hideToolbarOnScroll: Boolean,
messagesContent: Boolean,
loginScreen: Boolean
}, Mixins.colorProps),
data() {
const props = __vueComponentProps(this);
const state = (() => {
return {
hasSubnavbar: false,
hasNavbarLarge: false,
hasNavbarLargeCollapsed: false,
hasCardExpandableOpened: false,
routerPositionClass: '',
routerForceUnstack: false,
routerPageRole: null,
routerPageRoleDetailRoot: false,
routerPageMasterStack: false
};
})();
return {
state
};
},
render() {
const _h = this.$createElement;
const self = this;
const props = self.props;
const {
id,
style,
name,
pageContent,
messagesContent,
ptr,
ptrDistance,
ptrPreloader,
ptrBottom,
ptrMousewheel,
infinite,
infiniteDistance,
infinitePreloader,
infiniteTop,
hideBarsOnScroll,
hideNavbarOnScroll,
hideToolbarOnScroll,
loginScreen,
className,
stacked,
tabs,
subnavbar,
withSubnavbar,
navbarLarge,
withNavbarLarge,
noNavbar,
noToolbar,
noSwipeback
} = props;
const fixedList = [];
const staticList = [];
const {
static: slotsStatic,
fixed: slotsFixed,
default: slotsDefault
} = self.$slots;
let fixedTags;
fixedTags = 'navbar toolbar tabbar subnavbar searchbar messagebar fab list-index'.split(' ');
let hasSubnavbar;
let hasMessages;
let hasNavbarLarge;
hasMessages = self.$options.propsData.messagesContent;
if (slotsDefault) {
slotsDefault.forEach(child => {
if (typeof child === 'undefined') return;
let isFixedTag = false;
{
const tag = child.tag;
if (!tag) {
if (pageContent) staticList.push(child);
return;
}
if (tag.indexOf('subnavbar') >= 0) hasSubnavbar = true;
if (tag.indexOf('navbar') >= 0) {
if (child.componentOptions && child.componentOptions.propsData && 'large' in child.componentOptions.propsData && (child.componentOptions.propsData.large || child.componentOptions.propsData.large === '')) {
hasNavbarLarge = true;
}
}
if (typeof hasMessages === 'undefined' && tag.indexOf('messages') >= 0) hasMessages = true;
for (let j = 0; j < fixedTags.length; j += 1) {
if (tag.indexOf(fixedTags[j]) >= 0) {
isFixedTag = true;
}
}
}
if (pageContent) {
if (isFixedTag) fixedList.push(child);else staticList.push(child);
}
});
}
const forceSubnavbar = typeof subnavbar === 'undefined' && typeof withSubnavbar === 'undefined' ? hasSubnavbar || this.state.hasSubnavbar : false;
const forceNavbarLarge = typeof navbarLarge === 'undefined' && typeof withNavbarLarge === 'undefined' ? hasNavbarLarge || this.state.hasNavbarLarge : false;
const classes = Utils.classNames(className, 'page', this.state.routerPositionClass, {
stacked: stacked && !this.state.routerForceUnstack,
tabs,
'page-with-subnavbar': subnavbar || withSubnavbar || forceSubnavbar,
'page-with-navbar-large': navbarLarge || withNavbarLarge || forceNavbarLarge,
'no-navbar': noNavbar,
'no-toolbar': noToolbar,
'no-swipeback': noSwipeback,
'page-master': this.state.routerPageRole === 'master',
'page-master-detail': this.state.routerPageRole === 'detail',
'page-master-detail-root': this.state.routerPageRoleDetailRoot === true,
'page-master-stacked': this.state.routerPageMasterStack === true,
'page-with-navbar-large-collapsed': this.state.hasNavbarLargeCollapsed === true,
'page-with-card-opened': this.state.hasCardExpandableOpened === true,
'login-screen-page': loginScreen
}, Mixins.colorClasses(props));
if (!pageContent) {
return _h('div', {
ref: 'el',
style: style,
class: classes,
attrs: {
id: id,
'data-name': name
}
}, [slotsFixed, slotsStatic, slotsDefault]);
}
const pageContentEl = _h(F7PageContent, {
on: {
ptrPullStart: self.onPtrPullStart,
ptrPullMove: self.onPtrPullMove,
ptrPullEnd: self.onPtrPullEnd,
ptrRefresh: self.onPtrRefresh,
ptrDone: self.onPtrDone,
infinite: self.onInfinite
},
attrs: {
ptr: ptr,
ptrDistance: ptrDistance,
ptrPreloader: ptrPreloader,
ptrBottom: ptrBottom,
ptrMousewheel: ptrMousewheel,
infinite: infinite,
infiniteTop: infiniteTop,
infiniteDistance: infiniteDistance,
infinitePreloader: infinitePreloader,
hideBarsOnScroll: hideBarsOnScroll,
hideNavbarOnScroll: hideNavbarOnScroll,
hideToolbarOnScroll: hideToolbarOnScroll,
messagesContent: messagesContent || hasMessages,
loginScreen: loginScreen
}
}, [slotsStatic, staticList]);
return _h('div', {
ref: 'el',
style: style,
class: classes,
attrs: {
id: id,
'data-name': name
}
}, [fixedList, slotsFixed, pageContentEl]);
},
created() {
Utils.bindMethods(this, ['onPtrPullStart', 'onPtrPullMove', 'onPtrPullEnd', 'onPtrRefresh', 'onPtrDone', 'onInfinite', 'onPageMounted', 'onPageInit', 'onPageReinit', 'onPageBeforeIn', 'onPageBeforeOut', 'onPageAfterOut', 'onPageAfterIn', 'onPageBeforeRemove', 'onPageBeforeUnmount', 'onPageStack', 'onPageUnstack', 'onPagePosition', 'onPageRole', 'onPageMasterStack', 'onPageMasterUnstack', 'onPageNavbarLargeCollapsed', 'onPageNavbarLargeExpanded', 'onCardOpened', 'onCardClose', 'onPageTabShow', 'onPageTabHide']);
},
mounted() {
const self = this;
const el = self.$refs.el;
self.$f7ready(f7 => {
self.eventTargetEl = el;
f7.on('pageMounted', self.onPageMounted);
f7.on('pageInit', self.onPageInit);
f7.on('pageReinit', self.onPageReinit);
f7.on('pageBeforeIn', self.onPageBeforeIn);
f7.on('pageBeforeOut', self.onPageBeforeOut);
f7.on('pageAfterOut', self.onPageAfterOut);
f7.on('pageAfterIn', self.onPageAfterIn);
f7.on('pageBeforeRemove', self.onPageBeforeRemove);
f7.on('pageBeforeUnmount', self.onPageBeforeUnmount);
f7.on('pageStack', self.onPageStack);
f7.on('pageUnstack', self.onPageUnstack);
f7.on('pagePosition', self.onPagePosition);
f7.on('pageRole', self.onPageRole);
f7.on('pageMasterStack', self.onPageMasterStack);
f7.on('pageMasterUnstack', self.onPageMasterUnstack);
f7.on('pageNavbarLargeCollapsed', self.onPageNavbarLargeCollapsed);
f7.on('pageNavbarLargeExpanded', self.onPageNavbarLargeExpanded);
f7.on('cardOpened', self.onCardOpened);
f7.on('cardClose', self.onCardClose);
f7.on('pageTabShow', self.onPageTabShow);
f7.on('pageTabHide', self.onPageTabHide);
});
},
beforeDestroy() {
const self = this;
if (!self.$f7) return;
const f7 = self.$f7;
f7.off('pageMounted', self.onPageMounted);
f7.off('pageInit', self.onPageInit);
f7.off('pageReinit', self.onPageReinit);
f7.off('pageBeforeIn', self.onPageBeforeIn);
f7.off('pageBeforeOut', self.onPageBeforeOut);
f7.off('pageAfterOut', self.onPageAfterOut);
f7.off('pageAfterIn', self.onPageAfterIn);
f7.off('pageBeforeRemove', self.onPageBeforeRemove);
f7.off('pageBeforeUnmount', self.onPageBeforeUnmount);
f7.off('pageStack', self.onPageStack);
f7.off('pageUnstack', self.onPageUnstack);
f7.off('pagePosition', self.onPagePosition);
f7.off('pageRole', self.onPageRole);
f7.off('pageMasterStack', self.onPageMasterStack);
f7.off('pageMasterUnstack', self.onPageMasterUnstack);
f7.off('pageNavbarLargeCollapsed', self.onPageNavbarLargeCollapsed);
f7.off('pageNavbarLargeExpanded', self.onPageNavbarLargeExpanded);
f7.off('cardOpened', self.onCardOpened);
f7.off('cardClose', self.onCardClose);
f7.off('pageTabShow', self.onPageTabShow);
f7.off('pageTabHide', self.onPageTabHide);
self.eventTargetEl = null;
delete self.eventTargetEl;
},
methods: {
onPtrPullStart(...args) {
this.dispatchEvent('ptr:pullstart ptrPullStart', ...args);
},
onPtrPullMove(...args) {
this.dispatchEvent('ptr:pullmove ptrPullMove', ...args);
},
onPtrPullEnd(...args) {
this.dispatchEvent('ptr:pullend ptrPullEnd', ...args);
},
onPtrRefresh(...args) {
this.dispatchEvent('ptr:refresh ptrRefresh', ...args);
},
onPtrDone(...args) {
this.dispatchEvent('ptr:done ptrDone', ...args);
},
onInfinite(...args) {
this.dispatchEvent('infinite', ...args);
},
onPageMounted(page) {
if (this.eventTargetEl !== page.el) return;
this.dispatchEvent('page:mounted pageMounted', page);
},
onPageInit(page) {
if (this.eventTargetEl !== page.el) return;
const {
withSubnavbar,
subnavbar,
withNavbarLarge,
navbarLarge
} = this.props;
if (typeof withSubnavbar === 'undefined' && typeof subnavbar === 'undefined') {
if (page.$navbarEl && page.$navbarEl.length && page.$navbarEl.find('.subnavbar').length || page.$el.children('.navbar').find('.subnavbar').length) {
this.setState({
hasSubnavbar: true
});
}
}
if (typeof withNavbarLarge === 'undefined' && typeof navbarLarge === 'undefined') {
if (page.$navbarEl && page.$navbarEl.hasClass('navbar-large')) {
this.setState({
hasNavbarLarge: true
});
}
}
this.dispatchEvent('page:init pageInit', page);
},
onPageReinit(page) {
if (this.eventTargetEl !== page.el) return;
this.dispatchEvent('page:reinit pageReinit', page);
},
onPageBeforeIn(page) {
if (this.eventTargetEl !== page.el) return;
if (!page.swipeBack) {
if (page.from === 'next') {
this.setState({
routerPositionClass: 'page-next'
});
}
if (page.from === 'previous') {
this.setState({
routerPositionClass: 'page-previous'
});
}
}
this.dispatchEvent('page:beforein pageBeforeIn', page);
},
onPageBeforeOut(page) {
if (this.eventTargetEl !== page.el) return;
this.dispatchEvent('page:beforeout pageBeforeOut', page);
},
onPageAfterOut(page) {
if (this.eventTargetEl !== page.el) return;
if (page.to === 'next') {
this.setState({
routerPositionClass: 'page-next'
});
}
if (page.to === 'previous') {
this.setState({
routerPositionClass: 'page-previous'
});
}
this.dispatchEvent('page:afterout pageAfterOut', page);
},
onPageAfterIn(page) {
if (this.eventTargetEl !== page.el) return;
this.setState({
routerPositionClass: 'page-current'
});
this.dispatchEvent('page:afterin pageAfterIn', page);
},
onPageBeforeRemove(page) {
if (this.eventTargetEl !== page.el) return;
this.dispatchEvent('page:beforeremove pageBeforeRemove', page);
},
onPageBeforeUnmount(page) {
if (this.eventTargetEl !== page.el) return;
this.dispatchEvent('page:beforeunmount pageBeforeUnmount', page);
},
onPageStack(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerForceUnstack: false
});
},
onPageUnstack(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerForceUnstack: true
});
},
onPagePosition(pageEl, position) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerPositionClass: `page-${position}`
});
},
onPageRole(pageEl, rolesData) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerPageRole: rolesData.role,
routerPageRoleDetailRoot: rolesData.detailRoot
});
},
onPageMasterStack(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerPageMasterStack: true
});
},
onPageMasterUnstack(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
routerPageMasterStack: false
});
},
onPageNavbarLargeCollapsed(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
hasNavbarLargeCollapsed: true
});
},
onPageNavbarLargeExpanded(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
hasNavbarLargeCollapsed: false
});
},
onCardOpened(cardEl, pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
hasCardExpandableOpened: true
});
},
onCardClose(cardEl, pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.setState({
hasCardExpandableOpened: false
});
},
onPageTabShow(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.dispatchEvent('page:tabshow pageTabShow');
},
onPageTabHide(pageEl) {
if (this.eventTargetEl !== pageEl) return;
this.dispatchEvent('page:tabhide pageTabHide');
},
dispatchEvent(events, ...args) {
__vueComponentDispatchEvent(this, events, ...args);
},
setState(updater, callback) {
__vueComponentSetState(this, updater, callback);
}
},
computed: {
props() {
return __vueComponentProps(this);
}
}
}; | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="mod_rss"
ProjectGUID="{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
RootNamespace="mod_rss"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\mod_rss.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
| {
"pile_set_name": "Github"
} |
/**
* This file is copyright 2017 State of the Netherlands (Ministry of Interior Affairs and Kingdom Relations).
* It is made available under the terms of the GNU Affero General Public License, version 3 as published by the Free Software Foundation.
* The project of which this file is part, may be found at https://github.com/MinBZK/operatieBRP.
*/
package nl.bzk.brp.preview.model;
/**
* De Class BerichtKenmerken.
*/
public class BerichtKenmerken {
/** De verzendende partij. */
private Gemeente verzendendePartij;
/** De burger zaken module naam. */
private String burgerZakenModuleNaam;
/** De is prevalidatie. */
private boolean isPrevalidatie;
/**
* Instantieert een nieuwe bericht kenmerken.
*/
public BerichtKenmerken() {
}
/**
* Instantieert een nieuwe bericht kenmerken.
*
* @param verzendendePartij de verzendende partij
* @param burgerZakenModuleNaam de burger zaken module naam
*/
public BerichtKenmerken(final Gemeente verzendendePartij, final String burgerZakenModuleNaam) {
this.verzendendePartij = verzendendePartij;
this.burgerZakenModuleNaam = burgerZakenModuleNaam;
}
/**
* Haalt een verzendende partij op.
*
* @return verzendende partij
*/
public Gemeente getVerzendendePartij() {
return verzendendePartij;
}
/**
* Instellen van verzendende partij.
*
* @param verzendendePartij de nieuwe verzendende partij
*/
public void setVerzendendePartij(final Gemeente verzendendePartij) {
this.verzendendePartij = verzendendePartij;
}
/**
* Haalt een burger zaken module naam op.
*
* @return burger zaken module naam
*/
public String getBurgerZakenModuleNaam() {
return burgerZakenModuleNaam;
}
/**
* Instellen van burger zaken module naam.
*
* @param burgerZakenModuleNaam de nieuwe burger zaken module naam
*/
public void setBurgerZakenModuleNaam(final String burgerZakenModuleNaam) {
this.burgerZakenModuleNaam = burgerZakenModuleNaam;
}
/**
* Controleert of de waarde gelijk is aan prevalidatie.
*
* @return true, als waarde gelijk is aan prevalidatie
*/
public boolean isPrevalidatie() {
return isPrevalidatie;
}
/**
* Instellen van prevalidatie.
*
* @param isPrevalidatieParam de nieuwe prevalidatie
*/
public void setPrevalidatie(final boolean isPrevalidatieParam) {
isPrevalidatie = isPrevalidatieParam;
}
}
| {
"pile_set_name": "Github"
} |
# coding=utf-8
"""Provider code for TorrentLeech."""
from __future__ import division, unicode_literals
import logging
import math
from medusa import tv
from medusa.helper.common import convert_size
from medusa.logger.adapters.style import BraceAdapter
from medusa.providers.torrent.torrent_provider import TorrentProvider
from requests.compat import urljoin
from requests.utils import dict_from_cookiejar
from six.moves import range
log = BraceAdapter(logging.getLogger(__name__))
log.logger.addHandler(logging.NullHandler())
class TorrentLeechProvider(TorrentProvider):
"""TorrentLeech Torrent provider."""
def __init__(self):
"""Initialize the class."""
super(TorrentLeechProvider, self).__init__('TorrentLeech')
# Credentials
self.username = None
self.password = None
# URLs
self.url = 'https://www.torrentleech.org'
self.urls = {
'login': urljoin(self.url, 'user/account/login'),
'search': urljoin(self.url, 'torrents/browse/list/'),
'download': urljoin(self.url, 'download/{id}/{file}'),
'details': urljoin(self.url, 'torrent/{id}'),
}
# Proper Strings
self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']
# Miscellaneous Options
self.max_torrents = 100
# Cache
self.cache = tv.Cache(self)
def search(self, search_strings, age=0, ep_obj=None, **kwargs):
"""
Search a provider and parse the results.
:param search_strings: A dict with mode (key) and the search value (value)
:param age: Not used
:param ep_obj: Not used
:returns: A list of search results (structure)
"""
results = []
if not self.login():
return results
# Categories:
# TV
# 26: Episodes
# 27: BoxSets
# 32: Episodes HD
# Animation
# 34: Anime
# 35: Cartoons
# Foreign
# 44: Foreign
for mode in search_strings:
log.debug('Search mode: {0}', mode)
# Configured for: mode == 'RSS'
search_params = {
'categories': ['26', '27', '32', '34', '35', '44'],
'query': '',
'orderby': 'added',
'order': 'desc',
}
for search_string in search_strings[mode]:
if mode != 'RSS':
log.debug('Search string: {search}',
{'search': search_string})
search_params['categories'] = ['35']
search_params['categories'] += ['26', '32', '44'] if mode == 'Episode' else ['27']
if self.series and self.series.is_anime:
search_params['categories'] += ['34']
search_params['query'] = search_string
search_params['orderby'] = 'seeders'
fragments = 'categories/{categories}/'
if search_params['query']:
fragments += 'query/{query}/'
fragments += 'orderby/{orderby}/order/{order}/'
path_params = fragments.format(
categories=','.join(search_params['categories']),
query=search_params['query'],
orderby=search_params['orderby'],
order=search_params['order']
)
search_url = urljoin(self.urls['search'], path_params)
data = self.session.get_json(search_url)
if not data:
log.debug('No data returned from provider')
continue
results += self.parse(data, mode)
# Handle pagination
results += self._pagination(data, mode, search_url)
return results
def parse(self, data, mode):
"""
Parse search results for items.
:param data: The raw response from a search
:param mode: The current mode used to search, e.g. RSS
:return: A list of items found
"""
items = []
torrents = data['torrentList']
user_timezone = data.get('userTimeZone', 'UTC')
# Continue only if at least one release is found
if not torrents:
log.debug('Data returned from provider does not contain any torrents')
return items
for torrent in torrents:
try:
title = torrent['name']
download_url = self.urls['download'].format(id=torrent['fid'], file=torrent['filename'])
seeders = int(torrent['seeders'])
leechers = int(torrent['leechers'])
# Filter unseeded torrent
if seeders < self.minseed:
if mode != 'RSS':
log.debug("Discarding torrent because it doesn't meet the"
' minimum seeders: {0}. Seeders: {1}',
title, seeders)
continue
size = convert_size(torrent['size']) or -1
pubdate_raw = torrent['addedTimestamp']
pubdate = self.parse_pubdate(pubdate_raw, timezone=user_timezone)
item = {
'title': title,
'link': download_url,
'size': size,
'seeders': seeders,
'leechers': leechers,
'pubdate': pubdate,
}
if mode != 'RSS':
log.debug('Found result: {0} with {1} seeders and {2} leechers',
title, seeders, leechers)
items.append(item)
except (AttributeError, TypeError, KeyError, ValueError, IndexError):
log.exception('Failed parsing provider.')
return items
def login(self):
"""Login method used for logging in before doing search and torrent downloads."""
cookies = dict_from_cookiejar(self.session.cookies)
if any(cookies.values()) and cookies.get('member_id'):
return True
login_params = {
'username': self.username,
'password': self.password,
'login': 'submit',
'remember_me': 'on',
}
response = self.session.post(self.urls['login'], data=login_params)
if not response or not response.text:
log.warning('Unable to connect to provider')
return False
if '<title>Login :: TorrentLeech.org</title>' in response.text:
log.warning('Invalid username or password. Check your settings')
return False
return True
def _pagination(self, data, mode, search_url):
"""If needed, query the next page(s) of results, parse them and return."""
results = []
num_found = data.get('numFound', 0)
per_page = data.get('perPage', 35)
if per_page < 100 and num_found > per_page:
log.warning('It is recommended to change "Default Results Per Page" to 100'
' in your profile options on {name}.', {'name': self.name})
try:
pages = int(math.ceil(self.max_torrents / per_page))
except ZeroDivisionError:
pages = 1
if num_found and num_found > per_page and pages > 1:
log.debug('Total results found: {total}, getting {pages} more page{s} of results', {
'total': num_found,
'pages': pages - 1,
's': ('', 's')[pages - 1 > 1]
})
for page in range(2, pages + 1):
page_url = urljoin(search_url, 'page/{page}/'.format(page=page))
data = self.session.get_json(page_url)
if not data:
log.debug('Page {0} returned no data from provider,'
' not getting more pages.', page)
break
log.debug('Parsing page {0} of results', page)
results += self.parse(data, mode)
return results
provider = TorrentLeechProvider()
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2009 Carnegie Mellon University.
* 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.
*
* For more about this software visit:
*
* http://www.graphlab.ml.cmu.edu
*
*/
#include <cxxtest/TestSuite.h>
#include <util/dense_bitset.hpp>
#include <graphlab/macros_def.hpp>
using namespace graphlab;
class DenseBitsetTestSuite : public CxxTest::TestSuite {
public:
void test_densebitset(void) {
dense_bitset d;
d.resize(100);
d.clear();
size_t probelocations[7] = {0, 10, 12, 50, 66, 81, 99};
// test setting
for (size_t i= 0;i < 7; ++i) {
d.set_bit(probelocations[i]);
}
for (size_t i = 0;i< 100; ++i) {
bool inprobe=false;
for (size_t j = 0;j <7; ++j) inprobe |= (probelocations[j] == i);
TS_ASSERT_EQUALS(d.get(i), inprobe);
}
// test iteration
size_t iter = (size_t)(-1);
TS_ASSERT_EQUALS(d.first_bit(iter), true)
for (size_t i= 0;i < 7; ++i) {
TS_ASSERT_EQUALS(iter, probelocations[i]);
bool ret = d.next_bit(iter);
TS_ASSERT_EQUALS(ret, i < 6);
}
d.invert();
// test zero iteration
iter = (size_t)(-1);
TS_ASSERT_EQUALS(d.first_zero_bit(iter), true)
for (size_t i= 0;i < 7; ++i) {
TS_ASSERT_EQUALS(iter, probelocations[i]);
bool ret = d.next_zero_bit(iter);
TS_ASSERT_EQUALS(ret, i < 6);
}
d.invert();
size_t ctr = 0;
foreach(iter, d) {
TS_ASSERT(ctr < 7);
TS_ASSERT_EQUALS(iter, probelocations[ctr]);
++ctr;
}
std::stringstream strm;
graphlab::oarchive oarc(strm);
oarc << d;
strm.flush();
graphlab::iarchive iarc(strm);
dense_bitset d2;
iarc >> d2;
for (size_t i = 0;i< 100; ++i) {
bool inprobe=false;
for (size_t j = 0;j <7; ++j) inprobe |= (probelocations[j] == i);
TS_ASSERT_EQUALS(d2.get(i), inprobe);
}
// testclearing
for (size_t i= 0;i < 7; ++i) {
d.clear_bit(probelocations[i]);
}
for (size_t i = 0;i< 100; ++i) {
TS_ASSERT_EQUALS(d.get(i), false);
}
d.fill();
TS_ASSERT_EQUALS(d.popcount(), d.size());
d.invert();
TS_ASSERT_EQUALS(d.popcount(), 0);
d.invert();
TS_ASSERT_EQUALS(d.popcount(), d.size());
d2.fill();
TS_ASSERT_EQUALS(d2.popcount(), d2.size());
}
void test_fixeddensebitset(void) {
fixed_dense_bitset<100> d;
size_t probelocations[7] = {0, 10, 12, 50, 66, 81, 99};
// test setting
for (size_t i= 0;i < 7; ++i) {
d.set_bit(probelocations[i]);
}
for (size_t i = 0;i< 100; ++i) {
bool inprobe=false;
for (size_t j = 0;j <7; ++j) inprobe |= (probelocations[j] == i);
TS_ASSERT_EQUALS(d.get(i), inprobe);
}
// test iteration
size_t iter = (size_t)(-1);
TS_ASSERT_EQUALS(d.first_bit(iter), true)
for (size_t i= 0;i < 7; ++i) {
TS_ASSERT_EQUALS(iter, probelocations[i]);
bool ret = d.next_bit(iter);
TS_ASSERT_EQUALS(ret, i < 6);
}
size_t ctr = 0;
foreach(iter, d) {
TS_ASSERT(ctr < 7);
TS_ASSERT_EQUALS(iter, probelocations[ctr]);
++ctr;
}
std::stringstream strm;
graphlab::oarchive oarc(strm);
oarc << d;
strm.flush();
graphlab::iarchive iarc(strm);
fixed_dense_bitset<100> d2;
iarc >> d2;
for (size_t i = 0;i< 100; ++i) {
bool inprobe=false;
for (size_t j = 0;j <7; ++j) inprobe |= (probelocations[j] == i);
TS_ASSERT_EQUALS(d2.get(i), inprobe);
}
// testclearing
for (size_t i= 0;i < 7; ++i) {
d.clear_bit(probelocations[i]);
}
for (size_t i = 0;i< 100; ++i) {
TS_ASSERT_EQUALS(d.get(i), false);
}
d.fill();
TS_ASSERT_EQUALS(d.popcount(), d.size());
d2.fill();
TS_ASSERT_EQUALS(d2.popcount(), d2.size());
}
};
| {
"pile_set_name": "Github"
} |
#N canvas 0 31 491 429 10;
#X obj 160 25 inlet;
#X obj 160 47 int;
#X obj 203 192 select 123 125;
#X obj 160 70 moses 0;
#X obj 295 233 outlet;
#X obj 295 212 makefilename %c;
#X msg 126 273 ASCII character \$1 is not allowed in Pd!!;
#X msg 125 243 123;
#X msg 155 243 125;
#X obj 42 334 purepd/purepd_error float2ascii;
#X obj 203 95 moses 128;
#X msg 7 161 \$1 outside of ASCII range (0-127);
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 7 0;
#X connect 2 1 8 0;
#X connect 2 2 5 0;
#X connect 3 0 11 0;
#X connect 3 1 10 0;
#X connect 5 0 4 0;
#X connect 6 0 9 0;
#X connect 7 0 6 0;
#X connect 8 0 6 0;
#X connect 10 0 2 0;
#X connect 10 1 11 0;
#X connect 11 0 9 0;
| {
"pile_set_name": "Github"
} |
# Copyright 2016 The TensorFlow Authors. 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.
# ==============================================================================
"""Contains definitions for the preactivation form of Residual Networks.
Residual networks (ResNets) were originally proposed in:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
The full preactivation 'v2' ResNet variant implemented in this module was
introduced by:
[2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Identity Mappings in Deep Residual Networks. arXiv: 1603.05027
The key difference of the full preactivation 'v2' variant compared to the
'v1' variant in [1] is the use of batch normalization before every weight layer.
Typical use:
from tensorflow.contrib.slim.nets import resnet_v2
ResNet-101 for image classification into 1000 classes:
# inputs has shape [batch, 224, 224, 3]
with slim.arg_scope(resnet_v2.resnet_arg_scope()):
net, end_points = resnet_v2.resnet_v2_101(inputs, 1000, is_training=False)
ResNet-101 for semantic segmentation into 21 classes:
# inputs has shape [batch, 513, 513, 3]
with slim.arg_scope(resnet_v2.resnet_arg_scope()):
net, end_points = resnet_v2.resnet_v2_101(inputs,
21,
is_training=False,
global_pool=False,
output_stride=16)
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from nets import resnet_utils
slim = tf.contrib.slim
resnet_arg_scope = resnet_utils.resnet_arg_scope
@slim.add_arg_scope
def bottleneck(inputs, depth, depth_bottleneck, stride, rate=1,
outputs_collections=None, scope=None):
"""Bottleneck residual unit variant with BN before convolutions.
This is the full preactivation residual unit variant proposed in [2]. See
Fig. 1(b) of [2] for its definition. Note that we use here the bottleneck
variant which has an extra bottleneck layer.
When putting together two consecutive ResNet blocks that use this unit, one
should use stride = 2 in the last unit of the first block.
Args:
inputs: A tensor of size [batch, height, width, channels].
depth: The depth of the ResNet unit output.
depth_bottleneck: The depth of the bottleneck layers.
stride: The ResNet unit's stride. Determines the amount of downsampling of
the units output compared to its input.
rate: An integer, rate for atrous convolution.
outputs_collections: Collection to add the ResNet unit output.
scope: Optional variable_scope.
Returns:
The ResNet unit's output.
"""
with tf.variable_scope(scope, 'bottleneck_v2', [inputs]) as sc:
depth_in = slim.utils.last_dimension(inputs.get_shape(), min_rank=4)
preact = slim.batch_norm(inputs, activation_fn=tf.nn.relu, scope='preact')
if depth == depth_in:
shortcut = resnet_utils.subsample(inputs, stride, 'shortcut')
else:
shortcut = slim.conv2d(preact, depth, [1, 1], stride=stride,
normalizer_fn=None, activation_fn=None,
scope='shortcut')
residual = slim.conv2d(preact, depth_bottleneck, [1, 1], stride=1,
scope='conv1')
residual = resnet_utils.conv2d_same(residual, depth_bottleneck, 3, stride,
rate=rate, scope='conv2')
residual = slim.conv2d(residual, depth, [1, 1], stride=1,
normalizer_fn=None, activation_fn=None,
scope='conv3')
output = shortcut + residual
return slim.utils.collect_named_outputs(outputs_collections,
sc.name,
output)
def resnet_v2(inputs,
blocks,
num_classes=None,
is_training=True,
global_pool=True,
output_stride=None,
include_root_block=True,
spatial_squeeze=True,
reuse=None,
scope=None):
"""Generator for v2 (preactivation) ResNet models.
This function generates a family of ResNet v2 models. See the resnet_v2_*()
methods for specific model instantiations, obtained by selecting different
block instantiations that produce ResNets of various depths.
Training for image classification on Imagenet is usually done with [224, 224]
inputs, resulting in [7, 7] feature maps at the output of the last ResNet
block for the ResNets defined in [1] that have nominal stride equal to 32.
However, for dense prediction tasks we advise that one uses inputs with
spatial dimensions that are multiples of 32 plus 1, e.g., [321, 321]. In
this case the feature maps at the ResNet output will have spatial shape
[(height - 1) / output_stride + 1, (width - 1) / output_stride + 1]
and corners exactly aligned with the input image corners, which greatly
facilitates alignment of the features to the image. Using as input [225, 225]
images results in [8, 8] feature maps at the output of the last ResNet block.
For dense prediction tasks, the ResNet needs to run in fully-convolutional
(FCN) mode and global_pool needs to be set to False. The ResNets in [1, 2] all
have nominal stride equal to 32 and a good choice in FCN mode is to use
output_stride=16 in order to increase the density of the computed features at
small computational and memory overhead, cf. http://arxiv.org/abs/1606.00915.
Args:
inputs: A tensor of size [batch, height_in, width_in, channels].
blocks: A list of length equal to the number of ResNet blocks. Each element
is a resnet_utils.Block object describing the units in the block.
num_classes: Number of predicted classes for classification tasks.
If 0 or None, we return the features before the logit layer.
is_training: whether batch_norm layers are in training mode.
global_pool: If True, we perform global average pooling before computing the
logits. Set to True for image classification, False for dense prediction.
output_stride: If None, then the output will be computed at the nominal
network stride. If output_stride is not None, it specifies the requested
ratio of input to output spatial resolution.
include_root_block: If True, include the initial convolution followed by
max-pooling, if False excludes it. If excluded, `inputs` should be the
results of an activation-less convolution.
spatial_squeeze: if True, logits is of shape [B, C], if false logits is
of shape [B, 1, 1, C], where B is batch_size and C is number of classes.
To use this parameter, the input images must be smaller than 300x300
pixels, in which case the output logit layer does not contain spatial
information and can be removed.
reuse: whether or not the network and its variables should be reused. To be
able to reuse 'scope' must be given.
scope: Optional variable_scope.
Returns:
net: A rank-4 tensor of size [batch, height_out, width_out, channels_out].
If global_pool is False, then height_out and width_out are reduced by a
factor of output_stride compared to the respective height_in and width_in,
else both height_out and width_out equal one. If num_classes is 0 or None,
then net is the output of the last ResNet block, potentially after global
average pooling. If num_classes is a non-zero integer, net contains the
pre-softmax activations.
end_points: A dictionary from components of the network to the corresponding
activation.
Raises:
ValueError: If the target output_stride is not valid.
"""
with tf.variable_scope(scope, 'resnet_v2', [inputs], reuse=reuse) as sc:
end_points_collection = sc.original_name_scope + '_end_points'
with slim.arg_scope([slim.conv2d, bottleneck,
resnet_utils.stack_blocks_dense],
outputs_collections=end_points_collection):
with slim.arg_scope([slim.batch_norm], is_training=is_training):
net = inputs
if include_root_block:
if output_stride is not None:
if output_stride % 4 != 0:
raise ValueError('The output_stride needs to be a multiple of 4.')
output_stride /= 4
# We do not include batch normalization or activation functions in
# conv1 because the first ResNet unit will perform these. Cf.
# Appendix of [2].
with slim.arg_scope([slim.conv2d],
activation_fn=None, normalizer_fn=None):
net = resnet_utils.conv2d_same(net, 64, 7, stride=2, scope='conv1')
net = slim.max_pool2d(net, [3, 3], stride=2, scope='pool1')
net = resnet_utils.stack_blocks_dense(net, blocks, output_stride)
# This is needed because the pre-activation variant does not have batch
# normalization or activation functions in the residual unit output. See
# Appendix of [2].
net = slim.batch_norm(net, activation_fn=tf.nn.relu, scope='postnorm')
# Convert end_points_collection into a dictionary of end_points.
end_points = slim.utils.convert_collection_to_dict(
end_points_collection)
if global_pool:
# Global average pooling.
net = tf.reduce_mean(net, [1, 2], name='pool5', keep_dims=True)
end_points['global_pool'] = net
if num_classes is not None:
net = slim.conv2d(net, num_classes, [1, 1], activation_fn=None,
normalizer_fn=None, scope='logits')
end_points[sc.name + '/logits'] = net
if spatial_squeeze:
net = tf.squeeze(net, [1, 2], name='SpatialSqueeze')
end_points[sc.name + '/spatial_squeeze'] = net
end_points['predictions'] = slim.softmax(net, scope='predictions')
return net, end_points
resnet_v2.default_image_size = 224
def resnet_v2_block(scope, base_depth, num_units, stride):
"""Helper function for creating a resnet_v2 bottleneck block.
Args:
scope: The scope of the block.
base_depth: The depth of the bottleneck layer for each unit.
num_units: The number of units in the block.
stride: The stride of the block, implemented as a stride in the last unit.
All other units have stride=1.
Returns:
A resnet_v2 bottleneck block.
"""
return resnet_utils.Block(scope, bottleneck, [{
'depth': base_depth * 4,
'depth_bottleneck': base_depth,
'stride': 1
}] * (num_units - 1) + [{
'depth': base_depth * 4,
'depth_bottleneck': base_depth,
'stride': stride
}])
resnet_v2.default_image_size = 224
def resnet_v2_50(inputs,
num_classes=None,
is_training=True,
global_pool=True,
output_stride=None,
spatial_squeeze=True,
reuse=None,
scope='resnet_v2_50'):
"""ResNet-50 model of [1]. See resnet_v2() for arg and return description."""
blocks = [
resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),
resnet_v2_block('block2', base_depth=128, num_units=4, stride=2),
resnet_v2_block('block3', base_depth=256, num_units=6, stride=2),
resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),
]
return resnet_v2(inputs, blocks, num_classes, is_training=is_training,
global_pool=global_pool, output_stride=output_stride,
include_root_block=True, spatial_squeeze=spatial_squeeze,
reuse=reuse, scope=scope)
resnet_v2_50.default_image_size = resnet_v2.default_image_size
def resnet_v2_101(inputs,
num_classes=None,
is_training=True,
global_pool=True,
output_stride=None,
spatial_squeeze=True,
reuse=None,
scope='resnet_v2_101'):
"""ResNet-101 model of [1]. See resnet_v2() for arg and return description."""
blocks = [
resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),
resnet_v2_block('block2', base_depth=128, num_units=4, stride=2),
resnet_v2_block('block3', base_depth=256, num_units=23, stride=2),
resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),
]
return resnet_v2(inputs, blocks, num_classes, is_training=is_training,
global_pool=global_pool, output_stride=output_stride,
include_root_block=True, spatial_squeeze=spatial_squeeze,
reuse=reuse, scope=scope)
resnet_v2_101.default_image_size = resnet_v2.default_image_size
def resnet_v2_152(inputs,
num_classes=None,
is_training=True,
global_pool=True,
output_stride=None,
spatial_squeeze=True,
reuse=None,
scope='resnet_v2_152'):
"""ResNet-152 model of [1]. See resnet_v2() for arg and return description."""
blocks = [
resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),
resnet_v2_block('block2', base_depth=128, num_units=8, stride=2),
resnet_v2_block('block3', base_depth=256, num_units=36, stride=2),
resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),
]
return resnet_v2(inputs, blocks, num_classes, is_training=is_training,
global_pool=global_pool, output_stride=output_stride,
include_root_block=True, spatial_squeeze=spatial_squeeze,
reuse=reuse, scope=scope)
resnet_v2_152.default_image_size = resnet_v2.default_image_size
def resnet_v2_200(inputs,
num_classes=None,
is_training=True,
global_pool=True,
output_stride=None,
spatial_squeeze=True,
reuse=None,
scope='resnet_v2_200'):
"""ResNet-200 model of [2]. See resnet_v2() for arg and return description."""
blocks = [
resnet_v2_block('block1', base_depth=64, num_units=3, stride=2),
resnet_v2_block('block2', base_depth=128, num_units=24, stride=2),
resnet_v2_block('block3', base_depth=256, num_units=36, stride=2),
resnet_v2_block('block4', base_depth=512, num_units=3, stride=1),
]
return resnet_v2(inputs, blocks, num_classes, is_training=is_training,
global_pool=global_pool, output_stride=output_stride,
include_root_block=True, spatial_squeeze=spatial_squeeze,
reuse=reuse, scope=scope)
resnet_v2_200.default_image_size = resnet_v2.default_image_size
| {
"pile_set_name": "Github"
} |
// ==========================================================================
// Project: SproutCore Costello - Property Observing Library
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors.
// Portions ©2008-2010 Apple Inc. All rights reserved.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
// ........................................................................
// ObserverSet
//
/**
@namespace
This private class is used to store information about obversers on a
particular key. Note that this object is not observable. You create new
instances by calling SC.beget(SC.ObserverSet) ;
@since SproutCore 1.0
*/
SC.ObserverSet = {
/**
the number of targets in the set.
*/
targets: 0,
_membersCacheIsValid: NO,
/**
Adds the named target/method observer to the set. The method must be
a function, not a string.
Note that in debugging mode only, this method is overridden to also record
the name of the object and function that resulted in the target/method
being added.
*/
add: function(target, method, context) {
var targetGuid = (target) ? SC.guidFor(target) : "__this__";
// get the set of methods
var methods = this[targetGuid] ;
if (!methods) {
methods = this[targetGuid] = SC.CoreSet.create() ;
methods.target = target ;
methods.isTargetSet = YES ; // used for getMembers().
this.targets++ ;
}
methods.add(method) ;
// context is really useful sometimes but not used that often so this
// implementation is intentionally lazy.
if (context !== undefined) {
if (!methods.contexts) context = methods.contexts = {} ;
methods.contexts[SC.guidFor(method)] = context ;
}
this._membersCacheIsValid = NO ;
},
/**
removes the named target/method observer from the set. If this is the
last method for the named target, then the number of targets will also
be reduced.
returns YES if the items was removed, NO if it was not found.
*/
remove: function(target, method) {
var targetGuid = (target) ? SC.guidFor(target) : "__this__";
// get the set of methods
var methods = this[targetGuid] ;
if (!methods) return NO ;
methods.remove(method) ;
if (methods.length <= 0) {
methods.target = null;
methods.isTargetSet = NO ;
methods.contexts = null ;
delete this[targetGuid] ;
this.targets-- ;
} else if (methods.contexts) {
delete methods.contexts[SC.guidFor(method)];
}
this._membersCacheIsValid = NO;
return YES ;
},
/**
Invokes the target/method pairs in the receiver. Used by SC.RunLoop
Note: does not support context
*/
invokeMethods: function() {
var key, value, idx, target, val;
// iterate through the set, look for sets.
for(key in this) {
if (!this.hasOwnProperty(key)) continue ;
value = this[key] ;
if (value && value.isTargetSet) {
idx = value.length;
target = value.target ;
while(--idx>=0) {
val = value[idx];
if(val) val.call(target);
}
}
}
},
/**
Returns an array of target/method pairs. This is cached.
*/
getMembers: function() {
if (this._membersCacheIsValid) return this._members ;
// need to recache, reset the array...
if (!this._members) {
this._members = [] ;
} else this._members.length = 0 ; // reset
var ret = this._members ;
// iterate through the set, look for sets.
for(var key in this) {
if (!this.hasOwnProperty(key)) continue ;
var value = this[key] ;
if (value && value.isTargetSet) {
var idx = value.length;
var target = value.target ;
// slightly slower - only do if we have contexts
var contexts = value.contexts ;
if (contexts) {
while(--idx>=0) {
var method = value[idx] ;
ret.push([target, method, contexts[SC.guidFor(method)]]) ;
}
} else {
while(--idx>=0) ret.push([target, value[idx]]);
}
}
}
this._membersCacheIsValid = YES ;
return ret ;
},
/**
Returns a new instance of the set with the contents cloned.
*/
clone: function() {
var oldSet, newSet, key, ret = SC.ObserverSet.create() ;
for(key in this) {
if (!this.hasOwnProperty(key)) continue ;
oldSet = this[key];
if (oldSet && oldSet.isTargetSet) {
newSet = oldSet.clone();
newSet.target = oldSet.target ;
if (oldSet.contexts) newSet.contexts = SC.clone(oldSet.contexts);
ret[key] = newSet ;
}
}
ret.targets = this.targets ;
ret._membersCacheIsValid = NO ;
return ret ;
},
/**
Creates a new instance of the observer set.
*/
create: function() { return SC.beget(this); }
} ;
SC.ObserverSet.slice = SC.ObserverSet.clone ;
| {
"pile_set_name": "Github"
} |
Errors
======
DataError
.........
Exception class that is used in the library. Exception hold errors in error
attribute. For simple checkers it will be just a string. For nested structures
it will be dict instance.
``DataError`` instance has four important properties:
- `error` - error message describing what happened
- `code` - error code (this code you can use for replace an error message)
- `value` - raw value
- `trafaret` - checker instance which raised an error
``DataError`` instance has two methods for represent full information about errors
- `as_dict` - the simple representation of errors as dictionary
- `to_struct` - more information than in `as_dict`.
Here we can see code of error and other helpful information.
.. code-block:: python
login_validator = t.Dict({'username': t.String(max_length=10), 'email': t.Email})
try:
login_validator.check({'username': 'So loooong name', 'email': 'misha'})
except t.DataError as e:
print(e.as_dict())
print(e.to_struct())
# {
# 'username': 'String is longer than 10 characters',
# 'email': 'value is not a valid email address'
# }
# {
# 'code': 'some_elements_did_not_match',
# 'nested': {
# 'username': {
# 'code': 'long_string',
# 'message': 'String is longer than 10 characters'
# },
# 'email': {
# 'code': 'is_not_valid_email',
# 'message': 'value is not a valid email address'
# }
# }
# }
Also, as_dict and to_struct have optional parameter ``value`` that set to False
as default. If set it to ``True`` trafaret will show bad value in error message.
| {
"pile_set_name": "Github"
} |
require 'spec_helper'
RSpec.describe 'Tidebit integration specs' do
let(:client) { Cryptoexchange::Client.new }
let(:btc_hkd_pair) { Cryptoexchange::Models::MarketPair.new(base: 'BTC', target: 'HKD', market: 'tidebit') }
it 'fetch pairs' do
pairs = client.pairs('tidebit')
expect(pairs).not_to be_empty
pair = pairs.first
expect(pair.base).to_not be nil
expect(pair.target).to_not be nil
expect(pair.market).to eq 'tidebit'
end
it 'give trade url' do
trade_page_url = client.trade_page_url 'tidebit', base: btc_hkd_pair.base, target: btc_hkd_pair.target
expect(trade_page_url).to eq "https://www.tidebit.com/markets/btchkd"
end
it 'fetch ticker' do
ticker = client.ticker(btc_hkd_pair)
expect(ticker.base).to eq 'BTC'
expect(ticker.target).to eq 'HKD'
expect(ticker.market).to eq 'tidebit'
expect(ticker.last).to be_a Numeric
expect(ticker.low).to be_a Numeric
expect(ticker.high).to be_a Numeric
expect(ticker.bid).to be_a Numeric
expect(ticker.ask).to be_a Numeric
expect(ticker.volume).to be_a Numeric
expect(ticker.timestamp).to be nil
expect(ticker.payload).to_not be nil
end
it 'fetch order book' do
order_book = client.order_book(btc_hkd_pair)
expect(order_book.base).to eq 'BTC'
expect(order_book.target).to eq 'HKD'
expect(order_book.market).to eq 'tidebit'
expect(order_book.asks).to_not be_empty
expect(order_book.bids).to_not be_empty
expect(order_book.asks.first.price).to_not be_nil
expect(order_book.bids.first.amount).to_not be_nil
expect(order_book.bids.first.timestamp).to_not be_nil
expect(order_book.asks.count).to be > 10
expect(order_book.bids.count).to be > 10
expect(order_book.timestamp).to be_a Numeric
expect(order_book.payload).to_not be nil
end
it 'fetch trade' do
trades = client.trades(btc_hkd_pair)
trade = trades.sample
expect(trades).to_not be_empty
expect(trade.base).to eq 'BTC'
expect(trade.target).to eq 'HKD'
expect(trade.market).to eq 'tidebit'
expect(trade.trade_id).to_not be_nil
expect(['buy', 'sell']).to include trade.type
expect(trade.price).to_not be_nil
expect(trade.amount).to_not be_nil
expect(trade.timestamp).to be_a Numeric
expect(trade.payload).to_not be nil
end
end
| {
"pile_set_name": "Github"
} |
@page "/checkbox"
<Demo></Demo>
| {
"pile_set_name": "Github"
} |
{
"HIGHLIGHTSTROKECOLORS": [
[
"logic",
"#000000"
]
],
"ARGPLUGINS": [
[
"myxor",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) >> logo.parseArg(logo, turtle, conns[2]);"
],
[
"myand",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) & logo.parseArg(logo, turtle, conns[2]);"
],
[
"myor",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) | logo.parseArg(logo, turtle, conns[2]);"
],
[
"mysl",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) << logo.parseArg(logo, turtle, conns[2]);"
],
[
"mysr",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) >> logo.parseArg(logo, turtle, conns[2]);"
],
[
"mynot",
"var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = ~ logo.parseArg(logo, turtle, conns[1]);"
]
],
"PALETTEHIGHLIGHTCOLORS": [
[
"logic",
"#FF9FFF"
]
],
"PALETTEPLUGINS": [
[
"logic",
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"55\" height=\"55\" viewBox=\"0 0 55 55\"><g transform=\"matrix(1.25 0 0 1.25-7.5-6.25)\"><g font-family=\"Sans\" word-spacing=\"0\" line-height=\"125%\" letter-spacing=\"0\" font-size=\"11\"><text x=\"33.891\" y=\"39.844\"><tspan x=\"33.891\" y=\"39.844\" fill=\"#fff\">0</tspan></text><g fill=\"#000\"><text x=\"33.792\" y=\"27\"><tspan x=\"33.792\" y=\"27\" fill=\"#fff\">1</tspan></text><text x=\"19.18\" y=\"40\"><tspan x=\"19.18\" y=\"40\" fill=\"#fff\">1</tspan></text><text x=\"19.275\" y=\"26.844\"><tspan x=\"19.275\" y=\"26.844\" fill=\"#fff\">0</tspan></text></g></g><g fill=\"#fff\" stroke=\"#fff\"><path d=\"m10.5 14.5h35\"/><path d=\"m15.5 44.5v-35\"/></g></g></svg>"
]
],
"BLOCKPLUGINS": [
[
"myxor",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicTwoArgBlock('myxor', 'XOR');"
],
[
"myand",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicTwoArgBlock('myand', 'AND');"
],
[
"myor",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicTwoArgBlock('myor', 'OR');"
],
[
"mysl",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicTwoArgBlock('mysl', '<<');"
],
[
"mysr",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicTwoArgBlock('mysr', '>>');"
],
[
"mynot",
"var LogicTwoArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.twoArgMathBlock(); block.defaults.push(1); block.defaults.push(1);};var LogicArgBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['logic']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(0);};LogicArgBlock('mynot', 'NOT');"
]
],
"PALETTEFILLCOLORS": [
[
"logic",
"#ff00ff"
]
],
"PALETTESTROKECOLORS": [
[
"logic",
"#C700D3"
]
]
}
| {
"pile_set_name": "Github"
} |
# Generated by Django 2.0.6 on 2018-06-20 10:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("papers", "0017_auto_20180619_1657")]
operations = [
migrations.AlterField(
model_name="sourcefile",
name="arxiv_id",
field=models.CharField(max_length=50, unique=True),
)
]
| {
"pile_set_name": "Github"
} |
/**
* git do not control webim.config.js
* everyone should copy webim.config.js.demo to webim.config.js
* and have their own configs.
* In this way , others won't be influenced by this config while git pull.
*
*/
var WebIM = {};
WebIM.config = {
/*
* XMPP server
*/
xmppURL: 'im-api.easemob.com',
/*
* Backend REST API URL
*/
apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
/*
* Application AppKey
*/
appkey: 'XXXXXXXXXXXX#XXXXXXX',//修改为自己的
/*
* Whether to use wss
* @parameter {Boolean} true or false
*/
https: false,
/*
* isMultiLoginSessions
* true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
* false: A visitor can sign in to only one webpage and receive messages at the webpage.
*/
isMultiLoginSessions: true,
/*
* set presence after login
*/
isAutoLogin: true,
/**
* Whether to use window.doQuery()
* @parameter {Boolean} true or false
*/
isWindowSDK: false,
/**
* isSandBox=true: xmppURL: 'im-api-sandbox.easemob.com', apiURL: '//a1-sdb.easemob.com',
* isSandBox=false: xmppURL: 'im-api.easemob.com', apiURL: '//a1.easemob.com',
* @parameter {Boolean} true or false
*/
isSandBox: false,
/**
* Whether to console.log in strophe.log()
* @parameter {Boolean} true or false
*/
isDebug: false,
/**
* will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
* won't auto connect if autoReconnectNumMax=0.
*/
autoReconnectNumMax: 2,
/**
* the interval seconds between each auto reconnectting.
* works only if autoReconnectMaxNum >= 2.
*/
autoReconnectInterval: 2,
/**
* webrtc supports WebKit and https only
*/
isWebRTC: (/Firefox/.test(navigator.userAgent) || /WebKit/.test(navigator.userAgent)) && /^https\:$/.test(window.location.protocol),
/**
* after login, send empty message to xmpp server like heartBeat every 45s, to keep the ws connection alive.
*/
heartBeatWait: 4500,
/**
* while http access,use ip directly,instead of ServerName,avoiding DNS problem.
*/
isHttpDNS: false,
/**
* Will show the status of messages in single chat
* msgStatus: true show
* msgStatus: true hide
*/
msgStatus: true,
/**
* When a message arrived, the receiver send an ack message to the
* sender, in order to tell the sender the message has delivered.
* See call back function onReceivedMessage
*/
delivery: true,
/**
* When a message read, the receiver send an ack message to the
* sender, in order to tell the sender the message has been read.
* See call back function onReadMessage
*/
read: true,
/**
* When a message sent or arrived, will save it into the localStorage,
* true: Store the chat record
* false: Don't store the chat record
*/
saveLocal: false,
/**
* Will encrypt text message and emoji message
* {type:'none'} no encrypt
* {type:'base64'} encrypt with base64
* {type:'aes',mode: 'ebc',key: '123456789easemob',iv: '0000000000000000'} encrypt with aes(ebc)
* {type:'aes',mode: 'cbc',key: '123456789easemob',iv: '0000000000000000'} encrypt with aes(cbc)
*/
encrypt: {
type: 'none'
}
};
| {
"pile_set_name": "Github"
} |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_chart_update
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 03:44+0000\n"
"PO-Revision-Date: 2018-02-01 03:44+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Spanish (Paraguay) (https://www.transifex.com/oca/teams/23907/"
"es_PY/)\n"
"Language: es_PY\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__code_digits
msgid "# of Digits"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Update Chart Template</span>"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "<span states=\"init,ready\"> or </span>"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__account_field_ids
msgid "Account fields"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__account_id
msgid "Account template"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_update_charts_accounts_account
msgid "Account that needs to be updated (new or updated in the template)."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__update_account_id
msgid "Account to update"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__account_ids
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Accounts"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__account_matching_ids
msgid "Accounts matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__chart_template_id
msgid "Chart Template"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__chart_template_ids
msgid "Chart Templates"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Chart of Accounts"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Close"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__company_id
msgid "Company"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts__state__init
msgid "Configuration"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__continue_on_errors
msgid "Continue on errors"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Create/Update"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Created account %s."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__create_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Created fiscal position %s."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__create_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__create_date
msgid "Created on"
msgstr "Creado en"
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Created tax %s."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Deactivated tax %s."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__deleted_taxes
msgid "Deactivated taxes"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts_tax__type_tax_use
msgid ""
"Determines where the tax is selectable. Note : 'None' means a tax can't be "
"used by itself, however it can still be used in a group."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Differences in these fields: %s."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__display_name
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__display_name
msgid "Display Name"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Exception creating account %s."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Exception writing account %s."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__update_account
msgid "Existing accounts are updated. Accounts are searched by code."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__update_fiscal_position
msgid ""
"Existing fiscal positions are updated. Fiscal positions are searched by name."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__update_tax
msgid "Existing taxes are updated. Taxes are searched by name."
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Field options"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_ir_model_fields
msgid "Fields"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__fp_field_ids
msgid "Fiscal position fields"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__fiscal_position_id
msgid "Fiscal position template"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_update_charts_accounts_fiscal_position
msgid ""
"Fiscal position that needs to be updated (new or updated in the template)."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__update_fiscal_position_id
msgid "Fiscal position to update"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__fiscal_position_ids
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Fiscal positions"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__fp_matching_ids
msgid "Fiscal positions matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__lang
msgid ""
"For records searched by name (taxes, fiscal positions), the template name "
"will be matched against the record name on this language."
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "General options"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid ""
"Here you can select the fields you want to check if\n"
" they have been updated in the templates."
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Here you can set the matching order."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__id
msgid "ID"
msgstr "ID"
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__continue_on_errors
msgid ""
"If set, the wizard will continue to the next step even if there are minor "
"errors."
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid ""
"If you leave these options set, the wizard will\n"
" not just create new records, but also "
"update\n"
" records with changes (i.e. different tax "
"amount)"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__chart_template_ids
msgid "Includes all chart templates."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__lang
msgid "Language"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position____last_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax____last_update
msgid "Last Modified on"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__write_uid
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__write_uid
msgid "Last Updated by"
msgstr "Ultima actualización por"
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__write_date
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__write_date
msgid "Last Updated on"
msgstr "Ultima actualización en"
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Log"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__matching_value
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__matching_value
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__matching_value
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__matching_value
msgid "Matching Value"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__log
msgid "Messages and Errors"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Missing XML-ID."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Name or description not found."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__new_accounts
msgid "New accounts"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__new_fps
msgid "New fiscal positions"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__new_taxes
msgid "New taxes"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_account__type__new
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_fiscal_position__type__new
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_tax__type__new
msgid "New template"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Next"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "No account found with this code."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "No fiscal position found with this name."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,help:account_chart_update.field_wizard_update_charts_accounts__code_digits
msgid "No. of Digits to use for account code"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Note: Only the changed fields are updated."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__notes
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__notes
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__notes
msgid "Notes"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid ""
"One or more errors detected!\n"
"\n"
"%s"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Other options"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Post-updated tax %s."
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Previous"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Records to create/update"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__recreate_xml_ids
msgid "Recreate missing XML-IDs"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__rejected_new_account_number
msgid "Rejected New Account Number"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__rejected_updated_account_number
msgid "Rejected Updated Account Number"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts__state__ready
msgid "Select records to update"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__sequence
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__sequence
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__sequence
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__sequence
msgid "Sequence"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__state
msgid "Status"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Summary of created objects"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Summary of updated objects"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__type_tax_use
msgid "Tax Scope"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__tax_field_ids
msgid "Tax fields"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Tax is disabled."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__tax_id
msgid "Tax template"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_update_charts_accounts_tax
msgid "Tax that needs to be updated (new or updated in the template)."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_tax__type__deleted
msgid "Tax to deactivate"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__update_tax_id
msgid "Tax to update"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__tax_ids
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Taxes"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__tax_matching_ids
msgid "Taxes matching"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid ""
"This wizard will update your accounts, taxes and\n"
" fiscal positions according to the selected "
"chart\n"
" template"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "To deactivate: not in the template"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__type
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__type
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__type
msgid "Type"
msgstr "Tipo"
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.res_config_settings_view_form
msgid "Update Chart Template"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.res_config_settings_view_form
msgid "Update Taxes, fiscal positions or chart of accounts."
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__update_account
msgid "Update accounts"
msgstr ""
#. module: account_chart_update
#: model:ir.actions.act_window,name:account_chart_update.action_wizard_update_chart
msgid "Update chart of accounts"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.res_config_settings_view_form
msgid "Update chart template"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_account_matching__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_fp_matching__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_matching__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_tax_matching__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_account__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_fiscal_position__update_chart_wizard_id
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts_tax__update_chart_wizard_id
msgid "Update chart wizard"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__update_fiscal_position
msgid "Update fiscal positions"
msgstr ""
#. module: account_chart_update
#: model_terms:ir.ui.view,arch_db:account_chart_update.view_update_multi_chart
msgid "Update records?"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__update_tax
msgid "Update taxes"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated account %s."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated account %s. (Recreated XML-ID)"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__updated_accounts
msgid "Updated accounts"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated fiscal position %s."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated fiscal position %s. (Recreated XML-ID)"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__updated_fps
msgid "Updated fiscal positions"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated tax %s."
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid "Updated tax %s. (Recreated XML-IDs)"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields,field_description:account_chart_update.field_wizard_update_charts_accounts__updated_taxes
msgid "Updated taxes"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_account__type__updated
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_fiscal_position__type__updated
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts_tax__type__updated
msgid "Updated template"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_account_matching
msgid "Wizard Account Matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_fp_matching
msgid "Wizard Fiscal Position Matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_matching
msgid "Wizard Matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_tax_matching
msgid "Wizard Tax Matching"
msgstr ""
#. module: account_chart_update
#: model:ir.model,name:account_chart_update.model_wizard_update_charts_accounts
msgid "Wizard Update Charts Accounts"
msgstr ""
#. module: account_chart_update
#: model:ir.model.fields.selection,name:account_chart_update.selection__wizard_update_charts_accounts__state__done
msgid "Wizard completed"
msgstr ""
#. module: account_chart_update
#: code:addons/account_chart_update/wizard/wizard_chart_update.py:0
#, python-format
msgid ""
"You have at least one parent tax template (%s) whose children taxes are not "
"going to be created. Aborting as this will provoke an infinite loop. Please "
"check if children have been matched, but not the parent one."
msgstr ""
| {
"pile_set_name": "Github"
} |
diff -b %1.h \opaa\inc\%1.h >h:%1.dif
| {
"pile_set_name": "Github"
} |
.video-js .vjs-control.vjs-close-button {
@extend .vjs-icon-cancel;
cursor: pointer;
height: 3em;
position: absolute;
right: 0;
top: 0.5em;
z-index: 2;
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>target/glowroot.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>target/glowroot.%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>2</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>20MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<logger name="audit" level="off" />
<!-- this is to deal with "Sending GOAWAY failed" that occur when connection to central fails
(which is already logged more nicely by DownstreamServiceObserver) -->
<logger name="io.netty.handler.codec.http2.Http2ConnectionHandler" level="off" />
</configuration>
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
namespace Aws\Rds\Exception;
/**
* User already has a DB instance with the given identifier.
*/
class DBInstanceAlreadyExistsException extends RdsException {}
| {
"pile_set_name": "Github"
} |
;/******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
;* File Name : startup_stm32f756xx.s
;* Author : MCD Application Team
;* Version : V1.0.0
;* Date : 22-May-2015
;* Description : STM32F756xx devices vector table for EWARM toolchain.
;* This module performs:
;* - Set the initial SP
;* - Set the initial PC == _iar_program_start,
;* - Set the vector table entries with the exceptions ISR
;* address.
;* - Branches to main in the C library (which eventually
;* calls main()).
;* After Reset the Cortex-M7 processor is in Thread mode,
;* priority is Privileged, and the Stack is set to Main.
;********************************************************************************
;*
;* 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.
;* 3. Neither the name of STMicroelectronics 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.
;*
;*******************************************************************************
;
;
; The modules in this file are included in the libraries, and may be replaced
; by any user-defined modules that define the PUBLIC symbol _program_start or
; a user defined start symbol.
; To override the cstartup defined in the library, simply add your modified
; version to the workbench project.
;
; The vector table is normally located at address 0.
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
; The name "__vector_table" has special meaning for C-SPY:
; it is where the SP start value is found, and the NVIC vector
; table register (VTOR) is initialized to this address if != 0.
;
; Cortex-M version
;
MODULE ?cstartup
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
EXTERN __iar_program_start
EXTERN SystemInit
PUBLIC __vector_table
DATA
__vector_table
DCD sfe(CSTACK)
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD MemManage_Handler ; MPU Fault Handler
DCD BusFault_Handler ; Bus Fault Handler
DCD UsageFault_Handler ; Usage Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall Handler
DCD DebugMon_Handler ; Debug Monitor Handler
DCD 0 ; Reserved
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler
; External Interrupts
DCD WWDG_IRQHandler ; Window WatchDog
DCD PVD_IRQHandler ; PVD through EXTI Line detection
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
DCD FLASH_IRQHandler ; FLASH
DCD RCC_IRQHandler ; RCC
DCD EXTI0_IRQHandler ; EXTI Line0
DCD EXTI1_IRQHandler ; EXTI Line1
DCD EXTI2_IRQHandler ; EXTI Line2
DCD EXTI3_IRQHandler ; EXTI Line3
DCD EXTI4_IRQHandler ; EXTI Line4
DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0
DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1
DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2
DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3
DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4
DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5
DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6
DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s
DCD CAN1_TX_IRQHandler ; CAN1 TX
DCD CAN1_RX0_IRQHandler ; CAN1 RX0
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9
DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10
DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
DCD TIM2_IRQHandler ; TIM2
DCD TIM3_IRQHandler ; TIM3
DCD TIM4_IRQHandler ; TIM4
DCD I2C1_EV_IRQHandler ; I2C1 Event
DCD I2C1_ER_IRQHandler ; I2C1 Error
DCD I2C2_EV_IRQHandler ; I2C2 Event
DCD I2C2_ER_IRQHandler ; I2C2 Error
DCD SPI1_IRQHandler ; SPI1
DCD SPI2_IRQHandler ; SPI2
DCD USART1_IRQHandler ; USART1
DCD USART2_IRQHandler ; USART2
DCD USART3_IRQHandler ; USART3
DCD EXTI15_10_IRQHandler ; External Line[15:10]s
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line
DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12
DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13
DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14
DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare
DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7
DCD FMC_IRQHandler ; FMC
DCD SDMMC1_IRQHandler ; SDMMC1
DCD TIM5_IRQHandler ; TIM5
DCD SPI3_IRQHandler ; SPI3
DCD UART4_IRQHandler ; UART4
DCD UART5_IRQHandler ; UART5
DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
DCD TIM7_IRQHandler ; TIM7
DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0
DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1
DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2
DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3
DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4
DCD ETH_IRQHandler ; Ethernet
DCD ETH_WKUP_IRQHandler ; Ethernet Wakeup through EXTI line
DCD CAN2_TX_IRQHandler ; CAN2 TX
DCD CAN2_RX0_IRQHandler ; CAN2 RX0
DCD CAN2_RX1_IRQHandler ; CAN2 RX1
DCD CAN2_SCE_IRQHandler ; CAN2 SCE
DCD OTG_FS_IRQHandler ; USB OTG FS
DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5
DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6
DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7
DCD USART6_IRQHandler ; USART6
DCD I2C3_EV_IRQHandler ; I2C3 event
DCD I2C3_ER_IRQHandler ; I2C3 error
DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out
DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In
DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI
DCD OTG_HS_IRQHandler ; USB OTG HS
DCD DCMI_IRQHandler ; DCMI
DCD CRYP_IRQHandler ; CRYP crypto
DCD HASH_RNG_IRQHandler ; Hash and Rng
DCD FPU_IRQHandler ; FPU
DCD UART7_IRQHandler ; UART7
DCD UART8_IRQHandler ; UART8
DCD SPI4_IRQHandler ; SPI4
DCD SPI5_IRQHandler ; SPI5
DCD SPI6_IRQHandler ; SPI6
DCD SAI1_IRQHandler ; SAI1
DCD LTDC_IRQHandler ; LTDC
DCD LTDC_ER_IRQHandler ; LTDC error
DCD DMA2D_IRQHandler ; DMA2D
DCD SAI2_IRQHandler ; SAI2
DCD QUADSPI_IRQHandler ; QUADSPI
DCD LPTIM1_IRQHandler ; LPTIM1
DCD CEC_IRQHandler ; HDMI_CEC
DCD I2C4_EV_IRQHandler ; I2C4 Event
DCD I2C4_ER_IRQHandler ; I2C4 Error
DCD SPDIF_RX_IRQHandler ; SPDIF_RX
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Default interrupt handlers.
;;
THUMB
PUBWEAK Reset_Handler
SECTION .text:CODE:NOROOT:REORDER(2)
Reset_Handler
LDR R0, =SystemInit
BLX R0
LDR R0, =__iar_program_start
BX R0
PUBWEAK NMI_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
NMI_Handler
B NMI_Handler
PUBWEAK HardFault_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
HardFault_Handler
B HardFault_Handler
PUBWEAK MemManage_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
MemManage_Handler
B MemManage_Handler
PUBWEAK BusFault_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
BusFault_Handler
B BusFault_Handler
PUBWEAK UsageFault_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
UsageFault_Handler
B UsageFault_Handler
PUBWEAK SVC_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
SVC_Handler
B SVC_Handler
PUBWEAK DebugMon_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
DebugMon_Handler
B DebugMon_Handler
PUBWEAK PendSV_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
PendSV_Handler
B PendSV_Handler
PUBWEAK SysTick_Handler
SECTION .text:CODE:NOROOT:REORDER(1)
SysTick_Handler
B SysTick_Handler
PUBWEAK WWDG_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
WWDG_IRQHandler
B WWDG_IRQHandler
PUBWEAK PVD_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
PVD_IRQHandler
B PVD_IRQHandler
PUBWEAK TAMP_STAMP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TAMP_STAMP_IRQHandler
B TAMP_STAMP_IRQHandler
PUBWEAK RTC_WKUP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
RTC_WKUP_IRQHandler
B RTC_WKUP_IRQHandler
PUBWEAK FLASH_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
FLASH_IRQHandler
B FLASH_IRQHandler
PUBWEAK RCC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
RCC_IRQHandler
B RCC_IRQHandler
PUBWEAK EXTI0_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI0_IRQHandler
B EXTI0_IRQHandler
PUBWEAK EXTI1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI1_IRQHandler
B EXTI1_IRQHandler
PUBWEAK EXTI2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI2_IRQHandler
B EXTI2_IRQHandler
PUBWEAK EXTI3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI3_IRQHandler
B EXTI3_IRQHandler
PUBWEAK EXTI4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI4_IRQHandler
B EXTI4_IRQHandler
PUBWEAK DMA1_Stream0_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream0_IRQHandler
B DMA1_Stream0_IRQHandler
PUBWEAK DMA1_Stream1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream1_IRQHandler
B DMA1_Stream1_IRQHandler
PUBWEAK DMA1_Stream2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream2_IRQHandler
B DMA1_Stream2_IRQHandler
PUBWEAK DMA1_Stream3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream3_IRQHandler
B DMA1_Stream3_IRQHandler
PUBWEAK DMA1_Stream4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream4_IRQHandler
B DMA1_Stream4_IRQHandler
PUBWEAK DMA1_Stream5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream5_IRQHandler
B DMA1_Stream5_IRQHandler
PUBWEAK DMA1_Stream6_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream6_IRQHandler
B DMA1_Stream6_IRQHandler
PUBWEAK ADC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
ADC_IRQHandler
B ADC_IRQHandler
PUBWEAK CAN1_TX_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN1_TX_IRQHandler
B CAN1_TX_IRQHandler
PUBWEAK CAN1_RX0_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN1_RX0_IRQHandler
B CAN1_RX0_IRQHandler
PUBWEAK CAN1_RX1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN1_RX1_IRQHandler
B CAN1_RX1_IRQHandler
PUBWEAK CAN1_SCE_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN1_SCE_IRQHandler
B CAN1_SCE_IRQHandler
PUBWEAK EXTI9_5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI9_5_IRQHandler
B EXTI9_5_IRQHandler
PUBWEAK TIM1_BRK_TIM9_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM1_BRK_TIM9_IRQHandler
B TIM1_BRK_TIM9_IRQHandler
PUBWEAK TIM1_UP_TIM10_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM1_UP_TIM10_IRQHandler
B TIM1_UP_TIM10_IRQHandler
PUBWEAK TIM1_TRG_COM_TIM11_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM1_TRG_COM_TIM11_IRQHandler
B TIM1_TRG_COM_TIM11_IRQHandler
PUBWEAK TIM1_CC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM1_CC_IRQHandler
B TIM1_CC_IRQHandler
PUBWEAK TIM2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM2_IRQHandler
B TIM2_IRQHandler
PUBWEAK TIM3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM3_IRQHandler
B TIM3_IRQHandler
PUBWEAK TIM4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM4_IRQHandler
B TIM4_IRQHandler
PUBWEAK I2C1_EV_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C1_EV_IRQHandler
B I2C1_EV_IRQHandler
PUBWEAK I2C1_ER_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C1_ER_IRQHandler
B I2C1_ER_IRQHandler
PUBWEAK I2C2_EV_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C2_EV_IRQHandler
B I2C2_EV_IRQHandler
PUBWEAK I2C2_ER_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C2_ER_IRQHandler
B I2C2_ER_IRQHandler
PUBWEAK SPI1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI1_IRQHandler
B SPI1_IRQHandler
PUBWEAK SPI2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI2_IRQHandler
B SPI2_IRQHandler
PUBWEAK USART1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
USART1_IRQHandler
B USART1_IRQHandler
PUBWEAK USART2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
USART2_IRQHandler
B USART2_IRQHandler
PUBWEAK USART3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
USART3_IRQHandler
B USART3_IRQHandler
PUBWEAK EXTI15_10_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
EXTI15_10_IRQHandler
B EXTI15_10_IRQHandler
PUBWEAK RTC_Alarm_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
RTC_Alarm_IRQHandler
B RTC_Alarm_IRQHandler
PUBWEAK OTG_FS_WKUP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_FS_WKUP_IRQHandler
B OTG_FS_WKUP_IRQHandler
PUBWEAK TIM8_BRK_TIM12_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM8_BRK_TIM12_IRQHandler
B TIM8_BRK_TIM12_IRQHandler
PUBWEAK TIM8_UP_TIM13_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM8_UP_TIM13_IRQHandler
B TIM8_UP_TIM13_IRQHandler
PUBWEAK TIM8_TRG_COM_TIM14_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM8_TRG_COM_TIM14_IRQHandler
B TIM8_TRG_COM_TIM14_IRQHandler
PUBWEAK TIM8_CC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM8_CC_IRQHandler
B TIM8_CC_IRQHandler
PUBWEAK DMA1_Stream7_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA1_Stream7_IRQHandler
B DMA1_Stream7_IRQHandler
PUBWEAK FMC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
FMC_IRQHandler
B FMC_IRQHandler
PUBWEAK SDMMC1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SDMMC1_IRQHandler
B SDMMC1_IRQHandler
PUBWEAK TIM5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM5_IRQHandler
B TIM5_IRQHandler
PUBWEAK SPI3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI3_IRQHandler
B SPI3_IRQHandler
PUBWEAK UART4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
UART4_IRQHandler
B UART4_IRQHandler
PUBWEAK UART5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
UART5_IRQHandler
B UART5_IRQHandler
PUBWEAK TIM6_DAC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM6_DAC_IRQHandler
B TIM6_DAC_IRQHandler
PUBWEAK TIM7_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
TIM7_IRQHandler
B TIM7_IRQHandler
PUBWEAK DMA2_Stream0_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream0_IRQHandler
B DMA2_Stream0_IRQHandler
PUBWEAK DMA2_Stream1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream1_IRQHandler
B DMA2_Stream1_IRQHandler
PUBWEAK DMA2_Stream2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream2_IRQHandler
B DMA2_Stream2_IRQHandler
PUBWEAK DMA2_Stream3_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream3_IRQHandler
B DMA2_Stream3_IRQHandler
PUBWEAK DMA2_Stream4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream4_IRQHandler
B DMA2_Stream4_IRQHandler
PUBWEAK ETH_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
ETH_IRQHandler
B ETH_IRQHandler
PUBWEAK ETH_WKUP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
ETH_WKUP_IRQHandler
B ETH_WKUP_IRQHandler
PUBWEAK CAN2_TX_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN2_TX_IRQHandler
B CAN2_TX_IRQHandler
PUBWEAK CAN2_RX0_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN2_RX0_IRQHandler
B CAN2_RX0_IRQHandler
PUBWEAK CAN2_RX1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN2_RX1_IRQHandler
B CAN2_RX1_IRQHandler
PUBWEAK CAN2_SCE_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CAN2_SCE_IRQHandler
B CAN2_SCE_IRQHandler
PUBWEAK OTG_FS_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_FS_IRQHandler
B OTG_FS_IRQHandler
PUBWEAK DMA2_Stream5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream5_IRQHandler
B DMA2_Stream5_IRQHandler
PUBWEAK DMA2_Stream6_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream6_IRQHandler
B DMA2_Stream6_IRQHandler
PUBWEAK DMA2_Stream7_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2_Stream7_IRQHandler
B DMA2_Stream7_IRQHandler
PUBWEAK USART6_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
USART6_IRQHandler
B USART6_IRQHandler
PUBWEAK I2C3_EV_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C3_EV_IRQHandler
B I2C3_EV_IRQHandler
PUBWEAK I2C3_ER_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C3_ER_IRQHandler
B I2C3_ER_IRQHandler
PUBWEAK OTG_HS_EP1_OUT_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_HS_EP1_OUT_IRQHandler
B OTG_HS_EP1_OUT_IRQHandler
PUBWEAK OTG_HS_EP1_IN_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_HS_EP1_IN_IRQHandler
B OTG_HS_EP1_IN_IRQHandler
PUBWEAK OTG_HS_WKUP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_HS_WKUP_IRQHandler
B OTG_HS_WKUP_IRQHandler
PUBWEAK OTG_HS_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
OTG_HS_IRQHandler
B OTG_HS_IRQHandler
PUBWEAK DCMI_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DCMI_IRQHandler
B DCMI_IRQHandler
PUBWEAK CRYP_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CRYP_IRQHandler
B CRYP_IRQHandler
PUBWEAK HASH_RNG_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
HASH_RNG_IRQHandler
B HASH_RNG_IRQHandler
PUBWEAK FPU_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
FPU_IRQHandler
B FPU_IRQHandler
PUBWEAK UART7_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
UART7_IRQHandler
B UART7_IRQHandler
PUBWEAK UART8_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
UART8_IRQHandler
B UART8_IRQHandler
PUBWEAK SPI4_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI4_IRQHandler
B SPI4_IRQHandler
PUBWEAK SPI5_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI5_IRQHandler
B SPI5_IRQHandler
PUBWEAK SPI6_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPI6_IRQHandler
B SPI6_IRQHandler
PUBWEAK SAI1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SAI1_IRQHandler
B SAI1_IRQHandler
PUBWEAK LTDC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
LTDC_IRQHandler
B LTDC_IRQHandler
PUBWEAK LTDC_ER_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
LTDC_ER_IRQHandler
B LTDC_ER_IRQHandler
PUBWEAK DMA2D_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
DMA2D_IRQHandler
B DMA2D_IRQHandler
PUBWEAK SAI2_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SAI2_IRQHandler
B SAI2_IRQHandler
PUBWEAK QUADSPI_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
QUADSPI_IRQHandler
B QUADSPI_IRQHandler
PUBWEAK LPTIM1_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
LPTIM1_IRQHandler
B LPTIM1_IRQHandler
PUBWEAK CEC_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
CEC_IRQHandler
B CEC_IRQHandler
PUBWEAK I2C4_EV_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C4_EV_IRQHandler
B I2C4_EV_IRQHandler
PUBWEAK I2C4_ER_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
I2C4_ER_IRQHandler
B I2C4_ER_IRQHandler
PUBWEAK SPDIF_RX_IRQHandler
SECTION .text:CODE:NOROOT:REORDER(1)
SPDIF_RX_IRQHandler
B SPDIF_RX_IRQHandler
END
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
| {
"pile_set_name": "Github"
} |
title: Processes
toc: [Documentation, Administration, Processes]
# Processes
Crossbar.io has a multi-process architecture. There is one node controller process per node
* [**Controller** Configuration](Controller Configuration)
and multiple worker processes of these types
* [**Router** Configuration](Router Configuration)
* [**Container** Configuration](Container Configuration)
* [**Guest** Configuration](Guest Configuration)
Processes can be further configured with
* [Process Environments](Process Environments)
* [Native Worker Options](Native Worker Options)
## Configuration
The **controller** is configured in the node's configuration like here
```javascript
{
"controller": {
// controller configuration
}
}
```
Read more in [**Controller** Configuration](Controller Configuration).
**Workers** are configured in a node's local configuration like this
```javascript
{
"workers": [
{
"type": "..."
}
]
}
```
There are valid values for the `type` of worker:
* `"router"` - see [Router Configuration](Router Configuration)
* `"container"` - see [Container Configuration](Container Configuration)
* `"guest"` - see [Guest Configuration](Guest Configuration)
---
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DotNetSiemensPLCToolBoxLibrary.DataTypes.Hardware.Step7V5
{
public class ProfinetNode : Node
{
}
}
| {
"pile_set_name": "Github"
} |
import { Spec } from 'vega';
export const spec: Spec = {
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 900,
"height": 500,
"autosize": "none",
"encode": {
"update": {
"fill": {"signal": "bgcolor"}
}
},
"signals": [
{
"name": "type",
"value": "mercator",
"bind": {
"input": "select",
"options": [
"albers",
"albersUsa",
"azimuthalEqualArea",
"azimuthalEquidistant",
"conicConformal",
"conicEqualArea",
"conicEquidistant",
"equalEarth",
"equirectangular",
"gnomonic",
"mercator",
"naturalEarth1",
"orthographic",
"stereographic",
"transverseMercator"
]
}
},
{ "name": "scale", "value": 150,
"bind": {"input": "range", "min": 50, "max": 2000, "step": 1} },
{ "name": "rotate0", "value": 0,
"bind": {"input": "range", "min": -180, "max": 180, "step": 1} },
{ "name": "rotate1", "value": 0,
"bind": {"input": "range", "min": -90, "max": 90, "step": 1} },
{ "name": "rotate2", "value": 0,
"bind": {"input": "range", "min": -180, "max": 180, "step": 1} },
{ "name": "center0", "value": 0,
"bind": {"input": "range", "min": -180, "max": 180, "step": 1} },
{ "name": "center1", "value": 0,
"bind": {"input": "range", "min": -90, "max": 90, "step": 1} },
{ "name": "translate0", "update": "width / 2" },
{ "name": "translate1", "update": "height / 2" },
{ "name": "graticuleDash", "value": 0,
"bind": {"input": "radio", "options": [0, 3, 5, 10]} },
{ "name": "borderWidth", "value": 1,
"bind": {"input": "text"} },
{ "name": "bgcolor", "value": "#ffffff",
"bind": {"input": "color"} },
{ "name": "invert", "value": false,
"bind": {"input": "checkbox"} }
],
"projections": [
{
"name": "projection",
"type": {"signal": "type"},
"scale": {"signal": "scale"},
"rotate": [
{"signal": "rotate0"},
{"signal": "rotate1"},
{"signal": "rotate2"}
],
"center": [
{"signal": "center0"},
{"signal": "center1"}
],
"translate": [
{"signal": "translate0"},
{"signal": "translate1"}
]
}
],
"data": [
{
"name": "world",
"url": "data/world-110m.json",
"format": {
"type": "topojson",
"feature": "countries"
}
},
{
"name": "graticule",
"transform": [
{ "type": "graticule" }
]
}
],
"marks": [
{
"type": "shape",
"from": {"data": "graticule"},
"encode": {
"update": {
"strokeWidth": {"value": 1},
"strokeDash": {"signal": "[+graticuleDash, +graticuleDash]"},
"stroke": {"signal": "invert ? '#444' : '#ddd'"},
"fill": {"value": null}
}
},
"transform": [
{ "type": "geoshape", "projection": "projection" }
]
},
{
"type": "shape",
"from": {"data": "world"},
"encode": {
"update": {
"strokeWidth": {"signal": "+borderWidth"},
"stroke": {"signal": "invert ? '#777' : '#bbb'"},
"fill": {"signal": "invert ? '#fff' : '#000'"},
"zindex": {"value": 0}
},
"hover": {
"strokeWidth": {"signal": "+borderWidth + 1"},
"stroke": {"value": "firebrick"},
"zindex": {"value": 1}
}
},
"transform": [
{ "type": "geoshape", "projection": "projection" }
]
}
]
};
| {
"pile_set_name": "Github"
} |
version https://git-lfs.github.com/spec/v1
oid sha256:92b2da43fbe1eb729b27b09e0265cc7588ed68b25b1d61e5e1a1e5a6ea23be5e
size 64878
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2011-2020, baomidou ([email protected]).
* <p>
* 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
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.baomidou.mybatisplus.extension.conditions.query;
import com.baomidou.mybatisplus.core.conditions.query.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.TableFieldInfo;
import com.baomidou.mybatisplus.core.toolkit.ExceptionUtils;
import com.baomidou.mybatisplus.extension.conditions.AbstractChainWrapper;
import java.util.function.Predicate;
/**
* Query Chain Wrapper
*
* @author miemie
* @since 2018-12-19
*/
@SuppressWarnings({"serial"})
public class QueryChainWrapper<T> extends AbstractChainWrapper<T, String, QueryChainWrapper<T>, QueryWrapper<T>>
implements ChainQuery<T>, Query<QueryChainWrapper<T>, T, String> {
private BaseMapper<T> baseMapper;
public QueryChainWrapper(BaseMapper<T> baseMapper) {
super();
this.baseMapper = baseMapper;
super.wrapperChildren = new QueryWrapper<>();
}
@Override
public QueryChainWrapper<T> select(String... columns) {
wrapperChildren.select(columns);
return typedThis;
}
@Override
public QueryChainWrapper<T> select(Class<T> entityClass, Predicate<TableFieldInfo> predicate) {
wrapperChildren.select(entityClass, predicate);
return typedThis;
}
@Override
public String getSqlSelect() {
throw ExceptionUtils.mpe("can not use this method for \"%s\"", "getSqlSelect");
}
@Override
public BaseMapper<T> getBaseMapper() {
return baseMapper;
}
}
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "1461859235_twitch.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "1461859235_twitch copy.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
/* Do not modify this file. Changes will be overwritten. */
/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-crmf.h */
/* asn2wrs.py -b -p crmf -c ./crmf.cnf -s ./packet-crmf-template -D . -O ../.. CRMF.asn */
/* Input file: packet-crmf-template.h */
#line 1 "./asn1/crmf/packet-crmf-template.h"
/* packet-crmf.h
* Routines for RFC2511 Certificate Request Message Format packet dissection
* Ronnie Sahlberg 2004
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <[email protected]>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef PACKET_CRMF_H
#define PACKET_CRMF_H
/*--- Included file: packet-crmf-exp.h ---*/
#line 1 "./asn1/crmf/packet-crmf-exp.h"
int dissect_crmf_CertReqMessages(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_crmf_CertTemplate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_crmf_AttributeTypeAndValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_crmf_PKIPublicationInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_crmf_EncryptedValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_crmf_CertId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
/*--- End of included file: packet-crmf-exp.h ---*/
#line 16 "./asn1/crmf/packet-crmf-template.h"
#endif /* PACKET_CRMF_H */
| {
"pile_set_name": "Github"
} |
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDImageIOCoder.h"
#import "SDImageCoderHelper.h"
#import "NSImage+Compatibility.h"
#import <ImageIO/ImageIO.h>
#import "UIImage+Metadata.h"
@implementation SDImageIOCoder {
size_t _width, _height;
CGImagePropertyOrientation _orientation;
CGImageSourceRef _imageSource;
CGFloat _scale;
BOOL _finished;
}
- (void)dealloc {
if (_imageSource) {
CFRelease(_imageSource);
_imageSource = NULL;
}
#if SD_UIKIT
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
#endif
}
- (void)didReceiveMemoryWarning:(NSNotification *)notification
{
if (_imageSource) {
CGImageSourceRemoveCacheAtIndex(_imageSource, 0);
}
}
+ (instancetype)sharedCoder {
static SDImageIOCoder *coder;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
coder = [[SDImageIOCoder alloc] init];
});
return coder;
}
#pragma mark - Decode
- (BOOL)canDecodeFromData:(nullable NSData *)data {
switch ([NSData sd_imageFormatForImageData:data]) {
case SDImageFormatWebP:
// Do not support WebP decoding
return NO;
case SDImageFormatHEIC:
// Check HEIC decoding compatibility
return [[self class] canDecodeFromHEICFormat];
case SDImageFormatHEIF:
// Check HEIF decoding compatibility
return [[self class] canDecodeFromHEIFFormat];
default:
return YES;
}
}
- (UIImage *)decodedImageWithData:(NSData *)data options:(nullable SDImageCoderOptions *)options {
if (!data) {
return nil;
}
CGFloat scale = 1;
NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor];
if (scaleFactor != nil) {
scale = [scaleFactor doubleValue];
if (scale < 1) {
scale = 1;
}
}
UIImage *image = [[UIImage alloc] initWithData:data scale:scale];
image.sd_imageFormat = [NSData sd_imageFormatForImageData:data];
return image;
}
#pragma mark - Progressive Decode
- (BOOL)canIncrementalDecodeFromData:(NSData *)data {
return [self canDecodeFromData:data];
}
- (instancetype)initIncrementalWithOptions:(nullable SDImageCoderOptions *)options {
self = [super init];
if (self) {
_imageSource = CGImageSourceCreateIncremental(NULL);
CGFloat scale = 1;
NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor];
if (scaleFactor != nil) {
scale = [scaleFactor doubleValue];
if (scale < 1) {
scale = 1;
}
}
_scale = scale;
#if SD_UIKIT
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
#endif
}
return self;
}
- (void)updateIncrementalData:(NSData *)data finished:(BOOL)finished {
if (_finished) {
return;
}
_finished = finished;
// The following code is from http://www.cocoaintheshell.com/2011/05/progressive-images-download-imageio/
// Thanks to the author @Nyx0uf
// Update the data source, we must pass ALL the data, not just the new bytes
CGImageSourceUpdateData(_imageSource, (__bridge CFDataRef)data, finished);
if (_width + _height == 0) {
CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(_imageSource, 0, NULL);
if (properties) {
NSInteger orientationValue = 1;
CFTypeRef val = CFDictionaryGetValue(properties, kCGImagePropertyPixelHeight);
if (val) CFNumberGetValue(val, kCFNumberLongType, &_height);
val = CFDictionaryGetValue(properties, kCGImagePropertyPixelWidth);
if (val) CFNumberGetValue(val, kCFNumberLongType, &_width);
val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation);
if (val) CFNumberGetValue(val, kCFNumberNSIntegerType, &orientationValue);
CFRelease(properties);
// When we draw to Core Graphics, we lose orientation information,
// which means the image below born of initWithCGIImage will be
// oriented incorrectly sometimes. (Unlike the image born of initWithData
// in didCompleteWithError.) So save it here and pass it on later.
_orientation = (CGImagePropertyOrientation)orientationValue;
}
}
}
- (UIImage *)incrementalDecodedImageWithOptions:(SDImageCoderOptions *)options {
UIImage *image;
if (_width + _height > 0) {
// Create the image
CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(_imageSource, 0, NULL);
if (partialImageRef) {
CGFloat scale = _scale;
NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor];
if (scaleFactor != nil) {
scale = [scaleFactor doubleValue];
if (scale < 1) {
scale = 1;
}
}
#if SD_UIKIT || SD_WATCH
UIImageOrientation imageOrientation = [SDImageCoderHelper imageOrientationFromEXIFOrientation:_orientation];
image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:imageOrientation];
#else
image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:_orientation];
#endif
CGImageRelease(partialImageRef);
CFStringRef uttype = CGImageSourceGetType(_imageSource);
image.sd_imageFormat = [NSData sd_imageFormatFromUTType:uttype];
}
}
return image;
}
#pragma mark - Encode
- (BOOL)canEncodeToFormat:(SDImageFormat)format {
switch (format) {
case SDImageFormatWebP:
// Do not support WebP encoding
return NO;
case SDImageFormatHEIC:
// Check HEIC encoding compatibility
return [[self class] canEncodeToHEICFormat];
case SDImageFormatHEIF:
// Check HEIF encoding compatibility
return [[self class] canEncodeToHEIFFormat];
default:
return YES;
}
}
- (NSData *)encodedDataWithImage:(UIImage *)image format:(SDImageFormat)format options:(nullable SDImageCoderOptions *)options {
if (!image) {
return nil;
}
if (format == SDImageFormatUndefined) {
BOOL hasAlpha = [SDImageCoderHelper CGImageContainsAlpha:image.CGImage];
if (hasAlpha) {
format = SDImageFormatPNG;
} else {
format = SDImageFormatJPEG;
}
}
NSMutableData *imageData = [NSMutableData data];
CFStringRef imageUTType = [NSData sd_UTTypeFromImageFormat:format];
// Create an image destination.
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, 1, NULL);
if (!imageDestination) {
// Handle failure.
return nil;
}
NSMutableDictionary *properties = [NSMutableDictionary dictionary];
#if SD_UIKIT || SD_WATCH
CGImagePropertyOrientation exifOrientation = [SDImageCoderHelper exifOrientationFromImageOrientation:image.imageOrientation];
#else
CGImagePropertyOrientation exifOrientation = kCGImagePropertyOrientationUp;
#endif
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
double compressionQuality = 1;
if (options[SDImageCoderEncodeCompressionQuality]) {
compressionQuality = [options[SDImageCoderEncodeCompressionQuality] doubleValue];
}
properties[(__bridge NSString *)kCGImageDestinationLossyCompressionQuality] = @(compressionQuality);
// Add your image to the destination.
CGImageDestinationAddImage(imageDestination, image.CGImage, (__bridge CFDictionaryRef)properties);
// Finalize the destination.
if (CGImageDestinationFinalize(imageDestination) == NO) {
// Handle failure.
imageData = nil;
}
CFRelease(imageDestination);
return [imageData copy];
}
+ (BOOL)canDecodeFromFormat:(SDImageFormat)format {
CFStringRef imageUTType = [NSData sd_UTTypeFromImageFormat:format];
NSArray *imageUTTypes = (__bridge_transfer NSArray *)CGImageSourceCopyTypeIdentifiers();
if ([imageUTTypes containsObject:(__bridge NSString *)(imageUTType)]) {
return YES;
}
return NO;
}
+ (BOOL)canDecodeFromHEICFormat {
static BOOL canDecode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
canDecode = [self canDecodeFromFormat:SDImageFormatHEIC];
});
return canDecode;
}
+ (BOOL)canDecodeFromHEIFFormat {
static BOOL canDecode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
canDecode = [self canDecodeFromFormat:SDImageFormatHEIF];
});
return canDecode;
}
+ (BOOL)canEncodeToFormat:(SDImageFormat)format {
NSMutableData *imageData = [NSMutableData data];
CFStringRef imageUTType = [NSData sd_UTTypeFromImageFormat:format];
// Create an image destination.
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, 1, NULL);
if (!imageDestination) {
// Can't encode to HEIC
return NO;
} else {
// Can encode to HEIC
CFRelease(imageDestination);
return YES;
}
}
+ (BOOL)canEncodeToHEICFormat {
static BOOL canEncode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
canEncode = [self canEncodeToFormat:SDImageFormatHEIC];
});
return canEncode;
}
+ (BOOL)canEncodeToHEIFFormat {
static BOOL canEncode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
canEncode = [self canEncodeToFormat:SDImageFormatHEIF];
});
return canEncode;
}
@end
| {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: eb653fae43f6c01418585d0db5caaabe
timeCreated: 1503273298
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
// Package scheduler implements the Azure ARM Scheduler service API version 2016-03-01.
//
//
package scheduler
// Copyright (c) Microsoft and contributors. 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.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
)
const (
// DefaultBaseURI is the default URI used for the service Scheduler
DefaultBaseURI = "https://management.azure.com"
)
// ManagementClient is the base client for Scheduler.
type ManagementClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the ManagementClient client.
func New(subscriptionID string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}
| {
"pile_set_name": "Github"
} |
/**
******************************************************************************
* @file stm32f1xx_hal_uart.h
* @author MCD Application Team
* @brief Header file of UART HAL module.
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F1xx_HAL_UART_H
#define __STM32F1xx_HAL_UART_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal_def.h"
/** @addtogroup STM32F1xx_HAL_Driver
* @{
*/
/** @addtogroup UART
* @{
*/
/* Exported types ------------------------------------------------------------*/
/** @defgroup UART_Exported_Types UART Exported Types
* @{
*/
/**
* @brief UART Init Structure definition
*/
typedef struct
{
uint32_t BaudRate; /*!< This member configures the UART communication baud rate.
The baud rate is computed using the following formula:
- IntegerDivider = ((PCLKx) / (16 * (huart->Init.BaudRate)))
- FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 16) + 0.5 */
uint32_t WordLength; /*!< Specifies the number of data bits transmitted or received in a frame.
This parameter can be a value of @ref UART_Word_Length */
uint32_t StopBits; /*!< Specifies the number of stop bits transmitted.
This parameter can be a value of @ref UART_Stop_Bits */
uint32_t Parity; /*!< Specifies the parity mode.
This parameter can be a value of @ref UART_Parity
@note When parity is enabled, the computed parity is inserted
at the MSB position of the transmitted data (9th bit when
the word length is set to 9 data bits; 8th bit when the
word length is set to 8 data bits). */
uint32_t Mode; /*!< Specifies whether the Receive or Transmit mode is enabled or disabled.
This parameter can be a value of @ref UART_Mode */
uint32_t HwFlowCtl; /*!< Specifies whether the hardware flow control mode is enabled or disabled.
This parameter can be a value of @ref UART_Hardware_Flow_Control */
uint32_t OverSampling; /*!< Specifies whether the Over sampling 8 is enabled or disabled, to achieve higher speed (up to fPCLK/8).
This parameter can be a value of @ref UART_Over_Sampling. This feature is only available
on STM32F100xx family, so OverSampling parameter should always be set to 16. */
} UART_InitTypeDef;
/**
* @brief HAL UART State structures definition
* @note HAL UART State value is a combination of 2 different substates: gState and RxState.
* - gState contains UART state information related to global Handle management
* and also information related to Tx operations.
* gState value coding follow below described bitmap :
* b7-b6 Error information
* 00 : No Error
* 01 : (Not Used)
* 10 : Timeout
* 11 : Error
* b5 Peripheral initialization status
* 0 : Reset (Peripheral not initialized)
* 1 : Init done (Peripheral not initialized. HAL UART Init function already called)
* b4-b3 (not used)
* xx : Should be set to 00
* b2 Intrinsic process state
* 0 : Ready
* 1 : Busy (Peripheral busy with some configuration or internal operations)
* b1 (not used)
* x : Should be set to 0
* b0 Tx state
* 0 : Ready (no Tx operation ongoing)
* 1 : Busy (Tx operation ongoing)
* - RxState contains information related to Rx operations.
* RxState value coding follow below described bitmap :
* b7-b6 (not used)
* xx : Should be set to 00
* b5 Peripheral initialization status
* 0 : Reset (Peripheral not initialized)
* 1 : Init done (Peripheral not initialized)
* b4-b2 (not used)
* xxx : Should be set to 000
* b1 Rx state
* 0 : Ready (no Rx operation ongoing)
* 1 : Busy (Rx operation ongoing)
* b0 (not used)
* x : Should be set to 0.
*/
typedef enum
{
HAL_UART_STATE_RESET = 0x00U, /*!< Peripheral is not yet Initialized
Value is allowed for gState and RxState */
HAL_UART_STATE_READY = 0x20U, /*!< Peripheral Initialized and ready for use
Value is allowed for gState and RxState */
HAL_UART_STATE_BUSY = 0x24U, /*!< an internal process is ongoing
Value is allowed for gState only */
HAL_UART_STATE_BUSY_TX = 0x21U, /*!< Data Transmission process is ongoing
Value is allowed for gState only */
HAL_UART_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing
Value is allowed for RxState only */
HAL_UART_STATE_BUSY_TX_RX = 0x23U, /*!< Data Transmission and Reception process is ongoing
Not to be used for neither gState nor RxState.
Value is result of combination (Or) between gState and RxState values */
HAL_UART_STATE_TIMEOUT = 0xA0U, /*!< Timeout state
Value is allowed for gState only */
HAL_UART_STATE_ERROR = 0xE0U /*!< Error
Value is allowed for gState only */
} HAL_UART_StateTypeDef;
/**
* @brief UART handle Structure definition
*/
typedef struct __UART_HandleTypeDef
{
USART_TypeDef *Instance; /*!< UART registers base address */
UART_InitTypeDef Init; /*!< UART communication parameters */
uint8_t *pTxBuffPtr; /*!< Pointer to UART Tx transfer Buffer */
uint16_t TxXferSize; /*!< UART Tx Transfer size */
__IO uint16_t TxXferCount; /*!< UART Tx Transfer Counter */
uint8_t *pRxBuffPtr; /*!< Pointer to UART Rx transfer Buffer */
uint16_t RxXferSize; /*!< UART Rx Transfer size */
__IO uint16_t RxXferCount; /*!< UART Rx Transfer Counter */
DMA_HandleTypeDef *hdmatx; /*!< UART Tx DMA Handle parameters */
DMA_HandleTypeDef *hdmarx; /*!< UART Rx DMA Handle parameters */
HAL_LockTypeDef Lock; /*!< Locking object */
__IO HAL_UART_StateTypeDef gState; /*!< UART state information related to global Handle management
and also related to Tx operations.
This parameter can be a value of @ref HAL_UART_StateTypeDef */
__IO HAL_UART_StateTypeDef RxState; /*!< UART state information related to Rx operations.
This parameter can be a value of @ref HAL_UART_StateTypeDef */
__IO uint32_t ErrorCode; /*!< UART Error code */
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
void (* TxHalfCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Tx Half Complete Callback */
void (* TxCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Tx Complete Callback */
void (* RxHalfCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Rx Half Complete Callback */
void (* RxCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Rx Complete Callback */
void (* ErrorCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Error Callback */
void (* AbortCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Abort Complete Callback */
void (* AbortTransmitCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Abort Transmit Complete Callback */
void (* AbortReceiveCpltCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Abort Receive Complete Callback */
void (* WakeupCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Wakeup Callback */
void (* MspInitCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Msp Init callback */
void (* MspDeInitCallback)(struct __UART_HandleTypeDef *huart); /*!< UART Msp DeInit callback */
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
} UART_HandleTypeDef;
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/**
* @brief HAL UART Callback ID enumeration definition
*/
typedef enum
{
HAL_UART_TX_HALFCOMPLETE_CB_ID = 0x00U, /*!< UART Tx Half Complete Callback ID */
HAL_UART_TX_COMPLETE_CB_ID = 0x01U, /*!< UART Tx Complete Callback ID */
HAL_UART_RX_HALFCOMPLETE_CB_ID = 0x02U, /*!< UART Rx Half Complete Callback ID */
HAL_UART_RX_COMPLETE_CB_ID = 0x03U, /*!< UART Rx Complete Callback ID */
HAL_UART_ERROR_CB_ID = 0x04U, /*!< UART Error Callback ID */
HAL_UART_ABORT_COMPLETE_CB_ID = 0x05U, /*!< UART Abort Complete Callback ID */
HAL_UART_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x06U, /*!< UART Abort Transmit Complete Callback ID */
HAL_UART_ABORT_RECEIVE_COMPLETE_CB_ID = 0x07U, /*!< UART Abort Receive Complete Callback ID */
HAL_UART_WAKEUP_CB_ID = 0x08U, /*!< UART Wakeup Callback ID */
HAL_UART_MSPINIT_CB_ID = 0x0BU, /*!< UART MspInit callback ID */
HAL_UART_MSPDEINIT_CB_ID = 0x0CU /*!< UART MspDeInit callback ID */
} HAL_UART_CallbackIDTypeDef;
/**
* @brief HAL UART Callback pointer definition
*/
typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart); /*!< pointer to an UART callback function */
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
/**
* @}
*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup UART_Exported_Constants UART Exported Constants
* @{
*/
/** @defgroup UART_Error_Code UART Error Code
* @{
*/
#define HAL_UART_ERROR_NONE 0x00000000U /*!< No error */
#define HAL_UART_ERROR_PE 0x00000001U /*!< Parity error */
#define HAL_UART_ERROR_NE 0x00000002U /*!< Noise error */
#define HAL_UART_ERROR_FE 0x00000004U /*!< Frame error */
#define HAL_UART_ERROR_ORE 0x00000008U /*!< Overrun error */
#define HAL_UART_ERROR_DMA 0x00000010U /*!< DMA transfer error */
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
#define HAL_UART_ERROR_INVALID_CALLBACK 0x00000020U /*!< Invalid Callback error */
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
/**
* @}
*/
/** @defgroup UART_Word_Length UART Word Length
* @{
*/
#define UART_WORDLENGTH_8B 0x00000000U
#define UART_WORDLENGTH_9B ((uint32_t)USART_CR1_M)
/**
* @}
*/
/** @defgroup UART_Stop_Bits UART Number of Stop Bits
* @{
*/
#define UART_STOPBITS_1 0x00000000U
#define UART_STOPBITS_2 ((uint32_t)USART_CR2_STOP_1)
/**
* @}
*/
/** @defgroup UART_Parity UART Parity
* @{
*/
#define UART_PARITY_NONE 0x00000000U
#define UART_PARITY_EVEN ((uint32_t)USART_CR1_PCE)
#define UART_PARITY_ODD ((uint32_t)(USART_CR1_PCE | USART_CR1_PS))
/**
* @}
*/
/** @defgroup UART_Hardware_Flow_Control UART Hardware Flow Control
* @{
*/
#define UART_HWCONTROL_NONE 0x00000000U
#define UART_HWCONTROL_RTS ((uint32_t)USART_CR3_RTSE)
#define UART_HWCONTROL_CTS ((uint32_t)USART_CR3_CTSE)
#define UART_HWCONTROL_RTS_CTS ((uint32_t)(USART_CR3_RTSE | USART_CR3_CTSE))
/**
* @}
*/
/** @defgroup UART_Mode UART Transfer Mode
* @{
*/
#define UART_MODE_RX ((uint32_t)USART_CR1_RE)
#define UART_MODE_TX ((uint32_t)USART_CR1_TE)
#define UART_MODE_TX_RX ((uint32_t)(USART_CR1_TE | USART_CR1_RE))
/**
* @}
*/
/** @defgroup UART_State UART State
* @{
*/
#define UART_STATE_DISABLE 0x00000000U
#define UART_STATE_ENABLE ((uint32_t)USART_CR1_UE)
/**
* @}
*/
/** @defgroup UART_Over_Sampling UART Over Sampling
* @{
*/
#define UART_OVERSAMPLING_16 0x00000000U
#if defined(USART_CR1_OVER8)
#define UART_OVERSAMPLING_8 ((uint32_t)USART_CR1_OVER8)
#endif /* USART_CR1_OVER8 */
/**
* @}
*/
/** @defgroup UART_LIN_Break_Detection_Length UART LIN Break Detection Length
* @{
*/
#define UART_LINBREAKDETECTLENGTH_10B 0x00000000U
#define UART_LINBREAKDETECTLENGTH_11B ((uint32_t)USART_CR2_LBDL)
/**
* @}
*/
/** @defgroup UART_WakeUp_functions UART Wakeup Functions
* @{
*/
#define UART_WAKEUPMETHOD_IDLELINE 0x00000000U
#define UART_WAKEUPMETHOD_ADDRESSMARK ((uint32_t)USART_CR1_WAKE)
/**
* @}
*/
/** @defgroup UART_Flags UART FLags
* Elements values convention: 0xXXXX
* - 0xXXXX : Flag mask in the SR register
* @{
*/
#define UART_FLAG_CTS ((uint32_t)USART_SR_CTS)
#define UART_FLAG_LBD ((uint32_t)USART_SR_LBD)
#define UART_FLAG_TXE ((uint32_t)USART_SR_TXE)
#define UART_FLAG_TC ((uint32_t)USART_SR_TC)
#define UART_FLAG_RXNE ((uint32_t)USART_SR_RXNE)
#define UART_FLAG_IDLE ((uint32_t)USART_SR_IDLE)
#define UART_FLAG_ORE ((uint32_t)USART_SR_ORE)
#define UART_FLAG_NE ((uint32_t)USART_SR_NE)
#define UART_FLAG_FE ((uint32_t)USART_SR_FE)
#define UART_FLAG_PE ((uint32_t)USART_SR_PE)
/**
* @}
*/
/** @defgroup UART_Interrupt_definition UART Interrupt Definitions
* Elements values convention: 0xY000XXXX
* - XXXX : Interrupt mask (16 bits) in the Y register
* - Y : Interrupt source register (2bits)
* - 0001: CR1 register
* - 0010: CR2 register
* - 0011: CR3 register
* @{
*/
#define UART_IT_PE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_PEIE))
#define UART_IT_TXE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_TXEIE))
#define UART_IT_TC ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_TCIE))
#define UART_IT_RXNE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_RXNEIE))
#define UART_IT_IDLE ((uint32_t)(UART_CR1_REG_INDEX << 28U | USART_CR1_IDLEIE))
#define UART_IT_LBD ((uint32_t)(UART_CR2_REG_INDEX << 28U | USART_CR2_LBDIE))
#define UART_IT_CTS ((uint32_t)(UART_CR3_REG_INDEX << 28U | USART_CR3_CTSIE))
#define UART_IT_ERR ((uint32_t)(UART_CR3_REG_INDEX << 28U | USART_CR3_EIE))
/**
* @}
*/
/**
* @}
*/
/* Exported macro ------------------------------------------------------------*/
/** @defgroup UART_Exported_Macros UART Exported Macros
* @{
*/
/** @brief Reset UART handle gstate & RxState
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
(__HANDLE__)->gState = HAL_UART_STATE_RESET; \
(__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
(__HANDLE__)->MspInitCallback = NULL; \
(__HANDLE__)->MspDeInitCallback = NULL; \
} while(0U)
#else
#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
(__HANDLE__)->gState = HAL_UART_STATE_RESET; \
(__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
} while(0U)
#endif /*USE_HAL_UART_REGISTER_CALLBACKS */
/** @brief Flushes the UART DR register
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
*/
#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) ((__HANDLE__)->Instance->DR)
/** @brief Checks whether the specified UART flag is set or not.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @param __FLAG__ specifies the flag to check.
* This parameter can be one of the following values:
* @arg UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5)
* @arg UART_FLAG_LBD: LIN Break detection flag
* @arg UART_FLAG_TXE: Transmit data register empty flag
* @arg UART_FLAG_TC: Transmission Complete flag
* @arg UART_FLAG_RXNE: Receive data register not empty flag
* @arg UART_FLAG_IDLE: Idle Line detection flag
* @arg UART_FLAG_ORE: Overrun Error flag
* @arg UART_FLAG_NE: Noise Error flag
* @arg UART_FLAG_FE: Framing Error flag
* @arg UART_FLAG_PE: Parity Error flag
* @retval The new state of __FLAG__ (TRUE or FALSE).
*/
#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
/** @brief Clears the specified UART pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @param __FLAG__ specifies the flag to check.
* This parameter can be any combination of the following values:
* @arg UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5).
* @arg UART_FLAG_LBD: LIN Break detection flag.
* @arg UART_FLAG_TC: Transmission Complete flag.
* @arg UART_FLAG_RXNE: Receive data register not empty flag.
*
* @note PE (Parity error), FE (Framing error), NE (Noise error), ORE (Overrun
* error) and IDLE (Idle line detected) flags are cleared by software
* sequence: a read operation to USART_SR register followed by a read
* operation to USART_DR register.
* @note RXNE flag can be also cleared by a read to the USART_DR register.
* @note TC flag can be also cleared by software sequence: a read operation to
* USART_SR register followed by a write operation to USART_DR register.
* @note TXE flag is cleared only by a write to the USART_DR register.
*
* @retval None
*/
#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
/** @brief Clears the UART PE pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__) \
do{ \
__IO uint32_t tmpreg = 0x00U; \
tmpreg = (__HANDLE__)->Instance->SR; \
tmpreg = (__HANDLE__)->Instance->DR; \
UNUSED(tmpreg); \
} while(0U)
/** @brief Clears the UART FE pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
/** @brief Clears the UART NE pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
/** @brief Clears the UART ORE pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
/** @brief Clears the UART IDLE pending flag.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @retval None
*/
#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
/** @brief Enable the specified UART interrupt.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @param __INTERRUPT__ specifies the UART interrupt source to enable.
* This parameter can be one of the following values:
* @arg UART_IT_CTS: CTS change interrupt
* @arg UART_IT_LBD: LIN Break detection interrupt
* @arg UART_IT_TXE: Transmit Data Register empty interrupt
* @arg UART_IT_TC: Transmission complete interrupt
* @arg UART_IT_RXNE: Receive Data register not empty interrupt
* @arg UART_IT_IDLE: Idle line detection interrupt
* @arg UART_IT_PE: Parity Error interrupt
* @arg UART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
* @retval None
*/
#define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28U) == UART_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & UART_IT_MASK)): \
(((__INTERRUPT__) >> 28U) == UART_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 |= ((__INTERRUPT__) & UART_IT_MASK)): \
((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & UART_IT_MASK)))
/** @brief Disable the specified UART interrupt.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @param __INTERRUPT__ specifies the UART interrupt source to disable.
* This parameter can be one of the following values:
* @arg UART_IT_CTS: CTS change interrupt
* @arg UART_IT_LBD: LIN Break detection interrupt
* @arg UART_IT_TXE: Transmit Data Register empty interrupt
* @arg UART_IT_TC: Transmission complete interrupt
* @arg UART_IT_RXNE: Receive Data register not empty interrupt
* @arg UART_IT_IDLE: Idle line detection interrupt
* @arg UART_IT_PE: Parity Error interrupt
* @arg UART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
* @retval None
*/
#define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((((__INTERRUPT__) >> 28U) == UART_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
(((__INTERRUPT__) >> 28U) == UART_CR2_REG_INDEX)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & UART_IT_MASK)): \
((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & UART_IT_MASK)))
/** @brief Checks whether the specified UART interrupt has occurred or not.
* @param __HANDLE__ specifies the UART Handle.
* UART Handle selects the USARTx or UARTy peripheral
* (USART,UART availability and x,y values depending on device).
* @param __IT__ specifies the UART interrupt source to check.
* This parameter can be one of the following values:
* @arg UART_IT_CTS: CTS change interrupt (not available for UART4 and UART5)
* @arg UART_IT_LBD: LIN Break detection interrupt
* @arg UART_IT_TXE: Transmit Data Register empty interrupt
* @arg UART_IT_TC: Transmission complete interrupt
* @arg UART_IT_RXNE: Receive Data register not empty interrupt
* @arg UART_IT_IDLE: Idle line detection interrupt
* @arg UART_IT_ERR: Error interrupt
* @retval The new state of __IT__ (TRUE or FALSE).
*/
#define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__) (((((__IT__) >> 28U) == UART_CR1_REG_INDEX)? (__HANDLE__)->Instance->CR1:(((((uint32_t)(__IT__)) >> 28U) == UART_CR2_REG_INDEX)? \
(__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (((uint32_t)(__IT__)) & UART_IT_MASK))
/** @brief Enable CTS flow control
* @note This macro allows to enable CTS hardware flow control for a given UART instance,
* without need to call HAL_UART_Init() function.
* As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
* @note As macro is expected to be used for modifying CTS Hw flow control feature activation, without need
* for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
* - macro could only be called when corresponding UART instance is disabled (i.e __HAL_UART_DISABLE(__HANDLE__))
* and should be followed by an Enable macro (i.e __HAL_UART_ENABLE(__HANDLE__)).
* @param __HANDLE__ specifies the UART Handle.
* The Handle Instance can be any USARTx (supporting the HW Flow control feature).
* It is used to select the USART peripheral (USART availability and x value depending on device).
* @retval None
*/
#define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) \
do{ \
SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \
} while(0U)
/** @brief Disable CTS flow control
* @note This macro allows to disable CTS hardware flow control for a given UART instance,
* without need to call HAL_UART_Init() function.
* As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
* @note As macro is expected to be used for modifying CTS Hw flow control feature activation, without need
* for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
* - macro could only be called when corresponding UART instance is disabled (i.e __HAL_UART_DISABLE(__HANDLE__))
* and should be followed by an Enable macro (i.e __HAL_UART_ENABLE(__HANDLE__)).
* @param __HANDLE__ specifies the UART Handle.
* The Handle Instance can be any USARTx (supporting the HW Flow control feature).
* It is used to select the USART peripheral (USART availability and x value depending on device).
* @retval None
*/
#define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) \
do{ \
CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \
} while(0U)
/** @brief Enable RTS flow control
* This macro allows to enable RTS hardware flow control for a given UART instance,
* without need to call HAL_UART_Init() function.
* As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
* @note As macro is expected to be used for modifying RTS Hw flow control feature activation, without need
* for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
* - macro could only be called when corresponding UART instance is disabled (i.e __HAL_UART_DISABLE(__HANDLE__))
* and should be followed by an Enable macro (i.e __HAL_UART_ENABLE(__HANDLE__)).
* @param __HANDLE__ specifies the UART Handle.
* The Handle Instance can be any USARTx (supporting the HW Flow control feature).
* It is used to select the USART peripheral (USART availability and x value depending on device).
* @retval None
*/
#define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) \
do{ \
SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \
} while(0U)
/** @brief Disable RTS flow control
* This macro allows to disable RTS hardware flow control for a given UART instance,
* without need to call HAL_UART_Init() function.
* As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
* @note As macro is expected to be used for modifying RTS Hw flow control feature activation, without need
* for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
* - macro could only be called when corresponding UART instance is disabled (i.e __HAL_UART_DISABLE(__HANDLE__))
* and should be followed by an Enable macro (i.e __HAL_UART_ENABLE(__HANDLE__)).
* @param __HANDLE__ specifies the UART Handle.
* The Handle Instance can be any USARTx (supporting the HW Flow control feature).
* It is used to select the USART peripheral (USART availability and x value depending on device).
* @retval None
*/
#define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) \
do{ \
CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \
} while(0U)
#if defined(USART_CR3_ONEBIT)
/** @brief Macro to enable the UART's one bit sample method
* @param __HANDLE__ specifies the UART Handle.
* @retval None
*/
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
/** @brief Macro to disable the UART's one bit sample method
* @param __HANDLE__ specifies the UART Handle.
* @retval None
*/
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT))
#endif /* UART_ONE_BIT_SAMPLE_Feature */
/** @brief Enable UART
* @param __HANDLE__ specifies the UART Handle.
* @retval None
*/
#define __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
/** @brief Disable UART
* @param __HANDLE__ specifies the UART Handle.
* @retval None
*/
#define __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
/**
* @}
*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup UART_Exported_Functions
* @{
*/
/** @addtogroup UART_Exported_Functions_Group1 Initialization and de-initialization functions
* @{
*/
/* Initialization/de-initialization functions **********************************/
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_HalfDuplex_Init(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);
HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod);
HAL_StatusTypeDef HAL_UART_DeInit(UART_HandleTypeDef *huart);
void HAL_UART_MspInit(UART_HandleTypeDef *huart);
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart);
/* Callbacks Register/UnRegister functions ***********************************/
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
HAL_StatusTypeDef HAL_UART_RegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID, pUART_CallbackTypeDef pCallback);
HAL_StatusTypeDef HAL_UART_UnRegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID);
#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
/**
* @}
*/
/** @addtogroup UART_Exported_Functions_Group2 IO operation functions
* @{
*/
/* IO operation functions *******************************************************/
HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_UART_DMAPause(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_DMAResume(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart);
/* Transfer Abort functions */
HAL_StatusTypeDef HAL_UART_Abort(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_AbortTransmit(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_AbortReceive(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_Abort_IT(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_AbortTransmit_IT(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart);
void HAL_UART_IRQHandler(UART_HandleTypeDef *huart);
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart);
void HAL_UART_AbortCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_AbortTransmitCpltCallback(UART_HandleTypeDef *huart);
void HAL_UART_AbortReceiveCpltCallback(UART_HandleTypeDef *huart);
/**
* @}
*/
/** @addtogroup UART_Exported_Functions_Group3
* @{
*/
/* Peripheral Control functions ************************************************/
HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_MultiProcessor_EnterMuteMode(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_MultiProcessor_ExitMuteMode(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter(UART_HandleTypeDef *huart);
HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver(UART_HandleTypeDef *huart);
/**
* @}
*/
/** @addtogroup UART_Exported_Functions_Group4
* @{
*/
/* Peripheral State functions **************************************************/
HAL_UART_StateTypeDef HAL_UART_GetState(UART_HandleTypeDef *huart);
uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart);
/**
* @}
*/
/**
* @}
*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/** @defgroup UART_Private_Constants UART Private Constants
* @{
*/
/** @brief UART interruptions flag mask
*
*/
#define UART_IT_MASK 0x0000FFFFU
#define UART_CR1_REG_INDEX 1U
#define UART_CR2_REG_INDEX 2U
#define UART_CR3_REG_INDEX 3U
/**
* @}
*/
/* Private macros ------------------------------------------------------------*/
/** @defgroup UART_Private_Macros UART Private Macros
* @{
*/
#define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B) || \
((LENGTH) == UART_WORDLENGTH_9B))
#define IS_UART_LIN_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B))
#define IS_UART_STOPBITS(STOPBITS) (((STOPBITS) == UART_STOPBITS_1) || \
((STOPBITS) == UART_STOPBITS_2))
#define IS_UART_PARITY(PARITY) (((PARITY) == UART_PARITY_NONE) || \
((PARITY) == UART_PARITY_EVEN) || \
((PARITY) == UART_PARITY_ODD))
#define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL)\
(((CONTROL) == UART_HWCONTROL_NONE) || \
((CONTROL) == UART_HWCONTROL_RTS) || \
((CONTROL) == UART_HWCONTROL_CTS) || \
((CONTROL) == UART_HWCONTROL_RTS_CTS))
#define IS_UART_MODE(MODE) ((((MODE) & 0x0000FFF3U) == 0x00U) && ((MODE) != 0x00U))
#define IS_UART_STATE(STATE) (((STATE) == UART_STATE_DISABLE) || \
((STATE) == UART_STATE_ENABLE))
#if defined(USART_CR1_OVER8)
#define IS_UART_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16) || \
((SAMPLING) == UART_OVERSAMPLING_8))
#endif /* USART_CR1_OVER8 */
#define IS_UART_LIN_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16))
#define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH) (((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \
((LENGTH) == UART_LINBREAKDETECTLENGTH_11B))
#define IS_UART_WAKEUPMETHOD(WAKEUP) (((WAKEUP) == UART_WAKEUPMETHOD_IDLELINE) || \
((WAKEUP) == UART_WAKEUPMETHOD_ADDRESSMARK))
#define IS_UART_BAUDRATE(BAUDRATE) ((BAUDRATE) <= 4500000U)
#define IS_UART_ADDRESS(ADDRESS) ((ADDRESS) <= 0x0FU)
#define UART_DIV_SAMPLING16(_PCLK_, _BAUD_) (((_PCLK_)*25U)/(4U*(_BAUD_)))
#define UART_DIVMANT_SAMPLING16(_PCLK_, _BAUD_) (UART_DIV_SAMPLING16((_PCLK_), (_BAUD_))/100U)
#define UART_DIVFRAQ_SAMPLING16(_PCLK_, _BAUD_) (((UART_DIV_SAMPLING16((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) * 100U)) * 16U + 50U) / 100U)
/* UART BRR = mantissa + overflow + fraction
= (UART DIVMANT << 4) + (UART DIVFRAQ & 0xF0) + (UART DIVFRAQ & 0x0FU) */
#define UART_BRR_SAMPLING16(_PCLK_, _BAUD_) (((UART_DIVMANT_SAMPLING16((_PCLK_), (_BAUD_)) << 4U) + \
(UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0xF0U)) + \
(UART_DIVFRAQ_SAMPLING16((_PCLK_), (_BAUD_)) & 0x0FU))
#define UART_DIV_SAMPLING8(_PCLK_, _BAUD_) (((_PCLK_)*25U)/(2U*(_BAUD_)))
#define UART_DIVMANT_SAMPLING8(_PCLK_, _BAUD_) (UART_DIV_SAMPLING8((_PCLK_), (_BAUD_))/100U)
#define UART_DIVFRAQ_SAMPLING8(_PCLK_, _BAUD_) (((UART_DIV_SAMPLING8((_PCLK_), (_BAUD_)) - (UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) * 100U)) * 8U + 50U) / 100U)
/* UART BRR = mantissa + overflow + fraction
= (UART DIVMANT << 4) + ((UART DIVFRAQ & 0xF8) << 1) + (UART DIVFRAQ & 0x07U) */
#define UART_BRR_SAMPLING8(_PCLK_, _BAUD_) (((UART_DIVMANT_SAMPLING8((_PCLK_), (_BAUD_)) << 4U) + \
((UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0xF8U) << 1U)) + \
(UART_DIVFRAQ_SAMPLING8((_PCLK_), (_BAUD_)) & 0x07U))
/**
* @}
*/
/* Private functions ---------------------------------------------------------*/
/** @defgroup UART_Private_Functions UART Private Functions
* @{
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __STM32F1xx_HAL_UART_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
| {
"pile_set_name": "Github"
} |
{
"name": "App",
"icons": [
{
"src": "/inc/images/favicon/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/inc\/images\/favicon\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/inc\/images\/favicon\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/inc\/images\/favicon\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/inc\/images\/favicon\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/inc\/images\/favicon\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2013 Altera Corporation <www.altera.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <errno.h>
#include <asm/io.h>
#include <asm/arch/freeze_controller.h>
#include <asm/arch/scan_manager.h>
#include <asm/arch/system_manager.h>
/*
* Maximum polling loop to wait for IO scan chain engine becomes idle
* to prevent infinite loop. It is important that this is NOT changed
* to delay using timer functions, since at the time this function is
* called, timer might not yet be inited.
*/
#define SCANMGR_MAX_DELAY 100
/*
* Maximum length of TDI_TDO packet payload is 128 bits,
* represented by (length - 1) in TDI_TDO header.
*/
#define TDI_TDO_MAX_PAYLOAD 127
#define SCANMGR_STAT_ACTIVE (1 << 31)
#define SCANMGR_STAT_WFIFOCNT_MASK 0x70000000
DECLARE_GLOBAL_DATA_PTR;
static const struct socfpga_scan_manager *scan_manager_base =
(void *)(SOCFPGA_SCANMGR_ADDRESS);
static const struct socfpga_freeze_controller *freeze_controller_base =
(void *)(SOCFPGA_SYSMGR_ADDRESS + SYSMGR_FRZCTRL_ADDRESS);
static struct socfpga_system_manager *sys_mgr_base =
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
/**
* scan_chain_engine_is_idle() - Check if the JTAG scan chain is idle
* @max_iter: Maximum number of iterations to wait for idle
*
* Function to check IO scan chain engine status and wait if the engine is
* is active. Poll the IO scan chain engine till maximum iteration reached.
*/
static u32 scan_chain_engine_is_idle(u32 max_iter)
{
const u32 mask = SCANMGR_STAT_ACTIVE | SCANMGR_STAT_WFIFOCNT_MASK;
u32 status;
/* Poll the engine until the scan engine is inactive. */
do {
status = readl(&scan_manager_base->stat);
if (!(status & mask))
return 0;
} while (max_iter--);
return -ETIMEDOUT;
}
#define JTAG_BP_INSN (1 << 0)
#define JTAG_BP_TMS (1 << 1)
#define JTAG_BP_PAYLOAD (1 << 2)
#define JTAG_BP_2BYTE (1 << 3)
#define JTAG_BP_4BYTE (1 << 4)
/**
* scan_mgr_jtag_io() - Access the JTAG chain
* @flags: Control flags, used to configure the action on the JTAG
* @iarg: Instruction argument
* @parg: Payload argument or data
*
* Perform I/O on the JTAG chain
*/
static void scan_mgr_jtag_io(const u32 flags, const u8 iarg, const u32 parg)
{
u32 data = parg;
if (flags & JTAG_BP_INSN) { /* JTAG instruction */
/*
* The SCC JTAG register is LSB first, so make
* space for the instruction at the LSB.
*/
data <<= 8;
if (flags & JTAG_BP_TMS) {
data |= (0 << 7); /* TMS instruction. */
data |= iarg & 0x3f; /* TMS arg is 6 bits. */
if (flags & JTAG_BP_PAYLOAD)
data |= (1 << 6);
} else {
data |= (1 << 7); /* TDI/TDO instruction. */
data |= iarg & 0xf; /* TDI/TDO arg is 4 bits. */
if (flags & JTAG_BP_PAYLOAD)
data |= (1 << 4);
}
}
if (flags & JTAG_BP_4BYTE)
writel(data, &scan_manager_base->fifo_quad_byte);
else if (flags & JTAG_BP_2BYTE)
writel(data & 0xffff, &scan_manager_base->fifo_double_byte);
else
writel(data & 0xff, &scan_manager_base->fifo_single_byte);
}
/**
* scan_mgr_jtag_insn_data() - Send JTAG instruction and data
* @iarg: Instruction argument
* @data: Associated data
* @dlen: Length of data in bits
*
* This function is used when programming the IO chains to submit the
* instruction followed by variable length payload.
*/
static int
scan_mgr_jtag_insn_data(const u8 iarg, const unsigned long *data,
const unsigned int dlen)
{
int i, j;
scan_mgr_jtag_io(JTAG_BP_INSN | JTAG_BP_2BYTE, iarg, dlen - 1);
/* 32 bits or more remain */
for (i = 0; i < dlen / 32; i++)
scan_mgr_jtag_io(JTAG_BP_4BYTE, 0x0, data[i]);
if ((dlen % 32) > 24) { /* 31...24 bits remain */
scan_mgr_jtag_io(JTAG_BP_4BYTE, 0x0, data[i]);
} else if (dlen % 32) { /* 24...1 bit remain */
for (j = 0; j < dlen % 32; j += 8)
scan_mgr_jtag_io(0, 0x0, data[i] >> j);
}
return scan_chain_engine_is_idle(SCANMGR_MAX_DELAY);
}
/**
* scan_mgr_io_scan_chain_prg() - Program HPS IO Scan Chain
* @io_scan_chain_id: IO scan chain ID
*/
static int scan_mgr_io_scan_chain_prg(const unsigned int io_scan_chain_id)
{
u32 io_scan_chain_len_in_bits;
const unsigned long *iocsr_scan_chain;
unsigned int rem, idx = 0;
int ret;
ret = iocsr_get_config_table(io_scan_chain_id, &iocsr_scan_chain,
&io_scan_chain_len_in_bits);
if (ret)
return 1;
/*
* De-assert reinit if the IO scan chain is intended for HIO. In
* this, its the chain 3.
*/
if (io_scan_chain_id == 3)
clrbits_le32(&freeze_controller_base->hioctrl,
SYSMGR_FRZCTRL_HIOCTRL_DLLRST_MASK);
/*
* Check if the scan chain engine is inactive and the
* WFIFO is empty before enabling the IO scan chain
*/
ret = scan_chain_engine_is_idle(SCANMGR_MAX_DELAY);
if (ret)
return ret;
/*
* Enable IO Scan chain based on scan chain id
* Note: only one chain can be enabled at a time
*/
setbits_le32(&scan_manager_base->en, 1 << io_scan_chain_id);
/* Program IO scan chain. */
while (io_scan_chain_len_in_bits) {
if (io_scan_chain_len_in_bits > 128)
rem = 128;
else
rem = io_scan_chain_len_in_bits;
ret = scan_mgr_jtag_insn_data(0x0, &iocsr_scan_chain[idx], rem);
if (ret)
goto error;
io_scan_chain_len_in_bits -= rem;
idx += 4;
}
/* Disable IO Scan chain when configuration done*/
clrbits_le32(&scan_manager_base->en, 1 << io_scan_chain_id);
return 0;
error:
/* Disable IO Scan chain when error detected */
clrbits_le32(&scan_manager_base->en, 1 << io_scan_chain_id);
return ret;
}
int scan_mgr_configure_iocsr(void)
{
int status = 0;
/* configure the IOCSR through scan chain */
status |= scan_mgr_io_scan_chain_prg(0);
status |= scan_mgr_io_scan_chain_prg(1);
status |= scan_mgr_io_scan_chain_prg(2);
status |= scan_mgr_io_scan_chain_prg(3);
return status;
}
/**
* scan_mgr_get_fpga_id() - Obtain FPGA JTAG ID
*
* This function obtains JTAG ID from the FPGA TAP controller.
*/
u32 scan_mgr_get_fpga_id(void)
{
const unsigned long data = 0;
u32 id = 0xffffffff;
int ret;
/* Enable HPS to talk to JTAG in the FPGA through the System Manager */
writel(0x1, &sys_mgr_base->scanmgrgrp_ctrl);
/* Enable port 7 */
writel(0x80, &scan_manager_base->en);
/* write to CSW to make s2f_ntrst reset */
writel(0x02, &scan_manager_base->stat);
/* Add a pause */
mdelay(1);
/* write 0x00 to CSW to clear the s2f_ntrst */
writel(0, &scan_manager_base->stat);
/*
* Go to Test-Logic-Reset state.
* This sets TAP controller into IDCODE mode.
*/
scan_mgr_jtag_io(JTAG_BP_INSN | JTAG_BP_TMS, 0x1f | (1 << 5), 0x0);
/* Go to Run-Test/Idle -> DR-Scan -> Capture-DR -> Shift-DR state. */
scan_mgr_jtag_io(JTAG_BP_INSN | JTAG_BP_TMS, 0x02 | (1 << 4), 0x0);
/*
* Push 4 bytes of data through TDI->DR->TDO.
*
* Length of TDI data is 32bits (length - 1) and they are only
* zeroes as we care only for TDO data.
*/
ret = scan_mgr_jtag_insn_data(0x4, &data, 32);
/* Read 32 bit from captured JTAG data. */
if (!ret)
id = readl(&scan_manager_base->fifo_quad_byte);
/* Disable all port */
writel(0, &scan_manager_base->en);
writel(0, &sys_mgr_base->scanmgrgrp_ctrl);
return id;
}
| {
"pile_set_name": "Github"
} |
from string import ascii_lowercase, ascii_uppercase, digits
import toga
from toga.constants import COLUMN
from toga.style import Pack
EMPTY_PASSWORD = 'Empty password'
class TextInputApp(toga.App):
# Button callback functions
def do_extract_values(self, widget, **kwargs):
# Disable all the text inputs
self.text_input.enabled = False
self.password_input.enabled = False
self.number_input.enabled = False
# Update the labels with the extracted values
self.text_label.text = "Text content: {}".format(
self.text_input.value
)
self.password_label.text = "Your password is: {}".format(
self.password_input.value
)
number = self.number_input.value
if number:
self.number_label.text = "Double the number is: {}".format(number * 2)
else:
self.number_label.text = "You didn't enter a number"
# Wait 5 seconds
self.label.text = 'Counting down from 5...'
yield 1
self.label.text = 'Counting down from 4...'
yield 1
self.label.text = 'Counting down from 3...'
yield 1
self.label.text = 'Counting down from 2...'
yield 1
self.label.text = 'Counting down from 1...'
yield 1
self.label.text = 'Enter some values and press extract.'
# Renable the inputs again.
self.text_input.enabled = True
self.password_input.enabled = True
self.number_input.enabled = True
def startup(self):
# Set up main window
self.main_window = toga.MainWindow(title=self.name)
# Labels to show responses.
self.label = toga.Label(
'Enter some values and press extract.', style=Pack(padding=10)
)
self.text_label = toga.Label('Ready.', style=Pack(padding=10))
self.password_label = toga.Label('Ready.', style=Pack(padding=10))
self.password_content_label = toga.Label(
EMPTY_PASSWORD, style=Pack(padding_bottom=10, font_size=9)
)
self.number_label = toga.Label('Ready.', style=Pack(padding=10))
# Text inputs and a button
self.text_input = toga.TextInput(
placeholder='Type something...', style=Pack(padding=10)
)
self.password_input = toga.PasswordInput(
placeholder='Password...',
style=Pack(padding=10),
on_change=self.on_password_change
)
self.number_input = toga.NumberInput(style=Pack(padding=10))
btn_extract = toga.Button(
'Extract values',
on_press=self.do_extract_values,
style=Pack(flex=1)
)
# Outermost box
box = toga.Box(
children=[
self.label,
self.text_input,
self.password_input,
self.password_content_label,
self.number_input,
self.text_label,
self.password_label,
self.number_label,
btn_extract,
],
style=Pack(
flex=1,
direction=COLUMN,
padding=10,
)
)
# Add the content on the main window
self.main_window.content = box
# Show the main window
self.main_window.show()
def on_password_change(self, widget):
content = widget.value
self.password_content_label.text = self.get_password_content_label(content)
def get_password_content_label(self, content):
if content.strip() == "":
return EMPTY_PASSWORD
contains = set()
for letter in content:
if letter in ascii_uppercase:
contains.add("uppercase letters")
elif letter in ascii_lowercase:
contains.add("lowercase letters")
elif letter in digits:
contains.add("digits")
else:
contains.add("special characters")
return "Password contains: {}".format(', '.join(contains))
def main():
return TextInputApp('TextInput', 'org.beeware.widgets.textinput')
if __name__ == '__main__':
app = main()
app.main_loop()
| {
"pile_set_name": "Github"
} |
DROP FUNCTION IF EXISTS de_metas_endcustomer_fresh_reports.Direct_Costing_Raw_Data_Activity_10_50 (Year Date, AD_Org_ID numeric(10,0));
CREATE OR REPLACE FUNCTION de_metas_endcustomer_fresh_reports.Direct_Costing_Raw_Data_Activity_10_50 (Year Date, AD_Org_ID numeric(10,0)) RETURNS TABLE
(
Margin text,
l1_Value Character Varying,
L1_Name Character Varying,
L2_Value Character Varying,
L2_Name Character Varying,
L3_Value Character Varying,
L3_Name Character Varying,
Balance_10 numeric,
Balance_20 numeric,
Balance_30 numeric,
Balance_40 numeric,
Balance_50 numeric,
Balance_90 numeric,
Balance_Other numeric,
Balance numeric,
Budget_10 numeric,
Budget_20 numeric,
Budget_30 numeric,
Budget_40 numeric,
Budget_50 numeric,
Budget_90 numeric,
Budget numeric,
L1_Multiplicator numeric,
L2_Multiplicator numeric,
L3_Multiplicator numeric,
Seq text,
ad_org_id numeric
)
AS
$BODY$
SELECT
margin,
l1_value, l1_name, l2_value, l2_name, l3_value, l3_name,
Balance_10 * Multi_150 AS Balance_10,
Balance_20 * Multi_150 AS Balance_20,
Balance_30 * Multi_150 AS Balance_30,
Balance_40 * Multi_150 AS Balance_40,
Balance_50 * Multi_150 AS Balance_50,
Balance_90 * Multi_150 AS Balance_90,
Balance_Other* Multi_150 AS Balance_Other,
Balance_10 * Multi_150 + Balance_20 * Multi_150 + Balance_30 * Multi_150 + Balance_40 * Multi_150 + Balance_50 * Multi_150 + Balance_90 * Multi_150 + Balance_Other * Multi_150 AS Balance,
Budget_10 * Multi_150 AS Budget_10,
Budget_20 * Multi_150 AS Budget_20,
Budget_30 * Multi_150 AS Budget_30,
Budget_40 * Multi_150 AS Budget_40,
Budget_50 * Multi_150 AS Budget_50,
Budget_90 * Multi_150 AS Budget_90,
Budget_10 * Multi_150 + Budget_20 * Multi_150 + Budget_30 * Multi_150 + Budget_40 * Multi_150 + Budget_50 * Multi_150 + Budget_90 * Multi_150 + Budget_Other * Multi_150 AS Budget,
acctBalance(l1_ElementValue_ID, 0, 1) AS l1_Multiplicator,
acctBalance(l2_ElementValue_ID, 0, 1) AS l2_Multiplicator,
acctBalance(l3_ElementValue_ID, 0, 1) AS l3_Multiplicator,
SeqNo AS Seq,
fa.ad_org_id
FROM
de_metas_endcustomer_fresh_reports.Direct_Costing_selection s
LEFT OUTER JOIN (
SELECT
Account_ID,
SUM( CASE WHEN a.Value = '10' THEN Balance ELSE 0 END ) AS Balance_10,
SUM( CASE WHEN a.Value = '20' THEN Balance ELSE 0 END ) AS Balance_20,
SUM( CASE WHEN a.Value = '30' THEN Balance ELSE 0 END ) AS Balance_30,
SUM( CASE WHEN a.Value = '40' THEN Balance ELSE 0 END ) AS Balance_40,
SUM( CASE WHEN a.Value = '50' THEN Balance ELSE 0 END ) AS Balance_50,
SUM( CASE WHEN a.Value = '90' THEN Balance ELSE 0 END ) AS Balance_90,
SUM( CASE WHEN a.Value IS NULL OR (a.Value != '10' AND a.Value != '20' AND a.Value != '30' AND a.Value != '40' AND a.Value != '50' AND a.Value != '90')
THEN Balance ELSE 0 END ) AS Balance_Other,
SUM( CASE WHEN a.Value = '10' THEN Budget ELSE 0 END ) AS Budget_10,
SUM( CASE WHEN a.Value = '20' THEN Budget ELSE 0 END ) AS Budget_20,
SUM( CASE WHEN a.Value = '30' THEN Budget ELSE 0 END ) AS Budget_30,
SUM( CASE WHEN a.Value = '40' THEN Budget ELSE 0 END ) AS Budget_40,
SUM( CASE WHEN a.Value = '50' THEN Budget ELSE 0 END ) AS Budget_50,
SUM( CASE WHEN a.Value = '90' THEN Budget ELSE 0 END ) AS Budget_90,
SUM( CASE WHEN a.Value IS NULL OR (a.Value != '10' AND a.Value != '20' AND a.Value != '30' AND a.Value != '40' AND a.Value != '50' AND a.Value != '90')
THEN Budget ELSE 0 END ) AS Budget_Other,
fa.ad_org_id
FROM
(
SELECT fa.Account_ID
, COALESCE(ap.C_Activity_ID, a.C_Activity_ID, aev.C_Activity_ID) as C_Activity_ID
, CASE WHEN postingtype in ('A','Y') THEN AmtAcctCr - AmtAcctDr ELSE 0 END AS Balance
, CASE WHEN postingtype = 'B' THEN AmtAcctCr - AmtAcctDr ELSE 0 END AS Budget,
fa.ad_org_id
FROM Fact_Acct fa
left outer join C_Activity a on (a.C_Activity_ID=fa.C_Activity_ID) AND a.isActive = 'Y'
left outer join C_Activity ap on (ap.C_Activity_ID=a.Parent_Activity_ID) AND ap.isActive = 'Y'
-- another left join with c_element on fact_acct account_id
-- in case of c_activity in fact_acct is null, to take the default one from c_elementvalue (FRESH-845)
left outer join C_ElementValue ev ON fa.Account_ID = ev.C_ElementValue_ID AND ev.isActive = 'Y'
left outer join C_Activity aev ON ev.C_Activity_ID = aev.C_Activity_ID AND aev.isActive = 'Y'
WHERE
CASE WHEN postingtype = 'B' THEN
dateacct::date <= (select enddate from c_period where c_period_id=report.Get_Period( 1000000, $1 ) AND isActive = 'Y')
ELSE
(dateacct::date <= $1) END
AND dateacct::Date >= (
SELECT MIN( StartDate )::Date FROM C_Period
WHERE C_Year_ID = (SELECT C_Year_ID FROM C_Period WHERE C_Period_ID = report.Get_Period( 1000000, $1 ) AND isActive = 'Y') AND isActive = 'Y'
)
AND fa.isActive = 'Y'
) fa
LEFT OUTER JOIN C_Activity a ON fa.C_Activity_ID = a.C_Activity_ID AND a.isActive = 'Y'
GROUP BY Account_ID, fa.ad_org_id
) fa ON fa.Account_ID = s.L3_ElementValue_ID
WHERE fa.ad_org_id = $2
ORDER BY
SeqNo
$BODY$
LANGUAGE sql STABLE
;
| {
"pile_set_name": "Github"
} |
{
"name": "CommandAttr",
"namespace": "draw2d.command",
"description": "<p>Command to change attributes of a shape with undo/redo support</p>",
"extends": [
"draw2d.command.Command"
],
"access": "",
"virtual": false,
"functions": [
{
"name": "init",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Create a new Command objects which provides undo/redo for attributes.</p>",
"parameters": [
{
"name": "figure",
"type": "draw2d.Figure",
"description": "<p>the figure to handle</p>",
"default": "",
"optional": "",
"nullable": ""
},
{
"name": "attributes",
"type": "Object",
"description": "<p>new attributes to set</p>",
"default": "",
"optional": "",
"nullable": ""
}
],
"inherited": false,
"since": "",
"examples": []
},
{
"name": "canExecute",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Returns [true] if the command can be execute and the execution of the\ncommand modify the model. A CommandMove with [startX,startX] == [endX,endY] should\nreturn false. <br>\nthe execution of the Command doesn't modify the model.</p>",
"parameters": [],
"inherited": false,
"since": "",
"examples": [],
"returns": {
"type": "Boolean",
"description": ""
}
},
{
"name": "execute",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Execute the command the first time</p>",
"parameters": [],
"inherited": false,
"since": "",
"examples": []
},
{
"name": "undo",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Undo the move command</p>",
"parameters": [],
"inherited": false,
"since": "",
"examples": []
},
{
"name": "redo",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Redo the move command after the user has undo this command</p>",
"parameters": [],
"inherited": false,
"since": "",
"examples": []
},
{
"name": "getLabel",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Returns a label of the Command. e.g. <code>move figure</code>.</p>",
"parameters": [],
"inherited": true,
"since": "",
"examples": [],
"returns": {
"type": "String",
"description": "<p>the label for this command</p>"
}
},
{
"name": "cancel",
"access": "",
"virtual": false,
"deprecated": "",
"description": "<p>Will be called if the user cancel the operation.</p>",
"parameters": [],
"inherited": true,
"since": "",
"examples": []
}
],
"fires": "",
"constructor": {
"name": "CommandAttr",
"description": "",
"parameters": [],
"examples": []
}
} | {
"pile_set_name": "Github"
} |
# For more info on OperatorGroups
# See https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/operatorgroups.md
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
name: opendatahub-operator
spec:
targetNamespaces:
- {{ project_name }}
| {
"pile_set_name": "Github"
} |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package route
import (
"reflect"
"testing"
)
type parseAddrsOnDarwinTest struct {
attrs uint
fn func(int, []byte) (int, Addr, error)
b []byte
as []Addr
}
var parseAddrsOnDarwinLittleEndianTests = []parseAddrsOnDarwinTest{
{
sysRTA_DST | sysRTA_GATEWAY | sysRTA_NETMASK,
parseKernelInetAddr,
[]byte{
0x10, 0x2, 0x0, 0x0, 0xc0, 0xa8, 0x56, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x14, 0x12, 0x4, 0x0, 0x6, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
},
[]Addr{
&Inet4Addr{IP: [4]byte{192, 168, 86, 0}},
&LinkAddr{Index: 4},
&Inet4Addr{IP: [4]byte{255, 255, 255, 255}},
nil,
nil,
nil,
nil,
nil,
},
},
}
func TestParseAddrsOnDarwin(t *testing.T) {
tests := parseAddrsOnDarwinLittleEndianTests
if nativeEndian != littleEndian {
t.Skip("no test for non-little endian machine yet")
}
for i, tt := range tests {
as, err := parseAddrs(tt.attrs, tt.fn, tt.b)
if err != nil {
t.Error(i, err)
continue
}
if !reflect.DeepEqual(as, tt.as) {
t.Errorf("#%d: got %+v; want %+v", i, as, tt.as)
continue
}
}
}
| {
"pile_set_name": "Github"
} |
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
var : Int -> Self
class A {
class C {
struct A<T where I : A {
let : e
| {
"pile_set_name": "Github"
} |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"\u06cc\u06a9\u0634\u0646\u0628\u0647",
"\u062f\u0648\u0634\u0646\u0628\u0647",
"\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
"\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
"\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
"\u062c\u0645\u0639\u0647",
"\u0634\u0646\u0628\u0647"
],
"ERANAMES": [
"\u0642.\u0645.",
"\u0645."
],
"ERAS": [
"\u0642.\u0645.",
"\u0645."
],
"FIRSTDAYOFWEEK": 5,
"MONTH": [
"\u062c\u0646\u0648\u0631\u06cc",
"\u0641\u0628\u0631\u0648\u0631\u06cc",
"\u0645\u0627\u0631\u0686",
"\u0627\u067e\u0631\u06cc\u0644",
"\u0645\u06cc",
"\u062c\u0648\u0646",
"\u062c\u0648\u0644\u0627\u06cc",
"\u0627\u06af\u0633\u062a",
"\u0633\u067e\u062a\u0645\u0628\u0631",
"\u0627\u06a9\u062a\u0648\u0628\u0631",
"\u0646\u0648\u0645\u0628\u0631",
"\u062f\u0633\u0645\u0628\u0631"
],
"SHORTDAY": [
"\u06cc.",
"\u062f.",
"\u0633.",
"\u0686.",
"\u067e.",
"\u062c.",
"\u0634."
],
"SHORTMONTH": [
"\u062c\u0646\u0648",
"\u0641\u0628\u0631",
"\u0645\u0627\u0631",
"\u0627\u067e\u0631",
"\u0645\u0640\u06cc",
"\u062c\u0648\u0646",
"\u062c\u0648\u0644",
"\u0627\u06af\u0633",
"\u0633\u067e\u062a",
"\u0627\u06a9\u062a",
"\u0646\u0648\u0645",
"\u062f\u0633\u0645"
],
"STANDALONEMONTH": [
"\u062c\u0646\u0648\u0631\u06cc",
"\u0641\u0628\u0631\u0648\u0631\u06cc",
"\u0645\u0627\u0631\u0686",
"\u0627\u067e\u0631\u06cc\u0644",
"\u0645\u06cc",
"\u062c\u0648\u0646",
"\u062c\u0648\u0644\u0627\u06cc",
"\u0627\u06af\u0633\u062a",
"\u0633\u067e\u062a\u0645\u0628\u0631",
"\u0627\u06a9\u062a\u0648\u0628\u0631",
"\u0646\u0648\u0645\u0628\u0631",
"\u062f\u0633\u0645\u0628\u0631"
],
"WEEKENDRANGE": [
3,
4
],
"fullDate": "y \u0646\u0686\u06cc \u06cc\u06cc\u0644 d \u0646\u0686\u06cc MMMM EEEE \u06a9\u0648\u0646\u06cc",
"longDate": "d \u0646\u0686\u06cc MMMM y",
"medium": "d MMM y H:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "H:mm:ss",
"short": "y/M/d H:mm",
"shortDate": "y/M/d",
"shortTime": "H:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "Af.",
"DECIMAL_SEP": "\u066b",
"GROUP_SEP": "\u066c",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-",
"negSuf": "\u00a0\u00a4",
"posPre": "",
"posSuf": "\u00a0\u00a4"
}
]
},
"id": "uz-arab",
"localeID": "uz_Arab",
"pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
| {
"pile_set_name": "Github"
} |
{-# LANGUAGE CPP, UnboxedTuples, MagicHash, StandaloneDeriving, DeriveDataTypeable #-}
{-# OPTIONS_GHC -O #-}
-- In GHC 6.4, compiling this module gave a Core Lint failure following the
-- specialiser, because a function was floated out that had a RULE that
-- mentioned another function (unpack, in fact). but the latter wasn't
-- floated because we didn't take the RULES into account properly; result,
-- variable out of scope.
-- It's hard to cut this test down.
module Data.PackedString.Latin1 (
-- * The @PackedString@ type
PackedString, -- abstract, instances: Eq, Ord, Show, Typeable
-- * Converting to and from @PackedString@s
pack,
unpack,
-- * I\/O with @PackedString@s
hPut, hGet,
-- * List-like manipulation functions
nil,
cons,
head,
tail,
null,
append,
length,
index,
map,
filter,
reverse,
concat,
elem,
substr,
take,
drop,
splitAt,
foldl,
foldr,
takeWhile,
dropWhile,
span,
break,
lines,
unlines,
words,
unwords,
split,
splitWith,
join,
-- unpackList, -- eek, otherwise it gets thrown away by the simplifier
) where
import qualified Prelude
import Prelude hiding (
head,
tail,
null,
length,
(!!),
map,
filter,
reverse,
concat,
elem,
take,
drop,
foldl,
foldr,
splitAt,
takeWhile,
dropWhile,
span,
break,
lines,
unlines,
words,
unwords,
join
)
import GHC.Exts
import GHC.IO (IO(..))
import Foreign
import Data.Typeable
import Data.Char
import qualified Data.List
import System.IO
-- -----------------------------------------------------------------------------
-- PackedString type declaration
-- | A space-efficient representation of a 'String', which supports
-- various efficient operations. A 'PackedString' contains Latin1
-- (8-bit) characters only.
data PackedString = PS {-#UNPACK#-}!Int {-#UNPACK#-}!Int
{-#UNPACK#-}!(ForeignPtr Word8)
-- this is a pretty efficient representation, and can be
-- converted to/from a StorableArray.
-- When the ForeignPtr is unpacked, we get the Addr# stored
-- directly in the PS constructor.
-- Perhaps making a slice should be conditional on the ratio of the
-- slice/string size to limit memory leaks.
instance Eq PackedString where
a == b = comparePS a b == EQ
instance Ord PackedString where
compare = comparePS
comparePS (PS off1 len1 fp1) (PS off2 len2 fp2)
= inlinePerformIO $
withForeignPtr fp1 $ \p1 ->
withForeignPtr fp2 $ \p2 ->
cmp (p1 `plusPtr` off1) (p2 `plusPtr` off2) len1
where
cmp :: Ptr Word8 -> Ptr Word8 -> Int -> IO Ordering
cmp p1 p2 n
| n == len1 = if n == len2 then return EQ else return LT
| n == len2 = return GT
| otherwise = do
a <- peekElemOff p1 n
b <- peekElemOff p2 n
case a `compare` b of
EQ -> cmp p1 p2 (n+1)
LT -> return LT
GT -> return GT
--instance Read PackedString: ToDo
instance Show PackedString where
showsPrec p ps r = showsPrec p (unpack ps) r
deriving instance Typeable PackedString
-- -----------------------------------------------------------------------------
-- Constructor functions
-- | The 'nilPS' value is the empty string.
nil :: PackedString
nil = inlinePerformIO $ do
fp <- newForeignPtr_ nullPtr
return (PS 0 0 fp)
-- | The 'consPS' function prepends the given character to the
-- given string.
cons :: Char -> PackedString -> PackedString
cons c cs = pack (c : (unpack cs)) -- ToDo:better
-- | Convert a 'String' into a 'PackedString'
packLen :: Int -> String -> PackedString
packLen len str = inlinePerformIO $ do
fp <- mallocForeignPtrBytes len
withForeignPtr fp $ \p -> do
fill_it_in p 0 str
return (PS 0 len fp)
fill_it_in p i [] = return ()
fill_it_in p i (c:cs) = do pokeElemOff p i (c2w c); fill_it_in p (i+1) cs
pack :: String -> PackedString
pack str = packLen (Prelude.length str) str
{-# INLINE w2c #-}
w2c :: Word8 -> Char
w2c = chr . fromIntegral
{-# INLINE c2w #-}
c2w :: Char -> Word8
c2w = fromIntegral . ord
-- -----------------------------------------------------------------------------
-- List-mimicking functions for PackedStrings
-- | The 'length' function returns the length of the input list.
-- Analogous to 'length'.
length :: PackedString -> Int
length (PS _ len _) = len
-- | The 'index' function returns the character in the string at the
-- given position.
index :: PackedString -> Int -> Char
index ps i
| i >= 0 && i < len = unsafeIndex ps i
| otherwise = error "Data.PackedString.Latin1.index: index out of range"
where len = length ps
unsafeIndex :: PackedString -> Int -> Char
unsafeIndex (PS off len fp) i =
withPackedString fp $ \p -> do
w <- peekElemOff (p `plusPtr` off) i
return $! w2c w
-- | The 'head' function returns the first element of a
-- 'PackedString' or throws an error if the string is empty.
head :: PackedString -> Char
head ps
| len <= 0 = error "Data.PackedString.Latin1.head: head []"
| otherwise = index ps 0
where len = length ps
-- | The 'tail' function returns the tail of a 'PackedString' or throws an error
-- if the string is empty.
tail :: PackedString -> PackedString
tail ps
| len <= 0 = error "Data.PackedString.Latin1.tail: tail []"
| len == 1 = nil
| otherwise = substr ps 1 (len - 1)
where len = length ps
-- | The 'null' function returns True iff the argument is null.
null :: PackedString -> Bool
null (PS _ l _) = l == 0
-- | The 'append' function appends the second string onto the first.
append :: PackedString -> PackedString -> PackedString
append xs ys
| null xs = ys
| null ys = xs
| otherwise = concat [xs,ys]
-- | The 'map' function applies a function to each character in the string.
map :: (Char -> Char) -> PackedString -> PackedString
map f ps = packLen (length ps) (Prelude.map f (unpack ps))
-- | The 'filter' function filters out the appropriate substring.
filter :: (Char -> Bool) -> PackedString -> PackedString {-or String?-}
filter pred ps = pack $ Prelude.filter pred $ unpack ps
-- | The 'foldl' function behaves like 'foldl' on 'PackedString's.
foldl :: (a -> Char -> a) -> a -> PackedString -> a
foldl f b ps = Prelude.foldl f b $ unpack ps
-- | The 'foldr' function behaves like 'foldr' on 'PackedString's.
foldr :: (Char -> a -> a) -> a -> PackedString -> a
foldr f v ps = Prelude.foldr f v $ unpack ps -- no intermediate list, we hope
-- | The 'take' function takes the first @n@ characters of a 'PackedString'.
take :: Int -> PackedString -> PackedString
take n ps = substr ps 0 (n-1)
-- | The 'drop' function drops the first @n@ characters of a 'PackedString'.
drop :: Int -> PackedString -> PackedString
drop n ps = substr ps n (length ps - 1)
-- | The 'splitWith' function splits a 'PackedString' at a given index.
splitAt :: Int -> PackedString -> (PackedString, PackedString)
splitAt n ps = (take n ps, drop n ps)
-- | The 'takeWhile' function is analogous to the 'takeWhile' function.
takeWhile :: (Char -> Bool) -> PackedString -> PackedString
takeWhile pred ps = pack $ Prelude.takeWhile pred $ unpack ps
-- | The 'dropWhile' function is analogous to the 'dropWhile' function.
dropWhile :: (Char -> Bool) -> PackedString -> PackedString
dropWhile pred ps = pack $ Prelude.dropWhile pred $ unpack ps
-- | The 'elem' function returns True iff the given element is in the string.
elem :: Char -> PackedString -> Bool
elem c ps = c `Prelude.elem` unpack ps
-- | The 'span' function returns a pair containing the result of
-- running both 'takeWhile' and 'dropWhile'.
span :: (Char -> Bool) -> PackedString -> (PackedString, PackedString)
span p ps = (takeWhile p ps, dropWhile p ps)
-- | The 'break' function breaks a string at the first position which
-- satisfies the predicate.
break :: (Char -> Bool) -> PackedString -> (PackedString, PackedString)
break p ps = span (not . p) ps
-- | The 'lines' function splits the input on line-breaks.
lines :: PackedString -> [PackedString]
lines ps = split '\n' ps
-- | The 'unlines' function concatenates the input list after
-- interspersing newlines.
unlines :: [PackedString] -> PackedString
unlines pss = join (pack "\n") pss
-- | The 'words' function is analogous to the 'words' function.
words :: PackedString -> [PackedString]
words ps = Prelude.filter (not.null) (splitWith isSpace ps)
-- | The 'unwords' function is analogous to the 'unwords' function.
unwords :: [PackedString] -> PackedString
unwords pss = join (pack " ") pss
-- | The 'reverse' function reverses the string.
reverse :: PackedString -> PackedString
reverse ps = pack $ Prelude.reverse $ unpack ps
-- | The 'concat' function concatenates a list of 'PackedString's.
concat :: [PackedString] -> PackedString
concat pss = pack $ Prelude.concat $ Prelude.map unpack pss
------------------------------------------------------------
-- | The 'join' function takes a 'PackedString' and a list of 'PackedString's
-- and concatenates the list after interspersing the first argument between
-- each element of the list.
join :: PackedString -> [PackedString] -> PackedString
join filler pss = concat (splice pss)
where
splice [] = []
splice [x] = [x]
splice (x:y:xs) = x:filler:splice (y:xs)
-- ToDo: the obvious generalisation
{-
Some properties that hold:
* split x ls = ls'
where False = any (map (x `elem`) ls')
* join (pack [x]) (split x ls) = ls
-}
-- | The 'split' function splits the input string on each occurrence of the given 'Char'.
split :: Char -> PackedString -> [PackedString]
split c = splitWith (== c)
splitWith :: (Char -> Bool) -> PackedString -> [PackedString]
splitWith pred (PS off 0 fp) = []
splitWith pred (PS off len fp) = splitWith' pred off len fp
splitWith' pred off len fp =
withPackedString fp $ \p -> splitLoop pred p 0 off len fp
splitLoop pred p idx off len fp
| p `seq` idx `seq` off `seq` fp `seq` False = undefined
splitLoop pred p idx off len fp
| idx >= len = return [PS off idx fp]
| otherwise = do
w <- peekElemOff p (off+idx)
if pred (w2c w)
then return (PS off idx fp :
splitWith' pred (off+idx+1) (len-idx-1) fp)
else splitLoop pred p (idx+1) off len fp
-- -----------------------------------------------------------------------------
-- Local utility functions
-- The definition of @_substr@ is essentially:
-- @take (end - begin + 1) (drop begin str)@.
-- | The 'substr' function takes a 'PackedString' and two indices
-- and returns the substring of the input string between (and including)
-- these indices.
substr :: PackedString -> Int -> Int -> PackedString
substr (PS off len fp) begin end = PS (off+begin) (end-begin+1) fp
-- -----------------------------------------------------------------------------
-- hPut
-- | Outputs a 'PackedString' to the specified 'Handle'.
--
-- NOTE: the string will be output directly in Latin-1.
--
hPut :: Handle -> PackedString -> IO ()
hPut h (PS off l fp) =
withForeignPtr fp $ \p ->
hPutBuf h (p `plusPtr` off) l
-- -----------------------------------------------------------------------------
-- hGet
-- | Read a 'PackedString' directly from the specified 'Handle'.
-- This is far more efficient than reading the characters into a 'String'
-- and then using 'pack'.
--
-- NOTE: as with 'hPut', the string representation in the file is
-- assumed to be Latin-1.
hGet :: Handle -> Int -> IO PackedString
hGet h i = do
fp <- mallocForeignPtrBytes i
withForeignPtr fp $ \p -> do
l <- hGetBuf h p i
return (PS 0 l fp)
-- -----------------------------------------------------------------------------
-- unpacking
{-# INLINE unpack #-}
unpack :: PackedString -> String
unpack ps = build (unpackFoldr ps)
{-# RULES
"unpack-list" [1] forall p . unpackFoldr p (:) [] = unpackList p
#-}
unpackList :: PackedString -> [Char]
unpackList (PS off len fp) =
withPackedString fp $ \p -> do
let loop p (-1) acc = return acc
loop p n acc = do
a <- peekElemOff p n
loop p (n-1) (w2c a : acc)
loop (p `plusPtr` off) (len-1) []
{-# INLINE [0] unpackFoldr #-}
unpackFoldr :: PackedString -> (Char -> a -> a) -> a -> a
unpackFoldr (PS off len fp) f c =
withPackedString fp $ \p -> do
let loop p (-1) acc = return acc
loop p n acc = do
a <- peekElemOff p n
loop p (n-1) (w2c a `f` acc)
loop (p `plusPtr` off) (len-1) c
-- -----------------------------------------------------------------------------
-- Utils
-- Just like unsafePerformIO, but we inline it.
{-# INLINE inlinePerformIO #-}
inlinePerformIO :: IO a -> a
inlinePerformIO (IO m) = case m realWorld# of (# _, r #) -> r
withPackedString :: ForeignPtr a -> (Ptr a -> IO b) -> b
withPackedString fp io = inlinePerformIO (withForeignPtr fp io)
| {
"pile_set_name": "Github"
} |
K 10
svn:ignore
V 44
*.d
*.exe
*.ho
*-example
*-test
libavcodec*
END
| {
"pile_set_name": "Github"
} |
// Copyright 2016 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 COMPONENTS_ARC_STORAGE_MANAGER_ARC_STORAGE_MANAGER_H_
#define COMPONENTS_ARC_STORAGE_MANAGER_ARC_STORAGE_MANAGER_H_
#include <memory>
#include "base/callback.h"
#include "base/macros.h"
#include "components/arc/mojom/storage_manager.mojom.h"
#include "components/keyed_service/core/keyed_service.h"
namespace content {
class BrowserContext;
} // namespace content
namespace arc {
class ArcBridgeService;
// This class represents as a simple proxy of StorageManager to Chrome OS.
class ArcStorageManager : public KeyedService {
public:
// Returns singleton instance for the given BrowserContext,
// or nullptr if the browser |context| is not allowed to use ARC.
static ArcStorageManager* GetForBrowserContext(
content::BrowserContext* context);
ArcStorageManager(content::BrowserContext* context,
ArcBridgeService* bridge_service);
~ArcStorageManager() override;
// Opens detailed preference screen of private volume on ARC.
// Returns false when an instance of ARC-side isn't ready yet.
bool OpenPrivateVolumeSettings();
// Gets storage usage of all application's APK, data, and cache size.
using GetApplicationsSizeCallback =
base::OnceCallback<void(bool succeeded, mojom::ApplicationsSizePtr)>;
bool GetApplicationsSize(GetApplicationsSizeCallback callback);
// Deletes all applications' cache files.
bool DeleteApplicationsCache(const base::Callback<void()>& callback);
private:
ArcBridgeService* const arc_bridge_service_;
DISALLOW_COPY_AND_ASSIGN(ArcStorageManager);
};
} // namespace arc
#endif // COMPONENTS_ARC_STORAGE_MANAGER_ARC_STORAGE_MANAGER_H_
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python
# Copyright 2020, Kay Hayen, mailto:[email protected]
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# 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.
#
""" Launcher for pylint checker tool.
"""
import os
import sys
# Unchanged, running from checkout, use the parent directory, the nuitka
# package ought to be there.
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))
# isort:start
from nuitka.tools.quality.pylint.__main__ import main
main()
| {
"pile_set_name": "Github"
} |
// Copyright (C) 2012 Davis E. King ([email protected])
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_STRUCTURAL_GRAPH_LABELING_tRAINER_Hh_
#define DLIB_STRUCTURAL_GRAPH_LABELING_tRAINER_Hh_
#include "structural_graph_labeling_trainer_abstract.h"
#include "../algs.h"
#include "../optimization.h"
#include "structural_svm_graph_labeling_problem.h"
#include "../graph_cuts/graph_labeler.h"
namespace dlib
{
// ----------------------------------------------------------------------------------------
template <
typename vector_type
>
class structural_graph_labeling_trainer
{
public:
typedef std::vector<bool> label_type;
typedef graph_labeler<vector_type> trained_function_type;
structural_graph_labeling_trainer (
)
{
C = 10;
verbose = false;
eps = 0.1;
num_threads = 2;
max_cache_size = 5;
loss_pos = 1.0;
loss_neg = 1.0;
}
void set_num_threads (
unsigned long num
)
{
num_threads = num;
}
unsigned long get_num_threads (
) const
{
return num_threads;
}
void set_epsilon (
double eps_
)
{
// make sure requires clause is not broken
DLIB_ASSERT(eps_ > 0,
"\t void structural_graph_labeling_trainer::set_epsilon()"
<< "\n\t eps_ must be greater than 0"
<< "\n\t eps_: " << eps_
<< "\n\t this: " << this
);
eps = eps_;
}
double get_epsilon (
) const { return eps; }
void set_max_cache_size (
unsigned long max_size
)
{
max_cache_size = max_size;
}
unsigned long get_max_cache_size (
) const
{
return max_cache_size;
}
void be_verbose (
)
{
verbose = true;
}
void be_quiet (
)
{
verbose = false;
}
void set_oca (
const oca& item
)
{
solver = item;
}
const oca get_oca (
) const
{
return solver;
}
void set_c (
double C_
)
{
// make sure requires clause is not broken
DLIB_ASSERT(C_ > 0,
"\t void structural_graph_labeling_trainer::set_c()"
<< "\n\t C_ must be greater than 0"
<< "\n\t C_: " << C_
<< "\n\t this: " << this
);
C = C_;
}
double get_c (
) const
{
return C;
}
void set_loss_on_positive_class (
double loss
)
{
// make sure requires clause is not broken
DLIB_ASSERT(loss >= 0,
"\t structural_graph_labeling_trainer::set_loss_on_positive_class()"
<< "\n\t Invalid inputs were given to this function."
<< "\n\t loss: " << loss
<< "\n\t this: " << this );
loss_pos = loss;
}
void set_loss_on_negative_class (
double loss
)
{
// make sure requires clause is not broken
DLIB_ASSERT(loss >= 0,
"\t structural_graph_labeling_trainer::set_loss_on_negative_class()"
<< "\n\t Invalid inputs were given to this function."
<< "\n\t loss: " << loss
<< "\n\t this: " << this );
loss_neg = loss;
}
double get_loss_on_negative_class (
) const { return loss_neg; }
double get_loss_on_positive_class (
) const { return loss_pos; }
template <
typename graph_type
>
const graph_labeler<vector_type> train (
const dlib::array<graph_type>& samples,
const std::vector<label_type>& labels,
const std::vector<std::vector<double> >& losses
) const
{
#ifdef ENABLE_ASSERTS
std::string reason_for_failure;
DLIB_ASSERT(is_graph_labeling_problem(samples, labels, reason_for_failure) == true ,
"\t void structural_graph_labeling_trainer::train()"
<< "\n\t Invalid inputs were given to this function."
<< "\n\t reason_for_failure: " << reason_for_failure
<< "\n\t samples.size(): " << samples.size()
<< "\n\t labels.size(): " << labels.size()
<< "\n\t this: " << this );
DLIB_ASSERT((losses.size() == 0 || sizes_match(labels, losses) == true) &&
all_values_are_nonnegative(losses) == true,
"\t void structural_graph_labeling_trainer::train()"
<< "\n\t Invalid inputs were given to this function."
<< "\n\t labels.size(): " << labels.size()
<< "\n\t losses.size(): " << losses.size()
<< "\n\t sizes_match(labels,losses): " << sizes_match(labels,losses)
<< "\n\t all_values_are_nonnegative(losses): " << all_values_are_nonnegative(losses)
<< "\n\t this: " << this );
#endif
structural_svm_graph_labeling_problem<graph_type> prob(samples, labels, losses, num_threads);
if (verbose)
prob.be_verbose();
prob.set_c(C);
prob.set_epsilon(eps);
prob.set_max_cache_size(max_cache_size);
if (prob.get_losses().size() == 0)
{
prob.set_loss_on_positive_class(loss_pos);
prob.set_loss_on_negative_class(loss_neg);
}
matrix<double,0,1> w;
solver(prob, w, prob.get_num_edge_weights());
vector_type edge_weights;
vector_type node_weights;
populate_weights(w, edge_weights, node_weights, prob.get_num_edge_weights());
return graph_labeler<vector_type>(edge_weights, node_weights);
}
template <
typename graph_type
>
const graph_labeler<vector_type> train (
const dlib::array<graph_type>& samples,
const std::vector<label_type>& labels
) const
{
std::vector<std::vector<double> > losses;
return train(samples, labels, losses);
}
private:
template <typename T>
typename enable_if<is_matrix<T> >::type populate_weights (
const matrix<double,0,1>& w,
T& edge_weights,
T& node_weights,
long split_idx
) const
{
edge_weights = rowm(w,range(0, split_idx-1));
node_weights = rowm(w,range(split_idx,w.size()-1));
}
template <typename T>
typename disable_if<is_matrix<T> >::type populate_weights (
const matrix<double,0,1>& w,
T& edge_weights,
T& node_weights,
long split_idx
) const
{
edge_weights.clear();
node_weights.clear();
for (long i = 0; i < split_idx; ++i)
{
if (w(i) != 0)
edge_weights.insert(edge_weights.end(), std::make_pair(i,w(i)));
}
for (long i = split_idx; i < w.size(); ++i)
{
if (w(i) != 0)
node_weights.insert(node_weights.end(), std::make_pair(i-split_idx,w(i)));
}
}
double C;
oca solver;
double eps;
bool verbose;
unsigned long num_threads;
unsigned long max_cache_size;
double loss_pos;
double loss_neg;
};
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_STRUCTURAL_GRAPH_LABELING_tRAINER_Hh_
| {
"pile_set_name": "Github"
} |
/*
Copyright 2019 The Kubernetes Authors.
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.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha3
| {
"pile_set_name": "Github"
} |
<html>
<head>
<title>My Epoch DHTML JavaScript Calendar</title>
<style type="text/css">
dateheader {
-background-color: #3399FF;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-border-radius: 10px;
-padding: 5px;
}
</style>
<style type="text/css">
html {height:100%;}
body {height:100%; margin:0; padding:0;}
#bg {position:fixed; top:0; left:0; width:100%; height:100%;}
#content {position:relative; z-index:1;}
</style>
<!--[if IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#page-background {position:absolute; z-index:-1;}
#content {position:static;padding:10px;}
</style>
<![endif]-->
<link rel="stylesheet" type="text/css" href="epoch_v106/epoch_styles.css" />
<script type="text/javascript" src="epoch_v106/epoch_classes.js"></script>
<script type="text/javascript">
/*You can also place this code in a separate
file and link to it like epoch_classes.js*/
var my_cal;
window.onload = function () {
my_cal = new Epoch('epoch_basic','flat',
document.getElementById('basic_container'));
};
function popup()
{
var weekday=new Array("Sun","Mon","Tue","Wed","Thur","Fri","Sat");
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec");
var date = my_cal.selectedDates.length > 0 ?
my_cal.selectedDates[0] :
null;
if ( date != null )
{
var day = date.getDate();
var dayOfWeek= date.getDay();
var month = date.getMonth();
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
/* Set the User selected date in HTML form */
var dateStr= weekday[dayOfWeek] + ", " + day + " " +
monthname[month] + " " + year;
document.getElementById("selected_date").value= dateStr;
/* IMPORTANT:
* Call Android JavaScript->Java bridge setting a
* Java-field variable
*/
window.android.setSelectedDate( date );
window.android.setCalendarButton( date );
}
}
</script>
</head>
<body>
<div id="bg"><img src="bg.png" width="100%" height="100%" alt=""></div>
<div id="content">
<div class="dateheader" align="center">
<form name="form_selected_date">
<span style="color:white">Selected day:</span>
<input id="selected_date" name="selected_date" type="text"
readonly="true">
</form>
</div>
<div id="basic_container" onClick="popup()"></div>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
# -*- coding: utf-8 -*-
"""
Various useful functions
"""
# Author: Remi Flamary <[email protected]>
#
# License: MIT License
import multiprocessing
from functools import reduce
import time
import numpy as np
from scipy.spatial.distance import cdist
import sys
import warnings
from inspect import signature
__time_tic_toc = time.time()
def tic():
""" Python implementation of Matlab tic() function """
global __time_tic_toc
__time_tic_toc = time.time()
def toc(message='Elapsed time : {} s'):
""" Python implementation of Matlab toc() function """
t = time.time()
print(message.format(t - __time_tic_toc))
return t - __time_tic_toc
def toq():
""" Python implementation of Julia toc() function """
t = time.time()
return t - __time_tic_toc
def kernel(x1, x2, method='gaussian', sigma=1, **kwargs):
"""Compute kernel matrix"""
if method.lower() in ['gaussian', 'gauss', 'rbf']:
K = np.exp(-dist(x1, x2) / (2 * sigma**2))
return K
def laplacian(x):
"""Compute Laplacian matrix"""
L = np.diag(np.sum(x, axis=0)) - x
return L
def unif(n):
""" return a uniform histogram of length n (simplex)
Parameters
----------
n : int
number of bins in the histogram
Returns
-------
h : np.array (n,)
histogram of length n such that h_i=1/n for all i
"""
return np.ones((n,)) / n
def clean_zeros(a, b, M):
""" Remove all components with zeros weights in a and b
"""
M2 = M[a > 0, :][:, b > 0].copy() # copy force c style matrix (froemd)
a2 = a[a > 0]
b2 = b[b > 0]
return a2, b2, M2
def euclidean_distances(X, Y, squared=False):
"""
Considering the rows of X (and Y=X) as vectors, compute the
distance matrix between each pair of vectors.
Parameters
----------
X : {array-like}, shape (n_samples_1, n_features)
Y : {array-like}, shape (n_samples_2, n_features)
squared : boolean, optional
Return squared Euclidean distances.
Returns
-------
distances : {array}, shape (n_samples_1, n_samples_2)
"""
XX = np.einsum('ij,ij->i', X, X)[:, np.newaxis]
YY = np.einsum('ij,ij->i', Y, Y)[np.newaxis, :]
distances = np.dot(X, Y.T)
distances *= -2
distances += XX
distances += YY
np.maximum(distances, 0, out=distances)
if X is Y:
# Ensure that distances between vectors and themselves are set to 0.0.
# This may not be the case due to floating point rounding errors.
distances.flat[::distances.shape[0] + 1] = 0.0
return distances if squared else np.sqrt(distances, out=distances)
def dist(x1, x2=None, metric='sqeuclidean'):
"""Compute distance between samples in x1 and x2 using function scipy.spatial.distance.cdist
Parameters
----------
x1 : ndarray, shape (n1,d)
matrix with n1 samples of size d
x2 : array, shape (n2,d), optional
matrix with n2 samples of size d (if None then x2=x1)
metric : str | callable, optional
Name of the metric to be computed (full list in the doc of scipy), If a string,
the distance function can be 'braycurtis', 'canberra', 'chebyshev', 'cityblock',
'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski',
'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean',
'sokalmichener', 'sokalsneath', 'sqeuclidean', 'wminkowski', 'yule'.
Returns
-------
M : np.array (n1,n2)
distance matrix computed with given metric
"""
if x2 is None:
x2 = x1
if metric == "sqeuclidean":
return euclidean_distances(x1, x2, squared=True)
return cdist(x1, x2, metric=metric)
def dist0(n, method='lin_square'):
"""Compute standard cost matrices of size (n, n) for OT problems
Parameters
----------
n : int
Size of the cost matrix.
method : str, optional
Type of loss matrix chosen from:
* 'lin_square' : linear sampling between 0 and n-1, quadratic loss
Returns
-------
M : ndarray, shape (n1,n2)
Distance matrix computed with given metric.
"""
res = 0
if method == 'lin_square':
x = np.arange(n, dtype=np.float64).reshape((n, 1))
res = dist(x, x)
return res
def cost_normalization(C, norm=None):
""" Apply normalization to the loss matrix
Parameters
----------
C : ndarray, shape (n1, n2)
The cost matrix to normalize.
norm : str
Type of normalization from 'median', 'max', 'log', 'loglog'. Any
other value do not normalize.
Returns
-------
C : ndarray, shape (n1, n2)
The input cost matrix normalized according to given norm.
"""
if norm is None:
pass
elif norm == "median":
C /= float(np.median(C))
elif norm == "max":
C /= float(np.max(C))
elif norm == "log":
C = np.log(1 + C)
elif norm == "loglog":
C = np.log1p(np.log1p(C))
else:
raise ValueError('Norm %s is not a valid option.\n'
'Valid options are:\n'
'median, max, log, loglog' % norm)
return C
def dots(*args):
""" dots function for multiple matrix multiply """
return reduce(np.dot, args)
def label_normalization(y, start=0):
""" Transform labels to start at a given value
Parameters
----------
y : array-like, shape (n, )
The vector of labels to be normalized.
start : int
Desired value for the smallest label in y (default=0)
Returns
-------
y : array-like, shape (n1, )
The input vector of labels normalized according to given start value.
"""
diff = np.min(np.unique(y)) - start
if diff != 0:
y -= diff
return y
def fun(f, q_in, q_out):
""" Utility function for parmap with no serializing problems """
while True:
i, x = q_in.get()
if i is None:
break
q_out.put((i, f(x)))
def parmap(f, X, nprocs=multiprocessing.cpu_count()):
""" paralell map for multiprocessing (only map on windows)"""
if not sys.platform.endswith('win32'):
q_in = multiprocessing.Queue(1)
q_out = multiprocessing.Queue()
proc = [multiprocessing.Process(target=fun, args=(f, q_in, q_out))
for _ in range(nprocs)]
for p in proc:
p.daemon = True
p.start()
sent = [q_in.put((i, x)) for i, x in enumerate(X)]
[q_in.put((None, None)) for _ in range(nprocs)]
res = [q_out.get() for _ in range(len(sent))]
[p.join() for p in proc]
return [x for i, x in sorted(res)]
else:
return list(map(f, X))
def check_params(**kwargs):
"""check_params: check whether some parameters are missing
"""
missing_params = []
check = True
for param in kwargs:
if kwargs[param] is None:
missing_params.append(param)
if len(missing_params) > 0:
print("POT - Warning: following necessary parameters are missing")
for p in missing_params:
print("\n", p)
check = False
return check
def check_random_state(seed):
"""Turn seed into a np.random.RandomState instance
Parameters
----------
seed : None | int | instance of RandomState
If seed is None, return the RandomState singleton used by np.random.
If seed is an int, return a new RandomState instance seeded with seed.
If seed is already a RandomState instance, return it.
Otherwise raise ValueError.
"""
if seed is None or seed is np.random:
return np.random.mtrand._rand
if isinstance(seed, (int, np.integer)):
return np.random.RandomState(seed)
if isinstance(seed, np.random.RandomState):
return seed
raise ValueError('{} cannot be used to seed a numpy.random.RandomState'
' instance'.format(seed))
class deprecated(object):
"""Decorator to mark a function or class as deprecated.
deprecated class from scikit-learn package
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/deprecation.py
Issue a warning when the function is called/the class is instantiated and
adds a warning to the docstring.
The optional extra argument will be appended to the deprecation message
and the docstring. Note: to use this with the default value for extra, put
in an empty of parentheses:
>>> from ot.deprecation import deprecated # doctest: +SKIP
>>> @deprecated() # doctest: +SKIP
... def some_function(): pass # doctest: +SKIP
Parameters
----------
extra : str
To be added to the deprecation messages.
"""
# Adapted from http://wiki.python.org/moin/PythonDecoratorLibrary,
# but with many changes.
def __init__(self, extra=''):
self.extra = extra
def __call__(self, obj):
"""Call method
Parameters
----------
obj : object
"""
if isinstance(obj, type):
return self._decorate_class(obj)
else:
return self._decorate_fun(obj)
def _decorate_class(self, cls):
msg = "Class %s is deprecated" % cls.__name__
if self.extra:
msg += "; %s" % self.extra
# FIXME: we should probably reset __new__ for full generality
init = cls.__init__
def wrapped(*args, **kwargs):
warnings.warn(msg, category=DeprecationWarning)
return init(*args, **kwargs)
cls.__init__ = wrapped
wrapped.__name__ = '__init__'
wrapped.__doc__ = self._update_doc(init.__doc__)
wrapped.deprecated_original = init
return cls
def _decorate_fun(self, fun):
"""Decorate function fun"""
msg = "Function %s is deprecated" % fun.__name__
if self.extra:
msg += "; %s" % self.extra
def wrapped(*args, **kwargs):
warnings.warn(msg, category=DeprecationWarning)
return fun(*args, **kwargs)
wrapped.__name__ = fun.__name__
wrapped.__dict__ = fun.__dict__
wrapped.__doc__ = self._update_doc(fun.__doc__)
return wrapped
def _update_doc(self, olddoc):
newdoc = "DEPRECATED"
if self.extra:
newdoc = "%s: %s" % (newdoc, self.extra)
if olddoc:
newdoc = "%s\n\n%s" % (newdoc, olddoc)
return newdoc
def _is_deprecated(func):
"""Helper to check if func is wraped by our deprecated decorator"""
if sys.version_info < (3, 5):
raise NotImplementedError("This is only available for python3.5 "
"or above")
closures = getattr(func, '__closure__', [])
if closures is None:
closures = []
is_deprecated = ('deprecated' in ''.join([c.cell_contents
for c in closures
if isinstance(c.cell_contents, str)]))
return is_deprecated
class BaseEstimator(object):
"""Base class for most objects in POT
Code adapted from sklearn BaseEstimator class
Notes
-----
All estimators should specify all the parameters that can be set
at the class level in their ``__init__`` as explicit keyword
arguments (no ``*args`` or ``**kwargs``).
"""
@classmethod
def _get_param_names(cls):
"""Get parameter names for the estimator"""
# fetch the constructor or the original constructor before
# deprecation wrapping if any
init = getattr(cls.__init__, 'deprecated_original', cls.__init__)
if init is object.__init__:
# No explicit constructor to introspect
return []
# introspect the constructor arguments to find the model parameters
# to represent
init_signature = signature(init)
# Consider the constructor parameters excluding 'self'
parameters = [p for p in init_signature.parameters.values()
if p.name != 'self' and p.kind != p.VAR_KEYWORD]
for p in parameters:
if p.kind == p.VAR_POSITIONAL:
raise RuntimeError("POT estimators should always "
"specify their parameters in the signature"
" of their __init__ (no varargs)."
" %s with constructor %s doesn't "
" follow this convention."
% (cls, init_signature))
# Extract and sort argument names excluding 'self'
return sorted([p.name for p in parameters])
def get_params(self, deep=True):
"""Get parameters for this estimator.
Parameters
----------
deep : bool, optional
If True, will return the parameters for this estimator and
contained subobjects that are estimators.
Returns
-------
params : mapping of string to any
Parameter names mapped to their values.
"""
out = dict()
for key in self._get_param_names():
# We need deprecation warnings to always be on in order to
# catch deprecated param values.
# This is set in utils/__init__.py but it gets overwritten
# when running under python3 somehow.
warnings.simplefilter("always", DeprecationWarning)
try:
with warnings.catch_warnings(record=True) as w:
value = getattr(self, key, None)
if len(w) and w[0].category == DeprecationWarning:
# if the parameter is deprecated, don't show it
continue
finally:
warnings.filters.pop(0)
# XXX: should we rather test if instance of estimator?
if deep and hasattr(value, 'get_params'):
deep_items = value.get_params().items()
out.update((key + '__' + k, val) for k, val in deep_items)
out[key] = value
return out
def set_params(self, **params):
"""Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
``<component>__<parameter>`` so that it's possible to update each
component of a nested object.
Returns
-------
self
"""
if not params:
# Simple optimisation to gain speed (inspect is slow)
return self
valid_params = self.get_params(deep=True)
# for key, value in iteritems(params):
for key, value in params.items():
split = key.split('__', 1)
if len(split) > 1:
# nested objects case
name, sub_name = split
if name not in valid_params:
raise ValueError('Invalid parameter %s for estimator %s. '
'Check the list of available parameters '
'with `estimator.get_params().keys()`.' %
(name, self))
sub_object = valid_params[name]
sub_object.set_params(**{sub_name: value})
else:
# simple objects case
if key not in valid_params:
raise ValueError('Invalid parameter %s for estimator %s. '
'Check the list of available parameters '
'with `estimator.get_params().keys()`.' %
(key, self.__class__.__name__))
setattr(self, key, value)
return self
class UndefinedParameter(Exception):
"""
Aim at raising an Exception when a undefined parameter is called
"""
pass
| {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: f6e64c91d83a1c14bbf9c73cd6c6d5b5
timeCreated: 1485297321
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
{
"created_at": "2015-02-27T22:28:22.349453",
"description": "jQuery-Rebox is a light weight, responsive, mobile friendly jQuery and Zepto lightbox",
"fork": false,
"full_name": "trentrichardson/jQuery-Rebox",
"language": "CSS",
"updated_at": "2015-02-27T23:42:34.138986"
} | {
"pile_set_name": "Github"
} |
/*
* This file was generated automatically by xsubpp version 1.9508 from the
* contents of tmp. Do not edit this file, edit tmp instead.
*
* ANY CHANGES MADE HERE WILL BE LOST!
*
*/
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/features.h"
#ifdef EMBPERL_XS_CLASSES
#include "../common/global_define.h"
#include "../common/types.h"
#include "embperl.h"
#ifdef seed
#undef seed
#endif
#include "perlpacket.h"
#ifdef THIS /* this macro seems to leak out on some systems */
#undef THIS
#endif
XS(XS_PerlPacket_new); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_new)
{
dXSARGS;
if (items < 1 || items > 3)
Perl_croak(aTHX_ "Usage: PerlPacket::new(CLASS, opcode= \"OP_Unknown\", len= 0)");
{
char *CLASS = (char *)SvPV_nolen(ST(0));
PerlPacket *RETVAL;
const char *opcode;
uint32 len;
if (items < 2)
opcode = "OP_Unknown";
else {
opcode = (char *)SvPV_nolen(ST(1));
}
if (items < 3)
len = 0;
else {
len = (uint32)SvUV(ST(2));
}
RETVAL = new PerlPacket(opcode, len);
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "PerlPacket", (void*)RETVAL);
}
XSRETURN(1);
}
XS(XS_PerlPacket_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_DESTROY)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: PerlPacket::DESTROY(THIS)");
{
PerlPacket * THIS;
if (SvROK(ST(0))) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not a reference");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
delete THIS;
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetOpcode); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetOpcode)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::SetOpcode(THIS, opcode)");
{
PerlPacket * THIS;
bool RETVAL;
char * opcode = (char *)SvPV_nolen(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->SetOpcode(opcode);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_PerlPacket_Resize); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_Resize)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::Resize(THIS, len)");
{
PerlPacket * THIS;
uint32 len = (uint32)SvUV(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->Resize(len);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SendTo); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SendTo)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::SendTo(THIS, who)");
{
PerlPacket * THIS;
Client * who;
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
if (sv_derived_from(ST(1), "Client")) {
IV tmp = SvIV((SV*)SvRV(ST(1)));
who = INT2PTR(Client *,tmp);
}
else
Perl_croak(aTHX_ "who is not of type Client");
if(who == nullptr)
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
THIS->SendTo(who);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SendToAll); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SendToAll)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: PerlPacket::SendToAll(THIS)");
{
PerlPacket * THIS;
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SendToAll();
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_Zero); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_Zero)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: PerlPacket::Zero(THIS)");
{
PerlPacket * THIS;
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->Zero();
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_FromArray); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_FromArray)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::FromArray(THIS, numbers, length)");
{
PerlPacket * THIS;
int * numbers;
uint32 length = (uint32)SvUV(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
AV *av_numbers;
if (SvROK(ST(1)) && SvTYPE(SvRV(ST(1)))==SVt_PVAV)
av_numbers = (AV*)SvRV(ST(1));
else
Perl_croak(aTHX_ "numbers is not an array reference");
I32 len_numbers = av_len(av_numbers) + 1;
I32 ix_numbers;
numbers = new int[len_numbers];
for(ix_numbers = 0; ix_numbers < len_numbers; ix_numbers ++) {
SV **tmp = av_fetch(av_numbers, ix_numbers, 0);
if(tmp == nullptr || *tmp == nullptr) {
numbers[ix_numbers] = 0;
continue;
}
numbers[ix_numbers] = (int)SvIV(*tmp);
};
THIS->FromArray(numbers, length);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetByte); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetByte)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::SetByte(THIS, pos, val)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
uint8 val = (uint8)SvUV(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetByte(pos, val);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetShort); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetShort)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::SetShort(THIS, pos, val)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
uint16 val = (uint16)SvUV(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetShort(pos, val);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetLong); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetLong)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::SetLong(THIS, pos, val)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
uint32 val = (uint32)SvUV(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetLong(pos, val);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetFloat); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetFloat)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::SetFloat(THIS, pos, val)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
float val = (float)SvNV(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetFloat(pos, val);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetString); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetString)
{
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: PerlPacket::SetString(THIS, pos, str)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
char * str = (char *)SvPV_nolen(ST(2));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetString(pos, str);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetEQ1319); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetEQ1319)
{
dXSARGS;
if (items != 4)
Perl_croak(aTHX_ "Usage: PerlPacket::SetEQ1319(THIS, pos, part13, part19)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
float part13 = (float)SvNV(ST(2));
float part19 = (float)SvNV(ST(3));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetEQ1319(pos, part13, part19);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_SetEQ1913); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_SetEQ1913)
{
dXSARGS;
if (items != 4)
Perl_croak(aTHX_ "Usage: PerlPacket::SetEQ1913(THIS, pos, part19, part13)");
{
PerlPacket * THIS;
uint32 pos = (uint32)SvUV(ST(1));
float part19 = (float)SvNV(ST(2));
float part13 = (float)SvNV(ST(3));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
THIS->SetEQ1913(pos, part19, part13);
}
XSRETURN_EMPTY;
}
XS(XS_PerlPacket_GetByte); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_GetByte)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::GetByte(THIS, pos)");
{
PerlPacket * THIS;
uint8 RETVAL;
dXSTARG;
uint32 pos = (uint32)SvUV(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetByte(pos);
XSprePUSH; PUSHu((UV)RETVAL);
}
XSRETURN(1);
}
XS(XS_PerlPacket_GetShort); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_GetShort)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::GetShort(THIS, pos)");
{
PerlPacket * THIS;
uint16 RETVAL;
dXSTARG;
uint32 pos = (uint32)SvUV(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetShort(pos);
XSprePUSH; PUSHu((UV)RETVAL);
}
XSRETURN(1);
}
XS(XS_PerlPacket_GetLong); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_GetLong)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::GetLong(THIS, pos)");
{
PerlPacket * THIS;
uint32 RETVAL;
dXSTARG;
uint32 pos = (uint32)SvUV(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetLong(pos);
XSprePUSH; PUSHu((UV)RETVAL);
}
XSRETURN(1);
}
XS(XS_PerlPacket_GetFloat); /* prototype to pass -Wmissing-prototypes */
XS(XS_PerlPacket_GetFloat)
{
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: PerlPacket::GetFloat(THIS, pos)");
{
PerlPacket * THIS;
float RETVAL;
dXSTARG;
uint32 pos = (uint32)SvUV(ST(1));
if (sv_derived_from(ST(0), "PerlPacket")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(PerlPacket *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetFloat(pos);
XSprePUSH; PUSHn((double)RETVAL);
}
XSRETURN(1);
}
#ifdef __cplusplus
extern "C"
#endif
XS(boot_PerlPacket); /* prototype to pass -Wmissing-prototypes */
XS(boot_PerlPacket)
{
dXSARGS;
char file[256];
strncpy(file, __FILE__, 256);
file[255] = 0;
if(items != 1)
fprintf(stderr, "boot_quest does not take any arguments.");
char buf[128];
//add the strcpy stuff to get rid of const warnings....
XS_VERSION_BOOTCHECK ;
newXSproto(strcpy(buf, "new"), XS_PerlPacket_new, file, "$;$$");
newXSproto(strcpy(buf, "DESTROY"), XS_PerlPacket_DESTROY, file, "$");
newXSproto(strcpy(buf, "SetOpcode"), XS_PerlPacket_SetOpcode, file, "$$");
newXSproto(strcpy(buf, "Resize"), XS_PerlPacket_Resize, file, "$$");
newXSproto(strcpy(buf, "SendTo"), XS_PerlPacket_SendTo, file, "$$");
newXSproto(strcpy(buf, "SendToAll"), XS_PerlPacket_SendToAll, file, "$");
newXSproto(strcpy(buf, "Zero"), XS_PerlPacket_Zero, file, "$");
newXSproto(strcpy(buf, "FromArray"), XS_PerlPacket_FromArray, file, "$$$");
newXSproto(strcpy(buf, "SetByte"), XS_PerlPacket_SetByte, file, "$$$");
newXSproto(strcpy(buf, "SetShort"), XS_PerlPacket_SetShort, file, "$$$");
newXSproto(strcpy(buf, "SetLong"), XS_PerlPacket_SetLong, file, "$$$");
newXSproto(strcpy(buf, "SetFloat"), XS_PerlPacket_SetFloat, file, "$$$");
newXSproto(strcpy(buf, "SetString"), XS_PerlPacket_SetString, file, "$$$");
newXSproto(strcpy(buf, "SetEQ1319"), XS_PerlPacket_SetEQ1319, file, "$$$$");
newXSproto(strcpy(buf, "SetEQ1913"), XS_PerlPacket_SetEQ1913, file, "$$$$");
newXSproto(strcpy(buf, "GetByte"), XS_PerlPacket_GetByte, file, "$$");
newXSproto(strcpy(buf, "GetShort"), XS_PerlPacket_GetShort, file, "$$");
newXSproto(strcpy(buf, "GetLong"), XS_PerlPacket_GetLong, file, "$$");
newXSproto(strcpy(buf, "GetFloat"), XS_PerlPacket_GetFloat, file, "$$");
XSRETURN_YES;
}
#endif //EMBPERL_XS_CLASSES
| {
"pile_set_name": "Github"
} |
if not modules then modules = { } end modules ['l-md5'] = {
version = 1.001,
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-- This also provides file checksums and checkers.
if not md5 then
md5 = optionalrequire("md5")
end
if not md5 then
md5 = {
sum = function(str) print("error: md5 is not loaded (sum ignored)") return str end,
sumhexa = function(str) print("error: md5 is not loaded (sumhexa ignored)") return str end,
}
end
local md5, file = md5, file
local gsub = string.gsub
-- local gsub, format, byte = string.gsub, string.format, string.byte
--
-- local function convert(str,fmt)
-- return (gsub(md5sum(str),".",function(chr) return format(fmt,byte(chr)) end))
-- end
--
-- if not md5.HEX then function md5.HEX(str) return convert(str,"%02X") end end
-- if not md5.hex then function md5.hex(str) return convert(str,"%02x") end end
-- if not md5.dec then function md5.dec(str) return convert(str,"%03i") end end
do
local patterns = lpeg and lpeg.patterns
if patterns then
local bytestoHEX = patterns.bytestoHEX
local bytestohex = patterns.bytestohex
local bytestodec = patterns.bytestodec
local lpegmatch = lpeg.match
local md5sum = md5.sum
if not md5.HEX then function md5.HEX(str) if str then return lpegmatch(bytestoHEX,md5sum(str)) end end end
if not md5.hex then function md5.hex(str) if str then return lpegmatch(bytestohex,md5sum(str)) end end end
if not md5.dec then function md5.dec(str) if str then return lpegmatch(bytestodec,md5sum(str)) end end end
md5.sumhexa = md5.hex
md5.sumHEXA = md5.HEX
end
end
function file.needsupdating(oldname,newname,threshold) -- size modification access change
local oldtime = lfs.attributes(oldname,"modification")
if oldtime then
local newtime = lfs.attributes(newname,"modification")
if not newtime then
return true -- no new file, so no updating needed
elseif newtime >= oldtime then
return false -- new file definitely needs updating
elseif oldtime - newtime < (threshold or 1) then
return false -- new file is probably still okay
else
return true -- new file has to be updated
end
else
return false -- no old file, so no updating needed
end
end
file.needs_updating = file.needsupdating
function file.syncmtimes(oldname,newname)
local oldtime = lfs.attributes(oldname,"modification")
if oldtime and lfs.isfile(newname) then
lfs.touch(newname,oldtime,oldtime)
end
end
function file.checksum(name)
if md5 then
local data = io.loaddata(name)
if data then
return md5.HEX(data)
end
end
return nil
end
function file.loadchecksum(name)
if md5 then
local data = io.loaddata(name .. ".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
if not checksum then checksum = file.checksum(name) end
if checksum then
io.savedata(name .. ".md5",checksum)
return checksum
end
return nil
end
| {
"pile_set_name": "Github"
} |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Utilities;
namespace Microsoft.EntityFrameworkCore.Query.Internal
{
public partial class NavigationExpandingExpressionVisitor
{
private sealed class EntityReference : Expression, IPrintableExpression
{
public EntityReference(IEntityType entityType)
{
EntityType = entityType;
IncludePaths = new IncludeTreeNode(entityType, this);
}
public IEntityType EntityType { get; }
public IDictionary<(IForeignKey, bool), Expression> ForeignKeyExpansionMap { get; } =
new Dictionary<(IForeignKey, bool), Expression>();
public bool IsOptional { get; private set; }
public IncludeTreeNode IncludePaths { get; private set; }
public IncludeTreeNode LastIncludeTreeNode { get; private set; }
public override ExpressionType NodeType
=> ExpressionType.Extension;
public override Type Type
=> EntityType.ClrType;
protected override Expression VisitChildren(ExpressionVisitor visitor)
{
Check.NotNull(visitor, nameof(visitor));
return this;
}
public EntityReference Snapshot()
{
var result = new EntityReference(EntityType) { IsOptional = IsOptional };
result.IncludePaths = IncludePaths.Snapshot(result);
return result;
}
public void SetLastInclude(IncludeTreeNode lastIncludeTree)
=> LastIncludeTreeNode = lastIncludeTree;
public void MarkAsOptional()
=> IsOptional = true;
void IPrintableExpression.Print(ExpressionPrinter expressionPrinter)
{
Check.NotNull(expressionPrinter, nameof(expressionPrinter));
expressionPrinter.Append($"{nameof(EntityReference)}: {EntityType.DisplayName()}");
if (IsOptional)
{
expressionPrinter.Append("[Optional]");
}
if (IncludePaths.Count > 0)
{
// TODO: fully render nested structure of include tree
expressionPrinter.Append(
" | IncludePaths: "
+ string.Join(
" ", IncludePaths.Select(ip => ip.Value.Count() > 0 ? ip.Key.Name + "->..." : ip.Key.Name)));
}
}
}
/// <summary>
/// A tree structure of includes for a given entity type in <see cref="EntityReference" />.
/// </summary>
private sealed class IncludeTreeNode : Dictionary<INavigationBase, IncludeTreeNode>
{
private EntityReference _entityReference;
public IncludeTreeNode(IEntityType entityType)
{
EntityType = entityType;
}
public IncludeTreeNode(IEntityType entityType, EntityReference entityReference)
{
EntityType = entityType;
_entityReference = entityReference;
}
public IEntityType EntityType { get; }
public LambdaExpression FilterExpression { get; private set; }
public IncludeTreeNode AddNavigation(INavigationBase navigation)
{
if (TryGetValue(navigation, out var existingValue))
{
return existingValue;
}
IncludeTreeNode nodeToAdd = null;
if (_entityReference != null)
{
if (navigation is INavigation concreteNavigation
&& _entityReference.ForeignKeyExpansionMap.TryGetValue(
(concreteNavigation.ForeignKey, concreteNavigation.IsOnDependent), out var expansion))
{
nodeToAdd = UnwrapEntityReference(expansion).IncludePaths;
}
else if (navigation is ISkipNavigation skipNavigation
&& _entityReference.ForeignKeyExpansionMap.TryGetValue(
(skipNavigation.ForeignKey, skipNavigation.IsOnDependent), out var firstExpansion)
&& UnwrapEntityReference(firstExpansion).ForeignKeyExpansionMap.TryGetValue(
(skipNavigation.Inverse.ForeignKey, !skipNavigation.Inverse.IsOnDependent), out var secondExpansion))
{
nodeToAdd = UnwrapEntityReference(secondExpansion).IncludePaths;
}
}
if (nodeToAdd == null)
{
nodeToAdd = new IncludeTreeNode(navigation.TargetEntityType, null);
}
this[navigation] = nodeToAdd;
return this[navigation];
}
public IncludeTreeNode Snapshot(EntityReference entityReference)
{
var result = new IncludeTreeNode(EntityType, entityReference) { FilterExpression = FilterExpression };
foreach (var kvp in this)
{
result[kvp.Key] = kvp.Value.Snapshot(null);
}
return result;
}
public void Merge(IncludeTreeNode includeTreeNode)
{
// EntityReference is intentionally ignored
FilterExpression = includeTreeNode.FilterExpression;
foreach (var item in includeTreeNode)
{
AddNavigation(item.Key).Merge(item.Value);
}
}
public void AssignEntityReference(EntityReference entityReference)
=> _entityReference = entityReference;
public void ApplyFilter(LambdaExpression filterExpression)
=> FilterExpression = filterExpression;
public override bool Equals(object obj)
=> obj != null
&& (ReferenceEquals(this, obj)
|| obj is IncludeTreeNode includeTreeNode
&& Equals(includeTreeNode));
private bool Equals(IncludeTreeNode includeTreeNode)
{
if (Count != includeTreeNode.Count)
{
return false;
}
foreach (var kvp in this)
{
if (!includeTreeNode.TryGetValue(kvp.Key, out var otherIncludeTreeNode)
|| !kvp.Value.Equals(otherIncludeTreeNode))
{
return false;
}
}
return true;
}
public override int GetHashCode()
=> HashCode.Combine(base.GetHashCode(), EntityType);
}
/// <summary>
/// Stores information about the current queryable, its source, structure of projection, parameter type etc.
/// This is needed because once navigations are expanded we still remember these to avoid expanding again.
/// </summary>
private sealed class NavigationExpansionExpression : Expression, IPrintableExpression
{
private readonly List<(MethodInfo OrderingMethod, Expression KeySelector)> _pendingOrderings
= new List<(MethodInfo OrderingMethod, Expression KeySelector)>();
private readonly string _parameterName;
private NavigationTreeNode _currentTree;
public NavigationExpansionExpression(
Expression source,
NavigationTreeNode currentTree,
Expression pendingSelector,
string parameterName)
{
Source = source;
_parameterName = parameterName;
CurrentTree = currentTree;
PendingSelector = pendingSelector;
}
public Expression Source { get; private set; }
public ParameterExpression CurrentParameter
=> CurrentTree.CurrentParameter;
public NavigationTreeNode CurrentTree
{
get => _currentTree;
private set
{
_currentTree = value;
_currentTree.SetParameter(_parameterName);
}
}
public Expression PendingSelector { get; private set; }
public MethodInfo CardinalityReducingGenericMethodInfo { get; private set; }
public Type SourceElementType
=> CurrentParameter.Type;
public IReadOnlyList<(MethodInfo OrderingMethod, Expression KeySelector)> PendingOrderings
=> _pendingOrderings;
public void UpdateSource(Expression source)
=> Source = source;
public void UpdateCurrentTree(NavigationTreeNode currentTree)
=> CurrentTree = currentTree;
public void ApplySelector(Expression selector)
=> PendingSelector = selector;
public void AddPendingOrdering(MethodInfo orderingMethod, Expression keySelector)
{
_pendingOrderings.Clear();
_pendingOrderings.Add((orderingMethod, keySelector));
}
public void AppendPendingOrdering(MethodInfo orderingMethod, Expression keySelector)
=> _pendingOrderings.Add((orderingMethod, keySelector));
public void ClearPendingOrderings()
=> _pendingOrderings.Clear();
public void ConvertToSingleResult(MethodInfo genericMethod)
=> CardinalityReducingGenericMethodInfo = genericMethod;
public override ExpressionType NodeType
=> ExpressionType.Extension;
public override Type Type
=> CardinalityReducingGenericMethodInfo == null
? typeof(IQueryable<>).MakeGenericType(PendingSelector.Type)
: PendingSelector.Type;
protected override Expression VisitChildren(ExpressionVisitor visitor)
{
Check.NotNull(visitor, nameof(visitor));
return this;
}
void IPrintableExpression.Print(ExpressionPrinter expressionPrinter)
{
Check.NotNull(expressionPrinter, nameof(expressionPrinter));
expressionPrinter.AppendLine(nameof(NavigationExpansionExpression));
using (expressionPrinter.Indent())
{
expressionPrinter.Append("Source: ");
expressionPrinter.Visit(Source);
expressionPrinter.AppendLine();
expressionPrinter.Append("PendingSelector: ");
expressionPrinter.Visit(Lambda(PendingSelector, CurrentParameter));
expressionPrinter.AppendLine();
if (CardinalityReducingGenericMethodInfo != null)
{
expressionPrinter.AppendLine("CardinalityReducingMethod: " + CardinalityReducingGenericMethodInfo.Name);
}
}
}
}
/// <summary>
/// A leaf node on navigation tree, representing projection structures of
/// <see cref="NavigationExpansionExpression" />. Contains <see cref="Value" />,
/// which can be <see cref="NewExpression" /> or <see cref="EntityReference" />.
/// </summary>
private sealed class NavigationTreeExpression : NavigationTreeNode, IPrintableExpression
{
public NavigationTreeExpression(Expression value)
: base(null, null)
{
Value = value;
}
/// <summary>
/// Either <see cref="NewExpression" /> or <see cref="EntityReference" />.
/// </summary>
public Expression Value { get; private set; }
protected override Expression VisitChildren(ExpressionVisitor visitor)
{
Check.NotNull(visitor, nameof(visitor));
Value = visitor.Visit(Value);
return this;
}
public override Type Type
=> Value.Type;
void IPrintableExpression.Print(ExpressionPrinter expressionPrinter)
{
Check.NotNull(expressionPrinter, nameof(expressionPrinter));
expressionPrinter.AppendLine(nameof(NavigationTreeExpression));
using (expressionPrinter.Indent())
{
expressionPrinter.Append("Value: ");
expressionPrinter.Visit(Value);
expressionPrinter.AppendLine();
expressionPrinter.Append("Expression: ");
expressionPrinter.Visit(GetExpression());
}
}
}
/// <summary>
/// A node in navigation binary tree. A navigation tree is a structure of the current parameter, which
/// would be transparent identifier (hence it's a binary structure). This allows us to easily condense to
/// inner/outer member access.
/// </summary>
private class NavigationTreeNode : Expression
{
private NavigationTreeNode _parent;
public NavigationTreeNode(NavigationTreeNode left, NavigationTreeNode right)
{
Left = left;
Right = right;
if (left != null)
{
Left.Parent = this;
Right.Parent = this;
}
}
public NavigationTreeNode Parent
{
get => _parent;
private set
{
_parent = value;
CurrentParameter = null;
}
}
public NavigationTreeNode Left { get; }
public NavigationTreeNode Right { get; }
public ParameterExpression CurrentParameter { get; private set; }
public void SetParameter(string parameterName)
=> CurrentParameter = Parameter(Type, parameterName);
public override ExpressionType NodeType
=> ExpressionType.Extension;
public override Type Type
=> TransparentIdentifierFactory.Create(Left.Type, Right.Type);
public Expression GetExpression()
{
if (Parent == null)
{
return CurrentParameter;
}
var parentExperssion = Parent.GetExpression();
return Parent.Left == this
? MakeMemberAccess(parentExperssion, parentExperssion.Type.GetMember("Outer")[0])
: MakeMemberAccess(parentExperssion, parentExperssion.Type.GetMember("Inner")[0]);
}
}
/// <summary>
/// Owned navigations are not expanded, since they map differently in different providers.
/// This remembers such references so that they can still be treated like navigations.
/// </summary>
private sealed class OwnedNavigationReference : Expression
{
public OwnedNavigationReference(Expression parent, INavigation navigation, EntityReference entityReference)
{
Parent = parent;
Navigation = navigation;
EntityReference = entityReference;
}
protected override Expression VisitChildren(ExpressionVisitor visitor)
{
Check.NotNull(visitor, nameof(visitor));
Parent = visitor.Visit(Parent);
return this;
}
public Expression Parent { get; private set; }
public INavigation Navigation { get; }
public EntityReference EntityReference { get; }
public override Type Type
=> Navigation.ClrType;
public override ExpressionType NodeType
=> ExpressionType.Extension;
}
}
}
| {
"pile_set_name": "Github"
} |
{
"openOrders": "Mở Lệnh",
"tradeHistory": "Trade History",
"stats": "Trong tháng vừa rồi bạn đã thực hiện {{count}} giao dịch thành công với {{currencyCount}} đồng tiền có tổng giá trị là {{totalSwapsWorthInUsd}}",
"stats_plural": "Trong tháng vừa rồi bạn đã thực hiện {{count}} giao dịch thành công với {{currencyCount}} đồng tiền có tổng giá trị là {{totalSwapsWorthInUsd}}"
} | {
"pile_set_name": "Github"
} |
## Slashing Protection Database Interchange
A format has been standardised to allow different clients to export and import slashing protection data.
[Slashing Protection Database Interchange]("https://hackmd.io/@sproul/Bk0Y0qdGD")
Teku stores enough data to generate the minimal specification, so only the minimal export can be accomplished,
but loading of the complete specification is supported. | {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.