repo_name
stringlengths 6
101
| path
stringlengths 4
300
| text
stringlengths 7
1.31M
|
|---|---|---|
guidotack/gecode
|
gecode/search/nogoods.cpp
|
<gh_stars>100-1000
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2013
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include <gecode/search/nogoods.hh>
namespace Gecode { namespace Search {
/// Help function to cancel and dispose a no-good literal
forceinline NGL*
disposenext(NGL* ngl, Space& home, Propagator& p, bool c) {
NGL* n = ngl->next();
if (c)
ngl->cancel(home,p);
home.rfree(ngl,ngl->dispose(home));
return n;
}
void
NoNGL::subscribe(Space&, Propagator&) {
GECODE_NEVER;
}
void
NoNGL::cancel(Space&, Propagator&) {
GECODE_NEVER;
}
void
NoNGL::reschedule(Space&, Propagator&) {
GECODE_NEVER;
}
NGL::Status
NoNGL::status(const Space&) const {
GECODE_NEVER;
return NGL::NONE;
}
ExecStatus
NoNGL::prune(Space&) {
GECODE_NEVER;
return ES_OK;
}
NGL*
NoNGL::copy(Space&) {
GECODE_NEVER;
return NULL;
}
Actor*
NoGoodsProp::copy(Space& home) {
return new (home) NoGoodsProp(home,*this);
}
PropCost
NoGoodsProp::cost(const Space&, const ModEventDelta&) const {
return PropCost::linear(PropCost::LO,n);
}
void
NoGoodsProp::reschedule(Space& home) {
root->reschedule(home,*this);
NGL* l = root->next();
while ((l != NULL) && l->leaf()) {
l->reschedule(home,*this);
l = l->next();
}
if (l != NULL)
l->reschedule(home,*this);
}
ExecStatus
NoGoodsProp::propagate(Space& home, const ModEventDelta&) {
restart:
// Start with checking the first literal
switch (root->status(home)) {
case NGL::FAILED:
// All no-goods are dead, let dispose() clean up
return home.ES_SUBSUMED(*this);
case NGL::SUBSUMED:
{
NGL* l = disposenext(root,home,*this,true); n--;
// Prune leaf-literals
while ((l != NULL) && l->leaf()) {
l->cancel(home,*this); n--;
GECODE_ES_CHECK(l->prune(home));
l = disposenext(l,home,*this,false);
}
root = l;
// Is there anything left?
if (l == NULL)
return home.ES_SUBSUMED(*this);
// Skip literal that already has a subscription
l = l->next();
// Create subscriptions for leafs
while ((l != NULL) && l->leaf()) {
l->subscribe(home,*this); n++;
l = l->next();
}
// Create subscription for possible non-leaf literal
if (l != NULL) {
l->subscribe(home,*this); n++;
}
goto restart;
}
case NGL::NONE:
break;
default: GECODE_NEVER;
}
{
NGL* p = root;
NGL* l = p->next();
// Check the leaves
while ((l != NULL) && l->leaf()) {
switch (l->status(home)) {
case NGL::SUBSUMED:
l = disposenext(l,home,*this,true); n--;
p->next(l);
GECODE_ES_CHECK(root->prune(home));
if (root->status(home) == NGL::FAILED)
return home.ES_SUBSUMED(*this);
break;
case NGL::FAILED:
l = disposenext(l,home,*this,true); n--;
p->next(l);
break;
case NGL::NONE:
p = l; l = l->next();
break;
default: GECODE_NEVER;
}
}
// Check the next subtree
if (l != NULL) {
switch (l->status(home)) {
case NGL::FAILED:
(void) disposenext(l,home,*this,true); n--;
// Prune entire subtree
p->next(NULL);
break;
case NGL::SUBSUMED:
{
// Unlink node
l = disposenext(l,home,*this,true); n--;
p->next(l);
// Create subscriptions
while ((l != NULL) && l->leaf()) {
l->subscribe(home,*this); n++;
l = l->next();
}
if (l != NULL) {
l->subscribe(home,*this); n++;
}
}
break;
case NGL::NONE:
break;
default: GECODE_NEVER;
}
}
}
return ES_NOFIX;
}
size_t
NoGoodsProp::dispose(Space& home) {
if (home.failed()) {
// This will be executed when one ngl returned true for notice()
NGL* l = root;
while (l != NULL) {
NGL* t = l->next();
(void) l->dispose(home);
l = t;
}
} else if (root != NULL) {
// This will be executed for subsumption
NGL* l = disposenext(root,home,*this,true);
while ((l != NULL) && l->leaf())
l = disposenext(l,home,*this,true);
if (l != NULL)
l = disposenext(l,home,*this,true);
while (l != NULL)
l = disposenext(l,home,*this,false);
}
home.ignore(*this,AP_DISPOSE,true);
(void) Propagator::dispose(home);
return sizeof(*this);
}
}}
// STATISTICS: search-other
|
stringali1/vueproject
|
src/cli/commands/public-cmds/inject-conf-cmd.js
|
/** @flow */
import chalk from 'chalk';
import Command from '../../command';
import { injectConf } from '../../../api/consumer';
import type { InjectConfResult } from '../../../consumer/component-ops/inject-conf';
export default class InjectConf extends Command {
name = 'inject-conf [id]';
description = 'injecting components configuration';
alias = '';
opts = [['f', 'force', 'force injecting even if there are config files changes']];
loader = true;
migration = true;
async action([id]: [string], { force }: { force?: boolean }): Promise<InjectConfResult> {
const res = await injectConf(id, force);
return res;
}
report(injectResults: InjectConfResult): string {
return `successfully injected ${chalk.bold(injectResults.id)} configuration`;
}
}
|
jascrainch/opensync
|
src/lib/osn/src/linux/udhcp_client.h
|
<reponame>jascrainch/opensync<filename>src/lib/osn/src/linux/udhcp_client.h
/*
Copyright (c) 2015, Plume Design Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the Plume Design Inc. 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 Plume Design Inc. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef UDHCP_CLIENT_H_INCLUDED
#define UDHCP_CLIENT_H_INCLUDED
#include <stdbool.h>
#include "daemon.h"
#include "evx.h"
#include "osn_dhcp.h"
typedef struct udhcp_client udhcp_client_t;
typedef bool udhcp_client_opt_notify_fn_t(
udhcp_client_t *self,
enum osn_notify hint,
const char *key,
const char *value);
typedef void udhcp_client_error_fn_t(udhcp_client_t *self);
struct udhcp_client
{
char uc_ifname[C_IFNAME_LEN];
bool uc_started;
daemon_t uc_proc;
uint8_t uc_option_req[C_SET_LEN(DHCP_OPTION_MAX, uint8_t)];
char *uc_option_set[DHCP_OPTION_MAX];
char uc_opt_path[C_MAXPATH_LEN]; /* Option file path */
ev_stat uc_opt_stat; /* Option file watcher */
ev_debounce uc_opt_debounce; /* Debounce timer */
udhcp_client_opt_notify_fn_t *uc_opt_notify_fn; /* Option notification callback */
udhcp_client_error_fn_t *uc_err_fn; /* Error notification callback */
};
bool udhcp_client_init(udhcp_client_t *self, const char *ifname);
bool udhcp_client_fini(udhcp_client_t *self);
bool udhcp_client_start(udhcp_client_t *self);
bool udhcp_client_stop(udhcp_client_t *self);
bool udhcp_client_opt_request(udhcp_client_t *self, enum osn_dhcp_option opt, bool request);
bool udhcp_client_opt_set(udhcp_client_t *self, enum osn_dhcp_option opt, const char *val);
bool udhcp_client_opt_get(udhcp_client_t *self, enum osn_dhcp_option opt, bool *request, const char **value);
bool udhcp_client_state_get(udhcp_client_t *self, bool *enabled);
bool udhcp_client_error_notify(udhcp_client_t *self, udhcp_client_error_fn_t *errfn);
bool udhcp_client_opt_notify(udhcp_client_t *self, udhcp_client_opt_notify_fn_t *fn);
#endif /* UDHCP_CLIENT_H_INCLUDED */
|
CruGlobal/campus-contacts-web
|
karma.conf.js
|
<filename>karma.conf.js
/* eslint-env node */
const path = require('path');
const webpack = require('webpack');
const {
entry,
devServer,
optimization,
...webpackConfig
} = require('./webpack.config.js')({ test: true });
const karmaWebpackConfig = {
...webpackConfig,
devtool: 'inline-source-map',
module: {
...webpackConfig.module,
rules: [
...webpackConfig.module.rules,
...(process.env.npm_lifecycle_event === 'test-debug'
? []
: [
{
test: /^(?!.*\.(spec|fixture)\.js$).*\.js$/,
include: path.resolve('app/'),
loader: 'istanbul-instrumenter-loader',
enforce: 'post',
query: {
esModules: true,
},
},
]),
],
},
plugins: [
...webpackConfig.plugins,
new webpack.NormalModuleReplacementPlugin(
/\.(svg|gif|png|jpg|jpeg|(sa|sc|c)ss)$/,
'node-noop',
),
],
};
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
reporters: ['mocha', 'coverage-istanbul'],
files: ['app/assets/javascripts/angular/all-tests.spec.js'],
preprocessors: {
'app/assets/javascripts/angular/all-tests.spec.js': [
'webpack',
'sourcemap',
],
},
webpack: karmaWebpackConfig,
coverageIstanbulReporter: {
reports: ['lcov'],
fixWebpackSourcePaths: true,
},
});
};
|
udoprog/scribe
|
databind/src/main/java/eu/toolchain/scribe/CaseFormat.java
|
package eu.toolchain.scribe;
public interface CaseFormat {
/**
* Convert lower-case camel to upper-case camel.
*
* @param input Input lower-case camel string.
* @return Resulting upper-case camel string.
*/
static String lowerCamelToUpperCamel(String input) {
final StringBuilder builder = new StringBuilder();
boolean firstLower = true;
for (int i = 0; i < input.length(); i++) {
final char c = input.charAt(i);
if (Character.isLowerCase(c)) {
if (firstLower) {
builder.append(Character.toUpperCase(c));
firstLower = false;
continue;
}
} else {
firstLower = false;
}
builder.append(c);
}
return builder.toString();
}
}
|
rbourdon/rorybourdon
|
pages/_app.js
|
<reponame>rbourdon/rorybourdon<filename>pages/_app.js
import { AnimatePresence } from "framer-motion";
import { createGlobalStyle } from "styled-components";
import { ThemeControlProvider } from "@/lib/Context/ThemeContext";
import Layout from "@/components/layout";
const GlobalStyle = createGlobalStyle`
html {
scrollbar-width: thin;
scrollbar-color: var(--color-primary_mediumdark) var(--color-primary);
&::-webkit-scrollbar {
width: 10px;
}
&::-webkit-scrollbar-track {
background: var(--color-primary);
}
&::-webkit-scrollbar-thumb {
background-color: var(--color-primary_mediumdark);
}
&::-webkit-scrollbar-thumb:hover {
background-color: var(--color-primary_dark);
}
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
scroll-behavior: smooth;
}
body {
margin: 0;
padding: 0;
box-sizing: border-box;
font-size: 1rem;
font-weight: 100;
font-style: normal;
font-family: 'Montserrat', sans-serif;
color: hsla(0,0%,28.63%,1);
min-height: 100vh;
}
a {
color: inherit;
text-decoration: none;
}
*
{
box-sizing: border-box;
}
button, input[type="submit"], input[type="reset"] {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
}
p {
margin: 0;
font-size: clamp(1rem, .85vw, 1.3rem);
font-weight: 100;
}
figure {
margin: 0;
}
figcaption {
margin: 0;
}
header {
font-size: clamp(3.0rem, 6vw, 5.438rem);
line-height: 1;
}
h1 {
margin: 0;
font-size: clamp(2.7rem, 11vw, 8.5rem);
line-height: 1;
font-weight: 100;
}
h2 {
font-size: clamp(1.2rem, 4.5vw, 1.8rem);
line-height: clamp(1.2rem, 7vw, 2rem);
margin: 0;
font-weight: 100;
}
h3 {
margin: 0;
font-size: clamp(1.15rem, 1.66vw, 1.425rem);
line-height: clamp(1.25rem, 1.66vw, 1.8rem);
font-weight: 100;
}
h4 {
font-size: 1rem;
margin: 0 0 4px 0;
line-height: 1;
font-weight: 100;
}
`;
function handleExitComplete() {
if (typeof window !== "undefined") {
window.scrollTo({ top: 0, left: 0 });
}
}
function MyApp({ Component, pageProps, router }) {
return (
<ThemeControlProvider>
<GlobalStyle />
<Layout>
<AnimatePresence
exitBeforeEnter
onExitComplete={() => handleExitComplete()}
>
<Component {...pageProps} key={router.route} />
</AnimatePresence>
</Layout>
</ThemeControlProvider>
);
}
export default MyApp;
|
emarc99/SLib
|
src/slib/network/url_request_curl.cpp
|
<filename>src/slib/network/url_request_curl.cpp
/*
* Copyright (c) 2008-2018 SLIBIO <https://github.com/SLIBIO>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "slib/network/curl.h"
#include "slib/core/file.h"
#include "slib/core/system.h"
#include "curl/curl.h"
#include <stdlib.h>
#if defined(SLIB_PLATFORM_IS_TIZEN)
# include <net_connection.h>
#endif
#if defined(DELETE)
# undef DELETE
#endif
namespace slib
{
namespace priv
{
namespace url_request
{
class CurlRequestImpl : public UrlRequest
{
friend class CurlRequest;
public:
CURL* m_curl;
sl_bool m_flagClosed;
sl_bool m_flagProcessResponse;
public:
CurlRequestImpl()
{
m_curl = sl_null;
m_flagClosed = sl_false;
m_flagProcessResponse = sl_false;
}
~CurlRequestImpl()
{
}
public:
static Ref<CurlRequestImpl> create(const UrlRequestParam& param, const String& url) {
Ref<CurlRequestImpl> ret = new CurlRequestImpl;
if (ret.isNotNull()) {
ret->_init(param, url);
return ret;
}
return sl_null;
}
void _cancel() override
{
m_flagClosed = sl_true;
}
void _sendSync() override
{
#if defined(SLIB_PLATFORM_IS_TIZEN)
connection_h connection;
if (connection_create(&connection) != CONNECTION_ERROR_NONE) {
onError();
return;
}
#endif
CURL* curl = curl_easy_init();
if (!curl) {
#if defined(SLIB_PLATFORM_IS_TIZEN)
connection_destroy(connection);
#endif
onError();
return;
}
m_curl = curl;
#if defined(SLIB_PLATFORM_IS_TIZEN)
char* proxy_address;
sl_bool flagSetProxy = sl_false;
int conn_err = connection_get_proxy(connection, CONNECTION_ADDRESS_FAMILY_IPV4, &proxy_address);
if (conn_err == CONNECTION_ERROR_NONE && proxy_address) {
if (proxy_address[0]) {
curl_easy_setopt(curl, CURLOPT_PROXY, proxy_address);
flagSetProxy = sl_true;
}
free(proxy_address);
}
if (!flagSetProxy) {
conn_err = connection_get_proxy(connection, CONNECTION_ADDRESS_FAMILY_IPV6, &proxy_address);
if (conn_err == CONNECTION_ERROR_NONE && proxy_address) {
if (proxy_address[0]) {
curl_easy_setopt(curl, CURLOPT_PROXY, proxy_address);
}
free(proxy_address);
}
}
connection_set_proxy_address_changed_cb(connection, UrlRequest_Impl::callbackProxyChanged, (void*)this);
#endif
String url = m_url;
curl_easy_setopt(curl, CURLOPT_URL, url.getData());
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10L);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, m_timeout);
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, m_timeout);
if (m_flagAllowInsecureConnection) {
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
}
// Set http method
switch(m_method) {
case HttpMethod::GET:
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
break;
case HttpMethod::HEAD:
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "HEAD");
break;
case HttpMethod::POST:
curl_easy_setopt(curl, CURLOPT_POST, 1L);
break;
case HttpMethod::PUT:
curl_easy_setopt(curl, CURLOPT_PUT, 1L);
break;
case HttpMethod::DELETE:
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
break;
case HttpMethod::CONNECT:
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CONNECT");
break;
case HttpMethod::OPTIONS:
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "OPTIONS");
break;
case HttpMethod::TRACE:
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TRACE");
break;
default:
break;
}
curl_slist *headerChunk = sl_null;
// HTTP headers and additional headers
if(m_requestHeaders.isNotEmpty())
{
for (auto& pair : m_requestHeaders) {
String s = pair.key + ": " + pair.value;
headerChunk = curl_slist_append(headerChunk, s.getData());
}
}
if (headerChunk) {
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerChunk);
}
// post data
Memory requestBody = m_requestBody;
if (m_method == HttpMethod::POST) {
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.getData());
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.getSize());
} else {
if (requestBody.isNotNull()) {
curl_easy_setopt(curl, CURLOPT_READFUNCTION, CurlRequestImpl::callbackRead);
curl_easy_setopt(curl, CURLOPT_READDATA, (void*)this);
}
}
// received header
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, CurlRequestImpl::callbackHeader);
curl_easy_setopt(curl, CURLOPT_HEADERDATA, (void*)this);
// received data
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlRequestImpl::callbackWrite);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)this);
/* getting data */
CURLcode err = curl_easy_perform(curl);
processResponse();
if (err == CURLE_OK) {
onComplete();
} else {
String strError = String::create(curl_easy_strerror(err));
m_lastErrorMessage = strError;
onError();
}
if (headerChunk) {
curl_slist_free_all(headerChunk);
}
curl_easy_cleanup(curl);
#if defined(SLIB_PLATFORM_IS_TIZEN)
connection_destroy(connection);
#endif
}
void processResponse()
{
if (m_flagClosed) {
return;
}
if (m_flagProcessResponse) {
return;
}
m_flagProcessResponse = sl_true;
long response_code = 0;
curl_easy_getinfo(m_curl, CURLINFO_RESPONSE_CODE, &response_code);
m_responseStatus = (HttpStatus)((int)response_code);
String strLength = m_responseHeaders.getValue("Content-Length", String::null());
if (strLength.isNotEmpty()) {
m_sizeContentTotal = strLength.parseUint64();
}
onResponse();
}
sl_size onRead(void* data, sl_size size)
{
if (m_flagClosed) {
return 0;
}
Memory body = m_requestBody;
sl_size total = body.getSize();
if (m_sizeBodySent + size > total) {
if (total > m_sizeBodySent) {
size = total - (sl_size)m_sizeBodySent;
} else {
size = 0;
}
}
if (size > 0) {
body.read((sl_size)m_sizeBodySent, size, data);
m_sizeBodySent += size;
onUploadBody(size);
}
return size;
}
static size_t callbackRead(void *contents, size_t size, size_t nmemb, void *user_data)
{
CurlRequestImpl* req = (CurlRequestImpl*)user_data;
size_t n = size * nmemb;
if (n) {
return (size_t)(req->onRead(contents, (sl_size)n));
}
return 0;
}
sl_size onWrite(const void* data, sl_size size)
{
if (m_flagClosed) {
return 0;
}
processResponse();
if (m_downloadFilePath.isNotEmpty()) {
Ref<File> file = File::openForAppend(m_downloadFilePath);
if (file.isNotNull()) {
sl_reg ret = file->write(data, size);
if (ret > 0) {
size = ret;
} else {
size = 0;
}
}
onDownloadContent(size);
} else {
onReceiveContent(data, size, sl_null);
}
return size;
}
static size_t callbackWrite(void *contents, size_t size, size_t nmemb, void *user_data)
{
CurlRequestImpl* req = (CurlRequestImpl*)user_data;
size_t n = size * nmemb;
if (n) {
return (size_t)(req->onWrite(contents, (sl_size)n));
}
return 0;
}
sl_bool onHeader(char* header, sl_size size)
{
if (m_flagClosed) {
return sl_false;
}
if (size >= 2 && header[size-2] == '\r' && header[size-1] == '\n') {
size -= 2;
}
if (size > 0) {
sl_size index1 = size;
sl_size index2 = size;
for (sl_size i = 0; i < size; i++) {
if (header[i] == ':') {
index1 = i;
if (i + 1 < size && header[i + 1] == ' ') {
index2 = i + 2;
} else {
index2 = i + 1;
}
break;
}
}
String name(header, index1);
String value(header + index2, size - index2);
if (value.isEmpty() && name.startsWith("HTTP")) {
m_responseHeaders.setNull();
} else {
HttpHeaderMap headers = m_responseHeaders;
if (headers.isNull()) {
headers.initialize();
m_responseHeaders = headers;
}
headers.add(name, value);
}
}
return sl_true;
}
static size_t callbackHeader(char *buffer, size_t size, size_t nitems, void *user_data)
{
CurlRequestImpl* req = (CurlRequestImpl*)user_data;
size_t n = size * nitems;
if (n) {
if (req->onHeader(buffer, (sl_size)n)) {
return n;
}
}
return 0;
}
void onProxyChanged(const char *ipv4_address, const char *ipv6_address)
{
if (m_flagClosed) {
return;
}
if (ipv4_address) {
curl_easy_setopt(m_curl, CURLOPT_PROXY, ipv4_address);
} else if (ipv6_address) {
curl_easy_setopt(m_curl, CURLOPT_PROXY, ipv6_address);
}
}
static void callbackProxyChanged(const char *ipv4_address, const char *ipv6_address, void *user_data)
{
CurlRequestImpl* req = (CurlRequestImpl*)user_data;
req->onProxyChanged(ipv4_address, ipv6_address);
}
};
}
}
#define URL_REQUEST CurlRequest
#include "url_request_common.inc"
Ref<UrlRequest> CurlRequest::_create(const UrlRequestParam& param, const String& url)
{
return Ref<UrlRequest>::from(priv::url_request::CurlRequestImpl::create(param, url));
}
#if defined(SLIB_PLATFORM_IS_LINUX) && !defined(SLIB_PLATFORM_IS_ANDROID)
Ref<UrlRequest> UrlRequest::_create(const UrlRequestParam& param, const String& url)
{
return Ref<UrlRequest>::from(priv::url_request::CurlRequestImpl::create(param, url));
}
#endif
}
|
yrrapt/cacd
|
src/spice3/src/lib/ckt/cktmpar.c
|
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 <NAME>
**********/
/* CKTmodParam
* attach the given parameter to the specified model in the given circuit
*/
#include "spice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "ifsim.h"
#include "util.h"
#include "devdefs.h"
#include "sperror.h"
extern SPICEdev *DEVices[];
int CKTmodParam(GENERIC *ckt, GENERIC *modfast, int param, IFvalue *val, IFvalue *selector)
{
int type = ((GENmodel *)modfast)->GENmodType;
if (DEVices[type]->DEVmodParam) {
return((*(DEVices[type]->DEVmodParam)) (param, val, (GENmodel *)modfast));
}
return(E_BADPARM);
}
|
Maxime999/AnyCollect
|
docs/search/functions_11.js
|
var searchData=
[
['unit',['unit',['../classAnyCollect_1_1Matcher.html#aa34c8cdb6ee3ad97459204a3ee0c92c5',1,'AnyCollect::Matcher::unit()'],['../classAnyCollect_1_1Metric.html#a938687184b4e7a69ce20e89c293f8a36',1,'AnyCollect::Metric::unit()']]],
['update',['update',['../classAnyCollect_1_1Source.html#a66c0fc0bc1a70d3faed15137d488441f',1,'AnyCollect::Source']]],
['updatesources',['updateSources',['../classAnyCollect_1_1Controller.html#ae25d964f8fe167ef2f422e65f8f41acb',1,'AnyCollect::Controller']]],
['updatevalue',['updateValue',['../classAnyCollect_1_1Metric.html#a1dc1f246867246c710416855e3d0f472',1,'AnyCollect::Metric']]]
];
|
5shadesofr3d/ECE421Winter2019Assignment1
|
storage/storage_modules/default_arithmetic.rb
|
module DefaultArithmetic
def +(m1)
assert valid?
assert m1.is_a? SparseStorage
self.each_common_index(m1) do |i, j|
self[i, j] += m1[i, j]
end
assert valid?
self
end
def -(m1)
assert valid?
assert m1.is_a? SparseStorage
self.each_common_index(m1) do |i, j|
self[i, j] -= m1[i, j]
end
assert valid?
self
end
def *(scalar)
assert valid?
assert scalar.is_a? Numeric
self.each_index do |i, j|
self[i, j] *= scalar
end
assert valid?
self
end
def /(scalar)
assert valid?
assert scalar != 0
assert scalar.is_a? Numeric
self.each_index do |i, j|
self[i, j] /= scalar
end
assert valid?
self
end
def **(scalar)
assert valid?
assert scalar.is_a? Numeric
self.each_index do |i, j|
self[i, j] **= scalar
end
assert valid?
self
end
def dot(mat)
assert valid?
assert self.columns == mat.rows
result = self.class.new(self.rows, mat.columns)
result.each_index do |i, j|
for k in 0 .. self.columns - 1
result[i, j] += self[i, k] * mat[k, j]
end
end
assert valid?
return result
end
def power(pow)
assert valid?
assert pow.is_a? Integer and pow >= 1
result = self.clone
while (pow > 1)
result = result.dot(self)
pow -= 1
end
assert valid?
return result
end
end
|
dos1/card10-firmware
|
lib/vendor/Bosch/BHy1/examples/firmware/Bosch_PCB_7183_di03_BMA2x2_Cus-7183_di03.2.1.11703.h
|
<reponame>dos1/card10-firmware<filename>lib/vendor/Bosch/BHy1/examples/firmware/Bosch_PCB_7183_di03_BMA2x2_Cus-7183_di03.2.1.11703.h
const unsigned char bhy1_fw[]= {
0x2A,0x65,0x00,0x1A,0x06,0xBF,0x65,0x3D,0x00,0x00,0x00,
0x00,0xEC,0x3F,0x00,0x00,0x28,0xBA,0x7F,0x00,0xD8,0x32,
0x00,0x00,0x30,0x85,0x7F,0x00,0x4A,0x26,0x00,0x70,0x4A,
0x26,0x00,0x70,0x4A,0x26,0x00,0x70,0x4A,0x26,0x00,0x70,
0x4A,0x26,0x00,0x70,0x4A,0x26,0x00,0x70,0x4A,0x26,0x00,
0x70,0x4A,0x26,0x00,0x70,0x4A,0x26,0x00,0x70,0x4A,0x26,
0x00,0x70,0x4A,0x26,0x00,0x70,0x4A,0x26,0x00,0x70,0x4A,
0x26,0x00,0x70,0xE8,0x47,0x60,0x00,0xE8,0x47,0x60,0x00,
0xE8,0x47,0x60,0x00,0xE8,0x47,0x60,0x00,0xE8,0x47,0x60,
0x00,0xE8,0x47,0x60,0x00,0xE8,0x47,0x60,0x00,0xE8,0x47,
0x60,0x00,0x34,0x50,0x60,0x00,0xA4,0x53,0x60,0x00,0x04,
0x52,0x60,0x00,0xB4,0x94,0x60,0x00,0x30,0x85,0x7F,0x00,
0x30,0x85,0x7F,0x00,0x30,0x85,0x7F,0x00,0x30,0x85,0x7F,
0x00,0x4C,0x8D,0x60,0x00,0x4C,0x8D,0x60,0x00,0x4C,0x8D,
0x60,0x00,0x4C,0x8D,0x60,0x00,0x4C,0x8D,0x60,0x00,0x4C,
0x8D,0x60,0x00,0x59,0x06,0x4F,0x06,0x91,0x07,0x4F,0x06,
0xB1,0x02,0x4F,0x08,0xA1,0x04,0x4F,0x08,0xBD,0x05,0x4F,
0x08,0x05,0x01,0x8F,0x08,0x09,0x01,0x8F,0x08,0xB9,0x03,
0x8F,0x08,0xC1,0x03,0x8F,0x08,0xD1,0x04,0x8F,0x08,0x1D,
0x02,0xCF,0x08,0x8D,0x04,0xCF,0x08,0x8D,0x07,0xCF,0x08,
0xC5,0x07,0xCF,0x08,0x69,0x01,0x0F,0x09,0x99,0x07,0x4F,
0x09,0xE9,0x07,0x4F,0x09,0x29,0x00,0x8F,0x09,0x31,0x00,
0x8F,0x09,0xD1,0x00,0x8F,0x09,0xA5,0x01,0x8F,0x09,0xDD,
0x01,0x8F,0x09,0x09,0x03,0x8F,0x09,0x85,0x03,0x8F,0x09,
0x49,0x05,0x8F,0x09,0x0D,0x06,0x8F,0x09,0xED,0x07,0x8F,
0x09,0xBD,0x00,0xCF,0x09,0x1D,0x01,0xCF,0x09,0x95,0x01,
0xCF,0x09,0x1D,0x02,0xCF,0x09,0x6D,0x02,0xCF,0x09,0xA5,
0x02,0xCF,0x09,0x41,0x03,0xCF,0x09,0x7D,0x03,0xCF,0x09,
0xAD,0x05,0xCF,0x09,0x0D,0x06,0xCF,0x09,0x6D,0x06,0xCF,
0x09,0xC1,0x06,0xCF,0x09,0x85,0x01,0x0F,0x0A,0x11,0x02,
0x0F,0x0A,0x31,0x02,0x0F,0x0A,0xB5,0x02,0x0F,0x0A,0xB9,
0x03,0x0F,0x0A,0x69,0x07,0x0F,0x0A,0x05,0x04,0x4F,0x0A,
0x2D,0x07,0x4F,0x0A,0x95,0x00,0x8F,0x0A,0xAD,0x04,0x8F,
0x0A,0xD9,0x05,0x8F,0x0A,0x95,0x06,0x8F,0x0A,0xED,0x00,
0xCF,0x0A,0xF1,0x00,0xCF,0x0A,0xFD,0x00,0xCF,0x0A,0x69,
0x01,0xCF,0x0A,0x75,0x01,0xCF,0x0A,0x35,0x02,0xCF,0x0A,
0x05,0x03,0xCF,0x0A,0x09,0x05,0xCF,0x0A,0xFD,0x05,0xCF,
0x0A,0xB1,0x06,0xCF,0x0A,0x01,0x02,0x0F,0x0B,0xE5,0x02,
0x0F,0x0B,0xD1,0x02,0x8F,0x0B,0x29,0x03,0x8F,0x0B,0x91,
0x03,0x8F,0x0B,0xBD,0x03,0x8F,0x0B,0xE1,0x04,0x8F,0x0B,
0x25,0x05,0x8F,0x0B,0xD5,0x05,0x8F,0x0B,0x39,0x06,0x8F,
0x0B,0x91,0x07,0x8F,0x0B,0x2D,0x00,0xCF,0x0B,0x49,0x00,
0xCF,0x0B,0x01,0x01,0xCF,0x0B,0xCD,0x01,0xCF,0x0B,0x79,
0x05,0xCF,0x0B,0xC9,0x05,0xCF,0x0B,0xB5,0x07,0xCF,0x0B,
0x69,0x00,0x0F,0x0C,0x85,0x00,0x40,0x01,0xCD,0x00,0x0F,
0x0C,0xD5,0x00,0x0F,0x0C,0x45,0x01,0x0F,0x0C,0x5D,0x01,
0x0F,0x0C,0x75,0x01,0x0F,0x0C,0x0D,0x02,0x0F,0x0C,0xBD,
0x04,0x0F,0x0C,0xDD,0x04,0x0F,0x0C,0x01,0x07,0x0F,0x0C,
0x41,0x07,0x0F,0x0C,0x49,0x07,0x0F,0x0C,0xC9,0x07,0x0F,
0x0C,0x1D,0x00,0x4F,0x0C,0x65,0x00,0x4F,0x0C,0x49,0x01,
0x4F,0x0C,0x65,0x01,0x4F,0x0C,0x99,0x01,0x4F,0x0C,0x3D,
0x02,0x4F,0x0C,0x65,0x02,0x4F,0x0C,0xB1,0x02,0x4F,0x0C,
0x61,0x05,0x4F,0x0C,0xB1,0x05,0x4F,0x0C,0x45,0x06,0x4F,
0x0C,0x79,0x06,0x4F,0x0C,0x85,0x06,0x4F,0x0C,0x19,0x07,
0x4F,0x0C,0x21,0x00,0x8F,0x0C,0x6D,0x00,0x8F,0x0C,0x7D,
0x00,0x8F,0x0C,0x7D,0x04,0x8F,0x0C,0x85,0x05,0x8F,0x0C,
0xC1,0x03,0xCF,0x0C,0xC9,0x03,0xCF,0x0C,0x0D,0x07,0xCF,
0x0C,0x51,0x07,0xCF,0x0C,0x61,0x07,0xCF,0x0C,0x69,0x01,
0x40,0x01,0x25,0x00,0x0F,0x0D,0x4D,0x00,0x0F,0x0D,0x6D,
0x00,0x0F,0x0D,0x71,0x00,0x0F,0x0D,0x71,0x00,0x0F,0x0D,
0x89,0x00,0x0F,0x0D,0x91,0x00,0x0F,0x0D,0x99,0x00,0x0F,
0x0D,0xA1,0x00,0x0F,0x0D,0xA5,0x00,0x0F,0x0D,0xAD,0x00,
0x0F,0x0D,0xBD,0x00,0x0F,0x0D,0xC9,0x00,0x0F,0x0D,0xD5,
0x00,0x0F,0x0D,0x89,0x01,0x0F,0x0D,0xF9,0x01,0x0F,0x0D,
0x21,0x03,0x0F,0x0D,0x65,0x03,0x0F,0x0D,0x1D,0x04,0x0F,
0x0D,0x39,0x04,0x0F,0x0D,0x45,0x04,0x0F,0x0D,0x4D,0x04,
0x0F,0x0D,0x6D,0x04,0x0F,0x0D,0x71,0x04,0x0F,0x0D,0xF5,
0x05,0x0F,0x0D,0x3D,0x06,0x0F,0x0D,0x05,0x00,0x4F,0x0D,
0x51,0x00,0x4F,0x0D,0x8D,0x00,0x4F,0x0D,0xED,0x00,0x4F,
0x0D,0x21,0x02,0x4F,0x0D,0xBD,0x02,0x4F,0x0D,0xC1,0x03,
0x4F,0x0D,0x25,0x04,0x4F,0x0D,0x31,0x04,0x4F,0x0D,0x6D,
0x01,0x40,0x01,0x79,0x01,0x40,0x01,0x85,0x01,0x40,0x01,
0x91,0x01,0x40,0x01,0x9D,0x01,0x40,0x01,0xA9,0x01,0x40,
0x01,0xB5,0x01,0x40,0x01,0xD5,0x01,0x40,0x01,0xE1,0x01,
0x40,0x01,0x05,0x02,0x40,0x01,0x11,0x02,0x40,0x01,0x1D,
0x02,0x40,0x01,0xC9,0x04,0x4F,0x0D,0xF1,0x05,0x4F,0x0D,
0x31,0x07,0x4F,0x0D,0x59,0x07,0x4F,0x0D,0x65,0x07,0x4F,
0x0D,0xA9,0x01,0x8F,0x0D,0xD1,0x01,0x8F,0x0D,0xDD,0x01,
0x8F,0x0D,0xE5,0x01,0x8F,0x0D,0x09,0x02,0x8F,0x0D,0x2D,
0x02,0x8F,0x0D,0x7D,0x02,0x8F,0x0D,0x3D,0x03,0x8F,0x0D,
0x6D,0x04,0x8F,0x0D,0x49,0x05,0x8F,0x0D,0x59,0x05,0x8F,
0x0D,0x91,0x05,0x8F,0x0D,0xD5,0x05,0x8F,0x0D,0xF1,0x00,
0xCF,0x0D,0x21,0x02,0xCF,0x0D,0xFD,0x02,0xCF,0x0D,0xBD,
0x04,0xCF,0x0D,0x89,0x00,0x0F,0x0E,0xC1,0x04,0x0F,0x0E,
0xF1,0x05,0x0F,0x0E,0x5D,0x07,0x0F,0x0E,0xC9,0x07,0x0F,
0x0E,0x89,0x05,0x8F,0x0E,0x79,0x06,0x8F,0x0E,0xA1,0x06,
0x8F,0x0E,0x1D,0x07,0x8F,0x0E,0x6D,0x07,0x8F,0x0E,0x11,
0x00,0xCF,0x0E,0x4D,0x01,0xCF,0x0E,0x71,0x01,0xCF,0x0E,
0xBD,0x01,0xCF,0x0E,0xCD,0x01,0xCF,0x0E,0x25,0x02,0xCF,
0x0E,0x75,0x02,0xCF,0x0E,0xBD,0x02,0xCF,0x0E,0xA1,0x03,
0xCF,0x0E,0x2D,0x04,0xCF,0x0E,0x75,0x04,0xCF,0x0E,0x81,
0x04,0xCF,0x0E,0xA5,0x04,0xCF,0x0E,0xE1,0x04,0xCF,0x0E,
0x11,0x05,0xCF,0x0E,0x65,0x05,0xCF,0x0E,0xD5,0x05,0xCF,
0x0E,0x2D,0x06,0xCF,0x0E,0xBD,0x07,0xCF,0x0E,0x01,0x00,
0x0F,0x0F,0x25,0x00,0x0F,0x0F,0x5D,0x04,0x0F,0x0F,0x19,
0x05,0x0F,0x0F,0x1D,0x03,0x4F,0x0F,0x99,0x04,0x4F,0x0F,
0x21,0x05,0x4F,0x0F,0x8D,0x05,0x4F,0x0F,0xA9,0x05,0x4F,
0x0F,0xE1,0x05,0x4F,0x0F,0x81,0x06,0x4F,0x0F,0x95,0x06,
0x4F,0x0F,0xAD,0x06,0x4F,0x0F,0x01,0x07,0x4F,0x0F,0x1D,
0x07,0x4F,0x0F,0x31,0x07,0x4F,0x0F,0xC5,0x07,0x4F,0x0F,
0xE1,0x07,0x4F,0x0F,0x21,0x00,0x8F,0x0F,0x85,0x00,0x8F,
0x0F,0x9D,0x00,0x8F,0x0F,0xDD,0x00,0x8F,0x0F,0xE5,0x00,
0x8F,0x0F,0x7D,0x01,0x8F,0x0F,0x9D,0x01,0x8F,0x0F,0xB1,
0x01,0x8F,0x0F,0xD5,0x01,0x8F,0x0F,0x2D,0x02,0x8F,0x0F,
0xE5,0x01,0x40,0x01,0x09,0x03,0x8F,0x0F,0x35,0x03,0x8F,
0x0F,0x71,0x03,0x8F,0x0F,0x69,0x04,0x8F,0x0F,0xC9,0x04,
0x8F,0x0F,0x7D,0x00,0xCF,0x0F,0x91,0x02,0xCF,0x0F,0x15,
0x03,0x4F,0x09,0xBD,0x03,0x8F,0x0D,0xFD,0x00,0x8F,0x08,
0xB1,0x05,0x80,0x00,0x51,0x00,0x40,0x00,0xC1,0x05,0x00,
0x01,0x35,0x02,0x0F,0x0C,0x9D,0x04,0x0F,0x0C,0x29,0x05,
0x0F,0x0C,0x6D,0x01,0xCF,0x0C,0x5D,0x06,0xCF,0x0C,0x71,
0x06,0xCF,0x0C,0x79,0x06,0xCF,0x0C,0x7D,0x06,0xCF,0x0C,
0x85,0x06,0xCF,0x0C,0xA5,0x06,0xCF,0x0C,0x69,0x07,0xCF,
0x0C,0x05,0x01,0x0F,0x0D,0x25,0x02,0x0F,0x0D,0x61,0x02,
0x0F,0x0D,0x65,0x02,0x0F,0x0D,0x69,0x00,0x40,0x01,0x85,
0x05,0x4F,0x0D,0x4D,0x00,0x8F,0x0D,0x39,0x01,0xC0,0x01,
0xA1,0x04,0x8F,0x0E,0xB5,0x04,0x8F,0x0E,0xED,0x04,0x8F,
0x0E,0x1D,0x05,0x8F,0x0E,0x45,0x05,0x8F,0x0E,0x15,0x06,
0x8F,0x0E,0xB9,0x06,0x8F,0x0E,0xDD,0x00,0xCF,0x0E,0x3D,
0x03,0xCF,0x0E,0xA1,0x03,0xCF,0x0E,0xE5,0x06,0xCF,0x0E,
0x35,0x06,0x4F,0x0F,0xF1,0x00,0x8F,0x0F,0x55,0x02,0x8F,
0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xAB,0x26,0xE0,0x7C,0x00,0x00,0x4F,0x00,0x6F,
0x24,0x3F,0x00,0x2F,0x23,0x00,0x80,0x41,0x2B,0xC2,0x00,
0xC3,0x72,0x00,0x70,0x00,0x00,0x2F,0x21,0x84,0x00,0x41,
0x2B,0x0C,0x06,0x61,0xBC,0x8C,0x24,0x83,0x9F,0xE1,0x20,
0xC5,0x07,0x40,0x2B,0x00,0x07,0xC5,0x21,0x81,0x0F,0x00,
0x7F,0x00,0x00,0xE1,0x20,0xC1,0x07,0x74,0x70,0xE1,0x20,
0xC1,0x07,0xC2,0x21,0x41,0x00,0x41,0x2A,0x42,0x05,0x8D,
0x70,0x60,0x44,0x0C,0x24,0x80,0x8F,0x01,0x00,0x00,0x00,
0xC1,0x2C,0x26,0x04,0xC0,0x24,0x25,0x14,0x8C,0x24,0x04,
0x80,0xC1,0x2C,0x26,0x02,0xC0,0x24,0x25,0x12,0x4C,0x24,
0x00,0x84,0xC1,0x2C,0x26,0x01,0xC0,0x24,0x25,0x11,0x94,
0x74,0xC1,0x2C,0xA6,0x00,0xC0,0x24,0xA5,0x10,0x94,0x72,
0xC0,0x24,0x65,0x10,0x85,0x71,0x00,0x2B,0x03,0x03,0x69,
0xBC,0x82,0x7A,0x40,0x2A,0x02,0x05,0x2F,0x21,0x40,0x80,
0x2F,0x21,0x84,0x00,0x41,0x2B,0x0C,0x03,0x85,0x79,0xE0,
0x7F,0x40,0x2B,0x00,0x05,0x07,0x21,0x81,0x0F,0x00,0x80,
0x00,0x00,0x0D,0x00,0x00,0x00,0x07,0x23,0x83,0x0F,0x00,
0x80,0x00,0x00,0x00,0x21,0x44,0x00,0x00,0x23,0xC5,0x00,
0x0C,0x24,0x40,0x81,0xCC,0x20,0x81,0x80,0x10,0x00,0x06,
0x00,0x08,0x44,0x40,0x40,0x81,0x42,0x28,0x44,0x60,0x41,
0x81,0x43,0x8A,0x24,0xDF,0x1F,0x40,0x2C,0x4C,0x15,0x14,
0x24,0x44,0x10,0x14,0x24,0xC5,0x10,0x40,0x2C,0x8C,0x10,
0x0C,0x24,0x00,0x83,0xCC,0x25,0x05,0x83,0x92,0x01,0x06,
0x00,0x41,0x29,0x04,0x05,0x41,0x2B,0x05,0x05,0x02,0x24,
0x46,0x01,0x53,0x26,0x86,0x02,0x07,0x21,0xC7,0x00,0x40,
0x29,0xC1,0x02,0x41,0x28,0x4C,0x05,0x85,0x79,0x40,0x28,
0xC0,0x02,0x40,0x2B,0xC3,0x02,0x41,0x2A,0x4C,0x05,0x85,
0x7B,0x40,0x2A,0xC2,0x02,0x9F,0xBB,0x4E,0x26,0x0C,0x88,
0x1C,0x00,0x2D,0x00,0x01,0x2A,0x85,0x01,0x8C,0x26,0x01,
0x80,0x01,0x2B,0x85,0x01,0xCA,0x25,0x26,0x00,0x17,0x00,
0x20,0x00,0x8D,0x70,0xD4,0x70,0x00,0x2B,0x0C,0x03,0xC5,
0x25,0x02,0x03,0x01,0x2B,0x8C,0x01,0x41,0x2F,0xC7,0x87,
0x62,0x00,0x22,0x00,0x9F,0xB9,0x00,0x25,0x05,0x80,0x01,
0x24,0x4C,0x90,0x10,0x00,0x26,0x00,0xC2,0x24,0x66,0x00,
0x2F,0x24,0x04,0x93,0x2F,0x25,0x44,0x01,0x41,0x2D,0xC0,
0x82,0x40,0x2C,0x41,0x15,0x25,0x78,0x41,0x2C,0xC1,0x12,
0x40,0x2C,0x04,0x05,0xE1,0x20,0xC6,0x07,0x80,0x71,0x4C,
0x26,0x00,0x88,0xCA,0x23,0x85,0x00,0xCA,0x22,0x25,0x00,
0x13,0x23,0x83,0x01,0x05,0x23,0x83,0x80,0xD3,0x25,0x61,
0x82,0xD1,0x20,0x21,0x80,0xCA,0x27,0x62,0x00,0x00,0x20,
0xC0,0x81,0xE0,0x7F,0x41,0x21,0x01,0x00,0x0E,0x25,0x05,
0x80,0x03,0x21,0x0C,0x83,0x52,0x00,0x23,0x00,0x0C,0x70,
0x41,0x2D,0xC0,0x82,0x40,0x2C,0x41,0x15,0x25,0x78,0x41,
0x2C,0xC1,0x12,0x42,0x24,0x44,0x00,0x40,0x2C,0x04,0x05,
0xE1,0x20,0xC6,0x07,0x80,0x71,0x4C,0x26,0x00,0x88,0xCA,
0x23,0x85,0x00,0xCA,0x22,0x25,0x00,0x13,0x23,0x83,0x01,
0x05,0x23,0x83,0x80,0xCA,0x27,0x22,0x00,0x04,0x27,0x07,
0x80,0xD3,0x25,0x61,0x82,0xCA,0x27,0x62,0x00,0x00,0x20,
0xC0,0x81,0xE0,0x7F,0x41,0x21,0x01,0x00,0xCC,0x25,0x21,
0x80,0xE1,0x20,0xC1,0x07,0x2C,0x70,0x00,0x25,0x45,0x81,
0x01,0x24,0x0C,0x93,0xF8,0x07,0xE3,0xFF,0x04,0x71,0x53,
0x24,0x81,0x02,0x0E,0x20,0x40,0x80,0x04,0x24,0x84,0x0F,
0x00,0x00,0x00,0x08,0x12,0x00,0x22,0x00,0xC0,0x20,0x61,
0x00,0x2F,0x24,0x02,0x93,0x2F,0x25,0x44,0x01,0x80,0x07,
0xE6,0xFF,0xC5,0x24,0x06,0x00,0x4E,0x20,0x40,0x00,0x4E,
0x20,0x01,0x88,0x1A,0x00,0x2D,0x00,0x01,0x2D,0x05,0x00,
0xC0,0xE0,0x01,0x2C,0x05,0x10,0xCA,0x25,0x26,0x00,0x15,
0x00,0x20,0x00,0x8D,0x70,0x14,0x70,0x00,0x2C,0x41,0x10,
0xC5,0x25,0x42,0x00,0x01,0x2C,0x0C,0x10,0x49,0x07,0xEF,
0xFF,0x84,0x71,0x2F,0x22,0x40,0x90,0x41,0x26,0x04,0x70,
0x00,0x00,0x00,0x00,0x34,0x02,0x01,0x00,0x2F,0x23,0xC0,
0x90,0x41,0x26,0x05,0x70,0x00,0x00,0x00,0x00,0x4E,0x02,
0x01,0x00,0x0C,0x23,0x80,0x92,0xCC,0x22,0x01,0x80,0x08,
0x42,0x14,0x00,0x0E,0x00,0x40,0x40,0x41,0x42,0x28,0x42,
0x60,0x41,0x41,0x43,0x88,0x42,0xA0,0x44,0x41,0x45,0x2F,
0x26,0x40,0x00,0x41,0x2E,0x46,0x85,0x06,0x21,0x81,0x0F,
0xF0,0xFF,0x00,0x00,0xC5,0x21,0x82,0x0F,0x10,0x00,0x00,
0x00,0x2E,0x00,0x22,0x00,0x00,0x40,0xCB,0x42,0x10,0x00,
0x00,0x00,0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,0x00,0xC4,
0x71,0x04,0x21,0xBE,0x82,0x42,0x26,0x46,0x00,0x12,0x00,
0x02,0x00,0x2F,0x20,0x00,0x80,0xF3,0x07,0xEF,0xFF,0x2F,
0x21,0x4B,0x00,0x2F,0x27,0xC0,0x00,0x41,0x2F,0x47,0x85,
0x06,0x23,0x88,0x0F,0xF0,0xFF,0x00,0x00,0xC5,0x20,0x82,
0x1F,0x10,0x00,0x00,0x00,0x30,0x00,0x22,0x00,0x40,0x42,
0xCB,0x42,0x10,0x00,0x00,0x00,0x2F,0x22,0x80,0x80,0x2F,
0x20,0x0B,0x12,0xE4,0x71,0x04,0x20,0xBE,0x92,0x42,0x27,
0x47,0x00,0x10,0x00,0x02,0x00,0x2F,0x22,0x80,0x80,0xF1,
0x07,0xEF,0xFF,0x2F,0x20,0x0B,0x12,0x8C,0x26,0xDF,0x8F,
0x4A,0x26,0x00,0x70,0x76,0x03,0x01,0x00,0x8C,0x27,0xDF,
0x8F,0x4A,0x26,0x00,0x70,0xC4,0x03,0x21,0x00,0x02,0x26,
0xCB,0x01,0x4C,0x23,0x80,0x9D,0x02,0x21,0x49,0x12,0x3A,
0x01,0x09,0x00,0x42,0x23,0x8A,0x90,0x4A,0x26,0x00,0x70,
0x8A,0x00,0x01,0x00,0x24,0x00,0x09,0x00,0x2F,0x22,0x80,
0x80,0x2F,0x20,0x0B,0x12,0x40,0x22,0x4A,0x90,0x4A,0x26,
0x00,0x70,0x72,0x00,0x01,0x00,0x2F,0x22,0x80,0x80,0x6B,
0x00,0x20,0x00,0x2F,0x20,0x0B,0x12,0x4C,0x22,0x00,0x98,
0x6D,0x70,0x28,0x00,0x2B,0x00,0x42,0x22,0x0A,0x18,0x0A,
0x21,0x80,0x90,0x12,0x00,0x02,0x00,0x02,0x26,0x8B,0x72,
0x00,0x00,0x20,0x00,0x00,0x28,0xC9,0x12,0x01,0x28,0x82,
0x12,0x3F,0x00,0x20,0x00,0x0D,0x70,0x02,0x26,0x8B,0x72,
0x00,0x00,0x20,0x00,0x00,0x2A,0xC9,0x02,0x02,0x26,0x8B,
0xF2,0x00,0x00,0x20,0x00,0x00,0x28,0xCB,0x12,0x12,0x00,
0x09,0x00,0x40,0x22,0x0B,0x18,0x01,0x28,0xC2,0x12,0x13,
0x00,0x20,0x00,0x0D,0x70,0x01,0x2A,0x82,0x02,0x01,0x28,
0x88,0x12,0x05,0x22,0xC2,0x02,0x2F,0x20,0x00,0x80,0x2F,
0x21,0x4B,0x00,0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,0x00,
0x0C,0x24,0x40,0x81,0x4A,0x26,0x00,0x70,0xE0,0x01,0x02,
0x00,0x00,0x20,0x80,0x80,0x01,0x21,0x01,0x02,0x04,0x21,
0xBE,0x8F,0x80,0x00,0x00,0x00,0x4A,0x26,0x00,0x70,0x14,
0x00,0x01,0x00,0xC4,0x71,0x2F,0x21,0x42,0x80,0x2F,0x20,
0x04,0x80,0xC5,0x21,0x65,0x10,0x44,0x20,0xBE,0x80,0x4A,
0x26,0x00,0x70,0x34,0x00,0x21,0x00,0x35,0x70,0xCB,0x20,
0x61,0x81,0x4A,0x26,0x00,0x70,0x28,0x00,0x01,0x00,0x40,
0x20,0x80,0x80,0xC0,0x21,0x65,0x00,0x04,0x21,0xBE,0x8F,
0x80,0x00,0x00,0x00,0x4A,0x26,0x00,0x70,0x10,0x00,0x01,
0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,0xC4,0x71,
0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,0x2F,0x21,0x42,
0x80,0x2F,0x20,0x04,0x00,0xD4,0x70,0x4A,0x26,0x00,0x70,
0x66,0x00,0x0C,0x00,0x8C,0x26,0xDF,0x8F,0x4A,0x26,0x00,
0x70,0x3E,0x01,0x0A,0x00,0x06,0x21,0x81,0x0F,0x10,0x00,
0x00,0x00,0x40,0x2E,0x02,0x05,0x45,0x79,0x2F,0x22,0x03,
0x01,0x45,0x79,0xE0,0x7E,0x14,0x70,0x4A,0x26,0x00,0x70,
0xCE,0x05,0xC2,0xFF,0xD3,0x73,0x00,0x80,0x00,0x00,0x4A,
0x26,0x00,0x70,0x7C,0x71,0x12,0x00,0x02,0x00,0x54,0x70,
0x4A,0x26,0x00,0x70,0x7C,0x71,0xCA,0x21,0x41,0x00,0x40,
0x40,0xE0,0x7E,0x54,0x70,0x4A,0x26,0x00,0x70,0xB2,0x05,
0xC2,0xFF,0x4A,0x26,0x00,0x70,0xE0,0x7E,0x4A,0x26,0x00,
0x70,0x02,0x26,0x8A,0x71,0x00,0x00,0x00,0x00,0x42,0x22,
0x4A,0x90,0x4A,0x26,0x00,0x70,0x88,0x00,0x0B,0x00,0x8C,
0x00,0x01,0x00,0x4C,0x22,0x00,0x98,0x4A,0x26,0x00,0x70,
0x2A,0x00,0x0B,0x00,0x42,0x22,0x0A,0x18,0x05,0x21,0x09,
0x90,0x6D,0x77,0x10,0x00,0x02,0x00,0x00,0x2B,0x8B,0x12,
0x87,0x23,0xFF,0x1F,0x04,0x21,0xC9,0x02,0x01,0x29,0x80,
0x02,0x5D,0x00,0x20,0x00,0x2C,0x70,0x35,0x70,0x6D,0x77,
0x1E,0x00,0x02,0x00,0x4C,0x22,0x00,0x98,0xC2,0x23,0xCA,
0x12,0x0A,0x00,0x0A,0x00,0x00,0x2B,0x8B,0x12,0x87,0x23,
0xFF,0x1F,0x04,0x20,0xC9,0x02,0x02,0x26,0x8B,0xF2,0x00,
0x00,0x20,0x00,0x00,0x29,0xCB,0x02,0x14,0x00,0x09,0x00,
0x40,0x22,0x0B,0x18,0x01,0x29,0xC0,0x02,0x15,0x00,0x20,
0x00,0x2C,0x70,0x01,0x28,0x80,0x02,0x01,0x29,0x81,0x02,
0x05,0x20,0xC0,0x02,0x0D,0x00,0x00,0x00,0x2F,0x20,0x00,
0x80,0x2F,0x21,0x4B,0x00,0x44,0x20,0xBE,0x80,0x4A,0x26,
0x00,0x70,0x1C,0x00,0x01,0x00,0x44,0x20,0x4A,0x01,0x05,
0x22,0x7E,0x92,0x4A,0x26,0x00,0x70,0x0C,0x00,0x01,0x00,
0x40,0x20,0x80,0x80,0x41,0x21,0x01,0x00,0x2F,0x21,0x42,
0x80,0x2F,0x20,0x04,0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,
0x04,0x00,0x02,0x26,0x86,0x01,0x04,0x21,0xBE,0x8F,0x10,
0x00,0x00,0x00,0xC0,0x26,0x62,0x00,0x65,0xF1,0x8A,0x26,
0xDF,0x0F,0xC3,0x41,0x10,0x00,0x00,0x00,0x0C,0x70,0x5F,
0xF1,0x02,0x26,0x86,0x01,0x2C,0x70,0xB7,0x06,0xEF,0xFF,
0x0C,0x70,0x02,0x20,0x80,0x80,0x03,0x21,0x01,0x02,0x04,
0x21,0xBE,0x8F,0x40,0x00,0x00,0x00,0x4A,0x26,0x00,0x70,
0x20,0x00,0x02,0x00,0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,
0x00,0x42,0x26,0x46,0x00,0x04,0x21,0xBE,0x8F,0x40,0x00,
0x00,0x00,0x4A,0x26,0x00,0x70,0x52,0x00,0x01,0x00,0x44,
0x20,0xBE,0x80,0x4A,0x26,0x00,0x70,0x46,0x00,0x21,0x00,
0x44,0x20,0x7E,0x80,0x4A,0x26,0x00,0x70,0x1A,0x00,0x02,
0x00,0x35,0x70,0x4A,0x26,0x00,0x70,0x32,0x00,0x02,0x00,
0x44,0x20,0x3E,0x81,0x4A,0x26,0x00,0x70,0x26,0x00,0x01,
0x00,0x40,0x20,0x80,0x80,0x41,0x21,0x01,0x00,0x04,0x21,
0xBE,0x8F,0x80,0x00,0x00,0x00,0xC0,0x26,0x62,0x00,0x0E,
0x00,0x01,0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,
0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,0x2F,0x21,0x42,
0x80,0x2F,0x20,0x04,0x00,0xD3,0x71,0x10,0x00,0x00,0x00,
0x4A,0x26,0x00,0x70,0xFC,0x05,0xCA,0xFF,0x34,0x70,0xCC,
0x20,0x21,0x80,0x4A,0x26,0x00,0x70,0xA6,0xF3,0x2F,0x20,
0x00,0x80,0x2F,0x21,0x4B,0x00,0xD3,0x71,0x10,0x00,0x00,
0x00,0x42,0x26,0x46,0x00,0xB8,0xF6,0xD4,0x70,0x4A,0x26,
0x00,0x70,0x3E,0x06,0xCC,0xFF,0xE7,0x05,0xCF,0xFF,0xD3,
0x71,0x10,0x00,0x00,0x00,0xCC,0x20,0x21,0x80,0x2F,0x21,
0x03,0x01,0x02,0x78,0x10,0x00,0x01,0x00,0x05,0x21,0x81,
0x0F,0xF8,0x7F,0x00,0x00,0xE0,0x7E,0x8C,0x27,0xDF,0x8F,
0x4A,0x26,0x00,0x70,0x28,0x00,0x02,0x00,0x0C,0x20,0x80,
0x9F,0x10,0x00,0x00,0x00,0xCC,0x22,0x21,0x80,0x4A,0x26,
0x00,0x70,0x0A,0x00,0x01,0x00,0x2F,0x21,0x43,0x01,0xE9,
0xF1,0x0C,0x24,0x40,0x81,0x4A,0x26,0x00,0x70,0xE5,0xF5,
0x05,0x21,0x81,0x0F,0xF0,0x7F,0x00,0x00,0x0C,0x70,0xE0,
0x7E,0x60,0x41,0x40,0x40,0xE0,0x7E,0xE0,0x78,0x2F,0x23,
0x40,0x80,0x4A,0x24,0xC0,0x02,0x14,0x00,0x26,0x00,0x6F,
0x22,0x0A,0x00,0x6F,0x22,0x0A,0x00,0x2F,0x22,0x82,0x00,
0x4A,0x24,0x80,0x02,0x2F,0x24,0x40,0x90,0xC0,0x22,0x65,
0x00,0x41,0x2C,0x43,0x15,0x8C,0x23,0xDF,0x8F,0x48,0x00,
0x21,0x00,0x53,0x21,0x01,0x85,0x8E,0x23,0xD0,0x84,0x1A,
0x00,0x24,0x00,0x94,0xB9,0x9F,0xE3,0x01,0x29,0xC0,0x00,
0xCA,0x20,0x29,0x00,0x51,0x22,0x00,0x80,0xE0,0x7F,0xCE,
0x20,0x21,0x00,0x4E,0x23,0x03,0x00,0x90,0x73,0x4E,0x23,
0x0C,0x08,0x01,0x28,0x00,0x03,0x00,0x29,0xC1,0x00,0x25,
0x78,0xCA,0x20,0x89,0x00,0xD1,0x22,0x2C,0x80,0xE0,0x7F,
0xCE,0x20,0x21,0x00,0xCC,0x20,0x21,0x80,0x40,0x40,0xD1,
0x20,0x22,0x80,0xE0,0x7F,0xC0,0x20,0x62,0x00,0xCB,0x44,
0xE0,0xFF,0x00,0x00,0x14,0x24,0x44,0x10,0x14,0x24,0xC5,
0x10,0xB6,0xBC,0x0C,0x24,0x00,0x83,0xCC,0x25,0x05,0x83,
0xC2,0x00,0x26,0x00,0x96,0xBC,0x41,0x2C,0x44,0x05,0x41,
0x2D,0x45,0x05,0x00,0x25,0x05,0x01,0x82,0x25,0x8F,0x0F,
0x8C,0x25,0xDF,0x8E,0xF4,0x00,0x26,0x00,0x07,0x21,0xCC,
0x80,0x40,0x25,0x47,0x00,0x94,0xB9,0xD4,0xB9,0x94,0xBB,
0xCF,0x27,0xE4,0x02,0x40,0x2B,0xC3,0x02,0x41,0x2A,0x45,
0x05,0x40,0x2A,0xC2,0x82,0x1D,0x20,0x84,0x00,0x05,0x23,
0x43,0x01,0x1C,0x20,0x8C,0x00,0x94,0x70,0x1D,0x20,0xC4,
0x00,0xCF,0x27,0xE2,0x07,0x1C,0x20,0xC5,0x00,0x00,0x24,
0x0C,0x91,0x1D,0x21,0x84,0x00,0x41,0x25,0x00,0x00,0x1C,
0x21,0x85,0x00,0x00,0x24,0x0C,0x91,0x1D,0x21,0xC4,0x00,
0x01,0x20,0x40,0x81,0x1C,0x21,0xC5,0x00,0x41,0x26,0x01,
0x70,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x81,0x01,0x21,
0x41,0x01,0x1B,0x09,0x3F,0x05,0x00,0x24,0x0C,0x93,0x42,
0x27,0x47,0x00,0x01,0x20,0x00,0x80,0x01,0x21,0x41,0x00,
0x00,0x24,0x0C,0x93,0x40,0x2F,0x04,0x05,0xE1,0x20,0xC6,
0x07,0x80,0x71,0x40,0x29,0xC5,0x07,0x05,0x25,0xC5,0x81,
0xCF,0x25,0xE2,0x07,0x41,0x2D,0xC5,0x07,0x00,0x20,0x40,
0x81,0xE0,0x7F,0x41,0x21,0x01,0x00,0x02,0x24,0x04,0x83,
0xCC,0x20,0x21,0x80,0xE1,0x20,0xC1,0x07,0xCA,0x21,0x21,
0x00,0x02,0x25,0x05,0x83,0xCC,0x22,0x21,0x80,0xCA,0x20,
0x21,0x00,0xE1,0x20,0xC1,0x07,0xCA,0x21,0x21,0x00,0x0C,
0x24,0x00,0x83,0xCC,0x25,0x05,0x83,0x20,0x00,0x25,0x00,
0x0C,0x24,0x40,0x81,0xCC,0x20,0x81,0x80,0xCA,0x20,0x85,
0x00,0xCA,0x21,0xC5,0x00,0x07,0x23,0x43,0x80,0xE0,0x7F,
0xCF,0x21,0xE4,0x07,0x2F,0x25,0xC0,0x80,0x41,0x26,0x04,
0x70,0x00,0x00,0x00,0x00,0xCC,0x22,0x21,0x80,0x08,0x03,
0x21,0x00,0x2F,0x21,0x40,0x90,0xC7,0x24,0x65,0x00,0xCC,
0x20,0x21,0x80,0xD4,0x02,0x01,0x00,0x41,0x29,0x46,0x95,
0x06,0x21,0x81,0x0F,0xF0,0xFF,0x00,0x00,0xC5,0x21,0x82,
0x0F,0x10,0x00,0x00,0x00,0x2E,0x00,0x22,0x00,0x00,0x40,
0xCB,0x42,0x10,0x00,0x00,0x00,0x2F,0x20,0x00,0x80,0x2F,
0x21,0x4B,0x00,0xC4,0x71,0x04,0x21,0xBE,0x82,0x42,0x26,
0x46,0x00,0x12,0x00,0x02,0x00,0x2F,0x20,0x00,0x80,0xF3,
0x07,0xEF,0xFF,0x2F,0x21,0x4B,0x00,0x41,0x2D,0x47,0x85,
0x06,0x23,0x88,0x0F,0xF0,0xFF,0x00,0x00,0xC5,0x20,0x82,
0x1F,0x10,0x00,0x00,0x00,0x30,0x00,0x22,0x00,0x40,0x42,
0xCB,0x42,0x10,0x00,0x00,0x00,0x2F,0x22,0x80,0x80,0x2F,
0x20,0x0B,0x12,0xE4,0x71,0x04,0x20,0xBE,0x92,0x42,0x27,
0x47,0x00,0x10,0x00,0x02,0x00,0x2F,0x22,0x80,0x80,0xF1,
0x07,0xEF,0xFF,0x2F,0x20,0x0B,0x12,0x8C,0x26,0xDF,0x8F,
0xF2,0x01,0x01,0x00,0x8C,0x27,0xDF,0x8F,0x1C,0x02,0x21,
0x00,0x1D,0x20,0x8A,0x00,0x00,0x26,0xC6,0x01,0x1C,0x20,
0x8B,0x00,0x1D,0x21,0x87,0x00,0x82,0x26,0xCF,0x0F,0x1C,
0x21,0x8C,0x00,0x00,0x23,0xCB,0x91,0x41,0x24,0x02,0x10,
0x1D,0x20,0x07,0x02,0x1C,0x20,0x0C,0x02,0x00,0x23,0xCB,
0x91,0x01,0x22,0x02,0x03,0x1D,0x21,0x07,0x02,0x1C,0x21,
0x0C,0x02,0x00,0x22,0xC2,0x81,0x41,0x24,0x09,0x10,0x40,
0x29,0x01,0x13,0x41,0x2A,0x03,0x05,0x65,0x79,0x40,0x2A,
0x07,0x03,0x40,0x2A,0x00,0x03,0x41,0x2B,0x03,0x15,0x65,
0x78,0x40,0x2B,0x0C,0x13,0x55,0x70,0xC5,0x24,0xA2,0x10,
0xD4,0x70,0x40,0x00,0x0C,0x00,0x04,0x21,0xBE,0x8F,0x20,
0x00,0x00,0x00,0x12,0x00,0x01,0x00,0xC4,0x71,0x2F,0x21,
0x42,0x80,0x2F,0x20,0x04,0x80,0x2F,0x24,0x04,0x13,0x95,
0x70,0x36,0x00,0x0A,0x00,0x04,0x24,0xBE,0x9F,0xFF,0x7F,
0xFF,0xFF,0x0C,0x00,0x02,0x00,0x44,0x20,0x7E,0x80,0x22,
0x00,0x01,0x00,0x40,0x20,0x40,0x80,0x41,0x21,0x01,0x00,
0x04,0x21,0xBE,0x8F,0x20,0x00,0x00,0x00,0x0E,0x00,0x01,
0x00,0xC4,0x71,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,
0x8C,0x26,0xDF,0x8F,0x0E,0x01,0x0A,0x00,0xD4,0x70,0x1A,
0x00,0x0C,0x00,0x06,0x21,0x81,0x0F,0x10,0x00,0x00,0x00,
0x40,0x2E,0x02,0x05,0x45,0x79,0x2F,0x22,0x03,0x01,0x45,
0x79,0xE0,0x7E,0x8C,0x26,0xFF,0x82,0xFA,0x00,0x0B,0x00,
0x02,0x26,0x8A,0x71,0x00,0x00,0x00,0x00,0x42,0x22,0x4A,
0x90,0x4A,0x26,0x00,0x70,0x88,0x00,0x0B,0x00,0x8C,0x00,
0x01,0x00,0x4C,0x22,0x00,0x98,0x4A,0x26,0x00,0x70,0x2A,
0x00,0x0B,0x00,0x42,0x22,0x0A,0x18,0x05,0x24,0x0C,0x90,
0x6D,0x77,0x10,0x00,0x02,0x00,0x00,0x2B,0x8B,0x12,0x87,
0x23,0xFF,0x1F,0x04,0x21,0xCC,0x02,0x01,0x29,0x80,0x02,
0x5D,0x00,0x20,0x00,0x2C,0x70,0x95,0x70,0x6D,0x77,0x1E,
0x00,0x02,0x00,0x4C,0x22,0x00,0x98,0xC2,0x23,0xCA,0x12,
0x0A,0x00,0x0A,0x00,0x00,0x2B,0x8B,0x12,0x87,0x23,0xFF,
0x1F,0x04,0x20,0xCC,0x02,0x02,0x26,0x8B,0xF2,0x00,0x00,
0x20,0x00,0x00,0x29,0xCB,0x02,0x14,0x00,0x09,0x00,0x40,
0x22,0x0B,0x18,0x01,0x29,0xC0,0x02,0x15,0x00,0x20,0x00,
0x2C,0x70,0x01,0x28,0x80,0x02,0x01,0x29,0x81,0x02,0x05,
0x20,0xC0,0x02,0x0D,0x00,0x00,0x00,0x2F,0x20,0x00,0x80,
0x2F,0x21,0x4B,0x00,0x44,0x20,0xBE,0x80,0x4A,0x26,0x00,
0x70,0x1C,0x00,0x01,0x00,0x44,0x20,0x4A,0x01,0x05,0x22,
0x3E,0x93,0x4A,0x26,0x00,0x70,0x0C,0x00,0x01,0x00,0x40,
0x20,0x80,0x80,0x41,0x21,0x01,0x00,0x2F,0x21,0x42,0x80,
0x2F,0x20,0x04,0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,
0x00,0x02,0x26,0x86,0x01,0x04,0x21,0xBE,0x8F,0x10,0x00,
0x00,0x00,0xC0,0x26,0x62,0x00,0x80,0xF1,0x8A,0x26,0xDF,
0x0F,0xC3,0x41,0x10,0x00,0x00,0x00,0xF5,0x06,0xEF,0xFF,
0x0C,0x70,0x02,0x26,0x86,0x01,0x2C,0x70,0xE9,0x06,0xEF,
0xFF,0x0C,0x70,0xD3,0x71,0x10,0x00,0x00,0x00,0xCC,0x20,
0x21,0x80,0x2F,0x21,0x03,0x01,0xC5,0x21,0x82,0x0F,0xF8,
0x7F,0x00,0x00,0xC0,0x78,0x70,0xF5,0x8C,0x27,0xDF,0x8F,
0x14,0x00,0x01,0x00,0x2F,0x21,0x03,0x01,0x05,0x21,0x81,
0x0F,0xF0,0x7F,0x00,0x00,0x0C,0x70,0x64,0xF1,0x0C,0x20,
0x80,0x9F,0x10,0x00,0x00,0x00,0xCC,0x22,0x21,0x80,0x2F,
0x21,0x03,0x01,0xC5,0x21,0x82,0x0F,0xF8,0x7F,0x00,0x00,
0xC5,0x21,0x81,0x0F,0xF0,0x7F,0x00,0x00,0x0C,0x70,0x52,
0xF1,0x0C,0x25,0x80,0x8F,0xE0,0xFF,0x00,0x00,0x4A,0x26,
0x00,0x70,0x2A,0x00,0x06,0x00,0x4A,0x26,0x00,0x70,0x0C,
0x70,0x2C,0x70,0x94,0x70,0xC5,0x21,0x82,0x0F,0x00,0x80,
0x00,0x00,0x40,0xF1,0xC7,0x24,0x65,0x00,0x0C,0x21,0x80,
0x9F,0xE0,0xFF,0x00,0x00,0xB2,0xF7,0x4A,0x26,0x00,0x70,
0xC3,0x41,0xF8,0x7F,0x00,0x00,0x0C,0x70,0x32,0xF1,0xFC,
0x1C,0x88,0xB1,0xFC,0x1C,0x48,0xB1,0xFC,0x1C,0x08,0xB1,
0xE1,0xC3,0xE1,0xC2,0xE1,0xC1,0xE1,0xC0,0x07,0xC0,0x1C,
0x1C,0xC0,0x31,0xE1,0xC0,0xE0,0x7F,0x01,0xC0,0x00,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,
0x28,0x28,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x48,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x81,0x81,
0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x82,0x82,0x82,
0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x10,0x10,0x10,0x10,0x20,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xE0,0x78,0xE0,0x78,0xE0,0x78,0xE0,0x49,0x08,
0x40,0x00,0x05,0x20,0x4C,0x00,0x44,0x24,0xFE,0x90,0xC2,
0x21,0x22,0x01,0x90,0x00,0x02,0x00,0x40,0x80,0x04,0x11,
0x03,0x04,0xCB,0x43,0x01,0x01,0x01,0x01,0x2F,0x24,0xC3,
0x12,0x02,0x22,0xCA,0x02,0x25,0x0A,0xC1,0x00,0x06,0x22,
0xCA,0x10,0x04,0x22,0x0A,0x93,0x14,0x00,0x02,0x00,0x04,
0x10,0x02,0x02,0x04,0x11,0x03,0x04,0xE9,0x07,0xEF,0xFF,
0x02,0x22,0xCA,0x02,0xE0,0x7F,0x0C,0x70,0x2F,0x20,0x87,
0x80,0x6F,0x79,0x39,0x08,0x41,0x00,0xFA,0xF3,0x2F,0x22,
0x88,0x1F,0xFF,0xFF,0x00,0xFF,0x04,0x23,0x81,0x02,0x04,
0x22,0x80,0x82,0x21,0x08,0x41,0x00,0xEE,0xF3,0x40,0x2A,
0x0A,0x12,0x04,0x23,0x81,0x02,0x04,0x22,0x80,0x82,0x11,
0x08,0x41,0x00,0xE6,0xF3,0x41,0x2B,0x01,0x06,0x41,0x2A,
0x00,0x06,0x09,0x09,0x02,0x00,0xE0,0x7F,0x0C,0x77,0xE0,
0x7F,0x0C,0x71,0x0C,0x71,0x0A,0x00,0x06,0x00,0x2F,0x20,
0xC5,0x02,0xE0,0x7E,0x40,0x88,0x24,0x73,0x01,0x11,0x83,
0x02,0x70,0x72,0x8A,0x23,0xC3,0x1F,0xF4,0xF5,0x0A,0x26,
0x80,0xF0,0x0C,0x00,0x01,0x00,0xED,0x07,0xEF,0xFF,0x01,
0x10,0x82,0x02,0xE0,0x7F,0x0C,0x70,0xE0,0x78,0xE0,0x78,
0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x3F,0x00,0x00,0x00,
0x00,0x00,0x00,0x24,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
0x59,0x40,0x00,0x00,0x00,0x00,0x00,0x88,0xC3,0x40,0x00,
0x00,0x00,0x00,0x84,0xD7,0x97,0x41,0x00,0x80,0xE0,0x37,
0x79,0xC3,0x41,0x43,0x17,0x6E,0x05,0xB5,0xB5,0xB8,0x93,
0x46,0xF5,0xF9,0x3F,0xE9,0x03,0x4F,0x38,0x4D,0x32,0x1D,
0x30,0xF9,0x48,0x77,0x82,0x5A,0x3C,0xBF,0x73,0x7F,0xDD,
0x4F,0x15,0x75,0x08,0x44,0x40,0x40,0x81,0x42,0x28,0x44,
0x60,0x41,0x81,0x43,0xCB,0x44,0xE0,0xFF,0x00,0x00,0x14,
0x24,0x46,0x10,0x14,0x24,0xCA,0x10,0xB6,0xBC,0x0C,0x26,
0x00,0x83,0xCC,0x22,0x05,0x93,0xDE,0x00,0x26,0x00,0x96,
0xBC,0x04,0x26,0x06,0x03,0x04,0x22,0x0A,0x13,0x02,0x26,
0x86,0x82,0x2F,0x26,0x84,0x01,0x00,0x26,0x86,0x0F,0xE0,
0x3F,0x00,0x00,0x00,0x26,0x0A,0x83,0xCC,0x26,0x03,0x83,
0x50,0x01,0x04,0x00,0x07,0x21,0xCA,0x80,0xCF,0x26,0xE4,
0x07,0x06,0x21,0x04,0x03,0x86,0x7B,0x4F,0x24,0x04,0x05,
0x94,0xBB,0x00,0x45,0x0C,0x24,0xC0,0x80,0xCC,0x25,0x81,
0x80,0x14,0x00,0x06,0x00,0x02,0x26,0x86,0x0F,0x10,0x00,
0x00,0x00,0x00,0x25,0x45,0x81,0x01,0x24,0x04,0x01,0x4A,
0x24,0x80,0x75,0x2C,0x70,0xA8,0x20,0xC0,0x04,0x0C,0x24,
0xC0,0x80,0xCC,0x25,0x81,0x80,0x12,0x00,0x05,0x00,0x0F,
0x21,0x01,0x0F,0x02,0x25,0x85,0x80,0x03,0x24,0xC4,0x00,
0x00,0x25,0x45,0x81,0x01,0x24,0x04,0x01,0x05,0x24,0x40,
0x81,0x4A,0x24,0x00,0x78,0x0C,0x70,0xE8,0x20,0xA2,0x04,
0x0C,0x24,0xC0,0x80,0xCC,0x25,0x81,0x80,0x10,0x00,0x05,
0x00,0x0F,0x20,0x00,0x0F,0x02,0x25,0x85,0x80,0x03,0x24,
0xC4,0x00,0x00,0x25,0x45,0x81,0x01,0x24,0x04,0x01,0x2F,
0x20,0x03,0x00,0x41,0x29,0x81,0x80,0x2F,0x20,0x04,0x80,
0xC0,0x71,0xE1,0x20,0xC6,0x07,0x44,0x20,0x4C,0x00,0x05,
0x24,0x0C,0x11,0x05,0x24,0x4C,0x91,0xE0,0x7C,0x40,0x20,
0x40,0x80,0xE0,0x7F,0x41,0x21,0x01,0x00,0x02,0x22,0x0A,
0x93,0xCC,0x22,0x21,0x80,0x1A,0x00,0x02,0x00,0x2F,0x26,
0x40,0xF0,0x2F,0x21,0x04,0x03,0xCC,0x20,0x21,0x80,0xCF,
0x21,0xE1,0x04,0xE0,0x7F,0x0C,0x70,0x0C,0x22,0x00,0x93,
0xCC,0x22,0x21,0x80,0xCA,0x20,0x8D,0x00,0xE1,0x20,0xCD,
0x07,0xCA,0x21,0xCD,0x00,0x02,0x26,0x06,0x83,0xCC,0x20,
0x21,0x80,0xE1,0x20,0xC1,0x07,0xCA,0x21,0x21,0x00,0x0C,
0x26,0x00,0x83,0xCC,0x22,0x05,0x93,0x4C,0x00,0x05,0x00,
0x0C,0x26,0x00,0x83,0xCC,0x20,0x21,0x80,0xE1,0x20,0xCD,
0x07,0x0C,0x22,0x00,0x93,0xCC,0x22,0x21,0x80,0xCA,0x20,
0x8D,0x00,0xE1,0x20,0xCD,0x07,0xCA,0x21,0xCD,0x00,0x0C,
0x22,0x00,0x93,0xCC,0x22,0x21,0x80,0xCC,0x26,0x01,0x83,
0xCC,0x20,0x21,0x80,0xE1,0x20,0xC1,0x07,0xCF,0x21,0xE1,
0x04,0x0C,0x26,0x00,0x83,0xCC,0x20,0x21,0x80,0xC0,0x78,
0xE0,0x7F,0xC0,0x79,0x2F,0x25,0xC0,0x80,0x41,0x26,0x04,
0x70,0x00,0x00,0x00,0x00,0xCC,0x22,0x21,0x80,0x4A,0x26,
0x00,0x70,0xAA,0x02,0x21,0x00,0x2F,0x21,0x40,0x90,0xC7,
0x24,0x65,0x00,0xCC,0x20,0x21,0x80,0x4A,0x26,0x00,0x70,
0xC2,0x02,0x01,0x00,0x41,0x29,0x46,0x95,0x06,0x21,0x81,
0x0F,0xF0,0xFF,0x00,0x00,0xC5,0x21,0x82,0x0F,0x10,0x00,
0x00,0x00,0x2E,0x00,0x22,0x00,0x00,0x40,0xCB,0x42,0x10,
0x00,0x00,0x00,0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,0x00,
0xC4,0x71,0x04,0x21,0xBE,0x82,0x42,0x26,0x46,0x00,0x12,
0x00,0x02,0x00,0x2F,0x20,0x00,0x80,0xF3,0x07,0xEF,0xFF,
0x2F,0x21,0x4B,0x00,0x41,0x2D,0x47,0x85,0x06,0x23,0x88,
0x0F,0xF0,0xFF,0x00,0x00,0xC5,0x20,0x82,0x1F,0x10,0x00,
0x00,0x00,0x30,0x00,0x22,0x00,0x40,0x42,0xCB,0x42,0x10,
0x00,0x00,0x00,0x2F,0x22,0x80,0x80,0x2F,0x20,0x0B,0x12,
0xE4,0x71,0x04,0x20,0xBE,0x92,0x42,0x27,0x47,0x00,0x10,
0x00,0x02,0x00,0x2F,0x22,0x80,0x80,0xF1,0x07,0xEF,0xFF,
0x2F,0x20,0x0B,0x12,0x8C,0x26,0xDF,0x8F,0x4A,0x26,0x00,
0x70,0x62,0x02,0x01,0x00,0x8C,0x27,0xDF,0x8F,0x4A,0x26,
0x00,0x70,0x8A,0x02,0x21,0x00,0x02,0x26,0xC6,0x01,0x80,
0x26,0xCF,0x0F,0x4A,0x24,0xC0,0x7D,0x6D,0x70,0x4D,0x70,
0xA8,0x20,0x40,0x05,0x2F,0x22,0x80,0x92,0x2F,0x23,0xCB,
0x12,0x11,0x71,0xCC,0x20,0x81,0x80,0xC5,0x22,0x66,0x10,
0x0E,0x00,0x05,0x00,0x02,0x20,0x80,0x80,0x03,0x21,0x01,
0x02,0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,0x00,0x05,0x21,
0x09,0x00,0x61,0x41,0x41,0x40,0x04,0x21,0xBE,0x8F,0x40,
0x00,0x00,0x00,0xC2,0x26,0x61,0x00,0x0E,0x00,0x02,0x00,
0x2F,0x20,0x00,0x80,0x2F,0x21,0x4B,0x00,0xD4,0x70,0x4A,
0x26,0x00,0x70,0x72,0x00,0x0C,0x00,0x44,0x20,0xBE,0x80,
0x4A,0x26,0x00,0x70,0x34,0x00,0x01,0x00,0x44,0x20,0x4A,
0x01,0x05,0x21,0xBE,0x92,0x4A,0x26,0x00,0x70,0x24,0x00,
0x01,0x00,0x40,0x20,0x80,0x80,0x41,0x21,0x01,0x00,0x04,
0x21,0xBE,0x8F,0x80,0x00,0x00,0x00,0xC0,0x26,0x62,0x00,
0x0C,0x00,0x01,0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,
0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,0x2F,0x21,
0x42,0x80,0x2F,0x20,0x04,0x00,0x8C,0x26,0xDF,0x8F,0x4A,
0x26,0x00,0x70,0x22,0x01,0x0A,0x00,0x06,0x21,0x81,0x0F,
0x10,0x00,0x00,0x00,0x40,0x2E,0x02,0x05,0x45,0x79,0x2F,
0x22,0x03,0x01,0x45,0x79,0xE0,0x7E,0x2F,0x21,0x42,0x80,
0x2F,0x20,0x04,0x80,0xC5,0x21,0x65,0x10,0x2F,0x21,0x42,
0x80,0x2F,0x20,0x04,0x80,0xC5,0x21,0x65,0x10,0x8C,0x26,
0xFF,0x82,0x4A,0x26,0x00,0x70,0xFA,0x00,0x0B,0x00,0x02,
0x26,0x8A,0x71,0x00,0x00,0x00,0x00,0x42,0x22,0x4A,0x90,
0x4A,0x26,0x00,0x70,0x88,0x00,0x0B,0x00,0x8C,0x00,0x01,
0x00,0x4C,0x22,0x00,0x98,0x4A,0x26,0x00,0x70,0x2A,0x00,
0x0B,0x00,0x42,0x22,0x0A,0x18,0x05,0x21,0x09,0x90,0x6D,
0x77,0x10,0x00,0x02,0x00,0x00,0x2B,0x8B,0x12,0x87,0x23,
0xFF,0x1F,0x04,0x21,0xC9,0x02,0x01,0x29,0x80,0x02,0x5D,
0x00,0x20,0x00,0x2C,0x70,0x35,0x70,0x6D,0x77,0x1E,0x00,
0x02,0x00,0x4C,0x22,0x00,0x98,0xC2,0x23,0xCA,0x12,0x0A,
0x00,0x0A,0x00,0x00,0x2B,0x8B,0x12,0x87,0x23,0xFF,0x1F,
0x04,0x20,0xC9,0x02,0x02,0x26,0x8B,0xF2,0x00,0x00,0x20,
0x00,0x00,0x29,0xCB,0x02,0x14,0x00,0x09,0x00,0x40,0x22,
0x0B,0x18,0x01,0x29,0xC0,0x02,0x15,0x00,0x20,0x00,0x2C,
0x70,0x01,0x28,0x80,0x02,0x01,0x29,0x81,0x02,0x05,0x20,
0xC0,0x02,0x0D,0x00,0x00,0x00,0x2F,0x20,0x00,0x80,0x2F,
0x21,0x4B,0x00,0x44,0x20,0xBE,0x80,0x4A,0x26,0x00,0x70,
0x1C,0x00,0x01,0x00,0x44,0x20,0x4A,0x01,0x05,0x22,0x7E,
0x92,0x4A,0x26,0x00,0x70,0x0C,0x00,0x01,0x00,0x40,0x20,
0x80,0x80,0x41,0x21,0x01,0x00,0x2F,0x21,0x42,0x80,0x2F,
0x20,0x04,0x00,0x2F,0x21,0x42,0x80,0x2F,0x20,0x04,0x00,
0x02,0x26,0x86,0x01,0x04,0x21,0xBE,0x8F,0x10,0x00,0x00,
0x00,0xC0,0x26,0x62,0x00,0x72,0xF1,0x8A,0x26,0xDF,0x0F,
0xC3,0x41,0x10,0x00,0x00,0x00,0xD9,0x06,0xEF,0xFF,0x0C,
0x70,0x02,0x26,0x86,0x01,0x2C,0x70,0xCD,0x06,0xEF,0xFF,
0x0C,0x70,0xC7,0x24,0x65,0x00,0xCC,0x20,0x21,0x80,0x70,
0x00,0x01,0x00,0x0C,0x21,0x80,0x9F,0xE0,0xFF,0x00,0x00,
0xC3,0x41,0xF0,0x7F,0x00,0x00,0x5C,0x00,0x0D,0x00,0x94,
0x70,0xC5,0x21,0x82,0x0F,0x00,0x80,0x00,0x00,0x0C,0x70,
0xE0,0x7E,0x0C,0x25,0x80,0x8F,0xE0,0xFF,0x00,0x00,0x4A,
0x26,0x00,0x70,0x40,0x00,0x0D,0x00,0x2C,0x70,0x10,0x00,
0x05,0x00,0xCC,0x22,0x21,0x80,0x4A,0x26,0x00,0x70,0x2C,
0x00,0x02,0x00,0x94,0x70,0xC5,0x21,0x82,0x0F,0x00,0x80,
0x00,0x00,0x0C,0x70,0xE0,0x7E,0xD3,0x71,0x10,0x00,0x00,
0x00,0x4A,0x26,0x00,0x70,0x10,0x00,0x02,0x00,0x8C,0x27,
0xDF,0x8F,0x4A,0x26,0x00,0x70,0x0E,0x00,0x02,0x00,0xC3,
0x41,0xF8,0x7F,0x00,0x00,0x0C,0x70,0xE0,0x7E,0x2F,0x21,
0x03,0x01,0x05,0x21,0x81,0x0F,0xF0,0x7F,0x00,0x00,0x0C,
0x70,0xE0,0x7E,0x0C,0x20,0x80,0x9F,0x10,0x00,0x00,0x00,
0xCC,0x22,0x21,0x80,0xCA,0x20,0x21,0x00,0xCA,0x21,0x21,
0x00,0x08,0x00,0x02,0x00,0xE0,0x7E,0xE6,0xF1,0xE0,0x78,
0x8D,0x71,0x0A,0x21,0x00,0x80,0xD4,0x24,0x04,0x13,0x13,
0x00,0x20,0x00,0xCE,0x20,0x24,0x00,0xE0,0x78,0x0A,0x21,
0x00,0x80,0x8D,0x71,0xE1,0x20,0xC1,0x07,0x40,0x2C,0x8C,
0x17,0x4C,0x70,0x00,0x41,0xD3,0x71,0x01,0x00,0x00,0x00,
0xC1,0x29,0x26,0x04,0xC0,0x22,0x25,0x04,0x8C,0x21,0x04,
0x80,0xC1,0x29,0x26,0x02,0xC0,0x22,0x25,0x02,0x90,0xE1,
0xC1,0x29,0x26,0x01,0xC0,0x22,0x25,0x01,0x34,0x74,0xC1,
0x29,0xA6,0x00,0xC0,0x22,0xA5,0x00,0x34,0x72,0xC0,0x22,
0x65,0x00,0x00,0x28,0x83,0x00,0x4E,0x22,0xC2,0x07,0x40,
0x2A,0x02,0x05,0x85,0x7A,0x40,0x2B,0x40,0x05,0x42,0x2B,
0xC1,0x02,0xE0,0x7F,0x59,0x61,0x34,0x78,0xE0,0x7F,0x14,
0x70,0xE0,0x78,0x70,0x71,0x04,0xF4,0x50,0x70,0x09,0xF2,
0x7B,0x7B,0x3B,0x79,0x25,0x78,0x45,0x78,0x05,0x20,0xC0,
0x80,0x0B,0xF4,0xC3,0x40,0xE0,0xFF,0x00,0x00,0x7B,0x7B,
0x70,0x70,0x85,0xF7,0x04,0xF7,0x40,0x40,0x03,0xF0,0x0C,
0x70,0xE0,0x7F,0x14,0x70,0xE0,0x78,0xE1,0xC0,0xE1,0xC1,
0x40,0x40,0x60,0x41,0xC1,0xC3,0xC1,0xC2,0x28,0x44,0x07,
0x21,0xFE,0x80,0x1E,0x00,0x04,0x00,0x0A,0x00,0x02,0x00,
0x50,0x70,0xE5,0xF3,0x50,0x70,0x03,0x21,0xC1,0x00,0x07,
0x21,0xC0,0x80,0xCA,0x20,0x61,0x00,0xE7,0xF1,0x7B,0x7B,
0x3B,0x79,0x25,0x78,0x45,0x78,0x05,0x20,0xC0,0x80,0xE1,
0xF3,0x45,0x24,0x40,0x10,0xDD,0xF1,0xE0,0x78,0xE6,0xC3,
0xA1,0xC1,0x48,0x46,0x20,0x42,0x08,0x45,0x34,0x70,0xCA,
0x27,0x4A,0x13,0x45,0xF6,0x2D,0xD8,0x53,0x7A,0xE1,0x6D,
0x00,0xAD,0x0A,0xD9,0x80,0xC3,0x8C,0x70,0x1A,0x08,0x20,
0x00,0xE1,0x40,0x00,0xC1,0xB0,0x4F,0x38,0x60,0x40,0xC0,
0x03,0xEE,0x00,0xA6,0xA1,0x40,0xC6,0xC7,0xE0,0x78,0xEA,
0xC3,0xA9,0xC1,0x70,0x40,0x10,0x41,0x21,0x09,0xB0,0x00,
0x8A,0x23,0xBF,0x1D,0x1F,0x09,0x30,0x04,0x6C,0x74,0x8D,
0x73,0x31,0x09,0x30,0x02,0x07,0xDF,0x17,0x09,0x31,0x01,
0x8D,0x72,0xED,0x73,0x12,0xF0,0xED,0x71,0x8D,0x71,0x0E,
0xF0,0x0F,0xDF,0x06,0xF0,0xED,0x70,0x6C,0x70,0x15,0x09,
0xF2,0x02,0x8D,0x70,0x79,0x24,0x00,0x00,0x68,0x44,0x75,
0x68,0x40,0x23,0xCB,0x0D,0x40,0x24,0xCE,0x37,0xAD,0x71,
0x20,0x1C,0x03,0x30,0x08,0xEC,0x01,0x2A,0x00,0x03,0x04,
0x22,0xC3,0x03,0x00,0x42,0x06,0xF0,0x09,0x2A,0x43,0x00,
0x05,0x2A,0x42,0x00,0x89,0xE3,0x30,0xD8,0xCA,0x20,0xC9,
0x02,0x78,0x60,0xA5,0x71,0xFF,0x1E,0x12,0x90,0xED,0xEA,
0x21,0x6E,0x22,0x40,0x92,0x09,0xEF,0x03,0xA1,0x42,0x0B,
0x08,0x30,0x20,0x09,0x6D,0x00,0x18,0x00,0x20,0x22,0x40,
0xCA,0xC7,0xE0,0x78,0x40,0x43,0x20,0x42,0x10,0xD9,0x69,
0x07,0xEF,0xFF,0x8C,0x71,0xE4,0xC0,0x08,0x45,0x0C,0x70,
0x8D,0x70,0xA9,0x40,0x12,0xF0,0xD3,0x70,0x99,0x19,0x99,
0x99,0x5A,0x20,0x80,0x02,0x4E,0x23,0xCE,0x0B,0xCA,0x24,
0xAD,0x18,0x10,0x76,0x1B,0x63,0xA5,0x71,0xCA,0x24,0xA5,
0x18,0x42,0x23,0x00,0x0C,0x60,0x8D,0x32,0x23,0x8E,0x0F,
0x7F,0x00,0x61,0x91,0xD9,0x0E,0xBF,0x90,0x11,0x75,0x6C,
0x77,0xCA,0x24,0xC1,0x10,0x03,0xE9,0xA0,0xA1,0x03,0xEA,
0x80,0xA2,0xC4,0xC4,0x40,0x43,0x20,0x42,0x0A,0xD9,0x11,
0x07,0xEF,0xFF,0x8C,0x70,0xF6,0xC3,0xA6,0xC1,0xA8,0x45,
0x41,0xC3,0x30,0x47,0x08,0x47,0x40,0xC2,0x0E,0x70,0x0A,
0x21,0x80,0x21,0x0A,0x22,0x00,0x21,0x80,0x41,0x80,0xC0,
0xA1,0x42,0xC0,0x43,0x0A,0x24,0xC0,0x01,0x00,0x1F,0x00,
0x04,0x0A,0x23,0xC0,0x21,0xEE,0x0B,0xEF,0x07,0x00,0x19,
0x00,0x24,0x08,0x46,0x0E,0xE8,0xC3,0x41,0x7F,0x00,0x06,
0xB1,0x8A,0x0F,0xAF,0xFF,0xC1,0x40,0x0E,0xE8,0xE1,0x40,
0x32,0x0A,0xA0,0x00,0xC1,0x41,0x11,0xF0,0x04,0x14,0x14,
0x30,0x00,0xC6,0x50,0x24,0xC0,0x27,0x05,0x20,0xBE,0x83,
0x0B,0xF4,0xA1,0x40,0xE2,0x41,0xE1,0x42,0x76,0x09,0xA0,
0x00,0x00,0x19,0x00,0x24,0x1F,0x02,0x00,0x00,0x4C,0x70,
0x6C,0x70,0xC1,0x40,0x82,0x41,0xFF,0x58,0x4C,0x70,0x48,
0x44,0xCA,0x24,0x6B,0x10,0x6C,0x70,0xC1,0x40,0x82,0x41,
0x00,0x1B,0x00,0x23,0xFF,0x58,0x45,0xF6,0x52,0x24,0xC0,
0x27,0x40,0xC6,0x41,0xC0,0x36,0x0C,0xEF,0x07,0x80,0xC0,
0x4D,0xDE,0x21,0x08,0x32,0x00,0x0C,0x7E,0x48,0xBE,0xC5,
0x71,0x89,0x26,0x04,0x1D,0x8A,0x09,0x60,0x00,0xC1,0x40,
0x00,0xC2,0x26,0x08,0xEF,0xFF,0x01,0xC3,0x0C,0xF0,0x4D,
0xE6,0x48,0xBE,0x88,0x26,0x3B,0x13,0x72,0x09,0x60,0x00,
0xD3,0x78,0x00,0xC2,0x01,0xC3,0x00,0x59,0x10,0x44,0x30,
0x43,0x40,0xC0,0x50,0x21,0xC0,0x07,0x41,0xC1,0x05,0x20,
0x3E,0x85,0x48,0xF2,0xC3,0x42,0x99,0x99,0x9A,0x99,0xC3,
0x43,0xB9,0x3F,0x99,0x99,0x82,0x40,0x62,0x41,0x50,0x46,
0x0A,0x25,0xC0,0x20,0xFF,0x58,0x54,0xF6,0x4C,0x70,0xC3,
0x43,0x24,0x40,0x00,0x00,0x82,0x40,0x62,0x41,0x00,0x59,
0xC2,0x42,0xA2,0x43,0x10,0x44,0x30,0x43,0xC5,0x77,0xFF,
0x58,0xB4,0xF6,0x00,0x1C,0x00,0x35,0x04,0x1C,0xC0,0x34,
0x4C,0x70,0x82,0x40,0x62,0x41,0xC3,0x43,0xF0,0x3F,0x00,
0x00,0xFF,0x58,0x97,0xF6,0x4C,0x70,0xC3,0x43,0x24,0x40,
0x00,0x00,0x82,0x40,0xAE,0x0F,0xAF,0xFF,0x62,0x41,0x4C,
0x70,0xC3,0x43,0xF0,0x3F,0x00,0x00,0x10,0x44,0x30,0x43,
0xC5,0x71,0xFF,0x58,0x70,0xF6,0x00,0x1C,0x00,0x35,0x04,
0x1C,0xC0,0x34,0x82,0x40,0x62,0x41,0xC2,0x42,0xA2,0x43,
0xFF,0x58,0x46,0xF6,0x04,0x1C,0x40,0x35,0x00,0x1C,0x80,
0x35,0x06,0xF0,0x0A,0x26,0x00,0x25,0x0A,0x25,0xC0,0x24,
0x8C,0x22,0xC1,0xA9,0x04,0xF4,0x19,0x0D,0x13,0x10,0x09,
0xF0,0x8C,0x22,0x81,0xA9,0x06,0xF4,0x00,0x25,0x8D,0x93,
0x08,0x00,0x03,0x00,0xAD,0x70,0x49,0x25,0xC1,0x14,0x42,
0x27,0x40,0x20,0x42,0x27,0x8D,0x20,0x10,0x71,0xCA,0x25,
0x4B,0x10,0x87,0x0D,0x32,0x10,0x6E,0x70,0xF1,0x44,0x06,
0xF0,0x04,0x14,0x15,0x30,0x00,0x14,0x16,0x30,0x4C,0x70,
0xC3,0x43,0x97,0x41,0x84,0xD7,0xC2,0x40,0xA2,0x41,0x00,
0x59,0x10,0x45,0xEE,0x0E,0x6F,0xFF,0x30,0x46,0x26,0x0C,
0xEF,0xFF,0x10,0x47,0xA2,0x42,0x56,0x08,0x6F,0xFF,0xC2,
0x43,0x41,0xC1,0x40,0xC0,0x83,0xC0,0x0A,0xD9,0x82,0xC3,
0x8C,0x70,0x1E,0x0D,0xEF,0xFF,0xE2,0x42,0x27,0x0B,0x30,
0x20,0x02,0xC2,0x21,0x0A,0x33,0x02,0x4A,0x20,0x00,0x00,
0x30,0xD9,0x01,0x1C,0x52,0x20,0x02,0xC2,0x27,0x68,0xF9,
0x0A,0x62,0x80,0x04,0x77,0x02,0x23,0x13,0x20,0x02,0xF0,
0x6E,0x70,0x83,0xC1,0xFE,0x0E,0xAF,0x03,0x82,0x40,0x02,
0xC0,0x00,0x23,0x13,0x20,0x91,0x0D,0xE3,0x94,0x00,0x24,
0x14,0x20,0xA8,0x67,0x3F,0x08,0x74,0x0D,0x69,0x6D,0xB5,
0x70,0xCA,0x20,0xCC,0x00,0xD6,0xF6,0x79,0x67,0x40,0x89,
0x23,0x0A,0x71,0x0E,0x30,0xDC,0x0A,0x6D,0x21,0x0B,0x72,
0x00,0x80,0xA9,0x19,0x67,0x40,0x89,0x11,0x0A,0x71,0x0E,
0x14,0x70,0x04,0x77,0x80,0xA9,0x3A,0xF6,0x04,0xF0,0x60,
0x40,0x44,0x71,0x40,0xA9,0x11,0x08,0x32,0x00,0x31,0xD8,
0x8A,0xED,0x30,0xD8,0xAD,0x71,0x00,0xAF,0x06,0xF0,0xC5,
0x71,0x00,0xAF,0x82,0xED,0xAD,0x71,0xB8,0x67,0x00,0x18,
0x02,0x04,0x00,0x19,0x80,0x23,0x8C,0x22,0xC1,0xA9,0x17,
0xF4,0x42,0x25,0x40,0x90,0x13,0xF2,0xF8,0x60,0x20,0x88,
0x23,0x09,0x11,0x0C,0x00,0x18,0x02,0x04,0x42,0x25,0x80,
0x90,0x0B,0xF2,0x19,0x67,0x40,0x89,0x0F,0x0A,0x31,0x0C,
0x42,0x20,0x40,0x80,0x00,0x19,0x02,0x04,0xF8,0xF5,0xE1,
0x40,0xD6,0xC7,0xE0,0x78,0xFA,0xC2,0xFC,0x1C,0xC8,0xB6,
0x82,0x24,0x03,0x31,0x43,0xC0,0x0C,0x70,0x70,0x40,0xED,
0x70,0x18,0x43,0x18,0x40,0x42,0xC1,0x40,0xC2,0x41,0xC0,
0x45,0xC0,0x47,0xC0,0x4A,0xC0,0x46,0xC0,0x4B,0xC0,0x05,
0xF0,0xFE,0x58,0x00,0x18,0x81,0x05,0x00,0xC6,0x04,0xF0,
0x04,0x10,0x0E,0x24,0x40,0xC6,0x00,0x8E,0x14,0x70,0x29,
0xF2,0x2C,0x70,0xC3,0x42,0xFF,0x7F,0xFF,0xFF,0xA2,0x0E,
0x60,0x00,0xC1,0x40,0xD3,0x41,0xFF,0x7F,0xFF,0xFF,0x48,
0xC0,0x04,0xE8,0x08,0xC0,0x02,0x20,0x91,0x03,0x25,0xD9,
0xC1,0x40,0x86,0x0E,0x60,0x00,0x22,0x42,0x08,0x45,0x83,
0xE8,0x00,0x26,0x4D,0x14,0x02,0x25,0x91,0x93,0x0A,0xF2,
0x02,0xC0,0x03,0xC3,0xC1,0x41,0x60,0x7B,0x22,0x42,0x14,
0x77,0x0C,0x77,0xF2,0xF2,0x07,0xC0,0x20,0x8D,0x22,0x70,
0x47,0xC0,0x34,0x70,0xDE,0x06,0x01,0x00,0x01,0x8D,0x4F,
0xE8,0x41,0x6D,0xCD,0x70,0x40,0xC5,0x07,0x00,0x00,0x00,
0x44,0x71,0x40,0xC2,0x20,0x8A,0x13,0x09,0x10,0x08,0x13,
0x09,0xD0,0x08,0x13,0x09,0xD1,0x0A,0x81,0xBE,0xF6,0xF1,
0x82,0xBE,0xF4,0xF1,0x83,0xBE,0xF2,0xF1,0x0B,0x09,0x51,
0x0B,0x80,0xBE,0xEE,0xF1,0x13,0x09,0x90,0x0A,0xC3,0x40,
0x7F,0x00,0x61,0x91,0x08,0x61,0x49,0x08,0x9E,0x00,0x0C,
0x70,0xB0,0xE1,0x41,0xC0,0xCA,0x20,0x82,0x00,0x06,0xF4,
0x01,0x6A,0x40,0xC0,0x21,0x8A,0x31,0xDA,0x41,0xC2,0x11,
0x09,0xB1,0x0A,0x80,0xC1,0x04,0x71,0x40,0xC0,0x04,0x10,
0x00,0x24,0x05,0xF0,0xEE,0x0B,0xEF,0xFF,0x4C,0x70,0x45,
0xC0,0x05,0xC0,0x0B,0x08,0x12,0x00,0x85,0xBE,0x06,0xF0,
0x05,0xC0,0x45,0x26,0x4E,0x18,0x13,0x78,0x45,0xC0,0x00,
0xC1,0x2E,0x76,0x00,0x89,0x51,0x08,0xB1,0x0B,0x6E,0x71,
0x01,0x69,0x40,0xC0,0x41,0x89,0x11,0x0A,0x91,0x0A,0x02,
0x69,0x40,0xC0,0x04,0x10,0x13,0x24,0x13,0xF0,0x1B,0x0A,
0x71,0x0B,0x4C,0x70,0x02,0x69,0x40,0xC0,0x42,0x89,0x23,
0x0A,0xB1,0x0A,0x4C,0x70,0x03,0x69,0x06,0x74,0x40,0xC0,
0x0E,0xF0,0x9A,0x0B,0xEF,0xFF,0x80,0xC1,0x10,0x43,0x15,
0x0B,0x12,0x20,0x86,0xBE,0x0A,0x21,0xC0,0x24,0x04,0xF0,
0x86,0x0B,0xEF,0xFF,0x80,0xC1,0x00,0xC0,0x6C,0x70,0x21,
0x68,0x40,0xC1,0x40,0x88,0xCC,0xE2,0x0F,0xF2,0xEC,0xE2,
0x0B,0xF4,0x22,0x68,0x40,0xC1,0xA1,0x88,0xEC,0xE5,0x0F,
0xF4,0x23,0x68,0x40,0xC1,0xA2,0x88,0x4C,0xDA,0x09,0xF0,
0xE8,0xE2,0x05,0xF4,0x22,0x68,0x40,0xC1,0xA1,0x88,0x03,
0xF0,0x48,0x45,0x4C,0x70,0x4D,0xC3,0xC4,0xE5,0x07,0xF6,
0xA5,0xE5,0x25,0xDD,0x3E,0xF5,0x67,0x03,0x00,0x00,0xD7,
0xE5,0x06,0xF6,0xC5,0xE5,0x5F,0xF2,0xC7,0xE5,0x36,0xF5,
0x5A,0xF0,0xE2,0xE5,0x06,0xF6,0xD8,0xE5,0x32,0xF5,0xD9,
0x02,0x00,0x00,0x8A,0x20,0x7E,0x07,0xB8,0x60,0x95,0xE0,
0x54,0x06,0xED,0xFF,0xB1,0x42,0x24,0x20,0x00,0x00,0x33,
0x03,0x00,0x00,0x75,0x03,0x00,0x00,0x93,0x00,0x00,0x00,
0x8F,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x39,0x06,0xCF,
0xFF,0x61,0x03,0x00,0x00,0x31,0x06,0xCF,0xFF,0x2D,0x06,
0xCF,0xFF,0x29,0x06,0xCF,0xFF,0x25,0x06,0xCF,0xFF,0x2F,
0x00,0x00,0x00,0x1B,0x03,0x00,0x00,0x25,0x03,0x00,0x00,
0x15,0x06,0xCF,0xFF,0x11,0x06,0xCF,0xFF,0x29,0x00,0x00,
0x00,0x09,0x06,0xCF,0xFF,0x2D,0x03,0x00,0x00,0x01,0x06,
0xCF,0xFF,0xFD,0x05,0xCF,0xFF,0x71,0x02,0x00,0x00,0x04,
0x10,0x01,0x24,0xE8,0xE2,0x16,0xF4,0x07,0xC0,0x00,0xB1,
0x16,0xF0,0x04,0x10,0x19,0x24,0x37,0x70,0x92,0x02,0x22,
0x00,0x4C,0x76,0x02,0xC0,0x03,0xC3,0xC3,0x41,0x7F,0x00,
0xD4,0xB0,0x40,0x7B,0x14,0x77,0xD2,0x05,0xE2,0xFF,0x0C,
0x77,0x09,0x05,0x00,0x00,0x07,0xC0,0x00,0xA1,0xC3,0x05,
0xCF,0xFF,0x07,0x09,0x11,0x20,0x2E,0x71,0xC3,0x40,0x7F,
0x00,0x61,0x91,0x08,0x65,0xB1,0x42,0x44,0x20,0x40,0x80,
0x4E,0xC0,0x01,0xC0,0xC0,0x22,0x22,0x28,0x03,0xE8,0x0B,
0x0E,0x1E,0x10,0x0C,0x70,0x41,0xC0,0x0E,0x43,0x06,0x42,
0x8C,0x22,0x41,0xA9,0x0A,0x25,0x40,0x04,0x9D,0xC0,0x4F,
0xD9,0x40,0x24,0x06,0x3C,0xC0,0x25,0x61,0x00,0x40,0x24,
0x07,0x3D,0x0A,0x24,0x80,0x04,0x50,0x46,0x8A,0x0A,0xEF,
0xFF,0x70,0x45,0xC3,0x41,0x7F,0x00,0xDC,0xB0,0x42,0x0A,
0xAF,0xFF,0x18,0x41,0x30,0x14,0x13,0x30,0x05,0x23,0x3E,
0xA0,0x05,0xF4,0x6E,0x71,0x30,0x1C,0xC0,0x34,0xC3,0x42,
0xFF,0x7F,0xFF,0xFF,0x2C,0x70,0x23,0x40,0x02,0x0C,0x60,
0x00,0x50,0x44,0x48,0xC0,0x04,0xE8,0x08,0xC0,0x02,0x20,
0x54,0x06,0x00,0x11,0x81,0x30,0xC3,0x40,0x7F,0x00,0x61,
0x91,0x08,0x61,0x4F,0x08,0xBE,0x00,0xEE,0x70,0x24,0x1C,
0xC0,0x35,0x10,0x1C,0xC0,0x35,0x8C,0x22,0x41,0xA9,0x4A,
0xF2,0x8C,0x22,0x81,0xA9,0x0C,0xF2,0x8C,0x22,0xC1,0xA9,
0x1D,0xF4,0x8C,0x23,0x7F,0xAF,0xCC,0x21,0xCA,0xA4,0x7A,
0x00,0x0B,0x00,0x02,0x21,0xD1,0x24,0x2F,0x0B,0x72,0x20,
0x8A,0x26,0x81,0x29,0x51,0x0C,0xE3,0x24,0x4C,0x70,0x02,
0x23,0x00,0x25,0x10,0x1C,0x00,0x35,0x46,0xC0,0x58,0x43,
0x58,0x40,0x6C,0xF0,0x10,0x1C,0x00,0x35,0xCE,0x70,0x90,
0xF0,0x4C,0x70,0x50,0x46,0x58,0x43,0x1F,0xF0,0x4E,0x23,
0x01,0x20,0x42,0x2B,0xD3,0x27,0x04,0x23,0x58,0x20,0x0C,
0x71,0x0C,0x21,0x00,0xA6,0x18,0x01,0x2C,0x00,0x46,0xC0,
0x00,0x24,0x00,0x26,0x32,0x70,0x56,0x01,0x2C,0x00,0x02,
0x21,0x1B,0x26,0x4C,0x70,0x50,0xF0,0x02,0x24,0xDB,0x24,
0x4C,0x70,0x10,0x1C,0xC0,0x34,0x0C,0x23,0x40,0xB4,0xCA,
0x23,0x49,0x34,0x0C,0x70,0x46,0xC0,0x18,0x40,0x42,0xF0,
0x26,0x77,0x50,0x25,0xD5,0x27,0x10,0x1C,0x41,0x30,0x05,
0x25,0xBE,0xA5,0x06,0xF4,0x30,0x1C,0xC0,0x35,0x2C,0x70,
0xED,0x70,0x0C,0xF0,0x42,0x23,0x41,0xA0,0x41,0x29,0xCF,
0x07,0x0C,0x00,0x23,0x00,0x4C,0xC1,0x4E,0x23,0x41,0x20,
0x4C,0xC1,0x9A,0xC0,0x42,0x08,0xEF,0xFF,0x89,0xC2,0x09,
0xC1,0x1B,0x09,0xB3,0x00,0x29,0x68,0x30,0xD8,0xFF,0x19,
0x12,0x80,0x09,0xC0,0x04,0x71,0xF9,0x08,0xB2,0x80,0x49,
0xC0,0x01,0x69,0x0E,0xC1,0x79,0x27,0x02,0x10,0x42,0x24,
0x5B,0x20,0x75,0x69,0x2A,0x68,0x48,0xC1,0x5B,0x79,0x52,
0x23,0x42,0x01,0x2B,0xE1,0x45,0xE2,0xFF,0x18,0x42,0x80,
0xFE,0x18,0x82,0x80,0x09,0xC0,0x2C,0x70,0x8A,0x26,0x41,
0x29,0x42,0x68,0x38,0x40,0x46,0xC1,0x49,0xC2,0x06,0xC1,
0x42,0x43,0x00,0x20,0xC0,0x36,0x3A,0x62,0x2C,0x71,0x44,
0x26,0x08,0x12,0x4A,0xC1,0xB8,0x23,0xC1,0x09,0x3E,0x21,
0x01,0x20,0x78,0x20,0x0C,0x10,0x65,0x79,0x1A,0x62,0x0E,
0x20,0x40,0x04,0x04,0xC7,0x2B,0x7C,0x4B,0xC0,0xC0,0x78,
0x4B,0xC0,0x58,0x60,0x1F,0x08,0x31,0x10,0x1F,0x67,0x29,
0x09,0x72,0x20,0x0C,0x70,0x13,0x0B,0x11,0x30,0x07,0xEB,
0x79,0x20,0x00,0x30,0x2F,0x08,0x30,0x30,0x4A,0xC0,0xE5,
0x71,0x8E,0x70,0x40,0x20,0x10,0x22,0x92,0x45,0x92,0x41,
0x56,0x70,0x9D,0xF4,0xB6,0xF0,0x4A,0xC0,0xF8,0xF1,0x4C,
0x70,0x8C,0x22,0xC1,0xA9,0x0A,0x20,0x40,0x34,0x58,0x43,
0xCA,0x20,0x21,0x30,0xC6,0xF1,0x6F,0x70,0x7B,0x40,0xEC,
0xF1,0x41,0x2E,0x80,0x10,0x10,0xD9,0x44,0x20,0x94,0x00,
0x00,0x10,0x0F,0x20,0xE8,0xE2,0xA1,0x44,0xF0,0x7A,0xCA,
0x27,0x81,0x10,0xF5,0x70,0x91,0xC0,0x84,0xC3,0xB8,0x24,
0x01,0x0E,0xE1,0x42,0x86,0x0F,0xAF,0xFF,0xCA,0x24,0x21,
0x20,0x18,0x41,0x4E,0x70,0x52,0xF0,0x4C,0x70,0x0A,0x23,
0x00,0x35,0xA6,0xF1,0xCB,0x47,0xFF,0x7F,0xFF,0xFF,0x2C,
0x70,0x23,0x40,0x02,0x0A,0x60,0x00,0xE1,0x42,0x48,0xC0,
0x04,0xE8,0x08,0xC0,0x02,0x20,0x4F,0x06,0x3A,0x23,0xC1,
0x23,0x41,0x2E,0x80,0x11,0xEE,0x70,0x2B,0x78,0xF2,0x45,
0x7E,0x77,0x73,0xDD,0xF2,0x46,0xB2,0x41,0x44,0xC7,0x70,
0xF0,0x04,0x10,0x0D,0x24,0xEE,0x70,0xED,0x71,0xF2,0x45,
0x71,0xC5,0x54,0x24,0x99,0x38,0xF2,0x46,0xB2,0x41,0x44,
0xC7,0x64,0xF0,0x41,0x2E,0xC0,0x10,0x08,0xD9,0x6F,0xDD,
0x44,0x20,0x54,0x00,0xBD,0xF1,0x04,0x10,0x01,0x24,0x91,
0xC0,0xA6,0x0F,0xAF,0xFF,0x84,0xC2,0xEE,0x70,0x04,0xC7,
0xF2,0x45,0x18,0x41,0x70,0xDD,0xF2,0x46,0xB2,0x41,0x50,
0xF0,0x75,0xDD,0x4E,0x70,0x00,0x10,0x0F,0x20,0xF5,0xE5,
0x07,0xF2,0x0B,0x0F,0x13,0x10,0xF3,0x7F,0x34,0x1C,0xC1,
0x3F,0x91,0xC0,0x84,0xC2,0xCE,0x0F,0xAF,0xFF,0xE1,0x41,
0x18,0x41,0x8E,0x70,0x01,0xC0,0xCE,0x70,0x14,0x70,0x0C,
0x70,0x06,0xF2,0x01,0xC0,0x46,0x26,0xBE,0x9F,0x02,0xF2,
0x0C,0x70,0x06,0x74,0x05,0x27,0xFE,0x94,0x10,0xF2,0x04,
0xC1,0x41,0xC0,0x78,0x21,0x17,0x00,0x02,0x23,0x40,0x20,
0xE2,0x71,0x08,0x21,0xCF,0x04,0x72,0x71,0xCA,0x27,0x0B,
0x20,0x82,0x77,0x09,0xF0,0x44,0x1C,0x82,0x35,0x10,0x1C,
0x80,0x35,0xEE,0x70,0x41,0xC0,0xED,0x70,0x0D,0xC0,0x0A,
0x25,0xC0,0x25,0x87,0xE8,0xEE,0x71,0x4B,0x26,0x80,0x91,
0x10,0xF2,0x21,0x0A,0x10,0x20,0x14,0x70,0x2D,0xD8,0x06,
0xF4,0xE1,0xBE,0x20,0xD8,0xCA,0x20,0xE2,0x0A,0x40,0x24,
0x51,0x20,0xE5,0x71,0xEE,0x71,0x4D,0xC0,0x04,0xF0,0x0A,
0x21,0x00,0x25,0x2B,0x0E,0x7E,0x11,0x6E,0x70,0x05,0xC0,
0x23,0x0F,0x23,0x10,0xE0,0xBE,0x05,0xC0,0x1F,0xBE,0xE2,
0x78,0x4E,0x70,0x5F,0xBE,0xCA,0x22,0x01,0x20,0x04,0x26,
0x14,0x10,0x08,0xF2,0x05,0xC7,0x2C,0x70,0x41,0xC1,0x05,
0xF0,0x4E,0x70,0x52,0x44,0x04,0xF0,0x05,0xC7,0x45,0xC0,
0x1F,0x0A,0x10,0x20,0x01,0xC0,0x79,0x20,0x00,0x00,0x8B,
0xE8,0x03,0xC0,0x02,0xC1,0x6C,0x70,0x0E,0x09,0x60,0x00,
0x42,0x42,0x14,0x70,0x0C,0x77,0x98,0xF4,0x55,0x0F,0x10,
0x20,0x3B,0x09,0x10,0x20,0x0D,0xC0,0x07,0xE8,0x42,0x21,
0x51,0xA0,0x6E,0x71,0x4C,0x71,0x6F,0xC0,0x0C,0xF2,0x8F,
0xC0,0x30,0xD9,0x62,0x70,0x40,0x23,0x42,0x20,0x0D,0x09,
0xB2,0x20,0x20,0xA8,0x40,0x23,0x82,0x20,0xA1,0xA8,0x02,
0xC0,0x03,0xC3,0x60,0x7B,0x8F,0xC1,0x14,0x77,0x0C,0x77,
0x7A,0xF2,0x19,0x0D,0x30,0x20,0x6C,0x71,0x03,0xC0,0x02,
0xC1,0xBA,0x08,0x60,0x00,0xA2,0x42,0x14,0x70,0x0C,0x77,
0x70,0xF4,0x01,0xC0,0x0D,0xE8,0x17,0x0A,0x30,0x20,0x42,
0x42,0x03,0xC0,0x02,0xC1,0xA2,0x08,0x60,0x00,0x01,0xC3,
0x14,0x70,0x0C,0x77,0x62,0xF4,0x04,0xC2,0x08,0xEA,0x02,
0xC0,0x03,0xC3,0x60,0x7B,0x23,0x41,0x14,0x77,0x0C,0x77,
0x5A,0xF2,0x8F,0x0E,0x10,0x20,0x04,0xC5,0x06,0xC0,0x0A,
0xE8,0x03,0xC0,0x02,0xC1,0x06,0xC2,0x72,0x08,0x60,0x00,
0x6C,0x71,0x14,0x70,0x0C,0x77,0x4C,0xF4,0x0A,0xC0,0x0C,
0xE8,0x2E,0xDB,0x6F,0xC3,0x02,0xC0,0x03,0xC3,0x8F,0xC1,
0x60,0x7B,0x4C,0x71,0x14,0x77,0x0C,0x77,0x40,0xF2,0x17,
0x08,0x30,0x30,0x6C,0x71,0x03,0xC0,0x02,0xC1,0x46,0x08,
0x60,0x00,0x03,0x42,0x14,0x70,0x0C,0x77,0x34,0xF4,0x19,
0x0B,0x30,0x30,0x00,0x21,0x41,0x33,0x02,0xC0,0x03,0xC3,
0x60,0x7B,0x63,0x42,0x14,0x77,0x0C,0x77,0x2A,0xF2,0x0B,
0xC0,0x0B,0xE8,0x03,0xC0,0x02,0xC1,0x0B,0xC2,0x1A,0x08,
0x60,0x00,0x6C,0x71,0x14,0x70,0x0C,0x77,0x1E,0xF4,0x8C,
0x26,0x41,0xA9,0x0B,0xF4,0x09,0xC2,0x09,0xEA,0x02,0xC0,
0x08,0xC1,0x03,0xC3,0x40,0x7B,0x14,0x77,0x0C,0x77,0x12,
0xF2,0x19,0x0C,0x30,0x20,0x82,0x42,0x03,0xC0,0x02,0xC1,
0xEA,0x0F,0x20,0x00,0x01,0xC3,0x14,0x70,0x0C,0x77,0x08,
0xF4,0x07,0xC0,0xF8,0x60,0xCB,0x00,0xEF,0xFF,0x47,0xC0,
0x07,0xC0,0x80,0x24,0x03,0x31,0x04,0x14,0x1B,0x34,0xDA,
0xC6,0xE0,0x78,0xE6,0xC2,0x08,0x46,0xC3,0x41,0xF0,0x3F,
0x00,0x00,0x0C,0x70,0xAD,0x71,0xCB,0x47,0x7F,0x00,0x40,
0x94,0x0B,0x00,0x00,0x00,0x08,0xE7,0xA5,0x71,0xDC,0x7E,
0x0A,0xEE,0x11,0x0D,0x95,0x12,0xF5,0x0E,0x1E,0x90,0x40,
0x87,0x61,0x87,0x00,0x59,0xF6,0xF1,0xC6,0xC6,0xE0,0x78,
0xE2,0xC3,0xA4,0xC1,0x08,0x45,0xFE,0x0D,0x20,0x00,0x82,
0xC0,0x08,0x14,0x02,0x31,0x83,0x43,0x25,0x93,0x06,0x93,
0x40,0xB3,0x21,0xB3,0x02,0xB3,0x06,0x1C,0x03,0x30,0x49,
0x85,0x80,0xC1,0xA1,0x40,0x1A,0x59,0x0C,0x70,0xC2,0xC7,
0xE0,0x7F,0x0C,0x70,0x14,0x71,0x0C,0x70,0xE0,0x7D,0xC3,
0x42,0x80,0x00,0xB8,0x3B,0x00,0x8A,0x00,0xA9,0x01,0x8A,
0x01,0xA9,0x02,0x8A,0x02,0xA9,0x03,0x8A,0x03,0xA9,0x04,
0x8A,0x04,0xA9,0x05,0x8A,0x05,0xA9,0xE0,0x7F,0x0C,0x71,
0xE4,0xC3,0xA1,0xC1,0x08,0x46,0x04,0x88,0x2C,0x70,0x40,
0x24,0xC2,0x30,0x6C,0x71,0x12,0x59,0x91,0x08,0x31,0x00,
0x22,0xDD,0x03,0x14,0x80,0x30,0xC3,0x41,0x80,0x00,0x30,
0x3E,0x21,0xDD,0x00,0xA9,0x8C,0x20,0xC3,0x8E,0x3C,0xF4,
0xB6,0xD8,0x02,0x1C,0x02,0x30,0x04,0x8E,0x8C,0x70,0x14,
0xD9,0x40,0x24,0x82,0x30,0x6C,0x71,0x80,0x45,0xC3,0x46,
0xA0,0x40,0x00,0x00,0xAD,0x70,0x13,0x59,0x02,0x1C,0x43,
0x32,0x04,0x8E,0x20,0xD9,0x40,0x24,0x82,0x30,0x6C,0x71,
0xA1,0x44,0xA1,0x45,0xC3,0x46,0x80,0x3F,0x00,0x00,0x13,
0x59,0x47,0x86,0x0C,0x70,0x60,0x7A,0xC1,0x41,0x86,0x16,
0x81,0x10,0xC3,0x40,0x80,0x00,0xAC,0x3F,0xC6,0xB9,0x0E,
0x0D,0xEF,0x08,0x86,0x1E,0x42,0x10,0xC3,0x40,0x80,0x00,
0x20,0x3E,0xA0,0xA0,0xC3,0x40,0x80,0x00,0x24,0x3E,0xA0,
0xA0,0xC3,0x40,0x80,0x00,0x29,0x3E,0xA0,0xA8,0xC3,0x40,
0x80,0x00,0x28,0x3E,0xA0,0xA8,0xA1,0x40,0xC4,0xC7,0xF2,
0xC3,0xA1,0xC1,0x14,0xD9,0xB6,0xDA,0xE2,0x0D,0xEF,0x08,
0x10,0x44,0x0C,0x75,0x03,0x59,0x11,0xD9,0x4C,0x70,0xD6,
0x0D,0xEF,0x08,0x82,0x40,0x32,0xD8,0x03,0x59,0x32,0xD9,
0x4C,0x70,0xC6,0x0D,0xEF,0x08,0x82,0x40,0x0F,0xD9,0x08,
0xDA,0xBE,0x0D,0xEF,0x08,0x82,0x40,0xAD,0x70,0xD3,0x42,
0x80,0x00,0x30,0x3E,0xED,0x70,0x03,0xF0,0xE5,0x71,0xEF,
0x7E,0xE1,0x0E,0xF5,0x10,0x40,0x26,0x55,0x10,0x4F,0x25,
0x00,0x21,0x0F,0x7A,0x32,0xD9,0x96,0x0D,0xEF,0x08,0x82,
0x40,0x32,0xD8,0x03,0x59,0x2F,0x21,0x80,0x23,0x40,0x21,
0x80,0x20,0x0F,0x79,0x40,0x24,0x82,0x30,0x6C,0x72,0x82,
0x40,0x30,0x43,0x12,0x59,0x03,0x14,0x80,0x30,0x00,0x12,
0x82,0x20,0x02,0x14,0x81,0x30,0x08,0xB8,0x8C,0x22,0xC3,
0x8E,0x07,0xF4,0x25,0x78,0x0E,0x78,0x42,0x28,0x90,0x00,
0x04,0xF0,0x38,0x60,0x41,0x28,0x10,0x01,0x45,0x25,0x00,
0x25,0x0F,0x7A,0x32,0xD9,0x4A,0x0D,0xEF,0x08,0x82,0x40,
0x32,0xD8,0x03,0x59,0x40,0x24,0x82,0x30,0x6C,0x72,0x82,
0x40,0x62,0x41,0x12,0x59,0x03,0x14,0x80,0x30,0x00,0x12,
0x8B,0x20,0x02,0x14,0x81,0x30,0x08,0xB8,0x8C,0x23,0xC3,
0x9E,0x05,0xF4,0x25,0x78,0x0E,0x78,0x42,0xB8,0x03,0xF0,
0x38,0x60,0x24,0xB8,0x0E,0x20,0x00,0x04,0x00,0x21,0x81,
0x2F,0x80,0x00,0xB8,0x3B,0x00,0xB1,0x0E,0x78,0x42,0x28,
0xC1,0x07,0x38,0x60,0x15,0x0E,0xB1,0x10,0x27,0x78,0x8C,
0x23,0xC3,0x9E,0x0D,0xF4,0x8C,0x20,0x86,0x86,0x50,0xF6,
0xA2,0xF1,0x8C,0x23,0xC3,0x9E,0x08,0xF4,0x8C,0x20,0x0C,
0x8D,0x4A,0xF6,0x9A,0xF1,0xE7,0xE0,0x46,0xF6,0x98,0xF1,
0x8C,0x20,0x43,0x83,0x28,0x07,0xCB,0xFF,0xAF,0x78,0x0F,
0x20,0x8D,0x03,0x90,0xF1,0x14,0xD9,0xB6,0xDA,0xC2,0x0C,
0xEF,0x08,0x82,0x40,0x0C,0x75,0x03,0x59,0x19,0x0D,0x3E,
0x10,0x61,0xD8,0xAF,0x79,0x11,0x09,0x7E,0x00,0x62,0xD8,
0x09,0x09,0xBE,0x00,0x64,0xD8,0x0C,0x72,0xD2,0xC7,0xE0,
0x78,0xEE,0xC3,0xA1,0xC1,0x28,0x45,0x10,0x42,0x8C,0x20,
0xC3,0x8F,0xC3,0x40,0x80,0x00,0x1D,0x3E,0xC3,0x41,0x80,
0x00,0x1E,0x3E,0x31,0xF2,0xCB,0x46,0x80,0x00,0x34,0x3E,
0xEF,0x0A,0x30,0x24,0x8C,0x22,0x02,0xA0,0x81,0xF2,0x56,
0x71,0xC8,0x01,0x0D,0x00,0x00,0x88,0x00,0x19,0x43,0x00,
0x05,0xE8,0x2C,0x85,0x60,0x79,0xA1,0x40,0xD0,0xD8,0x03,
0x1C,0x02,0x30,0xED,0x70,0x04,0x8D,0x8C,0x70,0x9E,0xBF,
0x11,0xD9,0x40,0x24,0xC2,0x30,0x6C,0x71,0x80,0x45,0xE1,
0x46,0x13,0x59,0x00,0x1E,0x80,0x14,0x03,0x1C,0x03,0x30,
0x04,0x8D,0x3E,0xD9,0x40,0x24,0xC2,0x30,0x6C,0x71,0xC3,
0x44,0x61,0x00,0x60,0x5D,0xA1,0x45,0xE1,0x46,0x13,0x59,
0xBB,0xF0,0x00,0x88,0xED,0x70,0xCD,0x70,0x00,0x19,0x43,
0x00,0x0A,0xE8,0x86,0x15,0xC0,0x10,0x11,0x08,0x33,0x00,
0xCD,0x70,0x2C,0x85,0x60,0x79,0xA1,0x40,0xCD,0x71,0xD4,
0xD8,0x03,0x1C,0x02,0x30,0x04,0x8D,0x8C,0x70,0xD3,0x41,
0x00,0x40,0x00,0x00,0x11,0xD9,0x40,0x24,0xC2,0x30,0x6C,
0x71,0x80,0x45,0x0A,0x26,0x40,0x04,0x13,0x59,0x03,0x1C,
0xC2,0x33,0x04,0x8D,0x8C,0x70,0x3E,0xD9,0x40,0x24,0xC2,
0x30,0x6C,0x71,0x80,0x45,0x0A,0x26,0x40,0x04,0x13,0x59,
0xC3,0x40,0x80,0x00,0x34,0x3E,0x8A,0x20,0xC3,0x2F,0x00,
0x10,0x13,0x00,0x00,0x18,0x00,0x04,0x03,0x1C,0xC2,0x33,
0x04,0x8D,0x11,0xD9,0x40,0x24,0xC2,0x30,0x6C,0x71,0xC3,
0x44,0x61,0x00,0x60,0x5D,0x0A,0x26,0x40,0x04,0xA1,0x45,
0x13,0x59,0x05,0xEE,0x2B,0x85,0x60,0x79,0xA1,0x40,0x8C,
0x23,0x02,0xA0,0x6C,0xF2,0x76,0xF0,0xAA,0x0D,0xEF,0xFF,
0x04,0x8D,0x00,0x41,0xA1,0x40,0x1B,0x59,0x0C,0x70,0xA1,
0x41,0x00,0x1E,0x01,0x10,0x1D,0x59,0x4A,0x20,0x00,0x24,
0x68,0xF0,0x00,0x88,0xED,0x70,0x00,0x19,0x43,0x00,0x8A,
0xE8,0x86,0x15,0xC0,0x10,0x0D,0x08,0x33,0x00,0xA1,0x40,
0x2C,0x85,0x40,0x79,0xED,0x71,0x03,0x1C,0x43,0x33,0x04,
0x8D,0x8C,0x70,0xD3,0x41,0x00,0x40,0x00,0x00,0x10,0xD9,
0x40,0x24,0xC2,0x30,0x6C,0x71,0x80,0x45,0x0A,0x26,0x40,
0x04,0x13,0x59,0x20,0xD8,0x03,0x1C,0x02,0x30,0x04,0x8D,
0x8C,0x70,0x12,0xD9,0x40,0x24,0xC2,0x30,0x6C,0x71,0x80,
0x45,0x0A,0x26,0x40,0x04,0x13,0x59,0x54,0xD8,0x8A,0x20,
0x02,0x20,0x00,0x16,0x13,0x10,0x03,0x1C,0x02,0x30,0x00,
0x1E,0x00,0x14,0x04,0x8D,0x11,0xD9,0x40,0x24,0xC2,0x30,
0x6C,0x71,0xC3,0x44,0x61,0x00,0x60,0x5D,0x0A,0x26,0x40,
0x04,0xA1,0x45,0x13,0x59,0x05,0xEF,0x2B,0x85,0x60,0x79,
0xA1,0x40,0xC3,0x40,0x80,0x00,0xAC,0x3F,0xE2,0x09,0xCF,
0x08,0x2C,0x70,0xC3,0x40,0x80,0x00,0x20,0x3E,0x20,0xA0,
0xC3,0x40,0x80,0x00,0x24,0x3E,0x20,0xA0,0xC3,0x40,0x80,
0x00,0x29,0x3E,0x20,0xA8,0xC3,0x40,0x80,0x00,0x28,0x3E,
0x20,0xA8,0x8C,0x23,0xC3,0xAF,0x0E,0xF4,0x49,0x85,0x00,
0x16,0x00,0x70,0x80,0x00,0x38,0x3E,0x60,0x7A,0xA1,0x41,
0x0A,0x20,0x80,0x24,0x04,0xF0,0x00,0x16,0x10,0x10,0x02,
0x40,0xCE,0xC7,0xF1,0xC0,0xC3,0x42,0x80,0x00,0xC0,0x3B,
0x20,0x82,0x20,0x81,0x1B,0x09,0x80,0x0F,0xA5,0x5A,0x6B,
0xB6,0x24,0x8A,0x89,0xE9,0x2C,0x71,0x14,0x70,0x27,0xD8,
0x24,0xAA,0x05,0xF2,0x27,0xD8,0x18,0x59,0xD1,0xC0,0xE0,
0x7E,0xAB,0x20,0xE0,0x0C,0xAB,0x21,0x61,0x0A,0xFF,0xF1,
0xC3,0x40,0x7F,0x00,0xA4,0xB0,0x65,0x03,0x00,0x00,0xE0,
0x78,0xE0,0x7F,0x0C,0x70,0xE4,0xC2,0x2D,0x88,0xCD,0x70,
0x0F,0xE9,0x34,0x88,0x1B,0x09,0x71,0x00,0xFF,0xDE,0xA0,
0x80,0x03,0xF0,0xA0,0x85,0x06,0xED,0xA1,0x40,0x0B,0x59,
0x83,0xE8,0xFC,0xF1,0x80,0xDE,0xC1,0x40,0xC4,0xC6,0xE0,
0x78,0xE6,0xC3,0xA3,0xC1,0x28,0x45,0x08,0x46,0x10,0x59,
0x08,0x47,0x07,0x59,0x00,0x42,0x1A,0xD8,0xE1,0x41,0x0F,
0x59,0x2D,0x8E,0x08,0x47,0x2B,0xE9,0x14,0x8E,0x53,0x08,
0x71,0x00,0xCD,0x70,0x1F,0xEF,0x0D,0x8F,0x1D,0xE8,0xE1,
0x40,0x0B,0x59,0x08,0x46,0x40,0x24,0xC1,0x32,0x82,0xC2,
0x40,0x24,0x83,0x31,0x40,0x24,0x84,0x30,0x40,0x24,0x45,
0x31,0xE1,0x40,0x0C,0x59,0x9A,0x08,0x6F,0x03,0xC1,0x40,
0x02,0x14,0x01,0x31,0x08,0x46,0x2F,0x3F,0x43,0x10,0xE1,
0x40,0xF6,0x0F,0x2F,0x03,0xC1,0x41,0xCA,0x26,0xCA,0x13,
0x00,0x85,0xF2,0x0F,0x2F,0x03,0xC1,0x41,0x43,0xF6,0xC0,
0xA5,0xC6,0xC7,0xE4,0xC2,0x10,0x59,0x08,0x45,0x07,0x59,
0x00,0x42,0x1A,0xD8,0xA1,0x41,0x0F,0x59,0x08,0x45,0x09,
0x59,0x08,0x46,0x06,0x59,0x00,0x42,0x0C,0x71,0xC1,0x41,
0x08,0x59,0x2D,0x88,0x87,0xE9,0x05,0xED,0x2D,0x8D,0x03,
0xE9,0x0D,0x18,0x43,0x00,0xC4,0xC6,0xF0,0xC3,0xA4,0xC1,
0x2C,0x7A,0x70,0x43,0x08,0x47,0x5F,0x0A,0x72,0x00,0x50,
0x40,0x6C,0x24,0x54,0x01,0x40,0x24,0x12,0x30,0x2E,0x70,
0x0A,0x46,0x49,0x26,0x0D,0x13,0x05,0x25,0x03,0x15,0xE1,
0x42,0x40,0x24,0x41,0x30,0x4A,0x20,0x00,0x00,0x17,0x0D,
0x72,0x10,0x60,0xC3,0x01,0x12,0x83,0x04,0x04,0x71,0xFD,
0x08,0x62,0x83,0x01,0x19,0xD2,0x00,0x00,0x25,0x81,0x14,
0x13,0x0E,0x33,0x13,0xA1,0x40,0x04,0x71,0x01,0x08,0x32,
0x03,0x01,0x19,0x4A,0x04,0xF5,0xD8,0x80,0xC1,0x62,0x42,
0x19,0x59,0xA2,0x7E,0xBD,0x0E,0x73,0x90,0xBF,0x67,0x02,
0x40,0xD0,0xC7,0xE0,0x78,0x05,0xE8,0x00,0x18,0x84,0x0F,
0x00,0x00,0xE1,0x07,0x06,0xE9,0x00,0x19,0x82,0x0F,0x00,
0x00,0x07,0x00,0x05,0xEA,0x00,0x1A,0x82,0x0F,0x00,0x00,
0x19,0x00,0x06,0xEB,0x00,0x1B,0x82,0x0F,0x00,0x00,0x08,
0x00,0x0D,0x0C,0x10,0x00,0x00,0x1C,0x82,0x0F,0x00,0x00,
0x1E,0x00,0xB4,0x70,0xE0,0x7C,0x00,0x1D,0x82,0x0F,0x00,
0x00,0x16,0x00,0xE0,0x7E,0xE0,0x78,0xE4,0xC2,0x08,0x45,
0x09,0x59,0x08,0x46,0x06,0x59,0x00,0x42,0x0C,0x71,0xC1,
0x41,0x08,0x59,0x15,0x80,0x2F,0x27,0xFF,0x00,0x6F,0x23,
0x3F,0x00,0x6F,0x26,0x3F,0x04,0x6F,0x23,0x3F,0x00,0x22,
0x80,0x81,0x80,0x00,0x80,0x2F,0x26,0xFF,0x00,0x41,0x28,
0x82,0x01,0x02,0xB8,0x41,0xAD,0x00,0xAD,0x41,0x2C,0x80,
0x11,0x03,0xAD,0x12,0x6C,0x02,0xAD,0x41,0x29,0x80,0x01,
0x05,0xAD,0x12,0x69,0x04,0xAD,0xC4,0xC6,0xE0,0x78,0xC3,
0x42,0x7F,0x00,0x14,0xB1,0xC3,0x43,0x7F,0x00,0x14,0xB1,
0x11,0x03,0x8F,0x0A,0xC3,0x42,0x7F,0x00,0x0C,0xB1,0xC3,
0x43,0x7F,0x00,0x10,0xB1,0x01,0x03,0x8F,0x0A,0xC3,0x42,
0x7F,0x00,0x08,0xB1,0xC3,0x43,0x7F,0x00,0x0C,0xB1,0xF1,
0x02,0x8F,0x0A,0xC3,0x42,0x7F,0x00,0x0C,0xB1,0xC3,0x43,
0x7F,0x00,0x0C,0xB1,0xE1,0x02,0x8F,0x0A,0xC3,0x42,0x7F,
0x00,0x0C,0xB1,0xC3,0x43,0x7F,0x00,0x0C,0xB1,0xD1,0x02,
0x8F,0x0A,0xC3,0x42,0x7F,0x00,0x10,0xB1,0xC3,0x43,0x7F,
0x00,0x14,0xB1,0xB1,0x02,0x8F,0x0A,0xF1,0xC0,0xA1,0xC1,
0x2C,0x70,0xC3,0x42,0x7F,0x00,0x14,0xB1,0xC3,0x43,0x7F,
0x00,0x18,0xB1,0x8C,0x76,0x5E,0x0A,0x2F,0x0C,0x40,0x24,
0x05,0x30,0x00,0xC0,0x87,0x74,0xD1,0xC0,0xE0,0x7E,0xC3,
0x42,0x7F,0x00,0x1C,0xB1,0xC3,0x43,0x7F,0x00,0x1C,0xB1,
0x7D,0x02,0x8F,0x0A,0xF1,0xC0,0xA1,0xC1,0x0C,0x70,0x2C,
0x70,0xC3,0x42,0x7F,0x00,0x18,0xB1,0xC3,0x43,0x7F,0x00,
0x18,0xB1,0x8C,0x74,0x2A,0x0A,0x2F,0x0C,0x40,0x24,0xC5,
0x30,0x03,0x14,0x80,0x30,0x87,0x74,0xD1,0xC0,0xE0,0x7E,
0xC3,0x42,0x7F,0x00,0x1C,0xB1,0xC3,0x43,0x7F,0x00,0x1C,
0xB1,0x45,0x02,0x8F,0x0A,0xC3,0x42,0x7F,0x00,0x1C,0xB1,
0xC3,0x43,0x7F,0x00,0x1C,0xB1,0x35,0x02,0x8F,0x0A,0xC3,
0x42,0x7F,0x00,0x14,0xB1,0x35,0x02,0xAF,0x0A,0x40,0x43,
0xE2,0xC0,0x8D,0x70,0x15,0xEA,0x60,0x88,0x2F,0x7D,0xB1,
0x73,0xCA,0x24,0x01,0x10,0x0F,0xF2,0x1F,0x0A,0x70,0x00,
0x40,0x20,0x41,0x00,0x44,0x77,0x00,0x89,0x11,0x08,0x60,
0x03,0x42,0x22,0x42,0x80,0x24,0x71,0xFA,0xF5,0x03,0xF0,
0x28,0x44,0x81,0x40,0xC2,0xC4,0xE0,0x78,0xE4,0xC2,0x14,
0x70,0xCA,0x20,0x61,0x00,0xC9,0x69,0x30,0x70,0xCA,0x26,
0x0B,0x10,0x48,0x45,0x40,0x40,0x30,0xD9,0x9A,0x08,0xAF,
0x0C,0xC1,0x42,0xD8,0x65,0x00,0x18,0x03,0x00,0xC4,0xC6,
0xEA,0xC2,0x30,0x41,0x79,0x23,0x01,0x00,0xF0,0x26,0x41,
0x70,0x7F,0x00,0x9C,0xB0,0x48,0x45,0x08,0x47,0xC3,0xBA,
0x22,0x40,0x60,0x7F,0x30,0x40,0x8A,0x26,0xFF,0x1F,0x04,
0x71,0x0E,0xE8,0x17,0x0D,0x12,0x14,0x10,0xDA,0x22,0x40,
0x60,0x7F,0x02,0x41,0x04,0x71,0x06,0xE8,0x70,0xBD,0xF5,
0x0D,0x13,0x94,0xCD,0x70,0xC1,0x40,0xCA,0xC6,0x28,0x44,
0x00,0x43,0x2C,0x71,0x8C,0x70,0x79,0x05,0xEF,0xFF,0x81,
0x40,0xE0,0x78,0xF1,0xC0,0x4A,0x0B,0x0F,0xFF,0xE1,0xC5,
0xA1,0xC1,0x08,0x45,0x84,0xC0,0x40,0xC0,0x0E,0x59,0x00,
0xC3,0x00,0x41,0xC3,0x40,0x7F,0x00,0xE8,0xAD,0x5A,0x08,
0xAF,0xFF,0xA1,0x42,0x87,0x74,0xC1,0xC5,0xD1,0xC0,0xE0,
0x7F,0xA8,0xC0,0xE4,0xC2,0x28,0x45,0x08,0x46,0x2C,0x70,
0xC3,0x42,0xFF,0x7F,0xFF,0xFF,0x22,0x0F,0xEF,0xFF,0xA1,
0x40,0x4E,0x25,0x41,0x10,0x1A,0x61,0xA1,0x41,0x82,0x0E,
0x2F,0x03,0xC1,0x40,0xC1,0x40,0xC4,0xC6,0xE0,0x78,0xF2,
0xC2,0x30,0x43,0xC1,0x09,0x30,0x00,0x10,0x45,0xCD,0x70,
0x8A,0x24,0x02,0x23,0xD1,0x42,0xED,0x70,0x1A,0x27,0x0D,
0x15,0xA2,0x75,0xA1,0x40,0x04,0x59,0x3A,0x85,0x56,0x0C,
0x2F,0x03,0x10,0x41,0x32,0xF2,0x22,0x40,0xAA,0x0C,0x2F,
0x03,0x42,0x41,0x6E,0x00,0x2C,0x00,0xA1,0x40,0x24,0x15,
0x10,0x10,0x24,0x1D,0x80,0x1F,0x7F,0x00,0x9C,0xAA,0x22,
0x59,0x1A,0x85,0x8E,0x0C,0x2F,0x03,0x2C,0x70,0xC9,0xF6,
0xE1,0x40,0x9A,0x20,0x02,0x03,0xA2,0x70,0x2C,0x80,0x03,
0xE9,0x60,0x79,0xA1,0x40,0x22,0x40,0xA1,0x41,0x68,0x1D,
0x40,0x14,0x23,0x20,0x00,0x04,0x24,0x1D,0x00,0x14,0xA1,
0x40,0x21,0x59,0xA1,0x40,0x1C,0x59,0xE1,0x40,0x9A,0x20,
0x02,0x03,0xA2,0x70,0x2B,0x80,0x14,0xE9,0x60,0x79,0xA1,
0x40,0x12,0xF0,0x22,0x40,0x4A,0x0C,0x2F,0x03,0x42,0x41,
0xCC,0xF6,0xA1,0x40,0x22,0x59,0x08,0x46,0xA1,0x40,0x21,
0x59,0x06,0xF0,0xA1,0x40,0x1F,0x59,0x2C,0x70,0xA1,0x40,
0x02,0x59,0xD5,0x70,0xCD,0x71,0x05,0xF4,0x2C,0x71,0xA1,
0x40,0x02,0x59,0xCD,0x70,0xA1,0x40,0x11,0x59,0x1E,0x0A,
0x0F,0x0C,0xE5,0x71,0x55,0x0F,0xC4,0x94,0xD2,0xC6,0xE0,
0x78,0xF1,0xC0,0xC3,0x40,0x7F,0x00,0xBC,0xB0,0xDE,0x0E,
0xCF,0xFF,0xC3,0x40,0x80,0x00,0xF8,0x3B,0x2C,0x70,0x23,
0xA0,0x22,0xA0,0x21,0xA0,0x20,0xA0,0xAA,0x21,0xA1,0x0D,
0x0C,0x70,0x88,0xB9,0xD1,0xC0,0xE0,0x7F,0xAB,0x21,0xA1,
0x0D,0xEA,0xC3,0xA2,0xC1,0x08,0x45,0x0C,0x74,0xAB,0x20,
0xE2,0x07,0xAA,0x20,0xA0,0x0E,0xAA,0x21,0xA0,0x0E,0xF9,
0x08,0x61,0x80,0x40,0x28,0x02,0x02,0xAA,0x20,0x60,0x0E,
0xAA,0x21,0x60,0x0E,0xF9,0x08,0x61,0x80,0x45,0x78,0x3E,
0x0C,0x0F,0x03,0xCB,0x46,0x7F,0x00,0x40,0xB2,0x23,0x96,
0x08,0x47,0x2F,0x3A,0x43,0x00,0xC3,0x41,0xFA,0x46,0x00,
0x00,0x00,0x39,0x81,0x00,0xBA,0x0D,0xAF,0xFE,0x20,0x40,
0x00,0x3F,0x90,0x1F,0x1C,0x46,0x00,0x40,0x10,0x41,0x02,
0x40,0xA6,0x0D,0xAF,0xFE,0x28,0x47,0xC3,0x43,0xF0,0x3F,
0x00,0x00,0x36,0x0E,0xAF,0xFE,0x4C,0x70,0x22,0x42,0xE1,
0x43,0x00,0x59,0xC6,0x0C,0xCF,0xFE,0x49,0x85,0x0E,0x7F,
0xC3,0x40,0x7F,0x00,0xCC,0xB0,0x3E,0x0E,0xEF,0xFF,0xE1,
0x41,0xC3,0x41,0x73,0x3F,0x33,0x33,0x56,0x0B,0x2F,0x03,
0x02,0x40,0xCD,0xF6,0xC3,0x41,0x86,0x3F,0x66,0x66,0x46,
0x0B,0x2F,0x03,0x02,0x40,0x47,0xF6,0x05,0x16,0xC0,0x10,
0xC2,0x08,0x2F,0x0E,0xE1,0x41,0x09,0x59,0x08,0x46,0x06,
0x59,0x00,0x42,0x0C,0x71,0xC1,0x41,0x08,0x59,0x10,0x40,
0x09,0x59,0x08,0x46,0x06,0x59,0x00,0x42,0x08,0xD8,0xC1,
0x41,0x08,0x59,0x08,0x46,0x12,0x0C,0xEF,0xFF,0x80,0xC0,
0x2F,0x27,0x3F,0x00,0x6F,0x23,0x3F,0x00,0xED,0x74,0x6F,
0x26,0x3F,0x04,0x6F,0x23,0x3F,0x00,0x55,0x86,0x2F,0x26,
0x3F,0x00,0xCB,0x46,0x80,0x00,0xB0,0x3B,0xAB,0x27,0xA2,
0x17,0x00,0x86,0x04,0x71,0x2F,0x08,0xB2,0x0C,0x00,0xA6,
0x00,0x14,0x4C,0x31,0x02,0x14,0x43,0x31,0x04,0x14,0x40,
0x31,0xC3,0x41,0x80,0x00,0xF8,0x3B,0x80,0xA1,0x61,0xA1,
0x02,0xA1,0x50,0x78,0x03,0xA1,0x49,0x85,0xA1,0x40,0x1A,
0x59,0x00,0x1E,0x01,0x10,0x01,0x86,0x21,0x68,0x21,0xA6,
0x8C,0x20,0xC3,0x81,0x09,0xF2,0xE3,0xE0,0x0A,0xF2,0x8C,
0x20,0x42,0x85,0x0B,0xF4,0x88,0x18,0x05,0x22,0x0B,0xF0,
0x88,0x18,0x05,0x24,0x09,0xF0,0x88,0x18,0xC4,0x23,0x05,
0xF0,0x0D,0x08,0x51,0x0C,0x88,0x18,0x85,0x20,0x05,0x59,
0x0C,0x70,0xCA,0xC7,0xE0,0x7F,0x0C,0x70,0xE0,0xB0,0x7F,
0x00,0xF4,0xB0,0x7F,0x00,0x52,0x61,0x6E,0x67,0x65,0x20,
0x63,0x68,0x61,0x6E,0x67,0x65,0x64,0x20,0x74,0x6F,0x20,
0x25,0x64,0x0A,0x00,0x00,0x00,0x00,0x77,0x6F,0x6D,0x20,
0x61,0x6C,0x67,0x20,0x69,0x6E,0x69,0x74,0x0A,0x0D,0x00,
0x00,0x25,0x64,0x20,0x25,0x64,0x0A,0x0D,0x00,0x28,0x6E,
0x75,0x6C,0x6C,0x29,0x00,0x00,0x30,0x00,0x00,0x00,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x30,0x30,0x30,
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
0x30,0x30,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x08,0x90,
0x01,0x0C,0x04,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x02,0x00,0x00,0x70,0xA6,0x7F,0x00,0x60,
0xA8,0x7F,0x00,0x3C,0xC6,0x60,0x00,0x24,0xCC,0x60,0x00,
0x70,0xC6,0x60,0x00,0x7C,0xC5,0x60,0x00,0x30,0xC5,0x60,
0x00,0x8C,0xC6,0x60,0x00,0x48,0xC6,0x60,0x00,0xDC,0xC9,
0x60,0x00,0x30,0xC6,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xD4,0x3F,0x80,0x00,0x8C,0xB9,0x7F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xB8,0x1E,0x05,0x3E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF4,0x01,0x10,
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0xFF,0x00,0x00,0x00,0x00,0x01,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x41,0x01,0x00,0x00,0xA6,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1A,
0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x02,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x14,0xAF,0x7F,0x00,0x40,0xAF,0x7F,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0xE1,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x02,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x18,0xA6,0x7F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x32,0x00,0xA6,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x21,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x98,0xB0,0x7F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x1E,0x00,0xE0,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x41,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xF4,0xFF,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0xC8,0x00,
0x00,0x01,0x04,0x00,0x00,0xB7,0x2D,0x03,0x00,0x06,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x15,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x82,0x06,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0xB3,0x3E,0xCD,
0xCC,0x0C,0x3F,0xCD,0xCC,0x0C,0x3F,0x33,0x33,0x33,0x3F,
0x33,0x33,0x33,0x3F,0xCD,0xCC,0x4C,0x3F,0x01,0x00,0x09,
0x04,0x02,0x17,0xB7,0xD1,0x38,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x17,0xB7,0xD1,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0xB7,
0xD1,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xBD,0x37,0x86,0x35,0xBD,0x37,0x86,0x35,0xBD,0x37,0x86,
0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x42,0xE8,0x03,
0x05,0x00,0x2D,0x00,0x84,0x03,0xB0,0x04,0x96,0x00,0x08,
0x96,0x00,0x0E,0x01,0x03,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0xB3,0x3E,0xCD,
0xCC,0x0C,0x3F,0xCD,0xCC,0x0C,0x3F,0x33,0x33,0x33,0x3F,
0x33,0x33,0x33,0x3F,0xCD,0xCC,0x4C,0x3E,0x01,0x06,0x04,
0x02,0x00,0x05,0x00,0x41,0x01,0x40,0x01,0x24,0x00,0x78,
0x00,0x04,0x01,0x14,0x14,0x02,0x02,0x00,0x04,0x00,0x00,
0x80,0x3F,0xCD,0xCC,0xCC,0x3D,0x9A,0x99,0x99,0x3F,0xCD,
0xCC,0xCC,0x3E,0xCD,0xCC,0xCC,0x3D,0x01,0x00,0x14,0x00,
0x10,0x04,0x78,0x00,0x08,0x00,0x00,0x05,0x9A,0x99,0x19,
0x3F,0x9A,0x99,0x19,0x3F,0x50,0x00,0x09,0x00,0x1E,0x00,
0xE8,0x03,0x50,0x00,0x41,0x00,0x04,0x00,0x04,0x00,0x00,
0x80,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3E,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x40,0xB5,0xFE,0x16,0x37,
0xB5,0xFE,0x16,0x37,0xB5,0xFE,0x16,0x37,0x8B,0xDE,0xA9,
0x38,0x00,0x00,0xE0,0x40,0x0E,0x01,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCD,0xCC,0xCC,0x3D,
0x01,0x09,0x09,0x03,0x13,0x32,0xA3,0x04,0xCD,0x0C,0x19,
0x28,0x04,0x0E,0x00,0x03,0x9A,0x99,0x99,0x3E,0x9A,0x99,
0x99,0x3E,0xCD,0xCC,0xCC,0x3E,0x9A,0x99,0x19,0x3F,0x9A,
0x99,0x99,0x3E,0x00,0x00,0x80,0x3E,0x9A,0x99,0x99,0x3E,
0xEC,0x51,0xB8,0x3E,0xCD,0xCC,0x4C,0x3F,0xCD,0xCC,0x4C,
0x3F,0xCD,0xCC,0x4C,0x3F,0xCD,0xCC,0x4C,0x3F,0xCD,0xCC,
0x4C,0x3E,0xCD,0xCC,0x4C,0x3E,0xCD,0xCC,0x4C,0x3E,0xCD,
0xCC,0x4C,0x3E,0x01,0xC2,0xB8,0xB2,0x3E,0x35,0xFA,0x8E,
0x3C,0x0A,0x00,0x0A,0x00,0x00,0x02,0x00,0x0A,0x00,0x50,
0x77,0x56,0x3D,0x0E,0x00,0x00,0x80,0x3E,0x8F,0xC2,0xF5,
0x3C,0x0A,0xD7,0xA3,0x3C,0x64,0x80,0x34,0x2D,0x46,0x01,
0x0A,0x00,0x50,0x00,0x00,0x00,0xC0,0x3F,0x00,0x00,0x00,
0x40,0x09,0x02,0x00,0x00,0xC8,0x41,0x00,0x00,0x80,0x42,
0x00,0x00,0x80,0x41,0x00,0x00,0xC0,0x3F,0xCD,0xCC,0x4C,
0x3D,0xC2,0xB8,0xB2,0x3D,0x32,0x25,0x3B,0x18,0x47,0x00,
0x00,0xA0,0x40,0x9A,0x99,0x19,0x3F,0x0A,0xD7,0x23,0x3C,
0x0A,0xD7,0x23,0x3C,0x02,0x50,0x77,0x56,0x3D,0x00,0x01,
0xCD,0xCC,0x4C,0x3F,0x00,0x00,0x60,0x40,0x00,0x00,0x20,
0x40,0xCD,0xCC,0xCC,0x3D,0x04,0x8F,0xC2,0xF5,0x3C,0x02,
0x01,0x02,0x03,0x04,0x01,0x0A,0xB0,0x04,0x64,0x00,0x0A,
0xD7,0x23,0x3C,0x0A,0xD7,0x23,0x3C,0x01,0x0A,0x00,0x0A,
0x00,0x00,0x00,0xFA,0x43,0x00,0x00,0x7A,0x44,0x00,0x00,
0xA0,0x3F,0x00,0x00,0x48,0x42,0x00,0x00,0x80,0x3F,0x9A,
0x99,0x19,0x3E,0x9A,0x99,0x99,0x3D,0x00,0x00,0x20,0x42,
0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x3F,0x80,0x96,0x18,0x4B,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x96,0x18,
0x4B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0x96,0x18,0x4B,0x00,0x00,0xC0,0x40,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x40,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x80,0x40,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x0A,0xD7,0x23,
0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0A,0xD7,0x23,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0xD7,
0x23,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x17,0xB7,0xD1,0x38,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,
0xB7,0xD1,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x17,0xB7,0xD1,0x38,0x0A,0xD7,
0x23,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0A,0xD7,0x23,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,
0xD7,0x23,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xAC,0xC5,0x27,0x37,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xAC,0xC5,0x27,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xC5,0x27,0x37,0x00,
0x24,0x74,0x49,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x74,0x49,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x24,0x74,0x49,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x07,0x04,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0x0A,0x03,0x04,0x19,0x40,0x12,0x18,0x00,0x40,
0x72,0x08,0x00,0x0E,0xB3,0x80,0x00,0x00,0x25,0x00,0x03,
0x01,0x00,0x09,0x0C,0x96,0x00,0x0E,0xB4,0x00,0x05,0x00,
0x01,0x00,0xB0,0x04,0x52,0x03,0x00,0x00,0x40,0x41,0x01,
0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x01,0x01,0x94,
0xE9,0x00,0x00,0x00,0x08,0xB1,0x7F,0x00,0x0C,0xB1,0x7F,
0x00,0x0C,0xB1,0x7F,0x00,0x0C,0xB1,0x7F,0x00,0x0C,0xB1,
0x7F,0x00,0x0C,0xB1,0x7F,0x00,0x0C,0xB1,0x7F,0x00,0x10,
0xB1,0x7F,0x00,0x10,0xB1,0x7F,0x00,0x14,0xB1,0x7F,0x00,
0x14,0xB1,0x7F,0x00,0x14,0xB1,0x7F,0x00,0x14,0xB1,0x7F,
0x00,0x14,0xB1,0x7F,0x00,0x14,0xB1,0x7F,0x00,0x18,0xB1,
0x7F,0x00,0x18,0xB1,0x7F,0x00,0x18,0xB1,0x7F,0x00,0x18,
0xB1,0x7F,0x00,0x1C,0xB1,0x7F,0x00,0x1C,0xB1,0x7F,0x00,
0x1C,0xB1,0x7F,0x00,0x1C,0xB1,0x7F,0x00,0x1C,0xB1,0x7F,
0x00,0x1C,0xB1,0x7F,0x00,0x1C,0xB1,0x7F,0x00,0xAB,0x26,
0x0A,0x74,0x7F,0x00,0x98,0x80,0xE0,0x7E,0xE0,0x78,0xC3,
0x40,0x7F,0x00,0x00,0x80,0x6B,0x20,0x40,0x09,0xDB,0x44,
0x80,0x00,0xB0,0x3B,0xDB,0x42,0x80,0x00,0xB0,0x3B,0x0A,
0x22,0x80,0x8F,0x7F,0x00,0x1C,0xBA,0xE2,0x20,0x82,0x00,
0x6F,0x70,0x22,0x20,0x80,0x0F,0x7F,0x00,0x5C,0xBA,0x5D,
0x03,0x8F,0x02,0xAC,0xBD,0x7F,0x00,0xF1,0xC0,0xC3,0x40,
0x80,0x00,0xF8,0x3B,0xC3,0x41,0x80,0x00,0x08,0x3C,0x12,
0x49,0xC6,0x0B,0x2F,0x0C,0x2C,0x70,0x12,0x08,0x00,0x00,
0x3A,0x0B,0x00,0x00,0xD1,0xC0,0xE0,0x7E,0xE0,0x78,0xE8,
0xC3,0xA1,0xC1,0xC3,0x40,0x7F,0x00,0xEC,0xBF,0x33,0xE8,
0xCB,0x46,0x7F,0x00,0x54,0xBF,0xDA,0x0E,0xEF,0x0D,0xC1,
0x40,0xAC,0xE8,0x03,0x8E,0x0F,0x08,0xF4,0x00,0xE4,0x6E,
0xA0,0x87,0x40,0x26,0x0F,0x12,0x10,0xF0,0xCB,0x45,0x60,
0x00,0xE8,0x99,0x19,0x00,0x00,0x00,0x80,0xC3,0x02,0x40,
0xC1,0x41,0x60,0x7D,0x81,0x42,0x03,0x6E,0x6C,0x20,0x40,
0x00,0x1F,0x67,0x08,0xE7,0xC1,0x87,0xD5,0x70,0x1A,0x00,
0x21,0x00,0x80,0x87,0x40,0x27,0x10,0x12,0x30,0xF6,0xD3,
0x7A,0x2C,0x70,0x56,0x0B,0x2F,0x0C,0x81,0x40,0x0A,0x47,
0xF2,0xF1,0x05,0xEC,0x04,0x6F,0xE4,0x68,0xEE,0xF1,0x0C,
0x70,0xC8,0xC7,0xE0,0x78,0xF1,0xC0,0x0F,0xD8,0xC3,0x41,
0x7F,0x00,0x48,0xA6,0x17,0x59,0x0F,0xD8,0xC3,0x41,0x7F,
0x00,0x44,0xA6,0x16,0x59,0xD1,0xC0,0xE0,0x7E,0xE0,0x78,
0xF2,0xC2,0x30,0x44,0x10,0x43,0x1B,0xD9,0x0C,0x70,0x70,
0x42,0x50,0x45,0xAB,0x21,0xA0,0x0D,0x01,0x59,0xC3,0x40,
0x7F,0x00,0x1C,0xB1,0xC3,0x41,0x7F,0x00,0xA8,0xB1,0x02,
0x79,0xD3,0x41,0x7F,0x00,0xA8,0xB1,0xC3,0x43,0x7F,0x00,
0x40,0xB2,0xD3,0x40,0x7F,0x00,0x40,0xB2,0xC3,0x42,0x7F,
0x00,0xD8,0xB2,0x02,0x23,0x4E,0x04,0x02,0x22,0x0D,0x04,
0x84,0x29,0x02,0x03,0xCB,0x47,0x80,0x00,0xC0,0x3B,0x84,
0x2E,0x01,0x13,0x25,0xAF,0x2F,0x79,0x84,0x2D,0x01,0x13,
0xC6,0xAF,0x56,0x0E,0xEF,0x0C,0xA7,0xAF,0xCF,0x79,0x96,
0x0E,0xEF,0x0C,0x22,0x40,0xAF,0x79,0x82,0x0E,0xEF,0x0C,
0x02,0x40,0xCB,0x45,0x7F,0x00,0xD8,0xB2,0x92,0x0D,0xEF,
0x0C,0xA1,0x40,0xAA,0x20,0xE1,0x04,0x82,0x41,0x05,0x20,
0x82,0x0F,0xB7,0x2D,0x00,0x00,0x62,0x40,0x86,0x0E,0xAF,
0x0B,0xAB,0x22,0xE1,0x04,0x2F,0x21,0x85,0x04,0x3E,0x0F,
0xAF,0x0D,0xA2,0x40,0x66,0x8F,0x27,0x8F,0xC3,0x40,0x80,
0x00,0xF0,0x3B,0x45,0x8F,0x00,0x21,0xC4,0x00,0x61,0x80,
0x20,0x80,0x66,0x08,0x20,0x00,0xA1,0x40,0x1D,0xD9,0x0C,
0x70,0xAB,0x21,0xA0,0x0D,0x01,0x59,0x0A,0x08,0x00,0x00,
0xD2,0xC6,0xE4,0xC2,0xAD,0x70,0xCB,0x46,0x7F,0x00,0xB4,
0xB9,0x08,0x16,0x00,0x14,0xFC,0x16,0x01,0x90,0x02,0x79,
0x22,0xB9,0x2F,0x79,0x09,0x09,0x92,0x00,0x9A,0x0B,0x8F,
0x0B,0xA5,0x71,0xEB,0x0D,0x54,0x93,0xC3,0x42,0x7F,0x00,
0x18,0xB1,0xC3,0x43,0x7F,0x00,0x1C,0xB1,0x6E,0x0B,0x0F,
0x0A,0xC4,0xC6,0xF1,0xC0,0x14,0x59,0x14,0x70,0x0C,0x71,
0x04,0xF4,0x25,0xD8,0x18,0x59,0x0C,0x70,0xD1,0xC0,0xE0,
0x7E,0xF0,0xC2,0x50,0x40,0x10,0xDA,0xAB,0x22,0xA0,0x0D,
0x55,0x88,0x97,0x88,0xCC,0x88,0x70,0x44,0x76,0x88,0x14,
0x88,0x08,0xBA,0x08,0xBC,0x45,0x78,0x05,0x24,0xC2,0x10,
0x10,0xBA,0x30,0x41,0x0A,0x23,0x00,0x21,0xC3,0x41,0x00,
0x00,0xAA,0x0A,0xAD,0x70,0x6D,0x72,0x4A,0x24,0x00,0x72,
0xC3,0xBE,0x05,0x7A,0xA8,0x20,0xC0,0x05,0x53,0x22,0x40,
0x00,0x4F,0x20,0x43,0x00,0x15,0x0B,0xB1,0x00,0x00,0x2B,
0x43,0x13,0x66,0x79,0x14,0x72,0xCF,0x21,0x41,0x03,0x07,
0xF2,0x0B,0x08,0x71,0x00,0x00,0x2B,0x40,0x13,0x05,0x79,
0x22,0xBA,0xA5,0x72,0x52,0x6E,0x0C,0x71,0xDB,0x7C,0x6C,
0x73,0x00,0x28,0x82,0x00,0x00,0x2B,0x00,0x03,0x06,0x79,
0xC1,0x40,0xAB,0x22,0xA1,0x0D,0xAB,0x21,0xE2,0x03,0x15,
0x59,0xD5,0x08,0x30,0x00,0x1C,0xD8,0x4C,0x72,0xAB,0x20,
0xD0,0x02,0x42,0x20,0xC1,0x03,0x04,0x71,0xF9,0x09,0x74,
0x84,0xAB,0x22,0x88,0x01,0x4A,0x24,0x40,0x71,0x11,0xD8,
0xA8,0x20,0xC0,0x02,0x40,0x20,0x02,0x04,0x42,0x20,0x81,
0x03,0x04,0x71,0xAB,0x22,0xD0,0x02,0xAB,0x21,0x88,0x01,
0x8D,0x70,0x4A,0x24,0x00,0x73,0x0C,0x70,0xED,0x71,0xA8,
0x20,0x00,0x02,0xA8,0x48,0x04,0x71,0xAB,0x21,0xD0,0x02,
0xAB,0x27,0x88,0x11,0x4A,0x23,0x80,0x16,0x8A,0x21,0x10,
0x00,0x19,0xDE,0x8A,0x20,0x08,0x00,0x8A,0x22,0x04,0x00,
0x11,0xDB,0xAD,0x70,0xD3,0x42,0x00,0x00,0xFF,0xFF,0xAB,
0x23,0xD0,0x12,0xAB,0x24,0x88,0x11,0xAB,0x21,0xE1,0x0C,
0xAB,0x21,0x62,0x07,0xAB,0x21,0xA2,0x06,0xAB,0x26,0xD0,
0x12,0xAB,0x27,0x88,0x11,0xAB,0x20,0xE2,0x06,0xAB,0x20,
0xE1,0x0C,0xAB,0x20,0x62,0x07,0xAB,0x20,0xA2,0x06,0xAB,
0x22,0x62,0x07,0xAB,0x22,0xA2,0x06,0x3D,0x08,0x30,0x20,
0xAB,0x23,0xA0,0x0D,0x22,0x42,0x0C,0x70,0x23,0x92,0x65,
0x8A,0x55,0x22,0xC2,0x08,0xC9,0xB9,0x44,0x23,0x03,0x04,
0x3C,0x21,0x8E,0x04,0x79,0x21,0x0F,0x00,0x24,0xBB,0xCB,
0x7F,0x65,0x78,0x85,0x71,0xE5,0x0C,0x24,0x94,0xCA,0x22,
0x42,0x20,0x07,0xF0,0xB0,0xD8,0x18,0x59,0xAD,0x70,0x13,
0xF0,0x0C,0x70,0xFA,0x0E,0x8F,0x0B,0xBA,0x0E,0xAF,0x0B,
0x42,0x40,0x22,0x40,0x02,0x41,0x82,0x42,0x7E,0x0E,0xEF,
0xFF,0x62,0x43,0x05,0xE8,0x12,0xD8,0xAD,0x71,0xAB,0x20,
0xA0,0x0D,0xA1,0x40,0xD0,0xC6,0xE0,0x78,0xE4,0xC3,0x82,
0x24,0x0F,0x31,0x8A,0x21,0x0A,0x00,0x00,0x24,0x80,0x3F,
0x00,0x00,0x44,0x01,0x80,0xC2,0x38,0x60,0x0D,0x0A,0x25,
0x00,0x40,0xC2,0x00,0x42,0x40,0xC0,0x81,0xC0,0x56,0x20,
0x00,0x0A,0x09,0x0A,0x05,0x00,0x40,0xC0,0xCB,0x45,0x80,
0x00,0xAC,0x2F,0xCB,0x46,0x80,0x00,0xC0,0x3B,0xCB,0x44,
0xA5,0x5A,0x6B,0xB6,0x00,0x24,0x80,0x3F,0x00,0x00,0x44,
0x01,0x20,0xD9,0x81,0xC2,0x10,0xDB,0xA0,0xA6,0x1A,0x0D,
0xEF,0xFF,0x80,0xA5,0x44,0x6D,0xC3,0x41,0x80,0x00,0x00,
0x00,0xC3,0x43,0x7F,0x00,0x08,0xB3,0xC3,0x44,0x80,0x00,
0x00,0x00,0xCA,0x08,0x2F,0x0C,0xA1,0x40,0x0C,0x70,0xC4,
0xC7,0xE0,0x78,0xF0,0xC2,0x70,0x41,0x50,0x42,0x30,0x43,
0x10,0x44,0xAB,0x0B,0x30,0x00,0xCD,0x70,0x8A,0x20,0x01,
0x23,0x1A,0x26,0x0F,0x14,0x42,0x77,0xE1,0x40,0x0A,0x59,
0x0D,0x08,0x95,0x00,0x22,0x1F,0x83,0x10,0x0A,0xF0,0x11,
0x08,0x34,0x02,0xC1,0x40,0x9A,0x20,0x01,0x03,0x42,0x70,
0x22,0x18,0xC3,0x0F,0x4C,0xD8,0xCC,0x78,0x42,0x70,0x35,
0x88,0xC1,0xB9,0x23,0x09,0x71,0x00,0xA4,0x68,0x01,0x95,
0x1B,0xE8,0x2F,0x38,0x03,0x00,0xC3,0x41,0x7F,0x00,0x10,
0x85,0xE1,0x42,0x20,0x59,0x2B,0x08,0x33,0x00,0x01,0xAD,
0x23,0xF0,0xA1,0x40,0x82,0x41,0x62,0x42,0x42,0x43,0xA6,
0x08,0x20,0x00,0x0A,0x24,0x40,0x04,0x09,0xE8,0x00,0x41,
0x00,0x80,0xFE,0xE8,0xE0,0xA1,0x03,0xF0,0x01,0x1D,0xC3,
0x1F,0xC9,0x45,0x9A,0x25,0x01,0x13,0x42,0x75,0x06,0x85,
0x0D,0xE8,0x39,0x8D,0xC1,0xB9,0x13,0x09,0xB1,0x00,0x0F,
0x78,0x82,0x41,0x62,0x42,0x08,0x59,0x06,0xA5,0x03,0xF0,
0x18,0x1D,0x01,0x10,0xC5,0x71,0xAD,0x70,0x6D,0x0E,0x64,
0x94,0xED,0x70,0x05,0xF0,0xAD,0x70,0xED,0x70,0x03,0xF0,
0xA5,0x71,0x49,0x0D,0x65,0x14,0x4C,0xDE,0xAC,0x7E,0x00,
0x22,0x90,0xA3,0xFA,0xF3,0x02,0x40,0x0D,0x59,0x76,0xE8,
0x42,0x76,0x15,0x8E,0xC1,0xB8,0xE5,0x08,0x70,0x80,0x02,
0x40,0x0A,0x59,0x08,0x46,0x02,0x40,0x0D,0x59,0x0A,0x59,
0xD5,0x0E,0x25,0x90,0xA1,0x41,0x9A,0x21,0x01,0x03,0x02,
0x40,0x00,0x22,0x4E,0x20,0x0D,0x59,0x0A,0x59,0xED,0x71,
0x22,0x1E,0x02,0x10,0xDE,0xF1,0xF5,0x70,0xAD,0x70,0xED,
0x70,0xDB,0xF5,0x0C,0x71,0xD0,0xC6,0xE2,0xC2,0x08,0x45,
0x01,0x88,0xC1,0xB8,0x17,0x08,0xB0,0x00,0x80,0x8D,0x14,
0x71,0x0C,0x70,0x09,0xF7,0x81,0x40,0x60,0x41,0x80,0x42,
0x0F,0x59,0x03,0xF0,0x81,0x40,0x08,0x59,0x00,0xA5,0xC2,
0xC6,0x00,0x00,0x49,0x4E,0x49,0x02,0x08,0xB1,0x7F,0x00,
0x04,0x00,0x00,0x00,0xD0,0x3B,0x80,0x00,0x0C,0xB1,0x7F,
0x00,0x04,0x00,0x00,0x00,0xE0,0x3B,0x80,0x00,0x10,0xB1,
0x7F,0x00,0x04,0x00,0x00,0x00,0xC8,0x3B,0x80,0x00,0x14,
0xB1,0x7F,0x00,0x04,0x00,0x00,0x00,0xD8,0x3B,0x80,0x00,
0x18,0xB1,0x7F,0x00,0x04,0x00,0x00,0x00,0xE8,0x3B,0x80,
0x00,0xB0,0x3B,0x80,0x00,0x48,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x06,0x00,0x00,0x00,0x38,0xAB,0x7F,0x00,0x06,0x00,0x00,
0x00,0xC8,0xAA,0x7F,0x00,0x06,0x00,0x00,0x00,0xA0,0xAA,
0x7F,0x00,0x05,0x00,0x00,0x00,0x90,0xAA,0x7F,0x00,0x0A,
0x00,0x00,0x00,0xF4,0xBA,0x7F,0x00,0x1C,0xB1,0x7F,0x00,
0xA8,0xB1,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,
};
|
CASL/VeraInView
|
src/utils/ImageReady.js
|
function createImageDependencyManager(label = '') {
let completedImages = 0;
const listeners = [];
let hasImage = false;
function onImageLoaded() {
completedImages--;
if (completedImages === 0) {
let count = listeners.length;
while (count--) {
listeners[count]();
}
}
}
function addImage(img) {
hasImage = true;
completedImages++;
if (img.complete) {
onImageLoaded();
} else {
img.addEventListener('load', onImageLoaded);
}
}
function onImageReady(callback) {
if (hasImage && completedImages === 0) {
callback();
}
listeners.push(callback);
}
return {
addImage,
onImageReady,
};
}
export default {
createImageDependencyManager,
};
|
fernhtls/googleads-java-lib
|
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201603/cm/CustomParameters.java
|
/**
* CustomParameters.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201603.cm;
/**
* CustomParameters holds a list of CustomParameters to be treated
* as a map.
* It has a special field used to indicate that the current
* map should be cleared and replaced
* with this new map.
*/
public class CustomParameters implements java.io.Serializable {
/* The list of custom parameters.
*
* <p>On update, all parameters can be cleared by providing
* an empty or null list and setting
* doReplace to true. */
private com.google.api.ads.adwords.axis.v201603.cm.CustomParameter[] parameters;
/* On SET operation, indicates that the current parameters should
* be cleared and replaced
* with these parameters. */
private java.lang.Boolean doReplace;
public CustomParameters() {
}
public CustomParameters(
com.google.api.ads.adwords.axis.v201603.cm.CustomParameter[] parameters,
java.lang.Boolean doReplace) {
this.parameters = parameters;
this.doReplace = doReplace;
}
/**
* Gets the parameters value for this CustomParameters.
*
* @return parameters * The list of custom parameters.
*
* <p>On update, all parameters can be cleared by providing
* an empty or null list and setting
* doReplace to true.
*/
public com.google.api.ads.adwords.axis.v201603.cm.CustomParameter[] getParameters() {
return parameters;
}
/**
* Sets the parameters value for this CustomParameters.
*
* @param parameters * The list of custom parameters.
*
* <p>On update, all parameters can be cleared by providing
* an empty or null list and setting
* doReplace to true.
*/
public void setParameters(com.google.api.ads.adwords.axis.v201603.cm.CustomParameter[] parameters) {
this.parameters = parameters;
}
public com.google.api.ads.adwords.axis.v201603.cm.CustomParameter getParameters(int i) {
return this.parameters[i];
}
public void setParameters(int i, com.google.api.ads.adwords.axis.v201603.cm.CustomParameter _value) {
this.parameters[i] = _value;
}
/**
* Gets the doReplace value for this CustomParameters.
*
* @return doReplace * On SET operation, indicates that the current parameters should
* be cleared and replaced
* with these parameters.
*/
public java.lang.Boolean getDoReplace() {
return doReplace;
}
/**
* Sets the doReplace value for this CustomParameters.
*
* @param doReplace * On SET operation, indicates that the current parameters should
* be cleared and replaced
* with these parameters.
*/
public void setDoReplace(java.lang.Boolean doReplace) {
this.doReplace = doReplace;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof CustomParameters)) return false;
CustomParameters other = (CustomParameters) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.parameters==null && other.getParameters()==null) ||
(this.parameters!=null &&
java.util.Arrays.equals(this.parameters, other.getParameters()))) &&
((this.doReplace==null && other.getDoReplace()==null) ||
(this.doReplace!=null &&
this.doReplace.equals(other.getDoReplace())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getParameters() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getParameters());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getParameters(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
if (getDoReplace() != null) {
_hashCode += getDoReplace().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(CustomParameters.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "CustomParameters"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("parameters");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "parameters"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "CustomParameter"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setMaxOccursUnbounded(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("doReplace");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "doReplace"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
manoj-gk/tr069simulator
|
src/main/java/org/dslforum/cwmp_1_0/UploadResponse.java
|
<reponame>manoj-gk/tr069simulator<filename>src/main/java/org/dslforum/cwmp_1_0/UploadResponse.java
package org.dslforum.cwmp_1_0;
import java.util.Date;
/**
* UploadResponse message - Annex A.4.1.5
*
* Schema fragment(s) for this class:
* <pre>
* <xs:element xmlns:ns="urn:dslforum-org:cwmp-1-0" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="UploadResponse">
* <xs:complexType>
* <xs:sequence>
* <xs:element name="Status">
* <xs:simpleType>
* <!-- Reference to inner class Status -->
* </xs:simpleType>
* </xs:element>
* <xs:element type="xs:dateTime" name="StartTime"/>
* <xs:element type="xs:dateTime" name="CompleteTime"/>
* </xs:sequence>
* </xs:complexType>
* </xs:element>
* </pre>
*/
public class UploadResponse
{
private Status status;
private Date startTime;
private Date completeTime;
/**
* Get the 'Status' element value.
*
* @return value
*/
public Status getStatus() {
return status;
}
/**
* Set the 'Status' element value.
*
* @param status
*/
public void setStatus(Status status) {
this.status = status;
}
/**
* Get the 'StartTime' element value.
*
* @return value
*/
public Date getStartTime() {
return startTime;
}
/**
* Set the 'StartTime' element value.
*
* @param startTime
*/
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
/**
* Get the 'CompleteTime' element value.
*
* @return value
*/
public Date getCompleteTime() {
return completeTime;
}
/**
* Set the 'CompleteTime' element value.
*
* @param completeTime
*/
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
/**
* Schema fragment(s) for this class:
* <pre>
* <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
* <xs:restriction base="xs:int">
* <xs:enumeration value="0"/>
* <xs:enumeration value="1"/>
* </xs:restriction>
* </xs:simpleType>
* </pre>
*/
public static class Status
{
private final String value;
/**
* Upload has been completed
*/
public static final Status _0 = new Status("0");
/**
* Upload has not yet completed
*/
public static final Status _1 = new Status("1");
private static final String[] values = new String[]{"0", "1"};
private static final Status[] instances = new Status[]{_0, _1};
private Status(String value) {
this.value = value;
}
public String toString() {
return value;
}
public static Status convert(String value) {
int index = java.util.Arrays.binarySearch(values, value);
if (index >= 0) {
return instances[index];
} else {
return null;
}
}
public static Status fromValue(String text) {
Status value = convert(text);
if (value == null) {
throw new IllegalArgumentException("Value '" + text
+ "' is not allowed");
} else {
return value;
}
}
}
}
|
DeusMechanicus/Omnissiah
|
code/raw_map.py
|
<gh_stars>1-10
#!/usr/bin/env python3
import omni_const
import omni_config
import omni_unpwd
import sys
import time
import nmap
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
from multiprocessing import cpu_count
from omnissiah.db import OmniDB
from omnissiah.omnissiah import OmniProgram
from omnissiah.msg import msg_loaded_records, msg_prepared_for_scanning, msg_scan_ip_found, msg_db_added_records, msg_scan_snmp_oid_walk, msg_error_insert_values
from omnissiah.const import arp_oid
from omnissiah.util import split_dict, split_list
select_ips_sql = 'SELECT ip, ipid, sourceid, refid FROM raw_scan_ip;'
insert_scan_ports_sql = 'INSERT INTO raw_scan_port (type, port, ipid, state, reason) VALUES (%s, %s, %s, %s, %s);'
select_ip_port_sql = "SELECT DISTINCT ipid, type, port, state, reason FROM raw_scan_port WHERE {0} ORDER BY ipid, type, port, state, reason;"
insert_scan_scripts_sql = 'INSERT INTO raw_scan_script (portid, script, value) VALUES (%s, %s, %s);'
select_scan_portid_sql = "SELECT portid FROM raw_scan_port WHERE ipid={0} AND type='{1}' AND port={2};"
select_ip_port_forservices_sql = "SELECT DISTINCT raw_scan_port.ipid, raw_scan_port.type, raw_scan_port.port FROM raw_scan_port \
LEFT JOIN raw_scan_script ON raw_scan_port.portid=raw_scan_script.portid WHERE \
(raw_scan_port.state='open' OR (raw_scan_script.id IS NOT NULL AND raw_scan_script.value<>'ERROR: Script execution failed (use -d to debug)')) \
{0} ORDER BY raw_scan_port.ipid, raw_scan_port.type, raw_scan_port.port;"
insert_scan_services_sql = 'INSERT INTO raw_scan_service (portid, product, version, extrainfo, conf, cpe, servicefp, name, method) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s);'
insert_scan_osportused_sql = 'INSERT INTO raw_scan_osportused (ipid, state, proto, port) VALUES (%s, %s, %s, %s);'
insert_scan_osmatch_sql = 'INSERT INTO raw_scan_osmatch (ipid, name, accuracy, line) VALUES (%s, %s, %s, %s) RETURNING osmatchid;'
insert_scan_osclass_sql = 'INSERT INTO raw_scan_osclass (osmatchid, type, vendor, osfamily, osgen, accuracy, cpe) VALUES (%s, %s, %s, %s, %s, %s, %s);'
def select_ips(db, log):
result={}
cur = db.cursor()
cur.execute(select_ips_sql)
records = cur.fetchall()
for r in records:
result[r[0]] = {'id':r[1], 'sourceid':r[1], 'refid':r[2]}
cur.close()
log.info(msg_loaded_records.format('ip addresses', len(result)))
return result
def single_pool_scan(hosts, arguments, sudo, timeout, log):
try:
nmapscan = nmap.PortScanner()
result = nmapscan.scan(hosts=hosts, arguments=arguments, sudo=sudo, timeout=timeout)
except:
log.exception('Fatal error')
result = None
return result
def single_process_scan(ips, threadsnum, arguments, timeout, log):
results = []
pools = split_dict(ips, omni_config.map_ip_scope_size)
with ThreadPoolExecutor(max_workers=threadsnum) as executor:
futures = []
for pool in pools:
futures.append(executor.submit(single_pool_scan, hosts=' '.join(pool), arguments=arguments,
sudo=True, timeout=timeout, log=log))
for future in as_completed(futures):
result = future.result()
if result is not None:
results.append(result)
executor.shutdown(wait=False, cancel_futures=True)
return results
def scan_ips(scanlist, ips, cpusnum, log):
scans = {}
if ips is not None:
if type(ips) is dict:
pools = split_dict(ips, cpusnum)
else:
pools = split_dict(dict.fromkeys(ips, None), cpusnum)
jobs = []
for scan in scanlist:
if ips is None:
if type(ips) is dict:
pools = split_dict(scan['ips'], cpusnum)
else:
pools = split_dict(dict.fromkeys(scan['ips'], None), cpusnum)
for pool in pools:
jobs.append({'ips':pool, 'threadsnum':scan['threadsnum'], 'arguments':scan['arguments'], 'timeout':scan['timeout']+60})
results = []
with ProcessPoolExecutor(max_workers=cpusnum) as executor:
futures = []
for job in jobs:
futures.append(executor.submit(single_process_scan, ips=job['ips'], threadsnum=job['threadsnum'], \
arguments=job['arguments'], timeout=job['timeout'], log=log))
for future in as_completed(futures):
result = future.result()
results.extend(result)
executor.shutdown(wait=False, cancel_futures=True)
for result in results:
for ip, vscan in result['scan'].items():
if not ip in scans:
scans[ip] = []
scans[ip].append(vscan)
return scans
def save_scans(db, ips, scans, log):
cur = db.cursor()
recnum = 0
for ip, scanlist in scans.items():
vallist = []
for scan in scanlist:
if 'tcp' in scan:
for port, vport in scan['tcp'].items():
vallist.append(('tcp', port, ips[ip]['id'], vport['state'], vport['reason']))
if 'udp' in scan:
for port, vport in scan['udp'].items():
vallist.append(('udp', port, ips[ip]['id'], vport['state'], vport['reason']))
if scan['status']['reason']=='echo-reply':
vallist.append(('icmp', 0, ips[ip]['id'], scan['status']['state'], scan['status']['reason']))
if vallist:
cur.executemany(insert_scan_ports_sql, vallist)
db.commit()
recnum += len(vallist)
log.info(msg_db_added_records.format('raw_scan_port', recnum))
cur.close()
def build_nmap_scan_ports(tcp, udp):
result = '-sS ' if tcp else ''
result = result + ('-sU ' if udp else '')
if tcp or udp:
result = result + '-p'
if tcp:
result = result + 'T:' + ','.join([str(p) for p in tcp])
if udp:
result = result + ','
if udp:
result = result + 'U:' + ','.join([str(p) for p in udp])
return result
def select_script_ips(db, log):
scripts = []
ipids = {}
cur = db.cursor()
cur.execute(select_ips_sql)
for r in cur.fetchall():
ipids[r[1]] = r[0]
for script in omni_config.nmap_script_list:
ipports = {}
cur.execute(select_ip_port_sql.format(script['filter']))
for r in cur.fetchall():
ip = ipids[r[0]]
if ip not in ipports:
ipports[ip] = {'tcp':[], 'udp':[], 'ports':None}
ipports[ip][r[1]].append(r[2])
for ip, ports in ipports.items():
ports['ports'] = build_nmap_scan_ports(ports['tcp'], ports['udp'])
scanports = {}
for ip, ports in ipports.items():
if ports['ports']:
if ports['ports'] not in scanports:
scanports[ports['ports']] = []
scanports[ports['ports']].append(ip)
for scanport, ips in scanports.items():
scripts.append({'threadsnum':script['threadsnum'], 'timeout':script['timeout'],
'arguments':script['arguments'] + ' ' + scanport, 'ips':ips})
cur.close()
return scripts
def build_script_vallist(db, ipid, porttype, scan):
result = []
if porttype in scan:
cur = db.cursor()
for port, vport in scan[porttype].items():
if 'script' in vport:
cur.execute(select_scan_portid_sql.format(ipid, porttype, port))
portid = cur.fetchone()
if not portid:
vallist = [(porttype, port, ipid, vport['state'], vport['reason'])]
cur.executemany(insert_scan_ports_sql, vallist)
db.commit()
cur.execute(select_scan_portid_sql.format(ipid, porttype, port))
portid = cur.fetchone()
if portid:
portid = portid[0]
for script, vscript in vport['script'].items():
result.append((portid, script, vscript[:omni_config.nmap_max_script_value_len]))
cur.close()
return result
def save_scripts(db, ips, scans, log):
cur = db.cursor()
recnum = 0
for ip, scanlist in scans.items():
vallist = []
for scan in scanlist:
vallist.extend(build_script_vallist(db, ips[ip]['id'], 'tcp', scan))
vallist.extend(build_script_vallist(db, ips[ip]['id'], 'udp', scan))
if vallist:
try:
cur.executemany(insert_scan_scripts_sql, vallist)
db.commit()
recnum += len(vallist)
except:
log.error(msg_error_insert_values.format('raw_scan_script', str(vallist)))
db.close()
time.sleep(omni_config.nmap_db_reconnect_delay)
db.open()
cur = db.cursor()
for v in vallist:
cur.execute(insert_scan_scripts_sql, v)
db.commit()
recnum += 1
log.info(msg_db_added_records.format('raw_scan_script', recnum))
cur.close()
def select_services_ips(db, log):
services = []
ipids = {}
cur = db.cursor()
cur.execute(select_ips_sql)
for r in cur.fetchall():
ipids[r[1]] = r[0]
pfilter = ''
for ptype, pvalues in omni_config.nmap_service_ports.items():
if pvalues:
if pfilter:
pfilter = pfilter + ' OR '
pfilter = pfilter + "(raw_scan_port.type='" + ptype + "' AND raw_scan_port.port IN (" + ','.join([str(p) for p in pvalues]) + '))'
if pfilter:
pfilter = 'AND (' + pfilter + ')'
cur.execute(select_ip_port_forservices_sql.format(pfilter))
ipports = {}
for r in cur.fetchall():
ip = ipids[r[0]]
if ip not in ipports:
ipports[ip] = {}
intensity = omni_config.nmap_service_ports[r[1]][r[2]]['intensity']
timeout = omni_config.nmap_service_ports[r[1]][r[2]]['timeout']
if intensity not in ipports[ip]:
ipports[ip][intensity] = {'tcp':[], 'udp':[], 'arguments':None, 'timeout':0}
ipports[ip][intensity][r[1]].append(r[2])
ipports[ip][intensity]['timeout'] += timeout
cur.close()
for ip, intensities in ipports.items():
for intensity, ports in intensities.items():
ports['arguments'] = omni_config.nmap_service_arguments.format(str(ports['timeout']), str(intensity),
build_nmap_scan_ports(ports['tcp'], ports['udp']))
scanports = {}
for ip, intensities in ipports.items():
for intensity, ports in intensities.items():
if ports['arguments']:
if ports['arguments'] not in scanports:
scanports[ports['arguments']] = {'timeout':ports['timeout']+60, 'ips':[]}
scanports[ports['arguments']]['ips'].append(ip)
for scanport, ips in scanports.items():
services.append({'threadsnum':omni_config.nmap_service_arguments_threadsnum, 'timeout':ips['timeout'],
'arguments':scanport, 'ips':ips['ips']})
return services
def build_service_vallist(db, ipid, porttype, scan):
result = []
if porttype in scan:
cur = db.cursor()
for port, vport in scan[porttype].items():
product = vport.get('product') if vport.get('product', None) else None
version = vport.get('version') if vport.get('version', None) else None
extrainfo = vport.get('extrainfo') if vport.get('extrainfo', None) else None
conf = vport.get('conf') if vport.get('conf', None) else None
cpe = vport.get('cpe') if vport.get('cpe', None) else None
servicefp = vport.get('servicefp') if vport.get('servicefp', None) else None
name = vport.get('name') if vport.get('name', None) else None
method = vport.get('method') if vport.get('method', None) else None
if product or version or extrainfo or cpe or servicefp:
cur.execute(select_scan_portid_sql.format(ipid, porttype, port))
portid = cur.fetchone()
if not portid:
vallist = [(porttype, port, ipid, vport['state'], vport['reason'])]
cur.executemany(insert_scan_ports_sql, vallist)
db.commit()
cur.execute(select_scan_portid_sql.format(ipid, porttype, port))
portid = cur.fetchone()
if portid:
portid = portid[0]
conf = int(conf) if conf is not None else None
servicefp = servicefp[:omni_config.nmap_max_service_servicefp_len] if servicefp is not None else None
result.append((portid, product, version, extrainfo, conf, cpe, servicefp, name, method))
cur.close()
return result
def save_services(db, ips, scans, log):
cur = db.cursor()
recnum = 0
for ip, scanlist in scans.items():
vallist = []
for scan in scanlist:
vallist.extend(build_service_vallist(db, ips[ip]['id'], 'tcp', scan))
vallist.extend(build_service_vallist(db, ips[ip]['id'], 'udp', scan))
if vallist:
cur.executemany(insert_scan_services_sql, vallist)
db.commit()
recnum += len(vallist)
log.info(msg_db_added_records.format('raw_scan_service', recnum))
cur.close()
def select_osdetect_ips(db, log):
osdetects = []
ipids = {}
cur = db.cursor()
cur.execute(select_ips_sql)
for r in cur.fetchall():
ipids[r[1]] = r[0]
cur.execute(select_ip_port_sql.format(omni_config.nmap_os_filter))
ipports = {}
for r in cur.fetchall():
ip = ipids[r[0]]
if ip not in ipports:
ipports[ip] = {'tcp':[], 'udp':[], 'ports':None}
ipports[ip][r[1]].append(r[2])
cur.close()
for ip, ports in ipports.items():
ports['ports'] = build_nmap_scan_ports(ports['tcp'], ports['udp'])
scanports = {}
for ip, ports in ipports.items():
if ports['ports']:
if ports['ports'] not in scanports:
scanports[ports['ports']] = []
scanports[ports['ports']].append(ip)
for scanport, ips in scanports.items():
osdetects.append({'threadsnum':omni_config.nmap_os_arguments_threadsnum, 'timeout':omni_config.nmap_os_timeout,
'arguments':omni_config.nmap_os_arguments + ' ' + scanport, 'ips':ips})
return osdetects
def save_osdetects(db, ips, scans, log):
cur = db.cursor()
osmatchnum = 0
osclassnum = 0
for ip, scanlist in scans.items():
portused_list = []
osclass_list = []
for scan in scanlist:
portused = scan.get('portused', [])
for port in portused:
portused_list.append((ips[ip]['id'], port['state'], port['proto'], port['portid']))
osmatches = scan.get('osmatch', [])
for osmatch in osmatches:
cur.execute(insert_scan_osmatch_sql, (ips[ip]['id'], osmatch['name'], osmatch['accuracy'], osmatch.get('line', None)))
last_osid = cur.fetchone()[0]
osmatchnum += 1
osclasses = osmatch.get('osclass', [])
for osclass in osclasses:
cpe = osclass.get('cpe', [])
cpe = cpe[0] if cpe else None
osclass_list.append((last_osid, osclass['type'], osclass['vendor'], osclass['osfamily'], osclass['osgen'],
osclass['accuracy'], cpe))
if portused_list:
cur.executemany(insert_scan_osportused_sql, portused_list)
db.commit()
if osclass_list:
cur.executemany(insert_scan_osclass_sql, osclass_list)
db.commit()
osclassnum += len(osclass_list)
log.info(msg_db_added_records.format('raw_scan_osmatch', osmatchnum))
log.info(msg_db_added_records.format('raw_scan_osclass', osclassnum))
cur.close()
def main():
try:
exitcode = 1
program = OmniProgram(omni_config.log_path, omni_config.log_level, omni_config.log_format, omni_config.log_date_format)
omnidb = OmniDB(omni_config.dbtype, omni_config.dbhost, omni_config.dbname,
omni_unpwd.db_raw_user, omni_unpwd.db_raw_password, log=program.log, program=program.name, ssl=omni_config.dbssl)
omnidb.run_program_queries(stage=1)
ips = select_ips(omnidb, program.log)
cpusnum = omni_config.scan_processes_num if omni_config.scan_processes_num else cpu_count() // 2 - 1
cpusnum = cpusnum if cpusnum>0 else 1
omnidb.close()
scans = {}
scans = scan_ips(omni_config.nmap_map_list, ips, cpusnum, program.log)
omnidb = OmniDB(omni_config.dbtype, omni_config.dbhost, omni_config.dbname,
omni_unpwd.db_raw_user, omni_unpwd.db_raw_password, log=program.log, program=program.name, ssl=omni_config.dbssl)
save_scans(omnidb, ips, scans, program.log)
omnidb.run_program_queries(stage=2)
scripts = select_script_ips(omnidb, program.log)
omnidb.close()
scans = scan_ips(scripts, None, cpusnum, program.log)
omnidb = OmniDB(omni_config.dbtype, omni_config.dbhost, omni_config.dbname,
omni_unpwd.db_raw_user, omni_unpwd.db_raw_password, log=program.log, program=program.name, ssl=omni_config.dbssl)
save_scripts(omnidb, ips, scans, program.log)
omnidb.run_program_queries(stage=3)
services = select_services_ips(omnidb, program.log)
omnidb.close()
scans = scan_ips(services, None, cpusnum, program.log)
omnidb = OmniDB(omni_config.dbtype, omni_config.dbhost, omni_config.dbname,
omni_unpwd.db_raw_user, omni_unpwd.db_raw_password, log=program.log, program=program.name, ssl=omni_config.dbssl)
save_services(omnidb, ips, scans, program.log)
omnidb.run_program_queries(stage=4)
osdetects = select_osdetect_ips(omnidb, program.log)
omnidb.close()
scans = scan_ips(osdetects, None, cpusnum, program.log)
omnidb = OmniDB(omni_config.dbtype, omni_config.dbhost, omni_config.dbname,
omni_unpwd.db_raw_user, omni_unpwd.db_raw_password, log=program.log, program=program.name, ssl=omni_config.dbssl)
save_osdetects(omnidb, ips, scans, program.log)
omnidb.run_program_queries(stage=5)
omnidb.close()
exitcode = 0
except:
program.log.exception('Fatal error')
finally:
return exitcode
if __name__ == "__main__":
sys.exit(main())
|
benhunter/ctf
|
htb/fatty-10.10.10.174/fatty-client/org/springframework/aop/target/SingletonTargetSource.java
|
<reponame>benhunter/ctf
/* */ package org.springframework.aop.target;
/* */
/* */ import java.io.Serializable;
/* */ import org.springframework.aop.TargetSource;
/* */ import org.springframework.util.Assert;
/* */ import org.springframework.util.ObjectUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class SingletonTargetSource
/* */ implements TargetSource, Serializable
/* */ {
/* */ private static final long serialVersionUID = 9031246629662423738L;
/* */ private final Object target;
/* */
/* */ public SingletonTargetSource(Object target) {
/* 53 */ Assert.notNull(target, "Target object must not be null");
/* 54 */ this.target = target;
/* */ }
/* */
/* */
/* */
/* */ public Class<?> getTargetClass() {
/* 60 */ return this.target.getClass();
/* */ }
/* */
/* */
/* */ public Object getTarget() {
/* 65 */ return this.target;
/* */ }
/* */
/* */
/* */
/* */ public void releaseTarget(Object target) {}
/* */
/* */
/* */
/* */ public boolean isStatic() {
/* 75 */ return true;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean equals(Object other) {
/* 85 */ if (this == other) {
/* 86 */ return true;
/* */ }
/* 88 */ if (!(other instanceof SingletonTargetSource)) {
/* 89 */ return false;
/* */ }
/* 91 */ SingletonTargetSource otherTargetSource = (SingletonTargetSource)other;
/* 92 */ return this.target.equals(otherTargetSource.target);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public int hashCode() {
/* 100 */ return this.target.hashCode();
/* */ }
/* */
/* */
/* */ public String toString() {
/* 105 */ return "SingletonTargetSource for target object [" + ObjectUtils.identityToString(this.target) + "]";
/* */ }
/* */ }
/* Location: /home/kali/ctf/htb/fatty-10.10.10.174/ftp/fatty-client.jar!/org/springframework/aop/target/SingletonTargetSource.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
Matir/libcloud
|
libcloud/compute/drivers/kamatera.py
|
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Kamatera node driver
"""
import json
import datetime
import time
from libcloud.utils.py3 import basestring
from libcloud.compute.base import NodeDriver, NodeLocation, NodeSize
from libcloud.compute.base import NodeImage, Node, NodeState
from libcloud.compute.types import Provider
from libcloud.common.base import ConnectionUserAndKey, JsonResponse
class KamateraResponse(JsonResponse):
"""
Response class for KamateraDriver
"""
def parse_error(self):
data = self.parse_body()
if 'message' in data:
return data['message']
else:
return json.dumps(data)
class KamateraConnection(ConnectionUserAndKey):
"""
Connection class for KamateraDriver
"""
host = 'cloudcli.cloudwm.com'
responseCls = KamateraResponse
def add_default_headers(self, headers):
"""Adds headers that are needed for all requests"""
headers['AuthClientId'] = self.user_id
headers['AuthSecret'] = self.key
headers['Accept'] = 'application/json'
headers['Content-Type'] = 'application/json'
return headers
class KamateraNodeDriver(NodeDriver):
"""
Kamatera node driver
:keyword key: API Client ID, required for authentication
:type key: ``str``
:keyword secret: API Secret, required for authentcaiont
:type secret: ``str``
"""
type = Provider.KAMATERA
name = 'Kamatera'
website = 'https://www.kamatera.com/'
connectionCls = KamateraConnection
features = {'create_node': ['password', 'generates_password', 'ssh_key']}
EX_BILLINGCYCLE_HOURLY = 'hourly'
EX_BILLINGCYCLE_MONTHLY = 'monthly'
def list_locations(self):
"""
List available locations for deployment
:rtype: ``list`` of :class:`NodeLocation`
"""
response = self.connection.request('service/server?datacenter=1')
return [self.ex_get_location(
datacenter['id'], datacenter['subCategory'], datacenter['name']
) for datacenter in response.object]
def list_sizes(self, location):
"""
List predefined sizes for the given location.
:param location: Location of the deployment.
:type location: :class:`.NodeLocation`
@inherits: :class:`NodeDriver.list_sizes`
"""
response = self.connection.request(
'service/server?sizes=1&datacenter=%s' % location.id)
return [self.ex_get_size(
size['ramMB'],
size['diskSizeGB'],
size['cpuType'],
size['cpuCores'],
extraDiskSizesGB=[],
monthlyTrafficPackage=size['monthlyTrafficPackage'],
id=size['id']
) for size in response.object]
def list_images(self, location):
"""
List available disk images.
:param location: Location of the deployement.
Available disk images depend on location.
:type location: :class:`.NodeLocation`
:rtype: ``list`` of :class:`NodeImage`
"""
response = self.connection.request(
'service/server?images=1&datacenter=%s' % location.id)
images = []
for image in response.object:
extra = self._copy_dict(('datacenter', 'os', 'code',
'osDiskSizeGB', 'ramMBMin'), image)
images.append(self.ex_get_image(image['name'],
image['id'], extra))
return images
def create_node(self, name, size, image, location, auth=None,
ex_networks=None, ex_dailybackup=False,
ex_managed=False, ex_billingcycle=EX_BILLINGCYCLE_HOURLY,
ex_poweronaftercreate=True,
ex_wait=True):
"""
Creates a Kamatera node.
If auth is not given then password will be generated.
:param name: String with a name for this new node (required)
:type name: ``str``
:param size: The size of resources allocated to this node (required)
:type size: :class:`.NodeSize`
:param image: OS Image to boot on node. (required)
:type image: :class:`.NodeImage`
:param location: Which data center to create a node in. (required)
:type location: :class:`.NodeLocation`
:param auth: Authentication information for the node (optional)
:type auth: :class:`.NodeAuthSSHKey` or :class:`.NodeAuthPassword`
:param ex_networks: Network configurations (optional)
:type ex_networks: ``list`` of ``dict``
:param ex_dailybackup: Whether to create daily backups (optional)
:type ex_dailybackup: ``bool``
:param ex_managed: Whether to provide managed support (optional)
:type ex_managed: ``bool``
:param ex_billingcycle: billing cycle (hourly / monthly) (optional)
:type ex_billingcycle: ``str``
:param ex_poweronaftercreate: power on after creation (optional)
:type ex_poweronaftercreate: ``bool``
:param ex_wait: wait for server to be running (optional)
:type ex_wait: ``bool``
:return: The newly created node.
:rtype: :class:`.Node`
"""
password = None
pubkey = None
generate_password = False
if isinstance(auth, basestring):
password = auth
else:
auth_obj = self._get_and_check_auth(auth)
if getattr(auth_obj, 'generated', False):
password = '__generate__'
generate_password = True
elif hasattr(auth_obj, 'password'):
password = auth_obj.password
generate_password = False
elif hasattr(auth_obj, 'pubkey'):
pubkey = auth_obj.pubkey
if not ex_networks:
ex_networks = [{'name': 'wan', 'ip': 'auto'}]
request_data = {
"name": name,
"password": password or '',
"passwordValidate": password or '',
'ssh-key': pubkey or '',
"datacenter": location.id,
"image": image.id,
"cpu": '%s%s' % (size.extra['cpuCores'], size.extra['cpuType']),
"ram": size.ram,
"disk": ' '.join([
'size=%d' % disksize for disksize
in [size.disk] + size.extra['extraDiskSizesGB']]),
"dailybackup": 'yes' if ex_dailybackup else 'no',
"managed": 'yes' if ex_managed else 'no',
"network": ' '.join([','.join([
'%s=%s' % (k, v) for k, v
in network.items()]) for network in ex_networks]),
"quantity": 1,
"billingcycle": ex_billingcycle,
"monthlypackage": size.extra['monthlyTrafficPackage'] or '',
"poweronaftercreate": 'yes' if ex_poweronaftercreate else 'no'
}
response = self.connection.request('service/server', method='POST',
data=json.dumps(request_data))
if generate_password:
command_ids = response.object['commandIds']
generated_password = response.object['password']
else:
command_ids = response.object
generated_password = None
if len(command_ids) != 1:
raise RuntimeError('invalid response')
node = self.ex_get_node(
name=name, size=size, image=image, location=location,
dailybackup=ex_dailybackup, managed=ex_managed,
billingcycle=ex_billingcycle,
generated_password=<PASSWORD>,
create_command_id=command_ids[0],
poweronaftercreate=ex_poweronaftercreate)
if ex_wait:
if (
'create_command_id' not in node.extra
or node.state != NodeState.UNKNOWN
):
raise ValueError('invalid node for updating create status')
command = self.ex_wait_command(node.extra['create_command_id'])
node.extra['create_log'] = command.get('log')
if node.extra.get('poweronaftercreate'):
node.state = NodeState.RUNNING
else:
node.state = NodeState.STOPPED
if command.get('completed'):
node.created_at = datetime.datetime.strptime(
command['completed'], '%Y-%m-%d %H:%M:%S')
name_lines = [line for line
in node.extra['create_log'].split("\n")
if line.startswith('Name: ')]
if len(name_lines) != 1:
raise RuntimeError('Invalid node create log response')
node.name = name_lines[0].replace('Name: ', '')
response = self.connection.request(
'/service/server/info', method='POST',
data=json.dumps({'name': node.name}))
self._update_node_from_server_info(node, response.object[0])
return node
def list_nodes(self, ex_name_regex=None, ex_full_details=False,
ex_id=None):
"""
List nodes
:param ex_name_regex: Regular expression to match node names
if set returns full node details (optional)
:type ex_name_regex: ``str``
:param ex_full_details: Whether to return full node details
takes longer to complete (optional)
:type ex_full_details: ``bool``
:return: List of node objects
:rtype: ``list`` of :class:`Node`
"""
if ex_name_regex or ex_full_details or ex_id:
request_data = {}
if ex_id:
request_data['id'] = ex_id
else:
if not ex_name_regex:
ex_name_regex = '.*'
request_data['name'] = ex_name_regex
response = self.connection.request(
'/service/server/info', method='POST',
data=json.dumps(request_data))
return [self._update_node_from_server_info(
self.ex_get_node(), server) for server in response.object]
else:
response = self.connection.request('/service/servers')
return [
self.ex_get_node(
id=server['id'], name=server['name'],
state=(
NodeState.RUNNING if server['power'] == 'on'
else NodeState.STOPPED),
location=self.ex_get_location(server['datacenter'])
) for server in response.object]
def reboot_node(self, node, ex_wait=True):
"""
Reboot the given node
:param node: the node to reboot
:type node: :class:`Node`
:param ex_wait: wait for reboot to complete (optional)
:type ex_wait: ``bool``
:rtype: ``bool``
"""
return self.ex_node_operation(node, 'reboot', ex_wait)
def destroy_node(self, node, ex_wait=True):
"""
Destroy the given node
:param node: the node to destroy
:type node: :class:`Node`
:param ex_wait: wait for destroy to complete (optional)
:type ex_wait: ``bool``
:rtype: ``bool``
"""
return self.ex_node_operation(node, 'terminate', ex_wait)
def stop_node(self, node, ex_wait=True):
"""
Stop the given node
:param node: the node to stop
:type node: :class:`Node`
:param ex_wait: wait for stop to complete (optional)
:type ex_wait: ``bool``
:rtype: ``bool``
"""
return self.ex_node_operation(node, 'poweroff', ex_wait)
def start_node(self, node, ex_wait=True):
"""
Start the given node
:param node: the node to start
:type node: :class:`Node`
:param ex_wait: wait for start to complete (optional)
:type ex_wait: ``bool``
:rtype: ``bool``
"""
return self.ex_node_operation(node, 'poweron', ex_wait)
def ex_node_operation(self, node, operation, wait=True):
"""
Run custom operations on the node
:param node: the node to run operation on
:type node: :class:`Node`
:param operation: the operation to run
:type operation: ``str``
:param ex_wait: wait for destroy to complete (optional)
:type ex_wait: ``bool``
:rtype: ``bool``
"""
if node.id:
request_data = {'id': node.id}
elif node.name:
request_data = {'name': node.name}
else:
raise ValueError('Invalid node for %s node operation: '
'missing id / name' % operation)
if operation == 'terminate':
request_data['force'] = True
command_id = self.connection.request(
'/service/server/%s' % operation, method='POST',
data=json.dumps(request_data)).object[0]
if wait:
self.ex_wait_command(command_id)
else:
node.extra['%s_command_id' % operation] = command_id
return True
def ex_get_location(self, id, name=None, country=None):
"""
Get a NodeLocation object to use for other methods
:param id: Location ID - uppercase letters code (required)
:type id: ``str``
:param name: Location Name (optional)
:type name: ``str``
:param name: Location country (optional)
:type name: ``str``
:rtype: :class:`.NodeLocation`
"""
return NodeLocation(id=id, name=name, country=country, driver=self)
def ex_get_size(self, ramMB, diskSizeGB, cpuType, cpuCores,
extraDiskSizesGB=None, monthlyTrafficPackage=None,
id=None, name=None):
"""
Get a NodeSize object to use for other methods
:param ramMB: Amount of RAM to allocate in MB (required)
:type ramMB: ``int``
:param diskSizeGB: disk size GB for primary hard disk (required)
:type diskSizeGB: ``int``
:param cpuType: CPU type ID (single uppercase letter),
see ex_list_capabilities (required)
:type cpuType: ``str``
:param cpuCores: Number of CPU cores to allocate (required)
:type cpuCores: ``int``
:param extraDiskSizesGB: additional disk sizes in GB (optional)
:type extraDiskSizesGB: ``list`` of :int:
:param monthlyTrafficPackage: ID of monthly traffic package
see ex_list_capabilities (optional)
:type monthlyTrafficPackage: ``str``
:param id: Size ID (optional)
:type id: ``str``
:param name: Size Name (optional)
:type name: ``str``
:rtype: :class:`.NodeLocation`
"""
if not id:
id = str(cpuCores) + cpuType
id += '-' + str(ramMB) + 'MB-' + str(diskSizeGB) + 'GB'
if monthlyTrafficPackage:
id += '-' + monthlyTrafficPackage
if not name:
name = id
return NodeSize(
id=id,
name=name,
ram=ramMB,
disk=diskSizeGB,
bandwidth=0,
price=0,
driver=self.connection.driver,
extra={
'cpuType': cpuType,
'cpuCores': cpuCores,
'monthlyTrafficPackage': monthlyTrafficPackage,
'extraDiskSizesGB': extraDiskSizesGB or []
}
)
def ex_get_image(self, name=None, id=None, extra=None):
if not id and not name:
raise ValueError('either id or name are required for NodeImage')
return NodeImage(id=id or name,
name=name or '', driver=self, extra=extra or {})
def ex_list_capabilities(self, location):
"""
List capabilities for given location.
:param location: Location of the deployment.
:type location: :class:`.NodeLocation`
:return: ``dict``
"""
return self.connection.request(
'service/server?capabilities=1&'
'datacenter=%s' % location.id).object
def ex_wait_command(self, command_id, timeout_seconds=600,
poll_interval_seconds=2):
"""
Wait for command to complete and return the command status details
:param command_id: Command ID to wait for. (required)
:type command_id: ``int``
:param timeout_seconds: Max seconds to wait for command. (optional)
:type timeout_seconds: ``int``
:param poll_interval_seconds: Poll interval in seconds (optional)
:type poll_interval_seconds: ``int``
:return: ``dict``
"""
start_time = datetime.datetime.now()
time.sleep(poll_interval_seconds)
while True:
max_time = start_time + datetime.timedelta(
seconds=timeout_seconds)
if max_time < datetime.datetime.now():
raise TimeoutError(
'Timeout waiting for command '
'(timeout_seconds=%s, command_id=%s)' % (
str(timeout_seconds), str(command_id)))
time.sleep(poll_interval_seconds)
command = self.ex_get_command_status(command_id)
status = command.get('status')
if status == 'complete':
return command
elif status == 'error':
raise RuntimeError('Command failed: ' + command.get('log'))
def ex_get_command_status(self, command_id):
"""
Get Kamatera command status details
:param command_id: Command ID to get details for. (required)
:type command_id: ``int``
:return: ``dict``
"""
response = self.connection.request(
'/service/queue?id=' + str(command_id))
if len(response.object) != 1:
raise RuntimeError('invalid response')
return response.object[0]
def ex_get_node(self, id=None, name=None, state=NodeState.UNKNOWN,
public_ips=None, private_ips=None, size=None,
image=None, created_at=None, location=None,
dailybackup=None, managed=None, billingcycle=None,
generated_password=<PASSWORD>, create_command_id=None,
poweronaftercreate=None):
"""
Get a Kamatera node object.
:param id: Node ID (optional)
:type id: ``str``
:param name: Node name (optional)
:type name: ``str``
:param state: Node state (optional)
:type state: :class:`libcloud.compute.types.NodeState`
:param public_ips: Node public IPS. (optional)
:type public_ips: ``list`` of :str:
:param private_ips: Node private IPS. (optional)
:type private_ips: ``list`` of :str:
:param size: node size. (optional)
:type size: :class:`.NodeSize`
:param image: Node OS Image. (optional)
:type image: :class:`.NodeImage`
:param created_at: Node creation time. (optional)
:type created_at: ``datetime.datetime``
:param location: Node datacenter. (optional)
:type location: :class:`.NodeLocation`
:param dailybackup: create daily backups for the node (optional)
:type dailybackup: ``bool``
:param managed: provide managed support for the node (optional)
:type managed: ``bool``
:param billingcycle: billing cycle (hourly / monthly) (optional)
:type billingcycle: ``str``
:param generated_password: server generated password (optional)
:type generated_password: ``str``
:param create_command_id: creation task command ID (optional)
:type create_command_id: ``int``
:param poweronaftercreate: power on the node after create (optional)
:type poweronaftercreate: ``bool``
:return: The node.
:rtype: :class:`.Node`
"""
extra = {}
if location:
extra['location'] = location
if dailybackup is not None:
extra['dailybackup'] = dailybackup
if managed is not None:
extra['managed'] = managed
if billingcycle is not None:
extra['billingcycle'] = billingcycle
if generated_password is not None:
extra['generated_password'] = <PASSWORD>
if create_command_id is not None:
extra['create_command_id'] = create_command_id
if poweronaftercreate is not None:
extra['poweronaftercreate'] = poweronaftercreate
return Node(id=id, name=name, state=state, public_ips=public_ips,
private_ips=private_ips, driver=self,
size=size, image=image, created_at=created_at,
extra=extra)
def _copy_dict(self, keys, d):
extra = {}
for key in keys:
extra[key] = d[key]
return extra
def _update_node_from_server_info(self, node, server):
node.id = server['id']
node.name = server['name']
if server['power'] == 'on':
node.state = NodeState.RUNNING
else:
node.state = NodeState.STOPPED
for network in server.get('networks', []):
if network.get('network').startswith('wan-'):
node.public_ips += network.get('ips', [])
else:
node.private_ips += network.get('ips', [])
billing = server.get('billing',
node.extra.get('billingcycle')).lower()
if billing == self.EX_BILLINGCYCLE_HOURLY:
node.extra['billingcycle'] = self.EX_BILLINGCYCLE_HOURLY
node.extra['priceOn'] = server.get('priceHourlyOn')
node.extra['priceOff'] = server.get('priceHourlyOff')
else:
node.extra['billingcycle'] = self.EX_BILLINGCYCLE_MONTHLY
node.extra['priceOn'] = server.get('priceMonthlyOn')
node.extra['priceOff'] = server.get('priceMonthlyOn')
node.extra['location'] = self.ex_get_location(server['datacenter'])
node.extra['dailybackup'] = server.get('backup') == "1"
node.extra['managed'] = server.get('managed') == "1"
return node
|
netsec-ethz/netsec-scion
|
go/co/reservation/types.go
|
// Copyright 2020 ETH Zurich, Anapaya Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package reservation
// Capacities describes what a capacity description must offer.
type Capacities interface {
IngressInterfaces() []uint16
EgressInterfaces() []uint16
CapacityIngress(ingress uint16) uint64
CapacityEgress(egress uint16) uint64
}
type SerializeOptions int
const (
SerializeImmutable = iota // only immutable fields
SerializeSemiMutable // only semi-immutable fields (e.g. allocation trail)
SerializeMutable // all fields, including e.g. path's current step
)
|
Haozhe321/main
|
src/test/java/seedu/room/logic/commands/DeleteByTagCommandTest.java
|
<reponame>Haozhe321/main
package seedu.room.logic.commands;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static seedu.room.logic.commands.CommandTestUtil.assertCommandFailure;
import static seedu.room.logic.commands.CommandTestUtil.assertCommandSuccess;
import static seedu.room.testutil.TypicalPersons.getTypicalResidentBook;
import org.junit.Test;
import seedu.room.commons.core.Messages;
import seedu.room.commons.exceptions.IllegalValueException;
import seedu.room.logic.CommandHistory;
import seedu.room.logic.UndoRedoStack;
import seedu.room.logic.commands.exceptions.CommandException;
import seedu.room.model.Model;
import seedu.room.model.ModelManager;
import seedu.room.model.UserPrefs;
import seedu.room.model.tag.Tag;
//@@author Haozhe321
public class DeleteByTagCommandTest {
private Model model = new ModelManager(getTypicalResidentBook(), new UserPrefs());
@Test
public void execute_validTag_success() throws IllegalValueException, CommandException {
String tagToDelete = "friends";
Tag tag = new Tag(tagToDelete);
DeleteByTagCommand deleteByTagCommand = prepareCommand(tagToDelete);
String expectedMessage = String.format(DeleteByTagCommand.MESSAGE_DELETE_PERSON_SUCCESS, tag);
ModelManager expectedModel = new ModelManager(model.getResidentBook(), new UserPrefs());
expectedModel.deleteByTag(tag);
assertCommandSuccess(deleteByTagCommand, model, expectedMessage, expectedModel);
}
@Test
public void execute_invalidTag_throwsCommandException() throws IllegalValueException, CommandException {
String tagToDelete = "thisTagDoesNotExist";
Tag tag = new Tag(tagToDelete);
DeleteByTagCommand deleteByTagCommand = prepareCommand(tagToDelete);
assertCommandFailure(deleteByTagCommand, model, Messages.MESSAGE_INVALID_TAG_FOUND);
}
@Test
public void equals() throws IllegalValueException {
DeleteByTagCommand deleteByTagFirstCommand = new DeleteByTagCommand("friends");
DeleteByTagCommand deleteByTagSecondCommand = new DeleteByTagCommand("friends");
// same object -> returns true
assertTrue(deleteByTagFirstCommand.equals(deleteByTagSecondCommand));
// different types -> returns false
assertFalse(deleteByTagFirstCommand.equals(1));
// null -> returns false
assertFalse(deleteByTagFirstCommand.equals(null));
}
/**
* Returns a {@code DeleteByTagCommand} with the parameter {@code index}.
*/
private DeleteByTagCommand prepareCommand(String tagName) throws IllegalValueException {
DeleteByTagCommand deleteByTagCommand = new DeleteByTagCommand(tagName);
deleteByTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());
return deleteByTagCommand;
}
}
|
Thamsta/masterportal-qrcode
|
modules/controls/freeze/freezewindowview.js
|
import FreezeTemplate from "text-loader!./template.html";
const FreezeView = Backbone.View.extend({
events: {
"click .freeze-view-close": "hideFreezeWin"
},
initialize: function () {
this.render();
},
collection: {},
id: "freeze-view",
className: "freeze-view freeze-deactivated",
template: _.template(FreezeTemplate),
render: function () {
$(this.$el).html(this.template());
$(".lgv-container").append(this.$el);
return this;
},
showFreezeWin: function () {
$("div.freeze-view").removeClass("freeze-deactivated");
$("div.freeze-view").addClass("freeze-activated");
if ($(".table-nav-main").length === 0) {
$("p.freeze-view-close").css("left", "30px");
$("p.freeze-view-close").css("top", "30px");
}
else {
$("p.freeze-view-close").css("left", $(".table-nav-main").offset().left);
$("p.freeze-view-close").css("top", $(".table-nav-main").offset().top);
}
},
hideFreezeWin: function () {
$("div.freeze-view").removeClass("freeze-activated");
$("div.freeze-view").addClass("freeze-deactivated");
}
});
export default FreezeView;
|
phasenraum2010/twitterwall3
|
twitterwall2/src/main/java/org/woehlke/twitterwall/backend/service/persist/StoreUserProfileForScreenName.java
|
<reponame>phasenraum2010/twitterwall3
package org.woehlke.twitterwall.backend.service.persist;
import org.woehlke.twitterwall.oodm.model.User;
import org.woehlke.twitterwall.oodm.model.Task;
/**
* Created by tw on 11.07.17.
*/
public interface StoreUserProfileForScreenName {
User storeUserProfileForScreenName(String screenName, Task task);
}
|
swipswaps/autoEdit_2
|
lib/app/router_paperedit.js
|
<gh_stars>100-1000
'use strict';
var $ = require('jquery');
var Backbone = require('backbone');
var PapereditListView = require('./views/paperedit_list_view');
var PapereditFormView = require('./views/paperedit_form_view');
var PapereditView = require('./views/paperedit_view');
var Paperedit = require('./models/paperedit');
var Paperedits = require('./collections/paperedits');
var render = require('./views/utils').render;
// Transcriptions collection for paperedit show
var Transcriptions = require('./collections/transcriptions');
/**
* Render a string or view to the main container on the page
* @param {(Object|String)} string_or_view A string or backbone view
**/
function displayMain(string_or_view) {
var content;
if (typeof string_or_view === 'string') {
content = string_or_view;
} else {
content = string_or_view.el;
string_or_view.render();
}
$('#main').html(content);
}
/**
* Paperedits application router
*/
module.exports = Backbone.Router.extend({
routes: {
// '': 'index',
'paperedits': 'papereditsList',
'paperedits/new': 'newPaperedit',
'paperedit/:id': 'showPaperedit',
'paperedit/:id/edit': 'editPaperedit'
},
initialize: function() {
console.debug('PAPEREDIT Router: INITIALIZED ROUTER');
// Setup canonical paperedits collection
this.papereditsList = new Paperedits();
},
// TODO: router not going to default page
// index: function() {
// displayMain(render('welcome'));
// },
papereditsList: function() {
var self = this;
console.debug('Router: Paperedits list');
if ( typeof this.papereditsListView === 'undefined' ) {
this.papereditsListView = new PapereditListView({collection: this.papereditsList});
}
this.papereditsList.fetch({success: function() {
displayMain(self.papereditsListView);
}});
},
newPaperedit: function() {
console.debug('Router: new paperedit');
// creating a paperedit object, here could add default values such as
// {title: "Video Interview "+getTimeNow(), description: getTimeNow()}
var newPaperedit = new Paperedit({title: '', description: ''});
var newPapereditFormView = new PapereditFormView({model: newPaperedit});
// rendering in view
displayMain(newPapereditFormView);
},
showPaperedit: function(cid) {
var tmpPaperedit = this.papereditsList.get({'cid': cid});
console.debug('Router: showPaperedit', cid, tmpPaperedit.attributes.title);
this.transcriptionsList = new Transcriptions();
this.transcriptionsList.fetch({success: function(collection, transciptions, errors) {
console.debug("paperedit router",collection,collection.models, transciptions, errors);
//using collection.toJSON(), becuase that way I get the models as attributes, and the colleciton is sorted.
//if I uses the returned `transcriptions` they are not sorted.
var tmpPapereditView = new PapereditView({model: tmpPaperedit, transciptions: collection.toJSON(), transcriptionCollection: collection.sort() });
displayMain(tmpPapereditView);
}});
},
//TODO: not currently implements. eg nothing links to it.
editPaperedit: function(id) {
console.debug('Router: editPaperedit: ' + id);
var tmpEditPaperedit = this.papereditsList.get({'cid': id});
var editPapereditFormView = new PapereditFormView({model: tmpEditPaperedit});
displayMain(editPapereditFormView);
},
notFound: function() {
console.error('Not found');
displayMain(render('404'));
alert('Not found');
}
});
|
ttstringiot/golangiot
|
stgbroker/config_manager.go
|
<filename>stgbroker/config_manager.go
package stgbroker
import (
"github.com/ttstringiot/golangiot/stgcommon"
"github.com/ttstringiot/golangiot/stgcommon/logger"
"github.com/ttstringiot/golangiot/stgcommon/utils"
"github.com/toolkits/file"
"strings"
"sync"
)
type ConfigManager interface {
Encode(prettyFormat bool) string
Decode(jsonString []byte)
ConfigFilePath() string
}
type ConfigManagerExt struct {
ConfigManager ConfigManager
sync.RWMutex
}
func NewConfigManagerExt(configManager ConfigManager) *ConfigManagerExt {
return &ConfigManagerExt{
ConfigManager: configManager,
}
}
func (cme *ConfigManagerExt) Load() bool {
fileName := cme.ConfigManager.ConfigFilePath()
if !file.IsExist(fileName) {
// 第一次启动服务,如果topic.json、subscriptionGroup.json、consumerOffset.json之类的文件不存在,则创建之
ok, err := stgcommon.CreateFile(fileName)
if err != nil {
logger.Errorf("create %s failed. err: %s", fileName, err.Error())
return false
}
if !ok {
logger.Errorf("create %s failed, unknown reason.", fileName)
return false
}
logger.Infof("create %s successful", fileName)
}
buf, err := file.ToBytes(fileName)
if err != nil {
logger.Errorf("read file err: %s", err.Error())
return false
}
cme.ConfigManager.Decode(buf)
return true
}
func (cme *ConfigManagerExt) Persist() {
cme.Lock()
defer cme.Unlock()
defer utils.RecoveredFn()
buf := strings.TrimSpace(cme.ConfigManager.Encode(true))
if buf == "" {
logger.Warnf("configManagerExt nothing to persist")
return
}
fileName := cme.ConfigManager.ConfigFilePath()
stgcommon.String2File([]byte(buf), fileName)
}
|
axismaps/ridership
|
src/js/getComponents/getLegend.js
|
import Legend from '../legend/legend';
import exportMethods from '../export/exportMethods';
const getLegend = ({ state, data }) => new Legend({
legendOn: state.get('scale') === 'national' && !state.get('embedded'),
container: d3.select('.footer__atlas-legend'),
exportMethods,
nationalMapData: state.getCurrentNationalMapData(),
indicator: state.get('indicator'),
years: state.get('years'),
});
export default getLegend;
|
Symphoomc1f/krexusj
|
back/src/main/java/com/java110/things/entity/machine/MachineCmdDto.java
|
<filename>back/src/main/java/com/java110/things/entity/machine/MachineCmdDto.java
package com.java110.things.entity.machine;
import com.java110.things.entity.PageDto;
import java.io.Serializable;
/**
* @ClassName MachineDto
* @Description TODO
* @Author wuxw
* @Date 2020/5/10 23:33
* @Version 1.0
* add by wuxw 2020/5/10
**/
public class MachineCmdDto extends PageDto implements Serializable {
private String cmdId;
private String machineId;
private String machineCode;
private String machineTypeCd;
private String communityId;
private String cmdCode;
private String cmdName;
private String state;
private String createTime;
private String readTime;
private String finishTime;
private String objType;
private String objTypeValue;
public String getCmdId() {
return cmdId;
}
public void setCmdId(String cmdId) {
this.cmdId = cmdId;
}
public String getMachineId() {
return machineId;
}
public void setMachineId(String machineId) {
this.machineId = machineId;
}
public String getMachineCode() {
return machineCode;
}
public void setMachineCode(String machineCode) {
this.machineCode = machineCode;
}
public String getMachineTypeCd() {
return machineTypeCd;
}
public void setMachineTypeCd(String machineTypeCd) {
this.machineTypeCd = machineTypeCd;
}
public String getCommunityId() {
return communityId;
}
public void setCommunityId(String communityId) {
this.communityId = communityId;
}
public String getCmdCode() {
return cmdCode;
}
public void setCmdCode(String cmdCode) {
this.cmdCode = cmdCode;
}
public String getCmdName() {
return cmdName;
}
public void setCmdName(String cmdName) {
this.cmdName = cmdName;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getReadTime() {
return readTime;
}
public void setReadTime(String readTime) {
this.readTime = readTime;
}
public String getFinishTime() {
return finishTime;
}
public void setFinishTime(String finishTime) {
this.finishTime = finishTime;
}
public String getObjType() {
return objType;
}
public void setObjType(String objType) {
this.objType = objType;
}
public String getObjTypeValue() {
return objTypeValue;
}
public void setObjTypeValue(String objTypeValue) {
this.objTypeValue = objTypeValue;
}
}
|
Roman16/example-editor
|
app/components/separate-by-commas/format-directive.js
|
<gh_stars>0
;(function () {
'use strict';
angular.module('directive.format', [])
// .directive('format', format)
.directive('format', format)
.filter('replaceComma', [
function () {
return function(number) {
var splitNum;
if(number) {
for (var i = 0; i < number.length; i++) {
if (number[i] === '.') {
number = number.replace('.', '')
}
}
if ((number.toString()).indexOf(',')) {
number = parseFloat((number.toString()).replace(',', '.'));
}
number = Math.abs(number);
number = number.toFixed(2);
splitNum = number.split('.');
splitNum[0] = splitNum[0].replace(/\B(?=(\d{3})+(?!\d))/g, ".");
return splitNum.join(",");
} else {
return number;
}
}
}
])
.filter('decimal2comma', [
function () {
return function (input) {
var ret = (input) ? input.toString().replace(".", ",") : null;
if (ret) {
var decArr = ret.split(",");
if (decArr.length > 1) {
var dec = decArr[1].length;
if (dec === 1) {
ret += "0";
}
}
}
return ret;
};
}
]);
format.$inject = ['$filter'];
function format($filter) {
return {
require: '?ngModel',
link: function (scope, elem, attrs, ctrl) {
if (!ctrl) return;
ctrl.$formatters.unshift(function (a) {
if (ctrl.$modelValue ) {
return ($filter('replaceComma')(ctrl.$modelValue, ''));
} else {
return '0,00'
}
});
elem.bind('blur', function (event) {
var count = 0;
var plainNumber = elem.val();
// var plainNumber = elem.val().replace(/[^\d|\-+|\.+]/g, '');
if (plainNumber ) {
elem.val(($filter('replaceComma')(plainNumber)));
} else {
elem.val('0,00')
}
});
}
};
}
})();
|
mmb/meme_captain_web
|
db/migrate/20130102044216_create_captions.rb
|
<gh_stars>10-100
class CreateCaptions < ActiveRecord::Migration[4.2]
def change
create_table :captions do |t|
t.string :text
t.string :font
t.float :top_left_x_pct
t.float :top_left_y_pct
t.float :width_pct
t.float :height_pct
t.references :gend_image
t.timestamps
end
add_index :captions, :gend_image_id
end
end
|
wdlkmpx/fsp
|
bsd_src/ls.c
|
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME>.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#include "tweak.h"
#include "bsd_extern.h"
#include "client_def.h"
#include "c_extern.h"
#include <sys/ioctl.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "my-string.h"
#include "ls.h"
static char path[2*1024 + 1];
static char *endofpath = path;
typedef int (*COMPAR)(const void *, const void *);
int (*sortfcn)(LS *, LS *);
void (*printfcn)(LS *, int);
int termwidth = 80; /* default terminal width */
/* flags */
int f_accesstime; /* use time of last access */
int f_column; /* columnated format */
int f_group; /* show group ownership of a file */
int f_ignorelink; /* indirect through symbolic link operands */
int f_inode; /* print inode */
int f_kblocks; /* print size in kilobytes */
int f_listalldot; /* list . and .. as well */
int f_listdir; /* list actual directory, not contents */
int f_listdot; /* list files beginning with . */
int f_longform; /* long listing format */
int f_needstat; /* if need to stat files */
int f_newline; /* if precede with newline */
int f_nonprint; /* show unprintables as ? */
int f_nosort; /* don't sort output */
int f_recursive; /* ls subdirectories also */
int f_reversesort; /* reverse whatever sort is used */
int f_singlecol; /* use single column output */
int f_size; /* list size in short listing */
int f_statustime; /* use time of last mode change */
int f_dirname; /* if precede with directory name */
int f_timesort; /* sort by time vice name */
int f_total; /* if precede with "total" line */
int f_type; /* add type character for non-regular files */
static int tabdir (LS * lp, LS ** s_stats)
{
register RDIR *dirp;
register int cnt, maxentry, maxlen;
register char *p;
struct rdirent *dp;
unsigned long blocks;
LS *stats;
if (!(dirp = util_opendir("."))) {
perror(lp->name);
return(0);
}
blocks = maxentry = maxlen = 0;
stats = NULL;
for (cnt = 0; (dp = util_readdir(dirp));) {
/* this does -A and -a */
p = dp->d_name;
if (p[0] == '.') {
if (!f_listdot) continue;
if (!f_listalldot && (!p[1] || (p[1] == '.' && !p[2]))) continue;
}
if (cnt == maxentry) {
#define DEFNUM 256
maxentry += DEFNUM;
if(stats) {
*s_stats = stats = (LS *)realloc((char *)stats,
(unsigned int)maxentry * sizeof(LS));
if (!*s_stats) nomem();
} else {
*s_stats = stats = (LS *)malloc((unsigned int)maxentry * sizeof(LS));
if (!*s_stats) nomem();
}
}
if (f_needstat && util_stat(dp->d_name, &stats[cnt].lstat)) {
/*
* don't exit -- this could be an NFS mount that has
* gone away. Flush stdout so the messages line up.
*/
(void)fflush(stdout);
perror(dp->d_name);
continue;
}
stats[cnt].name = dp->d_name;
/*
* get the inode from the directory, so the -f flag
* works right.
*/
stats[cnt].lstat.st_ino = dp->d_fileno;
/* save name length for -C format */
stats[cnt].len = dp->d_namlen;
/* calculate number of blocks if -l/-s formats */
if (f_longform || f_size) blocks += (stats[cnt].lstat.st_size+1023)/1024;
/* save max length if -C format */
if (f_column && maxlen < (int)dp->d_namlen) maxlen = dp->d_namlen;
++cnt;
}
(void)util_closedir(dirp);
if (cnt) {
stats[0].lstat.st_btotal = blocks;
stats[0].lstat.st_maxlen = maxlen;
} else if (stats) {
(void)free((char *)stats);
}
return(cnt);
}
static void displaydir (LS *, register int);
static void subdir (LS * lp)
{
LS *stats;
int num;
if (f_newline) (void)putchar('\n');
if (f_dirname) (void)printf("%s:\n", path);
if (util_cd2(lp->name)) {
perror(lp->name);
return;
}
if ( (num = tabdir(lp, &stats))) {
displaydir(stats, num);
(void)free((char *)stats);
}
if (util_cd2("..")) {
perror("..");
ls_bad(1);
}
}
static void displaydir (LS * stats, register int num)
{
register char *p, *savedpath;
LS *lp;
if (num > 1 && !f_nosort) {
unsigned long save1, save2;
save1 = stats[0].lstat.st_btotal;
save2 = stats[0].lstat.st_maxlen;
qsort((char *)stats, num, sizeof(LS), (COMPAR) sortfcn);
stats[0].lstat.st_btotal = save1;
stats[0].lstat.st_maxlen = save2;
}
printfcn(stats, num);
if (f_recursive)
{
savedpath = endofpath;
for (lp = stats; num--; ++lp)
{
if (!(S_ISDIR(lp->lstat.st_mode)))
continue;
p = lp->name;
if (p[0] == '.' && (!p[1] || (p[1] == '.' && !p[2]))) continue;
if (endofpath != path && endofpath[-1] != '/') *endofpath++ = '/';
for (; (*endofpath = *p++); ++endofpath);
f_newline = f_dirname = f_total = 1;
subdir(lp);
*(endofpath = savedpath) = '\0';
}
}
}
static void doargs (int argc, char ** argv)
{
register LS *dstatp, *rstatp;
register int cnt, dircnt, dirmax, maxlen, regcnt, regmax;
LS *dstats, *rstats;
struct stat sb;
char top[2*1024 + 1], **av, *av2[2];
unsigned long blocks;
RDIR * dl;
/*
* walk through the operands, building separate arrays of LS
* structures for directory and non-directory files.
*/
dstats = rstats = NULL;
dirmax = regmax = 0;
/* disable use of new CC_STAT command for performance reasons */
statworks = 0;
for (dircnt = regcnt = 0; *argv; ++argv) {
if(!(av = bsdglob(*argv))) {
av = av2;
av2[0] = *argv;
av2[1] = 0;
}
for( ; *av; av++) {
if (util_stat(*av, &sb)) {
perror(*av);
if (errno == ENOENT) continue;
ls_bad(1);
}
if ((S_ISDIR(sb.st_mode)) && !f_listdir) {
if(dirmax == dircnt) {
dirmax += 10;
if (!dstats) {
dstatp = dstats = (LS *)emalloc(dirmax * (sizeof(LS)));
} else {
dstats = (LS *)realloc(dstats, dirmax * (sizeof(LS)));
dstatp = dstats + dircnt;
}
}
dstatp->name = *av;
dstatp->lstat = sb;
++dstatp;
++dircnt;
} else {
if(regmax == regcnt) {
regmax += 10;
if (!rstats) {
blocks = 0;
maxlen = -1;
rstatp = rstats = (LS *)emalloc(regmax * (sizeof(LS)));
} else {
rstats = (LS *)realloc(rstats, regmax * (sizeof(LS)));
rstatp = rstats + regcnt;
}
}
rstatp->name = *av;
rstatp->lstat = sb;
/* save name length for -C format */
rstatp->len = strlen(*av);
if (f_nonprint) prcopy(*av, *av, rstatp->len);
/* calculate number of blocks if -l/-s formats */
if (f_longform || f_size) blocks += (sb.st_size + 1023)/1024;
/* save max length if -C format */
if (f_column && maxlen < rstatp->len) maxlen = rstatp->len;
++rstatp;
++regcnt;
}
}
}
/* display regular files */
if (regcnt) {
rstats[0].lstat.st_btotal = blocks;
rstats[0].lstat.st_maxlen = maxlen;
displaydir(rstats, regcnt);
f_newline = f_dirname = 1;
}
/* display directories */
if (dircnt) {
register char *p;
f_total = 1;
if (dircnt > 1) {
(void)util_getwd(top);
qsort((char *)dstats, dircnt, sizeof(LS), (COMPAR) sortfcn);
f_dirname = 1;
}
for (cnt = 0; cnt < dircnt; ++dstats) {
for (endofpath = path, p = dstats->name;
(*endofpath = *p++); ++endofpath);
subdir(dstats);
f_newline = 1;
if (++cnt < dircnt && util_cd2(top)) {
perror(top);
ls_bad(1);
}
}
}
}
void fls_main (int argc, char ** argv)
{
int ch;
char *p;
/* terminal defaults to -Cq, non-terminal defaults to -1 */
if (isatty(1)) {
f_nonprint = 1;
termwidth = 80;
#ifdef TIOCGWINSZ
{
struct winsize win;
if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
if ( (p = (char *)getenv("COLUMNS"))) termwidth = atoi(p);
} else termwidth = win.ws_col;
}
#endif
f_column = 1;
} else f_singlecol = 1;
/* root is -A automatically */
if (!getuid()) f_listdot = 1;
while ((ch = getopt(argc, argv, "1ACFLRacdfgiklqrstu")) != EOF) {
switch (ch) {
/*
* -1, -C and -l all override each other
* so shell aliasing works right
*/
case '1':
f_singlecol = 1;
f_column = f_longform = 0;
break;
case 'C':
f_column = 1;
f_longform = f_singlecol = 0;
break;
case 'l':
f_longform = 1;
f_column = f_singlecol = 0;
break;
/* -c and -u override each other */
case 'c':
f_statustime = 1;
f_accesstime = 0;
break;
case 'u':
f_accesstime = 1;
f_statustime = 0;
break;
case 'F':
f_type = 1;
break;
case 'L':
f_ignorelink = 1;
break;
case 'R':
f_recursive = 1;
break;
case 'a':
f_listalldot = 1;
/* FALLTHROUGH */
case 'A':
f_listdot = 1;
break;
case 'd':
f_listdir = 1;
break;
case 'f':
f_nosort = 1;
break;
case 'g':
f_group = 1;
break;
case 'i':
f_inode = 1;
break;
case 'k':
f_kblocks = 1;
break;
case 'q':
f_nonprint = 1;
break;
case 'r':
f_reversesort = 1;
break;
case 's':
f_size = 1;
break;
case 't':
f_timesort = 1;
break;
case '?':
default:
usage();
}
}
argc -= optind;
argv += optind;
/* -d turns off -R */
if (f_listdir)
f_recursive = 0;
/* if need to stat files */
f_needstat = f_longform || f_recursive || f_timesort || f_size || f_type;
/* select a sort function */
if (f_reversesort) {
if (!f_timesort) sortfcn = revnamecmp;
else if (f_accesstime) sortfcn = revacccmp;
else if (f_statustime) sortfcn = revstatcmp;
else sortfcn = revmodcmp; /* use modification time */
} else {
if (!f_timesort) sortfcn = namecmp;
else if (f_accesstime) sortfcn = acccmp;
else if (f_statustime) sortfcn = statcmp;
else sortfcn = modcmp; /* use modification time */
}
/* select a print function */
if (f_singlecol) printfcn = printscol;
else if (f_longform) printfcn = printlong;
else printfcn = printcol;
if (!argc) {
argc = 1;
argv[0] = ".";
argv[1] = NULL;
}
doargs(argc, argv);
}
|
chunjuwang/Javascript-Note
|
Object.getPrototypeOf.done.js
|
Object.getPrototypeOfCustom = function (object) {
if (object === null || object === undefined) {
throw new TypeError('Cannot convert undefined or null to object');
}
// 即便是标量类型,也会自动转换为包装类型
return object.__proto__;
}
|
best08618/asylo
|
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c
|
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c<gh_stars>1-10
/* { dg-do run } */
/* { dg-options "-O2 -mavx512f" } */
/* { dg-require-effective-target avx512f } */
#include "avx512f-check.h"
static __m512i
__attribute__ ((noinline))
foo (int x1, int x2, int x3, int x4,
int x5, int x6, int x7, int x8,
int x9, int x10, int x11, int x12,
int x13, int x14, int x15, int x16)
{
return _mm512_set_epi32 (x1, x2, x3, x4, x5, x6, x7, x8,
x9, x10, x11, x12, x13, x14, x15, x16);
}
static __m512i
__attribute__ ((noinline))
foo_r (int x1, int x2, int x3, int x4,
int x5, int x6, int x7, int x8,
int x9, int x10, int x11, int x12,
int x13, int x14, int x15, int x16)
{
return _mm512_setr_epi32 (x16, x15, x14, x13, x12, x11, x10, x9,
x8, x7, x6, x5, x4, x3, x2, x1);
}
static void
avx512f_test (void)
{
int v[16] = { -3, -453, 2, -231, 1, -111, 9, -145,
23, 671, -173, 166, -13, 714, 69, 123 };
union512i_d res;
res.x = foo (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
if (check_union512i_d (res, v))
abort ();
res.x = _mm512_setzero_si512 ();
res.x = foo_r (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
if (check_union512i_d (res, v))
abort ();
}
|
beerhall/paradoxGameConverters
|
Vic2ToHoI4/Source/HOI4World/HoI4OnActions.cpp
|
<gh_stars>1-10
/*Copyright (c) 2017 The Paradox Game Converters Project
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
#include "HoI4OnActions.h"
#include "Log.h"
#include "../Configuration.h"
#include <fstream>
using namespace std;
HoI4OnActions::HoI4OnActions(): electionEvents{ "election.2", "election.3" }
{
}
void HoI4OnActions::output() const
{
ofstream onActionsFile("output/" + Configuration::getOutputName() + "/common/on_actions/99_converter_on_actions.txt");
if (!onActionsFile.is_open())
{
LOG(LogLevel::Error) << "Could not create NF_events.txt";
exit(-1);
}
onActionsFile << "on_actions = {\n";
onActionsFile << " # country\n";
onActionsFile << " on_new_term_election = {\n";
onActionsFile << " random_events = {\n";
for (auto event: electionEvents)
{
onActionsFile << " 100 = " << event << "\n";
}
onActionsFile << " }\n";
onActionsFile << " }\n";
onActionsFile << "}\n";
onActionsFile.close();
}
|
fregaham/KiWi
|
extensions/tagit2/src/tagit2/service/image/ImageSizeService.java
|
<gh_stars>1-10
package tagit2.service.image;
import javax.swing.ImageIcon;
import kiwi.model.content.MediaContent;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.log.Log;
@Scope(ScopeType.STATELESS)
@Name("tagit2.imageSizeService")
//@Transactional
public class ImageSizeService {
@Logger
Log log;
public long getImageHeight(MediaContent media, double maxWidth, double maxHeight) {
ImageIcon img = new ImageIcon(media.getData());
log.info("image has original width: #0 and height: #1", img.getIconWidth(), img.getIconHeight());
double imgHeight = img.getIconHeight();
double imgWidth = img.getIconWidth();
double origRatio = imgHeight / imgWidth;
double necRatio = maxHeight / maxWidth;
long height = 100;
if( origRatio > necRatio ) {
//hight must be min
if( img.getIconHeight() < maxHeight ) {
height = Math.round( img.getIconHeight() );
} else {
height = Math.round( maxHeight );
}
} else {
if( img.getIconWidth() < maxWidth ) {
height = Math.round( img.getIconHeight() );
} else {
height = Math.round( ( maxWidth / img.getIconWidth() ) * img.getIconHeight() );
}
}
log.info("new height is #0", height);
return height;
}
}
|
Air-TR/urule-springboot
|
urule-console-js/src/frame/event.js
|
<gh_stars>1000+
/**
* Created by Jacky.gao on 2016/5/24.
*/
import events from 'events';
export const OPEN_DIALOG='open_dialog';
export const CLOSE_DIALOG='close_dialog';
export const DIALOG_CONTNET_CHANGE='dialog_content_change';
export const OPEN_NEW_PROJECT_DIALOG='open_new_project_dialog';
export const CLOSE_NEW_PROJECT_DIALOG='close_new_project_dialog';
export const OPEN_UPDATE_PROJECT_DIALOG='open_update_project_dialog';
export const CLOSE_UPDATE_PROJECT_DIALOG='close_update_project_dialog';
export const OPEN_CREATE_FILE_DIALOG='create_file_dialog';
export const CLOSE_CREATE_FILE_DIALOG='close_file_dialog';
export const OPEN_CREATE_FOLDER_DIALOG='create_folder_dialog';
export const CLOSE_CREATE_FOLDER_DIALOG='close_folder_dialog';
export const EXPAND_TREE_NODE='expand_tree_node';
export const SHOW_RENAME_DIALOG='SHOW_RENAME_DIALOG';
export const HIDE_RENAME_DIALOG='HIDE_RENAME_DIALOG';
export const PROJECT_LIST_CHANGE='project_list_change';
export const PROJECT_FILTER_CHANGE='project_filter_change';
export const OPEN_IMPORT_PROJECT_DIALOG='open_import_project_dialog';
export const CLOSE_IMPORT_PROJECT_DIALOG='close_import_project_dialog';
export const OPEN_SOURCE_DIALOG='open_source_dialog';
export const CLOSE_SOURCE_DIALOG='close_source_dialog';
export const OPEN_FILE_VERSION_DIALOG='open_file_version_dialog';
export const CLOSE_FILE_VERSION_DIALOG='close_file_version_dialog';
export const CHANGE_CLASSIFY='change_classify';
export const eventEmitter=new events.EventEmitter();
|
Lupennat/syntax-extender
|
core/interceptor.js
|
<reponame>Lupennat/syntax-extender
'use strict';
const fs = require('fs');
const Module = require('module');
const nodePath = require('path');
const { INTERFACE, ABSTRACT, FEATURES } = require('./constants');
const { isFunction, isString, isDictionary, setSedefEnv, hasOwn } = require('./utils');
const toAbstract = require('./to-abstract');
const toClass = require('./to-class');
const toInterface = require('./to-interface');
const SyntaxExtenderNotValidArgumentError = require('../errors/syntax-extender-not-valid-argument-error');
const SyntaxExtenderInterceptorAlreadyRegisteredError = require('../errors/interceptor/syntax-extender-interceptor-already-registered-error');
const SyntaxExtenderInterceptorMissingNamespaceError = require('../errors/interceptor/syntax-extender-interceptor-missing-namespace-error');
const SyntaxExtenderInterceptorInvalidPathError = require('../errors/interceptor/syntax-extender-interceptor-invalid-path-error');
const SyntaxExtenderInterceptorNotADirectoryError = require('../errors/interceptor/syntax-extender-interceptor-not-a-directory-error');
const originalRequire = Module.prototype.require;
const originalResolveFilename = Module._resolveFilename;
let namespacesNames = [];
let pathsNames = [];
const namespaces = {};
const paths = {};
const callbacks = {};
const features = {};
const middlewares = {};
const cache = {
modules: {},
processed: {},
resolvedId: {},
resolvedPath: {},
namespaced: {}
};
const isNative = function (id) {
return hasOwn(process.binding('natives'), id);
};
const isPathMatchesNamespaces = function (path, namespace) {
if (path.indexOf(namespace) === 0) {
if (path.length === namespace.length) {
return true;
}
if (path[namespace.length] === '/') {
return true;
}
}
return false;
};
const generateRequireInfo = function (id, absPath) {
return {
moduleId: id,
namespace: cache.namespaced[absPath],
absPath: absPath,
extname: nodePath.extname(absPath),
processed: cache.processed[absPath] || false
};
};
const createResolveFilenameInterceptor = function (__resolveFilename) {
return function interceptedResolveFilename(request, parentModule, isMain, options) {
if (isNative(request)) {
return __resolveFilename.call(this, request, parentModule, isMain, options);
}
if (cache.resolvedId[request]) {
return cache.resolvedId[request];
}
if (cache.resolvedPath[request]) {
return cache.resolvedPath[request];
}
const originalRequest = request;
let namespaceFounded = false;
for (let i = namespacesNames.length; i-- > 0; ) {
const namespace = namespacesNames[i];
if (isPathMatchesNamespaces(request, namespace)) {
const namespaceTarget = namespaces[namespace];
namespaceFounded = namespace;
request = nodePath.join(namespaceTarget, request.substr(namespace.length));
break;
}
}
const filename = __resolveFilename.call(this, request, parentModule, isMain, options);
if (namespaceFounded) {
cache.namespaced[filename] = namespaceFounded;
cache.modules[filename] = originalRequest.replace('.js', '');
} else {
for (let i = pathsNames.length; i-- > 0; ) {
const path = pathsNames[i];
if (filename.startsWith(path)) {
cache.namespaced[filename] = paths[path];
cache.modules[filename] = filename.replace(path, paths[path]).replace('.js', '');
break;
}
}
}
cache.resolvedPath[filename] = filename;
cache.resolvedId[originalRequest] = filename;
return filename;
};
};
const createRequireInterceptor = function (__require) {
return function interceptedRequire(id) {
let __exports = __require.call(this, id);
const filename = cache.resolvedId[id] || '';
if (filename && cache.modules[filename]) {
const info = generateRequireInfo(cache.modules[filename], filename);
if (!info.processed) {
if (callbacks[info.namespace]) {
__exports = callbacks[info.namespace].call(
callbacks[info.namespace],
__exports,
{ ...info },
callback(),
features[info.namespace]
);
} else {
__exports = callback()(__exports, { ...info }, features[info.namespace]);
}
Module._cache[info.absPath].exports = __exports;
cache.processed[info.absPath] = true;
info.processed = true;
}
for (let x = 0; x < middlewares[info.namespace].length; x++) {
__exports = middlewares[info.namespace][x].call(middlewares[info.namespace][x], __exports, { ...info });
}
}
return __exports;
};
};
const callback = function () {
return function (resolved, info, features) {
if (info.extname === '.js' && resolved) {
for (const feature in features) {
if (Object.keys(FEATURES).indexOf(feature) === -1) {
continue;
}
setSedefEnv(feature, !!features[feature]);
}
if (hasOwn(resolved, INTERFACE)) {
resolved = toInterface(resolved, info.absPath, info.namespace, info.id);
} else if (hasOwn(resolved, ABSTRACT)) {
resolved = toAbstract(resolved, info.absPath, info.namespace, info.id);
} else {
resolved = toClass(resolved, info.absPath, info.namespace, info.id);
}
}
return resolved;
};
};
Module._resolveFilename = createResolveFilenameInterceptor(originalResolveFilename);
Module.prototype.require = createRequireInterceptor(originalRequire);
const interceptor = {
namespaces() {
return namespaces;
},
registerNamespace(namespace, path, config = {}) {
if (!isString(namespace)) {
throw new SyntaxExtenderNotValidArgumentError(
`registerNamespace(namespace, path, config = {}) argument 1 must be a string.`
);
}
if (!isString(path)) {
throw new SyntaxExtenderNotValidArgumentError(
`registerNamespace(namespace, path, config = {}) argument 2 must be a string.`
);
}
if (!isDictionary(config)) {
throw new SyntaxExtenderNotValidArgumentError(
`registerNamespace(namespace, path, config = {}) argument 3 must be a dictionary.`
);
}
if ('callback' in config && !isFunction(config.callback)) {
throw new SyntaxExtenderNotValidArgumentError(`config.callback must be a function.`);
}
if ('features' in config && !isDictionary(config.features)) {
throw new SyntaxExtenderNotValidArgumentError(`config.features must be a dictionary.`);
}
if (!fs.existsSync(path)) {
throw new SyntaxExtenderInterceptorInvalidPathError(path);
}
if (!fs.lstatSync(path).isDirectory()) {
throw new SyntaxExtenderInterceptorNotADirectoryError(
`namespace path can only be a directory, ${path} provided`
);
}
path = nodePath.resolve(path);
if (namespaces[namespace] !== undefined) {
throw new SyntaxExtenderInterceptorAlreadyRegisteredError('namespace', 'path', path);
}
if (paths[path] !== undefined) {
throw new SyntaxExtenderInterceptorAlreadyRegisteredError('path', 'namespace', namespace);
}
middlewares[namespace] = [];
if (config.callback) {
callbacks[namespace] = config.callback;
}
if (config.features) {
features[namespace] = config.features;
}
paths[path] = namespace;
namespaces[namespace] = path;
namespacesNames = Object.keys(namespaces);
namespacesNames.sort();
pathsNames = Object.keys(paths);
pathsNames.sort();
return this;
},
middleware(namespace, callback) {
if (!isString(namespace)) {
throw new SyntaxExtenderNotValidArgumentError(
'addBeforeHook(namespace, callback) argument 1 must be a string.'
);
}
if (!isFunction(callback)) {
throw new SyntaxExtenderNotValidArgumentError(
'addBeforeHook(namespace, callback) argument 2 must be a functions.'
);
}
if (namespaces[namespace] === undefined) {
throw new SyntaxExtenderInterceptorMissingNamespaceError(namespace);
}
middlewares[namespace].push(callback);
return this;
}
};
Object.seal(interceptor);
Object.freeze(interceptor);
module.exports = interceptor;
|
ua-eas/devops-automation-ksd-kc5.2.1-rice
|
krms/api/src/main/java/org/kuali/rice/krms/api/repository/proposition/PropositionDefinitionContract.java
|
/**
* Copyright 2005-2015 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.rice.krms.api.repository.proposition;
import java.util.List;
import org.kuali.rice.core.api.mo.common.Identifiable;
import org.kuali.rice.core.api.mo.common.Versioned;
/**
* Defines the contract for a {@link PropositionDefinition}
*
* @see PropositionDefinition
*
* @author K<NAME> (<EMAIL>)
*/
public interface PropositionDefinitionContract extends Identifiable, Versioned {
/**
* Returns the description text for the KRMS proposition
* @return description for KRMS type.
*/
public String getDescription();
/**
* Returns the id of Proposition KrmsType of the proposition.
* It provides some context to what type of object of the KRMS type.
* @return the id of the KRMS type.
*/
public String getTypeId();
/**
* TReturns the ID of the rule this proposition belongs to. May be null if this proposition has
* not yet been persisted.
*
* @return the ID of the Rule this proposition belongs to.
*/
public String getRuleId();
/**
* <p>
* There are three main types of Propositions:
* Compound Propositions - a proposition consisting of other propositions
* and a boolean algebra operator (AND, OR) defining how to evaluate
* those propositions.
* Parameterized Propositions - a proposition which is parameterized by
* some set of values, evaluation logic is implemented by hand and
* returns true or false
* Simple Propositions - a proposition of the form lhs op rhs where
* lhs=left-hand side, rhs=right-hand side, and op=operator
* </p>
* @return the proposition type code of the proposition
* <p>
* Valid values are C = compound, P = parameterized, S = simple
* </p>
*/
public String getPropositionTypeCode();
/**
* Returns the parameter list of the proposition.
* Parameters are listed in Reverse Polish Notation.
* Parameters may be constants, terms, or functions.
* <p>
* Compound Propositions will have an empty parameter list.
* </p>
* @see PropositionParameter
* @return the Parameters related to the proposition
*/
public List<? extends PropositionParameterContract> getParameters();
/**
* Returns the op code to be used when evaluating compound
* propositions.
*
* @return the compound op code.
* valid values are A = and, O = or
*/
public String getCompoundOpCode();
/**
*
* Returns the propositions which are contained in a
* compound proposition.
*
* @return an ordered list of the Propositions which make up the compound
* proposition.
*/
public List<? extends PropositionDefinitionContract> getCompoundComponents();
}
|
knut3/TravelPartner
|
app/services/ImageService.java
|
<filename>app/services/ImageService.java<gh_stars>0
package services;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.UUID;
import javax.imageio.ImageIO;
import org.imgscalr.Scalr;
import services.interfaces.IImageService;
import settings.ImageConfig;
import settings.ImageConfig.ImageShape;
public class ImageService implements IImageService{
@Override
public void generateResizedImages(String sourceUrl, UUID id, int width, int height) throws IOException {
URL url = new URL(sourceUrl);
BufferedImage source = ImageIO.read(url);
// Create a square version of the image
int diff = width - height;
int squareWidth = width;
int squareHeight = height;
int squareX = 0;
int squareY = 0;
if(diff < 0){ // height > width
squareHeight = height + diff; // subtract diff from height
squareY = diff / (-2); // center square crop
}
else{ // height <= width
squareWidth = width - diff; // subtract diff from width
squareX = diff / 2; // center square crop
}
BufferedImage square = Scalr.crop(source, squareX, squareY, squareWidth, squareHeight);
// Create small image
BufferedImage tempSource = source;
if(ImageConfig.SMALL_SHAPE == ImageShape.SQUARE)
tempSource = square;
BufferedImage small = Scalr.resize(tempSource, ImageConfig.SMALL_WIDTH);
File destFile = new File("public/images/small/" + id.toString() + ".jpg");
ImageIO.write(small, "jpg", destFile);
// Create medium sized image
tempSource = source;
if(ImageConfig.MEDIUM_SHAPE == ImageShape.SQUARE)
tempSource = square;
BufferedImage medium = Scalr.resize(tempSource, ImageConfig.MEDIUM_WIDTH);
destFile = new File("public/images/medium/" + id.toString() + ".jpg");
ImageIO.write(medium, "jpg", destFile);
// Create large image
tempSource = source;
if(ImageConfig.LARGE_SHAPE == ImageShape.SQUARE)
tempSource = square;
BufferedImage large = Scalr.resize(tempSource, ImageConfig.LARGE_WIDTH);
destFile = new File("public/images/large/" + id.toString() + ".jpg");
ImageIO.write(large, "jpg", destFile);
source.flush();
square.flush();
}
}
|
astubbs/orient
|
core/src/main/java/com/orientechnologies/orient/core/db/ODatabaseRecordWrapperAbstract.java
|
<reponame>astubbs/orient
/*
* Copyright 1999-2010 <NAME> (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.core.db;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.orientechnologies.orient.core.command.OCommandRequest;
import com.orientechnologies.orient.core.db.record.ODatabaseRecord;
import com.orientechnologies.orient.core.dictionary.ODictionary;
import com.orientechnologies.orient.core.hook.ORecordHook;
import com.orientechnologies.orient.core.hook.ORecordHook.TYPE;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.metadata.OMetadata;
import com.orientechnologies.orient.core.metadata.security.OUser;
import com.orientechnologies.orient.core.query.OQuery;
import com.orientechnologies.orient.core.record.ORecordInternal;
import com.orientechnologies.orient.core.tx.OTransaction.TXTYPE;
@SuppressWarnings("unchecked")
public abstract class ODatabaseRecordWrapperAbstract<DB extends ODatabaseRecord<REC>, REC extends ORecordInternal<?>> extends
ODatabaseWrapperAbstract<DB, REC> implements ODatabaseComplex<REC> {
public ODatabaseRecordWrapperAbstract(final DB iDatabase) {
super(iDatabase);
iDatabase.setDatabaseOwner((ODatabaseComplex<?>) this);
}
public ODatabaseComplex<REC> begin() {
return (ODatabaseComplex<REC>) underlying.begin();
}
public ODatabaseComplex<REC> begin(final TXTYPE iType) {
return (ODatabaseComplex<REC>) underlying.begin(iType);
}
public ODatabaseComplex<REC> commit() {
return (ODatabaseComplex<REC>) underlying.commit();
}
public ODatabaseComplex<REC> rollback() {
return (ODatabaseComplex<REC>) underlying.rollback();
}
public OUser getUser() {
return underlying.getUser();
}
public OMetadata getMetadata() {
return underlying.getMetadata();
}
public ODictionary<REC> getDictionary() {
return underlying.getDictionary();
}
public Class<? extends REC> getRecordType() {
return underlying.getRecordType();
}
public Iterator<REC> browseCluster(final String iClusterName) {
return underlying.browseCluster(iClusterName);
}
public <RET extends OCommandRequest> RET command(final OCommandRequest iCommand) {
return (RET) underlying.command(iCommand);
}
public <RET extends List<?>> RET query(final OQuery<? extends Object> iCommand) {
return (RET) underlying.query(iCommand);
}
public REC newInstance() {
return underlying.newInstance();
}
public ODatabaseComplex<REC> delete(final REC iRecord) {
underlying.delete(iRecord);
return this;
}
public REC load(final ORID iRecordId) {
return underlying.load(iRecordId);
}
public REC load(final REC iRecord) {
return underlying.load(iRecord);
}
public REC load(final REC iRecord, final String iFetchPlan) {
return underlying.load(iRecord, iFetchPlan);
}
public ODatabaseComplex<REC> save(final REC iRecord, final String iClusterName) {
underlying.save(iRecord, iClusterName);
return this;
}
public ODatabaseComplex<REC> save(final REC iRecord) {
underlying.save(iRecord);
return this;
}
public boolean isRetainRecords() {
return underlying.isRetainRecords();
}
public ODatabaseRecord<?> setRetainRecords(boolean iValue) {
underlying.setRetainRecords(iValue);
return (ODatabaseRecord<?>) this;
}
public ORecordInternal<?> getRecordByUserObject(final Object iUserObject, final boolean iMandatory) {
if (databaseOwner != this)
return getDatabaseOwner().getRecordByUserObject(iUserObject, false);
return (ORecordInternal<?>) iUserObject;
}
public Object getUserObjectByRecord(final ORecordInternal<?> iRecord, final String iFetchPlan) {
if (databaseOwner != this)
return databaseOwner.getUserObjectByRecord(iRecord, iFetchPlan);
return iRecord;
}
public boolean existsUserObjectByRecord(final ORecordInternal<?> iRecord) {
if (databaseOwner != this)
return databaseOwner.existsUserObjectByRecord(iRecord);
return false;
}
public <DBTYPE extends ODatabaseRecord<?>> DBTYPE checkSecurity(final String iResource, final int iOperation) {
return (DBTYPE) underlying.checkSecurity(iResource, iOperation);
}
public <DBTYPE extends ODatabaseRecord<?>> DBTYPE checkSecurity(final String iResourceGeneric, final int iOperation,
final Object... iResourcesSpecific) {
return (DBTYPE) underlying.checkSecurity(iResourceGeneric, iOperation, iResourcesSpecific);
}
public <DBTYPE extends ODatabaseComplex<?>> DBTYPE registerHook(final ORecordHook iHookImpl) {
underlying.registerHook(iHookImpl);
return (DBTYPE) this;
}
public void callbackHooks(final TYPE iType, final Object iObject) {
underlying.callbackHooks(iType, iObject);
}
public Set<ORecordHook> getHooks() {
return underlying.getHooks();
}
public <DBTYPE extends ODatabaseComplex<?>> DBTYPE unregisterHook(final ORecordHook iHookImpl) {
underlying.unregisterHook(iHookImpl);
return (DBTYPE) this;
}
}
|
nishadi1995/iGoviya
|
node_modules/rxjs-compat/observable/forkJoin.js
|
<gh_stars>10-100
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var rxjs_1 = require("rxjs");
exports.forkJoin = rxjs_1.forkJoin;
//# sourceMappingURL=forkJoin.js.map
|
cwood77/shtanky
|
src/liam/varSplitter.hpp
|
<reponame>cwood77/shtanky
#pragma once
#include <cstddef>
#include <list>
#include <utility>
namespace cmn { namespace tgt { class iTargetInfo; } }
namespace liam {
class lirStream;
class var;
class varTable;
// find vars that have multiple storage locations
// emit instructions to implement moves to fullfill these
// why is this done in two passes? don't remember; something about disambiguators?
// preserving as much leeway for the combiner?
class varSplitter {
public:
static void split(lirStream& s, varTable& v, cmn::tgt::iTargetInfo& t);
private:
varSplitter(lirStream& s, varTable& v, cmn::tgt::iTargetInfo& t)
: m_s(s), m_v(v), m_t(t) {}
void checkVar(var& v);
void emitMoveBefore(var& v, size_t orderNum, size_t src, size_t dest);
void preserveDisp(var& v, size_t orderNum, lirArg& splitSrcArg);
lirStream& m_s;
varTable& m_v;
cmn::tgt::iTargetInfo& m_t;
std::set<var*> m_done;
std::list<std::pair<lirInstr*,size_t> > m_newInstrs;
};
class splitResolver {
public:
splitResolver(lirStream& s, varTable& v) : m_s(s), m_v(v) {}
void run();
private:
lirStream& m_s;
varTable& m_v;
};
} // namespace liam
|
Gouzhong1223/Dubhe
|
dubhe-server/common-k8s/src/main/java/org/dubhe/k8s/api/impl/TerminalApiImpl.java
|
/**
* Copyright 2020 Tianshu AI Platform. 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.
* =============================================================
*/
package org.dubhe.k8s.api.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import io.fabric8.kubernetes.api.model.Quantity;
import io.fabric8.kubernetes.api.model.Service;
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.api.model.apps.Deployment;
import io.fabric8.kubernetes.api.model.apps.DeploymentList;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClientException;
import org.dubhe.biz.base.constant.MagicNumConstant;
import org.dubhe.biz.base.constant.SymbolConstant;
import org.dubhe.biz.file.api.FileStoreApi;
import org.dubhe.biz.log.enums.LogEnum;
import org.dubhe.biz.log.utils.LogUtil;
import org.dubhe.k8s.api.NodeApi;
import org.dubhe.k8s.api.PersistentVolumeClaimApi;
import org.dubhe.k8s.api.PodApi;
import org.dubhe.k8s.api.ResourceIisolationApi;
import org.dubhe.k8s.api.ResourceQuotaApi;
import org.dubhe.k8s.api.TerminalApi;
import org.dubhe.k8s.api.VolumeApi;
import org.dubhe.k8s.constant.K8sParamConstants;
import org.dubhe.k8s.domain.PtBaseResult;
import org.dubhe.k8s.domain.bo.BuildFsVolumeBO;
import org.dubhe.k8s.domain.bo.BuildServiceBO;
import org.dubhe.k8s.domain.bo.TerminalBO;
import org.dubhe.k8s.domain.vo.PtJupyterDeployVO;
import org.dubhe.k8s.domain.vo.TerminalResourceVO;
import org.dubhe.k8s.domain.vo.VolumeVO;
import org.dubhe.k8s.enums.K8sKindEnum;
import org.dubhe.k8s.enums.K8sResponseEnum;
import org.dubhe.k8s.enums.LackOfResourcesEnum;
import org.dubhe.k8s.enums.LimitsOfResourcesEnum;
import org.dubhe.k8s.enums.ServiceTypeENum;
import org.dubhe.k8s.utils.BizConvertUtils;
import org.dubhe.k8s.utils.K8sUtils;
import org.dubhe.k8s.utils.LabelUtils;
import org.dubhe.k8s.utils.ResourceBuildUtils;
import org.dubhe.k8s.utils.YamlUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.Map;
/**
* @description 专业版终端接口实现
* @date 2021-06-29
*/
public class TerminalApiImpl implements TerminalApi {
private K8sUtils k8sUtils;
private KubernetesClient client;
@Resource(name = "hostFileStoreApiImpl")
private FileStoreApi fileStoreApi;
@Autowired
private VolumeApi volumeApi;
@Autowired
private PersistentVolumeClaimApi persistentVolumeClaimApi;
@Autowired
private NodeApi nodeApi;
@Autowired
private PodApi podApi;
@Autowired
private ResourceQuotaApi resourceQuotaApi;
@Autowired
private ResourceIisolationApi resourceIisolationApi;
public TerminalApiImpl(K8sUtils k8sUtils) {
this.k8sUtils = k8sUtils;
this.client = k8sUtils.getClient();
}
/**
* 创建
*
* @param bo
* @return BizDeployment
*/
@Override
public TerminalResourceVO create(TerminalBO bo) {
try {
LogUtil.info(LogEnum.BIZ_K8S, "Params of creating TerminalApiImpl--create:{}", bo);
//资源配额校验
LimitsOfResourcesEnum limitsOfResources = resourceQuotaApi.reachLimitsOfResources(bo.getNamespace(), bo.getCpuNum(), bo.getMemNum(), bo.getGpuNum());
if (!LimitsOfResourcesEnum.ADEQUATE.equals(limitsOfResources)) {
return new TerminalResourceVO().error(K8sResponseEnum.LACK_OF_RESOURCES.getCode(), limitsOfResources.getMessage());
}
LackOfResourcesEnum lack = nodeApi.isAllocatable(bo.getCpuNum(), bo.getMemNum(), bo.getGpuNum());
if (!LackOfResourcesEnum.ADEQUATE.equals(lack)) {
return new TerminalResourceVO().error(K8sResponseEnum.LACK_OF_RESOURCES.getCode(), lack.getMessage());
}
if (!fileStoreApi.createDirs(bo.getDirList().toArray(new String[MagicNumConstant.ZERO]))) {
return new TerminalResourceVO().error(K8sResponseEnum.INTERNAL_SERVER_ERROR.getCode(), K8sResponseEnum.INTERNAL_SERVER_ERROR.getMessage());
}
//存储卷构建
VolumeVO volumeVO = volumeApi.buildFsVolumes(new BuildFsVolumeBO(bo.getNamespace(), bo.getResourceName(), bo.getFsMounts()));
if (!K8sResponseEnum.SUCCESS.getCode().equals(volumeVO.getCode())) {
return new TerminalResourceVO().error(volumeVO.getCode(), volumeVO.getMessage());
}
//共享存储
Integer ShmMemAmount = bo.getMemNum() == null?MagicNumConstant.BINARY_TEN_EXP:bo.getMemNum()/MagicNumConstant.TWO;
volumeVO.addShmFsVolume(new Quantity(String.valueOf(ShmMemAmount),K8sParamConstants.MEM_UNIT));
//名称生成
String deploymentName = StrUtil.format(K8sParamConstants.RESOURCE_NAME_TEMPLATE, bo.getResourceName(), RandomUtil.randomString(MagicNumConstant.EIGHT));
String svcName = StrUtil.format(K8sParamConstants.SUB_RESOURCE_NAME_TEMPLATE, bo.getResourceName(), K8sParamConstants.SVC_SUFFIX, RandomUtil.randomString(MagicNumConstant.FIVE));
//标签生成
Map<String, String> baseLabels = LabelUtils.getBaseLabels(bo.getResourceName(), bo.getBusinessLabel());
Map<String, String> podLabels = LabelUtils.getChildLabels(bo.getResourceName(), deploymentName, K8sKindEnum.DEPLOYMENT.getKind(), bo.getBusinessLabel(), bo.getTaskIdentifyLabel());
//部署deployment
Deployment deployment = ResourceBuildUtils.buildDeployment(bo, volumeVO, deploymentName);
LogUtil.info(LogEnum.BIZ_K8S, "Ready to deploy {}, yaml信息为{}", deploymentName, YamlUtils.dumpAsYaml(deployment));
resourceIisolationApi.addIisolationInfo(deployment);
Deployment deploymentResult = client.apps().deployments().inNamespace(bo.getNamespace()).create(deployment);
//部署service
BuildServiceBO buildServiceBO = new BuildServiceBO(bo.getNamespace(), svcName, baseLabels, podLabels, ServiceTypeENum.NODE_PORT.getType());
if (!CollectionUtils.isEmpty(bo.getPorts())){
bo.getPorts().forEach(port -> {
buildServiceBO.addPort(ResourceBuildUtils.buildServicePort(port, port, SymbolConstant.PORT+SymbolConstant.HYPHEN+port));
});
}
Service service = ResourceBuildUtils.buildService(buildServiceBO);
LogUtil.info(LogEnum.BIZ_K8S, "Ready to deploy {}, yaml信息为{}", svcName, YamlUtils.dumpAsYaml(service));
Service serviceResult = client.services().create(service);
return new TerminalResourceVO(BizConvertUtils.toBizDeployment(deploymentResult),BizConvertUtils.toBizService(serviceResult));
}catch (KubernetesClientException e) {
LogUtil.error(LogEnum.BIZ_K8S, "TerminalApiImpl.create error, param:{} error:", bo, e);
return new TerminalResourceVO().error(String.valueOf(e.getCode()), e.getMessage());
}
}
/**
* 删除
* @param namespace 命名空间
* @param resourceName 资源名称
* @return PtBaseResult 基础结果类
*/
@Override
public PtBaseResult delete(String namespace, String resourceName) {
try {
LogUtil.info(LogEnum.BIZ_K8S, "delete Terminal namespace:{} resourceName:{}",namespace,resourceName);
DeploymentList deploymentList = client.apps().deployments().inNamespace(namespace).withLabels(LabelUtils.withEnvResourceName(resourceName)).list();
if (deploymentList == null || deploymentList.getItems().size() == 0){
return new PtBaseResult();
}
persistentVolumeClaimApi.delete(namespace,resourceName);
persistentVolumeClaimApi.deletePvByResourceName(resourceName);
Boolean res = client.services().inNamespace(namespace).withLabels(LabelUtils.withEnvResourceName(resourceName)).delete()
&& client.apps().deployments().inNamespace(namespace).withLabels(LabelUtils.withEnvResourceName(resourceName)).delete();
if (res) {
return new PtBaseResult();
} else {
return K8sResponseEnum.REPEAT.toPtBaseResult();
}
} catch (KubernetesClientException e) {
LogUtil.error(LogEnum.BIZ_K8S, "delete error:", e);
return new PtBaseResult(String.valueOf(e.getCode()), e.getMessage());
}
}
/**
* 查询
* @param namespace 命名空间
* @param resourceName 资源名称
* @return
*/
@Override
public TerminalResourceVO get(String namespace, String resourceName) {
try {
ServiceList svcList = client.services().inNamespace(namespace).withLabels(LabelUtils.withEnvResourceName(resourceName)).list();
Service svc = CollectionUtil.isEmpty(svcList.getItems()) ? null : svcList.getItems().get(0);
DeploymentList deploymentList = client.apps().deployments().inNamespace(namespace).withLabels(LabelUtils.withEnvResourceName(resourceName)).list();
Deployment deployment = CollectionUtil.isEmpty(deploymentList.getItems()) ? null : deploymentList.getItems().get(0);
return new TerminalResourceVO(BizConvertUtils.toBizDeployment(deployment), BizConvertUtils.toBizService(svc));
} catch (KubernetesClientException e) {
LogUtil.error(LogEnum.BIZ_K8S, "get error:", e);
return new TerminalResourceVO().error(String.valueOf(e.getCode()), e.getMessage());
}
}
}
|
karoyqiu/crashpad
|
util/thread/worker_thread.cc
|
<filename>util/thread/worker_thread.cc<gh_stars>1000+
// Copyright 2015 The Crashpad 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.
#include "util/thread/worker_thread.h"
#include "base/logging.h"
#include "util/thread/thread.h"
namespace crashpad {
namespace internal {
class WorkerThreadImpl final : public Thread {
public:
WorkerThreadImpl(WorkerThread* self, double initial_work_delay)
: semaphore_(0),
initial_work_delay_(initial_work_delay),
self_(self) {}
~WorkerThreadImpl() {}
void ThreadMain() override {
if (initial_work_delay_ > 0)
semaphore_.TimedWait(initial_work_delay_);
while (self_->running_) {
self_->delegate_->DoWork(self_);
semaphore_.TimedWait(self_->work_interval_);
}
}
void SignalSemaphore() {
semaphore_.Signal();
}
private:
// TODO(mark): Use a condition variable instead?
Semaphore semaphore_;
double initial_work_delay_;
WorkerThread* self_; // Weak, owns this.
};
} // namespace internal
WorkerThread::WorkerThread(double work_interval,
WorkerThread::Delegate* delegate)
: work_interval_(work_interval),
delegate_(delegate),
impl_(),
running_(false) {}
WorkerThread::~WorkerThread() {
DCHECK(!running_);
}
void WorkerThread::Start(double initial_work_delay) {
DCHECK(!impl_);
DCHECK(!running_);
running_ = true;
impl_.reset(new internal::WorkerThreadImpl(this, initial_work_delay));
impl_->Start();
}
void WorkerThread::Stop() {
DCHECK(running_);
DCHECK(impl_);
if (!running_)
return;
running_ = false;
impl_->SignalSemaphore();
impl_->Join();
impl_.reset();
}
void WorkerThread::DoWorkNow() {
DCHECK(running_);
impl_->SignalSemaphore();
}
} // namespace crashpad
|
wachaon/wes
|
src/format.js
|
<gh_stars>0
const { blueBright } = require('ansi')
const { readdirsSync, readFileSync, writeFileSync } = require('filesystem')
const { format } = require('fmt')
const { resolve } = require('pathname')
const UTF8 = 'UTF-8N'
console.log('%SStart formatting', blueBright)
function formatter(dir) {
readdirsSync(resolve(process.cwd(), dir), UTF8)
.filter((spec) => spec.type === 'file' && spec.path.endsWith('.js'))
.filter((spec) => !spec.path.endsWith('babel-standalone.js'))
.forEach((spec) => {
const { path } = spec
console.log('%O', writeFileSync(path, format(readFileSync(path, UTF8)), UTF8))
})
}
formatter('lib')
formatter('src')
|
joshschriever/LiveNotes
|
seescore/src/main/java/uk/co/dolphin_com/sscore/ClefItem.java
|
<reponame>joshschriever/LiveNotes<filename>seescore/src/main/java/uk/co/dolphin_com/sscore/ClefItem.java
/**
* SeeScore Android API
* Dolphin Computing http://www.dolphin-com.co.uk
*/
package uk.co.dolphin_com.sscore;
/**
* a clef in the score
*/
public class ClefItem extends TimedItem
{
/**
* treble clef (G clef) type constant
*/
public static final int Clef_treble = 0;
/**
* treble clef (G clef) with 8 below
*/
public static final int Clef_treble_sub8 = 1;
/**
* alto clef (C clef centred on middle line)
*/
public static final int Clef_alto = 2;
/**
* tenor clef (C clef)
*/
public static final int Clef_tenor = 3;
/**
* tenor clef (C clef)
*/
public static final int Clef_soprano = 4;
/**
* bass clef (F clef)
*/
public static final int Clef_bass = 5;
/**
* percussion clef
*/
public static final int Clef_percussion = 6;
/**
* TAB clef (stave lines indicate guitar strings, numbers indicate fingers)
*/
public static final int Clef_TAB = 7;
/**
* no clef
*/
public static final int Clef_none = 8;
/**
* unknown clef
*/
public static final int Clef_unknown = 9;
/**
* treble clef with 8 above
*/
public static final int Clef_treble_super8 = 10;
/**
* bass clef with 8 below
*/
public static final int Clef_bass_sub8 = 11;
/**
* bass clef with 8 above (unknown?)
*/
public static final int Clef_bass_super8 = 12;
/**
* type of clef - Clef_?
*/
public final int clefType;
public String toString()
{
switch (clefType)
{
case Clef_treble: return " treble " + super.toString();
case Clef_treble_sub8: return " treble -8 " + super.toString();
case Clef_alto: return " alto " + super.toString();
case Clef_tenor: return " tenor " + super.toString();
case Clef_soprano: return " soprano " + super.toString();
case Clef_bass: return " bass " + super.toString();
case Clef_percussion: return " percussion " + super.toString();
case Clef_TAB: return " TAB " + super.toString();
case Clef_none: return " none " + super.toString();
default:
case Clef_unknown: return " unknown " + super.toString();
case Clef_treble_super8: return " treble +8 " + super.toString();
case Clef_bass_sub8: return " bass -8 " + super.toString();
case Clef_bass_super8: return " bass +8 " + super.toString();
}
}
private ClefItem(int staff, int item_h, int start, int duration, int clefType) {
super(ItemType_clef, staff, item_h, start, duration);
this.clefType = clefType;
}
}
|
t0nyt93/Axelroddd
|
axelrod/tests/unit/test_finite_state_machines.py
|
<gh_stars>0
"""Tests for Finite State Machine Strategies."""
import unittest
import axelrod
from .test_player import TestMatch, TestPlayer
C, D = axelrod.Actions.C, axelrod.Actions.D
def check_state_transitions(state_transitions):
"""Checks that the supplied transitions for a finite state machine are
well-formed."""
keys = state_transitions.keys()
values = state_transitions.values()
# Check that the set of source states contains the set of sink states
sources = [k[0] for k in keys]
sinks = [v[0] for v in values]
if not set(sinks).issubset(set(sources)):
return False
# Check that there are two outgoing edges for every source state
for state in sources:
for action in [C, D]:
if not ((state, action) in keys):
return False
return True
class TestFSMPlayers(unittest.TestCase):
"""Test a few sample tables to make sure that the finite state machines are
working as intended."""
def test_cooperator(self):
"""Tests that the player defined by the table for Cooperator is in fact
Cooperator."""
transitions = [(1, C, 1, C), (1, D, 1, C)]
player = axelrod.FSMPlayer(transitions, initial_state=1, initial_action=C)
opponent = axelrod.Alternator()
for i in range(6):
player.play(opponent)
self.assertEqual(opponent.history, [C, D] * 3)
self.assertEqual(player.history, [C] * 6)
def test_defector(self):
"""Tests that the player defined by the table for Defector is in fact
Defector."""
transitions = [(1, C, 1, D), (1, D, 1, D)]
player = axelrod.FSMPlayer(transitions, initial_state=1, initial_action=D)
opponent = axelrod.Alternator()
for i in range(6):
player.play(opponent)
self.assertEqual(opponent.history, [C, D] * 3)
self.assertEqual(player.history, [D] * 6)
def test_tft(self):
"""Tests that the player defined by the table for TFT is in fact
TFT."""
transitions = [(1, C, 1, C), (1, D, 1, D)]
player = axelrod.FSMPlayer(transitions, initial_state=1, initial_action=C)
opponent = axelrod.Alternator()
for i in range(6):
player.play(opponent)
self.assertEqual(opponent.history, [C, D] * 3)
self.assertEqual(player.history, [C, C, D, C, D, C])
def test_wsls(self):
"""Tests that the player defined by the table for TFT is in fact
WSLS (also known as Pavlov."""
transitions = [(1, C, 1, C), (1, D, 2, D), (2, C, 2, D), (2, D, 1, C)]
player = axelrod.FSMPlayer(transitions, initial_state=1, initial_action=C)
opponent = axelrod.Alternator()
for i in range(6):
player.play(opponent)
self.assertEqual(opponent.history, [C, D] * 3)
self.assertEqual(player.history, [C, C, D, D, C, C])
def test_malformed_tables(self):
# Test a malformed table
transitions = ((1, D, 2, D),
(1, C, 1, D),
(2, C, 1, D),
(2, D, 3, C),
(3, C, 3, C))
player = axelrod.FSMPlayer(transitions=transitions, initial_state=1,
initial_action=C)
self.assertFalse(check_state_transitions(player.fsm.state_transitions))
transitions = [(1, D, 2, D)]
player = axelrod.FSMPlayer(transitions=transitions, initial_state=1,
initial_action=C)
self.assertFalse(check_state_transitions(player.fsm.state_transitions))
class TestFSMPlayer(TestPlayer):
name = "FSM Player"
player = axelrod.FSMPlayer
expected_classifier = {
'memory_depth': 1,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_transitions(self):
# Test that the finite state machine is well-formed
player = self.player()
fsm = player.fsm
self.assertTrue(check_state_transitions(fsm.state_transitions))
def test_reset_initial_state(self):
player = self.player()
player.fsm.state = -1
player.reset()
self.assertFalse(player.fsm.state == -1)
class TestFortress3(TestFSMPlayer):
name = "Fortress3"
player = axelrod.Fortress3
expected_classifier = {
'memory_depth': 3,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestFortress4(TestFSMPlayer):
name = "Fortress4"
player = axelrod.Fortress4
expected_classifier = {
'memory_depth': 4,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestPredator(TestFSMPlayer):
name = "Predator"
player = axelrod.Predator
expected_classifier = {
'memory_depth': 9,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(C)
class TestPun1(TestFSMPlayer):
name = "Pun1"
player = axelrod.Pun1
expected_classifier = {
'memory_depth': 2,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
self.responses_test([C], [D, C], [C, C])
self.responses_test([C], [D, C], [D, C])
self.responses_test([C], [D, C, C], [C, C, C])
self.responses_test([D], [D, C, C, C], [C, C, C, D])
class TestRaider(TestFSMPlayer):
name = "Raider"
player = axelrod.Raider
expected_classifier = {
'memory_depth': 3,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestRipoff(TestFSMPlayer):
name = "Ripoff"
player = axelrod.Ripoff
expected_classifier = {
'memory_depth': 2,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestSolutionB1(TestFSMPlayer):
name = "SolutionB1"
player = axelrod.SolutionB1
expected_classifier = {
'memory_depth': 3,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestSolutionB5(TestFSMPlayer):
name = "SolutionB5"
player = axelrod.SolutionB5
expected_classifier = {
'memory_depth': 5,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(D)
class TestThumper(TestFSMPlayer):
name = "Thumper"
player = axelrod.Thumper
expected_classifier = {
'memory_depth': 2,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(C)
class TestEvolvedFSM4(TestFSMPlayer):
name = "Evolved FSM 4"
player = axelrod.EvolvedFSM4
expected_classifier = {
'memory_depth': 4,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(C)
class TestEvolvedFSM16(TestFSMPlayer):
name = "Evolved FSM 16"
player = axelrod.EvolvedFSM16
expected_classifier = {
'memory_depth': 16,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(C)
class TestEvolvedFSM16Noise05(TestFSMPlayer):
name = "Evolved FSM 16 Noise 05"
player = axelrod.EvolvedFSM16Noise05
expected_classifier = {
'memory_depth': 16,
'stochastic': False,
'makes_use_of': set(),
'long_run_time': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
# Test initial play sequence
self.first_play_test(C)
class TestFortress3vsFortress3(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress3(), axelrod.Fortress3(),
[D, D, C, C, C], [D, D, C, C, C])
class TestFortress3vsTitForTat(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress3(), axelrod.TitForTat(),
[D, D, D, C], [C, D, D, D])
class TestFortress3vsCooperator(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress3(), axelrod.Cooperator(),
[D, D, D, D, D, D], [C] * 6)
class TestFortress4vsFortress4(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress4(), axelrod.Fortress4(),
[D, D, D, C, C, C], [D, D, D, C, C, C])
class TestFortress4vsTitForTat(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress4(), axelrod.TitForTat(),
[D, D, D, D, C, D], [C, D, D, D, D, C])
class TestFortress4vsCooperator(TestMatch):
def test_rounds(self):
self.versus_test(axelrod.Fortress4(), axelrod.Cooperator(),
[D, D, D, D, D, D], [C] * 6)
|
jstokes/secure-data-service
|
tools/csv2xml/src/org/slc/sli/sample/entitiesR1/IncidentLocationType.java
|
<reponame>jstokes/secure-data-service<filename>tools/csv2xml/src/org/slc/sli/sample/entitiesR1/IncidentLocationType.java
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.12.05 at 01:12:38 PM EST
//
package org.slc.sli.sample.entitiesR1;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IncidentLocationType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="IncidentLocationType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
* <enumeration value="On School"/>
* <enumeration value="Administrative offices area"/>
* <enumeration value="Cafeteria area"/>
* <enumeration value="Classroom"/>
* <enumeration value="Hallway or stairs"/>
* <enumeration value="Locker room or gym areas"/>
* <enumeration value="Restroom"/>
* <enumeration value="Library/media center"/>
* <enumeration value="Computer lab"/>
* <enumeration value="Auditorium"/>
* <enumeration value="On-School other inside area"/>
* <enumeration value="Athletic field or playground"/>
* <enumeration value="Stadium"/>
* <enumeration value="Parking lot"/>
* <enumeration value="On-School other outside area"/>
* <enumeration value="Off School"/>
* <enumeration value="Bus stop"/>
* <enumeration value="School bus"/>
* <enumeration value="Walking to or from school"/>
* <enumeration value="Off-School at other school"/>
* <enumeration value="Off-School at other school district facility"/>
* <enumeration value="Online"/>
* <enumeration value="Unknown"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "IncidentLocationType")
@XmlEnum
public enum IncidentLocationType {
@XmlEnumValue("On School")
ON_SCHOOL("On School"),
@XmlEnumValue("Administrative offices area")
ADMINISTRATIVE_OFFICES_AREA("Administrative offices area"),
@XmlEnumValue("Cafeteria area")
CAFETERIA_AREA("Cafeteria area"),
@XmlEnumValue("Classroom")
CLASSROOM("Classroom"),
@XmlEnumValue("Hallway or stairs")
HALLWAY_OR_STAIRS("Hallway or stairs"),
@XmlEnumValue("Locker room or gym areas")
LOCKER_ROOM_OR_GYM_AREAS("Locker room or gym areas"),
@XmlEnumValue("Restroom")
RESTROOM("Restroom"),
@XmlEnumValue("Library/media center")
LIBRARY_MEDIA_CENTER("Library/media center"),
@XmlEnumValue("Computer lab")
COMPUTER_LAB("Computer lab"),
@XmlEnumValue("Auditorium")
AUDITORIUM("Auditorium"),
@XmlEnumValue("On-School other inside area")
ON_SCHOOL_OTHER_INSIDE_AREA("On-School other inside area"),
@XmlEnumValue("Athletic field or playground")
ATHLETIC_FIELD_OR_PLAYGROUND("Athletic field or playground"),
@XmlEnumValue("Stadium")
STADIUM("Stadium"),
@XmlEnumValue("Parking lot")
PARKING_LOT("Parking lot"),
@XmlEnumValue("On-School other outside area")
ON_SCHOOL_OTHER_OUTSIDE_AREA("On-School other outside area"),
@XmlEnumValue("Off School")
OFF_SCHOOL("Off School"),
@XmlEnumValue("Bus stop")
BUS_STOP("Bus stop"),
@XmlEnumValue("School bus")
SCHOOL_BUS("School bus"),
@XmlEnumValue("Walking to or from school")
WALKING_TO_OR_FROM_SCHOOL("Walking to or from school"),
@XmlEnumValue("Off-School at other school")
OFF_SCHOOL_AT_OTHER_SCHOOL("Off-School at other school"),
@XmlEnumValue("Off-School at other school district facility")
OFF_SCHOOL_AT_OTHER_SCHOOL_DISTRICT_FACILITY("Off-School at other school district facility"),
@XmlEnumValue("Online")
ONLINE("Online"),
@XmlEnumValue("Unknown")
UNKNOWN("Unknown");
private final String value;
IncidentLocationType(String v) {
value = v;
}
public String value() {
return value;
}
public static IncidentLocationType fromValue(String v) {
for (IncidentLocationType c: IncidentLocationType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
YizheZhang-Ervin/TMPL_Nginx_Webpack
|
1-Spring/EZSpring/src/main/java/com/ervin/EZSpring/Utils/BaseUtils/CoreUtils/MathUtils.java
|
<filename>1-Spring/EZSpring/src/main/java/com/ervin/EZSpring/Utils/BaseUtils/CoreUtils/MathUtils.java
package com.ervin.EZSpring.Utils.BaseUtils.CoreUtils;
public class MathUtils {
static String getMathAPI(){
return "";
// Math.abs(-100); // 100
// Math.abs(-7.8); // 7.8
// Math.max(100, 99); // 100
// Math.min(1.2, 2.3); // 1.2
// Math.pow(2, 10); // 2的10次方=1024
// Math.sqrt(2); // 1.414...
// Math.exp(2); // 7.389...
// Math.log(4); // 1.386...
// Math.log10(100); // 2
// Math.sin(3.14); // 0.00159...
// Math.cos(3.14); // -0.9999...
// Math.tan(3.14); // -0.0015...
// Math.asin(1.0); // 1.57079...
// Math.acos(1.0); // 0.0
// Math.PI; // 3.14159...
// Math.E; // 2.7182818...
// Math.sin(Math.PI / 6); // sin(π/6) = 0.5
// Math.random(); // 0.53907... 每次都不一样
}
static String getRandomAPI(){
return "";
// new Random();
// nextInt(); // 2071575453,每次都不一样
// nextInt(10); // 5,生成一个[0,10)之间的int
// nextLong(); // 8811649292570369305,每次都不一样
// nextFloat(); // 0.54335...生成一个[0,1)之间的float
// nextDouble(); // 0.3716...生成一个[0,1)之间的double
}
static String getSecureRandomAPI(){
return "";
// new SecureRandom()// 获取普通的安全随机数生成器
// SecureRandom.getInstanceStrong(); // 获取高强度安全随机数生成器
// sr.nextBytes(buffer); // 用安全随机数填充buffer
}
}
|
marcosrachid/blockchain-criptocurrency
|
src/main/java/com/custom/blockchain/resource/exception/handler/ResourceExceptionHandler.java
|
<filename>src/main/java/com/custom/blockchain/resource/exception/handler/ResourceExceptionHandler.java
package com.custom.blockchain.resource.exception.handler;
import static com.custom.blockchain.constants.LogMessagesConstants.ERROR;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.custom.blockchain.exception.BusinessException;
import com.custom.blockchain.resource.dto.response.ResponseDTO;
import com.custom.blockchain.resource.dto.response.ResponseDTO.ResponseDTOBuilder;
import com.custom.blockchain.resource.dto.response.ResponseErrorsDTO;
import com.custom.blockchain.resource.dto.response.ResponseFieldErrorsDTO;
/**
*
* @author marcosrachid
*
*/
@ControllerAdvice(basePackages = "com.custom.blockchain.resource")
public class ResourceExceptionHandler {
private static final Logger LOG = LoggerFactory.getLogger(ResourceExceptionHandler.class);
/**
*
* @param e
* @return
*/
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public ResponseEntity<ResponseDTO> processMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
LOG.debug(ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e));
return ResponseEntity.status(METHOD_NOT_ALLOWED).body(ResponseDTO.createBuilder()
.withError(new ResponseErrorsDTO(METHOD_NOT_ALLOWED.value(), e.getMessage())).build());
}
/**
*
* @param e
* @return
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<ResponseDTO> handleFieldsException(MethodArgumentNotValidException e) {
LOG.debug(ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e));
ResponseDTOBuilder builder = ResponseDTO.createBuilder();
e.getBindingResult().getFieldErrors().forEach(ex -> {
builder.withError(new ResponseFieldErrorsDTO(BAD_REQUEST.value(), ex.getDefaultMessage(), ex.getField()));
});
return ResponseEntity.status(BAD_REQUEST).contentType(APPLICATION_JSON_UTF8).body(builder.build());
}
/**
*
* @param e
* @return
*/
@ExceptionHandler(BusinessException.class)
public ResponseEntity<ResponseDTO> handleTransactionException(BusinessException e) {
LOG.debug(ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e));
return ResponseEntity.status(e.getStatus()).contentType(APPLICATION_JSON_UTF8).body(ResponseDTO.createBuilder()
.withError(new ResponseErrorsDTO(e.getStatus().value(), e.getMessage())).build());
}
/**
*
* @param e
* @return
*/
@ExceptionHandler(Exception.class)
public ResponseEntity<ResponseDTO> handleException(Exception e) {
LOG.error(ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e));
return ResponseEntity.status(INTERNAL_SERVER_ERROR).contentType(APPLICATION_JSON_UTF8)
.body(ResponseDTO.createBuilder()
.withError(new ResponseErrorsDTO(INTERNAL_SERVER_ERROR.value(), e.getMessage())).build());
}
}
|
wait-tomorrow/JD1-Unit01
|
src/by/htp/home02/main/Task02.java
|
package by.htp.home02.main;
/*
* 2. Составить программу сравнения двух чисел 1 и 2.
* Если 1 меньше 2 – вывести на экран слово «yes»,
* в противном случае – слово «no»
* */
public class Task02 {
public static void main(String[] args) {
int a = 5;
int b = 4;
if (a < b) {
System.out.println("yes");
} else {
System.out.println("no");
}
}
}
|
OSADP/DTALite-AMS
|
Source Code/NEXTA-GUI/CGridListCtrlEx/ViewConfigSection.h
|
<reponame>OSADP/DTALite-AMS
#pragma once
//------------------------------------------------------------------------
// Author: <NAME>
// Source: http://www.codeproject.com/KB/list/CGridListCtrlEx.aspx
// License: Free to use for all (New BSD License)
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//! Abstract interface for persisting view configuration
//------------------------------------------------------------------------
class CViewConfigSection
{
protected:
CString m_ViewName; //!< Configuration name used when persisting the state (Translates into a section name)
//! Pure virtual interface for reading setting from persisting layer
virtual CString ReadSetting(const CString& strSection, const CString& strSetting, const CString& strDefval) const = 0;
//! Pure virtual interface for writing setting to persisting layer
virtual void WriteSetting(const CString& strSection, const CString& strSetting, const CString& strValue) = 0;
//! Pure virtual interface for removing setting section from persisting layer
virtual void RemoveSection(const CString& strSection) = 0;
// Converters
virtual CString ConvertBoolSetting(bool bValue) const;
virtual CString ConvertIntSetting(int nValue) const;
virtual CString ConvertFloatSetting(double nValue, int nDecimals = 6) const;
virtual CString ConvertArraySetting(const CSimpleArray<CString>& values, const CString& strDelimiter = _T(", ")) const;
virtual CString ConvertArraySetting(const CSimpleArray<int>& values, const CString& strDelimiter = _T(", ")) const;
virtual CString ConvertLogFontSetting(const LOGFONT& font) const;
virtual CString ConvertRectSetting(const RECT& rect) const;
virtual CString ConvertColorSetting(COLORREF color) const;
virtual void SplitArraySetting(const CString& strArray, CSimpleArray<CString>& values, const CString& strDelimiter = _T(", ")) const;
virtual const CString& GetSectionName() const;
public:
explicit CViewConfigSection(const CString& strViewName);
virtual ~CViewConfigSection();
// Getters
virtual CString GetSetting(const CString& strName, const CString& strDefval = _T("")) const;
virtual bool GetBoolSetting(const CString& strName, bool bDefval = false) const;
virtual int GetIntSetting(const CString& strName, int nDefval = 0) const;
virtual double GetFloatSetting(const CString& strName, double nDefval = 0.0) const;
virtual LOGFONT GetLogFontSetting(const CString& strName) const;
virtual CRect GetRectSetting(const CString& strName, const CRect& rectDefval = CRect(0,0,0,0)) const;
virtual COLORREF GetColorSetting(const CString& strName, const COLORREF colorDefval = RGB(0,0,0)) const;
virtual void GetArraySetting(const CString& strName, CSimpleArray<CString>& values, const CString& strDelimiter = _T(", ")) const;
virtual void GetArraySetting(const CString& strName, CSimpleArray<int>& values, const CString& strDelimiter = _T(", ")) const;
// Setters
virtual void SetSetting(const CString& strName, const CString& strValue);
virtual void SetBoolSetting(const CString& strName, bool bValue);
virtual void SetIntSetting(const CString& strName, int nValue);
virtual void SetFloatSetting(const CString& strName, double nValue, int nDecimals = 6);
virtual void SetArraySetting(const CString& strName, const CSimpleArray<CString>& values, const CString& strDelimiter = _T(", "));
virtual void SetArraySetting(const CString& strName, const CSimpleArray<int>& values, const CString& strDelimiter = _T(", "));
virtual void SetLogFontSetting(const CString& strName, const LOGFONT& font);
virtual void SetRectSetting(const CString& strName, const RECT& rect);
virtual void SetColorSetting(const CString& strName, COLORREF color);
virtual void RemoveCurrentConfig();
};
//------------------------------------------------------------------------
//! Abstract interface for persisting view configuration, that can use
//! an in-memory default-configuration.
//!
//! It will use the values in the default-config if nothing else can be found
//------------------------------------------------------------------------
class CViewConfigSectionDefault : public CViewConfigSection
{
protected:
//! Inner class that stores the default configuration in memory
class CViewConfigSectionLocal : public CViewConfigSection
{
protected:
CSimpleMap<CString,CString> m_LocalSettings; //!< Default configuration
// Persistence of settings
virtual CString ReadSetting(const CString& strSection, const CString& strName, const CString& strDefval) const;
virtual void WriteSetting(const CString& strSection, const CString& strName, const CString& strValue);
virtual void RemoveSection(const CString& strSection);
public:
explicit CViewConfigSectionLocal(const CString& strViewName);
CViewConfigSectionLocal(const CViewConfigSectionLocal& other);
CViewConfigSectionLocal& operator=(const CViewConfigSectionLocal& other);
bool HasSettings() const;
void CopySettings(CViewConfigSection& destination) const;
};
CViewConfigSectionLocal m_DefaultConfig; //!< Default configuration stored in memory
public:
explicit CViewConfigSectionDefault(const CString& strViewName);
virtual CViewConfigSection& GetDefaultConfig();
virtual bool HasDefaultConfig() const;
virtual void ResetConfigDefault();
virtual CString GetSetting(const CString& strName, const CString& strDefval = _T("")) const;
};
//------------------------------------------------------------------------
//! Abstract interface for persisting view configuration, that can switch
//! between different view configuration profiles.
//------------------------------------------------------------------------
class CViewConfigSectionProfiles : public CViewConfigSectionDefault
{
protected:
mutable CString m_CurrentSection; //!< Section name combined from the viewname and the current profile name
virtual const CString& GetSectionName() const;
virtual void SplitSectionName(const CString& strSection, CString& strViewName, CString& strProfile);
virtual CString JoinSectionName(const CString& strViewName, const CString& strProfile) const;
public:
explicit CViewConfigSectionProfiles(const CString& strViewName);
virtual void RemoveCurrentConfig();
virtual void GetProfiles(CSimpleArray<CString>& profiles) const;
virtual CString GetActiveProfile();
virtual void SetActiveProfile(const CString& strProfile);
virtual void AddProfile(const CString& strProfile);
virtual void DeleteProfile(const CString& strProfile);
};
//------------------------------------------------------------------------
//! Can persist the column configuration using CWinApp::WriteProfile()
//------------------------------------------------------------------------
class CViewConfigSectionWinApp : public CViewConfigSectionProfiles
{
protected:
virtual CString ReadSetting(const CString& strSection, const CString& strSetting, const CString& strDefval) const;
virtual void WriteSetting(const CString& strSection, const CString& strSetting, const CString& strValue);
virtual void RemoveSection(const CString& strSection);
public:
CViewConfigSectionWinApp(const CString& strViewName);
};
|
jamesdaniels/next-movies
|
components/UI/Navbar/index.js
|
<filename>components/UI/Navbar/index.js
import clsx from 'clsx';
import withTheme from 'utils/hocs/withTheme';
const SELECTED_CLASS_NAME = 'selected';
const DISABLED_CLASS_NAME = 'disabled';
const INVISIBLE_CLASS_NAME = 'invisible';
const NavbarItem = withTheme(({
theme,
className,
disabled,
selected,
invisible,
...rest
}) => (
<>
<li
className={
clsx(
{[SELECTED_CLASS_NAME]: selected},
{[DISABLED_CLASS_NAME]: disabled},
{[INVISIBLE_CLASS_NAME]: invisible},
className
)
}
{...rest} />
<style jsx>{`
li {
flex: 1;
color: var(--palette-text-secondary);
display: grid;
place-items: center;
}
li > :global(a) {
font-size: 1.5rem;
color: var(--palette-text-primary);
padding: 6px 12px;
text-align: center;
text-decoration: none;
transition: color ${theme.transitions.duration.short}ms ${theme.transitions.easing.easeInOut} 0ms, padding-top ${theme.transitions.duration.short}ms ${theme.transitions.easing.easeInOut} 0ms;
}
li.${SELECTED_CLASS_NAME} :global(a) {
color: var(--palette-primary-main);
}
li.${DISABLED_CLASS_NAME} :global(a) {
color: var(--palette-text-disabled);
pointer-events: none;
}
li.${INVISIBLE_CLASS_NAME} {
display: none;
}
`}</style>
</>
));
const Navbar = ({
theme,
...rest
}) => (
<>
<ul {...rest} />
<style jsx>{`
ul {
list-style-type: none;
margin: 16px 0;
padding: 0;
display: flex;
min-height: 46px;
justify-content: center;
overflow: hidden;
border: 1px solid var(--palette-divider);
background-color: var(--palette-background-paper);
transition: background-color var(--duration) var(--timing);
}
@media ${theme.mediaQueries.small} {
ul {
flex-direction: column;
}
}
`}</style>
</>
);
export {
NavbarItem
};
export default withTheme(Navbar);
|
anthonycanino/iree
|
integrations/tensorflow/test/lit.cfg.py
|
# Copyright 2021 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import os
import sys
import tempfile
import lit.formats
import lit.util
import lit.llvm
# Configuration file for the 'lit' test runner.
lit.llvm.initialize(lit_config, config)
from lit.llvm import llvm_config
llvm_config.with_system_environment("PYTHONPATH")
llvm_config.with_system_environment("VK_ICD_FILENAMES")
# Put execution artifacts in the temp dir.
config.test_exec_root = (os.environ.get("TEST_UNDECLARED_OUTPUTS_DIR") or
os.environ.get("TEST_TMPDIR") or
os.path.join(tempfile.gettempdir(), "lit"))
# name: The name of this test suite.
config.name = "TENSORFLOW_TESTS"
config.test_format = lit.formats.ShTest()
# suffixes: A list of file extensions to treat as test files.
config.suffixes = [".run"]
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
#config.use_default_substitutions()
config.excludes = [
"lit.cfg.py",
"lit.site.cfg.py",
"test_util.py",
"manual_test.py",
"squad_test_data.py",
"imagenet_test_data.py",
]
PYTHON_EXEC = sys.executable
# Some environments use a version of Python built against an embedded
# interpreter and lack a sys.executable. In this case, we allow an explicit
# override from the environment.
if PYTHON_EXEC is None:
PYTHON_EXEC = os.getenv("PYTHON")
config.substitutions.extend([
("%PYTHON", PYTHON_EXEC),
])
# Add our local projects to the PYTHONPATH
python_projects_dir = os.path.join(os.path.dirname(__file__), "..",
"python_projects")
test_src_dir = os.path.join(os.path.dirname(__file__), "python")
llvm_config.with_environment("PYTHONPATH", [
test_src_dir,
os.path.join(python_projects_dir, "iree_tf"),
os.path.join(python_projects_dir, "iree_tflite"),
os.path.join(python_projects_dir, "iree_xla"),
],
append_path=True)
# Enable features based on -D FEATURES=hugetest,vulkan
# syntax.
# We always allow "llvmaot". It can be disabled with -D DISABLE_FEATURES=llvmaot
disable_features_param = lit_config.params.get("DISABLE_FEATURES")
disable_features = []
if disable_features_param:
disable_features = disable_features_param.split(",")
if "llvmaot" not in disable_features:
config.available_features.add("llvmaot")
features_param = lit_config.params.get("FEATURES")
if features_param:
config.available_features.update(features_param.split(","))
|
0intro/9k
|
port/alarm.c
|
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
static Alarms alarms;
static Rendez alarmr;
void
alarmkproc(void*)
{
Proc *rp;
ulong now;
for(;;){
now = sys->ticks;
qlock(&alarms);
while((rp = alarms.head) && rp->alarm <= now){
if(rp->alarm != 0L){
if(canqlock(&rp->debug)){
if(!waserror()){
postnote(rp, 0, "alarm", NUser);
poperror();
}
qunlock(&rp->debug);
rp->alarm = 0L;
}else
break;
}
alarms.head = rp->palarm;
}
qunlock(&alarms);
sleep(&alarmr, return0, 0);
}
}
/*
* called every clock tick
*/
void
checkalarms(void)
{
Proc *p;
ulong now;
p = alarms.head;
now = sys->ticks;
if(p && p->alarm <= now)
wakeup(&alarmr);
}
ulong
procalarm(ulong time)
{
Proc **l, *f;
ulong when, old;
if(up->alarm)
old = tk2ms(up->alarm - sys->ticks);
else
old = 0;
if(time == 0) {
up->alarm = 0;
return old;
}
when = ms2tk(time)+sys->ticks;
qlock(&alarms);
l = &alarms.head;
for(f = *l; f; f = f->palarm) {
if(up == f){
*l = f->palarm;
break;
}
l = &f->palarm;
}
up->palarm = 0;
if(alarms.head) {
l = &alarms.head;
for(f = *l; f; f = f->palarm) {
if(f->alarm > when) {
up->palarm = f;
*l = up;
goto done;
}
l = &f->palarm;
}
*l = up;
}
else
alarms.head = up;
done:
up->alarm = when;
qunlock(&alarms);
return old;
}
|
NikolayMakhonin/AndroidAppExample
|
AndroidAppExample/Utils/src/main/java/com/github/nikolaymakhonin/utils/rx/RxOperators.java
|
<filename>AndroidAppExample/Utils/src/main/java/com/github/nikolaymakhonin/utils/rx/RxOperators.java
package com.github.nikolaymakhonin.utils.rx;
import com.github.nikolaymakhonin.utils.RefParam;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Observer;
import rx.Scheduler;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.internal.util.InternalObservableUtils;
import rx.schedulers.Schedulers;
import rx.subjects.PublishSubject;
import rx.subjects.Subject;
public final class RxOperators {
public static <T> OperatorDeferredWithTime<T> deferred(long timeout, TimeUnit unit) {
return deferred(timeout, unit, Schedulers.computation());
}
public static <T> OperatorDeferredWithTime<T> deferred(long timeout, TimeUnit unit, Scheduler scheduler) {
return new OperatorDeferredWithTime<>(timeout, unit, scheduler);
}
public static <T> Observable<T> toCompletable(Observable<T> observable, RefParam<Action0> outCompleteAction) {
boolean[] completed = new boolean[1];
Subject forceCompleteSubject = PublishSubject.create();
//Convert to completable
Observable completable = Observable.concatEager(observable, forceCompleteSubject).takeUntil(o -> completed[0]);
outCompleteAction.value = () -> {
//bindObservable will completed before next emit
completed[0] = true;
//Force complete bindObservable
forceCompleteSubject.onNext(null);
};
return completable;
}
//region replay with removable buffer
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the underlying Observable
* that will replay all of its items and notifications to any future {@link Observer}. A Connectable
* Observable resembles an ordinary Observable, except that it does not begin emitting items when it is
* subscribed to, but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @return a {@link ConnectableObservableRemovable} that upon connection causes the source Observable to emit its
* items to its {@link Observer}s
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable) {
return OperatorReplayRemovable.create(observable);
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on the items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable.
* <p>
* <img width="640" height="450" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.f.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* the selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @return an Observable that emits items that are the results of invoking the selector on a
* {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector) {
return OperatorReplayRemovable.multicastSelector(InternalObservableUtils.createReplaySupplier(observable), selector);
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying {@code bufferSize} notifications.
* <p>
* <img width="640" height="440" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fn.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* the selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param bufferSize
* the buffer size that limits the number of items the connectable observable can replay
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable
* replaying no more than {@code bufferSize} items
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector, final int bufferSize) {
return OperatorReplayRemovable.multicastSelector(InternalObservableUtils.createReplaySupplier(observable, bufferSize), selector);
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying no more than {@code bufferSize} items that were emitted within a specified time window.
* <p>
* <img width="640" height="445" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fnt.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} operates by default on the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param bufferSize
* the buffer size that limits the number of items the connectable observable can replay
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable, and
* replays no more than {@code bufferSize} items that were emitted within the window defined by
* {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector, int bufferSize, long time, TimeUnit unit) {
return replay(observable, selector, bufferSize, time, unit, Schedulers.computation());
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying no more than {@code bufferSize} items that were emitted within a specified time window.
* <p>
* <img width="640" height="445" height="440" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fnts.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param bufferSize
* the buffer size that limits the number of items the connectable observable can replay
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @param scheduler
* the Scheduler that is the time source for the window
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable, and
* replays no more than {@code bufferSize} items that were emitted within the window defined by
* {@code time}
* @throws IllegalArgumentException
* if {@code bufferSize} is less than zero
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) {
if (bufferSize < 0) {
throw new IllegalArgumentException("bufferSize < 0");
}
return OperatorReplayRemovable.multicastSelector(
InternalObservableUtils.createReplaySupplier(observable, bufferSize, time, unit, scheduler), selector);
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying a maximum of {@code bufferSize} items.
* <p>
* <img width="640" height="440" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fns.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param bufferSize
* the buffer size that limits the number of items the connectable observable can replay
* @param scheduler
* the Scheduler on which the replay is observed
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying no more than {@code bufferSize} notifications
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, final Func1<? super Observable<T>, ? extends Observable<R>> selector, final int bufferSize, final Scheduler scheduler) {
return OperatorReplayRemovable.multicastSelector(InternalObservableUtils.createReplaySupplier(observable, bufferSize),
InternalObservableUtils.createReplaySelectorAndObserveOn(selector, scheduler));
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying all items that were emitted within a specified time window.
* <p>
* <img width="640" height="435" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.ft.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} operates by default on the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying all items that were emitted within the window defined by {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector, long time, TimeUnit unit) {
return replay(observable, selector, time, unit, Schedulers.computation());
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying all items that were emitted within a specified time window.
* <p>
* <img width="640" height="440" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fts.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @param scheduler
* the scheduler that is the time source for the window
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying all items that were emitted within the window defined by {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, Func1<? super Observable<T>, ? extends Observable<R>> selector, final long time, final TimeUnit unit, final Scheduler scheduler) {
return OperatorReplayRemovable.multicastSelector(
InternalObservableUtils.createReplaySupplier(observable, time, unit, scheduler), selector);
}
/**
* Returns an Observable that emits items that are the results of invoking a specified selector on items
* emitted by a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable.
* <p>
* <img width="640" height="445" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fs.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param <R>
* the type of items emitted by the resulting Observable
* @param selector
* a selector function, which can use the multicasted sequence as many times as needed, without
* causing multiple subscriptions to the Observable
* @param scheduler
* the Scheduler where the replay is observed
* @return an Observable that emits items that are the results of invoking the selector on items emitted by
* a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable,
* replaying all items
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <R, T> Observable<R> replay(Observable<T> observable, final Func1<? super Observable<T>, ? extends Observable<R>> selector, final Scheduler scheduler) {
return OperatorReplayRemovable.multicastSelector(
InternalObservableUtils.createReplaySupplier(observable),
InternalObservableUtils.createReplaySelectorAndObserveOn(selector, scheduler));
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable that
* replays at most {@code bufferSize} items emitted by that Observable. A Connectable Observable resembles
* an ordinary Observable, except that it does not begin emitting items when it is subscribed to, but only
* when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.n.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param bufferSize
* the buffer size that limits the number of items that can be replayed
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items emitted by that Observable
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, final int bufferSize) {
return OperatorReplayRemovable.create(observable, bufferSize);
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items that were emitted during a specified time window. A Connectable
* Observable resembles an ordinary Observable, except that it does not begin emitting items when it is
* subscribed to, but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.nt.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} operates by default on the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param bufferSize
* the buffer size that limits the number of items that can be replayed
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items that were emitted during the window defined by
* {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, int bufferSize, long time, TimeUnit unit) {
return replay(observable, bufferSize, time, unit, Schedulers.computation());
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* that replays a maximum of {@code bufferSize} items that are emitted within a specified time window. A
* Connectable Observable resembles an ordinary Observable, except that it does not begin emitting items
* when it is subscribed to, but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.nts.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param bufferSize
* the buffer size that limits the number of items that can be replayed
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @param scheduler
* the scheduler that is used as a time source for the window
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items that were emitted during the window defined by
* {@code time}
* @throws IllegalArgumentException
* if {@code bufferSize} is less than zero
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) {
if (bufferSize < 0) {
throw new IllegalArgumentException("bufferSize < 0");
}
return OperatorReplayRemovable.create(observable, time, unit, scheduler, bufferSize);
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items emitted by that Observable. A Connectable Observable resembles
* an ordinary Observable, except that it does not begin emitting items when it is subscribed to, but only
* when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.ns.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param bufferSize
* the buffer size that limits the number of items that can be replayed
* @param scheduler
* the scheduler on which the Observers will observe the emitted items
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays at most {@code bufferSize} items that were emitted by the Observable
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, final int bufferSize, final Scheduler scheduler) {
return OperatorReplayRemovable.observeOn(replay(observable, bufferSize), scheduler);
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays all items emitted by that Observable within a specified time window. A Connectable Observable
* resembles an ordinary Observable, except that it does not begin emitting items when it is subscribed to,
* but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.t.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>This version of {@code replay} operates by default on the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays the items that were emitted during the window defined by {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, long time, TimeUnit unit) {
return replay(observable, time, unit, Schedulers.computation());
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays all items emitted by that Observable within a specified time window. A Connectable Observable
* resembles an ordinary Observable, except that it does not begin emitting items when it is subscribed to,
* but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.ts.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param time
* the duration of the window in which the replayed items must have been emitted
* @param unit
* the time unit of {@code time}
* @param scheduler
* the Scheduler that is the time source for the window
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable and
* replays the items that were emitted during the window defined by {@code time}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, final long time, final TimeUnit unit, final Scheduler scheduler) {
return OperatorReplayRemovable.create(observable, time, unit, scheduler);
}
/**
* Returns a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable that
* will replay all of its items and notifications to any future {@link Observer} on the given
* {@link Scheduler}. A Connectable Observable resembles an ordinary Observable, except that it does not
* begin emitting items when it is subscribed to, but only when its {@code connect} method is called.
* <p>
* <img width="640" height="515" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.s.png" alt="">
* <dl>
* <dt><b>Backpressure Support:</b></dt>
* <dd>This operator supports backpressure. Note that the upstream requests are determined by the child
* Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
* request 100 elements from the underlying Observable sequence.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>you specify which {@link Scheduler} this operator will use</dd>
* </dl>
*
* @param scheduler
* the Scheduler on which the Observers will observe the emitted items
* @return a {@link ConnectableObservableRemovable} that shares a single subscription to the source Observable that
* will replay all of its items and notifications to any future {@link Observer} on the given
* {@link Scheduler}
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
*/
public static <T> ConnectableObservableRemovable<T> replay(Observable<T> observable, final Scheduler scheduler) {
return OperatorReplayRemovable.observeOn(replay(observable), scheduler);
}
//endregion
}
|
AngularJS-Angular2-Angular4/angular2-project
|
pctl.mod.address/src/main/java/com/centurylink/pctl/mod/address/domain/address/LocationRequest.java
|
package com.centurylink.pctl.mod.address.domain.address;
/**
* Created by haribabu.ka on 17-10-2016.
*/
public class LocationRequest {
public Address serviceAddress;
public Address shippingAddress;
public LocationRequest() {
}
public LocationRequest(Address serviceAddress, Address shippingAddress) {
this.serviceAddress = serviceAddress;
this.shippingAddress = shippingAddress;
}
public void setServiceAddress(Address serviceAddress) {
this.serviceAddress = serviceAddress;
}
public void setShippingAddress(Address shippingAddress) {
this.shippingAddress = shippingAddress;
}
public Address getServiceAddress() {
return serviceAddress;
}
public Address getShippingAddress() {
return shippingAddress;
}
}
|
noinarisak/homebrew-cask
|
Casks/dmm-player.rb
|
<gh_stars>1-10
cask 'dmm-player' do
version '1.6.0.4'
sha256 '177c5b190ce71d6fdff99a6cc78b14e3948bb606ad00dbedd8c02e07807b3d16'
url "http://portalapp.dmm.com/silverlightplayer/dmm/m/#{version.dots_to_underscores}/DMMPlayerInstaller_#{version.dots_to_underscores}.pkg"
name 'DMM Player'
homepage 'https://www.dmm.com/digital/howto_dmmplayer_html/'
pkg "DMMPlayerInstaller_#{version.dots_to_underscores}.pkg"
uninstall pkgutil: [
'com.apple.ScriptEditor.id.DMMPlayer*',
'3117044984.dmm.player.dmm.com',
]
end
|
ScalablyTyped/SlinkyTyped
|
a/activex-excel/src/main/scala/typingsSlinky/activexExcel/Excel/ListRow.scala
|
<filename>a/activex-excel/src/main/scala/typingsSlinky/activexExcel/Excel/ListRow.scala
package typingsSlinky.activexExcel.Excel
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait ListRow extends StObject {
val Application: typingsSlinky.activexExcel.Excel.Application = js.native
val Creator: XlCreator = js.native
def Delete(): Unit = js.native
@JSName("Excel.ListRow_typekey")
var ExcelDotListRow_typekey: ListRow = js.native
val Index: Double = js.native
val InvalidData: Boolean = js.native
val Parent: js.Any = js.native
def Range(Address: String): typingsSlinky.activexExcel.Excel.Range = js.native
def Range(RowIndex: Double): typingsSlinky.activexExcel.Excel.Range = js.native
def Range(RowIndex: Double, ColumnIndex: Double): typingsSlinky.activexExcel.Excel.Range = js.native
@JSName("Range")
val Range_Original: Range = js.native
}
|
ScalablyTyped/SlinkyTyped
|
m/miniprogram/src/main/scala/typingsSlinky/miniprogram/LaunchQuery.scala
|
package typingsSlinky.miniprogram
import typingsSlinky.miniprogram.anon.AppId
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait LaunchQuery extends StObject {
var path: String = js.native
/**
* Current Mini Program query, parsed from the query field in the startup parameter
*/
var query: js.Any = js.native
var referrerInfo: js.UndefOr[AppId] = js.native
}
object LaunchQuery {
@scala.inline
def apply(path: String, query: js.Any): LaunchQuery = {
val __obj = js.Dynamic.literal(path = path.asInstanceOf[js.Any], query = query.asInstanceOf[js.Any])
__obj.asInstanceOf[LaunchQuery]
}
@scala.inline
implicit class LaunchQueryMutableBuilder[Self <: LaunchQuery] (val x: Self) extends AnyVal {
@scala.inline
def setPath(value: String): Self = StObject.set(x, "path", value.asInstanceOf[js.Any])
@scala.inline
def setQuery(value: js.Any): Self = StObject.set(x, "query", value.asInstanceOf[js.Any])
@scala.inline
def setReferrerInfo(value: AppId): Self = StObject.set(x, "referrerInfo", value.asInstanceOf[js.Any])
@scala.inline
def setReferrerInfoUndefined: Self = StObject.set(x, "referrerInfo", js.undefined)
}
}
|
yequ1001/1234
|
public/depot/developer/read/index.js
|
<reponame>yequ1001/1234
$(document).ready(function(){
layui.use('element', function(){
var element = layui.element;
});
layui.use('form', function(){
var form = layui.form;
});
$i = 0;
$("code").each(function() {
$text = $(this).html();
$text = $text.replace(/<br\/?>/gi, "");
$(this).html($text);
});
$("code").each(function() {
$text = $(this).html();
$text = $text.replace(/<br\/?>/gi, "\n");
$text = $text.replace(/<[^>]+>/g, "");
$(this).after('<textarea id="textarea_copy_'+ $i +'">'+ $text +'</textarea><a class="a-copy layui-btn layui-btn-primary" data-clipboard-action="copy" data-clipboard-target="#textarea_copy_'+ $i +'" onclick="copy(\'#textarea_copy_'+ $i +'\')">一键复制</a><br/>');
$i ++;
});
// 代码视图显示行数
lineNumber();
});
// 清除文本选中状态
var clearSlct= "getSelection" in window ? function(){
window.getSelection().removeAllRanges();
} : function(){
document.selection.empty();
};
function lineNumber() {
$("pre code").each(function(){
$text = $(this).html();
$text = $.trim($text);
$arr = $text.split("\n");
$newText = "";
$i = 1;
console.log($arr);
$.each($arr, function(index, value){
$nbsp = value.match(/^ +/);
if ($nbsp != null) {
$nbsp = $nbsp[0].replace(/ /g, " "); // 此行将显示视图每行代码开头4空格减到2空格便于浏览
$nbsp = $nbsp.replace(/ /g, " ");
value = value.replace(/^ +/, $nbsp);
}
if ($i < 10) {
$newText += "<small>0"+ $i +"</small>"+ value +"<br/>";
} else {
$newText += "<small>"+ $i +"</small>"+ value +"<br/>";
}
$i ++;
});
$(this).html($newText);
});
}
// 一键复制辅助按钮
function copy($obj) {
layer.msg(msg_load_icon +"正在复制", msg_load);
// $obj必须是键盘可输入类型的元素,比如input和textarea
$obj = $($obj);
$obj.blur(); // 使输入框失去焦点
}
function del($id)
{
layer.confirm('您确定要删除这篇文章?', function(index){
$.ajax({
url: '/depot/developer/write',
type: 'DELETE',
data: {id: $id},
success: function(data) {
if (data == true) {
layer.msg(msg_ok_icon +"删除成功", msg_ok);
history.go(-1);
} else {
layer.msg(msg_ng_icon + data, msg_ng);
}
}
});
layer.close(index);
});
}
|
FavyTeam/Elderscape_server
|
source/game/npc/impl/superior/impl/GreaterAbyssalDemon.java
|
<reponame>FavyTeam/Elderscape_server
package game.npc.impl.superior.impl;
import core.GameType;
import core.ServerConstants;
import game.position.Position;
import game.entity.Entity;
import game.entity.EntityType;
import game.entity.combat_strategy.EntityCombatStrategy;
import game.npc.CustomNpcComponent;
import game.npc.Npc;
import game.npc.combat.Damage;
import game.npc.combat.DamageQueue;
import game.npc.impl.superior.SuperiorNpc;
import game.npc.impl.superior.SuperiorNpcCombatStrategy;
import game.player.Player;
import game.type.GameTypeIdentity;
import java.util.concurrent.ThreadLocalRandom;
/**
* Created by <NAME> on 2018-07-11 at 1:22 PM
*/
@CustomNpcComponent(identities = @GameTypeIdentity(type = GameType.OSRS, identity = 7410))
public class GreaterAbyssalDemon extends SuperiorNpc {
private final EntityCombatStrategy strategy = new GreaterAbyssalDemonCombatStrategy();
public GreaterAbyssalDemon(int npcId, int npcType) {
super(npcId, npcType);
}
@Override
public int parent() {
return 415;
}
@Override
public Npc copy(int index) {
return new GreaterAbyssalDemon(index, npcType);
}
@Override
public EntityCombatStrategy getCombatStrategyOrNull() {
return strategy;
}
private static class GreaterAbyssalDemonCombatStrategy extends SuperiorNpcCombatStrategy {
enum GreaterAbyssalDemonAttackType {
TELEPORT,
REGULAR
}
private int teleportsRemaining;
private GreaterAbyssalDemonAttackType attackType;
@Override
public int calculateAttackType(Entity attacker, Entity defender) {
if (attackType == GreaterAbyssalDemonAttackType.TELEPORT && teleportsRemaining > 0) {
return ServerConstants.MELEE_ICON;
}
if (ThreadLocalRandom.current().nextInt(0, 100) < 10) {
teleportsRemaining = 4;
attackType = GreaterAbyssalDemonAttackType.TELEPORT;
return ServerConstants.MELEE_ICON;
}
attackType = GreaterAbyssalDemonAttackType.REGULAR;
return ServerConstants.MELEE_ICON;
}
@Override
public void onCustomAttack(Entity attacker, Entity defender) {
if (attacker.getType() == EntityType.NPC && defender.getType() == EntityType.PLAYER) {
Npc attackerAsNpc = (Npc) attacker;
Player defenderAsPlayer = (Player) defender;
if (attackType == GreaterAbyssalDemonAttackType.TELEPORT) {
DamageQueue.add(new Damage(defenderAsPlayer, attackerAsNpc, ServerConstants.MELEE_ICON, 1, attackerAsNpc.getDefinition().maximumDamage, -1,
null, null, (d, p) -> {
Position teleport = new Position(p).surroundingUnblocked(1).stream().findAny().orElse(null);
if (teleport == null) {
return;
}
attackerAsNpc.move(teleport);
}));
teleportsRemaining--;
} else {
if (ThreadLocalRandom.current().nextInt(0, 100) <= 15) {
Position teleport = new Position(defenderAsPlayer).surroundingUnblocked(2).stream().findAny().orElse(null);
if (teleport == null) {
return;
}
defenderAsPlayer.move(teleport);
}
DamageQueue.add(new Damage(defenderAsPlayer, attackerAsNpc, ServerConstants.MELEE_ICON, 1, attackerAsNpc.getDefinition().maximumDamage, -1));
}
}
}
/**
* Referenced only if {@link #isCustomAttack()} returns true, in which case we can change some
* important combat related information to the attacker and defender, like attack speed.
*
* @param attacker the entity making the attack.
* @param defender the entity defending themselves.
*/
@Override
public void afterCustomAttack(Entity attacker, Entity defender) {
if (attackType == GreaterAbyssalDemonAttackType.TELEPORT && attacker.getType() == EntityType.NPC && defender.getType() == EntityType.PLAYER) {
Npc attackerAsNpc = (Npc) attacker;
attackerAsNpc.attackTimer = 2;
}
}
/**
* Determines if we're going to handle the entire attack process our self.
*
* @return {@code true} if it's a custom attack, by default, false.
*/
@Override
public boolean isCustomAttack() {
return true;
}
}
}
|
gothere/gothere.github.io
|
source_code/quicksort.cpp
|
/*
* @Author: Beinan
* @Date: 2015-01-04 15:28:13
* @Last Modified by: Beinan
* @Last Modified time: 2015-01-04 16:00:36
*/
#include <iostream>
#include <utility> // std::swap
using namespace std;
//end is inclusive
void quick_sort(int a[], int begin, int end){
if(begin >= end)
return;
int left = begin, right = end;
int pivot_value = a[left];
while (left < right)
{
if (a[left+1] < pivot_value) {
a[left] = a[left+1];
left++;
} else {
swap(a[left+1], a[right]);
right--;
}
}
a[left] = pivot_value;
quick_sort(a, begin, left - 1);
quick_sort(a, left + 1, end);
}
void quick_sort_wiki(int a[], int begin, int end){
if(begin >= end)
return;
int pivot_index = begin;
int pivot_value = a[pivot_index];
for (int k = begin + 1; k <= end; k++)
{
if (a[k] < pivot_value) {
pivot_index ++;
swap(a[pivot_index], a[k]);
}
}
swap(a[begin], a[pivot_index]);
quick_sort_wiki(a, begin, pivot_index - 1);
quick_sort_wiki(a, pivot_index + 1, end);
}
int main(){
int a[] = { 3, 4, 2, 1, 7, 5, 8, 9, 0, 6};
quick_sort(a, 0, 9);
for(int i = 0; i < 10; i++)
std::cout << a[i] << " ";
std::cout << std::endl;
return 0;
}
|
kargov/admitone-backend
|
src/main/java/com/ned/admitone/domain/event/json/EventMixIns.java
|
<reponame>kargov/admitone-backend
package com.ned.admitone.domain.event.json;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.ned.admitone.domain.event.EventInterface;
public class EventMixIns {
private EventMixIns() {
}
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
public abstract static class EventMixIn implements EventInterface {
@Override
@JsonProperty
public abstract Long getId();
@Override
@JsonProperty
public abstract String getName();
}
}
|
huyadcplat/alluxio
|
core/transport/src/main/java/alluxio/grpc/Scope.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/meta_master.proto
package alluxio.grpc;
/**
* Protobuf enum {@code alluxio.grpc.meta.Scope}
*/
public enum Scope
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>MASTER = 1;</code>
*/
MASTER(1),
/**
* <code>WORKER = 2;</code>
*/
WORKER(2),
/**
* <code>CLIENT = 4;</code>
*/
CLIENT(4),
/**
* <code>SERVER = 3;</code>
*/
SERVER(3),
/**
* <code>ALL = 7;</code>
*/
ALL(7),
/**
* <code>NONE = 0;</code>
*/
NONE(0),
;
/**
* <code>MASTER = 1;</code>
*/
public static final int MASTER_VALUE = 1;
/**
* <code>WORKER = 2;</code>
*/
public static final int WORKER_VALUE = 2;
/**
* <code>CLIENT = 4;</code>
*/
public static final int CLIENT_VALUE = 4;
/**
* <code>SERVER = 3;</code>
*/
public static final int SERVER_VALUE = 3;
/**
* <code>ALL = 7;</code>
*/
public static final int ALL_VALUE = 7;
/**
* <code>NONE = 0;</code>
*/
public static final int NONE_VALUE = 0;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Scope valueOf(int value) {
return forNumber(value);
}
public static Scope forNumber(int value) {
switch (value) {
case 1: return MASTER;
case 2: return WORKER;
case 4: return CLIENT;
case 3: return SERVER;
case 7: return ALL;
case 0: return NONE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Scope>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Scope> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Scope>() {
public Scope findValueByNumber(int number) {
return Scope.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return alluxio.grpc.MetaMasterProto.getDescriptor().getEnumTypes().get(1);
}
private static final Scope[] VALUES = values();
public static Scope valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Scope(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:alluxio.grpc.meta.Scope)
}
|
kyleaedwards/node-peek
|
lib/commands/cya.js
|
<gh_stars>0
'use strict';
module.exports = {
help: 'Closes the REPL.',
action() {
this.outputStream.write('SEE YOU SPACE COWBOY...\n');
this.close();
},
};
|
dgkatz/fastlane
|
fastlane_web/web_api/resources/pipeline.py
|
<reponame>dgkatz/fastlane<filename>fastlane_web/web_api/resources/pipeline.py
from .common.base import BaseResource
from ..libs.respository import create_repo
from ..models.models import Pipeline, PipelineType, PipelineStatus
from ..schemas.pipeline import (
PipelineGetSchema,
PipelineListSchema,
PipelineDeleteSchema,
PipelineSchema,
PipelinePostSchema
)
from flask import request, jsonify
from flask.helpers import make_response
from flask_restful import abort
class PipelineAPI(BaseResource):
def __init__(self):
self.pipeline_repo = create_repo(model=Pipeline)
def get(self):
params = self.validate_request(schema=PipelineGetSchema, kwargs=request.values)
pipeline_id = params.get('pipeline_id')
pipeline = self.pipeline_repo.get(entity_id=pipeline_id)
response = PipelineSchema().dump(pipeline)
return make_response(jsonify(response), 200)
def delete(self):
params = self.validate_request(schema=PipelineDeleteSchema, kwargs=request.values)
pipeline_id = params.get('pipeline_id')
pipeline = self.pipeline_repo.get(entity_id=pipeline_id)
if pipeline:
self.pipeline_repo.delete(entity=pipeline, commit=True)
return make_response(200)
def post(self):
params = self.validate_request(schema=PipelinePostSchema, kwargs=request.json)
pipeline_id = params.get('pipeline_id')
pipeline = self.pipeline_repo.get(entity_id=pipeline_id)
if pipeline:
abort(400, message=f'Pipeline with id {pipeline_id} already exists.')
pipeline = Pipeline(
id=pipeline_id,
source_type=params.get('source_type'),
target_type=params.get('target_type'),
pipeline_type=PipelineType(params.get('pipeline_type')),
config=params.get('config')
)
self.pipeline_repo.save(entity=pipeline, commit=True)
class PipelineListAPI(BaseResource):
def __init__(self):
self.pipeline_repo = create_repo(model=Pipeline)
def get(self):
params = self.validate_request(schema=PipelineListSchema, kwargs=request.values)
pipeline_status = params.get('pipeline_status')
pipeline_type = params.get('pipeline_type')
filters = []
if pipeline_status:
filters.append(Pipeline.last_run.status == PipelineStatus[pipeline_status])
if pipeline_type:
filters.append(Pipeline.pipeline_type == PipelineType[pipeline_type])
pipeline = self.pipeline_repo.find_by(filters=filters)
response = PipelineSchema().dump(pipeline, many=True)
return make_response(jsonify(response), 200)
|
xLifeFelix/Prog2
|
Strategiespiel/src/de/hsa/games/fatsquirrel/entities/GoodBeast.java
|
package de.hsa.games.fatsquirrel.entities;
import de.hsa.games.fatsquirrel.core.EntityContext;
import de.hsa.games.fatsquirrel.util.XY;
import de.hsa.games.fatsquirrel.util.XYsupport;
public class GoodBeast extends Character {
private static final int DEFAULT_ENERGY = 200;
private int stepCount = 1;
public GoodBeast(XY xy) {
super(DEFAULT_ENERGY, xy);
}
@Override
public void nextStep(EntityContext context) {
stepCount--;
if(stepCount > 0)
return;
stepCount = 4;
Squirrel s = context.nearestSquirrel(getXY());
if (s != null) {
XY squirrelPos = s.getXY();
int x, y;
int diff = squirrelPos.x - getXY().x;
if (diff > 0)
x = -1;
else if (diff < 0)
x = 1;
else
x = 0;
diff = squirrelPos.y - getXY().y;
if (diff > 0)
y = -1;
else if (diff < 0)
y = 1;
else
y = 0;
context.tryMove(this, new XY(x, y));
} else {
context.tryMove(this, XYsupport.getRandomVector());
}
}
public String toString() {
return "GoodBeast" + super.toString();
}
}
|
ChinaLHR/Gungnir
|
gungnir-rpc-example/consumer-1/src/main/java/io/github/chinalhr/consumer1/BeanConfig.java
|
package io.github.chinalhr.consumer1;
import io.github.chinalhr.gungnir.netchannel.client.GungnirClientProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Author : ChinaLHR
* @Date : Create in 17:24 2018/5/25
* @Email : <EMAIL>
*/
@Configuration
public class BeanConfig {
@Bean(name = "IDataService")
public GungnirClientProxy getGungnirClientProxy(){
GungnirClientProxy iDataServicce = new GungnirClientProxy();
iDataServicce.setSerializer("protostuff");
iDataServicce.setIclass(IDataService.class);
iDataServicce.setVersion("1.0.0");
iDataServicce.setTimeoutMillis(5000);
iDataServicce.setGroupName("dev");
iDataServicce.setLoadBalance("random");
return iDataServicce;
}
}
|
pbrown801/aggienova-templates
|
python/test.py
|
<filename>python/test.py
import matplotlib.pyplot as plt
from matplotlib.transforms import Bbox
import numpy as np
n = 50
t = np.linspace(0,20,50)
data = np.cumsum(np.random.randn(50,n), axis=0)
fig, ax = plt.subplots()
fig.subplots_adjust(right=0.78)
ax.set_prop_cycle(color=plt.cm.gist_rainbow(np.linspace(0,1,data.shape[1])))
for i in range(data.shape[1]):
ax.plot(t, data[:,i], label=f"Label {i}")
legend = ax.legend(loc="upper left", bbox_to_anchor=(1.02, 0, 0.07, 1))
# pixels to scroll per mousewheel event
d = {"down" : 30, "up" : -30}
def func(evt):
if legend.contains(evt):
bbox = legend.get_bbox_to_anchor()
print(bbox.y0+d[evt.button])
bbox = Bbox.from_bounds(bbox.x0, bbox.y0+d[evt.button], bbox.width, bbox.height)
tr = legend.axes.transAxes.inverted()
legend.set_bbox_to_anchor(bbox.transformed(tr))
fig.canvas.draw_idle()
fig.canvas.mpl_connect("scroll_event", func)
plt.show()
|
dikaeinstein/post-comment-api
|
src/posts/useCases/editPost.spec.js
|
import assert from 'assert';
import cases from 'jest-in-case';
import { makeFakeModel } from '__test__/fixtures/db';
import makeFakePost from '__test__/fixtures/post';
import { makeDocumentNotFoundError } from 'src/common/errors';
import makeEditPost from './editPost';
import PostRepository from '../repository/post';
/** @type {PostRepository} */
let postRepository;
beforeAll(() => {
const model = makeFakeModel('Post');
postRepository = new PostRepository({ model });
});
const editPostValidationTestCases = [
{
name: 'must include an id',
input: { id: undefined },
wantErrMessage: 'You must supply post id.',
},
{
name: 'must include a title',
input: { title: undefined },
wantErrMessage: 'You must supply post title.',
},
{
name: 'must include a text',
input: { text: undefined },
wantErrMessage: 'You must supply post text.',
},
{
name: 'handles not existent post',
input: {},
wantErrMessage: 'Post not found.',
},
];
const editPostValidationTestFunction = async ({ input, wantErrMessage }) => {
const post = makeFakePost(input);
const editPost = makeEditPost({
postRepository, assert, makeDocumentNotFoundError,
});
expect(editPost(post)).rejects.toThrow(wantErrMessage);
};
cases('editPost use case',
editPostValidationTestFunction, editPostValidationTestCases);
describe('editPost use case', () => {
it('does not modify an existing post without new change', async () => {
const post = makeFakePost();
await postRepository.insert(post);
const editPost = makeEditPost({
postRepository, assert, makeDocumentNotFoundError,
});
const updatedPost = await editPost(post);
expect(updatedPost.text).toEqual(post.text);
expect(updatedPost.modifiedOn).toEqual(post.modifiedOn);
expect(updatedPost.hash).toEqual(post.hash);
});
it('modifies an existing post', async () => {
const post = makeFakePost();
await postRepository.insert(post);
const editPost = makeEditPost({
postRepository, assert, makeDocumentNotFoundError,
});
const updatedPost = await editPost({ ...post, text: 'updated post' });
expect(updatedPost.text).toEqual('updated post');
expect(updatedPost.hash).not.toEqual(post.hash);
});
});
|
joaquinfilipic/get-out
|
server-side/webapp/src/main/java/ar/edu/itba/paw/webapp/rest/pubInformation/DrinkController.java
|
<reponame>joaquinfilipic/get-out
package ar.edu.itba.paw.webapp.rest.pubInformation;
import java.net.URI;
import javax.inject.Inject;
import javax.validation.Valid;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import org.springframework.stereotype.Controller;
import ar.edu.itba.paw.interfaces.service.PubService;
import ar.edu.itba.paw.interfaces.service.pubInformation.PubDrinkService;
import ar.edu.itba.paw.model.error.ErrorType;
import ar.edu.itba.paw.model.pub.information.PubDrink;
import ar.edu.itba.paw.model.support.GetOutException;
import ar.edu.itba.paw.webapp.dto.IdDto;
import ar.edu.itba.paw.webapp.form.pub.information.DrinkForm;
import ar.edu.itba.paw.webapp.support.GetOutMediaType;
import ar.edu.itba.paw.webapp.support.SecuritySupport;
import ar.edu.itba.paw.webapp.validator.PubOwnerValidator;
@Controller
@Path("/v1.0")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(GetOutMediaType.APPLICATION_GETOUT_v1_JSON)
public class DrinkController {
private final PubDrinkService drinkService;
private final PubService pubService;
@Inject
public DrinkController(final PubDrinkService drinkService, final PubService pubService) {
this.drinkService = drinkService;
this.pubService = pubService;
}
@POST
@Path("/drinks")
public Response createDrink(@Valid final DrinkForm form, @Context final UriInfo uri) {
return SecuritySupport.getPrincipal()
.map(auth -> {
PubOwnerValidator.validateOwnership(auth.getId(), pubService.findById(form.getPubId()));
PubDrink drink = drinkService
.create(form.getPubId(), form.getDrink(), form.getPrice().doubleValue());
final URI location = uri.getBaseUriBuilder()
.path("/v1.0/drinks")
.path(String.valueOf(drink.getId()))
.build();
return Response.created(location).entity(new IdDto().id(drink.getId())).build();
})
.orElseThrow(() -> GetOutException.of(ErrorType.EMPTY_AUTHENTICATION_TOKEN));
}
@PUT
@Path("/drinks/{id}")
public Response updateDrink(@Valid final DrinkForm form, @PathParam("id") final long id) {
return SecuritySupport.getPrincipal()
.map(auth -> {
PubOwnerValidator.validateOwnership(auth.getId(), pubService.findById(form.getPubId()));
return drinkService.findById(id)
.map(drink -> {
drinkService.update(
id, form.getPubId(), form.getDrink(), form.getPrice().doubleValue());
return Response.noContent().build();
})
.orElseThrow(() -> GetOutException.of(ErrorType.RESOURCE_NOT_FOUND));
})
.orElseThrow(() -> GetOutException.of(ErrorType.EMPTY_AUTHENTICATION_TOKEN));
}
@GET
@Path("/drinks/{id}")
public Response getDrink(@PathParam("id") final long id) {
return drinkService.findById(id)
.map(drink -> {
return Response.ok().entity(drink).build();
})
.orElseThrow(() -> GetOutException.of(ErrorType.RESOURCE_NOT_FOUND));
}
@GET
@Path("/drinks/pub/{id}")
public Response getDrinksByPub(@PathParam("id") final long id) {
return pubService.findById(id)
.map(pub -> {
return Response.ok().entity(drinkService.listDrinksByPub(id)).build();
})
.orElseThrow(() -> GetOutException.of(ErrorType.RESOURCE_NOT_FOUND));
}
@DELETE
@Path("/drinks/{id}")
public Response deleteDrink(@PathParam("id") final long id) {
return SecuritySupport.getPrincipal()
.map(auth -> {
drinkService.findById(id).ifPresent(drink -> {
PubOwnerValidator.validateOwnership(auth.getId(), pubService.findById(drink.getPubId()));
drinkService.delete(id);
});
return Response.noContent().build();
})
.orElseThrow(() -> GetOutException.of(ErrorType.EMPTY_AUTHENTICATION_TOKEN));
}
}
|
MingfeiPan/leetcode
|
math/7.c
|
//注意转换关系 ret = ret * 10 + x % 10
int reverse(int x) {
long ret = 0;
while(x != 0)
{
ret = ret * 10 + x % 10;
x = x / 10;
if(ret < INT_MIN || ret > INT_MAX) return 0;
}
return ret;
}
|
akila543/javascript
|
Server/routes/workflowRoutes/updateWorkflow.js
|
//module imports
const fs = require('fs');
const updateWorkflow = require('express').Router();
const MongoClient = require('mongodb').MongoClient;
const yaml = require('js-yaml');
//use a middleware
updateWorkflow.use(require('body-parser').json());
// Connection URL
var url = 'mongodb://localhost:27017/workflows';
//router
updateWorkflow.post('/workflows/update', function(req, res, next) {
console.log("++++ Workflow update request <<=== " + JSON.stringify(req.body) + " ===>>");
//converting the workflow to json from yaml
req.body.content = yaml.safeLoad(req.body.content);
//first writing it into a file for backup
fs.writeFile("./workflows/" + req.body.templateName,req.body.content, 'utf8', function(err) {
if (err) {
console.log('---- File write error <<=== ' + err + ' ===>>');
} else {
next();
}
});
}, function(req, res) {
//storing updated content to mongodb
MongoClient.connect(url, function(err, db) {
if (err) {
console.log('---- DB connection error <<=== ' + err + ' ===>>');
} else {
db.collection('templates').updateOne({
templateName: req.body.templateName
}, {
$set: {
content: req.body.content,
transFunction: req.body.transfunction
}
}, function(err, result) {
if (err) {
console.log('---- DB update error <<=== ' + err + ' ===>>');
} else {
console.log("+-+- Workflow update status(+1-0) <<=== " + result.result.n + " ===>>");
res.send('Successfully updated.');
db.close();
}
});// end of update
}
}); // end of MongoClient
});// end of router
module.exports = updateWorkflow;
|
Whizkevina/SidebarVulcan
|
packages/sidebar2020/lib/modules/newsletters/helpers.js
|
import { Connectors } from "meteor/vulcan:core";
import Posts from "../../modules/posts/collection";
export const getSubject = (newsletter) => {
const { postsIds } = newsletter;
const posts = Connectors.find(Posts, { _id: { $in: postsIds } });
const subject = posts
.map((post, index) =>
index > 0 ? `, ${post.shortTitle}` : post.shortTitle
)
.join("");
return Utils.trimWords(subject, 15);
};
|
ScalablyTyped/SlinkyTyped
|
e/estree/src/main/scala/typingsSlinky/estree/mod/BaseCallExpression.scala
|
package typingsSlinky.estree.mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait BaseCallExpression extends BaseNode {
var arguments: js.Array[Expression | SpreadElement] = js.native
var callee: Expression | Super = js.native
}
object BaseCallExpression {
@scala.inline
def apply(arguments: js.Array[Expression | SpreadElement], callee: Expression | Super, `type`: String): BaseCallExpression = {
val __obj = js.Dynamic.literal(arguments = arguments.asInstanceOf[js.Any], callee = callee.asInstanceOf[js.Any])
__obj.updateDynamic("type")(`type`.asInstanceOf[js.Any])
__obj.asInstanceOf[BaseCallExpression]
}
@scala.inline
implicit class BaseCallExpressionMutableBuilder[Self <: BaseCallExpression] (val x: Self) extends AnyVal {
@scala.inline
def setArguments(value: js.Array[Expression | SpreadElement]): Self = StObject.set(x, "arguments", value.asInstanceOf[js.Any])
@scala.inline
def setArgumentsVarargs(value: (Expression | SpreadElement)*): Self = StObject.set(x, "arguments", js.Array(value :_*))
@scala.inline
def setCallee(value: Expression | Super): Self = StObject.set(x, "callee", value.asInstanceOf[js.Any])
}
}
|
jack-debug/Ares-1.0-Source-Leak
|
org/spongepowered/asm/lib/FieldWriter.java
|
package org.spongepowered.asm.lib;
final class FieldWriter extends FieldVisitor
{
private final ClassWriter cw;
private final int access;
private final int name;
private final int desc;
private int signature;
private int value;
private AnnotationWriter anns;
private AnnotationWriter ianns;
private AnnotationWriter tanns;
private AnnotationWriter itanns;
private Attribute attrs;
FieldWriter(final ClassWriter a1, final int a2, final String a3, final String a4, final String a5, final Object a6) {
super(327680);
if (a1.firstField == null) {
a1.firstField = this;
}
else {
a1.lastField.fv = this;
}
a1.lastField = this;
this.cw = a1;
this.access = a2;
this.name = a1.newUTF8(a3);
this.desc = a1.newUTF8(a4);
if (a5 != null) {
this.signature = a1.newUTF8(a5);
}
if (a6 != null) {
this.value = a1.newConstItem(a6).index;
}
}
public AnnotationVisitor visitAnnotation(final String a1, final boolean a2) {
final ByteVector v1 = /*EL:150*/new ByteVector();
/*SL:152*/v1.putShort(this.cw.newUTF8(a1)).putShort(0);
final AnnotationWriter v2 = /*EL:153*/new AnnotationWriter(this.cw, true, v1, v1, 2);
/*SL:154*/if (a2) {
/*SL:155*/v2.next = this.anns;
/*SL:156*/this.anns = v2;
}
else {
/*SL:158*/v2.next = this.ianns;
/*SL:159*/this.ianns = v2;
}
/*SL:161*/return v2;
}
public AnnotationVisitor visitTypeAnnotation(final int a1, final TypePath a2, final String a3, final boolean a4) {
final ByteVector v1 = /*EL:170*/new ByteVector();
/*SL:172*/AnnotationWriter.putTarget(a1, a2, v1);
/*SL:174*/v1.putShort(this.cw.newUTF8(a3)).putShort(0);
final AnnotationWriter v2 = /*EL:175*/new AnnotationWriter(this.cw, true, v1, v1, v1.length - 2);
/*SL:177*/if (a4) {
/*SL:178*/v2.next = this.tanns;
/*SL:179*/this.tanns = v2;
}
else {
/*SL:181*/v2.next = this.itanns;
/*SL:182*/this.itanns = v2;
}
/*SL:184*/return v2;
}
public void visitAttribute(final Attribute a1) {
/*SL:189*/a1.next = this.attrs;
/*SL:190*/this.attrs = a1;
}
public void visitEnd() {
}
int getSize() {
int v1 = /*EL:207*/8;
/*SL:208*/if (this.value != 0) {
/*SL:209*/this.cw.newUTF8("ConstantValue");
/*SL:210*/v1 += 8;
}
/*SL:212*/if ((this.access & 0x1000) != 0x0 && /*EL:213*/((this.cw.version & 0xFFFF) < 49 || (this.access & 0x40000) != 0x0)) {
/*SL:215*/this.cw.newUTF8("Synthetic");
/*SL:216*/v1 += 6;
}
/*SL:219*/if ((this.access & 0x20000) != 0x0) {
/*SL:220*/this.cw.newUTF8("Deprecated");
/*SL:221*/v1 += 6;
}
/*SL:223*/if (this.signature != 0) {
/*SL:224*/this.cw.newUTF8("Signature");
/*SL:225*/v1 += 8;
}
/*SL:227*/if (this.anns != null) {
/*SL:228*/this.cw.newUTF8("RuntimeVisibleAnnotations");
/*SL:229*/v1 += 8 + this.anns.getSize();
}
/*SL:231*/if (this.ianns != null) {
/*SL:232*/this.cw.newUTF8("RuntimeInvisibleAnnotations");
/*SL:233*/v1 += 8 + this.ianns.getSize();
}
/*SL:235*/if (this.tanns != null) {
/*SL:236*/this.cw.newUTF8("RuntimeVisibleTypeAnnotations");
/*SL:237*/v1 += 8 + this.tanns.getSize();
}
/*SL:239*/if (this.itanns != null) {
/*SL:240*/this.cw.newUTF8("RuntimeInvisibleTypeAnnotations");
/*SL:241*/v1 += 8 + this.itanns.getSize();
}
/*SL:243*/if (this.attrs != null) {
/*SL:244*/v1 += this.attrs.getSize(this.cw, null, 0, -1, -1);
}
/*SL:246*/return v1;
}
void put(final ByteVector a1) {
final int v1 = /*EL:256*/64;
final int v2 = /*EL:257*/0x60000 | (this.access & 0x40000) / 64;
/*SL:259*/a1.putShort(this.access & ~v2).putShort(this.name).putShort(this.desc);
int v3 = /*EL:260*/0;
/*SL:261*/if (this.value != 0) {
/*SL:262*/++v3;
}
/*SL:264*/if ((this.access & 0x1000) != 0x0 && /*EL:265*/((this.cw.version & 0xFFFF) < 49 || (this.access & 0x40000) != 0x0)) {
/*SL:267*/++v3;
}
/*SL:270*/if ((this.access & 0x20000) != 0x0) {
/*SL:271*/++v3;
}
/*SL:273*/if (this.signature != 0) {
/*SL:274*/++v3;
}
/*SL:276*/if (this.anns != null) {
/*SL:277*/++v3;
}
/*SL:279*/if (this.ianns != null) {
/*SL:280*/++v3;
}
/*SL:282*/if (this.tanns != null) {
/*SL:283*/++v3;
}
/*SL:285*/if (this.itanns != null) {
/*SL:286*/++v3;
}
/*SL:288*/if (this.attrs != null) {
/*SL:289*/v3 += this.attrs.getCount();
}
/*SL:291*/a1.putShort(v3);
/*SL:292*/if (this.value != 0) {
/*SL:293*/a1.putShort(this.cw.newUTF8("ConstantValue"));
/*SL:294*/a1.putInt(2).putShort(this.value);
}
/*SL:296*/if ((this.access & 0x1000) != 0x0 && /*EL:297*/((this.cw.version & 0xFFFF) < 49 || (this.access & 0x40000) != 0x0)) {
/*SL:299*/a1.putShort(this.cw.newUTF8("Synthetic")).putInt(0);
}
/*SL:302*/if ((this.access & 0x20000) != 0x0) {
/*SL:303*/a1.putShort(this.cw.newUTF8("Deprecated")).putInt(0);
}
/*SL:305*/if (this.signature != 0) {
/*SL:306*/a1.putShort(this.cw.newUTF8("Signature"));
/*SL:307*/a1.putInt(2).putShort(this.signature);
}
/*SL:309*/if (this.anns != null) {
/*SL:310*/a1.putShort(this.cw.newUTF8("RuntimeVisibleAnnotations"));
/*SL:311*/this.anns.put(a1);
}
/*SL:313*/if (this.ianns != null) {
/*SL:314*/a1.putShort(this.cw.newUTF8("RuntimeInvisibleAnnotations"));
/*SL:315*/this.ianns.put(a1);
}
/*SL:317*/if (this.tanns != null) {
/*SL:318*/a1.putShort(this.cw.newUTF8("RuntimeVisibleTypeAnnotations"));
/*SL:319*/this.tanns.put(a1);
}
/*SL:321*/if (this.itanns != null) {
/*SL:322*/a1.putShort(this.cw.newUTF8("RuntimeInvisibleTypeAnnotations"));
/*SL:323*/this.itanns.put(a1);
}
/*SL:325*/if (this.attrs != null) {
/*SL:326*/this.attrs.put(this.cw, null, 0, -1, -1, a1);
}
}
}
|
CaelestisZ/HeraQ
|
drivers/sensorhub/stm_v2/ssp_sensorhub.c
|
/*
* Copyright (C) 2015, Samsung Electronics Co. Ltd. All Rights Reserved.
*
* 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.
*
*/
#include "ssp_sensorhub.h"
void ssp_sensorhub_log(const char *func_name,
const char *data, int length)
{
char buf[6];
char *log_str;
int log_size;
int i;
if (likely(length <= BIG_DATA_SIZE)) {
log_size = length;
} else {
log_size = PRINT_TRUNCATE * 2 + 1;
}
log_size = sizeof(buf) * log_size + 1;
log_str = kzalloc(log_size, GFP_ATOMIC);
if (unlikely(!log_str)) {
ssp_errf("allocate memory for data log err");
return;
}
for (i = 0; i < length; i++) {
if (length < BIG_DATA_SIZE ||
i < PRINT_TRUNCATE || i >= length - PRINT_TRUNCATE) {
snprintf(buf, sizeof(buf), "0x%x", (signed char)data[i]);
strlcat(log_str, buf, log_size);
if (i < length - 1) {
strlcat(log_str, ", ", log_size);
}
}
if (length > BIG_DATA_SIZE && i == PRINT_TRUNCATE) {
strlcat(log_str, "..., ", log_size);
}
}
ssp_info("%s(%d): %s", func_name, length, log_str);
kfree(log_str);
}
static int ssp_scontext_send_cmd(struct ssp_data *data,
const char *buf, int count)
{
int ret = 0;
if (buf[2] < SCONTEXT_AP_STATUS_WAKEUP ||
buf[2] >= SCONTEXT_AP_STATUS_CALL_ACTIVE) {
ssp_errf("INST_LIB_NOTI err(%d)", buf[2]);
return -EINVAL;
}
ret = ssp_send_status(data, buf[2]);
if (buf[2] == SCONTEXT_AP_STATUS_WAKEUP ||
buf[2] == SCONTEXT_AP_STATUS_SLEEP) {
data->uLastAPState = buf[2];
}
if (buf[2] == SCONTEXT_AP_STATUS_SUSPEND ||
buf[2] == SCONTEXT_AP_STATUS_RESUME) {
data->uLastResumeState = buf[2];
}
return ret;
}
#define SCONTEXT_VALUE_CURRENTSYSTEMTIME 0x0E
#define SCONTEXT_VALUE_PEDOMETER_USERHEIGHT 0x12
#define SCONTEXT_VALUE_PEDOMETER_USERWEIGHT 0x13
#define SCONTEXT_VALUE_PEDOMETER_USERGENDER 0x14
#define SCONTEXT_VALUE_PEDOMETER_INFOUPDATETIME 0x15
int convert_scontext_putvalue_subcmd(int subcmd)
{
int ret = -1;
switch (subcmd) {
case SCONTEXT_VALUE_CURRENTSYSTEMTIME :
ret = CURRENT_SYSTEM_TIME;
break;
case SCONTEXT_VALUE_PEDOMETER_USERHEIGHT :
ret = PEDOMETER_USERHEIGHT;
break;
case SCONTEXT_VALUE_PEDOMETER_USERWEIGHT:
ret = PEDOMETER_USERWEIGHT;
break;
case SCONTEXT_VALUE_PEDOMETER_USERGENDER:
ret = PEDOMETER_USERGENDER;
break;
case SCONTEXT_VALUE_PEDOMETER_INFOUPDATETIME:
ret = PEDOMETER_INFOUPDATETIME;
break;
default:
ret = ERROR;
}
return ret;
}
int convert_scontext_getvalue_subcmd(int subcmd)
{
int ret = -1;
switch (subcmd) {
case SCONTEXT_VALUE_CURRENTSTATUS :
ret = LIBRARY_CURRENTSTATUS;
break;
case SCONTEXT_VALUE_CURRENTSTATUS_BATCH :
ret = LIBRARY_CURRENTSTATUS_BATCH;
break;
case SCONTEXT_VALUE_VERSIONINFO:
ret = LIBRARY_VERSIONINFO;
break;
default:
ret = ERROR;
}
return ret;
}
static int ssp_scontext_send_instruction(struct ssp_data *data,
const char *buf, int count)
{
char command, type, sub_cmd = 0;
char *buffer = (char *)(buf + 2);
int length = count - 2;
if (buf[0] == SCONTEXT_INST_LIBRARY_REMOVE) {
command = CMD_REMOVE;
type = buf[1] + SS_SENSOR_TYPE_BASE;
ssp_infof("REMOVE LIB, type %d", type);
} else if (buf[0] == SCONTEXT_INST_LIBRARY_ADD) {
command = CMD_ADD;
type = buf[1] + SS_SENSOR_TYPE_BASE;
ssp_infof("ADD LIB, type %d", type);
} else if (buf[0] == SCONTEXT_INST_LIB_SET_DATA) {
command = CMD_SETVALUE;
if (buf[1] != SCONTEXT_VALUE_LIBRARY_DATA) {
type = TYPE_MCU;
sub_cmd = convert_scontext_putvalue_subcmd(buf[1]);
} else {
type = buf[2] + SS_SENSOR_TYPE_BASE;
sub_cmd = LIBRARY_DATA;
length = count - 3;
if (length > 0) {
buffer = (char *)(buf + 3);
} else {
buffer = NULL;
}
}
} else if (buf[0] == SCONTEXT_INST_LIB_GET_DATA) {
command = CMD_GETVALUE;
type = buf[1] + SS_SENSOR_TYPE_BASE;
sub_cmd = convert_scontext_getvalue_subcmd(buf[2]);
length = count - 3;
if (length > 0) {
buffer = (char *)(buf + 3);
} else {
buffer = NULL;
}
} else {
ssp_errf("0x%x is not supported", buf[0]);
return ERROR;
}
return ssp_send_command(data, command, type, sub_cmd, 0,
buffer, length, NULL, NULL);
}
#ifdef SENSOR_TYPE_SCONTEXT
static ssize_t ssp_scontext_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{
struct ssp_data *data = container_of(file->private_data, struct ssp_data, scontext_device);
int ret = 0;
char *buffer;
if (data->is_ssp_shutdown) {
ssp_errf("stop sending library data(shutdown)");
return -EIO;
}
if (unlikely(count < 2)) {
ssp_errf("library data length err(%d)", (int)count);
return -EINVAL;
}
buffer = kzalloc(count * sizeof(char), GFP_KERNEL);
ret = copy_from_user(buffer, buf, count);
if (unlikely(ret)) {
ssp_errf("memcpy for kernel buffer err");
ret = -EFAULT;
goto exit;
}
ssp_sensorhub_log(__func__, buffer, count);
if (buffer[0] == SCONTEXT_INST_LIB_NOTI) {
ret = ssp_scontext_send_cmd(data, buffer, count);
} else {
ret = ssp_scontext_send_instruction(data, buffer, count);
}
if (unlikely(ret < 0)) {
ssp_errf("send library data err(%d)", ret);
if (ret == ERROR) {
ret = -EIO;
}
else if (ret == FAIL) {
ret = -EAGAIN;
}
goto exit;
}
ret = count;
exit:
kfree(buffer);
return ret;
}
static struct file_operations ssp_scontext_fops = {
.owner = THIS_MODULE,
.open = nonseekable_open,
.write = ssp_scontext_write,
};
int ssp_scontext_initialize(struct ssp_data *data)
{
int ret;
ssp_dbgf("----------");
/* register scontext misc device */
data->scontext_device.minor = MISC_DYNAMIC_MINOR;
data->scontext_device.name = "ssp_sensorhub";
data->scontext_device.fops = &ssp_scontext_fops;
ret = misc_register(&data->scontext_device);
if (ret < 0) {
ssp_errf("register scontext misc device err(%d)", ret);
}
return ret;
}
void ssp_scontext_remove(struct ssp_data *data)
{
ssp_scontext_fops.write = NULL;
misc_deregister(&data->scontext_device);
}
#else
static ssize_t ssp_sensorhub_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{
struct ssp_sensorhub_data *hub_data
= container_of(file->private_data,
struct ssp_sensorhub_data, sensorhub_device);
int ret = 0;
char *buffer;
if (hub_data->ssp_data->is_ssp_shutdown) {
ssp_errf("stop sending library data(shutdown)");
return -EIO;
}
if (unlikely(count < 2)) {
ssp_errf("library data length err(%d)", (int)count);
return -EINVAL;
}
buffer = kzalloc(count * sizeof(char), GFP_KERNEL);
ret = copy_from_user(buffer, buf, count);
if (unlikely(ret)) {
ssp_errf("memcpy for kernel buffer err");
ret = -EFAULT;
goto exit;
}
ssp_sensorhub_log(__func__, buffer, count);
if (buffer[0] == SCONTEXT_INST_LIB_NOTI) {
ret = ssp_scontext_send_cmd(hub_data->ssp_data, buffer, count);
} else {
ret = ssp_scontext_send_instruction(hub_data->ssp_data, buffer, count);
}
if (unlikely(ret < 0)) {
ssp_errf("send library data err(%d)", ret);
/* i2c transfer fail */
if (ret == ERROR) {
ret = -EIO;
}
/* i2c transfer done but no ack from MCU */
else if (ret == FAIL) {
ret = -EAGAIN;
}
goto exit;
}
ret = count;
exit:
kfree(buffer);
return ret;
}
static ssize_t ssp_sensorhub_read(struct file *file, char __user *buf,
size_t count, loff_t *pos)
{
struct ssp_sensorhub_data *hub_data
= container_of(file->private_data,
struct ssp_sensorhub_data, sensorhub_device);
struct sensorhub_event *event;
int retries = MAX_DATA_COPY_TRY;
int length = 0;
int ret = 0;
spin_lock_bh(&hub_data->sensorhub_lock);
if (unlikely(kfifo_is_empty(&hub_data->fifo))) {
ssp_infof("no library data");
goto err;
}
/* first in first out */
ret = kfifo_out_peek(&hub_data->fifo, &event, sizeof(void *));
if (unlikely(!ret)) {
ssp_errf("kfifo out peek err(%d)", ret);
ret = EIO;
goto err;
}
length = event->library_length;
while (retries--) {
ret = copy_to_user(buf,
event->library_data, event->library_length);
if (likely(!ret)) {
break;
}
}
if (unlikely(ret)) {
ssp_errf("read library data err(%d)", ret);
goto err;
}
ssp_sensorhub_log(__func__,
event->library_data, event->library_length);
/* remove first event from the list */
ret = kfifo_out(&hub_data->fifo, &event, sizeof(void *));
if (unlikely(ret != sizeof(void *))) {
ssp_errf("kfifo out err(%d)", ret);
ret = EIO;
goto err;
}
complete(&hub_data->read_done);
spin_unlock_bh(&hub_data->sensorhub_lock);
return length;
err:
spin_unlock_bh(&hub_data->sensorhub_lock);
return ret ? -ret : 0;
}
static struct file_operations ssp_sensorhub_fops = {
.owner = THIS_MODULE,
.open = nonseekable_open,
.write = ssp_sensorhub_write,
.read = ssp_sensorhub_read,
};
void ssp_sensorhub_report_notice(struct ssp_data *ssp_data, char notice)
{
struct ssp_sensorhub_data *hub_data = ssp_data->hub_data;
if (notice == SCONTEXT_AP_STATUS_RESET) {
if (ssp_data->is_reset_from_sysfs == true) {
input_report_rel(hub_data->sensorhub_input_dev, NOTICE,
RESET_REASON_SYSFS_REQUEST);
ssp_data->is_reset_from_sysfs = false;
ssp_data->reset_type = RESET_KERNEL_SYSFS;
} else if (ssp_data->is_reset_from_kernel == true) {
input_report_rel(hub_data->sensorhub_input_dev, NOTICE,
RESET_REASON_KERNEL_RESET);
ssp_data->is_reset_from_kernel = false;
} else {
input_report_rel(hub_data->sensorhub_input_dev, NOTICE,
RESET_REASON_MCU_CRASHED);
ssp_data->reset_type = RESET_MCU_CRASHED;
}
} else {
input_report_rel(hub_data->sensorhub_input_dev, NOTICE, notice);
}
input_sync(hub_data->sensorhub_input_dev);
if (notice == SCONTEXT_AP_STATUS_WAKEUP) {
ssp_infof("wake up");
} else if (notice == SCONTEXT_AP_STATUS_SLEEP) {
ssp_infof("sleep");
} else if (notice == SCONTEXT_AP_STATUS_RESET) {
ssp_infof("reset");
} else {
ssp_errf("invalid notice(0x%x)", notice);
}
}
static void ssp_sensorhub_report_library(struct ssp_sensorhub_data *hub_data)
{
input_report_rel(hub_data->sensorhub_input_dev, DATA, DATA);
input_sync(hub_data->sensorhub_input_dev);
wake_lock_timeout(&hub_data->sensorhub_wake_lock, WAKE_LOCK_TIMEOUT);
}
static int ssp_sensorhub_list(struct ssp_sensorhub_data *hub_data,
char *dataframe, int length)
{
struct sensorhub_event *event;
int ret = 0;
if (unlikely(length <= 0 || length >= PAGE_SIZE)) {
ssp_errf("library length err(%d)", length);
return -EINVAL;
}
ssp_sensorhub_log(__func__, dataframe, length);
/* overwrite new event if list is full */
if (unlikely(kfifo_is_full(&hub_data->fifo))) {
ret = kfifo_out(&hub_data->fifo, &event, sizeof(void *));
if (unlikely(ret != sizeof(void *))) {
ssp_errf("kfifo out err(%d)", ret);
return -EIO;
}
ssp_infof("overwrite event");
}
/* allocate memory for new event */
kfree(hub_data->events[hub_data->event_number].library_data);
hub_data->events[hub_data->event_number].library_data
= kzalloc(length * sizeof(char), GFP_ATOMIC);
if (unlikely(!hub_data->events[hub_data->event_number].library_data)) {
ssp_errf("allocate memory for library err");
return -ENOMEM;
}
/* copy new event into memory */
memcpy(hub_data->events[hub_data->event_number].library_data,
dataframe, length);
hub_data->events[hub_data->event_number].library_length = length;
/* add new event into the end of list */
event = &hub_data->events[hub_data->event_number];
ret = kfifo_in(&hub_data->fifo, &event, sizeof(void *));
if (unlikely(ret != sizeof(void *))) {
ssp_errf("kfifo in err(%d)", ret);
return -EIO;
}
/* not to overflow max list capacity */
if (hub_data->event_number++ >= LIST_SIZE - 1) {
hub_data->event_number = 0;
}
return kfifo_len(&hub_data->fifo) / sizeof(void *);
}
int ssp_sensorhub_handle_data(struct ssp_data *ssp_data, char *dataframe,
int start, int end)
{
struct ssp_sensorhub_data *hub_data = ssp_data->hub_data;
int ret = 0;
/* add new sensorhub event into list */
spin_lock_bh(&hub_data->sensorhub_lock);
ret = ssp_sensorhub_list(hub_data, dataframe + start, end - start);
spin_unlock_bh(&hub_data->sensorhub_lock);
if (ret < 0) {
ssp_errf("sensorhub list err(%d)", ret);
} else {
wake_up(&hub_data->sensorhub_wq);
}
return ret;
}
static int ssp_sensorhub_thread(void *arg)
{
struct ssp_sensorhub_data *hub_data = (struct ssp_sensorhub_data *)arg;
int ret = 0;
while (likely(!kthread_should_stop())) {
/* run thread if list is not empty */
wait_event_interruptible(hub_data->sensorhub_wq,
kthread_should_stop() ||
!kfifo_is_empty(&hub_data->fifo));
/* exit thread if kthread should stop */
if (unlikely(kthread_should_stop())) {
ssp_infof("kthread_stop()");
break;
}
if (likely(!kfifo_is_empty(&hub_data->fifo))) {
/* report sensorhub event to user */
ssp_sensorhub_report_library(hub_data);
/* wait until transfer finished */
ret = wait_for_completion_timeout(
&hub_data->read_done, COMPLETION_TIMEOUT);
if (unlikely(!ret)) {
ssp_errf("wait for read timed out");
} else if (unlikely(ret < 0)) {
ssp_errf("read completion err(%d)", ret);
}
}
}
return 0;
}
int ssp_sensorhub_initialize(struct ssp_data *ssp_data)
{
struct ssp_sensorhub_data *hub_data;
int ret;
ssp_dbgf("----------");
/* allocate memory for sensorhub data */
hub_data = kzalloc(sizeof(*hub_data), GFP_KERNEL);
hub_data->ssp_data = ssp_data;
ssp_data->hub_data = hub_data;
/* init wakelock, list, waitqueue, completion and spinlock */
wake_lock_init(&hub_data->sensorhub_wake_lock, WAKE_LOCK_SUSPEND,
"ssp_sensorhub_wake_lock");
init_waitqueue_head(&hub_data->sensorhub_wq);
init_completion(&hub_data->read_done);
spin_lock_init(&hub_data->sensorhub_lock);
/* allocate sensorhub input device */
hub_data->sensorhub_input_dev = input_allocate_device();
if (!hub_data->sensorhub_input_dev) {
ssp_errf("allocate sensorhub input device err");
ret = -ENOMEM;
goto err_input_allocate_device_sensorhub;
}
/* set sensorhub input device */
input_set_drvdata(hub_data->sensorhub_input_dev, hub_data);
hub_data->sensorhub_input_dev->name = "ssp_context";
input_set_capability(hub_data->sensorhub_input_dev, EV_REL, DATA);
input_set_capability(hub_data->sensorhub_input_dev, EV_REL, NOTICE);
/* register sensorhub input device */
ret = input_register_device(hub_data->sensorhub_input_dev);
if (ret < 0) {
ssp_errf("register sensorhub input device err(%d)", ret);
input_free_device(hub_data->sensorhub_input_dev);
goto err_input_register_device_sensorhub;
}
/* register sensorhub misc device */
hub_data->sensorhub_device.minor = MISC_DYNAMIC_MINOR;
hub_data->sensorhub_device.name = "ssp_sensorhub";
hub_data->sensorhub_device.fops = &ssp_sensorhub_fops;
ret = misc_register(&hub_data->sensorhub_device);
if (ret < 0) {
ssp_errf("register sensorhub misc device err(%d)", ret);
goto err_misc_register;
}
/* allocate fifo */
ret = kfifo_alloc(&hub_data->fifo,
sizeof(void *) * LIST_SIZE, GFP_KERNEL);
if (ret) {
ssp_errf("kfifo allocate err(%d)", ret);
goto err_kfifo_alloc;
}
/* create and run sensorhub thread */
hub_data->sensorhub_task = kthread_run(ssp_sensorhub_thread,
(void *)hub_data, "ssp_sensorhub_thread");
if (IS_ERR(hub_data->sensorhub_task)) {
ret = PTR_ERR(hub_data->sensorhub_task);
goto err_kthread_run;
}
return 0;
err_kthread_run:
kfifo_free(&hub_data->fifo);
err_kfifo_alloc:
misc_deregister(&hub_data->sensorhub_device);
err_misc_register:
input_unregister_device(hub_data->sensorhub_input_dev);
err_input_register_device_sensorhub:
err_input_allocate_device_sensorhub:
complete_all(&hub_data->read_done);
wake_lock_destroy(&hub_data->sensorhub_wake_lock);
kfree(hub_data);
return ret;
}
void ssp_sensorhub_remove(struct ssp_data *ssp_data)
{
struct ssp_sensorhub_data *hub_data = ssp_data->hub_data;
ssp_sensorhub_fops.write = NULL;
ssp_sensorhub_fops.read = NULL;
ssp_sensorhub_fops.unlocked_ioctl = NULL;
kthread_stop(hub_data->sensorhub_task);
kfifo_free(&hub_data->fifo);
misc_deregister(&hub_data->sensorhub_device);
input_unregister_device(hub_data->sensorhub_input_dev);
complete_all(&hub_data->read_done);
wake_lock_destroy(&hub_data->sensorhub_wake_lock);
kfree(hub_data);
}
#endif
MODULE_DESCRIPTION("Seamless Sensor Platform(SSP) sensorhub driver");
MODULE_AUTHOR("<NAME>");
MODULE_LICENSE("GPL");
|
realkotob/phaser3-rex-notes
|
plugins/gameobjects/live2d/framework/dist/math/cubismmatrix44.js
|
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 4x4の行列
*
* 4x4行列の便利クラス。
*/
var CubismMatrix44 = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismMatrix44() {
this._tr = new Float32Array(16); // 4 * 4のサイズ
this.loadIdentity();
}
/**
* 受け取った2つの行列の乗算を行う。
*
* @param a 行列a
* @param b 行列b
* @return 乗算結果の行列
*/
CubismMatrix44.multiply = function (a, b, dst) {
var c = new Float32Array([
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
]);
var n = 4;
for (var i = 0; i < n; ++i) {
for (var j = 0; j < n; ++j) {
for (var k = 0; k < n; ++k) {
c[j + i * 4] += a[k + i * 4] * b[j + k * 4];
}
}
}
for (var i = 0; i < 16; ++i) {
dst[i] = c[i];
}
};
/**
* 単位行列に初期化する
*/
CubismMatrix44.prototype.loadIdentity = function () {
var c = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]);
this.setMatrix(c);
};
/**
* 行列を設定
*
* @param tr 16個の浮動小数点数で表される4x4の行列
*/
CubismMatrix44.prototype.setMatrix = function (tr) {
for (var i = 0; i < 16; ++i) {
this._tr[i] = tr[i];
}
};
/**
* 行列を浮動小数点数の配列で取得
*
* @return 16個の浮動小数点数で表される4x4の行列
*/
CubismMatrix44.prototype.getArray = function () {
return this._tr;
};
/**
* X軸の拡大率を取得
* @return X軸の拡大率
*/
CubismMatrix44.prototype.getScaleX = function () {
return this._tr[0];
};
/**
* Y軸の拡大率を取得する
*
* @return Y軸の拡大率
*/
CubismMatrix44.prototype.getScaleY = function () {
return this._tr[5];
};
/**
* X軸の移動量を取得
* @return X軸の移動量
*/
CubismMatrix44.prototype.getTranslateX = function () {
return this._tr[12];
};
/**
* Y軸の移動量を取得
* @return Y軸の移動量
*/
CubismMatrix44.prototype.getTranslateY = function () {
return this._tr[13];
};
/**
* X軸の値を現在の行列で計算
*
* @param src X軸の値
* @return 現在の行列で計算されたX軸の値
*/
CubismMatrix44.prototype.transformX = function (src) {
return this._tr[0] * src + this._tr[12];
};
/**
* Y軸の値を現在の行列で計算
*
* @param src Y軸の値
* @return 現在の行列で計算されたY軸の値
*/
CubismMatrix44.prototype.transformY = function (src) {
return this._tr[5] * src + this._tr[13];
};
/**
* X軸の値を現在の行列で逆計算
*/
CubismMatrix44.prototype.invertTransformX = function (src) {
return (src - this._tr[12]) / this._tr[0];
};
/**
* Y軸の値を現在の行列で逆計算
*/
CubismMatrix44.prototype.invertTransformY = function (src) {
return (src - this._tr[13]) / this._tr[5];
};
/**
* 現在の行列の位置を起点にして移動
*
* 現在の行列の位置を起点にして相対的に移動する。
*
* @param x X軸の移動量
* @param y Y軸の移動量
*/
CubismMatrix44.prototype.translateRelative = function (x, y) {
var tr1 = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
x,
y,
0.0,
1.0
]);
CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* 現在の行列の位置を移動
*
* 現在の行列の位置を指定した位置へ移動する
*
* @param x X軸の移動量
* @param y y軸の移動量
*/
CubismMatrix44.prototype.translate = function (x, y) {
this._tr[12] = x;
this._tr[13] = y;
};
/**
* 現在の行列のX軸の位置を指定した位置へ移動する
*
* @param x X軸の移動量
*/
CubismMatrix44.prototype.translateX = function (x) {
this._tr[12] = x;
};
/**
* 現在の行列のY軸の位置を指定した位置へ移動する
*
* @param y Y軸の移動量
*/
CubismMatrix44.prototype.translateY = function (y) {
this._tr[13] = y;
};
/**
* 現在の行列の拡大率を相対的に設定する
*
* @param x X軸の拡大率
* @param y Y軸の拡大率
*/
CubismMatrix44.prototype.scaleRelative = function (x, y) {
var tr1 = new Float32Array([
x,
0.0,
0.0,
0.0,
0.0,
y,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]);
CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* 現在の行列の拡大率を指定した倍率に設定する
*
* @param x X軸の拡大率
* @param y Y軸の拡大率
*/
CubismMatrix44.prototype.scale = function (x, y) {
this._tr[0] = x;
this._tr[5] = y;
};
/**
* 現在の行列に行列を乗算
*
* @param m 行列
*/
CubismMatrix44.prototype.multiplyByMatrix = function (m) {
CubismMatrix44.multiply(m.getArray(), this._tr, this._tr);
};
/**
* オブジェクトのコピーを生成する
*/
CubismMatrix44.prototype.clone = function () {
var cloneMatrix = new CubismMatrix44();
for (var i = 0; i < this._tr.length; i++) {
cloneMatrix._tr[i] = this._tr[i];
}
return cloneMatrix;
};
return CubismMatrix44;
}());
exports.CubismMatrix44 = CubismMatrix44;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmatrix44"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismMatrix44 = $.CubismMatrix44;
})(Live2DCubismFramework = exports.Live2DCubismFramework || (exports.Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmatrix44.js.map
|
viniciusfcf/smallrye-reactive-messaging
|
smallrye-reactive-messaging-camel/src/test/java/io/smallrye/reactive/messaging/camel/incoming/BeanWithCamelSink.java
|
package io.smallrye.reactive.messaging.camel.incoming;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletionStage;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
import io.reactivex.Flowable;
@ApplicationScoped
public class BeanWithCamelSink {
@Inject
private CamelContext camel;
private List<String> values = new ArrayList<>();
@Incoming("camel")
public CompletionStage<Void> sink(String value) {
values.add(value);
ProducerTemplate template = camel.createProducerTemplate();
return template.asyncSendBody("file:./target?fileName=values.txt&fileExist=append", value).thenApply(x -> null);
}
@Outgoing("camel")
public Flowable<String> source() {
return Flowable.fromArray("a", "b", "c", "d");
}
public List<String> values() {
return values;
}
}
|
isabella232/continuum
|
continuum-api/src/main/java/org/apache/maven/continuum/execution/SettingsConfigurationException.java
|
package org.apache.maven.continuum.execution;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* If there was an error in the settings file.
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
*/
public class SettingsConfigurationException
extends Exception
{
private int lineNumber;
private int columnNumber;
public SettingsConfigurationException( String message )
{
super( message );
}
public SettingsConfigurationException( String message, Throwable cause )
{
super( message, cause );
}
public SettingsConfigurationException( String message, Throwable cause, int lineNumber, int columnNumber )
{
super( message + ( lineNumber > 0 ? "\n Line: " + lineNumber : "" ) +
( columnNumber > 0 ? "\n Column: " + columnNumber : "" ), cause );
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}
public int getColumnNumber()
{
return columnNumber;
}
public int getLineNumber()
{
return lineNumber;
}
}
|
sknull/dotgraph-scala
|
dotgraph-scala-core/src/main/scala/de/visualdigits/dotgraph/core/type/html/Align.scala
|
package de.visualdigits.dotgraph.core.`type`.html
import enumeratum.{Enum, EnumEntry}
sealed trait Align extends EnumEntry
object Align extends Enum[Align] {
val values: IndexedSeq[Align] = findValues
case object center extends Align
case object left extends Align
case object right extends Align
}
|
MrFrenik/Enjon
|
Editor/Source/EditorWidget.cpp
|
<filename>Editor/Source/EditorWidget.cpp
// @file EditorWidget.cpp
// Copyright 2016-2017 <NAME>. All Rights Reserved.
#include "EditorWidget.h"
#include "EditorTransformWidget.h"
#include <Engine.h>
#include <SubsystemCatalog.h>
#include <Graphics/GraphicsSubsystem.h>
namespace Enjon
{
void EditorWidget::Enable( )
{
// Add renderables to graphics scene
GraphicsSubsystem* gfx = EngineSubsystem( GraphicsSubsystem );
for ( auto& t : mTransformHeirarchies )
{
gfx->GetGraphicsScene( )->AddNonDepthTestedStaticMeshRenderable( &t->mRenderable );
}
}
void EditorWidget::Disable( )
{
// Remove renderables from graphics scene
GraphicsSubsystem* gfx = EngineSubsystem( GraphicsSubsystem );
for ( auto& t : mTransformHeirarchies )
{
gfx->GetGraphicsScene( )->RemoveNonDepthTestedStaticMeshRenderable( &t->mRenderable );
}
}
void EditorWidget::Update( )
{
GraphicsSubsystem* gfx = EngineSubsystem( GraphicsSubsystem );
const Camera* cam = gfx->GetGraphicsSceneCamera( );
// Set scale of root based on distance from camera
f32 dist = Vec3::Distance( cam->GetPosition( ), mRootHeirarchy->mLocalTransform.GetPosition() );
f32 scale = cam->GetProjectionType() == ProjectionType::Perspective ? Math::Clamp( dist / 60.0f, 0.001f, 100.0f ) : Math::Max( cam->GetOrthographicScale(), 1.f ) / 40.f;
mRootHeirarchy->mLocalTransform.SetScale( scale );
// Calculate world transforms for all heirarchies
for ( auto& t : mTransformHeirarchies )
{
t->CalculateWorldTransform( );
}
// Set world transform for renderable
for ( auto& t : mTransformHeirarchies )
{
t->mRenderable.SetTransform( t->mWorldTransform );
}
}
Transform EditorWidget::GetWorldTransform( )
{
Update( );
return mRootHeirarchy->mWorldTransform;
}
void EditorWidget::SetPosition( const Vec3& position )
{
// Set position and update everything else
mRootHeirarchy->mLocalTransform.SetPosition( position );
Update( );
}
// Sets root scale
void EditorWidget::SetScale( const f32& scale )
{
mRootHeirarchy->mLocalTransform.SetScale( scale );
Update( );
}
void EditorWidget::SetRotation( const Quaternion& rotation )
{
mRootHeirarchy->mLocalTransform.SetRotation( rotation );
Update( );
}
void EditorWidget::SetRotation( const Vec3& eulerAngles )
{
mRootHeirarchy->mLocalTransform.SetEulerRotation( eulerAngles );
Update( );
}
void EditorWidget::SetTransform( const Transform& transform )
{
mRootHeirarchy->mLocalTransform = transform;
Update( );
}
}
|
kongnir/hig
|
packages/flyout/src/FlyoutPresenter/FlyoutPresenter.js
|
import React from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import {
EXITED,
ENTERING,
ENTERED,
EXITING
} from "react-transition-group/Transition";
import { anchorPoints, availableAnchorPoints } from "../anchorPoints";
import "./flyout.scss";
const availableTransitionStatuses = [EXITED, ENTERING, ENTERED, EXITING];
const transitionStateToModifier = {
[EXITED]: "hig__flyout-v1--exited",
[EXITING]: "hig__flyout-v1--exiting"
};
const anchorPointToModifier = {
[anchorPoints.TOP_LEFT]: "hig__flyout-v1--top-left",
[anchorPoints.TOP_CENTER]: "hig__flyout-v1--top-center",
[anchorPoints.TOP_RIGHT]: "hig__flyout-v1--top-right",
[anchorPoints.RIGHT_TOP]: "hig__flyout-v1--right-top",
[anchorPoints.RIGHT_CENTER]: "hig__flyout-v1--right-center",
[anchorPoints.RIGHT_BOTTOM]: "hig__flyout-v1--right-bottom",
[anchorPoints.BOTTOM_LEFT]: "hig__flyout-v1--bottom-left",
[anchorPoints.BOTTOM_CENTER]: "hig__flyout-v1--bottom-center",
[anchorPoints.BOTTOM_RIGHT]: "hig__flyout-v1--bottom-right",
[anchorPoints.LEFT_TOP]: "hig__flyout-v1--left-top",
[anchorPoints.LEFT_CENTER]: "hig__flyout-v1--left-center",
[anchorPoints.LEFT_BOTTOM]: "hig__flyout-v1--left-bottom"
};
export default function FlyoutPresenter(props) {
const {
anchorPoint,
content,
maxHeight,
topOffset,
leftOffset,
refAction,
refContainer,
refPanel,
refWrapper,
onScroll,
transitionStatus,
children
} = props;
const containerStyle = { top: topOffset, left: leftOffset };
const panelStyle = { maxHeight };
const wrapperClasses = cx([
"hig__flyout-v1",
transitionStateToModifier[transitionStatus],
anchorPointToModifier[anchorPoint]
]);
return (
<div className={wrapperClasses} ref={refWrapper}>
<div className="hig__flyout-v1__action" ref={refAction}>
{children}
</div>
<div
className="hig__flyout-v1__container"
style={containerStyle}
ref={refContainer}
>
<div className="hig__flyout-v1__chevron" />
<div
className="hig__flyout-v1__panel"
ref={refPanel}
style={panelStyle}
onScroll={onScroll}
>
{content}
</div>
</div>
</div>
);
}
FlyoutPresenter.defaultProps = {
anchorPoint: anchorPoints.TOP_RIGHT,
transitionStatus: EXITED
};
FlyoutPresenter.propTypes = {
/** Where the flyout will be anchored relative to target */
anchorPoint: PropTypes.oneOf(availableAnchorPoints).isRequired,
/** Content for the flyout */
content: PropTypes.node,
/** Max height of the flyout content, in pixels */
maxHeight: PropTypes.number,
/** Top position of the container relative to the action */
topOffset: PropTypes.number,
/** Left position of the container relative to the action */
leftOffset: PropTypes.number,
/** Reference the action element */
refAction: PropTypes.func,
/** Reference the container element */
refContainer: PropTypes.func,
/** Reference the panel element */
refPanel: PropTypes.func,
/** Reference the wrapper element */
refWrapper: PropTypes.func,
/** Function called when the flyout panel is scrolled */
onScroll: PropTypes.func,
/** The status of the container transition */
transitionStatus: PropTypes.oneOf(availableTransitionStatuses).isRequired,
/** Target component to open the flyout */
children: PropTypes.node
};
|
fzyycp/fwmf-module
|
fwmf-module-systemconfig/fwmf-module-systemconfig-api/src/main/java/cn/faury/fwmf/module/api/systemconfig/service/SystemConfigService.java
|
<gh_stars>0
package cn.faury.fwmf.module.api.systemconfig.service;
import cn.faury.fdk.common.db.CrudBaseService;
import cn.faury.fwmf.module.api.systemconfig.bean.SystemConfigBean;
/**
* 服务接口:系统参数配置表
*
* <pre>
* CrudBaseService为数据库通用增删改查操作,不可修改
* 当前服务接口继承自CrudBaseService,用于项目业务代码扩展添加
* 只需初始化生成一次,然后根据需要扩展,重新生成时注意合并自己添加的代码
* </pre>
*/
public interface SystemConfigService extends CrudBaseService<SystemConfigBean, Long> {
}
|
ericlink/adms-client-tc65
|
diabetech-tc65/ObexFtp/3esmit-JObexFTP-8fbc07a/test/com/lhf/obexftplib/io/ATConnectionTest.java
|
<reponame>ericlink/adms-client-tc65<filename>diabetech-tc65/ObexFtp/3esmit-JObexFTP-8fbc07a/test/com/lhf/obexftplib/io/ATConnectionTest.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.lhf.obexftplib.io;
import com.lhf.obexftplib.etc.OBEXDevice;
import com.lhf.obexftplib.etc.Utility;
import com.lhf.obexftplib.event.ATEventListener;
import com.lhf.obexftplib.event.ConnectionModeListener;
import com.lhf.obexftplib.event.DataEventListener;
import gnu.io.CommPortIdentifier;
import gnu.io.PortInUseException;
import gnu.io.UnsupportedCommOperationException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import gnu.io.SerialPort;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author ricardo
*/
public class ATConnectionTest {
private static ArrayList<String> ident = new ArrayList<String>();
private static CommPortIdentifier selectedTestPort;
private ATConnection instance = null;
private static final byte[] AT_TEST_BYTE_ARR = new byte[]{'A', 'T', '\r'};
public ATConnectionTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
if (System.getProperty("os.name").equalsIgnoreCase("linux")) {
System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyACM0:/dev/ttyACM1:/dev/ttyACM2:/dev/ttyACM3:/dev/ttyUSB0:/dev/ttyUSB1:/dev/ttyUSB2:/dev/ttyUSB3:/dev/ttyS0:/dev/ttyS1:/dev/ttyS2:/dev/ttyS3");
}
Enumeration<CommPortIdentifier> e = CommPortIdentifier.getPortIdentifiers();
while (e.hasMoreElements()) {
CommPortIdentifier commPortIdentifier = e.nextElement();
ident.add(commPortIdentifier.getName());
}
selectedTestPort = CommPortIdentifier.getPortIdentifier((String) JOptionPane.showInputDialog(null, "Select CommPort to Test", "TestDrivenDevelopment", 0, null, ident.toArray(), 0));
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
try {
instance = new ATConnection(selectedTestPort);
} catch (Exception ex) {
Logger.getLogger(ATConnectionTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
@After
public void tearDown() {
if (instance.getConnMode() != ATConnection.MODE_DISCONNECTED) {
try {
instance.setConnMode(ATConnection.MODE_DISCONNECTED);
} catch (Exception ex) {
Logger.getLogger(ATConnectionTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
/**
* Test of send method, of class JObexProtocol.
*/
@Test
public void testSend() throws Exception {
instance.setConnMode(ATConnection.MODE_AT);
byte[] result = instance.send(AT_TEST_BYTE_ARR, 30);
assertTrue(result.length > 0);
instance.setConnMode(ATConnection.MODE_DISCONNECTED);
}
/**
* Test of setConnMode method, of class ATConnection.
*/
@Test
public void testSetConnMode() throws Exception {
int newConnMode = 0;
instance.setConnMode(newConnMode);
assertEquals(newConnMode, instance.getConnMode());
newConnMode = 1;
instance.setConnMode(newConnMode);
assertEquals(newConnMode, instance.getConnMode());
newConnMode = 2;
instance.setConnMode(newConnMode);
assertEquals(newConnMode, instance.getConnMode());
}
/**
* Test of getConnMode method, of class ATConnection.
*/
@Test
public void testGetConnMode() {
int expResult = ATConnection.MODE_DISCONNECTED;
int result = instance.getConnMode();
assertEquals(expResult, result);
}
/**
* Test of identifyDevice method, of class ATConnection.
*/
@Test
public void testIdentifyDevice() throws Exception {
instance.identifyDevice();
assertNull(instance.getDevice());
instance.setConnMode(ATConnection.MODE_DATA);
assertNotNull(instance.getDevice());
}
/**
* Test of addConnectionModeListener method, of class ATConnection.
*/
@Test
public void testAddConnectionModeListener() {
}
/**
* Test of removeConnectionModeListener method, of class ATConnection.
*/
@Test
public void testRemoveConnectionModeListener() {
}
/**
* Test of addDataEventListener method, of class ATConnection.
*/
@Test
public void testAddDataEventListener() {
}
/**
* Test of addATEventListener method, of class ATConnection.
*/
@Test
public void testAddATEventListener() {
}
/**
* Test of removeDataEventListener method, of class ATConnection.
*/
@Test
public void testRemoveDataEventListener() {
}
/**
* Test of removeATEventListener method, of class ATConnection.
*/
@Test
public void testRemoveATEventListener() {
}
/**
* Test of getFlowControl method, of class ATConnection.
*/
@Test
public void testGetFlowControl() {
byte result = instance.getFlowControl();
assertEquals(ATConnection.FLOW_RTSCTS, result);
}
/**
* Test of getDevice method, of class ATConnection.
*/
@Test
public void testGetDevice() throws IOException {
OBEXDevice result = instance.getDevice();
assertNull(result);
instance.setConnMode(ATConnection.MODE_AT);
assertNotNull(instance.getDevice());
}
/**
* Test of setDevice method, of class ATConnection.
*/
@Test
public void testSetDevice() throws IOException {
instance.setDevice(null);
assertNull(instance.getDevice());
instance.setConnMode(ATConnection.MODE_AT);
assertNotNull(instance.getDevice());
instance.setDevice(OBEXDevice.DEFAULT);
assertEquals(OBEXDevice.DEFAULT, instance.getDevice());
instance.setDevice(OBEXDevice.TC65);
assertEquals(OBEXDevice.TC65, instance.getDevice());
}
}
|
kotommi/fullstack-hy2019.github.io
|
src/components/Banner/Banner.js
|
import './Banner.scss';
import PropTypes from 'prop-types';
import React from 'react';
export const Banner = ({ className, backgroundColor, ...props }) => {
const background = backgroundColor
? { backgroundColor: backgroundColor }
: null;
return (
<div className={`banner ${className}`} style={background} {...props} />
);
};
Banner.defaultProps = {
className: '',
};
Banner.propTypes = {
className: PropTypes.string,
};
|
temelkirci/Motion_Editor
|
venv/Lib/site-packages/PyOpenGL-3.0.1/OpenGL/GL/EXT/draw_buffers2.py
|
<reponame>temelkirci/Motion_Editor
'''OpenGL extension EXT.draw_buffers2
This module customises the behaviour of the
OpenGL.raw.GL.EXT.draw_buffers2 to provide a more
Python-friendly API
Overview (from the spec)
This extension builds upon the ARB_draw_buffers extension and provides
separate blend enables and color write masks for each color output. In
ARB_draw_buffers (part of OpenGL 2.0), separate values can be written to
each color buffer, but the blend enable and color write mask are global
and apply to all color outputs.
While this extension does provide separate blend enables, it does not
provide separate blend functions or blend equations per color output.
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/draw_buffers2.txt
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions, wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.EXT.draw_buffers2 import *
### END AUTOGENERATED SECTION
|
LittleJamie/Mine
|
Mmine/Classes/Tools/MExtensionKit/MExtensionKit/UIColor+ExtensionMExt.h
|
//
// UIColor+ExtensionMExt.h
// CompanyTest
//
// Created by Jamie on 16/3/24.
// Copyright © 2016年 Donews. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (ExtensionMExt)
/**
* @brief 字符串中得到颜色值
*
* @param stringToConvert 字符串的值 e.g:@"#FF4500"
*
* @return 返回颜色对象
*/
+ (UIColor *)colorFromString_Ext:(NSString *)stringToConvert;
/**
* @brief RGBA风格获取颜色,
* UIColor *solidColor = [UIColor colorWithRGBA_Ext:0xFF0000FF];
*
* @param hex 是16进止rgba值
*
* @return 颜色对象
*/
+ (UIColor *) colorWithRGBA_Ext:(uint) hex;
/**
* @brief ARGB风格获取颜色
* UIColor *alphaColor = [UIColor colorWithHex:0x99FF0000];
*
* @param hex argb的值
*
* @return 颜色对象
*/
+ (UIColor *) colorWithARGB_Ext:(uint) hex;
/**
* @brief RGB风格获取颜色值
*UIColor *solidColor = [UIColor colorWithHex:0xFF0000];
*
* @param hex rgb的值
*
* @return 颜色对象
*/
+ (UIColor *) colorWithRGB_Ext:(uint) hex;
/*usage
safe to omit # sign as well
UIColor *solidColor = [UIColor colorWithWeb:@"FF0000"];
*/
/**
* @brief 根据字符串返回颜色值
* UIColor *solidColor = [UIColor colorWithWeb:@"#FF0000"];
* UIColor *solidColor = [UIColor colorWithWeb:@"FF0000"];
*
* @param hexString 字符串的值,e.g:@"#FF0000" @"FF0000"
*
* @return 颜色对象
*/
+ (UIColor *)colorWithHexString_Ext:(NSString *)hexString;
/**
* @brief 颜色对象返回字符串
*
* @return 颜色字符串
*/
- (NSString *) hexString_Ext;
/**
* @brief 得到颜色R值
*
* @return 返回R值
*/
- (CGFloat)r_Ext;
/**
* @brief 得到颜色的G值
*
* @return 返回颜色的G值
*/
- (CGFloat)g_Ext;
/**
* @brief 得到颜色的B值
*
* @return 返回颜色的B值
*/
- (CGFloat)b_Ext;
/**
* @brief 得到颜色的A值
*
* @return 返回颜色的A值
*/
- (CGFloat)a_Ext;
@end
|
dnorgaard-usgs/swarm
|
src/main/java/gov/usgs/volcanoes/swarm/event/PickSettings.java
|
package gov.usgs.volcanoes.swarm.event;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;
/**
* Pick Settings.
* @author <NAME>
*
*/
public class PickSettings extends Properties {
private static final long serialVersionUID = 897150893674347168L;
private static final String SETTINGS_FILENAME = "PickSettings.config";
public static final String WEIGHT = "weight";
public static final String WEIGHT_UNIT = "weight_unit";
public static final int numWeight = 5;
private static final String COMMENTS = "Swarm Pick Settings Configuration";
public enum WeightUnit { SAMPLES, MILLISECONDS }
/**
* Default constructor.
*/
public PickSettings() {
readSettings();
}
/**
* Read pick settings file.
*/
private void readSettings() {
loadDefaultProperties();
try {
load(new FileReader(SETTINGS_FILENAME));
} catch (IOException e) {
// just use default settings
}
}
/**
* Load default properties in cases where settings file does not exist.
*/
private void loadDefaultProperties() {
this.setProperty(WEIGHT_UNIT, WeightUnit.SAMPLES.toString());
this.setProperty(WEIGHT + ".0", "1");
this.setProperty(WEIGHT + ".1", "2");
this.setProperty(WEIGHT + ".2", "5");
this.setProperty(WEIGHT + ".3", "10");
this.setProperty(WEIGHT + ".4", "20");
}
/**
* Save pick settings properties to file.
* @throws IOException IOException
*/
protected void save() throws IOException {
FileWriter writer = new FileWriter(SETTINGS_FILENAME);
store(writer, COMMENTS);
}
/**
* Convert weight to time. In case where unit is in samples,
* the sample rate is required.
* @param weight weight
* @param sampleRate sample rate to use if weights are in samples
* @return milliseconds
*/
public long getWeightToTime(int weight, double sampleRate) {
if (weight > numWeight) {
String message = "Weight must be between 0 and " + numWeight;
throw new IllegalArgumentException(message);
}
String prop = getProperty(WEIGHT + "." + weight);
long value = Long.valueOf(prop);
if (getWeightUnit().equals(WeightUnit.SAMPLES)) {
long millis = (long) (1000 * value / sampleRate);
return millis;
} else {
return value; // already in millis
}
}
/**
* Type of unit mapped to weight.
* @return WeightUnit
*/
public WeightUnit getWeightUnit() {
return WeightUnit.valueOf(getProperty(WEIGHT_UNIT));
}
}
|
Backbase/fiserv-integration-bill-pay
|
src/main/java/com/backbase/billpay/fiserv/payments/model/PaymentListResponse.java
|
package com.backbase.billpay.fiserv.payments.model;
import com.backbase.billpay.fiserv.common.model.AbstractResponse;
import com.backbase.billpay.fiserv.common.model.ResultType;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement(name = "PaymentListResponse")
@XmlAccessorType(XmlAccessType.FIELD)
public class PaymentListResponse extends AbstractResponse {
@XmlElement(name = "Payments")
private List<Payment> payments;
@Builder
public PaymentListResponse(List<Payment> payments, ResultType result) {
super(result);
this.payments = payments;
}
}
|
AlexeyAB/netutils-linux
|
netutils_linux_monitoring/softirqs.py
|
from optparse import Option
from six import iteritems
from netutils_linux_monitoring.base_top import BaseTop
from netutils_linux_monitoring.layout import make_table
from netutils_linux_monitoring.numa import Numa
from netutils_linux_monitoring.colors import wrap, cpu_color
class Softirqs(BaseTop):
""" Utility for monitoring software interrupts distribution """
net_rx_warning = 40000
net_rx_error = 80000
net_tx_warning = 20000
net_tx_error = 30000
def __init__(self, numa=None):
BaseTop.__init__(self)
specific_options = [
Option('--softirqs-file', default='/proc/softirqs',
help='Option for testing on MacOS purpose.')
]
self.numa = numa
self.specific_options.extend(specific_options)
def post_optparse(self):
if not self.numa:
self.numa = Numa(fake=self.options.random)
def parse(self):
with open(self.options.softirqs_file) as fd:
metrics = [line.strip().split(':')
for line in fd.readlines() if ':' in line]
return dict((k, list(map(int, v.strip().split()))) for k, v in metrics)
@staticmethod
def __active_cpu_count__(data):
return len([metric for metric in data.get('TIMER') if metric > 0])
def eval(self):
self.diff = dict((key, self.list_diff(
data, self.previous[key])) for key, data in iteritems(self.current))
def __repr__(self):
active_cpu_count = self.__active_cpu_count__(self.current)
header = ["CPU", "NET_RX", "NET_TX"]
net_rx = self.repr_source().get('NET_RX')[:active_cpu_count]
net_tx = self.repr_source().get('NET_TX')[:active_cpu_count]
rows = [
[wrap("CPU{0}".format(n), cpu_color(n, self.numa)), v[0], v[1]] for n, v in enumerate(zip(net_rx, net_tx))
]
table = make_table(header, ['l', 'r', 'r'], rows)
return self.__repr_table__(table)
|
kamasamikon/miego
|
roast/tableheader.go
|
package roast
import (
"github.com/kamasamikon/miego/xtime"
)
const (
// 没有被删除
RemWhy_NotRem = 0
// 同一个UUID的添加了新记录,老记录自动标记为删除
RemWhy_Update = 1
// 显式删除
RemWhy_Delete = 2
)
type TableHeader struct {
// 记录的序列号而已
ID uint `gorm:"Column:ID;primary_key"`
// NewAt: 记录的添加时间
NewAt uint64 `gorm:"Column:NewAt"`
NewBy string `gorm:"Column:NewBy"`
// See RemWhy_Delete etc.
RemAt uint64 `gorm:"Column:RemAt"`
RemBy string `gorm:"Column:RemBy"`
RemWhy int `gorm:"Column:RemWhy"`
// CrtAt: UUID对应的项目的日期
// UUID: 真正的记录的ID
CrtAt uint64 `gorm:"Column:CrtAt"`
UUID string `gorm:"Column:UUID"`
}
func Setup(h *TableHeader, NewBy string) {
now := xtime.TimeNowToNum()
h.ID = 0
h.NewAt = now
h.NewBy = NewBy
h.RemAt = 0
h.RemBy = ""
h.RemWhy = 0
if h.CrtAt == 0 {
h.CrtAt = now
}
}
|
ScipionyxCorp/butterfly-effect-stocks
|
stocks-backend-main/src/main/java/com/scipionyx/butterflyeffect/backend/stocks/main/jobs/bitcoin/coinbase/getHistoricalPrice/GetHistoricalPriceJob_Step01.java
|
<gh_stars>0
package com.scipionyx.butterflyeffect.backend.stocks.main.jobs.bitcoin.coinbase.getHistoricalPrice;
import java.beans.PropertyEditor;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.StepScope;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.file.MultiResourceItemReader;
import org.springframework.batch.item.file.mapping.BeanWrapperFieldSetMapper;
import org.springframework.batch.item.file.mapping.DefaultLineMapper;
import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
import org.springframework.batch.item.support.CompositeItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.web.util.UriComponentsBuilder;
import com.scipionyx.butterflyeffect.api.jobmanagement.api.model.definition.AbstractJobDefinition;
import com.scipionyx.butterflyeffect.api.stocks.model.valuable.data.historicalprice.CryptoCurrencyPrice;
import com.scipionyx.butterflyeffect.api.stocks.model.valuable.data.historicalprice.Source;
import com.scipionyx.butterflyeffect.backend.stocks.main.jobs.common.SimpleElasticsearchWriter;
/**
*
* Load the historical price for the Bitcoin from the coinbase system.
*
* @author <NAME>
*
*/
@Configuration
public class GetHistoricalPriceJob_Step01 extends AbstractJobDefinition {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
* @return
* @throws MalformedURLException
*/
@Bean("jobGetHistoricalPrice_Coinbase_bitcoin_Step01")
public Step step01(
@Qualifier("jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Reader") ItemReader<CryptoCurrencyPrice> reader,
@Qualifier("jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Processor") ItemProcessor<CryptoCurrencyPrice, CryptoCurrencyPrice> processor,
@Qualifier("jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Writer") ItemWriter<CryptoCurrencyPrice> writer) {
return stepBuilderFactory. //
get("step1").<CryptoCurrencyPrice, CryptoCurrencyPrice>chunk(1000).//
reader(reader).//
processor(processor).//
writer(writer).//
build();
}
/**
*
* @return
* @throws MalformedURLException
* @throws URISyntaxException
*/
@Bean("jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Reader")
@StepScope
public ItemReader<CryptoCurrencyPrice> reader01() throws MalformedURLException, URISyntaxException {
// Defining the Mapper
// 2014-01-06T00:25:24-08:00,10.0
DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer() {
{
setStrict(false);
setDelimiter(",");
setIncludedFields(new int[] { 0, 1 });
setNames(new String[] { "date", "price" });
}
};
// Custom editors
Map<Object, PropertyEditor> customEditors = new HashMap<>();
customEditors.put(Double.class, new CustomNumberEditor(Double.class, true) {
@Override
public void setAsText(String text) throws IllegalArgumentException {
if (text.equalsIgnoreCase("n/a"))
text = "";
super.setAsText(text);
}
});
//
customEditors.put(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX"), false));
//
BeanWrapperFieldSetMapper<CryptoCurrencyPrice> fieldSet = new BeanWrapperFieldSetMapper<CryptoCurrencyPrice>() {
{
setTargetType(CryptoCurrencyPrice.class);
setStrict(true);
setCustomEditors(customEditors);
}
};
//
DefaultLineMapper<CryptoCurrencyPrice> mapper = new DefaultLineMapper<CryptoCurrencyPrice>() {
{
setLineTokenizer(tokenizer);
setFieldSetMapper(fieldSet);
}
};
// Defining the reader
FlatFileItemReader<CryptoCurrencyPrice> reader = new FlatFileItemReader<CryptoCurrencyPrice>();
reader.setLinesToSkip(0);
reader.setLineMapper(mapper);
// multiple pages
MultiResourceItemReader<CryptoCurrencyPrice> itemReader = new MultiResourceItemReader<>();
List<Resource> resources = new ArrayList<>();
URI uri = new URI("https://api.coinbase.com/v1/prices/historical");
for (int i = 1; i < 238; i++) {
UriComponentsBuilder builder = UriComponentsBuilder.fromUri(uri).queryParam("page", i);
Resource resource = new UrlResource(builder.build().toUri());
resources.add(resource);
}
itemReader.setResources(resources.toArray(new Resource[resources.size()]));
itemReader.setDelegate(reader);
return itemReader;
}
/**
*
* @return
*/
@Bean(name = "jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Processor")
@StepScope
public ItemProcessor<CryptoCurrencyPrice, CryptoCurrencyPrice> getProcessor01() {
//
ItemProcessor<CryptoCurrencyPrice, CryptoCurrencyPrice> itemProcessor = new ItemProcessor<CryptoCurrencyPrice, CryptoCurrencyPrice>() {
private final Calendar now = Calendar.getInstance();
private final long initial = now.getTimeInMillis() * 1000000;
private final AtomicLong ATOMIC_INTEGER = new AtomicLong(initial);
@Override
public CryptoCurrencyPrice process(CryptoCurrencyPrice cryptoCurrencyPrice) throws Exception {
cryptoCurrencyPrice.setId(ATOMIC_INTEGER.incrementAndGet());
cryptoCurrencyPrice.setSource(Source.Coinbase);
cryptoCurrencyPrice.setRead(Calendar.getInstance().getTime());
// cryptoCurrencyPrice.setValuable(valuable);
return cryptoCurrencyPrice;
}
};
//
CompositeItemProcessor<CryptoCurrencyPrice, CryptoCurrencyPrice> compositeItemProcessor = new CompositeItemProcessor<>();
compositeItemProcessor.setDelegates(Arrays.asList(itemProcessor));
return compositeItemProcessor;
}
/**
*
* @param repository
* @return
*/
@Bean(name = "jobGetHistoricalPrice_Coinbase_bitcoin_Step01_Writer")
public ItemWriter<CryptoCurrencyPrice> writer01(
@Autowired(required = true) ElasticsearchRepository<CryptoCurrencyPrice, Long> repository) {
SimpleElasticsearchWriter<CryptoCurrencyPrice> writer = new SimpleElasticsearchWriter<>(repository);
return writer;
}
}
|
dcomingore/pxf-field
|
cassandra-pxf-ext/src/main/java/com/gopivotal/cassandra/AbstractColumnFamilyInputFormat.java
|
<gh_stars>10-100
package com.gopivotal.cassandra;
import java.io.IOException;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.apache.cassandra.auth.IAuthenticator;
import org.apache.cassandra.dht.IPartitioner;
import org.apache.cassandra.dht.Range;
import org.apache.cassandra.dht.Token;
import org.apache.cassandra.hadoop.ColumnFamilySplit;
import org.apache.cassandra.hadoop.ConfigHelper;
import org.apache.cassandra.thrift.AuthenticationRequest;
import org.apache.cassandra.thrift.Cassandra;
import org.apache.cassandra.thrift.CfSplit;
import org.apache.cassandra.thrift.InvalidRequestException;
import org.apache.cassandra.thrift.KeyRange;
import org.apache.cassandra.thrift.TokenRange;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.TaskAttemptContextImpl;
import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.JobContext;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.thrift.TApplicationException;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TTransport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
@SuppressWarnings({ "rawtypes", "unchecked" })
public abstract class AbstractColumnFamilyInputFormat<K, Y> extends
InputFormat<K, Y> implements org.apache.hadoop.mapred.InputFormat<K, Y> {
private static final Logger logger = LoggerFactory
.getLogger(AbstractColumnFamilyInputFormat.class);
public static final String MAPRED_TASK_ID = "mapred.task.id";
// The simple fact that we need this is because the old Hadoop API wants us
// to "write"
// to the key and value whereas the new asks for it.
// I choose 8kb as the default max key size (instanciated only once), but
// you can
// override it in your jobConf with this setting.
public static final String CASSANDRA_HADOOP_MAX_KEY_SIZE = "cassandra.hadoop.max_key_size";
public static final int CASSANDRA_HADOOP_MAX_KEY_SIZE_DEFAULT = 8192;
private String keyspace;
private String cfName;
private IPartitioner partitioner;
protected void validateConfiguration(Configuration conf) {
if (ConfigHelper.getInputKeyspace(conf) == null
|| ConfigHelper.getInputColumnFamily(conf) == null) {
throw new UnsupportedOperationException(
"you must set the keyspace and columnfamily with setInputColumnFamily()");
}
if (ConfigHelper.getInputInitialAddress(conf) == null)
throw new UnsupportedOperationException(
"You must set the initial output address to a Cassandra node with setInputInitialAddress");
if (ConfigHelper.getInputPartitioner(conf) == null)
throw new UnsupportedOperationException(
"You must set the Cassandra partitioner class with setInputPartitioner");
}
public static Cassandra.Client createAuthenticatedClient(String location,
int port, Configuration conf) throws Exception {
logger.debug("Creating authenticated client for CF input format");
TTransport transport = ConfigHelper.getClientTransportFactory(conf)
.openTransport(location, port, conf);
TProtocol binaryProtocol = new TBinaryProtocol(transport, true, true);
Cassandra.Client client = new Cassandra.Client(binaryProtocol);
// log in
client.set_keyspace(ConfigHelper.getInputKeyspace(conf));
if (ConfigHelper.getInputKeyspaceUserName(conf) != null) {
Map<String, String> creds = new HashMap<String, String>();
creds.put(IAuthenticator.USERNAME_KEY,
ConfigHelper.getInputKeyspaceUserName(conf));
creds.put(IAuthenticator.PASSWORD_KEY,
ConfigHelper.getInputKeyspacePassword(conf));
AuthenticationRequest authRequest = new AuthenticationRequest(creds);
client.login(authRequest);
}
logger.debug("Authenticated client for CF input format created successfully");
return client;
}
public List<InputSplit> getSplits(JobContext context) throws IOException {
Configuration conf = context.getConfiguration();
validateConfiguration(conf);
// cannonical ranges and nodes holding replicas
List<TokenRange> masterRangeNodes = getRangeMap(conf);
keyspace = ConfigHelper.getInputKeyspace(context.getConfiguration());
cfName = ConfigHelper.getInputColumnFamily(context.getConfiguration());
partitioner = ConfigHelper.getInputPartitioner(context
.getConfiguration());
logger.debug("partitioner is " + partitioner);
// cannonical ranges, split into pieces, fetching the splits in parallel
ExecutorService executor = Executors.newCachedThreadPool();
List<InputSplit> splits = new ArrayList<InputSplit>();
try {
List<Future<List<InputSplit>>> splitfutures = new ArrayList<Future<List<InputSplit>>>();
KeyRange jobKeyRange = ConfigHelper.getInputKeyRange(conf);
Range<Token> jobRange = null;
if (jobKeyRange != null) {
if (jobKeyRange.start_key == null) {
logger.warn("ignoring jobKeyRange specified without start_key");
} else {
if (!partitioner.preservesOrder())
throw new UnsupportedOperationException(
"KeyRange based on keys can only be used with a order preserving paritioner");
if (jobKeyRange.start_token != null)
throw new IllegalArgumentException(
"only start_key supported");
if (jobKeyRange.end_token != null)
throw new IllegalArgumentException(
"only start_key supported");
jobRange = new Range<Token>(
partitioner.getToken(jobKeyRange.start_key),
partitioner.getToken(jobKeyRange.end_key),
partitioner);
}
}
for (TokenRange range : masterRangeNodes) {
if (jobRange == null) {
// for each range, pick a live owner and ask it to compute
// bite-sized splits
splitfutures.add(executor.submit(new SplitCallable(range,
conf)));
} else {
Range<Token> dhtRange = new Range<Token>(partitioner
.getTokenFactory().fromString(range.start_token),
partitioner.getTokenFactory().fromString(
range.end_token), partitioner);
if (dhtRange.intersects(jobRange)) {
for (Range<Token> intersection : dhtRange
.intersectionWith(jobRange)) {
range.start_token = partitioner.getTokenFactory()
.toString(intersection.left);
range.end_token = partitioner.getTokenFactory()
.toString(intersection.right);
// for each range, pick a live owner and ask it to
// compute bite-sized splits
splitfutures.add(executor.submit(new SplitCallable(
range, conf)));
}
}
}
}
// wait until we have all the results back
for (Future<List<InputSplit>> futureInputSplits : splitfutures) {
try {
splits.addAll(futureInputSplits.get());
} catch (Exception e) {
throw new IOException("Could not get input splits", e);
}
}
} finally {
executor.shutdownNow();
}
assert splits.size() > 0;
return splits;
}
/**
* Gets a token range and splits it up according to the suggested size into
* input splits that Hadoop can use.
*/
class SplitCallable implements Callable<List<InputSplit>> {
private final TokenRange range;
private final Configuration conf;
public SplitCallable(TokenRange tr, Configuration conf) {
this.range = tr;
this.conf = conf;
}
public List<InputSplit> call() throws Exception {
ArrayList<InputSplit> splits = new ArrayList<InputSplit>();
List<CfSplit> subSplits = getSubSplits(keyspace, cfName, range,
conf);
assert range.rpc_endpoints.size() == range.endpoints.size() : "rpc_endpoints size must match endpoints size";
// turn the sub-ranges into InputSplits
String[] endpoints = range.endpoints
.toArray(new String[range.endpoints.size()]);
// hadoop needs hostname, not ip
int endpointIndex = 0;
for (String endpoint : range.rpc_endpoints) {
String endpoint_address = endpoint;
if (endpoint_address == null
|| endpoint_address.equals("0.0.0.0"))
endpoint_address = range.endpoints.get(endpointIndex);
endpoints[endpointIndex++] = InetAddress.getByName(
endpoint_address).getHostName();
}
Token.TokenFactory factory = partitioner.getTokenFactory();
for (CfSplit subSplit : subSplits) {
Token left = factory.fromString(subSplit.getStart_token());
Token right = factory.fromString(subSplit.getEnd_token());
Range<Token> range = new Range<Token>(left, right, partitioner);
List<Range<Token>> ranges = range.isWrapAround() ? range
.unwrap() : ImmutableList.of(range);
for (Range<Token> subrange : ranges) {
ColumnFamilySplit split = new ColumnFamilySplit(
factory.toString(subrange.left),
factory.toString(subrange.right),
subSplit.getRow_count(), endpoints);
logger.debug("adding " + split);
splits.add(split);
}
}
return splits;
}
}
private List<CfSplit> getSubSplits(String keyspace, String cfName,
TokenRange range, Configuration conf) throws IOException {
int splitsize = ConfigHelper.getInputSplitSize(conf);
for (int i = 0; i < range.rpc_endpoints.size(); i++) {
String host = range.rpc_endpoints.get(i);
if (host == null || host.equals("0.0.0.0"))
host = range.endpoints.get(i);
try {
Cassandra.Client client = ConfigHelper.createConnection(conf,
host, ConfigHelper.getInputRpcPort(conf));
client.set_keyspace(keyspace);
try {
return client.describe_splits_ex(cfName, range.start_token,
range.end_token, splitsize);
} catch (TApplicationException e) {
// fallback to guessing split size if talking to a server
// without describe_splits_ex method
if (e.getType() == TApplicationException.UNKNOWN_METHOD) {
List<String> splitPoints = client.describe_splits(
cfName, range.start_token, range.end_token,
splitsize);
return tokenListToSplits(splitPoints, splitsize);
}
throw e;
}
} catch (IOException e) {
logger.debug("failed connect to endpoint " + host, e);
} catch (InvalidRequestException e) {
throw new RuntimeException(e);
} catch (TException e) {
throw new RuntimeException(e);
}
}
throw new IOException("failed connecting to all endpoints "
+ StringUtils.join(range.endpoints, ","));
}
private List<CfSplit> tokenListToSplits(List<String> splitTokens,
int splitsize) {
List<CfSplit> splits = Lists.newArrayListWithExpectedSize(splitTokens
.size() - 1);
for (int j = 0; j < splitTokens.size() - 1; j++)
splits.add(new CfSplit(splitTokens.get(j), splitTokens.get(j + 1),
splitsize));
return splits;
}
private List<TokenRange> getRangeMap(Configuration conf) throws IOException {
Cassandra.Client client = ConfigHelper
.getClientFromInputAddressList(conf);
List<TokenRange> map;
try {
map = client.describe_ring(ConfigHelper.getInputKeyspace(conf));
} catch (InvalidRequestException e) {
throw new RuntimeException(e);
} catch (TException e) {
throw new RuntimeException(e);
}
return map;
}
//
// Old Hadoop API
//
public org.apache.hadoop.mapred.InputSplit[] getSplits(JobConf jobConf,
int numSplits) throws IOException {
TaskAttemptContext tac = new TaskAttemptContextImpl(jobConf,
new org.apache.hadoop.mapred.TaskAttemptID());
List<org.apache.hadoop.mapreduce.InputSplit> newInputSplits = this
.getSplits(tac);
org.apache.hadoop.mapred.InputSplit[] oldInputSplits = new org.apache.hadoop.mapred.InputSplit[newInputSplits
.size()];
for (int i = 0; i < newInputSplits.size(); i++)
oldInputSplits[i] = (ColumnFamilySplit) newInputSplits.get(i);
return oldInputSplits;
}
}
|
lu4er/spring-boot-demo
|
design-pattern/src/main/java/com/xkcoding/java/d_builder/Builder.java
|
<gh_stars>0
package com.xkcoding.java.d_builder;
/**
* @Description
* @Author jerry
* @CreateTime 2020/01/08 15:25
*/
public interface Builder {
public void buildPart1();
public void buildPart2();
public Product retrieveResult();
}
|
shorn1/OI-ICPC-Problems
|
accodingbuaacoding/403D.cpp
|
#include<bits/stdc++.h>
#define ns namespace
#define lol long long
using ns std;
int n,m;
struct Node
{
int l,r;
mutable int v;
Node(int _l = 0,int _r = -1,int _v = 0):l(_l),r(_r),v(_v){}
bool operator < (const Node &a) const
{
return l < a.l;
}
};
set<Node> s;
auto split(int pos) -> set<Node>::iterator
{
auto it = s.lower_bound(pos);
if(it != s.end() && it->l == pos) return it;
--it;
int l = it->l, r = it->r;
int v = it->v;
s.erase(it);
s.insert(Node(l, pos - 1,v));
return s.insert(Node(pos,r,v)).first;
}
void assign(int l,int r,int v)
{
auto itr = split(r + 1),itl = split(l);
s.erase(itl,itr);
s.insert(Node(l,r,v));
}
int que()
{
int r = 0;
for(auto it = s.begin();it != s.end();++it)
{
r += (it->r - it->l + 1) * it->v;
}
return r;
}
int main(int argc,char** argv)
{
scanf("%d%d",&n,&m);
s.insert(Node(1,n,0));
for(int i = 1;i <= m;i++)
{
int l,r;
scanf("%d%d",&l,&r);
assign(l,r,1);
printf("%d\n",n - que());
}
return 0;
}
|
uq-eresearch/aorra
|
test/service/SimpleUserServicePluginTest.java
|
package service;
import static org.fest.assertions.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.util.UUID;
import org.junit.Test;
import com.feth.play.module.pa.user.AuthUser;
import com.feth.play.module.pa.user.AuthUserIdentity;
import com.feth.play.module.pa.user.EmailIdentity;
import providers.JackrabbitEmailPasswordAuthProvider.LoginUser;
public class SimpleUserServicePluginTest {
@Test
public void testSave() {
final SimpleUserServicePlugin plugin = new SimpleUserServicePlugin(null);
{
final AuthUser user = new LoginUser("password", "<EMAIL>");
assertThat(plugin.save(user)).isEqualTo(user);
}
try {
final AuthUser user = new AuthUser() {
private static final long serialVersionUID = 1L;
@Override
public String getProvider() {
return "unknown";
}
@Override
public String getId() {
return UUID.randomUUID().toString();
}
};
plugin.save(user);
fail("Should have triggered exception.");
} catch (UnsupportedOperationException e) {
// Good
}
}
@Test
public void testGetLocalIdentity() {
final SimpleUserServicePlugin plugin = new SimpleUserServicePlugin(null);
{
final AuthUserIdentity identity = new AuthUserIdentity() {
@Override
public String getId() {
return "<EMAIL>";
}
@Override
public String getProvider() {
return "password";
}
};
final EmailIdentity emailIdentity = (EmailIdentity)
plugin.getLocalIdentity(identity);
assertThat(emailIdentity.getId()).isEqualTo(identity.getId());
assertThat(emailIdentity.getProvider()).isEqualTo(identity.getProvider());
assertThat(emailIdentity.getEmail()).isEqualTo(identity.getId());
}
try {
final AuthUserIdentity identity = new AuthUserIdentity() {
@Override
public String getId() {
return UUID.randomUUID().toString();
}
@Override
public String getProvider() {
return "unknown";
}
};
plugin.getLocalIdentity(identity);
fail("Should have triggered exception.");
} catch (UnsupportedOperationException e) {
// Good
}
}
@Test
public void testMerge() {
final SimpleUserServicePlugin plugin = new SimpleUserServicePlugin(null);
// Not implemented, but this stub behaviour should be safe
final AuthUser oldUser = new LoginUser("password", "<EMAIL>");
final AuthUser newUser = new LoginUser("password", "<EMAIL>");
assertThat(plugin.merge(newUser, oldUser)).isEqualTo(newUser);
}
@Test
public void testLink() {
final SimpleUserServicePlugin plugin = new SimpleUserServicePlugin(null);
// Not implemented, but this stub behaviour should be safe
final AuthUser oldUser = new LoginUser("password", "<EMAIL>");
final AuthUser newUser = new LoginUser("password", "<EMAIL>");
assertThat(plugin.link(oldUser, newUser)).isEqualTo(newUser);
}
}
|
snkmr/shirasagi
|
app/models/concerns/gws/addon/survey/group_setting.rb
|
<reponame>snkmr/shirasagi
module Gws::Addon::Survey::GroupSetting
extend ActiveSupport::Concern
extend SS::Addon
set_addon_type :organization
included do
field :survey_default_due_date, type: Integer, default: 7
permit_params :survey_default_due_date
validates :survey_default_due_date, numericality: true
end
end
|
erikvanbrakel/terraform-provider-cloudconformity
|
vendor/github.com/hashicorp/terraform/terraform/resource_provisioner_mock.go
|
package terraform
import "sync"
// MockResourceProvisioner implements ResourceProvisioner but mocks out all the
// calls for testing purposes.
type MockResourceProvisioner struct {
sync.Mutex
// Anything you want, in case you need to store extra data with the mock.
Meta interface{}
ApplyCalled bool
ApplyOutput UIOutput
ApplyState *InstanceState
ApplyConfig *ResourceConfig
ApplyFn func(*InstanceState, *ResourceConfig) error
ApplyReturnError error
ValidateCalled bool
ValidateConfig *ResourceConfig
ValidateFn func(c *ResourceConfig) ([]string, []error)
ValidateReturnWarns []string
ValidateReturnErrors []error
StopCalled bool
StopFn func() error
StopReturnError error
}
func (p *MockResourceProvisioner) Validate(c *ResourceConfig) ([]string, []error) {
p.Lock()
defer p.Unlock()
p.ValidateCalled = true
p.ValidateConfig = c
if p.ValidateFn != nil {
return p.ValidateFn(c)
}
return p.ValidateReturnWarns, p.ValidateReturnErrors
}
func (p *MockResourceProvisioner) Apply(
output UIOutput,
state *InstanceState,
c *ResourceConfig) error {
p.Lock()
p.ApplyCalled = true
p.ApplyOutput = output
p.ApplyState = state
p.ApplyConfig = c
if p.ApplyFn != nil {
fn := p.ApplyFn
p.Unlock()
return fn(state, c)
}
defer p.Unlock()
return p.ApplyReturnError
}
func (p *MockResourceProvisioner) Stop() error {
p.Lock()
defer p.Unlock()
p.StopCalled = true
if p.StopFn != nil {
return p.StopFn()
}
return p.StopReturnError
}
|
divaliu1408/overfit
|
webservice.py
|
<gh_stars>0
# coding:utf-8
from soaplib.core.model.clazz import ClassModel
from spyne import Application, rpc, ServiceBase
from spyne import Integer, Unicode, Array
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
from wsgiref.simple_server import make_server
import sys
from spyne.model.complex import ComplexModel
from pymysql import connect
import os,base64,logging
#第二步:记录python Web services服务端的logging文件
logging.basicConfig(level=logging.DEBUG, filename='my_server.log')
logging.getLogger('spyne.application.server').setLevel(logging.DEBUG)
# 第三步 声明接收的客户端的变量名,也就是子段,或者xml标签,由于是数据多,就用的复杂性model,
#得声明空间,在客户端创建对象或者字典都可以,作为对象的一个属性,或者字典的key,value来保存数据的传递。
class Project(ComplexModel):
__namespace__ = 'Project'
name = Unicode
phone = Unicode
address = Unicode
location = Unicode
time = Unicode
level = Unicode
message = Unicode
#多少都可以,前提是客户端得给你传过来,你才能接收到,但是客户端有的字段,你这里必须有,否则会报错,
# ... = ...
#第四步:声明服务的类,类的方法,就是客户端访问的服务,业务逻辑,操作都在这里面,
#project就是字典,或者对象,
class SServices(ServiceBase):
@rpc(Project, _returns=Unicode)
def make_func(self, project):
# return "链接成功,webservice 服务器已接收到数据"
print(project)
#业务逻辑放这里,把接收到的参数就是project,可以保存到数据库,等操作,
print("save success")
# 第五步代码的执行,ip port就是你本地的地址,或者你的ip地址,ifcofig,
#创建服务名:SServices,服务调用的函数是make_func
if __name__ == "__main__":
# ip = '127.0.0.1'
# ip="192.168.10.73"
ip="192.168.1.107"
port = 6667
soap_app = Application([SServices],
'SampleServices',
in_protocol=Soap11(validator="lxml"),
out_protocol=Soap11())
wsgi_app = WsgiApplication(soap_app)
server = make_server(ip, port, wsgi_app)
sys.exit(server.serve_forever())
|
open-sorcerers/open-sorcerers
|
projects/reconnoiter/src/utils.js
|
<gh_stars>1-10
import { flexeca } from "flexeca"
import { fork as rawFork } from "fluture"
import { sideEffect, trace } from "xtrace"
import {
trim,
propOr,
replace,
gt,
join,
head,
last,
curry,
always as K,
range,
not,
equals,
ifElse,
identity as I,
chain,
nth,
filter,
split,
map,
pipe,
includes
} from "ramda"
import { tacit } from "ensorcel"
/* import { every } from "./cron" */
export const fork = tacit(2, rawFork)
const cwd = process.cwd()
export const netset = flexeca({ cwd }, "networksetup")
export const isOn = () =>
pipe(netset, map(includes("On")))(["-getairportpower", "en0"])
export const ping = curry((times, what) =>
pipe(
flexeca({ cwd }, "ping"),
map(
pipe(
split("\n"),
filter(includes("packet loss")),
propOr("", 0),
split(","),
last,
trim,
split(" "),
head,
replace("%", ""),
parseFloat,
// 1 = perfect connectivity, 0 = shit
z => Math.abs(100 - z) / 100
)
)
)(["-c" + times, what])
)
export const on = () =>
pipe(
netset,
map(() => true)
)(["-setairportpower", "en0", "on"])
export const off = () =>
pipe(
netset,
map(() => true)
)(["-setairportpower", "en0", "off"])
export const ipAddress = () =>
pipe(
netset,
map(
pipe(split("\n"), filter(includes("IP address")), nth(0), z =>
z.substr(z.indexOf(":") + 2, Infinity)
)
)
)(["-getinfo", "Wi-Fi"])
export const testNetwork = () =>
pipe(
netset,
map(pipe(includes("not associated"), not))
)(["-getairportnetwork", "en0"])
export const connectTo = net => () =>
pipe(netset)(["-setairportnetwork", "en0", net])
|
mrpotes/go-raml
|
benchmark/python/users.py
|
from flask import Blueprint, jsonify, request
from User import User
users_api = Blueprint('users_api', __name__)
@users_api.route('/users', methods=['GET'])
def users_get():
'''
Get random user
It is handler for GET /users
'''
return jsonify({"name":"John", "username":"Doe"})
@users_api.route('/users', methods=['POST'])
def users_post():
'''
Add user
It is handler for POST /users
'''
inputs = User.from_json(request.get_json())
#if not inputs.validate():
# return jsonify(errors=inputs.errors), 400
return inputs.name.data
@users_api.route('/users/<username>', methods=['GET'])
def users_byUsername_get(username):
'''
Get information on a specific user
It is handler for GET /users/<username>
'''
return jsonify()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.