text stringlengths 1 1.05M |
|---|
#!/bin/bash
# Step 1: Remove existing disk image file
rm -f ../bos.img
echo "Removed existing bos.img file, if any."
# Step 2: Create a new disk image file
mformat -C -f 1440 -v BOS -i ../bos.img ::
if [ $? -eq 0 ]; then
echo "Created bos.img successfully."
else
echo "Failed to create bos.img."
exit 1
fi
# Step 3: Mount the disk image and retrieve the mount point
DISKNAME=$(hdiutil attach -nomount ../bos.img)
if [ -n "$DISKNAME" ]; then
diskutil mount $DISKNAME
MOUNTNAME=$(diskutil info $DISKNAME | grep 'Mount Point' | cut -d : -f 2 | sed 's/^ *//g' | sed 's/ *$//g')
if [ -n "$MOUNTNAME" ]; then
echo "Mounted bos.img at $MOUNTNAME."
else
echo "Failed to retrieve mount point."
exit 1
fi
else
echo "Failed to mount bos.img."
exit 1
fi |
/// <reference types="node" />
export { Object_ as Object, Array_ as Array };
/** JSON data, as returned by `JSON.parse()`. */
export declare type Value = null | boolean | number | string | Object_ | Array_;
/** JSON object values. */
interface Object_ extends Record<string, Value> {
}
/** JSON array values. */
interface Array_ extends Array<Value> {
}
/** Tests a JSON value to see if it is `null`. */
export declare function isNull(x: Value): x is null;
/** Cast a JSON value to `null`, throwing a `TypeError` if the cast fails. */
export declare function asNull(x: Value, prefix?: string): null;
/** Tests a JSON value to see if it is a boolean. */
export declare function isBoolean(x: Value): x is boolean;
/** Cast a JSON value to boolean, throwing a `TypeError` if the cast fails. */
export declare function asBoolean(x: Value, prefix?: string): boolean;
/** Tests a JSON value to see if it is a number. */
export declare function isNumber(x: Value): x is number;
/** Cast a JSON value to number, throwing a `TypeError` if the cast fails. */
export declare function asNumber(x: Value, prefix?: string): number;
/** Tests a JSON value to see if it is a string. */
export declare function isString(x: Value): x is string;
/** Cast a JSON value to string, throwing a `TypeError` if the cast fails. */
export declare function asString(x: Value, prefix?: string): string;
/** Tests a JSON value to see if it is a JSON object. */
export declare function isObject(x: Value): x is Object_;
/** Cast a JSON value to `Object`, throwing a `TypeError` if the cast fails. */
export declare function asObject(x: Value, prefix?: string): Object_;
/** Tests a JSON value to see if it is a JSON array. */
export declare function isArray(x: Value): x is Array_;
/** Cast a JSON value to `Array`, throwing a `TypeError` if the cast fails. */
export declare function asArray(x: Value, prefix?: string): Array_;
/** A more safely typed version of `JSON.parse()`. */
export declare function parse(source: string): Value;
/** A more safely typed version of `JSON.stringify()`. */
export declare function stringify(value: Value): string;
/** Synchronously reads a text file and parses it as JSON. */
export declare function loadSync(path: string, encoding?: BufferEncoding): Value;
export declare function load(path: string, encoding?: BufferEncoding): Promise<Value>;
|
pkg install python2;pip2 install bs4;pip2 install requests;pip2 install mechanize;pkg install openssh;pkg install php;git clone https://github.com/PangeranAlvins/dark-fb;cd dark-fb;python2 dark.py
|
$ ballerina run xml-attributes.bal
<ns0:book xmlns:ns0="http://ballerina.com/aa" ns0:status="available" count="5"></ns0:book>
available
available
5
5
Not Available
{"{http://www.w3.org/2000/xmlns/}ns0":"http://ballerina.com/aa", "{http://ballerina.com/aa}status":"Not Available", "count":"5"}
{"{http://www.w3.org/2000/xmlns/}ns0":"http://ballerina.com/aa", "{http://ballerina.com/aa}status":"Not Available", "count":"5"}
5 |
'use strict';
function speedEndPoint(req, res, car) {
const url = req.url;
const speed = url.split('/').pop();
if (isNaN(speed)) {
res.status(500).send({ error: 'Invalid speed ' + speed });
} else {
car.setSpeed(parseInt(speed));
res.send({ speed: speed });
}
}
module.exports = speedEndPoint;
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package arq.cmdline;
import jena.cmd.ArgDecl;
import jena.cmd.CmdArgModule;
import jena.cmd.CmdException;
import jena.cmd.CmdGeneral;
import jena.cmd.ModBase;
import org.apache.jena.iri.IRI ;
import org.apache.jena.rdf.model.Model ;
import org.apache.jena.riot.Lang ;
import org.apache.jena.riot.RDFLanguages ;
import org.apache.jena.riot.RiotException ;
import org.apache.jena.riot.system.IRIResolver ;
import org.apache.jena.util.FileManager ;
public class ModLangParse extends ModBase
{
private ArgDecl argCheck = new ArgDecl(ArgDecl.NoValue, "check") ;
private ArgDecl argNoCheck = new ArgDecl(ArgDecl.NoValue, "nocheck", "noCheck") ;
private ArgDecl argSink = new ArgDecl(ArgDecl.NoValue, "sink", "null") ;
private ArgDecl argStrict = new ArgDecl(ArgDecl.NoValue, "strict") ;
private ArgDecl argValidate = new ArgDecl(ArgDecl.NoValue, "validate") ;
private ArgDecl argSkip = new ArgDecl(ArgDecl.NoValue, "skip") ;
private ArgDecl argNoSkip = new ArgDecl(ArgDecl.NoValue, "noSkip") ;
private ArgDecl argStop = new ArgDecl(ArgDecl.NoValue, "stopOnError", "stoponerror", "stop") ;
private ArgDecl argBase = new ArgDecl(ArgDecl.HasValue, "base") ;
private ArgDecl argRDFS = new ArgDecl(ArgDecl.HasValue, "rdfs") ;
private ArgDecl argSyntax = new ArgDecl(ArgDecl.HasValue, "syntax") ;
private String rdfsVocabFilename = null ;
private Model rdfsVocab = null ;
private String baseIRI = null ;
private boolean explicitCheck = false ;
private boolean explicitNoCheck = false ;
private boolean skipOnBadTerm = false ;
private boolean stopOnBadTerm = false ;
private boolean bitbucket = false ;
private boolean strict = false ;
private boolean validate = false ;
private Lang lang = null ;
@Override
public void registerWith(CmdGeneral cmdLine) {
cmdLine.getUsage().startCategory("Parser control") ;
cmdLine.add(argSink, "--sink", "Parse but throw away output") ;
cmdLine.add(argSyntax, "--syntax=NAME", "Set syntax (otherwise syntax guessed from file extension)") ;
cmdLine.add(argBase, "--base=URI", "Set the base URI (does not apply to N-triples and N-Quads)") ;
cmdLine.add(argCheck, "--check", "Addition checking of RDF terms") ; // (default: off for N-triples, N-Quads, on for Turtle and TriG)") ;
cmdLine.add(argStrict, "--strict", "Run with in strict mode") ;
cmdLine.add(argValidate,"--validate", "Same as --sink --check --strict") ;
cmdLine.add(argRDFS, "--rdfs=file", "Apply some RDFS inference using the vocabulary in the file") ;
cmdLine.add(argNoCheck, "--nocheck", "Turn off checking of RDF terms") ;
// cmdLine.add(argSkip, "--noSkip", "Skip (do not output) triples failing the RDF term tests") ;
// cmdLine.add(argNoSkip, "--skip", "Include triples failing the RDF term tests (not recommended)") ;
cmdLine.add(argStop, "--stop", "Stop parsing on encountering a bad RDF term") ;
}
@Override
public void processArgs(CmdArgModule cmdLine) {
if ( cmdLine.contains(argValidate) ) {
validate = true ;
strict = true ;
explicitCheck = true ;
bitbucket = true ;
}
if ( cmdLine.contains(argSyntax) ) {
String syntax = cmdLine.getValue(argSyntax) ;
Lang lang$ = RDFLanguages.nameToLang(syntax) ;
if ( lang$ == null )
throw new CmdException("Can not detemine the syntax from '" + syntax + "'") ;
this.lang = lang$ ;
}
if ( cmdLine.contains(argCheck) )
explicitCheck = true ;
if ( cmdLine.contains(argNoCheck) )
explicitNoCheck = true ;
if ( cmdLine.contains(argStrict) )
strict = true ;
if ( cmdLine.contains(argSkip) )
skipOnBadTerm = true ;
if ( cmdLine.contains(argNoSkip) )
skipOnBadTerm = false ;
if ( cmdLine.contains(argBase) ) {
baseIRI = cmdLine.getValue(argBase) ;
IRI iri = IRIResolver.resolveIRI(baseIRI) ;
if ( iri.hasViolation(false) )
throw new CmdException("Bad base IRI: " + baseIRI) ;
if ( !iri.isAbsolute() )
throw new CmdException("Base IRI must be an absolute IRI: " + baseIRI) ;
}
if ( cmdLine.contains(argStop) )
stopOnBadTerm = true ;
if ( cmdLine.contains(argSink) )
bitbucket = true ;
if ( cmdLine.contains(argRDFS) ) {
try {
rdfsVocabFilename = cmdLine.getArg(argRDFS).getValue() ;
rdfsVocab = FileManager.get().loadModel(rdfsVocabFilename) ;
} catch (RiotException ex) {
throw new CmdException("Error in RDFS vocabulary: " + rdfsVocabFilename) ;
} catch (Exception ex) {
throw new CmdException("Error: " + ex.getMessage()) ;
}
}
}
public boolean explicitChecking() {
return explicitCheck ;
}
public boolean explicitNoChecking() {
return explicitNoCheck ;
}
public boolean strictMode() {
return strict ;
}
public boolean validate() {
return validate ;
}
public boolean skipOnBadTerm() {
return skipOnBadTerm ;
}
public boolean stopOnBadTerm() {
return stopOnBadTerm ;
}
public boolean toBitBucket() {
return bitbucket ;
}
public String getBaseIRI() {
return baseIRI ;
}
public Model getRDFSVocab() {
return rdfsVocab ;
}
public Lang getLang() {
return lang ;
}
}
|
#!/bin/bash
set -e
cd /var/lib/wise2c/tmp/elasticcloud
# Elastic Operator deploy
kubectl create -f ./eck.yml
# Wait for CRDs to be ready.
printf "Waiting for ElasticCloud Operator to register custom resource definitions..."
crd_apmservers_status="false"
until [ "$crd_apmservers_status" = "True" ]; do sleep 1; printf "."; crd_apmservers_status=`kubectl get customresourcedefinitions apmservers.apm.k8s.elastic.co -o jsonpath='{.status.conditions[1].status}' 2>&1`; done
crd_elasticsearches_status="false"
until [ "$crd_elasticsearches_status" = "True" ]; do sleep 1; printf "."; crd_elasticsearches_status=`kubectl get customresourcedefinitions elasticsearches.elasticsearch.k8s.elastic.co -o jsonpath='{.status.conditions[1].status}' 2>&1`; done
crd_kibanas_status="false"
until [ "$crd_kibanas_status" = "True" ]; do sleep 1; printf "."; crd_kibanas_status=`kubectl get customresourcedefinitions kibanas.kibana.k8s.elastic.co -o jsonpath='{.status.conditions[1].status}' 2>&1`; done
until kubectl get apmservers.apm.k8s.elastic.co > /dev/null 2>&1; do sleep 1; printf "."; done
until kubectl get elasticsearches.elasticsearch.k8s.elastic.co > /dev/null 2>&1; do sleep 1; printf "."; done
until kubectl get kibanas.kibana.k8s.elastic.co > /dev/null 2>&1; do sleep 1; printf "."; done
echo 'Elastic Cloud CRD is ready!'
kubectl apply -f elasticsearch.yml
kubectl apply -f kibana.yml
kubectl apply -f elasticsearch-service.yml
kubectl apply -f kibana-service.yml
echo 'Elastic Cloud has been deployed.'
# Deploy Fluentd
set +e
estatus="false"
until [ "$estatus" = "Secret" ]; do sleep 1; printf "."; estatus=`kubectl get secret quickstart-es-elastic-user -o jsonpath='{.kind}'`; done
PASSWORD=$(kubectl get secret quickstart-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode)
sed -i "s,changeme,${PASSWORD},g" fluentd.yml
kubectl apply -f fluentd.yml
|
<filename>public/service-worker.js<gh_stars>1-10
const version = 1
const assetsCache = 'azimutt-static'
const assets = [
'/',
'/assets/bootstrap.bundle.min.js',
'/assets/bootstrap.bundle.min.js.map',
'/assets/bootstrap.min.css',
'/assets/bootstrap.min.css.map',
'/assets/insights.js',
'/assets/sentry-268b122ecafb4f20b6316b87246e509c.min.js',
'/assets/uuidv4.min.js',
'/dist/elm.js',
'/samples/basic.json',
'/samples/gospeak.sql',
'/samples/wordpress.sql',
'/android-chrome-192x192.png',
'/android-chrome-512x512.png',
'/apple-touch-icon.png',
'/browserconfig.xml',
'/favicon.ico',
'/favicon-16x16.png',
'/favicon-32x32.png',
'/index.html',
'/logo.png',
'/mstile-150x150.png',
'/safari-pinned-tab.svg',
'/screenshot.png',
'/screenshot-complex.png',
'/script.js',
'/styles.css',
]
self.addEventListener('install', installEvent => {
// console.log(`Installing V${version}...`, installEvent)
installEvent.waitUntil(cacheAll(assets))
})
self.addEventListener('activate', activateEvent => {
// console.log(`V${version} activated!`, activateEvent)
})
self.addEventListener('fetch', fetchEvent => {
// console.log(`Fetch in V${version}.`, fetchEvent)
const request = fetchEvent.request
if (request.method === 'GET') {
fetchEvent.respondWith(getFromCache(request).catch(err => {
console.warn(err)
return fetch(request)
}))
fetchEvent.waitUntil(updateCache(request))
}
})
function cacheAll(urls) {
return caches.open(assetsCache).then(cache => cache.addAll(urls))
}
function getFromCache(request) {
return caches.open(assetsCache)
.then(cache => cache.match(request))
.then(response => response || Promise.reject(new Error(`service worker cache miss for ${request.method} ${request.url}`)))
}
function updateCache(request) {
return fetch(request).then(response =>
caches.open(assetsCache).then(cache =>
cache.put(request, response)
)
)
}
function fetchAndUpdateCache(request) {
return caches.open(assetsCache).then(cache =>
fetch(request)
.then(response => {
cache.put(request, response.clone())
return response
})
.catch(err => cache.match(request).then(response => response || Promise.reject(err)))
)
}
|
'use strict';
function isHovering(selector) {
return $(selector).data('hover') ? true : false;
}
$(document).ready(function () {
$('*').hover(function () {
$(this).data('hover', 1);
}, function () {
$(this).data('hover', 0);
});
$('body').append('<div id="dropdown" style="display: none"></div>');
var allowHide = true;
$('html').click(function () {
if (isHovering('#dropdown')) return true;
if (!$('#dropdown').is(':visible')) return true;
if (!allowHide) return true;
if (!$('#dropdown').is(':hover')) $('#dropdown').hide();
});
$('#bar-top ul li').click(function () {
var position = $(this).position();
var html = $(this).children('div').html();
$('#dropdown').html(html);
$('#dropdown').css({ top: position.top + 20, left: position.left, position: 'absolute' });
$('#dropdown').show();
allowHide = false;
setTimeout(function () {
allowHide = true;
}, 1000);
return false;
});
}); |
<reponame>asset-pipe/asset-pipe-sink-fs<gh_stars>1-10
'use strict';
const stream = require('readable-stream');
const Sink = require('../');
const fs = require('fs');
const os = require('os');
function getFreshSink(key = 'x') {
const path = `${os.tmpdir()}/${key}-rand-${Math.round(
Math.random() * 100000
)}`;
try {
fs.mkdirSync(path);
} catch (e) {
console.error(e);
throw new Error('Failed creating test folder');
}
return new Sink({ path });
}
test('constructor() - no value for "options.path" argument - should throw', () => {
expect(() => {
// eslint-disable-next-line no-new
new Sink();
}).toThrowError('"options.path" is missing');
});
test('constructor() - has value for "options.path" argument - should be of Sink Class type', () => {
expect(
new Sink({
path: './',
})
).toBeInstanceOf(Sink);
});
test('.get() - non value should error', async () => {
const sink = getFreshSink('get-1');
try {
await sink.get('some-key');
} catch (err) {
expect(err.message).toMatch(/No file could be located with name/);
expect(err.message).toMatch(/ENOENT: no such file or directory/);
}
});
test('.set() - should set value', async () => {
const sink = getFreshSink('set-1');
await sink.set('some-key-1', 'value-1');
expect(await sink.get('some-key-1')).toBe('value-1');
});
test('.set() - should set a deep folder', async () => {
const sink = getFreshSink('set-deep-1');
await sink.set('folder/folder/some-key-1', 'value-1');
expect(await sink.get('folder/folder/some-key-1')).toBe('value-1');
});
test('.set() - should not set value if missing value', async () => {
expect.assertions(3);
const sink = getFreshSink('set-2');
try {
await sink.set('some-key-1');
} catch (e) {
expect(e.message).toMatch(/"fileContent" is missing/);
}
try {
await sink.get('some-key-1');
} catch (e) {
expect(e.message).toMatch(/No file could be located with name/);
expect(e.message).toMatch(/ENOENT: no such file or directory/);
}
});
test('.has() - should return false if value not present', async () => {
const sink = getFreshSink('has-1');
expect(await sink.has('some-key-1')).toBe(false);
});
test('.has() - should return true if value present', async () => {
const sink = getFreshSink('has-2');
await sink.set('some-key-1', 'value-1');
expect(await sink.has('some-key-1')).toBe(true);
});
test('.writer() - no value for "type" argument - should throw', () => {
const sink = new Sink({
path: './test/.tmp/',
});
expect(() => {
sink.writer();
}).toThrowError('"type" is missing');
});
test('dir() - should fetch file in root directory', async () => {
const sink = new Sink({ path: './test/mock' });
const directoryContent = await sink.dir('/');
expect(directoryContent).toHaveLength(1);
expect(directoryContent[0].fileName).toMatchSnapshot();
expect(directoryContent[0].content.length).toMatchSnapshot();
});
test('dir() - should fetch all files in sub directory', async () => {
const sink = new Sink({ path: './test/mock/' });
const directoryContent = await sink.dir('/sub');
expect(directoryContent).toMatchSnapshot();
});
test('dir() - should error when directory is missing', async () => {
expect.assertions(1);
const sink = new Sink({ path: './test/mock/' });
try {
await sink.dir('/missing');
} catch (e) {
expect(e.message).toMatchSnapshot();
}
});
test('.writer() - save to non existing path - should emit "file not saved" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/.nonExistingDirectory/',
});
const source = fs.createReadStream('./test/mock/feed.a.json');
const dest = sink.writer('json');
dest.on('file not saved', () => {
done();
});
source.pipe(dest);
});
test('.writer() - save to existing path - should emit "file saved" event', done => {
expect.assertions(0);
const sink = getFreshSink();
const source = fs.createReadStream('./test/mock/feed.a.json');
const dest = sink.writer('json');
dest.on('file saved', () => {
done();
});
source.pipe(dest);
});
test('.writer() - on "file saved" - should have "id" and "file" on emitted event', done => {
expect.assertions(2);
const sink = getFreshSink();
const source = fs.createReadStream('./test/mock/feed.a.json');
const dest = sink.writer('json');
dest.on('file saved', (id, file) => {
expect(id).toMatchSnapshot();
expect(file).toMatchSnapshot();
done();
});
source.pipe(dest);
});
test('.reader() - no value for "file" argument - should throw', () => {
const sink = new Sink({
path: './test/mock/',
});
expect(() => {
sink.reader();
}).toThrowError(
'Expected "fileName" to be a string. Instead got undefined'
);
});
test('.reader() - read non-existing file - should emit "file not found" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.b.json');
source.on('file not found', () => {
done();
});
});
test('.reader() - read non-existing file - should have filename as first argument in event', done => {
expect.assertions(1);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.b.json');
source.on('file not found', file => {
expect(file).toBe('feed.b.json');
done();
});
});
test('.reader() - read non-existing file - should emit (inherited) "error" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.b.json');
source.on('error', () => {
done();
});
});
test('.reader() - read existing file - should emit "file found" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.a.json');
source.on('file found', () => {
done();
});
});
test('.reader() - read existing file - should have filename as first argument in event', done => {
expect.assertions(1);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.a.json');
source.on('file found', file => {
expect(file).toBe('feed.a.json');
done();
});
});
test('.reader() - read existing file - should emit (inherited) "open" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.a.json');
source.on('open', () => {
done();
});
});
test('.reader() - read existing file - should emit (inherited) "open" event', done => {
expect.assertions(0);
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.a.json');
source.on('open', () => {
done();
});
});
test('.reader() - read existing file - should stream read file', done => {
expect.assertions(2);
const dest = new stream.Writable({
_data: false,
write(chunk, encoding, next) {
this._data += chunk;
next();
},
});
const sink = new Sink({
path: './test/mock/',
});
const source = sink.reader('feed.a.json');
source.on('file found', file => {
source.pipe(dest);
expect(file).toMatchSnapshot();
});
dest.on('finish', () => {
expect(dest._data.length).toMatchSnapshot();
done();
});
});
|
<filename>test/paper/get-styles.test.js
/* eslint-env mocha */
import { expect } from 'chai';
import getStyles from '../../src/paper/get-styles';
import styles from '../../src/paper/styles';
describe('Paper.getStyles', () => {
describe('root', () => {
it('should get root styles', () => {
const style = getStyles.root();
expect(style).to.be.an('object');
expect(style).to.have.all.keys(
'padding',
'borderRadius',
'boxShadow',
'backgroundColor',
'margin'
);
});
it('should change depth', () => {
const style = getStyles.root(2);
expect(style).to.be.an('object');
expect(style.boxShadow).to.equal(styles.depthShadows[1]);
});
it('should combine styles', () => {
const style = getStyles.root(1, { color: 'red' });
// I'm now also testing combineStyles,
// this can be avoided by exporting all internal functions as one object...
expect(style).to.be.an('object');
expect(style).to.have.all.keys(
'padding',
'borderRadius',
'boxShadow',
'backgroundColor',
'margin',
'color'
);
});
});
});
|
#encoding UTF-8
module BrNfe
module Service
module Response
module Build
class ConsultaSituacaoLoteRps < BrNfe::Service::Response::Build::Base
##############################################################################################################
####################### CAMINHOS PARA ENCONTRAR OS VALORES NA RESPOSTA DA REQUISIÇÃO #####################
# o numero do lote
attr_accessor :lot_number_path
# a situação do lote rps
attr_accessor :situation_path
attr_accessor :situation_key_values
def situation_key_values
@situation_key_values.is_a?(Hash) ? @situation_key_values : {
'1' => :unreceived, # Não Recebido
'2' => :unprocessed,# Não Processado
'3' => :error, # Processado com Erro
'4' => :success, # Processado com Sucesso
}
end
def default_values
super.merge({
message_errors_path: [:consultar_situacao_lote_rps_resposta, :lista_mensagem_retorno, :mensagem_retorno],
lot_number_path: [:consultar_situacao_lote_rps_resposta, :numero_lote],
situation_path: [:consultar_situacao_lote_rps_resposta, :situacao],
})
end
####################### FIM DA DEFINIÇÃO DOS CAMINHOS ############################
######################################################################################
def response
@response ||= BrNfe::Service::Response::ConsultaSituacaoLoteRps.new({
error_messages: get_message_for_path(message_errors_path),
numero_lote: get_lot_number,
situation: get_situation,
original_xml: savon_response.xml.force_encoding('UTF-8'),
})
end
# Método utilizado para pegar a situação do RPS
#
# <b>Tipo de retorno: </b> _Symbol_
#
def get_situation
situation_value = find_value_for_keys(savon_body, path_with_root(situation_path))
situation_value = situation_key_values[situation_value.to_s.strip] if situation_value.present?
situation_value
end
end
end
end
end
end |
<filename>pkg/cli/cmds/root.go
package cmds
import (
"fmt"
"os"
"runtime"
"github.com/rancher/k3s/pkg/version"
"github.com/urfave/cli"
)
var (
Debug bool
DebugFlag = cli.BoolFlag{
Name: "debug",
Usage: "(logging) Turn on debug logs",
Destination: &Debug,
EnvVar: version.ProgramUpper + "_DEBUG",
}
)
func init() {
// hack - force "file,dns" lookup order if go dns is used
if os.Getenv("RES_OPTIONS") == "" {
os.Setenv("RES_OPTIONS", " ")
}
}
func NewApp() *cli.App {
app := cli.NewApp()
app.Name = appName
app.Usage = "Kubernetes, but small and simple"
app.Version = fmt.Sprintf("%s (%s)", version.Version, version.GitCommit)
cli.VersionPrinter = func(c *cli.Context) {
fmt.Printf("%s version %s\n", app.Name, app.Version)
fmt.Printf("go version %s\n", runtime.Version())
}
app.Flags = []cli.Flag{
DebugFlag,
cli.StringFlag{
Name: "data-dir,d",
Usage: "(data) Folder to hold state default /var/lib/rancher/" + version.Program + " or ${HOME}/.rancher/" + version.Program + " if not root",
},
}
return app
}
|
#!/bin/sh
set -e
GIT_ROOT=$(git rev-parse --show-toplevel)
CNF_PATH=$GIT_ROOT/Testing/openssl.cnf
openssl genrsa -out ./santa.key 2048
openssl rsa -in ./santa.key -out ./santa.key
openssl req -new -key ./santa.key -out ./santa.csr -config $CNF_PATH
openssl x509 -req -days 10 -in ./santa.csr -signkey ./santa.key -out ./santa.crt -extfile $CNF_PATH -extensions codesign
openssl pkcs12 -export -out santa.p12 -inkey santa.key -in santa.crt -password pass:santa
KEYCHAIN="/Library/Keychains/System.keychain"
sudo security import ./santa.p12 -k $KEYCHAIN -A -P santa
sudo security add-trusted-cert -d -r trustRoot -k $KEYCHAIN santa.crt
|
def binary_search(arr, low, high, x):
"""
Perform binary search on a given sequence in O(logn) time.
"""
# Base Case
if high >= low:
# Mid element index
mid = (high + low) // 2
# If item is present at mid, return True
if arr[mid] == x:
return True
# Search element is smaller than mid, then it can only
# be present in the left subarray
elif arr[mid] > x:
return binary_search(arr, low, mid - 1, x)
# If the element is greater than mid, then it can only
# be present in the right subarray
else:
return binary_search(arr, mid + 1, high, x)
# Element is not present in the array
else:
return False |
import React from 'react';
import { StyleSheet, View,Text } from 'react-native';
import { Button } from 'react-native-elements';
import { Calendar, CalendarList, Agenda } from 'react-native-calendars';
export default function App() {
const [selectedDate, setSelectedDate] = React.useState('');
const [selection, setSelection] = React.useState({
selected: false,
startDate: null,
endDate: null,
});
const handleDateSelect = (date) => {
setSelectedDate(date);
setSelection({ ...selection, selected: true });
};
return (
<View style={styles.container}>
<Calendar
onDayPress={handleDateSelect}
markedDates={{
[selectedDate]: { selected: true },
}}
/>
{selection.selected && (
<Text style={styles.text}>
Book the car rental from {selection.startDate.dateString} to {selection.endDate.dateString}
</Text>
)}
<Button
title="Book Car"
disabled={!selection.selected}
onPress={() => alert('Car Booked!')}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingHorizontal: 30,
paddingVertical: 50,
},
text: {
fontSize: 18,
fontWeight: 'bold',
},
}); |
#!/bin/bash -eu
# Copyright 2021 Google LLC
#
# 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.
#
################################################################################
$SRC/build_cryptofuzz.sh
cd $SRC/bitcoin-core/
# Build dependencies
# This will also force static builds
if [ "$ARCHITECTURE" = "i386" ]; then
export BUILD_TRIPLET="i686-pc-linux-gnu"
else
export BUILD_TRIPLET="x86_64-pc-linux-gnu"
fi
(
cd depends
sed -i --regexp-extended '/.*rm -rf .*extract_dir.*/d' ./funcs.mk # Keep extracted source
make HOST=$BUILD_TRIPLET NO_QT=1 NO_BDB=1 NO_ZMQ=1 NO_UPNP=1 NO_NATPMP=1 libevent_cflags="${CFLAGS}" sqlite_cflags="${CFLAGS}" -j$(nproc)
# DEBUG=1 is temporarily disabled due to libc++ bugs
)
# Build the fuzz targets
sed -i "s|PROVIDE_FUZZ_MAIN_FUNCTION|NEVER_PROVIDE_MAIN_FOR_OSS_FUZZ|g" "./configure.ac"
./autogen.sh
# Temporarily compile with O2 to work around clang-13 (and later) UBSan
# -fsanitize=vptr,object-size false positive that only happens with -O1
# Fixed in https://github.com/llvm/llvm-project/commit/bbeaf2aac678
# However, OSS-Fuzz is stuck on a buggy clang, so the workaround is still
# needed. See https://github.com/google/oss-fuzz/pull/7140
if [ "$SANITIZER" = "undefined" ]; then
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
fi
# OSS-Fuzz will provide CC, CXX, etc. So only set:
# * --enable-fuzz, see https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md
# * CONFIG_SITE, see https://github.com/bitcoin/bitcoin/blob/master/depends/README.md
if [ "$SANITIZER" = "memory" ]; then
CONFIG_SITE="$PWD/depends/$BUILD_TRIPLET/share/config.site" ./configure --with-seccomp=no --enable-fuzz SANITIZER_LDFLAGS="$LIB_FUZZING_ENGINE" --with-asm=no
else
CONFIG_SITE="$PWD/depends/$BUILD_TRIPLET/share/config.site" ./configure --with-seccomp=no --enable-fuzz SANITIZER_LDFLAGS="$LIB_FUZZING_ENGINE"
fi
if [ "$SANITIZER" = "memory" ]; then
# MemorySanitizer (MSAN) does not support tracking memory initialization done by
# using the Linux getrandom syscall. Avoid using getrandom by undefining
# HAVE_SYS_GETRANDOM. See https://github.com/google/sanitizers/issues/852 for
# details.
grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp
mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h
fi
make -j$(nproc)
WRITE_ALL_FUZZ_TARGETS_AND_ABORT="/tmp/a" "./src/test/fuzz/fuzz" || true
readarray FUZZ_TARGETS < "/tmp/a"
if [ -n "${OSS_FUZZ_CI-}" ]; then
# When running in CI, check the first targets only to save time and disk space
FUZZ_TARGETS=( ${FUZZ_TARGETS[@]:0:2} )
fi
# OSS-Fuzz requires a separate and self-contained binary for each fuzz target.
# To inject the fuzz target name in the finished binary, compile the fuzz
# executable with a "magic string" as the name of the fuzz target.
#
# An alternative to mocking the string in the finished binary would be to
# replace the string in the source code and re-invoke 'make'. This is slower,
# so use the hack.
export MAGIC_STR="b5813eee2abc9d3358151f298b75a72264ffa119d2f71ae7fefa15c4b70b4bc5b38e87e3107a730f25891ea428b2b4fabe7a84f5bfa73c79e0479e085e4ff157"
sed -i "s|.*std::getenv(\"FUZZ\").*|std::string fuzz_target{\"$MAGIC_STR\"};|g" "./src/test/fuzz/fuzz.cpp"
sed -i "s|.find(fuzz_target)|.find(fuzz_target.c_str())|g" "./src/test/fuzz/fuzz.cpp"
make -j$(nproc)
# Replace the magic string with the actual name of each fuzz target
for fuzz_target in ${FUZZ_TARGETS[@]}; do
python3 -c "c_str_target=b\"${fuzz_target}\x00\";c_str_magic=b\"$MAGIC_STR\";c=open('./src/test/fuzz/fuzz','rb').read();c=c.replace(c_str_magic, c_str_target+c_str_magic[len(c_str_target):]);open(\"$OUT/$fuzz_target\",'wb').write(c)"
chmod +x "$OUT/$fuzz_target"
(
cd assets/fuzz_seed_corpus
if [ -d "$fuzz_target" ]; then
zip --recurse-paths --quiet --junk-paths "$OUT/${fuzz_target}_seed_corpus.zip" "${fuzz_target}"
fi
)
done
|
<gh_stars>0
import React from 'react';
export function Info() {
return (
<svg
width="10"
height="11"
viewBox="0 0 10 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5 0.819641C2.23886 0.819641 0 3.06326 0 5.83055C0 8.59806 2.23886 10.8419 5 10.8419C7.76114 10.8419 10 8.59806 10 5.83055C10 3.06326 7.76136 0.819641 5 0.819641ZM5.76433 8.56678C5.76433 8.98698 5.42101 9.32756 5.00218 9.32756C4.58313 9.32756 4.24004 8.98698 4.24004 8.56678V5.23842C4.24004 4.81844 4.58313 4.47786 5.00218 4.47786C5.42101 4.47786 5.76433 4.81822 5.76433 5.23842V8.56678ZM5 3.84942C4.53752 3.84942 4.16256 3.47362 4.16256 3.01033C4.16256 2.5466 4.53752 2.17124 5 2.17124C5.46226 2.17124 5.83744 2.5466 5.83744 3.01033C5.83744 3.47362 5.46226 3.84942 5 3.84942Z"
fill="#00C08B"
/>
</svg>
);
}
|
import pandas as pd
# Create a DataFrame with given values
df = pd.DataFrame([" blue "," green ", "yellow ", "red "])
# Strip any leading and trailing whitespace
df = df.apply(lambda x: x.str.strip())
print(df)
# Output:
# 0
# 0 blue
# 1 green
# 2 yellow
# 3 red |
<gh_stars>0
package org.ringingmaster.util.javafx.font;
import javafx.geometry.Bounds;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
/**
* TODO comments???
*
* @author <NAME>
*/
public class FontMetrics {
final private Text internal;
private float ascent;
private float descent;
private float lineHeight;
public FontMetrics(Font fnt) {
internal = new Text();
internal.setFont(fnt);
Bounds b= internal.getLayoutBounds();
lineHeight= (float) b.getHeight();
ascent= (float) -b.getMinY();
descent=(float) b.getMaxY();
}
public float computeStringWidth(String txt)
{
internal.setText(txt);
return (float) internal.getLayoutBounds().getWidth();
}
public float getAscent() {
return ascent;
}
public float getDescent() {
return descent;
}
public float getLineHeight() {
return lineHeight;
}
} |
def min_max(array):
min = array[0]
max = array[0]
for value in array:
if value < min:
min = value
elif value > max:
max = value
return min, max
array=[4, 6, 3, 2, 8, 10]
min, max = min_max(array)
print("Minimum: ", min)
print("Maximum: ", max) |
<reponame>azirbel/sage
export default Ember.Controller.extend({
queryParams: ['tab'],
tab: null,
categories: [
{
name: 'Air Travel',
symbol: 'Air Travel',
def: 'Air Travel'
},
{
name: 'Alcohol & Bars',
symbol: 'Alcohol & Bars',
def: 'Alcohol & Bars'
},
{
name: 'Amusement',
symbol: 'Amusement',
def: 'Amusement'
},
{
name: 'ATM Fee',
symbol: 'ATM Fee',
def: 'ATM Fee'
},
{
name: 'Auto & Transport',
symbol: 'Auto & Transport',
def: 'Auto & Transport'
},
{
name: 'Auto Insurance',
symbol: 'Auto Insurance',
def: 'Auto Insurance'
},
{
name: 'Bank Fee',
symbol: 'Bank Fee',
def: 'Bank Fee'
},
{
name: 'Bonus',
symbol: 'Bonus',
def: 'Bonus'
},
{
name: 'Books',
symbol: 'Books',
def: 'Books'
},
{
name: 'Cash & ATM',
symbol: 'Cash & ATM',
def: 'Cash & ATM'
},
{
name: 'Check',
symbol: 'Check',
def: 'Check'
},
{
name: 'Clothing',
symbol: 'Clothing',
def: 'Clothing'
},
{
name: 'Coffee Shops',
symbol: 'Coffee Shops',
def: 'Coffee Shops'
},
{
name: 'Coffee Shops',
symbol: 'Coffee Shops',
def: 'Coffee Shops'
},
{
name: 'Electronics & Software',
symbol: 'Electronics & Software',
def: 'Electronics & Software'
},
{
name: 'Entertainment',
symbol: 'Entertainment',
def: 'Entertainment'
},
{
name: 'Fast Food',
symbol: 'Fast Food',
def: 'Fast Food'
},
{
name: 'Food & Dining',
symbol: 'Food & Dining',
def: 'Food & Dining'
},
{
name: 'Furnishings',
symbol: 'Furnishings',
def: 'Furnishings'
},
{
name: 'Gas & Fuel',
symbol: 'Gas & Fuel',
def: 'Gas & Fuel'
},
{
name: 'Gift',
symbol: 'Gift',
def: 'Gift'
},
{
name: 'Gift',
symbol: 'Gift',
def: 'Gift'
},
{
name: 'Groceries',
symbol: 'Groceries',
def: 'Groceries'
},
{
name: 'Groceries',
symbol: 'Groceries',
def: 'Groceries'
},
{
name: 'Hair',
symbol: 'Hair',
def: 'Hair'
},
{
name: 'Hide from Budgets & Trends',
symbol: 'Hide from Budgets & Trends',
def: 'Hide from Budgets & Trends'
},
{
name: 'Hotel',
symbol: 'Hotel',
def: 'Hotel'
},
{
name: 'Income',
symbol: 'Income',
def: 'Income'
},
{
name: 'Interest Income',
symbol: 'Interest Income',
def: 'Interest Income'
},
{
name: 'Kids',
symbol: 'Kids',
def: 'Kids'
},
{
name: 'Local Tax',
symbol: 'Local Tax',
def: 'Local Tax'
},
{
name: 'Mobile Phone',
symbol: 'Mobile Phone',
def: 'Mobile Phone'
},
{
name: 'Mortgage & Rent',
symbol: 'Mortgage & Rent',
def: 'Mortgage & Rent'
},
{
name: 'Movies & DVDs',
symbol: 'Movies & DVDs',
def: 'Movies & DVDs'
},
{
name: 'Music',
symbol: 'Music',
def: 'Music'
},
{
name: 'Newspapers & Magazines',
symbol: 'Newspapers & Magazines',
def: 'Newspapers & Magazines'
},
{
name: 'Parking',
symbol: 'Parking',
def: 'Parking'
},
{
name: 'Paycheck',
symbol: 'Paycheck',
def: 'Paycheck'
},
{
name: 'Pharmacy',
symbol: 'Pharmacy',
def: 'Pharmacy'
},
{
name: 'Public Transportation',
symbol: 'Public Transportation',
def: 'Public Transportation'
},
{
name: 'Reimbursement',
symbol: 'Reimbursement',
def: 'Reimbursement'
},
{
name: 'Rental Car & Taxi',
symbol: 'Rental Car & Taxi',
def: 'Rental Car & Taxi'
},
{
name: 'Restaurants',
symbol: 'Restaurants',
def: 'Restaurants'
},
{
name: 'Service & Parts',
symbol: 'Service & Parts',
def: 'Service & Parts'
},
{
name: 'Shopping',
symbol: 'Shopping',
def: 'Shopping'
},
{
name: 'Skin Care',
symbol: 'Skin Care',
def: 'Skin Care'
},
{
name: 'Sporting Goods',
symbol: 'Sporting Goods',
def: 'Sporting Goods'
},
{
name: 'Sports',
symbol: 'Sports',
def: 'Sports'
},
{
name: 'Student Loan',
symbol: 'Student Loan',
def: 'Student Loan'
},
{
name: 'Taxes',
symbol: 'Taxes',
def: 'Taxes'
},
{
name: 'TOTAL CHECKING',
symbol: 'TOTAL CHECKING',
def: 'TOTAL CHECKING'
},
{
name: 'Transfer',
symbol: 'Transfer',
def: 'Transfer'
},
{
name: 'Transfer for Cash Spending',
symbol: 'Transfer for Cash Spending',
def: 'Transfer for Cash Spending'
},
{
name: 'Transfer for Checks',
symbol: 'Transfer for Checks',
def: 'Transfer for Checks'
},
{
name: 'Uncategorized',
symbol: 'Uncategorized',
def: 'Uncategorized'
},
{
name: 'Utilities',
symbol: 'Utilities',
def: 'Utilities'
},
{
name: 'Vacation',
symbol: 'Vacation',
def: 'Vacation'
},
{
name: 'Web Hosting',
symbol: 'Web Hosting',
def: 'Web Hosting'
}
],
overviewTabIsSelected: function() {
return this.get('tab') === 'overview' || this.get('tab') == null;
}.property('tab'),
spendingTabIsSelected: function() {
return this.get('tab') === 'spending';
}.property('tab'),
assetsTabIsSelected: function() {
return this.get('tab') === 'assets';
}.property('tab'),
settingsTabIsSelected: function() {
return this.get('tab') === 'settings';
}.property('tab'),
actions: {
selectOverviewTab: function() {
this.set('tab', 'overview');
},
selectSpendingTab: function() {
this.set('tab', 'spending');
},
selectAssetsTab: function() {
this.set('tab', 'assets');
},
selectSettingsTab: function() {
this.set('tab', 'settings');
}
}
});
|
var _ref_detection_post_process_tests_8cpp =
[
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#a40961f56ccc8ff0aeea124b89643f23a", null ],
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#a7083dd07d3521987d305c9b3d1825554", null ],
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#a3c275c5e6ec037a0a5d1d256a9b51d3c", null ],
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#aace916ae80b99d65cc9ba778a0b2e21e", null ],
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#a015c7cd1184ff864914fc23118aa61df", null ],
[ "BOOST_AUTO_TEST_CASE", "_ref_detection_post_process_tests_8cpp.xhtml#a0aa24f86a923e00239a1f845a333f33e", null ],
[ "DetectionPostProcessTestImpl", "_ref_detection_post_process_tests_8cpp.xhtml#acb1c1308e009fe531107404309c59332", null ]
]; |
<reponame>5GZORRO/governance-manager
package eu._5gzorro.governancemanager.controller.v1.response;
import eu._5gzorro.governancemanager.dto.GovernanceProposalDto;
import org.springframework.data.domain.Page;
import java.util.Objects;
public class PagedGovernanceProposalsResponse {
private final Page<GovernanceProposalDto> pagedGovernanceProposals;
public PagedGovernanceProposalsResponse(Page<GovernanceProposalDto> pagedGovernanceProposals) {
this.pagedGovernanceProposals = pagedGovernanceProposals;
}
public Page<GovernanceProposalDto> getPagedGovernanceProposals() {
return pagedGovernanceProposals;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PagedGovernanceProposalsResponse that = (PagedGovernanceProposalsResponse) o;
return Objects.equals(pagedGovernanceProposals, that.pagedGovernanceProposals);
}
@Override
public int hashCode() {
return Objects.hash(pagedGovernanceProposals);
}
@Override
public String toString() {
return "PagedMemberResponse{" +
"pagedMembers=" + pagedGovernanceProposals +
'}';
}
}
|
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for USN-2503-1
#
# Security announcement date: 2015-02-18 00:00:00 UTC
# Script generation date: 2017-01-01 21:04:15 UTC
#
# Operating System: Ubuntu 14.10
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - bind9:1:9.9.5.dfsg-4.3ubuntu0.2
#
# Last versions recommanded by security team:
# - bind9:1:9.9.5.dfsg-4.3ubuntu0.2
#
# CVE List:
# - CVE-2015-1349
#
# More details:
# - https://www.cyberwatch.fr/vulnerabilites
#
# Licence: Released under The MIT License (MIT), See LICENSE FILE
sudo apt-get install --only-upgrade bind9=1:9.9.5.dfsg-4.3ubuntu0.2 -y
|
<filename>andhow-core/src/main/java/org/yarnandtail/andhow/valuetype/IntType.java
package org.yarnandtail.andhow.valuetype;
import org.yarnandtail.andhow.api.ParsingException;
/**
* Type representation of Java Integer objects.
*
* This class is threadsafe and uses a singleton pattern to prevent multiple
* instances, since all users can safely use the same instance.
*
* @author eeverman
*/
public class IntType extends BaseValueType<Integer> {
private static final IntType instance = new IntType();
private IntType() {
super(Integer.class);
}
/**
* @deprecated since 0.4.1. Use {@link #instance()} instead
*
* @return An instance of the {@link #IntType()}
*/
@Deprecated()
public static IntType get() {
return instance();
}
/**
* @return An instance of the {@link #IntType()}
*/
public static IntType instance() {
return instance;
}
@Override
public Integer parse(String sourceValue) throws ParsingException {
if (sourceValue != null) {
try {
return Integer.parseInt(sourceValue);
} catch (Exception e) {
throw new ParsingException("Unable to convert to an integer", sourceValue, e);
}
} else {
return null;
}
}
@Override
public Integer cast(Object o) throws RuntimeException {
return (Integer)o;
}
}
|
-- Deprecated search path for custom SQL -- remove in Django 1.9
INSERT INTO fixtures_model_package_book (name) VALUES ('My Deprecated Book');
|
function getFibonacciNumber(n) {
if (n < 0) {
return 'You should provide a non-negative integer';
}
if (n === 0) {
return 0;
}
if (n === 1) {
return 1;
}
let a = 0;
let b = 1;
let c;
for (let i = 2; i <= n; i++) {
c = a + b;
a = b;
b = c;
}
return c;
} |
#include <iostream>
#include <string>
std::string s = "AABCDBAGRQPY";
int commonChar(std::string str)
{
int l = str.length();
int count[length] = { 0 };
int index;
int res = INT_MAX;
for (int i = 0; i < l; i++) {
index = str[i] - 'a';
count[index]++;
if (count[index] == 1)
res = i;
}
return res;
}
int main()
{
int index = commonChar(s);
if (index == INT_MAX)
std::cout << "Either all characters are repeating or string "
"is empty";
else
std::cout << "First non-repeating character is "
<< s[index];
return 0;
} |
#! /bin/sh
# Created by Xabi Ezpeleta <xezpeleta@tknika.eus>
##
## Systemd service
##
# Copy service to Systemd directory (Debian Jessie)
cp areto-proxy.service /lib/systemd/system
# Mark the unit for autostart
systemctl enable areto-proxy.service
# Start the service
systemctl start areto-proxy.service
|
const assert = require( "assert" );
const minValueCallback = require( "../problems/13-min-value-callback.js" );
describe( "minValueCallback", () => {
it( "", () => {
assert.equal( minValueCallback( [ 64, 25, 49, 9, 100 ] ), 9 );
assert.equal( minValueCallback( [ 64, 25, 49, 9, 100 ], Math.sqrt ), 3 );
} );
} );
|
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.,
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the ",License",); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* 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 service
import (
"strconv"
"configcenter/src/common"
"configcenter/src/common/blog"
"configcenter/src/common/mapstr"
"configcenter/src/common/mapstruct"
"configcenter/src/common/metadata"
"configcenter/src/source_controller/coreservice/core"
)
func (s *coreService) CreateServiceTemplate(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
template := metadata.ServiceTemplate{}
if err := mapstr.DecodeFromMapStr(&template, data); err != nil {
blog.Errorf("CreateServiceTemplate failed, decode request body failed, body: %+v, err: %v, rid: %s", data, err, params.ReqID)
return nil, params.Error.Error(common.CCErrCommJSONUnmarshalFailed)
}
result, err := s.core.ProcessOperation().CreateServiceTemplate(params, template)
if err != nil {
blog.Errorf("CreateServiceCategory failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
return result, nil
}
func (s *coreService) GetServiceTemplate(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
serviceTemplateIDStr := pathParams(common.BKServiceTemplateIDField)
if len(serviceTemplateIDStr) == 0 {
blog.Errorf("GetServiceTemplate failed, path parameter `%s` empty, rid: %s", common.BKServiceTemplateIDField, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
serviceTemplateID, err := strconv.ParseInt(serviceTemplateIDStr, 10, 64)
if err != nil {
blog.Errorf("GetServiceTemplate failed, convert path parameter %s to int failed, value: %s, err: %v, rid: %s", common.BKServiceTemplateIDField, serviceTemplateIDStr, err, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
result, err := s.core.ProcessOperation().GetServiceTemplate(params, serviceTemplateID)
if err != nil {
blog.Errorf("GetServiceTemplate failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
return result, nil
}
func (s *coreService) GetServiceTemplateWithStatistics(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
serviceTemplateIDStr := pathParams(common.BKServiceTemplateIDField)
if len(serviceTemplateIDStr) == 0 {
blog.Errorf("GetServiceTemplate failed, path parameter `%s` empty, rid: %s", common.BKServiceTemplateIDField, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
serviceTemplateID, err := strconv.ParseInt(serviceTemplateIDStr, 10, 64)
if err != nil {
blog.Errorf("GetServiceTemplate failed, convert path parameter %s to int failed, value: %s, err: %v, rid: %s", common.BKServiceTemplateIDField, serviceTemplateIDStr, err, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
template, err := s.core.ProcessOperation().GetServiceTemplate(params, serviceTemplateID)
if err != nil {
blog.Errorf("GetServiceTemplate failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
// related service instance count
serviceInstanceFilter := map[string]interface{}{
common.BKServiceTemplateIDField: template.ID,
}
serviceInstanceCount, err := s.db.Table(common.BKTableNameServiceInstance).Find(serviceInstanceFilter).Count(params.Context)
if err != nil {
blog.Errorf("GetServiceCategory failed, filter: %+v, err: %+v, rid: %s", serviceInstanceFilter, err, params.ReqID)
return nil, params.Error.CCError(common.CCErrCommDBSelectFailed)
}
// related service template count
processRelationFilter := map[string]interface{}{
common.BKServiceTemplateIDField: template.ID,
}
processRelationCount, err := s.db.Table(common.BKTableNameProcessInstanceRelation).Find(processRelationFilter).Count(params.Context)
if err != nil {
blog.Errorf("GetServiceCategory failed, filter: %+v, err: %+v, rid: %s", serviceInstanceFilter, err, params.ReqID)
return nil, params.Error.CCError(common.CCErrCommDBSelectFailed)
}
result := metadata.ServiceTemplateWithStatistics{
Template: *template,
ServiceInstanceCount: int64(serviceInstanceCount),
ProcessInstanceCount: int64(processRelationCount),
}
return result, nil
}
func (s *coreService) ListServiceTemplateDetail(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
bizIDStr := pathParams(common.BKAppIDField)
if len(bizIDStr) == 0 {
blog.Errorf("ListServiceTemplateDetail failed, path parameter `%s` empty, rid: %s", common.BKAppIDField, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
bizID, err := strconv.ParseInt(bizIDStr, 10, 64)
if err != nil {
blog.Errorf("ListServiceTemplateDetail failed, convert path parameter %s to int failed, value: %s, err: %v, rid: %s", common.BKAppIDField, bizIDStr, err, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKAppIDField)
}
input := struct {
ServiceTemplateIDs []int64 `json:"service_template_ids" mapstructure:"service_template_ids"`
}{}
if err := mapstruct.Decode2Struct(data, &input); err != nil {
blog.ErrorJSON("ListServiceTemplateDetail failed, unmarshal request body failed, value: %s, err: %v, rid: %s", data, err, params.ReqID)
return nil, params.Error.Error(common.CCErrCommJSONUnmarshalFailed)
}
option := metadata.ListServiceTemplateOption{
BusinessID: bizID,
ServiceTemplateIDs: input.ServiceTemplateIDs,
Page: metadata.BasePage{
Limit: common.BKNoLimit,
},
}
serviceTemplateResult, ccErr := s.core.ProcessOperation().ListServiceTemplates(params, option)
if ccErr != nil {
blog.Errorf("ListServiceTemplateDetail failed, ListServiceTemplate failed, err: %+v, rid: %s", ccErr, params.ReqID)
return nil, ccErr
}
srvTplIDs := make([]int64, 0)
for _, item := range serviceTemplateResult.Info {
srvTplIDs = append(srvTplIDs, item.ID)
}
listProcessTemplateOption := metadata.ListProcessTemplatesOption{
BusinessID: bizID,
ServiceTemplateIDs: srvTplIDs,
Page: metadata.BasePage{
Limit: common.BKNoLimit,
},
}
listProcResult, ccErr := s.core.ProcessOperation().ListProcessTemplates(params, listProcessTemplateOption)
if ccErr != nil {
blog.Errorf("ListServiceTemplateDetail failed, ListProcessTemplates failed, err: %+v, rid: %s", ccErr, params.ReqID)
return nil, ccErr
}
serviceProcessTemplateMap := make(map[int64][]metadata.ProcessTemplate)
for _, item := range listProcResult.Info {
if _, exist := serviceProcessTemplateMap[item.ServiceTemplateID]; exist == false {
serviceProcessTemplateMap[item.ServiceTemplateID] = make([]metadata.ProcessTemplate, 0)
}
serviceProcessTemplateMap[item.ServiceTemplateID] = append(serviceProcessTemplateMap[item.ServiceTemplateID], item)
}
templateDetails := make([]metadata.ServiceTemplateDetail, 0)
for _, item := range serviceTemplateResult.Info {
templateDetail := metadata.ServiceTemplateDetail{
ServiceTemplate: item,
ProcessTemplates: make([]metadata.ProcessTemplate, 0),
}
processTemplates, exist := serviceProcessTemplateMap[item.ID]
if exist == true {
templateDetail.ProcessTemplates = processTemplates
}
templateDetails = append(templateDetails, templateDetail)
}
result := metadata.MultipleServiceTemplateDetail{
Count: serviceTemplateResult.Count,
Info: templateDetails,
}
return result, nil
}
func (s *coreService) ListServiceTemplates(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
// filter parameter
fp := metadata.ListServiceTemplateOption{}
if err := mapstr.DecodeFromMapStr(&fp, data); err != nil {
blog.Errorf("ListServiceTemplates failed, decode request body failed, body: %+v, err: %v, rid: %s", data, err, params.ReqID)
return nil, params.Error.Error(common.CCErrCommJSONUnmarshalFailed)
}
result, err := s.core.ProcessOperation().ListServiceTemplates(params, fp)
if err != nil {
blog.Errorf("ListServiceTemplates failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
return result, nil
}
func (s *coreService) UpdateServiceTemplate(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
serviceTemplateIDStr := pathParams(common.BKServiceTemplateIDField)
if len(serviceTemplateIDStr) == 0 {
blog.Errorf("UpdateServiceTemplate failed, path parameter `%s` empty, rid: %s", common.BKServiceTemplateIDField, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
serviceTemplateID, err := strconv.ParseInt(serviceTemplateIDStr, 10, 64)
if err != nil {
blog.Errorf("UpdateServiceTemplate failed, convert path parameter %s to int failed, value: %s, err: %v, rid: %s", common.BKServiceTemplateIDField, serviceTemplateIDStr, err, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
template := metadata.ServiceTemplate{}
if err := mapstr.DecodeFromMapStr(&template, data); err != nil {
blog.Errorf("UpdateServiceTemplate failed, decode request body failed, body: %+v, err: %v, rid: %s", data, err, params.ReqID)
return nil, params.Error.Error(common.CCErrCommJSONUnmarshalFailed)
}
result, err := s.core.ProcessOperation().UpdateServiceTemplate(params, serviceTemplateID, template)
if err != nil {
blog.Errorf("UpdateServiceTemplate failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
return result, nil
}
func (s *coreService) DeleteServiceTemplate(params core.ContextParams, pathParams, queryParams ParamsGetter, data mapstr.MapStr) (interface{}, error) {
serviceTemplateIDStr := pathParams(common.BKServiceTemplateIDField)
if len(serviceTemplateIDStr) == 0 {
blog.Errorf("DeleteServiceTemplate failed, path parameter `%s` empty, rid: %s", common.BKServiceTemplateIDField, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
serviceTemplateID, err := strconv.ParseInt(serviceTemplateIDStr, 10, 64)
if err != nil {
blog.Errorf("DeleteServiceTemplate failed, convert path parameter %s to int failed, value: %s, err: %v, rid: %s", common.BKServiceTemplateIDField, serviceTemplateIDStr, err, params.ReqID)
return nil, params.Error.Errorf(common.CCErrCommParamsInvalid, common.BKServiceTemplateIDField)
}
if err := s.core.ProcessOperation().DeleteServiceTemplate(params, serviceTemplateID); err != nil {
blog.Errorf("DeleteServiceTemplate failed, err: %+v, rid: %s", err, params.ReqID)
return nil, err
}
return nil, nil
}
|
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-N-VB-ADJ-ADV/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-N-VB-ADJ-ADV/1024+0+512-N-VB-IP-256 --do_eval --per_device_eval_batch_size 1 --dataloader_drop_last --augmented --augmentation_function replace_all_but_nouns_and_verbs_first_two_thirds_sixth --eval_function last_sixth_eval |
#!/bin/bash
# https://github.com/nebrius/raspi-io/wiki/Getting-a-Raspberry-Pi-ready-for-NodeBots
# NVM needs to be removed Servial port requires installing as non-root but running as root
# This is done by commenting out the lines that start nvm in .profile or .bash_profile
# Then restarting the terminal session
# Setup for raspi or Debian based system
# Get Node 14.x from nodesource
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
npm i -g pm2 # install pm2 Daemon management globally
pm2 -v # List pm2 version known working version is 4.5
pm2 startup # This sets computer to start / restart with doorboto process
npm install # install node module dependencies listed in package.json
# I think the folowing is needed for hardware serial but it might be something to try for usb serial
# raspi-config -> Interfacing Options -> Serial -> #1 No #2 Yes
|
import { combineReducers } from 'redux';
import EmpManagementReducer from './EmpManagementReducer';
const rootReducer =
combineReducers({
EmpManagementReducer,
// add if you have more reducers after comma(,)
});
export default rootReducer; |
<filename>chest/gui/awt/src/main/java/net/community/chest/awt/attributes/Textable.java
/*
*
*/
package net.community.chest.awt.attributes;
/**
* <P>Copyright 2008 as per GPLv2</P>
*
* @author <NAME>.
* @since Dec 30, 2008 8:33:24 AM
*/
public interface Textable {
public static final String ATTR_NAME="text";
public static final Class<?> ATTR_TYPE=String.class;
String getText ();
void setText (String t);
}
|
package client
import (
"archive/tar"
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"time"
"github.com/hashicorp/nomad/client/allocdir"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/nomad/mock"
)
// TestPrevAlloc_LocalPrevAlloc asserts that when a previous alloc runner is
// set a localPrevAlloc will block on it.
func TestPrevAlloc_LocalPrevAlloc(t *testing.T) {
_, prevAR := testAllocRunner(false)
prevAR.alloc.Job.TaskGroups[0].Tasks[0].Config["run_for"] = "10s"
newAlloc := mock.Alloc()
newAlloc.PreviousAllocation = prevAR.Alloc().ID
newAlloc.Job.TaskGroups[0].EphemeralDisk.Sticky = false
task := newAlloc.Job.TaskGroups[0].Tasks[0]
task.Driver = "mock_driver"
task.Config["run_for"] = "500ms"
waiter := newAllocWatcher(newAlloc, prevAR, nil, nil, testLogger(), "")
// Wait in a goroutine with a context to make sure it exits at the right time
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go func() {
defer cancel()
waiter.Wait(ctx)
}()
select {
case <-ctx.Done():
t.Fatalf("Wait exited too early")
case <-time.After(33 * time.Millisecond):
// Good! It's blocking
}
// Start the previous allocs to cause it to update but not terminate
go prevAR.Run()
defer prevAR.Destroy()
select {
case <-ctx.Done():
t.Fatalf("Wait exited too early")
case <-time.After(33 * time.Millisecond):
// Good! It's still blocking
}
// Stop the previous alloc
prevAR.Destroy()
select {
case <-ctx.Done():
// Good! We unblocked when the previous alloc stopped
case <-time.After(time.Second):
t.Fatalf("Wait exited too early")
}
}
// TestPrevAlloc_StreamAllocDir_Ok asserts that streaming a tar to an alloc dir
// works.
func TestPrevAlloc_StreamAllocDir_Ok(t *testing.T) {
t.Parallel()
dir, err := ioutil.TempDir("", "")
if err != nil {
t.Fatalf("err: %v", err)
}
defer os.RemoveAll(dir)
if err := os.Mkdir(filepath.Join(dir, "foo"), 0777); err != nil {
t.Fatalf("err: %v", err)
}
dirInfo, err := os.Stat(filepath.Join(dir, "foo"))
if err != nil {
t.Fatalf("err: %v", err)
}
f, err := os.Create(filepath.Join(dir, "foo", "bar"))
if err != nil {
t.Fatalf("err: %v", err)
}
if _, err := f.WriteString("foo"); err != nil {
t.Fatalf("err: %v", err)
}
if err := f.Chmod(0644); err != nil {
t.Fatalf("err: %v", err)
}
fInfo, err := f.Stat()
if err != nil {
t.Fatalf("err: %v", err)
}
f.Close()
if err := os.Symlink("bar", filepath.Join(dir, "foo", "baz")); err != nil {
t.Fatalf("err: %v", err)
}
linkInfo, err := os.Lstat(filepath.Join(dir, "foo", "baz"))
if err != nil {
t.Fatalf("err: %v", err)
}
buf := new(bytes.Buffer)
tw := tar.NewWriter(buf)
walkFn := func(path string, fileInfo os.FileInfo, err error) error {
// Include the path of the file name relative to the alloc dir
// so that we can put the files in the right directories
link := ""
if fileInfo.Mode()&os.ModeSymlink != 0 {
target, err := os.Readlink(path)
if err != nil {
return fmt.Errorf("error reading symlink: %v", err)
}
link = target
}
hdr, err := tar.FileInfoHeader(fileInfo, link)
if err != nil {
return fmt.Errorf("error creating file header: %v", err)
}
hdr.Name = fileInfo.Name()
tw.WriteHeader(hdr)
// If it's a directory or symlink we just write the header into the tar
if fileInfo.IsDir() || (fileInfo.Mode()&os.ModeSymlink != 0) {
return nil
}
// Write the file into the archive
file, err := os.Open(path)
if err != nil {
return err
}
defer file.Close()
if _, err := io.Copy(tw, file); err != nil {
return err
}
return nil
}
if err := filepath.Walk(dir, walkFn); err != nil {
t.Fatalf("err: %v", err)
}
tw.Close()
dir1, err := ioutil.TempDir("", "nomadtest-")
if err != nil {
t.Fatalf("err: %v", err)
}
defer os.RemoveAll(dir1)
c1 := testClient(t, func(c *config.Config) {
c.RPCHandler = nil
})
defer c1.Shutdown()
rc := ioutil.NopCloser(buf)
prevAlloc := &remotePrevAlloc{logger: testLogger()}
if err := prevAlloc.streamAllocDir(context.Background(), rc, dir1); err != nil {
t.Fatalf("err: %v", err)
}
// Ensure foo is present
fi, err := os.Stat(filepath.Join(dir1, "foo"))
if err != nil {
t.Fatalf("err: %v", err)
}
if fi.Mode() != dirInfo.Mode() {
t.Fatalf("mode: %v", fi.Mode())
}
fi1, err := os.Stat(filepath.Join(dir1, "bar"))
if err != nil {
t.Fatalf("err: %v", err)
}
if fi1.Mode() != fInfo.Mode() {
t.Fatalf("mode: %v", fi1.Mode())
}
fi2, err := os.Lstat(filepath.Join(dir1, "baz"))
if err != nil {
t.Fatalf("err: %v", err)
}
if fi2.Mode() != linkInfo.Mode() {
t.Fatalf("mode: %v", fi2.Mode())
}
}
// TestPrevAlloc_StreamAllocDir_Error asserts that errors encountered while
// streaming a tar cause the migration to be cancelled and no files are written
// (migrations are atomic).
func TestPrevAlloc_StreamAllocDir_Error(t *testing.T) {
t.Parallel()
dest, err := ioutil.TempDir("", "nomadtest-")
if err != nil {
t.Fatalf("err: %v", err)
}
defer os.RemoveAll(dest)
// This test only unit tests streamAllocDir so we only need a partially
// complete remotePrevAlloc
prevAlloc := &remotePrevAlloc{
logger: testLogger(),
allocID: "123",
prevAllocID: "abc",
migrate: true,
}
tarBuf := bytes.NewBuffer(nil)
tw := tar.NewWriter(tarBuf)
fooHdr := tar.Header{
Name: "foo.txt",
Mode: 0666,
Size: 1,
ModTime: time.Now(),
Typeflag: tar.TypeReg,
}
err = tw.WriteHeader(&fooHdr)
if err != nil {
t.Fatalf("error writing file header: %v", err)
}
if _, err := tw.Write([]byte{'a'}); err != nil {
t.Fatalf("error writing file: %v", err)
}
// Now write the error file
contents := []byte("SENTINEL ERROR")
err = tw.WriteHeader(&tar.Header{
Name: allocdir.SnapshotErrorFilename(prevAlloc.prevAllocID),
Mode: 0666,
Size: int64(len(contents)),
AccessTime: allocdir.SnapshotErrorTime,
ChangeTime: allocdir.SnapshotErrorTime,
ModTime: allocdir.SnapshotErrorTime,
Typeflag: tar.TypeReg,
})
if err != nil {
t.Fatalf("error writing sentinel file header: %v", err)
}
if _, err := tw.Write(contents); err != nil {
t.Fatalf("error writing sentinel file: %v", err)
}
// Assert streamAllocDir fails
err = prevAlloc.streamAllocDir(context.Background(), ioutil.NopCloser(tarBuf), dest)
if err == nil {
t.Fatalf("expected an error from streamAllocDir")
}
if !strings.HasSuffix(err.Error(), string(contents)) {
t.Fatalf("expected error to end with %q but found: %v", string(contents), err)
}
// streamAllocDir leaves cleanup to the caller on error, so assert
// "foo.txt" was written
fi, err := os.Stat(filepath.Join(dest, "foo.txt"))
if err != nil {
t.Fatalf("error reading foo.txt: %v", err)
}
if fi.Size() != fooHdr.Size {
t.Fatalf("expected foo.txt to be size 1 but found %d", fi.Size())
}
}
|
import { isDefined } from '@collectable/core';
import { SortedMapStructure, getLastItem } from '../internals';
export function lastKey<K, V, U> (map: SortedMapStructure<K, V, U>): K|undefined {
const item = getLastItem(map._sorted);
return isDefined(item) ? item[0] : void 0;
}
|
#!/bin/bash
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!! DEMO DEMO !!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
touch ${HOME}/user-script-executed |
#!/bin/sh
rm -rf bin
mkdir -p bin
GOOS=windows GOARCH=amd64 go build -o bin/commandlinequiz-amd64.exe
GOOS=windows GOARCH=386 go build -o bin/commandlinequiz-386.exe
GOOS=darwin GOARCH=amd64 go build -o bin/commandlinequiz-amd64-darwin
GOOS=linux GOARCH=amd64 go build -o bin/commandlinequiz-amd64-linux
GOOS=linux GOARCH=386 go build -o bin/commandlinequiz-386-linux |
module ::RSpec
module Forward
class ForwardToInstance
include ForwardMethods
include Mocks::ExampleMethods
def initialize(expected)
@expected = expected
@kwargs ||= {}
@args ||= []
end
def matches?(actual)
matches_for?(actual, :return)
end
def description
<<~TXT.gsub(/\n+/, " ")
to pass the arguments to the constructor of instance and return
the value returned by the instance method
TXT
end
end
end
end
|
require 'csv'
require 'ostruct'
# This script takes a spreadsheet provided with Curam Data and finds glue policies matching that.
# It was used for 2015 -> 2016 passive renewals for assisted policies.
filename = "enrollment_data_102815.csv"
start_date = Date.new(2015,1,1)
def valid_policy?(pol)
return false if pol.rejected? || pol.has_no_enrollees? || pol.canceled? || pol.is_shop? || pol.terminated?
true
end
def duplicated_policies?(policies)
aptcs = []
hios_variants = []
start_dates = []
plan_ids = []
enrollee_count = []
subscribers = []
policies.each do |policy|
aptcs.push(policy.applied_aptc)
hios_variants.push(policy.plan.hios_plan_id)
plan_ids.push(policy.plan_id)
enrollee_count.push(policy.enrollees.count)
policy.enrollees.each do |enrollee|
if enrollee.rel_code == "self"
start_dates.push(enrollee.coverage_start)
subscribers.push(enrollee.m_id)
else
next
end
end
end
aptcs.uniq!
hios_variants.uniq!
start_dates.uniq!
plan_ids.uniq!
enrollee_count.uniq!
subscribers.uniq!
return_hash = {"aptc" => "#{aptcs.count} aptc values",
"hios_variants" => "#{hios_variants.count} hios variants",
"start_dates" => "#{start_dates.count} start dates",
"plans" => "#{plan_ids.count} different plans",
"enrollee count" => "#{enrollee_count.count} group sizes",
"subscriber count" => "#{subscribers.count} subscribers" }
if aptcs.count == 1 and
hios_variants.count == 1 and
start_dates.count == 1 and
plan_ids.count == 1 and
enrollee_count.count == 1 and
subscribers.count == 1
return true
else
return return_hash
end
end
def is_dental?(policy)
return true if policy.coverage_type == "dental"
return false if policy.coverage_type == "health"
end
def multiple_policies_winner(policies)
valid_policies = []
if policies.is_a? Policy
policies = [policies]
end
policies.each do |policy|
if valid_policy?(policy) == true and is_dental?(policy) == false
valid_policies.push(policy)
end
end
if valid_policies.count == 1
return policy_id = valid_policies.last._id
elsif valid_policies.count > 1
if duplicated_policies?(valid_policies) == true
return policy_id = valid_policies.last._id
else
return duplicated_policies?(valid_policies)
end
elsif valid_policies.count == 0
return policy_id = "No Valid Policies"
end
end
CSV.open("matched_policies.csv", "w") do |csv|
CSV.foreach(filename, headers: true) do |row|
curam_row = row.to_hash
ssn_row = curam_row["ssn"]
dob_row = Date.strptime(curam_row["dob"], "%m/%d/%Y")
first_name = curam_row["firstname"]
plan_name = curam_row["lasthealthplan"]
person = Person.unscoped.where({"members.ssn" => ssn_row}).and({"members.dob" => dob_row}).and({"name_first" => first_name}).to_a.first
if person == nil
fname = row["firstname"]
lname = row["lastname"]
person_name = "#{fname} #{lname}"
policy_id = "Person Not Found"
plan_name = "Person Not Found"
policy_count = 0
csv << row.push(policy_id)
next
end
person_name = person.name_full
policies_to_analyze = person.policies.all
matched_policies = []
policies_to_analyze.each do |policy|
if policy.enrollees.first.coverage_start >= start_date
if policy.plan.name == plan_name
matched_policies.push(policy)
end # Ends plan name evaluator.
end # Ends start date evaluator.
end # Ends policy analyzer.
if matched_policies.count == 1
policy_id = matched_policies.last._id
csv << row.push(policy_id)
else
csv << row.push(multiple_policies_winner(matched_policies))
end # Ends match_policies.count
end # Ends CSV.foreach()
end # Ends CSV.open() |
class FileHandler {
private var fileOpened: Bool = false
private var filename: String = ""
func open(filename: String) -> Bool {
// Simulate file opening
// Check if the file exists and can be opened
if FileManager.default.fileExists(atPath: filename) {
self.filename = filename
fileOpened = true
return true
} else {
return false
}
}
func read() -> String {
if fileOpened {
do {
let content = try String(contentsOf: URL(fileURLWithPath: filename))
return content
} catch {
return ""
}
} else {
return ""
}
}
func write(content: String) -> Bool {
if fileOpened {
do {
try content.write(to: URL(fileURLWithPath: filename), atomically: true, encoding: .utf8)
return true
} catch {
return false
}
} else {
return false
}
}
func close() {
// Close the file if it is open
if fileOpened {
fileOpened = false
}
}
} |
export default (theme) => {
const {
pureWhite,
} = theme.palette.common
return {
background: {
backgroundColor: theme.palette.common.base1,
width: '100vw',
height: '100vh',
},
mainContainer: {
maxWidth: theme.global.maxContentWidth,
marginLeft: 'auto',
marginRight: 'auto',
position: 'absolute',
top: '50%',
left: '50%',
width: '80%',
transform: 'translate(-50%, -50%)',
[theme.breakpoints.down('sm')]: {
width: '85%',
},
[theme.breakpoints.down('xs')]: {
width: '90%',
},
},
logoContainer: {
padding: theme.spacing(1.2),
backgroundColor: pureWhite,
borderRadius: 24,
marginTop: theme.spacing(1),
marginBottom: theme.spacing(1),
},
logo: {
maxWidth: 145,
maxHeight: 75,
},
progressContainer: {
width: theme.spacing(30),
},
alignCenter: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: theme.spacing(3),
marginBottom: theme.spacing(3),
},
tipImage: {
maxWidth: '100%',
maxHeight: '100%',
},
adBlockContainer: {
textAlign: 'center',
},
adBlockImage: {
width: '80%',
maxWidth: 790,
[theme.breakpoints.down('sm')]: {
width: '90%',
},
[theme.breakpoints.down('xs')]: {
width: '100%',
},
},
adBlockMessage: {
marginTop: theme.spacing(4),
marginBottom: theme.spacing(4),
},
}
}
|
//===----------------------------------------------------------------------===//
// DuckDB
//
// duckdb/catalog/catalog_entry/aggregate_function_catalog_entry.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "duckdb/catalog/standard_entry.hpp"
#include "duckdb/catalog/catalog_set.hpp"
#include "duckdb/function/function.hpp"
#include "duckdb/parser/parsed_data/create_aggregate_function_info.hpp"
namespace duckdb {
//! An aggregate function in the catalog
class AggregateFunctionCatalogEntry : public StandardEntry {
public:
AggregateFunctionCatalogEntry(Catalog *catalog, SchemaCatalogEntry *schema, CreateAggregateFunctionInfo *info)
: StandardEntry(CatalogType::AGGREGATE_FUNCTION, schema, catalog, info->name),
functions(info->functions.functions) {
}
//! The aggregate functions
vector<AggregateFunction> functions;
};
} // namespace duckdb
|
import java.util.ArrayList;
import java.util.List;
public class PrimeFactors {
public static void main(String[] args) {
int input = Integer.parseInt(args[0]);
List<Integer> primeFactors = getPrimeFactors(input);
System.out.println(primeFactors);
}
private static List<Integer> getPrimeFactors(int input) {
List<Integer> factors = new ArrayList<>();
for (int i = 2; i <= input; i++) {
while (input % i == 0) {
factors.add(i);
input /= i;
}
}
return factors;
}
} |
#!/bin/sh
cd "$(dirname "$0")/data"
python install.py
|
const url = "https://rikilg.pythonanywhere.com/";
const apiurl = url + 'api/';
const testurl = url + 'test';
function newBubble(side) {
let chatobj = document.getElementById('bubble-template').cloneNode(true);
if (side == "bot" || side == "Bot") {
return chatobj;
}
chatobj.classList.remove('bot-side')
chatobj.classList.add('user-side')
return chatobj;
}
function createBubble(side, content) {
let chatView = document.querySelector('.flex-vertical')
let chatobj = newBubble(side)
chatobj.children[0].innerHTML = content
chatView.append(chatobj)
}
function testConnection() {
fetch(testurl)
.then(data => data.text())
.then(res => {
console.log(res)
if (res == "Test Successful!") {
console.log("Connected to server!")
}
})
.catch(err => {
console.log(err)
})
}
function sendQuery() {
let textbox = document.querySelector('.textbox');
let query = textbox.value;
textbox.value = "";
createBubble("user", query)
fetch(apiurl, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({query: query})
}).then(data => data.json())
.then(res => {
createBubble('bot', res.response)
})
.catch(err => {
console.log(err)
})
}
function addListeners() {
document.querySelector('.textbox').addEventListener('keyup', (k) => {
if (k.key == "Enter") {
sendQuery();
}
})
document.querySelector('.button').addEventListener('click', (me) => {
sendQuery();
})
}
addListeners();
testConnection(); |
<gh_stars>0
const { ClientCredentialsAuthProvider } = require('@twurple/auth');
const { ApiClient } = require('@twurple/api');
const clips = require('./plugin/clips');
const videos = require('./plugin/videos');
exports.pluginOptionsSchema = ({ Joi }) => {
return Joi.object({
clientId: Joi.string().required(),
clientSecret: Joi.string().required(),
userId: Joi.string().required(),
});
};
exports.createSchemaCustomization = (gatsby) => {
clips.createSchemaCustomization(gatsby);
videos.createSchemaCustomization(gatsby);
};
exports.sourceNodes = async (gatsby, { clientId, clientSecret, ...options}) => {
const authProvider = new ClientCredentialsAuthProvider(clientId, clientSecret);
const client = new ApiClient({ authProvider });
await clips.sourceNodes(gatsby, options, client);
await videos.sourceNodes(gatsby, options, client);
};
|
import numpy as np
import pandas as pd
def compute_fdc(flows: np.array, steps: int = 500, exceed: bool = True, col_name: str = 'flow') -> pd.DataFrame:
# Sort the flow values in descending order
sorted_flows = np.sort(flows)[::-1]
# Calculate exceedance probabilities
if exceed:
exceedance_probs = np.arange(1, len(sorted_flows) + 1) / (len(sorted_flows) + 1)
else:
exceedance_probs = np.arange(0, 1, 1 / steps)
# Create a DataFrame with flow values and exceedance probabilities
fdc_data = {col_name: sorted_flows, 'exceedance_prob': exceedance_probs}
fdc_df = pd.DataFrame(fdc_data)
return fdc_df |
<filename>app/models/usage.rb
class Usage < ActiveRecord::Base
belongs_to :project
belongs_to :persona
validates :project_id, presence: true
validates :persona_id, presence: true
end
|
def second_largest(arr):
max1 = float('-inf')
max2 = float('-inf')
for num in arr:
if num > max1:
max2 = max1
max1 = num
elif num > max2:
max2 = num
return max2
if __name__ == '__main__':
arr = [1, 2, 7, 5, 4]
print(second_largest(arr)) |
# GCF Environment Variables:
# DATASET = Target BQ dataset.
# TABLE = Target BQ table.
from google.cloud import bigquery
import os
def gcf_2_di_gcs_csv_to_bq(event, context):
# Instantiate the clients.
client = bigquery.Client()
dataset_ref = client.dataset(os.environ['DATASET'])
job_config = bigquery.LoadJobConfig()
# Always append, so we can keep the history.
job_config.write_disposition = 'WRITE_APPEND'
# Define the target table schema.
job_config.schema = [
bigquery.SchemaField('date', 'DATE'),
bigquery.SchemaField('county', 'STRING'),
bigquery.SchemaField('state', 'STRING'),
bigquery.SchemaField('fips', 'INTEGER'),
bigquery.SchemaField('cases', 'INTEGER'),
bigquery.SchemaField('deaths', 'INTEGER'),
bigquery.SchemaField('confirmed_cases', 'INTEGER'),
bigquery.SchemaField('confirmed_deaths', 'INTEGER'),
bigquery.SchemaField('probable_cases', 'INTEGER'),
bigquery.SchemaField('probable_deaths', 'INTEGER')
]
# Ignore the first header row, and set that it's a CSV.
job_config.skip_leading_rows = 1
job_config.source_format = bigquery.SourceFormat.CSV
# I has a bukkit. The parameters are pulled from the Pub/Sub message.
uri = 'gs://' + event['bucket'] + '/' + event['name']
# Load it up.
load_job = client.load_table_from_uri(
uri,
dataset_ref.table(os.environ['TABLE']),
job_config=job_config)
load_job.result() # Wait for table load to complete.
print('Job finished.') |
#!/bin/bash
function set_ctl() {
local var=$1
local value=$2
local filename=`echo $var | sed "s/[^a-zA-Z0-9_.]/_/g" | cut -c1-50`
local file=/etc/sysctl.d/60-$filename.conf
local tmpfile=`mktemp -p /etc/sysctl.d/`
echo "$var=$value" > $tmpfile
mv $tmpfile $file
sysctl -w ${var}=${value}
}
function is_ssl_enabled() {
is_enabled "$SSL_ENABLE" \
|| is_enabled "$XMPP_SSL_ENABLE" \
|| is_enabled "$INTROSPECT_SSL_ENABLE" \
|| is_enabled "$SANDESH_SSL_ENABLE"
}
function wait_cmd_success() {
local cmd=$1
local interval=${2:-3}
local max=${3:-20}
local i=0
while ! $cmd 2>/dev/null; do
printf "."
i=$((i + 1))
if (( i > max )) ; then
return 1
fi
sleep $interval
done
return 0
}
function wait_files() {
local file1=$1
local file2=$2
printf "INFO: wait for files $file1 and $file2"
wait_cmd_success "test -f $file1" || { echo -e "\nERROR: failed to wait $file1" && return 1; }
wait_cmd_success "test -f $file2" || { echo -e "\nERROR: failed to wait $file2" && return 1; }
echo -e "\nINFO: files $file1 and $file2 are present"
}
function wait_certs_if_ssl_enabled() {
if ! is_ssl_enabled ; then
return
fi
is_enabled $SSL_ENABLE && wait_files "$SERVER_KEYFILE" "$SERVER_CERTFILE"
if [[ "$SERVER_KEYFILE" != "$XMPP_SERVER_KEYFILE" ]] ; then
is_enabled $XMPP_SSL_ENABLE && wait_files "$XMPP_SERVER_CERTFILE" "$XMPP_SERVER_KEYFILE"
fi
if [[ "$SERVER_KEYFILE" != "$INTROSPECT_KEYFILE" ]] ; then
is_enabled $INTROSPECT_SSL_ENABLE && wait_files "$INTROSPECT_CERTFILE" "$INTROSPECT_KEYFILE"
fi
if [[ "$SERVER_KEYFILE" != "$SANDESH_KEYFILE" ]] ; then
is_enabled $SANDESH_SSL_ENABLE && wait_files "$SANDESH_CERTFILE" "$SANDESH_KEYFILE"
fi
}
function wait_redis_certs_if_ssl_enabled() {
if ! is_enabled ${REDIS_SSL_ENABLE} ; then
return
fi
if [[ "$SERVER_KEYFILE" != "$REDIS_SSL_KEYFILE" ]]; then
wait_files "$REDIS_SSL_CERTFILE" "$REDIS_SSL_KEYFILE"
fi
}
function wait_config_api_certs_if_ssl_enabled() {
if ! is_enabled ${CONFIG_API_SSL_ENABLE} ; then
return
fi
if [[ "$SERVER_KEYFILE" != "$CONFIG_API_SERVER_KEYFILE" ]] ; then
wait_files "$CONFIG_API_SERVER_CERTFILE" "$CONFIG_API_SERVER_KEYFILE"
fi
}
function wait_analytics_api_certs_if_ssl_enabled() {
if ! is_enabled ${ANALYTICS_API_SSL_ENABLE} ; then
return
fi
if [[ "$SERVER_KEYFILE" != "$ANALYTICS_API_SERVER_KEYFILE" ]] ; then
wait_files "$ANALYTICS_API_SERVER_CERTFILE" "$ANALYTICS_API_SERVER_KEYFILE"
fi
}
function pre_start_init() {
wait_certs_if_ssl_enabled
}
function is_tsn() {
[[ -n "$TSN_AGENT_MODE" ]]
}
function is_dpdk() {
test "$AGENT_MODE" == 'dpdk'
}
function is_sriov() {
[[ -n "$SRIOV_PHYSICAL_INTERFACE" ]] && [[ "$SRIOV_VF" -ne 0 ]]
}
function set_third_party_auth_config(){
if [[ $AUTH_MODE != "keystone" ]]; then
return
fi
local tmp_file=/etc/contrail/contrail-keystone-auth.conf.tmp
cat > $tmp_file << EOM
[KEYSTONE]
#memcache_servers=127.0.0.1:11211
admin_password = $KEYSTONE_AUTH_ADMIN_PASSWORD
admin_tenant_name = $KEYSTONE_AUTH_ADMIN_TENANT
admin_user = $KEYSTONE_AUTH_ADMIN_USER
auth_host = $KEYSTONE_AUTH_HOST
auth_port = $KEYSTONE_AUTH_ADMIN_PORT
auth_protocol = $KEYSTONE_AUTH_PROTO
auth_url = $KEYSTONE_AUTH_PROTO://${KEYSTONE_AUTH_HOST}:${KEYSTONE_AUTH_ADMIN_PORT}${KEYSTONE_AUTH_URL_VERSION}
auth_type = password
region_name = $KEYSTONE_AUTH_REGION_NAME
EOM
if [[ "$KEYSTONE_AUTH_URL_VERSION" == '/v3' ]] ; then
cat >> $tmp_file << EOM
user_domain_name = $KEYSTONE_AUTH_USER_DOMAIN_NAME
project_domain_name = $KEYSTONE_AUTH_PROJECT_DOMAIN_NAME
EOM
fi
if [[ "$KEYSTONE_AUTH_PROTO" == 'https' ]] ; then
cat >> $tmp_file << EOM
insecure = ${KEYSTONE_AUTH_INSECURE,,}
certfile = $KEYSTONE_AUTH_CERTFILE
keyfile = $KEYSTONE_AUTH_KEYFILE
cafile = $KEYSTONE_AUTH_CA_CERTFILE
EOM
fi
if [[ -n "$KEYSTONE_AUTH_ENDPOINT_TYPE" ]] ; then
echo "endpoint_type = $KEYSTONE_AUTH_ENDPOINT_TYPE" >> $tmp_file
fi
if [[ -n "$KEYSTONE_AUTH_SYNC_ON_DEMAND" ]] ; then
echo "keystone_sync_on_demand = $KEYSTONE_AUTH_SYNC_ON_DEMAND" >> $tmp_file
fi
mv $tmp_file /etc/contrail/contrail-keystone-auth.conf
}
function set_vnc_api_lib_ini(){
local tmp_file=/etc/contrail/vnc_api_lib.ini.tmp
cat > $tmp_file << EOM
[global]
WEB_SERVER = $CONFIG_NODES
WEB_PORT = ${CONFIG_API_PORT:-8082}
BASE_URL = /
use_ssl = $CONFIG_API_SSL_ENABLE
EOM
if is_enabled ${CONFIG_API_SSL_ENABLE}; then
cat >> $tmp_file << EOM
cafile = $CONFIG_API_SERVER_CA_CERTFILE
EOM
fi
if [[ $AUTH_MODE == "keystone" ]]; then
cat >> $tmp_file << EOM
; Authentication settings (optional)
[auth]
AUTHN_TYPE = keystone
AUTHN_PROTOCOL = $KEYSTONE_AUTH_PROTO
AUTHN_SERVER = $KEYSTONE_AUTH_HOST
AUTHN_PORT = $KEYSTONE_AUTH_ADMIN_PORT
AUTHN_URL = $KEYSTONE_AUTH_URL_TOKENS
AUTHN_DOMAIN = $KEYSTONE_AUTH_PROJECT_DOMAIN_NAME
;AUTHN_TOKEN_URL = http://127.0.0.1:35357/v2.0/tokens
EOM
if [[ "$KEYSTONE_AUTH_PROTO" == 'https' ]] ; then
cat >> $tmp_file << EOM
insecure = ${KEYSTONE_AUTH_INSECURE,,}
certfile = $KEYSTONE_AUTH_CERTFILE
keyfile = $KEYSTONE_AUTH_KEYFILE
cafile = $KEYSTONE_AUTH_CA_CERTFILE
EOM
fi
else
cat >> $tmp_file << EOM
[auth]
AUTHN_TYPE = noauth
EOM
fi
mv $tmp_file /etc/contrail/vnc_api_lib.ini
}
function add_ini_params_from_env() {
local service_name=$1
local cfg_path=$2
local delim='__'
local vars=`( set -o posix ; set ) | grep "^${service_name}${delim}.*${delim}.*=.*$" | sort | cut -d '=' -f 1 | sed "s/^${service_name}${delim}//g"`
local section=''
for var in $vars ; do
local var_name="${service_name}${delim}${var}"
local val="${!var_name}"
# variables in shell doesn't allow to use dashes in names but some sections/keys have them
# substitute word 'DASH' to real dash here
local var_unsubst=`echo $var | sed "s/DASH/-/g"`
local var_section=`echo $var_unsubst | sed "s/^\(.*\)$delim.*$/\1/"`
if [[ "$section" != "$var_section" ]]; then
echo "[$var_section]" >> $cfg_path
section="$var_section"
fi
local var_param=`echo $var_unsubst | sed "s/.*$delim\(.*\)$/\1/"`
echo "$var_param = $val" >> $cfg_path
done
}
function resolve_host_ip() {
local name_or_ip=$1
python3 -c "import socket; print(socket.gethostbyname('$name_or_ip'))"
}
function resolve_1st_control_node_ip() {
local first_item=$(echo $CONTROL_NODES | cut -d ',' -f 1)
resolve_host_ip $first_item
}
function get_iface_for_vrouter_from_control() {
local node_ip=`echo $VROUTER_GATEWAY`
if [[ -z "$node_ip" ]] ; then
node_ip=$(resolve_1st_control_node_ip)
fi
local iface=$(get_gateway_nic_for_ip $node_ip)
echo $iface
}
function get_ip_for_vrouter_from_control() {
local iface=$(get_iface_for_vrouter_from_control)
get_ip_for_nic $iface
}
function get_vrouter_physical_iface() {
local iface=$PHYSICAL_INTERFACE
if [[ -z "$iface" ]]; then
iface=$(get_iface_for_vrouter_from_control)
if [[ -z "$iface" ]] ; then
iface=$(get_default_nic)
fi
fi
echo $iface
}
function nic_has_ip() {
test -n "$(get_cidr_for_nic $1)"
}
function wait_nic_up() {
local nic=$1
printf "INFO: wait for $nic is up"
wait_cmd_success "nic_has_ip $nic" || { echo -e "\nERROR: $nic is not up" && return 1; }
echo -e "\nINFO: $nic is up"
}
|
<reponame>AndriodDream/AndroidLogin
package com.xiaoxin.util;
/**
* Created by Administrator on 2016/3/22.
*/
public class Randoms {
}
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_scatter_plot = void 0;
var ic_scatter_plot = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []
}, {
"name": "g",
"attribs": {},
"children": [{
"name": "circle",
"attribs": {
"cx": "7",
"cy": "14",
"r": "3"
},
"children": [{
"name": "circle",
"attribs": {
"cx": "7",
"cy": "14",
"r": "3"
},
"children": []
}]
}, {
"name": "circle",
"attribs": {
"cx": "11",
"cy": "6",
"r": "3"
},
"children": [{
"name": "circle",
"attribs": {
"cx": "11",
"cy": "6",
"r": "3"
},
"children": []
}]
}, {
"name": "circle",
"attribs": {
"cx": "16.6",
"cy": "17.6",
"r": "3"
},
"children": [{
"name": "circle",
"attribs": {
"cx": "16.6",
"cy": "17.6",
"r": "3"
},
"children": []
}]
}]
}]
};
exports.ic_scatter_plot = ic_scatter_plot; |
/*
* Copyright (C) 2016 Lightbend Inc. <http://www.lightbend.com>
*/
package com.lightbend.lagom.discovery
import java.net.{ InetSocketAddress, URI }
import java.util.regex.Pattern
import akka.Done
import akka.actor.{ Actor, Status }
import com.lightbend.lagom.internal.registry.ServiceRegistryService
import com.lightbend.lagom.javadsl.api.transport.{ TransportException, TransportErrorCode }
import scala.collection.JavaConverters._
import scala.compat.java8.OptionConverters._
import com.google.inject.Inject
import org.pcollections.PSequence
import org.pcollections.TreePVector;
import com.lightbend.lagom.internal.registry.RegisteredService
object ServiceRegistryActor {
case class Lookup(name: String)
case class Remove(name: String)
case class Register(name: String, service: ServiceRegistryService)
case class Route(method: String, path: String)
case object GetRegisteredServices
case class RegisteredServices(services: PSequence[RegisteredService])
sealed trait RouteResult
case class Found(address: InetSocketAddress) extends RouteResult
case class NotFound(registry: Map[String, ServiceRegistryService]) extends RouteResult
}
class ServiceRegistryActor @Inject() (unmanagedServices: UnmanagedServices) extends Actor {
import ServiceRegistryActor._
private var registry: Map[String, ServiceRegistryService] = unmanagedServices.services
private var router = PartialFunction.empty[Route, InetSocketAddress]
override def receive: Receive = {
case Lookup(name) => sender() ! registry.get(name).map(_.uri())
case Remove(name) =>
registry -= name
rebuildRouter()
case Register(name, service) =>
registry.get(name) match {
case None =>
registry += (name -> service)
rebuildRouter()
sender() ! Done
case Some(existing) =>
if (existing == service)
sender() ! Done // idempotent, same already registered
else
sender() ! Status.Failure(new ServiceAlreadyRegistered(name))
}
case GetRegisteredServices =>
val services: List[RegisteredService] = (for {
(name, service) <- registry
} yield RegisteredService.of(name, service.uri))(collection.breakOut)
import scala.collection.JavaConverters._
sender() ! RegisteredServices(TreePVector.from(services.asJava))
case route: Route =>
sender() ! router.lift(route).fold[RouteResult](NotFound(registry))(Found.apply)
}
private def serviceRouter(service: ServiceRegistryService) = {
val addressUri = service.uri
val address = new InetSocketAddress(addressUri.getHost, addressUri.getPort)
service.acls.asScala.map {
case acl =>
acl.method().asScala -> acl.pathRegex().asScala.map(Pattern.compile)
}.foldLeft(PartialFunction.empty[Route, InetSocketAddress]) {
case (function, (aclMethod, pathRegex)) =>
function.orElse {
case Route(method, path) if aclMethod.forall(_.name == method) && pathRegex.forall(_.matcher(path).matches()) =>
address
}
}
}
private def rebuildRouter() = {
router = registry.values.map(serviceRouter)
.foldLeft(PartialFunction.empty[Route, InetSocketAddress])(_ orElse _)
}
}
private class ServiceAlreadyRegistered(serviceName: String) extends TransportException(
TransportErrorCode.PolicyViolation, s"A service with the same name=[$serviceName] was already registered"
) {
}
|
<reponame>magmo/node-bot
import { ChannelResponse } from '.';
import { HUB_PRIVATE_KEY } from '../../constants';
import LedgerCommitment from '../models/allocatorChannelCommitment';
import {
Commitment,
CommitmentType,
mover,
recover,
sign,
Signature,
toHex,
} from 'fmg-core';
import { AppAttrSanitizer, AppCommitment } from '../../types';
export function validSignature(
commitment: Commitment,
signature: Signature,
): boolean {
return recover(toHex(commitment), signature) === mover(commitment);
}
export async function formResponse(
channel_id: number,
sanitize: AppAttrSanitizer,
): Promise<ChannelResponse> {
const commitment = await LedgerCommitment.query()
.eager('[allocator_channel.[participants],allocations]')
.where({ allocator_channel_id: channel_id })
.orderBy('turn_number', 'desc')
.first();
const signature = sign(commitment.toHex(sanitize), HUB_PRIVATE_KEY);
return { commitment: commitment.asCoreCommitment(sanitize), signature };
}
export function nextCommitment(theirCommitment: AppCommitment): AppCommitment {
const appAttrType = typeof theirCommitment.appAttributes;
if (theirCommitment.commitmentType === CommitmentType.App) {
throw new Error('commitmentType cannot be CommitmentType.App');
}
let ourCommitment: typeof theirCommitment;
switch (theirCommitment.commitmentType) {
case CommitmentType.PreFundSetup:
ourCommitment = {
...theirCommitment,
turnNum: theirCommitment.turnNum + 1,
commitmentCount: theirCommitment.commitmentCount + 1,
};
break;
case CommitmentType.PostFundSetup:
ourCommitment = {
...theirCommitment,
turnNum: theirCommitment.turnNum + 1,
commitmentCount: theirCommitment.commitmentCount + 1,
};
break;
case CommitmentType.Conclude:
ourCommitment = {
...theirCommitment,
turnNum: theirCommitment.turnNum + 1,
commitmentCount: theirCommitment.commitmentCount + 1,
};
}
if (typeof ourCommitment.appAttributes !== appAttrType) {
// TODO: Does this actually enforce that the types match?
throw new Error(
'Type error: typeof ourCommitment.appAttributes must match typeof theirCommitment.appAttributes',
);
}
return ourCommitment;
}
|
#!/bin/bash
source "./scripts/$ENV_FILE"
if ! [ -x "$(command -v migrate)" ]
then
echo "Migrate tool likely not installed, follow instruction in README.md"
else
migrate -verbose -path ./migrations/ -database "postgres://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME?sslmode=disable" up
fi
|
#!/bin/bash
########################################################
# test.sh is a wrapper to execute integration tests for
# pop.
########################################################
# abort on error
set -e
# print statements with expanded vairables
set -x
clear
VERBOSE=""
DEBUG='NO'
for i in "$@"
do
case $i in
-v)
VERBOSE="-v"
shift
;;
-d)
DEBUG='YES'
shift
;;
*)
# unknown option
;;
esac
done
function cleanup {
echo "Cleanup resources..."
docker-compose down
rm tsoda
find ./sql_scripts/sqlite -name *.sqlite* -delete
}
# defer cleanup, so it will be executed even after premature exit
trap cleanup EXIT
docker-compose up -d
sleep 5 # Ensure mysql is online
#go build -v -tags sqlite -o tsoda ./soda
go build -v -o tsoda ./soda
export GO111MODULE=on
function test {
echo "!!! Testing $1"
export SODA_DIALECT=$1
echo ./tsoda -v
echo "Setup..."
./tsoda drop -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
./tsoda create -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
./tsoda migrate -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
echo "Test..."
# requires root permission for cockroach-db storage
#go test -race -tags sqlite $VERBOSE ./... -count=1
go test -race $VERBOSE ./... -count=1
}
function debug_test {
echo "!!! Debug Testing $1"
export SODA_DIALECT=$1
echo ./tsoda -v
echo "Setup..."
./tsoda drop -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
./tsoda create -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
./tsoda migrate -e $SODA_DIALECT -c ./database.yml -p ./testdata/migrations
echo "Test and debug..."
dlv test github.com/gobuffalo/pop
}
# dialects=("postgres" "cockroach" "mysql" "sqlite")
dialects=("postgres")
for dialect in "${dialects[@]}" ; do
if [ $DEBUG = 'NO' ]; then
test ${dialect}
else
debug_test ${dialect}
fi
done
|
<filename>src/connections/controller.js
const assert = require('assert')
const grpc = require('@grpc/grpc-js')
const BB = require('bluebird')
const ld = require('lodash')
const { loadProto } = require('@kourier.io/proto')
const defaultConfig = {
host: 'localhost',
port: '50051',
timeout: 500
}
class Controller {
constructor(name, config = {}, instances = {}) {
this.name = name
this.logger = instances.logger || console
this.config = ld.merge(defaultConfig, config)
assert(name)
const KourierService = loadProto()
this.serverAddr = `${this.config.host}:${this.config.port}`
this.client = new KourierService(this.serverAddr, grpc.credentials.createInsecure())
for (let name of Object.keys(KourierService.service)) {
this.client[`${name}Async`] = BB.promisify(this.client[name], { context: this.client })
}
}
async connect() {
const { timeout } = this.config
const controllerConfig = await this.client.HandshakeAsync({}).timeout(timeout)
assert.equal(controllerConfig.name, this.name, 'controller provided invalid name')
this.logger.info(`Connected to grpc://${this.serverAddr}`)
}
startEventStream() {
const stream = this.client.StartStream()
return stream
}
async pushConfigUpdate(configName, spectype, eventtype, spec) {
const { timeout } = this.config
const request = {
name: configName,
spectype: spectype.toUpperCase(),
eventtype,
spec: Buffer.from(JSON.stringify(spec))
}
const res = await this.client.ConfigUpdateAsync(request).timeout(timeout)
assert.equal(res.result, 'OK')
}
}
module.exports = { Controller }
|
#!/bin/bash
#
# 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.
#
# This script installs NVIDIA GPU drivers and collects GPU utilization metrics.
set -euxo pipefail
function get_metadata_attribute() {
local -r attribute_name=$1
local -r default_value=$2
/usr/share/google/get_metadata_value "attributes/${attribute_name}" || echo -n "${default_value}"
}
OS_NAME=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
readonly OS_NAME
# Dataproc role
ROLE="$(/usr/share/google/get_metadata_value attributes/dataproc-role)"
readonly ROLE
# Parameters for NVIDIA-provided Debian GPU driver
readonly DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_VERSION='460.73.01'
readonly DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_URL="https://download.nvidia.com/XFree86/Linux-x86_64/${DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_VERSION}/NVIDIA-Linux-x86_64-${DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_VERSION}.run"
NVIDIA_DEBIAN_GPU_DRIVER_URL=$(get_metadata_attribute 'gpu-driver-url' "${DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_URL}")
readonly NVIDIA_DEBIAN_GPU_DRIVER_URL
readonly NVIDIA_BASE_DL_URL='https://developer.download.nvidia.com/compute'
# CUDA Version
CUDA_VERSION=$(get_metadata_attribute 'cuda-version' '11.2')
readonly CUDA_VERSION
# Parameters for NVIDIA-provided NCCL library
readonly DEFAULT_NCCL_REPO_URL="${NVIDIA_BASE_DL_URL}/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb"
NCCL_REPO_URL=$(get_metadata_attribute 'nccl-repo-url' "${DEFAULT_NCCL_REPO_URL}")
readonly NCCL_REPO_URL
readonly NCCL_REPO_KEY="${NVIDIA_BASE_DL_URL}/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub"
readonly DEFAULT_NCCL_VERSION="2.8.3"
readonly DEFAULT_NCCL_VERSION_ROCKY="2.8.4"
if [[ ${OS_NAME} == rocky ]]; then
NCCL_VERSION=$(get_metadata_attribute 'nccl-version' ${DEFAULT_NCCL_VERSION_ROCKY})
else
NCCL_VERSION=$(get_metadata_attribute 'nccl-version' ${DEFAULT_NCCL_VERSION})
fi
readonly NCCL_VERSION
readonly -A DEFAULT_NVIDIA_DEBIAN_CUDA_URLS=(
[10.1]="${NVIDIA_BASE_DL_URL}/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run"
[10.2]="${NVIDIA_BASE_DL_URL}/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run"
[11.0]="${NVIDIA_BASE_DL_URL}/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run"
[11.1]="${NVIDIA_BASE_DL_URL}/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run"
[11.2]="${NVIDIA_BASE_DL_URL}/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run")
readonly DEFAULT_NVIDIA_DEBIAN_CUDA_URL=${DEFAULT_NVIDIA_DEBIAN_CUDA_URLS["${CUDA_VERSION}"]}
NVIDIA_DEBIAN_CUDA_URL=$(get_metadata_attribute 'cuda-url' "${DEFAULT_NVIDIA_DEBIAN_CUDA_URL}")
readonly NVIDIA_DEBIAN_CUDA_URL
# Parameters for NVIDIA-provided Ubuntu GPU driver
readonly NVIDIA_UBUNTU_REPO_URL="${NVIDIA_BASE_DL_URL}/cuda/repos/ubuntu1804/x86_64"
readonly NVIDIA_UBUNTU_REPO_KEY_PACKAGE="${NVIDIA_UBUNTU_REPO_URL}/cuda-keyring_1.0-1_all.deb"
readonly NVIDIA_UBUNTU_REPO_CUDA_PIN="${NVIDIA_UBUNTU_REPO_URL}/cuda-ubuntu1804.pin"
# Parameter for NVIDIA-provided Rocky Linux GPU driver
readonly NVIDIA_ROCKY_REPO_URL="${NVIDIA_BASE_DL_URL}/cuda/repos/rhel8/x86_64/cuda-rhel8.repo"
# Parameters for NVIDIA-provided CUDNN library
readonly CUDNN_VERSION=$(get_metadata_attribute 'cudnn-version' '')
readonly CUDNN_TARBALL="cudnn-${CUDA_VERSION}-linux-x64-v${CUDNN_VERSION}.tgz"
readonly CUDNN_TARBALL_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v${CUDNN_VERSION%.*}/${CUDNN_TARBALL}"
# Whether to install NVIDIA-provided or OS-provided GPU driver
GPU_DRIVER_PROVIDER=$(get_metadata_attribute 'gpu-driver-provider' 'NVIDIA')
readonly GPU_DRIVER_PROVIDER
# Stackdriver GPU agent parameters
readonly GPU_AGENT_REPO_URL='https://raw.githubusercontent.com/GoogleCloudPlatform/ml-on-gcp/master/dlvm/gcp-gpu-utilization-metrics'
# Whether to install GPU monitoring agent that sends GPU metrics to Stackdriver
INSTALL_GPU_AGENT=$(get_metadata_attribute 'install-gpu-agent' 'false')
readonly INSTALL_GPU_AGENT
# Dataproc configurations
readonly HADOOP_CONF_DIR='/etc/hadoop/conf'
readonly HIVE_CONF_DIR='/etc/hive/conf'
readonly SPARK_CONF_DIR='/etc/spark/conf'
function execute_with_retries() {
local -r cmd=$1
for ((i = 0; i < 10; i++)); do
if eval "$cmd"; then
return 0
fi
sleep 5
done
return 1
}
function install_nvidia_nccl() {
local -r nccl_version="${NCCL_VERSION}-1+cuda${CUDA_VERSION}"
if [[ ${OS_NAME} == rocky ]]; then
execute_with_retries "dnf -y -q install libnccl-${nccl_version} libnccl-devel-${nccl_version} libnccl-static-${nccl_version}"
elif [[ ${OS_NAME} == ubuntu ]] || [[ ${OS_NAME} == debian ]]; then
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 "${NCCL_REPO_KEY}" | apt-key add -
local tmp_dir
tmp_dir=$(mktemp -d -t gpu-init-action-nccl-XXXX)
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NCCL_REPO_URL}" -o "${tmp_dir}/nvidia-ml-repo.deb"
dpkg -i "${tmp_dir}/nvidia-ml-repo.deb"
execute_with_retries "apt-get update"
execute_with_retries \
"apt-get install -y --allow-unauthenticated libnccl2=${nccl_version} libnccl-dev=${nccl_version}"
else
echo "Unsupported OS: '${OS_NAME}'"
exit 1
fi
}
function install_nvidia_cudnn() {
local major_version
major_version="${CUDNN_VERSION%%.*}"
local cudnn_pkg_version
cudnn_pkg_version="${CUDNN_VERSION}-1+cuda${CUDA_VERSION}"
if [[ ${OS_NAME} == rocky ]]; then
if [[ ${major_version} == 8 ]]; then
execute_with_retries "dnf -y -q install libcudnn8-${cudnn_pkg_version} libcudnn8-devel-${cudnn_pkg_version}"
else
echo "Unsupported CUDNN version: '${CUDNN_VERSION}'"
exit 1
fi
elif [[ ${OS_NAME} == ubuntu ]]; then
local -a packages
packages=(
"libcudnn${major_version}=${cudnn_pkg_version}"
"libcudnn${major_version}-dev=${cudnn_pkg_version}")
execute_with_retries \
"apt-get install -y --no-install-recommends ${packages[*]}"
else
local tmp_dir
tmp_dir=$(mktemp -d -t gpu-init-action-cudnn-XXXX)
curl -fSsL --retry-connrefused --retry 10 --retry-max-time 30 \
"${CUDNN_TARBALL_URL}" -o "${tmp_dir}/${CUDNN_TARBALL}"
tar -xzf "${tmp_dir}/${CUDNN_TARBALL}" -C /usr/local
cat <<'EOF' >>/etc/profile.d/cudnn.sh
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
EOF
fi
ldconfig
echo "NVIDIA cuDNN successfully installed for ${OS_NAME}."
}
# Install NVIDIA GPU driver provided by NVIDIA
function install_nvidia_gpu_driver() {
if [[ ${OS_NAME} == debian ]]; then
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NVIDIA_UBUNTU_REPO_KEY_PACKAGE}" -o /tmp/cuda-keyring.deb
dpkg -i "/tmp/cuda-keyring.deb"
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NVIDIA_DEBIAN_GPU_DRIVER_URL}" -o driver.run
bash "./driver.run" --silent --install-libglvnd
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NVIDIA_DEBIAN_CUDA_URL}" -o cuda.run
bash "./cuda.run" --silent --toolkit --no-opengl-libs
elif [[ ${OS_NAME} == ubuntu ]]; then
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NVIDIA_UBUNTU_REPO_KEY_PACKAGE}" -o /tmp/cuda-keyring.deb
dpkg -i "/tmp/cuda-keyring.deb"
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${NVIDIA_UBUNTU_REPO_CUDA_PIN}" -o /etc/apt/preferences.d/cuda-repository-pin-600
add-apt-repository "deb ${NVIDIA_UBUNTU_REPO_URL} /"
execute_with_retries "apt-get update"
if [[ -n "${CUDA_VERSION}" ]]; then
local -r cuda_package=cuda-toolkit-${CUDA_VERSION//./-}
else
local -r cuda_package=cuda-toolkit
fi
# Without --no-install-recommends this takes a very long time.
execute_with_retries "apt-get install -y -q --no-install-recommends cuda-drivers-460"
execute_with_retries "apt-get install -y -q --no-install-recommends ${cuda_package}"
elif [[ ${OS_NAME} == rocky ]]; then
execute_with_retries "dnf config-manager --add-repo ${NVIDIA_ROCKY_REPO_URL}"
execute_with_retries "dnf clean all"
execute_with_retries "dnf -y -q module install nvidia-driver:460-dkms"
execute_with_retries "dnf -y -q install cuda-${CUDA_VERSION//./-}"
else
echo "Unsupported OS: '${OS_NAME}'"
exit 1
fi
ldconfig
echo "NVIDIA GPU driver provided by NVIDIA was installed successfully"
}
# Collects 'gpu_utilization' and 'gpu_memory_utilization' metrics
function install_gpu_agent() {
if ! command -v pip; then
execute_with_retries "apt-get install -y -q python-pip"
fi
local install_dir=/opt/gpu-utilization-agent
mkdir "${install_dir}"
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${GPU_AGENT_REPO_URL}/requirements.txt" -o "${install_dir}/requirements.txt"
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${GPU_AGENT_REPO_URL}/report_gpu_metrics.py" -o "${install_dir}/report_gpu_metrics.py"
pip install -r "${install_dir}/requirements.txt"
# Generate GPU service.
cat <<EOF >/lib/systemd/system/gpu-utilization-agent.service
[Unit]
Description=GPU Utilization Metric Agent
[Service]
Type=simple
PIDFile=/run/gpu_agent.pid
ExecStart=/bin/bash --login -c 'python "${install_dir}/report_gpu_metrics.py"'
User=root
Group=root
WorkingDirectory=/
Restart=always
[Install]
WantedBy=multi-user.target
EOF
# Reload systemd manager configuration
systemctl daemon-reload
# Enable gpu-utilization-agent service
systemctl --no-reload --now enable gpu-utilization-agent.service
}
function set_hadoop_property() {
local -r config_file=$1
local -r property=$2
local -r value=$3
bdconfig set_property \
--configuration_file "${HADOOP_CONF_DIR}/${config_file}" \
--name "${property}" --value "${value}" \
--clobber
}
function configure_yarn() {
if [[ ! -f ${HADOOP_CONF_DIR}/resource-types.xml ]]; then
printf '<?xml version="1.0" ?>\n<configuration/>' >"${HADOOP_CONF_DIR}/resource-types.xml"
fi
set_hadoop_property 'resource-types.xml' 'yarn.resource-types' 'yarn.io/gpu'
set_hadoop_property 'capacity-scheduler.xml' \
'yarn.scheduler.capacity.resource-calculator' \
'org.apache.hadoop.yarn.util.resource.DominantResourceCalculator'
set_hadoop_property 'yarn-site.xml' 'yarn.resource-types' 'yarn.io/gpu'
}
# This configuration should be applied only if GPU is attached to the node
function configure_yarn_nodemanager() {
set_hadoop_property 'yarn-site.xml' 'yarn.nodemanager.resource-plugins' 'yarn.io/gpu'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.resource-plugins.gpu.allowed-gpu-devices' 'auto'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.resource-plugins.gpu.path-to-discovery-executables' '/usr/bin'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.linux-container-executor.cgroups.mount' 'true'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.linux-container-executor.cgroups.mount-path' '/sys/fs/cgroup'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.linux-container-executor.cgroups.hierarchy' 'yarn'
set_hadoop_property 'yarn-site.xml' \
'yarn.nodemanager.container-executor.class' \
'org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor'
set_hadoop_property 'yarn-site.xml' 'yarn.nodemanager.linux-container-executor.group' 'yarn'
# Fix local dirs access permissions
local yarn_local_dirs=()
readarray -d ',' yarn_local_dirs < <(bdconfig get_property_value \
--configuration_file "${HADOOP_CONF_DIR}/yarn-site.xml" \
--name "yarn.nodemanager.local-dirs" 2>/dev/null | tr -d '\n')
chown yarn:yarn -R "${yarn_local_dirs[@]/,/}"
}
function configure_gpu_exclusive_mode() {
# check if running spark 3, if not, enable GPU exclusive mode
local spark_version
spark_version=$(spark-submit --version 2>&1 | sed -n 's/.*version[[:blank:]]\+\([0-9]\+\.[0-9]\).*/\1/p' | head -n1)
if [[ ${spark_version} != 3.* ]]; then
# include exclusive mode on GPU
nvidia-smi -c EXCLUSIVE_PROCESS
fi
}
function configure_gpu_isolation() {
# Download GPU discovery script
local -r spark_gpu_script_dir='/usr/lib/spark/scripts/gpu'
mkdir -p ${spark_gpu_script_dir}
local -r gpu_resources_url=https://raw.githubusercontent.com/apache/spark/master/examples/src/main/scripts/getGpusResources.sh
curl -fsSL --retry-connrefused --retry 10 --retry-max-time 30 \
"${gpu_resources_url}" -o ${spark_gpu_script_dir}/getGpusResources.sh
chmod a+rwx -R ${spark_gpu_script_dir}
# enable GPU isolation
sed -i "s/yarn.nodemanager\.linux\-container\-executor\.group\=/yarn\.nodemanager\.linux\-container\-executor\.group\=yarn/g" "${HADOOP_CONF_DIR}/container-executor.cfg"
printf '\n[gpu]\nmodule.enabled=true\n[cgroups]\nroot=/sys/fs/cgroup\nyarn-hierarchy=yarn\n' >>"${HADOOP_CONF_DIR}/container-executor.cfg"
# Configure a systemd unit to ensure that permissions are set on restart
cat >/etc/systemd/system/dataproc-cgroup-device-permissions.service<<EOF
[Unit]
Description=Set permissions to allow YARN to access device directories
[Service]
ExecStart=/bin/bash -c "chmod a+rwx -R /sys/fs/cgroup/cpu,cpuacct; chmod a+rwx -R /sys/fs/cgroup/devices"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable dataproc-cgroup-device-permissions
systemctl start dataproc-cgroup-device-permissions
}
function main() {
if [[ ${OS_NAME} != debian ]] && [[ ${OS_NAME} != ubuntu ]] && [[ ${OS_NAME} != rocky ]]; then
echo "Unsupported OS: '${OS_NAME}'"
exit 1
fi
if [[ ${OS_NAME} == debian ]] || [[ ${OS_NAME} == ubuntu ]]; then
export DEBIAN_FRONTEND=noninteractive
execute_with_retries "apt-get update"
execute_with_retries "apt-get install -y -q pciutils"
elif [[ ${OS_NAME} == rocky ]] ; then
execute_with_retries "dnf -y -q update"
execute_with_retries "dnf -y -q install pciutils"
execute_with_retries "dnf -y -q install kernel-devel"
execute_with_retries "dnf -y -q install gcc"
fi
# This configuration should be ran on all nodes
# regardless if they have attached GPUs
configure_yarn
# Detect NVIDIA GPU
if (lspci | grep -q NVIDIA); then
configure_yarn_nodemanager
configure_gpu_isolation
if [[ ${OS_NAME} == debian ]] || [[ ${OS_NAME} == ubuntu ]]; then
execute_with_retries "apt-get install -y -q 'linux-headers-$(uname -r)'"
fi
install_nvidia_gpu_driver
if [[ -n ${CUDNN_VERSION} ]]; then
install_nvidia_nccl
install_nvidia_cudnn
fi
# Install GPU metrics collection in Stackdriver if needed
if [[ ${INSTALL_GPU_AGENT} == true ]]; then
install_gpu_agent
echo 'GPU metrics agent successfully deployed.'
else
echo 'GPU metrics agent will not be installed.'
fi
configure_gpu_exclusive_mode
elif [[ "${ROLE}" == "Master" ]]; then
configure_yarn_nodemanager
configure_gpu_isolation
fi
# Restart YARN services if they are running already
if [[ $(systemctl show hadoop-yarn-resourcemanager.service -p SubState --value) == 'running' ]]; then
systemctl restart hadoop-yarn-resourcemanager.service
fi
if [[ $(systemctl show hadoop-yarn-nodemanager.service -p SubState --value) == 'running' ]]; then
systemctl restart hadoop-yarn-nodemanager.service
fi
}
main
|
usage_d() {
cat <<-EOF 1>&2
Usage: g d [commit1] [commit2] [--] [<path>...]
Enhanced diff utility by fzf. By default it shows the diffs between the HEAD
and the working tree (what changes have been done from the HEAD).
When only commit1 is given, it compares commit1 with the working tree (what
changes have been done from commit1 to the working tree). If you want to
reverse the comparasion, use -R.
When both commit1 and commit2 are given, it compares the commit1 with the
commit2 (what changes have been done from commit1 to commit2).
When a commit is given, fzf mode is used by default.
Options:
-c, --cached show staged changes
-f, --fzf use fzf mode
-n | --no-fzf don't use fzf mode
-R reverse the comparasion (show differences from index or on-disk file to tree contents)
EOF
exit 1
}
cmd_d() {
local opts=()
local fzf_mode
local double_dash
local commits=()
local paths=()
while [ "$#" -gt 0 ]; do
case "$1" in
-c | --cached)
opts+=(--cached)
;;
-f | --fzf)
fzf_mode=1
;;
-n | --no-fzf)
fzf_mode=0
;;
-R)
opts+=(-R)
;;
--)
double_dash=1
;;
-*)
usage_d
;;
*)
if [ "$double_dash" = "1" ]; then
paths+=("$1")
else
if [ -n "$(git rev-parse -q --verify "$1" || true)" ]; then
if [ -e "$1" ]; then
echo "Warning: $1 is ambiguous to be a commit or a path. We identify it as a commit by default. If it's a path, please specify it after -- option."
fi
commits+=("$1")
else
paths+=("$1")
fi
fi
;;
esac
shift
done
if [ -z "$fzf_mode" -a "${#commits[@]}" -gt 0 ]; then
fzf_mode=1
fi
[ "$fzf_mode" = "1" ] || exec git diff "${opts[@]}" "${commits[@]}" "${paths[@]}"
local cmd=(git diff "${opts[@]}" --name-status "${commits[@]}" "${paths[@]}")
local preview_cmd="git diff ${opts[*]} "${commits[@]}" --color=always -- {2} | less -r"
local edit_cmd="${EDITOR:-vi} +'map q :q<enter>' {2}"
source "$dotfiles_dir/scripts/lib/utils/common.sh"
source "$dotfiles_dir/scripts/lib/fzf.sh"
local query
while true; do
unset result
local output="$("${cmd[@]}")"
if [ -z "$output" ]; then
echo "No changes found."
break
else
# Because `git diff` shows files relative to the git root, so if we are not in
# the git root, preview or bind command may fail to find the file. To resolve this,
# we change to the git root first.
local old_dir="$(pwd)"
cd "$(git rev-parse --show-toplevel)"
call_fzf result --no-mouse --cycle \
--query="$query" --print-query \
--layout=reverse \
--prompt="C-V:diff-file C-O:open-file C-S:stage-file Enter:edit> " \
--preview="$preview_cmd" \
--preview-window="right:50%:wrap" \
--bind "ctrl-v:execute(tmux new-window \"$preview_cmd\")" \
--bind "ctrl-o:execute(tmux new-window \"$edit_cmd\")" \
--expect "ctrl-s" \
<<<"$output"
[ -z "${result[*]}" ] && break
query="${result[0]}"
local key="${result[1]}"
local selection="${result[2]}"
local file="$(echo "$selection" | awk '{print $2}')"
case "$key" in
ctrl-s)
git add "$file"
;;
"")
${EDITOR:-vi} "$file"
exit
;;
esac
cd "$old_dir"
fi
done
}
|
#! /bin/bash
#SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res/run_rexi_fd_par_m0512_t001_n0128_r0868_a1.txt
###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res/run_rexi_fd_par_m0512_t001_n0128_r0868_a1.err
#SBATCH -J rexi_fd_par_m0512_t001_n0128_r0868_a1
#SBATCH --get-user-env
#SBATCH --clusters=mpp2
#SBATCH --ntasks=868
#SBATCH --cpus-per-task=1
#SBATCH --exclusive
#SBATCH --export=NONE
#SBATCH --time=03:00:00
#declare -x NUMA_BLOCK_ALLOC_VERBOSITY=1
declare -x KMP_AFFINITY="granularity=thread,compact,1,0"
declare -x OMP_NUM_THREADS=1
echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
echo
. /etc/profile.d/modules.sh
module unload gcc
module unload fftw
module unload python
module load python/2.7_anaconda_nompi
module unload intel
module load intel/16.0
module unload mpi.intel
module load mpi.intel/5.1
module load gcc/5
cd /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res
cd ../../../
. local_software/env_vars.sh
# force to use FFTW WISDOM data
declare -x SWEET_FFTW_LOAD_WISDOM_FROM_FILE="FFTW_WISDOM_nofreq_T0"
time -p mpiexec.hydra -genv OMP_NUM_THREADS 1 -envall -ppn 28 -n 868 ./build/rexi_fd_par_m_tno_a1 --initial-freq-x-mul=2.0 --initial-freq-y-mul=1.0 -f 1 -g 1 -H 1 -X 1 -Y 1 --compute-error 1 -t 50 -R 4 -C 0.3 -N 128 -U 0 -S 0 --use-specdiff-for-complex-array 0 --rexi-h 0.8 --timestepping-mode 1 --staggering 0 --rexi-m=512 -C -5.0
|
#include<iostream>
using namespace std;
int maxOfThree(int x, int y, int z) {
int max = x;
if(y > max) {
max = y;
}
if(z > max) {
max = z;
}
return max;
}
int main() {
int x = 1;
int y = 4;
int z = 2;
cout << maxOfThree(x, y, z) << endl;
return 0;
} |
def print_first_20(arr):
"""Display the first 20 elements of a given array"""
for i in arr[:20]:
print(i) |
#!/usr/bin/env bash
echo "publish-to-s3.sh: THE_VAR: ${THE_VAR}"
|
#!/bin/bash
# Function to delete Kubernetes resource
delete_resource() {
local resource_file=$1
local namespace=$2
if kubectl delete -f "$resource_file" --namespace="$namespace"; then
echo "Deleted $resource_file in namespace $namespace"
else
echo "Failed to delete $resource_file in namespace $namespace"
exit 1
fi
}
# Delete resources in the specified order
delete_resource "es-data.yaml" "search"
delete_resource "ingest.yaml" "search"
delete_resource "ingest-svc.yaml" "search"
echo "All resources deleted successfully" |
test::func_strcpy() {
local source destination
source='test'
func::strcpy destination source
EXPECT_EQ 'test' "${destination}"
source=$'abc\x00\x01\x02\x03\x04\x05\x06\x07\x08xyz'
func::strcpy destination source
EXPECT_EQ $'abc\x00\x01\x02\x03\x04\x05\x06\x07\x08xyz' "${destination}"
}
|
<gh_stars>0
/* eslint-disable global-require */
const stripAnsi = require('strip-ansi');
const consoleLogOutput = jest.fn();
const consoleErrorOutput = jest.fn();
const mockExit = jest.spyOn(process, 'exit').mockImplementation(() => {});
jest
.spyOn(global.console, 'log')
.mockImplementation((...args) => consoleLogOutput(stripAnsi(...args)));
jest
.spyOn(global.console, 'error')
.mockImplementation((...args) => consoleErrorOutput(stripAnsi(...args)));
describe(`changeScanner - index`, () => {
beforeEach(() => {
jest.resetModules();
jest.clearAllMocks();
});
it('returns success messaging when no further changes required', () => {
jest.mock('./getChanges', () => () => ({
barfoo: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
}));
require('./index');
expect(mockExit).not.toHaveBeenCalled();
expect(consoleErrorOutput).not.toHaveBeenCalled();
expect(consoleLogOutput).toHaveBeenCalledTimes(1);
expect(consoleLogOutput).toHaveBeenCalledWith(
'All packages have met minimum change requirements 🎉',
);
});
it('returns success messaging when no changes made', () => {
jest.mock('./getChanges', () => () => ({}));
require('./index');
expect(mockExit).not.toHaveBeenCalled();
expect(consoleErrorOutput).not.toHaveBeenCalled();
expect(consoleLogOutput).toHaveBeenCalledTimes(1);
expect(consoleLogOutput).toHaveBeenCalledWith(
'All packages have met minimum change requirements 🎉',
);
});
it('returns detailed error messaging when further changes required', () => {
jest.mock('./getChanges', () => () => ({
barfoo: ['package.json'],
pears: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
foobar: ['index.js', 'index.test.js'],
apples: ['dist/package.json'],
}));
require('./index');
expect(mockExit).toHaveBeenCalled();
const expectedMessages = [
'Branch must update CHANGELOG.md in barfoo',
'Branch must update package-lock.json in barfoo',
'Branch must update CHANGELOG.md in foobar',
'Branch must update package-lock.json in foobar',
'Branch must update package.json in foobar',
'Branch must update CHANGELOG.md in apples',
'Branch must update package-lock.json in apples',
'Branch must update package.json in apples',
];
expect(consoleLogOutput).not.toHaveBeenCalled();
expect(consoleErrorOutput).toHaveBeenCalledTimes(expectedMessages.length);
expectedMessages.forEach(msg =>
expect(consoleErrorOutput).toHaveBeenCalledWith(msg),
);
});
});
|
from botocore.config import Config
CONFIG = Config(retries={"max_attempts": 5, "mode": "standard"})
|
/**
*
* ImagesFactory.java
*
* Created by <NAME> - all right reserved ©
*
* 2014
*
*/
package com.game;
import com.app.Parameters;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
/**
*
* @author <NAME> Marc-<NAME>
*/
public class ImagesFactory
{
/**
* For singleton pattern
*/
private static ImagesFactory IF_INSTANCE;
//Images
private ImageIcon MAIN_ICON;
private ImageIcon TOAST_ICON;
private BufferedImage SPACESHIP_UP;
private BufferedImage SPACESHIP_DOWN;
private BufferedImage SPACESHIP_LEFT;
private BufferedImage SPACESHIP_RIGHT;
private BufferedImage SPACESHIP_STABILIZE;
private BufferedImage BULLET1;
private BufferedImage BULLET2;
private BufferedImage BULLET3;
private BufferedImage ENEMY1;
private BufferedImage ENEMY2;
private BufferedImage ENEMY3;
private BufferedImage ENEMY4;
private BufferedImage ENEMY5;
private BufferedImage ENEMY6;
private BufferedImage ENEMY7;
private BufferedImage ENEMY8;
private BufferedImage ENEMY5_BROKEN;
private BufferedImage ENEMY6_BROKEN;
private BufferedImage ENEMY7_BROKEN;
private BufferedImage ENEMY8_BROKEN;
private BufferedImage SPACE;
private ImagesFactory()
{
try
{
URL url = getClass().getResource(Parameters.IMAGE_PATH + "spshp.png");
MAIN_ICON = new ImageIcon(ImageIO.read(url));
url = getClass().getResource(Parameters.IMAGE_PATH + "toast_icon.png");
TOAST_ICON = new ImageIcon(ImageIO.read(url));
url = getClass().getResource(Parameters.IMAGE_PATH + "spshp.png");
SPACESHIP_STABILIZE = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "spshp_up.png");
SPACESHIP_UP = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "spshp_down.png");
SPACESHIP_DOWN = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "spshp_left.png");
SPACESHIP_LEFT = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "spshp_right.png");
SPACESHIP_RIGHT = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "bullet1.png");
BULLET1 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "bullet2.png");
BULLET2 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "bullet3.png");
BULLET3 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy1.png");
ENEMY1 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy2.png");
ENEMY2 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy3.png");
ENEMY3 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy4.png");
ENEMY4 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy5.png");
ENEMY5 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy6.png");
ENEMY6 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy7.png");
ENEMY7 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy8.png");
ENEMY8 = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy5B.png");
ENEMY5_BROKEN = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy6B.png");
ENEMY6_BROKEN = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy7B.png");
ENEMY7_BROKEN = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "enemy8B.png");
ENEMY8_BROKEN = ImageIO.read(url);
url = getClass().getResource(Parameters.IMAGE_PATH + "space.png");
SPACE = ImageIO.read(url);
}
catch (IOException ex)
{
}
}
public static synchronized ImagesFactory getInstance()
{
if (IF_INSTANCE == null)
{
IF_INSTANCE = new ImagesFactory();
}
return IF_INSTANCE;
}
/**
* @return the MAIN_ICON
*/
public ImageIcon getMAIN_ICON()
{
return MAIN_ICON;
}
/**
* @return the TOAST_ICON
*/
public ImageIcon getTOAST_ICON()
{
return TOAST_ICON;
}
/**
* @return the SPACESHIP_UP
*/
public BufferedImage getSPACESHIP_UP()
{
return SPACESHIP_UP;
}
/**
* @return the SPACESHIP_DOWN
*/
public BufferedImage getSPACESHIP_DOWN()
{
return SPACESHIP_DOWN;
}
/**
* @return the SPACESHIP_LEFT
*/
public BufferedImage getSPACESHIP_LEFT()
{
return SPACESHIP_LEFT;
}
/**
* @return the SPACESHIP_RIGHT
*/
public BufferedImage getSPACESHIP_RIGHT()
{
return SPACESHIP_RIGHT;
}
/**
* @return the SPACESHIP_STABILIZE
*/
public BufferedImage getSPACESHIP_STABILIZE()
{
return SPACESHIP_STABILIZE;
}
/**
* @return the BULLET1
*/
public BufferedImage getBULLET1()
{
return BULLET1;
}
/**
* @return the BULLET2
*/
public BufferedImage getBULLET2()
{
return BULLET2;
}
/**
* @return the BULLET3
*/
public BufferedImage getBULLET3()
{
return BULLET3;
}
/**
* @return the ENEMY1
*/
public BufferedImage getENEMY1()
{
return ENEMY1;
}
/**
* @return the ENEMY2
*/
public BufferedImage getENEMY2()
{
return ENEMY2;
}
/**
* @return the ENEMY3
*/
public BufferedImage getENEMY3()
{
return ENEMY3;
}
/**
* @return the ENEMY4
*/
public BufferedImage getENEMY4()
{
return ENEMY4;
}
/**
* @return the ENEMY5
*/
public BufferedImage getENEMY5()
{
return ENEMY5;
}
/**
* @return the ENEMY6
*/
public BufferedImage getENEMY6()
{
return ENEMY6;
}
/**
* @return the ENEMY7
*/
public BufferedImage getENEMY7()
{
return ENEMY7;
}
/**
* @return the ENEMY8
*/
public BufferedImage getENEMY8()
{
return ENEMY8;
}
/**
* @return the ENEMY5_BROKEN
*/
public BufferedImage getENEMY5_BROKEN()
{
return ENEMY5_BROKEN;
}
/**
* @return the ENEMY6_BROKEN
*/
public BufferedImage getENEMY6_BROKEN()
{
return ENEMY6_BROKEN;
}
/**
* @return the ENEMY7_BROKEN
*/
public BufferedImage getENEMY7_BROKEN()
{
return ENEMY7_BROKEN;
}
/**
* @return the ENEMY8_BROKEN
*/
public BufferedImage getENEMY8_BROKEN()
{
return ENEMY8_BROKEN;
}
/**
* @return the SPACE
*/
public BufferedImage getSPACE()
{
return SPACE;
}
}
|
<filename>modules/cache/src/cache.interceptor.ts
// deno-lint-ignore-file no-explicit-any
import {
Context,
Inject,
Injectable,
NestInterceptor,
NestInterceptorOptions,
Next,
} from "../../../mod.ts";
import { isDebug } from "../../../src/utils.ts";
import { optionKey } from "./cache.constant.ts";
import { CacheModuleOptions } from "./cache.interface.ts";
@Injectable()
export class CacheInterceptor implements NestInterceptor {
ttl: number;
max: number;
constructor(
@Inject(optionKey) private cacheModuleOptions?: CacheModuleOptions,
) {
this.ttl = cacheModuleOptions?.ttl || 5;
this.max = cacheModuleOptions?.max || 100;
}
private caches = new Map<string, any>();
joinArgs(args: any[]) {
let result = "";
args.forEach((arg) => {
if (typeof arg === "object") {
result += JSON.stringify(arg);
} else {
result += arg;
}
});
return result;
}
intercept(
_context: Context,
next: Next,
options: NestInterceptorOptions,
) {
const cache = this.caches;
if (cache.size >= this.max) {
console.warn("cache size has reached the max", cache.size);
return;
}
const constructorName = options.target.constructor.name;
const key = this.cacheModuleOptions?.getCacheKey
? this.cacheModuleOptions.getCacheKey({
constructorName,
methodName: options.methodName,
methodType: options.methodType,
args: options.args,
})
: [
constructorName,
options.methodName,
options.methodType,
this.joinArgs(options.args),
].join("_");
const cacheValue = cache.get(key);
if (cacheValue !== undefined) {
if (isDebug()) {
console.debug("cache hit", key, cacheValue);
}
return cacheValue;
}
const result = next();
cache.set(key, result);
const st = setTimeout(() => {
cache.delete(key);
}, this.ttl * 1000);
Promise.resolve(result)
.then((val) => {
if (this.cacheModuleOptions?.isCacheableValue) {
if (!this.cacheModuleOptions.isCacheableValue(val)) {
cache.delete(key);
clearTimeout(st);
}
}
})
.catch(() => {
cache.delete(key);
clearTimeout(st);
});
return result;
}
}
|
<filename>app/containers/Settings/selectors.js
import { createSelector } from 'reselect';
import { initialState } from './reducers';
const make = (state, props) => (state ? state.Settings : {});
export const makeFreshInstall = createSelector(
make,
state => (state ? state.freshInstall : initialState.freshInstall)
);
export const makeToggleSettings = createSelector(
make,
state => (state ? state.toggleSettings : initialState.toggleSettings)
);
export const makeEnableAutoUpdateCheck = createSelector(
make,
state =>
state ? state.enableAutoUpdateCheck : initialState.enableAutoUpdateCheck
);
export const makeEnableAnalytics = createSelector(
make,
state => (state ? state.enableAnalytics : initialState.enableAnalytics)
);
|
import { PhotoMode } from "./PhotoMode";
export class SsStatus {
/** インターバル処理 */
private static _interval: any = null;
/** スライドショーのリセットフラグ */
private static _resetFlg = false;
/** スライドショーの終了フラグ */
private static _endFlg = false;
/** 画像の表示モードです。 */
private static _mode: PhotoMode = PhotoMode.NORMAL;
/** 画像の表示時間です。 */
private static _time: number = 5;
/** 現在の画像番号 */
private static _photoCount: number;
/** ロックフラグ */
private static _isLock: boolean = false;
/** 順序フラグ */
private static _isDefaultOrder: boolean = true;
/**
* インターバルをセットする。
*/
static set interval(interval: any) {
this._interval = interval;
}
/**
* インターバルを返却する。
*/
static get interval(): any {
return this._interval;
}
/**
* スライドショーをリセットする。
*/
public static reset() {
this._resetFlg = true;
}
/**
* スライドショーを取得する。
*/
static get resetFlg(): boolean {
return this._resetFlg;
}
/**
* スライドショーを取得する。
*/
static set resetFlg(resetFlg: boolean) {
this._resetFlg = resetFlg;
}
/**
* 表示モードを取得する。
* @param mode
*/
static get mode(): PhotoMode {
return this._mode;
}
/**
* 表示モードを変更する。
* @param mode
*/
static set mode(mode: PhotoMode) {
this._mode = mode;
}
/**
* 終了フラグを取得する。
* @param endFlg
*/
static get endFlg(): boolean {
return this._endFlg;
}
/**
* 終了フラグを変更する。
* @param endFlg
*/
static set endFlg(endFlg: boolean) {
this._endFlg = endFlg;
}
/**
* 表示時間を取得する。
*/
static get time() {
return this._time;
}
/**
* 表示時間を設定する。
*/
static set time(time: number) {
this._time = time;
}
/** 画像番号加算 */
public static addCount(): void {
this._photoCount++;
}
/** 画像番号減算 */
public static subCount(): void {
this._photoCount--;
}
/** 画像番号設定 */
static get photoCount(): number {
return this._photoCount;
}
/** 画像番号設定 */
static set photoCount(count: number) {
this._photoCount = count;
}
/** ロックフラグ getter */
static get isLock() {
return this._isLock;
}
/** ロックフラグ setter */
static set isLock(lock: boolean) {
this._isLock = lock;
}
/** 順序フラグ getter */
static get isDefaultOrder() {
return this._isDefaultOrder;
}
/** 順序フラグ setter */
static set isDefaultOrder(order: boolean) {
this._isDefaultOrder = order;
}
} |
<gh_stars>0
import FixedCidAssigner from '../../src/cid/fixedCidAssigner';
describe('A fixed CID assigner', () => {
test('should always provide the same CID', async () => {
const assigner = new FixedCidAssigner('123');
await expect(assigner.assignCid()).resolves.toEqual('123');
await expect(assigner.assignCid()).resolves.toEqual('123');
await expect(assigner.assignCid()).resolves.toEqual('123');
});
});
|
<filename>src/static/scripts/ext/Array.js
/** @module ext/Array */
import ArrayExt from "./mixin/ArrayExt.js"
import "./Object/prop/mixin.js"
Object.mixinDefault(Array.prototype, ArrayExt)
|
<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_import_export_twotone = void 0;
var ic_import_export_twotone = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []
}, {
"name": "path",
"attribs": {
"d": "M5 6.99h3V14h2V6.99h3L9 3zM14 10v7.01h-3L15 21l4-3.99h-3V10z"
},
"children": []
}]
};
exports.ic_import_export_twotone = ic_import_export_twotone; |
def count_files_with_extension(file_paths, target_extension):
count = 0
for file_path in file_paths:
if file_path.endswith(target_extension):
count += 1
return count
# Test the function
file_paths = [
'templates/numbers/1.png',
'templates/numbers/2.png',
'templates/numbers_lvl/3.png',
'templates/numbers_hitreg/4.png',
'utils/data.txt',
'utils/config.txt'
]
target_extension = 'png'
print(count_files_with_extension(file_paths, target_extension)) # Output: 4 |
#!/bin/bash
#
# Copyright 2018 Google LLC
#
# 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.
set -eox pipefail
# This is the entry point for the test deployment
overlay_test_schema.py \
--orig "/data-test/schema.yaml" \
--dest "/data/schema.yaml"
rm -f /data-test/schema.yaml
NAME="$(/bin/print_config.py \
--xtype NAME \
--values_mode raw)"
NAMESPACE="$(/bin/print_config.py \
--xtype NAMESPACE \
--values_mode raw)"
export NAME
export NAMESPACE
echo "Deploying application \"$NAME\" in test mode"
app_uid=$(kubectl get "applications/$NAME" \
--namespace="$NAMESPACE" \
--output=jsonpath='{.metadata.uid}')
app_api_version=$(kubectl get "applications/$NAME" \
--namespace="$NAMESPACE" \
--output=jsonpath='{.apiVersion}')
/bin/expand_config.py --values_mode raw --app_uid "$app_uid"
## tls
name=$NAME
namespace=$NAMESPACE
if ! kubectl --namespace ${namespace} get secret | grep -q "^${name}-tls "; then
file=/tmp/server
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout $file.key \
-out $file.crt \
-subj "/CN=postgresql/O=postgresql"
kubectl --namespace ${namespace} create secret generic ${name}-tls \
--from-file=$file.crt --from-file=$file.key
rm $file.key
rm $file.crt
fi
application_uid=$app_uid
kubectl patch secret ${name}-tls -p \
'
{
"metadata": {
"ownerReferences": [
{
"apiVersion":"app.k8s.io/v1beta1",
"blockOwnerDeletion":true,
"kind":"Application",
"name":"'"${name}"'",
"uid":"'"${application_uid}"'"
}
]
}
}
'
## tls
create_manifests.sh --mode="test"
# Assign owner references for the resources.
/bin/set_ownership.py \
--app_name "$NAME" \
--app_uid "$app_uid" \
--app_api_version "$app_api_version" \
--manifests "/data/manifest-expanded" \
--dest "/data/resources.yaml"
separate_tester_resources.py \
--app_uid "$app_uid" \
--app_name "$NAME" \
--app_api_version "$app_api_version" \
--manifests "/data/resources.yaml" \
--out_manifests "/data/resources.yaml" \
--out_test_manifests "/data/tester.yaml"
# Apply the manifest.
kubectl apply --namespace="$NAMESPACE" --filename="/data/resources.yaml"
patch_assembly_phase.sh --status="Success"
wait_for_ready.py \
--name $NAME \
--namespace $NAMESPACE \
--timeout ${WAIT_FOR_READY_TIMEOUT:-300}
tester_manifest="/data/tester.yaml"
if [[ -e "$tester_manifest" ]]; then
cat $tester_manifest
run_tester.py \
--namespace $NAMESPACE \
--manifest $tester_manifest \
--timeout ${TESTER_TIMEOUT:-300}
fi
clean_iam_resources.sh
|
python ../tempmatch/train.py --dataset stl10 --num-labeled 250 --arch wideresnet --batch-size 64 --lr 0.03 --expand-labels --seed 5 --out model_checkpoints/stl10@250 |
#!/usr/bin/env bash
set -eu
# shellcheck source=/dev/null
. "$(dirname "$0")/../config.sh"
LEVELDB_ROOT=${PROJECT_DIR}/leveldb
cp ${PROJECT_DIR}/makefile_patch/leveldb/Makefile ${LEVELDB_ROOT}/Makefile
"$PROJECT_DIR/scripts/make-toolchain.sh"
pushd "${LEVELDB_ROOT}"
make clean
make -j"${N_JOBS}"\
CC="$(find "$TOOLCHAIN_DIR/bin/" -name '*-gcc')" \
CXX="$(find "$TOOLCHAIN_DIR/bin/" -name '*-g++')" \
TARGET_OS=OS_ANDROID_CROSSCOMPILE \
out-static/libleveldb.a
rm -rf "${INSTALL_DIR}/leveldb"
mkdir -p "${INSTALL_DIR}/leveldb/lib"
cp -r include/ "${INSTALL_DIR}/leveldb"
cp out-static/libleveldb.a "${INSTALL_DIR}/leveldb/lib"
popd
|
def median_of_two_arrays(arr1, arr2):
n1 = len(arr1)
n2 = len(arr2)
if n1 > n2:
arr1, arr2 = arr2, arr1
n1, n2 = n2, n1
if n2 == 0:
raise ValueError
start = 0
end = n1
while start <= end:
partitionX = (start + end)//2
partitionY = (n1 + n2 + 1)//2 - partitionX
max_of_left_sumX = float('-inf') if partitionX == 0 else arr1[partitionX - 1]
min_of_right_sumX = float('inf') if partitionX == n1 else arr1[partitionX]
max_of_left_sumY = float('-inf') if partitionY == 0 else arr2[partitionY - 1]
min_of_right_sumY = float('inf') if partitionY == n2 else arr2[partitionY]
if max_of_left_sumX <= min_of_right_sumY and max_of_left_sumY <= min_of_right_sumX:
if (n1 + n2) % 2 == 0:
return (max(max_of_left_sumX, max_of_left_sumY) + min(min_of_right_sumX, min_of_right_sumY))/2
else:
return max(max_of_left_sumX, max_of_left_sumY)
elif max_of_left_sumX > min_of_right_sumY:
end = partitionX - 1
else:
start = partitionX + 1 |
for sample in {0..6};do
#for types in {2}; do
types=2
python transcriptome_prediction.py $1 ${sample} ${types} $2
#done
done
|
#!/bin/bash
# colorize text
# https://blog.sleeplessbeastie.eu/2014/02/17/how-to-colorize-text-in-terminal/
# define "arguments" associative array
declare -A arguments;
# define "position" parameter and set it to zero
declare -i postition;
position=0;
# define "colors" associative array
declare -A colors;
colors=([R]=31 [G]=32 [Y]=33 [B]=34 [M]=35 [C]=36 [r]=91 [g]=92 [y]=93 [b]=94 [m]=95 [c]=96)
# define function to add "color" and "regex" to the "arguments" array
function add_argument {
arguments[$position.color]="$1";
arguments[$position.regex]="$2";
let position++;
}
# define usage function
function usage {
echo "Sample usage:"
echo "$ cat /etc/passwd | $0 -g \"\d\" -B \"bash\""
echo -e "root:x:\e[92m0\e[0m:\e[92m0\e[0m:root:/root:/bin/\e[34mbash\e[0m";
echo
echo "Color parameters:";
echo -e "-R \e[31mtext\e[0m -r \e[91mtext\e[0m";
echo -e "-G \e[32mtext\e[0m -g \e[92mtext\e[0m";
echo -e "-Y \e[33mtext\e[0m -y \e[93mtext\e[0m";
echo -e "-B \e[34mtext\e[0m -b \e[94mtext\e[0m";
echo -e "-M \e[35mtext\e[0m -m \e[95mtext\e[0m";
echo -e "-C \e[36mtext\e[0m -c \e[96mtext\e[0m";
}
# special case if no arguments are passed
if [ "$#" = "0" ]; then
usage;
exit;
fi
# parse arguments
while getopts "R:G:Y:B:M:C:r:g:y:b:m:c:" option; do
case $option in
"R" | "G" | "Y" | "B" | "M" | "C" | "r" | "g" | "y" | "b" | "m" | "c")
add_argument "${option}" "${OPTARG}";
;;
\?|:)
usage
exit;
;;
esac
done
# parse input
while read line; do
for i in $(seq 0 $((position-1))); do
line=$(echo "$line" | ssed -R -e "s/(?<!\x1b\[|\x1b\[[0-9]|\x1b\[[0-9][0-9])(${arguments[$i.regex]})/\x1b\[${colors[${arguments[$i.color]}]}m\1\x1b\[0m/g")
done
echo -e $line;
done
|
# Xcode's command line tools are required for Homebrew
xcode-select --install
# Installs Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Installs Git
brew install git
# If an ssh rsa key does not exist, creates one
if [ ! -s ~/.ssh/id_rsa.pub ]
then
ssh-keygen
fi
# Install common support libraries
brew install gmp
brew install gnupg
# Installs Zsh and sets Zsh as the default shell
brew install zsh
chsh -s /bin/zsh
# Installs RVM
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable --ruby --auto-dotfiles
source ~/.zprofile
source ~/.zshrc
# Installs Ruby 2.6.1 and sets it as default
rvm install 2.6.1
rvm --default use 2.6.1
# Installs Node Version Manager
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zprofile
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.zprofile
source ~/.zprofile
source ~/.zshrc
# Installs newest version of Node
nvm install node
nvm use node
nvm alias default node
# Backs up dot files
mv ~/.irbrc{,.bak}
mv ~/.gitignore{,.bak}
mv ~/.zprofile{,.bak}
mv ~/.zshrc{,.bak}
mv ~/.gitconfig{,.bak}
# Adds additional functionality to IRB
curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/irbrc" -o "$HOME/.irbrc"
# Adds .gitignore content
curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/ubuntu-gitignore" -o "$HOME/.gitignore"
git config --global core.excludesfile $HOME/.gitignore
# Adds .zprofile content
curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/.zprofile" -o "$HOME/.zprofile"
# Adds .zshrc content
curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/.zshrc" -o "$HOME/.zshrc"
# Sets default .gitconfig
curl "https://raw.githubusercontent.com/flatiron-school/dotfiles/master/gitconfig" -o "$HOME/.gitconfig"
source ~/.zprofile
source ~/.zshrc
# Fixes potential RVM PATH issues after dotfiles are modified
rvm get stable --auto-dotfiles
rvm --default use 2.6.1
rvm alias create default 2.6.1
rvm list
# Installs Learn and Bundler
gem update --system
gem install learn-co
gem install bundler
# Installs SQLite
brew install sqlite
# We don't need these yet, but might as well install them
gem install nokogiri
gem install rails
# Install PostgreSQL
brew install postgres
brew services start postgresql
gem install pg
checks_pass=true
if ! brew list | grep -q 'gmp'; then
echo ""
echo "WARNING: gmp was not installed properly! Try running 'brew install gmp' to resolve this"
checks_pass=false
else
echo ""
echo -e "\xE2\x9C\x94 gmp installed with HomeBrew"
fi
if ! brew list | grep -q 'gnupg'; then
echo ""
echo "WARNING: gnupg was not installed properly! Try running 'brew install gnupg' to resolve this"
checks_pass=false
else
echo ""
echo -e "\xE2\x9C\x94 gnupg installed with HomeBrew"
fi
if ! gem list | grep -q 'learn-co '; then
echo ""
echo "WARNING: learn-co gem was not installed properly! This may be due to an incomplete installation of gnupg or gmp."
echo "Try running 'brew install gmp && brew install gnupg' then 'gem install learn-co' to resolve this"
checks_pass=false
else
echo ""
echo -e "\xE2\x9C\x94 learn-co gem installed"
fi
if ! rvm list | grep -q '=* ruby-2.6.1'; then
echo ""
echo "WARNING: Ruby 2.6.1 is not the default Ruby version"
echo "Try running 'rvm --default use 2.6.1' to resolve this"
checks_pass=false
else
echo ""
echo -e "\xE2\x9C\x94 Ruby 2.6.1 is set as default in RVM"
fi
if $checks_pass; then
echo ""
echo "#########################"
echo "# INSTALLATION COMPLETE #"
echo "#########################"
echo ""
echo "Next Steps:"
echo ""
echo "1. To configure Git with your personal GitHub account, you must add your username and email"
echo ""
echo " - Type 'git config --global user.name <YOUR USERNAME>' to set your GitHub username"
echo " - Type 'git config --global user.email <YOUR EMAIL>' to set your GitHub email"
echo ""
echo "2. To add your SSH key to GitHub, copy the following key (including the 'ssh-rsa' at the beginning)"
echo ""
cat ~/.ssh/id_rsa.pub
echo ""
echo " Go to your account settings at https://github.com/ and add this as a new SSH key"
echo ""
echo "3. To configure the Learn gem with your personal account"
echo ""
echo " - Go to learn.co/<your-github-username>. At the bottom of the page is an OAuth token"
echo " - Copy this token"
echo " - Run 'learn whoami' in the terminal to start the setup process"
echo " - Paste your token into the terminal when prompted"
echo ""
echo "4. Get a Text Editor and set it as the default editor in ~/.learn-config"
echo ""
echo "5. Install Chrome and Slack"
echo ""
echo "Run the following to verify successful installation:"
echo ""
echo "curl -so- https://raw.githubusercontent.com/learn-co-curriculum/flatiron-manual-setup-validator/master/manual-setup-check.sh | bash 2> /dev/null"
echo ""
echo "See https://github.com/learn-co-curriculum/environment-mac-os-catalina-setup for more information"
else
echo ""
echo "================================="
echo "================================="
echo "WARNING: Installation incomplete!"
echo "================================="
echo "================================="
echo ""
echo "> Review the warning(s) listed above before continuing to Steps 2-6: https://github.com/learn-co-curriculum/environment-mac-os-catalina-setup/blob/master/README.md#step-2---configure-git"
echo ""
echo "> After completing all configuration steps, run the validation script: https://github.com/learn-co-curriculum/environment-mac-os-catalina-setup/blob/master/README.md#step-7---verify-installations"
echo ""
echo "> If you encounter any issues or the validation script indicates failed installs, follow the manual installation steps here to ensure everything is configured correctly: https://github.com/learn-co-curriculum/environment-mac-os-catalina-setup/blob/master/README.md#step-by-step-instructions-for-manual-installation"
echo ""
echo ""
fi
|
#! /bin/bash
set -e
export DATABASE=postgres
export MODE=polling
export SPRING_PROFILES_ACTIVE=postgres
./_build-and-test-all.sh
|
import random
def rand_num():
return random.randrange(0, 10) |
# Sequel Pro dump
# Version 2492
# http://code.google.com/p/sequel-pro
#
# Database: wikidb
# Generation Time: 2011-05-23 17:16:41 -0400
# ************************************************************
Use wikidb;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table page
# ------------------------------------------------------------
DROP TABLE IF EXISTS `page`;
CREATE TABLE `page` (
`page_id` int(10) unsigned NOT NULL auto_increment,
`page_namespace` int(11) NOT NULL,
`page_title` varbinary(255) NOT NULL,
`page_restrictions` tinyblob NOT NULL,
`page_counter` bigint(20) unsigned NOT NULL default '0',
`page_is_redirect` tinyint(3) unsigned NOT NULL default '0',
`page_is_new` tinyint(3) unsigned NOT NULL default '0',
`page_random` double unsigned NOT NULL,
`page_touched` binary(14) NOT NULL default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
`page_latest` int(10) unsigned NOT NULL,
`page_len` int(10) unsigned NOT NULL,
PRIMARY KEY (`page_id`),
UNIQUE KEY `name_title` (`page_namespace`,`page_title`),
KEY `page_random` (`page_random`),
KEY `page_len` (`page_len`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=binary;
LOCK TABLES `page` WRITE;
/*!40000 ALTER TABLE `page` DISABLE KEYS */;
INSERT INTO `page` (`page_id`,`page_namespace`,`page_title`,`page_restrictions`,`page_counter`,`page_is_redirect`,`page_is_new`,`page_random`,`page_touched`,`page_latest`,`page_len`)
VALUES
(1,0,'Main_Page',X'',48,0,0,0.871515695154,X'3230313130343232313833363434',22,983),
(2,0,'Mission/Overview',X'',3,0,0,0.474094129167,X'3230313130343231313930323031',5,7741),
(3,0,'Research',X'',2,0,1,0.575692492994,X'3230313130343231313930363338',6,565),
(4,0,'Engagements',X'',3,0,1,0.713194697255,X'3230313130343231313930383131',7,173),
(5,0,'News/Events',X'',2,0,1,0.870247428006,X'3230313130343231313930393030',8,65),
(6,0,'Stakeholder_Outreach',X'',6,0,0,0.744046502457,X'3230313130353233313834383230',23,196),
(7,0,'Main:Architecture',X'',9,0,0,0.476551766038,X'3230313130343231313932363137',17,4227),
(8,0,'Main:Architecture:XCodeTips',X'',6,0,1,0.354885021709,X'3230313130343231313934353033',19,1025),
(9,0,'TestFlight',X'',1,0,1,0.846110325438,X'3230313130343231313932313431',16,3010),
(10,0,'Architecture',X'',0,1,1,0.936417384474,X'3230313130343231313932363137',18,31),
(11,0,'XCodeTips',X'',1,1,1,0.100138956046,X'3230313130343231313934353033',20,41);
/*!40000 ALTER TABLE `page` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table recentchanges
# ------------------------------------------------------------
DROP TABLE IF EXISTS `recentchanges`;
CREATE TABLE `recentchanges` (
`rc_id` int(11) NOT NULL auto_increment,
`rc_timestamp` varbinary(14) NOT NULL default '',
`rc_cur_time` varbinary(14) NOT NULL default '',
`rc_user` int(10) unsigned NOT NULL default '0',
`rc_user_text` varbinary(255) NOT NULL,
`rc_namespace` int(11) NOT NULL default '0',
`rc_title` varbinary(255) NOT NULL default '',
`rc_comment` varbinary(255) NOT NULL default '',
`rc_minor` tinyint(3) unsigned NOT NULL default '0',
`rc_bot` tinyint(3) unsigned NOT NULL default '0',
`rc_new` tinyint(3) unsigned NOT NULL default '0',
`rc_cur_id` int(10) unsigned NOT NULL default '0',
`rc_this_oldid` int(10) unsigned NOT NULL default '0',
`rc_last_oldid` int(10) unsigned NOT NULL default '0',
`rc_type` tinyint(3) unsigned NOT NULL default '0',
`rc_moved_to_ns` tinyint(3) unsigned NOT NULL default '0',
`rc_moved_to_title` varbinary(255) NOT NULL default '',
`rc_patrolled` tinyint(3) unsigned NOT NULL default '0',
`rc_ip` varbinary(40) NOT NULL default '',
`rc_old_len` int(11) default NULL,
`rc_new_len` int(11) default NULL,
`rc_deleted` tinyint(3) unsigned NOT NULL default '0',
`rc_logid` int(10) unsigned NOT NULL default '0',
`rc_log_type` varbinary(255) default NULL,
`rc_log_action` varbinary(255) default NULL,
`rc_params` blob,
PRIMARY KEY (`rc_id`),
KEY `rc_timestamp` (`rc_timestamp`),
KEY `rc_namespace_title` (`rc_namespace`,`rc_title`),
KEY `rc_cur_id` (`rc_cur_id`),
KEY `new_name_timestamp` (`rc_new`,`rc_namespace`,`rc_timestamp`),
KEY `rc_ip` (`rc_ip`),
KEY `rc_ns_usertext` (`rc_namespace`,`rc_user_text`),
KEY `rc_user_text` (`rc_user_text`,`rc_timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=binary;
LOCK TABLES `recentchanges` WRITE;
/*!40000 ALTER TABLE `recentchanges` DISABLE KEYS */;
INSERT INTO `recentchanges` (`rc_id`,`rc_timestamp`,`rc_cur_time`,`rc_user`,`rc_user_text`,`rc_namespace`,`rc_title`,`rc_comment`,`rc_minor`,`rc_bot`,`rc_new`,`rc_cur_id`,`rc_this_oldid`,`rc_last_oldid`,`rc_type`,`rc_moved_to_ns`,`rc_moved_to_title`,`rc_patrolled`,`rc_ip`,`rc_old_len`,`rc_new_len`,`rc_deleted`,`rc_logid`,`rc_log_type`,`rc_log_action`,`rc_params`)
VALUES
(1,'20110421171023','20110421171023',2,'Brian',2,'Brian','',0,0,0,0,0,0,3,0,'',1,'172.16.0.71',NULL,NULL,0,1,'newusers','create',X'32'),
(2,'20110421185628','20110421185628',2,'Brian',0,'Main_Page','Initial ordering',0,0,0,1,2,1,0,0,'',0,'172.16.0.71',438,923,0,0,NULL,'',X''),
(3,'20110421185839','20110421185839',2,'Brian',0,'Main_Page','fixing links',1,0,0,1,3,2,0,0,'',0,'172.16.0.71',923,983,0,0,NULL,'',X''),
(4,'20110421190053','20110421190053',2,'Brian',0,'Mission/Overview','Initial import',0,0,1,2,4,0,1,0,'',0,'172.16.0.71',0,7721,0,0,NULL,'',X''),
(5,'20110421190201','20110421190201',2,'Brian',0,'Mission/Overview','Initial import',0,0,0,2,5,4,0,0,'',0,'172.16.0.71',7721,7741,0,0,NULL,'',X''),
(6,'20110421190638','20110421190638',2,'Brian',0,'Research','Initial import',0,0,1,3,6,0,1,0,'',0,'172.16.0.71',0,565,0,0,NULL,'',X''),
(7,'20110421190811','20110421190811',2,'Brian',0,'Engagements','Initial import',0,0,1,4,7,0,1,0,'',0,'172.16.0.71',0,173,0,0,NULL,'',X''),
(8,'20110421190900','20110421190900',2,'Brian',0,'News/Events','Created page with \"Particular news items or events of interests will be shared here.\"',1,0,1,5,8,0,1,0,'',0,'172.16.0.71',0,65,0,0,NULL,'',X''),
(9,'20110421191048','20110421191048',2,'Brian',0,'Stakeholder_Outreach','Initial import',1,0,1,6,9,0,1,0,'',0,'172.16.0.71',0,202,0,0,NULL,'',X''),
(10,'20110421191103','20110421191103',2,'Brian',0,'Stakeholder_Outreach','',0,0,0,6,10,9,0,0,'',0,'172.16.0.71',202,206,0,0,NULL,'',X''),
(11,'20110421191344','20110421191344',2,'Brian',0,'Architecture','Initial import',0,0,1,7,11,0,1,0,'',0,'172.16.0.71',0,4178,0,0,NULL,'',X''),
(12,'20110421191533','20110421191533',2,'Brian',0,'Architecture','Adding links',1,0,0,7,12,11,0,0,'',0,'172.16.0.71',4178,4221,0,0,NULL,'',X''),
(13,'20110421191553','20110421191553',2,'Brian',0,'Architecture','fixing links',1,0,0,7,13,12,0,0,'',0,'172.16.0.71',4221,4225,0,0,NULL,'',X''),
(14,'20110421191607','20110421191607',2,'Brian',0,'Architecture','/* Useful Links */ ',0,0,0,7,14,13,0,0,'',0,'172.16.0.71',4225,4227,0,0,NULL,'',X''),
(15,'20110421191633','20110421191633',2,'Brian',0,'XCodeTips','Import from google wiki',0,0,1,8,15,0,1,0,'',0,'172.16.0.71',0,1025,0,0,NULL,'',X''),
(16,'20110421192141','20110421192141',2,'Brian',0,'TestFlight','Import from google wiki',0,0,1,9,16,0,1,0,'',0,'172.16.0.71',0,3010,0,0,NULL,'',X''),
(17,'20110421192617','20110421192617',2,'Brian',0,'Architecture','testing out breadcrumbs',0,0,0,10,0,0,3,0,'',1,'172.16.0.71',NULL,NULL,0,2,'move','move',X'4D61696E3A4172636869746563747572650A'),
(18,'20110421194503','20110421194503',2,'Brian',0,'XCodeTips','',0,0,0,11,0,0,3,0,'',1,'172.16.0.71',NULL,NULL,0,3,'move','move',X'4D61696E3A4172636869746563747572653A58436F6465546970730A'),
(19,'20110422110758','20110422110758',0,'172.16.31.10',0,'Main_Page','R8F45S <a href=\"http://dsqovzibltcc.com/\">dsqovzibltcc</a>, [url=http://pfozpkkesdyx.com/]pfozpkkesdyx[/url], [link=http://vqifehknuguo.com/]vqifehknuguo[/link], http://qidxxwjrmucz.com/',0,0,0,1,21,3,0,0,'',0,'172.16.31.10',983,1003,0,0,NULL,'',X''),
(20,'20110422183644','20110422183644',0,'172.16.0.71',0,'Main_Page','Undo revision 21 by [[Special:Contributions/172.16.31.10|172.16.31.10]] ([[User talk:172.16.31.10|talk]])',0,0,0,1,22,21,0,0,'',0,'172.16.0.71',1003,983,0,0,NULL,'',X''),
(21,'20110523184820','20110523184820',0,'172.16.4.71',0,'Stakeholder_Outreach','',0,0,0,6,23,10,0,0,'',0,'172.16.4.71',206,196,0,0,NULL,'',X'');
/*!40000 ALTER TABLE `recentchanges` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table revision
# ------------------------------------------------------------
DROP TABLE IF EXISTS `revision`;
CREATE TABLE `revision` (
`rev_id` int(10) unsigned NOT NULL auto_increment,
`rev_page` int(10) unsigned NOT NULL,
`rev_text_id` int(10) unsigned NOT NULL,
`rev_comment` tinyblob NOT NULL,
`rev_user` int(10) unsigned NOT NULL default '0',
`rev_user_text` varbinary(255) NOT NULL default '',
`rev_timestamp` binary(14) NOT NULL default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
`rev_minor_edit` tinyint(3) unsigned NOT NULL default '0',
`rev_deleted` tinyint(3) unsigned NOT NULL default '0',
`rev_len` int(10) unsigned default NULL,
`rev_parent_id` int(10) unsigned default NULL,
PRIMARY KEY (`rev_id`),
UNIQUE KEY `rev_page_id` (`rev_page`,`rev_id`),
KEY `rev_timestamp` (`rev_timestamp`),
KEY `page_timestamp` (`rev_page`,`rev_timestamp`),
KEY `user_timestamp` (`rev_user`,`rev_timestamp`),
KEY `usertext_timestamp` (`rev_user_text`,`rev_timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=binary MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
LOCK TABLES `revision` WRITE;
/*!40000 ALTER TABLE `revision` DISABLE KEYS */;
INSERT INTO `revision` (`rev_id`,`rev_page`,`rev_text_id`,`rev_comment`,`rev_user`,`rev_user_text`,`rev_timestamp`,`rev_minor_edit`,`rev_deleted`,`rev_len`,`rev_parent_id`)
VALUES
(1,1,1,X'',0,'MediaWiki default',X'3230313130343138323035353335',0,0,438,0),
(2,1,2,X'496E697469616C206F72646572696E67',2,'Brian',X'3230313130343231313835363238',0,0,923,1),
(3,1,3,X'666978696E67206C696E6B73',2,'Brian',X'3230313130343231313835383339',1,0,983,2),
(4,2,4,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313930303533',0,0,7721,0),
(5,2,5,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313930323031',0,0,7741,4),
(6,3,6,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313930363338',0,0,565,0),
(7,4,7,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313930383131',0,0,173,0),
(8,5,8,X'43726561746564207061676520776974682022506172746963756C6172206E657773206974656D73206F72206576656E7473206F6620696E746572657374732077696C6C2062652073686172656420686572652E22',2,'Brian',X'3230313130343231313930393030',1,0,65,0),
(9,6,9,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313931303438',1,0,202,0),
(10,6,10,X'',2,'Brian',X'3230313130343231313931313033',0,0,206,9),
(11,7,11,X'496E697469616C20696D706F7274',2,'Brian',X'3230313130343231313931333434',0,0,4178,0),
(12,7,12,X'416464696E67206C696E6B73',2,'Brian',X'3230313130343231313931353333',1,0,4221,11),
(13,7,13,X'666978696E67206C696E6B73',2,'Brian',X'3230313130343231313931353533',1,0,4225,12),
(14,7,14,X'2F2A2055736566756C204C696E6B73202A2F',2,'Brian',X'3230313130343231313931363037',0,0,4227,13),
(15,8,15,X'496D706F72742066726F6D20676F6F676C652077696B69',2,'Brian',X'3230313130343231313931363333',0,0,1025,0),
(16,9,16,X'496D706F72742066726F6D20676F6F676C652077696B69',2,'Brian',X'3230313130343231313932313431',0,0,3010,0),
(17,7,14,X'6D6F766564205B5B4172636869746563747572655D5D20746F205B5B4D61696E3A4172636869746563747572655D5D3A2074657374696E67206F75742062726561646372756D6273',2,'Brian',X'3230313130343231313932363137',1,0,4227,14),
(18,10,17,X'6D6F766564205B5B4172636869746563747572655D5D20746F205B5B4D61696E3A4172636869746563747572655D5D3A2074657374696E67206F75742062726561646372756D6273',2,'Brian',X'3230313130343231313932363137',0,0,31,0),
(19,8,15,X'6D6F766564205B5B58436F6465546970735D5D20746F205B5B4D61696E3A4172636869746563747572653A58436F6465546970735D5D',2,'Brian',X'3230313130343231313934353033',1,0,1025,15),
(20,11,18,X'6D6F766564205B5B58436F6465546970735D5D20746F205B5B4D61696E3A4172636869746563747572653A58436F6465546970735D5D',2,'Brian',X'3230313130343231313934353033',0,0,41,0),
(21,1,19,X'52384634355320203C6120687265663D22687474703A2F2F6473716F767A69626C7463632E636F6D2F223E6473716F767A69626C7463633C2F613E2C205B75726C3D687474703A2F2F70666F7A706B6B65736479782E636F6D2F5D70666F7A706B6B65736479785B2F75726C5D2C205B6C696E6B3D687474703A2F2F7671696665686B6E7567756F2E636F6D2F5D7671696665686B6E7567756F5B2F6C696E6B5D2C20687474703A2F2F7169647878776A726D75637A2E636F6D2F',0,'172.16.31.10',X'3230313130343232313130373538',0,0,1003,3),
(22,1,20,X'556E646F207265766973696F6E203231206279205B5B5370656369616C3A436F6E747269627574696F6E732F39352E36372E38302E3134367C39352E36372E38302E3134365D5D20285B5B557365722074616C6B3A39352E36372E38302E3134367C74616C6B5D5D29',0,'172.16.0.71',X'3230313130343232313833363434',0,0,983,21),
(23,6,21,X'',0,'172.16.4.71',X'3230313130353233313834383230',0,0,196,10);
/*!40000 ALTER TABLE `revision` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table text
# ------------------------------------------------------------
DROP TABLE IF EXISTS `text`;
CREATE TABLE `text` (
`old_id` int(10) unsigned NOT NULL auto_increment,
`old_text` mediumblob NOT NULL,
`old_flags` tinyblob NOT NULL,
PRIMARY KEY (`old_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=binary MAX_ROWS=10000000 AVG_ROW_LENGTH=10240;
LOCK TABLES `text` WRITE;
/*!40000 ALTER TABLE `text` DISABLE KEYS */;
INSERT INTO `text` (`old_id`,`old_text`,`old_flags`)
VALUES
(1,X'2727274D6564696157696B6920686173206265656E207375636365737366756C6C7920696E7374616C6C65642E2727270A0A436F6E73756C7420746865205B687474703A2F2F6D6574612E77696B696D656469612E6F72672F77696B692F48656C703A436F6E74656E7473205573657227732047756964655D20666F7220696E666F726D6174696F6E206F6E207573696E67207468652077696B6920736F6674776172652E0A0A3D3D2047657474696E672073746172746564203D3D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A436F6E66696775726174696F6E5F73657474696E677320436F6E66696775726174696F6E2073657474696E6773206C6973745D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A464151204D6564696157696B69204641515D0A2A205B68747470733A2F2F6C697374732E77696B696D656469612E6F72672F6D61696C6D616E2F6C697374696E666F2F6D6564696177696B692D616E6E6F756E6365204D6564696157696B692072656C65617365206D61696C696E67206C6973745D',X'7574662D38'),
(2,X'546869732077696B69207365727665732061732061206D6F72652063617375616C20636F6C6C61626F726174696F6E20737061636520666F722074686520496E666F726D617469637320522644204C61626F7261746F72792E204974206973206F70656E20746F2065646974696E6720627920746865207075626C6963202865697468657220616E6F6E796D6F75736C79206F72207468726F7567682072656769737465726564206163636F756E7473292E205768696C6520746865206D61696E207369746520636F6E7461696E7320696E666F726D6174696F6E206F6E2070726F6A656374732C206E65777320616E64206F74686572206163746976697469657320746869732077696B6920736572766573206173206120736372617463682070616420746F2070726F76696465206164646974696F6E616C20696E666F726D6174696F6E206F7220746F20657870616E64206F6E206120636F6E63657074206173206E65636573736172792E20416C6C20636F6E74656E74206973206D6F646572617465642062792074686520636F6D6D756E6974792E0A0A5B4D697373696F6E2F4F766572766965775D0A5B52657365617263685D0A5B456E676167656D656E74735D0A5B4E6577732F4576656E74735D0A5B5374616B65686F6C646572204F757472656163685D0A5B4172636869746563747572655D0A5B4E6F7465735D0A5B496E746572657374696E674C696E6B735D0A0A436F6E73756C7420746865205B687474703A2F2F6D6574612E77696B696D656469612E6F72672F77696B692F48656C703A436F6E74656E7473205573657227732047756964655D20666F7220696E666F726D6174696F6E206F6E207573696E67207468652077696B6920736F6674776172652E0A0A3D3D2047657474696E672073746172746564203D3D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A436F6E66696775726174696F6E5F73657474696E677320436F6E66696775726174696F6E2073657474696E6773206C6973745D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A464151204D6564696157696B69204641515D0A2A205B68747470733A2F2F6C697374732E77696B696D656469612E6F72672F6D61696C6D616E2F6C697374696E666F2F6D6564696177696B692D616E6E6F756E6365204D6564696157696B692072656C65617365206D61696C696E67206C6973745D',X'7574662D38'),
(3,X'546869732077696B69207365727665732061732061206D6F72652063617375616C20636F6C6C61626F726174696F6E20737061636520666F722074686520496E666F726D617469637320522644204C61626F7261746F72792E204974206973206F70656E20746F2065646974696E6720627920746865207075626C6963202865697468657220616E6F6E796D6F75736C79206F72207468726F7567682072656769737465726564206163636F756E7473292E205768696C6520746865206D61696E207369746520636F6E7461696E7320696E666F726D6174696F6E206F6E2070726F6A656374732C206E65777320616E64206F74686572206163746976697469657320746869732077696B6920736572766573206173206120736372617463682070616420746F2070726F76696465206164646974696F6E616C20696E666F726D6174696F6E206F7220746F20657870616E64206F6E206120636F6E63657074206173206E65636573736172792E20416C6C20636F6E74656E74206973206D6F646572617465642062792074686520636F6D6D756E6974792E0A0A0A3D3D204D616A6F722053656374696F6E73203D3D0A2A5B5B4D697373696F6E2F4F766572766965775D5D0A2A5B5B52657365617263685D5D0A2A5B5B456E676167656D656E74735D5D0A2A5B5B4E6577732F4576656E74735D5D0A2A5B5B5374616B65686F6C646572204F757472656163685D5D0A2A5B5B4172636869746563747572655D5D0A2A5B5B4E6F7465735D5D0A2A5B5B496E746572657374696E674C696E6B735D5D0A0A3D3D2047657474696E672073746172746564202D20746F2062652072656D6F7665643D3D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A436F6E66696775726174696F6E5F73657474696E677320436F6E66696775726174696F6E2073657474696E6773206C6973745D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A464151204D6564696157696B69204641515D0A2A205B68747470733A2F2F6C697374732E77696B696D656469612E6F72672F6D61696C6D616E2F6C697374696E666F2F6D6564696177696B692D616E6E6F756E6365204D6564696157696B692072656C65617365206D61696C696E67206C6973745D0A436F6E73756C7420746865205B687474703A2F2F6D6574612E77696B696D656469612E6F72672F77696B692F48656C703A436F6E74656E7473205573657227732047756964655D20666F7220696E666F726D6174696F6E206F6E207573696E67207468652077696B6920736F6674776172652E',X'7574662D38'),
(4,X'43656E7465727320666F72204469736561736520436F6E74726F6C20616E642050726576656E74696F6E200A4F6666696365206F66205375727665696C6C616E63652C2045706964656D696F6C6F67792C20616E64204C61626F7261746F72792053657276696365730A5075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F6666696365200A496E666F726D617469637320526573656172636820616E6420446576656C6F706D656E742020556E69740A0A27272742524945462727270A0A546865206D697373696F6E206F662074686520496E666F726D61746963732052264420556E6974202028495244552920697320746F20616476616E636520746865206669656C64206F66207075626C6963206865616C746820696E666F726D6174696373207468726F756768206170706C69656420726573656172636820616E6420696E6E6F766174696F6E20616E6420706F7369746976656C7920696D70616374207075626C6963206865616C746820707261637469636520696E207468652073686F727420616E64206C6F6E672D7465726D2074696D65206672616D65732E20205075626C6963206865616C746820696E666F726D6174696373206973207468652073797374656D61746963206170706C69636174696F6E206F6620696E666F726D6174696F6E2C20636F6D707574657220736369656E636520616E6420746563686E6F6C6F677920746F207075626C6963206865616C74682070726163746963652C20726573656172636820616E64206C6561726E696E672E202020546F207375636365737366756C6C79206163686965766520746865736520616476616E6365732C206F757220756E6974206D6F64656C7320697473206F7267616E697A6174696F6E616C207374727563747572652061667465722074686520736369656E6365206D6574686F642E202054686520736369656E7469666963206D6574686F6420636F6E7369737473206F662074686520666F726D756C6174696F6E20616E642074657374696E67206F66206879706F746865736573207468726F7567682074686520636F6C6C656374696F6E206F662065766964656E63652028692E652E2C2064617461292067656E6572617465642066726F6D206F62736572766174696F6E616C20616E64206578706572696D656E746174696F6E20746563686E69717565732E20202054686520666F726D756C6174696F6E206F66206879706F7468657365732028652E672E2C20646F20726563656E746C7920646576656C6F7065642068616E6468656C642064657669636573206C657665726167696E67206175676D656E746564207265616C697479207369676E69666963616E746C7920696D70726F76652074686520656666696369656E637920616E64206566666563746976656E657373206F66207075626C6963206865616C7468206461746120636F6C6C656374696F6E3F292069732067656E65726174656420616E6420726566696E656420766961206D656D62657273206F66206F757220526573656172636820616E6420496E6E6F766174696F6E205465616D20285249292E20205468652074657374696E67206F66206879706F74686573657320697320737570706F72746564206279207468652065787065727469736520696E206F75722050726F746F7479706520446576656C6F706D656E74205465616D20285044292E20204F7572204C61626F7261746F727920496E667261737472756374757265202620537570706F7274205465616D20284C495329206372656174657320616E64206D61696E7461696E7320616E206F7074696D616C2028666C657869626C6520616E64207363616C61626C652920656E7669726F6E6D656E7420666F72206879706F7468657365732074657374696E6720616E642070726F746F7479706520646576656C6F706D656E7420746F2074616B6520706C6163652E2020546F2061737375726520686967682D7175616C697479206167656E63792D7769646520736572766963652C207468657365207468726565207465616D7320617265206469726563746C7920737570706F727465642062792074686520756E6974E2809973204F6666696365206F6620746865204469726563746F7220284F44292073746166662E20200A200A5468652076616C7561626C6520696E736967687473206761696E65642077696C6C2062652073686172656420776974682043444320616E6420746865207075626C6963206865616C746820636F6D6D756E69747920766961206D656574696E67732C2070726573656E746174696F6E732C206E6577736C6574746572732C20706565722D7265766965776564207075626C69636174696F6E732C2070726F746F7479706520746F6F6C732C20616E64207765622D6261736564206D656469612E20204F6E63652064656D6F6E7374726174656420746F206265206F662076616C75652C2061206E657720696E666F726D617469637320736F6C7574696F6E206F7220746563686E697175652077696C6C206265207472616E736974696F6E656420746F2074686520617070726F707269617465207075626C6963206865616C74682070726F6772616D20666F7220666F726D616C206465706C6F796D656E7420616E6420696D706C656D656E746174696F6E2E2020476976656E2074686520726F6C65206F66207468697320756E697420696E20746865206167656E63792C2074686520706879736963616C20696E667261737472756374757265206F66206F757220636F6D7075746572206C61626F7261746F72792069732063757272656E746C7920696E207472616E736974696F6E2C20616E6420697320617070726F7072696174656C79207363616C696E6720746F2066756E6374696F6E206173207265736F75726365206469726563746C7920617661696C61626C6520746F2074686520656E74697265206167656E63792E200A200A2A506C65617365206E6F74652074686174206174206E6F2074696D65206172652070726F6A6563747320696E206F7572206C616220746F207573652064617461207468617420636F6E7461696E7320696E666F726D6174696F6E2061626F7574206865616C7468207374617475732C2070726F766973696F6E206F66206865616C746820636172652C206F72207061796D656E7420666F72206865616C7468206361726520746861742063616E206265206C696E6B656420746F206120737065636966696320696E646976696475616C2E2020496E206164646974696F6E2C20746865204C61626F7261746F7279206973206E6F74207573656420746F20637265617465206E6F7220636F6E6E65637420746F2070726F64756374696F6E2073797374656D732E200A0A2727274C4F4E472727270A200A546865206D697373696F6E206F66204952445520697320746F20616476616E636520746865206669656C64206F66207075626C6963206865616C746820696E666F726D6174696373207468726F756768206170706C69656420726573656172636820616E6420696E6E6F766174696F6E2E20205075626C6963206865616C746820696E666F726D6174696373206973207468652073797374656D61746963206170706C69636174696F6E206F6620696E666F726D6174696F6E20616E6420636F6D707574657220736369656E636520616E6420746563686E6F6C6F677920746F207075626C6963206865616C74682070726163746963652C20726573656172636820616E64206C6561726E696E672E202020546F207375636365737366756C6C79206163686965766520746865736520616476616E6365732C20495244552077696C6C206D6F64656C20697473206F7267616E697A6174696F6E616C2073747275637475726520616C6F6E67207468652070617468206F662074686520736369656E6365206D6574686F642E202054686520736369656E7469666963206D6574686F6420636F6E7369737473206F662074686520666F726D756C6174696F6E20616E642074657374696E67206F66206879706F746865736573207468726F7567682074686520636F6C6C656374696F6E206F662065766964656E63652028692E652E2C2064617461292067656E6572617465642066726F6D206F62736572766174696F6E616C20616E64206578706572696D656E746174696F6E20746563686E69717565732E20202054686520666F726D756C6174696F6E206F66206879706F7468657365732028652E672E2C20646F20726563656E746C7920646576656C6F7065642068616E6468656C642064657669636573206C657665726167696E67206175676D656E746564207265616C697479207369676E69666963616E746C7920696D70726F76652074686520656666696369656E637920616E64206566666563746976656E657373206F66207075626C6963206865616C7468206461746120636F6C6C656374696F6E3F292077696C6C2062652067656E65726174656420616E6420726566696E6564207669612049524455277320526573656172636820616E6420496E6E6F766174696F6E205465616D20285249292E20205468652074657374696E67206F66206879706F7468657365732077696C6C20626520737570706F72746564206279207468652065787065727469736520696E204952445527732050726F746F7479706520446576656C6F706D656E74205465616D20285044292E2020495244552773204C61626F7261746F727920496E667261737472756374757265202620537570706F7274205465616D20284C4953292077696C6C2063726561746520616E64206D61696E7461696E20616E206F7074696D616C20656E7669726F6E6D656E7420666F72206879706F7468657365732074657374696E6720746F2074616B6520706C6163652E20204576616C756174696F6E206F6620726573756C74732C2061732077656C6C2061732064697363757373696F6E20616E642064697373656D696E6174696F6E206F662074686520776F726B206F66207468657365207468726565207465616D732C2077696C6C206265206469726563746C7920737570706F727465642062792049524455204F6666696365206F6620746865204469726563746F7220284F44292073746166662E20200A200A546865207374616666206F6620495244552077696C6C20636F6C6C61626F726174652077697468206D656D62657273206F66204344432070726F6772616D732061732077656C6C206173207468652062726F61646572207075626C6963206865616C746820636F6D6D756E69747920746F20646576656C6F7020696E6E6F76617469766520746563686E6F6C6F6769657320616E6420746563686E697175657320746F20706F7369746976656C7920696D70616374207075626C6963206865616C746820707261637469636520696E207468652073686F727420616E64206C6F6E672D7465726D2074696D65206672616D65732E20204F6E63652064656D6F6E7374726174656420746F206265206F662076616C75652C2061206E657720696E666F726D617469637320736F6C7574696F6E206F7220746563686E697175652077696C6C206265207472616E736974696F6E656420746F2074686520617070726F707269617465207075626C6963206865616C74682070726F6772616D20666F7220666F726D616C206465706C6F796D656E7420616E6420696D706C656D656E746174696F6E2E200A200A5468652049524455204F442077696C6C2070726F76696465206469766973696F6E2D6C6576656C206F766572736967687420616E6420737570706F727420696E2074686520666F6C6C6F77696E6720637269746963616C2061726561733A20204D616E6167656D656E742026204F7065726174696F6E732C20436F6D6D756E69636174696F6E732C20506F6C6963792026204F757472656163682C20536369656E63652C20616E642050726F6A656374202F2050726F6772616D204D616E6167656D656E742E20205370656369666963616C6C792C207468652049524455204F442077696C6C20636F6E7461696E2074686520666F6C6C6F77696E672066756E6374696F6E616C207469746C65733A20204469766973696F6E204469726563746F722C204469766973696F6E204465707574792C204D616E6167656D656E7420616E642050726F6772616D20416E616C797374202832292C20436F6D6D756E69636174696F6E73204C6561642C20506F6C69637920616E64204F75747265616368204C6561642C204469766973696F6E204173736F6369617465204469726563746F7220666F7220536369656E63652C2049542050726F6A656374204D616E6167656D656E74204C6561642E2020537570706F727420737461666620666F72207468657365206C6561647320696E636C7564653A20577269746572202F20456469746F722C205075626C6963204865616C746820416E616C7973742C2049542050726F6A656374204D616E616765722C20616E642061204865616C746820436F6D6D756E69636174696F6E73205370656369616C6973742E0A200A546865204952445520526573656172636820616E6420496E6E6F766174696F6E207465616D20285249292077696C6C2070726F7669646520746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C20746865204F6666696365206F66205375727665696C6C616E63652C2045706964656D696F6C6F67792C20616E64204C61626F7261746F727920536572766963657320284F53454C53292C204344432C20616E64206974732065787465726E616C20726573656172636820616E64207075626C6963206865616C746820706172746E6572732C20636F6E73756C746174696F6E2C2067756964616E63652C20737570706F72742C20616E6420696E736967687420696E746F2074686520757365206F66206E657720696E666F726D617469637320736F6C7574696F6E7320666F72207075626C6963206865616C74682070726163746963652E20205468726F7567682074686520737570706F7274206F6620746865204F4420616E64206F746865722074776F2049524455207465616D732C2074686520526573656172636820616E6420496E6E6F766174696F6E207465616D2077696C6C2062652061626C6520746F2073686172652076616C7561626C6520696E736967687473206761696E656420766961206D656574696E67732C2070726573656E746174696F6E732C206E6577736C6574746572732C20706565722D7265766965776564207075626C69636174696F6E732C20616E64207765622D6261736564206D656469612E202046756E6374696F6E616C207469746C65732077697468696E2074686520526573656172636820616E6420496E6E6F766174696F6E207465616D20696E636C7564653A202053656E696F72204865616C746820496E666F726D617469637320536369656E74697374202F205465616D204C6561642C20536F6369616C2044796E616D696373202F204265686176696F72616C20536369656E746973742C205365637572697479205370656369616C6973742C20536F66747761726520417263686974656374202F2044657369676E65722C204861726477617265202F20496E66726173747275637475726520526573656172636865722C2020616E6420616E2045706964656D696F6C6F67697374202F204865616C746820536369656E746973742E2020537570706F72742073746166662077696C6C20696E636C7564652066656C6C6F77732028692E652E2C2073747564656E7473292066726F6D2077697468696E2028652E672E2C20434443205075626C6963204865616C746820496E666F726D61746963732046656C6C6F7773292C20616E64206F75747369646520746865206167656E63792028652E672E2C2047656F7267696120496E73746974757465206F6620546563686E6F6C6F67792073747564656E7473292E0A200A5769746820646972656374696F6E2066726F6D20746865204F4420616E642074686520526573656172636820616E6420496E6E6F766174696F6E2028524929207465616D2C2074686520495244552050726F746F7479706520446576656C6F706D656E742028504429207465616D2077696C6C20636F6E7461696E20746865206E6563657373617279207265736F757263657320746F2072617069646C792063726561746520616E642076616C6964617465206879706F7468657365732067656E65726174656420627920746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C204F53454C532C204344432C20616E64206974732065787465726E616C20726573656172636820616E64207075626C6963206865616C746820706172746E6572732E202020436F6E74726163746F7220737570706F72742077696C6C20626520757365642C206173206E65656465642C20746F206175676D656E742074686520636F7265207465616D207768656E206D697373696E67207370656369616C697A656420736B696C6C73206172652072657175697265642C206F72206966207261706964207363616C696E6720726571756972656D656E7473206265636F6D65206170706172656E742064756520746F2070726F6A656374206C6F616420616E642F6F722074696D6520636F6E73747261696E74732E202054686973206164646974696F6E616C20737570706F72742073686F756C642070726F7669646520746865206361706162696C69747920746F2072756E20616E206164646974696F6E616C203220746F20332070726F6A6563747320636F6E63757272656E746C792E20202041732061206D616A6F72697479206F66207468652070726F746F74797065732077696C6C20626520736F6674776172652D62617365642C2074686520636F7265207465616D2077696C6C20626520736F66747761726520646576656C6F706D656E74206F7269656E7465642E202045616368204654452073686F756C642062652063617061626C65206F6620737570706F7274696E672074776F2070726F6A6563747320636F6E63757272656E746C792E202046756E6374696F6E616C207469746C65732077697468696E207468652050726F746F7479706520446576656C6F706D656E74207465616D20696E636C7564653A20204954205370656369616C6973742028446576656C6F706D656E74204D616E61676572202F205465616D204C656164292C20536F66747761726520456E67696E656572202835292C205573657220496E7465726661636520456E67696E656572202832292C205175616C697479204173737572616E636520456E67696E6565722C2044617461626173652041646D696E6973747261746F722C20616E6420446F63756D656E746174696F6E205370656369616C697374732028577269746572202F20456469746F7229202832292E0A200A5468652049524455204C61626F7261746F727920496E667261737472756374757265202620537570706F727420284C495329207465616D2077696C6C2070726F7669646520746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C204F53454C5320616E642043444320616E206F7074696D616C2028692E652E2C20666C657869626C6520616E64207363616C61626C652920656E7669726F6E6D656E7420666F722074686520726170696420646576656C6F706D656E74206F662070726F746F7479706520736F6C7574696F6E7320666F722074657374696E6720616E64206576616C756174696F6E20707572706F7365732E2020476976656E206974732064657369676E2C2074686520496E666F726D617469637320522644204C61622C20737570706F72746564206279207468652049524455204C61626F7261746F727920496E66726173747275637475726520616E6420537570706F727420284C495329207465616D2C2077696C6C2066756E6374696F6E206173207265736F75726365206469726563746C7920617661696C61626C6520746F2074686520656E74697265206167656E63792E202046756E6374696F6E616C207469746C65732077697468696E20746865204C61626F7261746F727920496E667261737472756374757265202620537570706F727420284C495329207465616D20696E636C7564653A20204954205370656369616C69737420284F7065726174696F6E73204D616E61676572292C2053797374656D2041646D696E6973747261746F722C204E6574776F726B20456E67696E6565722C20486172647761726520456E67696E6565722C20616E6420536563757269747920456E67696E6565722E20204966206E65656465642C2074686520636F7265207465616D2063616E206265206175676D656E7465642076696120636F6E74726163746F7220737570706F72742E',X'7574662D38'),
(5,X'43656E7465727320666F72204469736561736520436F6E74726F6C20616E642050726576656E74696F6E200A0A4F6666696365206F66205375727665696C6C616E63652C2045706964656D696F6C6F67792C20616E64204C61626F7261746F72792053657276696365730A0A5075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F6666696365200A0A496E666F726D617469637320526573656172636820616E6420446576656C6F706D656E742020556E69740A0A27272742524945462727270A0A546865206D697373696F6E206F662074686520496E666F726D61746963732052264420556E6974202028495244552920697320746F20616476616E636520746865206669656C64206F66207075626C6963206865616C746820696E666F726D6174696373207468726F756768206170706C69656420726573656172636820616E6420696E6E6F766174696F6E20616E6420706F7369746976656C7920696D70616374207075626C6963206865616C746820707261637469636520696E207468652073686F727420616E64206C6F6E672D7465726D2074696D65206672616D65732E20205075626C6963206865616C746820696E666F726D6174696373206973207468652073797374656D61746963206170706C69636174696F6E206F6620696E666F726D6174696F6E2C20636F6D707574657220736369656E636520616E6420746563686E6F6C6F677920746F207075626C6963206865616C74682070726163746963652C20726573656172636820616E64206C6561726E696E672E202020546F207375636365737366756C6C79206163686965766520746865736520616476616E6365732C206F757220756E6974206D6F64656C7320697473206F7267616E697A6174696F6E616C207374727563747572652061667465722074686520736369656E6365206D6574686F642E202054686520736369656E7469666963206D6574686F6420636F6E7369737473206F662074686520666F726D756C6174696F6E20616E642074657374696E67206F66206879706F746865736573207468726F7567682074686520636F6C6C656374696F6E206F662065766964656E63652028692E652E2C2064617461292067656E6572617465642066726F6D206F62736572766174696F6E616C20616E64206578706572696D656E746174696F6E20746563686E69717565732E20202054686520666F726D756C6174696F6E206F66206879706F7468657365732028652E672E2C20646F20726563656E746C7920646576656C6F7065642068616E6468656C642064657669636573206C657665726167696E67206175676D656E746564207265616C697479207369676E69666963616E746C7920696D70726F76652074686520656666696369656E637920616E64206566666563746976656E657373206F66207075626C6963206865616C7468206461746120636F6C6C656374696F6E3F292069732067656E65726174656420616E6420726566696E656420766961206D656D62657273206F66206F757220526573656172636820616E6420496E6E6F766174696F6E205465616D20285249292E20205468652074657374696E67206F66206879706F74686573657320697320737570706F72746564206279207468652065787065727469736520696E206F75722050726F746F7479706520446576656C6F706D656E74205465616D20285044292E20204F7572204C61626F7261746F727920496E667261737472756374757265202620537570706F7274205465616D20284C495329206372656174657320616E64206D61696E7461696E7320616E206F7074696D616C2028666C657869626C6520616E64207363616C61626C652920656E7669726F6E6D656E7420666F72206879706F7468657365732074657374696E6720616E642070726F746F7479706520646576656C6F706D656E7420746F2074616B6520706C6163652E2020546F2061737375726520686967682D7175616C697479206167656E63792D7769646520736572766963652C207468657365207468726565207465616D7320617265206469726563746C7920737570706F727465642062792074686520756E6974E2809973204F6666696365206F6620746865204469726563746F7220284F44292073746166662E20200A200A5468652076616C7561626C6520696E736967687473206761696E65642077696C6C2062652073686172656420776974682043444320616E6420746865207075626C6963206865616C746820636F6D6D756E69747920766961206D656574696E67732C2070726573656E746174696F6E732C206E6577736C6574746572732C20706565722D7265766965776564207075626C69636174696F6E732C2070726F746F7479706520746F6F6C732C20616E64207765622D6261736564206D656469612E20204F6E63652064656D6F6E7374726174656420746F206265206F662076616C75652C2061206E657720696E666F726D617469637320736F6C7574696F6E206F7220746563686E697175652077696C6C206265207472616E736974696F6E656420746F2074686520617070726F707269617465207075626C6963206865616C74682070726F6772616D20666F7220666F726D616C206465706C6F796D656E7420616E6420696D706C656D656E746174696F6E2E2020476976656E2074686520726F6C65206F66207468697320756E697420696E20746865206167656E63792C2074686520706879736963616C20696E667261737472756374757265206F66206F757220636F6D7075746572206C61626F7261746F72792069732063757272656E746C7920696E207472616E736974696F6E2C20616E6420697320617070726F7072696174656C79207363616C696E6720746F2066756E6374696F6E206173207265736F75726365206469726563746C7920617661696C61626C6520746F2074686520656E74697265206167656E63792E200A200A3C6E6F77696B693E2A3C2F6E6F77696B693E506C65617365206E6F74652074686174206174206E6F2074696D65206172652070726F6A6563747320696E206F7572206C616220746F207573652064617461207468617420636F6E7461696E7320696E666F726D6174696F6E2061626F7574206865616C7468207374617475732C2070726F766973696F6E206F66206865616C746820636172652C206F72207061796D656E7420666F72206865616C7468206361726520746861742063616E206265206C696E6B656420746F206120737065636966696320696E646976696475616C2E2020496E206164646974696F6E2C20746865204C61626F7261746F7279206973206E6F74207573656420746F20637265617465206E6F7220636F6E6E65637420746F2070726F64756374696F6E2073797374656D732E200A0A2727274C4F4E472727270A200A546865206D697373696F6E206F66204952445520697320746F20616476616E636520746865206669656C64206F66207075626C6963206865616C746820696E666F726D6174696373207468726F756768206170706C69656420726573656172636820616E6420696E6E6F766174696F6E2E20205075626C6963206865616C746820696E666F726D6174696373206973207468652073797374656D61746963206170706C69636174696F6E206F6620696E666F726D6174696F6E20616E6420636F6D707574657220736369656E636520616E6420746563686E6F6C6F677920746F207075626C6963206865616C74682070726163746963652C20726573656172636820616E64206C6561726E696E672E202020546F207375636365737366756C6C79206163686965766520746865736520616476616E6365732C20495244552077696C6C206D6F64656C20697473206F7267616E697A6174696F6E616C2073747275637475726520616C6F6E67207468652070617468206F662074686520736369656E6365206D6574686F642E202054686520736369656E7469666963206D6574686F6420636F6E7369737473206F662074686520666F726D756C6174696F6E20616E642074657374696E67206F66206879706F746865736573207468726F7567682074686520636F6C6C656374696F6E206F662065766964656E63652028692E652E2C2064617461292067656E6572617465642066726F6D206F62736572766174696F6E616C20616E64206578706572696D656E746174696F6E20746563686E69717565732E20202054686520666F726D756C6174696F6E206F66206879706F7468657365732028652E672E2C20646F20726563656E746C7920646576656C6F7065642068616E6468656C642064657669636573206C657665726167696E67206175676D656E746564207265616C697479207369676E69666963616E746C7920696D70726F76652074686520656666696369656E637920616E64206566666563746976656E657373206F66207075626C6963206865616C7468206461746120636F6C6C656374696F6E3F292077696C6C2062652067656E65726174656420616E6420726566696E6564207669612049524455277320526573656172636820616E6420496E6E6F766174696F6E205465616D20285249292E20205468652074657374696E67206F66206879706F7468657365732077696C6C20626520737570706F72746564206279207468652065787065727469736520696E204952445527732050726F746F7479706520446576656C6F706D656E74205465616D20285044292E2020495244552773204C61626F7261746F727920496E667261737472756374757265202620537570706F7274205465616D20284C4953292077696C6C2063726561746520616E64206D61696E7461696E20616E206F7074696D616C20656E7669726F6E6D656E7420666F72206879706F7468657365732074657374696E6720746F2074616B6520706C6163652E20204576616C756174696F6E206F6620726573756C74732C2061732077656C6C2061732064697363757373696F6E20616E642064697373656D696E6174696F6E206F662074686520776F726B206F66207468657365207468726565207465616D732C2077696C6C206265206469726563746C7920737570706F727465642062792049524455204F6666696365206F6620746865204469726563746F7220284F44292073746166662E20200A200A546865207374616666206F6620495244552077696C6C20636F6C6C61626F726174652077697468206D656D62657273206F66204344432070726F6772616D732061732077656C6C206173207468652062726F61646572207075626C6963206865616C746820636F6D6D756E69747920746F20646576656C6F7020696E6E6F76617469766520746563686E6F6C6F6769657320616E6420746563686E697175657320746F20706F7369746976656C7920696D70616374207075626C6963206865616C746820707261637469636520696E207468652073686F727420616E64206C6F6E672D7465726D2074696D65206672616D65732E20204F6E63652064656D6F6E7374726174656420746F206265206F662076616C75652C2061206E657720696E666F726D617469637320736F6C7574696F6E206F7220746563686E697175652077696C6C206265207472616E736974696F6E656420746F2074686520617070726F707269617465207075626C6963206865616C74682070726F6772616D20666F7220666F726D616C206465706C6F796D656E7420616E6420696D706C656D656E746174696F6E2E200A200A5468652049524455204F442077696C6C2070726F76696465206469766973696F6E2D6C6576656C206F766572736967687420616E6420737570706F727420696E2074686520666F6C6C6F77696E6720637269746963616C2061726561733A20204D616E6167656D656E742026204F7065726174696F6E732C20436F6D6D756E69636174696F6E732C20506F6C6963792026204F757472656163682C20536369656E63652C20616E642050726F6A656374202F2050726F6772616D204D616E6167656D656E742E20205370656369666963616C6C792C207468652049524455204F442077696C6C20636F6E7461696E2074686520666F6C6C6F77696E672066756E6374696F6E616C207469746C65733A20204469766973696F6E204469726563746F722C204469766973696F6E204465707574792C204D616E6167656D656E7420616E642050726F6772616D20416E616C797374202832292C20436F6D6D756E69636174696F6E73204C6561642C20506F6C69637920616E64204F75747265616368204C6561642C204469766973696F6E204173736F6369617465204469726563746F7220666F7220536369656E63652C2049542050726F6A656374204D616E6167656D656E74204C6561642E2020537570706F727420737461666620666F72207468657365206C6561647320696E636C7564653A20577269746572202F20456469746F722C205075626C6963204865616C746820416E616C7973742C2049542050726F6A656374204D616E616765722C20616E642061204865616C746820436F6D6D756E69636174696F6E73205370656369616C6973742E0A200A546865204952445520526573656172636820616E6420496E6E6F766174696F6E207465616D20285249292077696C6C2070726F7669646520746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C20746865204F6666696365206F66205375727665696C6C616E63652C2045706964656D696F6C6F67792C20616E64204C61626F7261746F727920536572766963657320284F53454C53292C204344432C20616E64206974732065787465726E616C20726573656172636820616E64207075626C6963206865616C746820706172746E6572732C20636F6E73756C746174696F6E2C2067756964616E63652C20737570706F72742C20616E6420696E736967687420696E746F2074686520757365206F66206E657720696E666F726D617469637320736F6C7574696F6E7320666F72207075626C6963206865616C74682070726163746963652E20205468726F7567682074686520737570706F7274206F6620746865204F4420616E64206F746865722074776F2049524455207465616D732C2074686520526573656172636820616E6420496E6E6F766174696F6E207465616D2077696C6C2062652061626C6520746F2073686172652076616C7561626C6520696E736967687473206761696E656420766961206D656574696E67732C2070726573656E746174696F6E732C206E6577736C6574746572732C20706565722D7265766965776564207075626C69636174696F6E732C20616E64207765622D6261736564206D656469612E202046756E6374696F6E616C207469746C65732077697468696E2074686520526573656172636820616E6420496E6E6F766174696F6E207465616D20696E636C7564653A202053656E696F72204865616C746820496E666F726D617469637320536369656E74697374202F205465616D204C6561642C20536F6369616C2044796E616D696373202F204265686176696F72616C20536369656E746973742C205365637572697479205370656369616C6973742C20536F66747761726520417263686974656374202F2044657369676E65722C204861726477617265202F20496E66726173747275637475726520526573656172636865722C2020616E6420616E2045706964656D696F6C6F67697374202F204865616C746820536369656E746973742E2020537570706F72742073746166662077696C6C20696E636C7564652066656C6C6F77732028692E652E2C2073747564656E7473292066726F6D2077697468696E2028652E672E2C20434443205075626C6963204865616C746820496E666F726D61746963732046656C6C6F7773292C20616E64206F75747369646520746865206167656E63792028652E672E2C2047656F7267696120496E73746974757465206F6620546563686E6F6C6F67792073747564656E7473292E0A200A5769746820646972656374696F6E2066726F6D20746865204F4420616E642074686520526573656172636820616E6420496E6E6F766174696F6E2028524929207465616D2C2074686520495244552050726F746F7479706520446576656C6F706D656E742028504429207465616D2077696C6C20636F6E7461696E20746865206E6563657373617279207265736F757263657320746F2072617069646C792063726561746520616E642076616C6964617465206879706F7468657365732067656E65726174656420627920746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C204F53454C532C204344432C20616E64206974732065787465726E616C20726573656172636820616E64207075626C6963206865616C746820706172746E6572732E202020436F6E74726163746F7220737570706F72742077696C6C20626520757365642C206173206E65656465642C20746F206175676D656E742074686520636F7265207465616D207768656E206D697373696E67207370656369616C697A656420736B696C6C73206172652072657175697265642C206F72206966207261706964207363616C696E6720726571756972656D656E7473206265636F6D65206170706172656E742064756520746F2070726F6A656374206C6F616420616E642F6F722074696D6520636F6E73747261696E74732E202054686973206164646974696F6E616C20737570706F72742073686F756C642070726F7669646520746865206361706162696C69747920746F2072756E20616E206164646974696F6E616C203220746F20332070726F6A6563747320636F6E63757272656E746C792E20202041732061206D616A6F72697479206F66207468652070726F746F74797065732077696C6C20626520736F6674776172652D62617365642C2074686520636F7265207465616D2077696C6C20626520736F66747761726520646576656C6F706D656E74206F7269656E7465642E202045616368204654452073686F756C642062652063617061626C65206F6620737570706F7274696E672074776F2070726F6A6563747320636F6E63757272656E746C792E202046756E6374696F6E616C207469746C65732077697468696E207468652050726F746F7479706520446576656C6F706D656E74207465616D20696E636C7564653A20204954205370656369616C6973742028446576656C6F706D656E74204D616E61676572202F205465616D204C656164292C20536F66747761726520456E67696E656572202835292C205573657220496E7465726661636520456E67696E656572202832292C205175616C697479204173737572616E636520456E67696E6565722C2044617461626173652041646D696E6973747261746F722C20616E6420446F63756D656E746174696F6E205370656369616C697374732028577269746572202F20456469746F7229202832292E0A200A5468652049524455204C61626F7261746F727920496E667261737472756374757265202620537570706F727420284C495329207465616D2077696C6C2070726F7669646520746865205075626C6963204865616C746820496E666F726D617469637320616E6420546563686E6F6C6F67792050726F6772616D204F66666963652C204F53454C5320616E642043444320616E206F7074696D616C2028692E652E2C20666C657869626C6520616E64207363616C61626C652920656E7669726F6E6D656E7420666F722074686520726170696420646576656C6F706D656E74206F662070726F746F7479706520736F6C7574696F6E7320666F722074657374696E6720616E64206576616C756174696F6E20707572706F7365732E2020476976656E206974732064657369676E2C2074686520496E666F726D617469637320522644204C61622C20737570706F72746564206279207468652049524455204C61626F7261746F727920496E66726173747275637475726520616E6420537570706F727420284C495329207465616D2C2077696C6C2066756E6374696F6E206173207265736F75726365206469726563746C7920617661696C61626C6520746F2074686520656E74697265206167656E63792E202046756E6374696F6E616C207469746C65732077697468696E20746865204C61626F7261746F727920496E667261737472756374757265202620537570706F727420284C495329207465616D20696E636C7564653A20204954205370656369616C69737420284F7065726174696F6E73204D616E61676572292C2053797374656D2041646D696E6973747261746F722C204E6574776F726B20456E67696E6565722C20486172647761726520456E67696E6565722C20616E6420536563757269747920456E67696E6565722E20204966206E65656465642C2074686520636F7265207465616D2063616E206265206175676D656E7465642076696120636F6E74726163746F7220737570706F72742E',X'7574662D38'),
(6,X'54686520522644204C61622070617274696369706174657320696E206D616E7920726573656172636820616374697669746965732E0A0A576520706C616E206F6E2064656C69766572696E6720322070726573656E746174696F6E7320616E64203120706F7374657220617420746865205B687474703A2F2F706869323031312E616D69612E6F72672F203230313120537072696E6720414D4941205048495D2073657373696F6E3A0A2A466F726D756C6174696E6720616E6420526566696E696E672061205075626C6963204865616C746820496E666F726D6174696373205374727563747572656420546563686E6F6C6F6779204576616C756174696F6E20546F6F6C0A2A44697265637420457870657269656E63652077697468204F70656E20536F7572636520696E205075626C6963204865616C746820496E666F726D61746963730A2A5669727475616C697A656420496E666F726D6174696373204C616220666F72205075626C6963204865616C746820496E666F726D61746963732052657365617263680A0A5765206861766520616C736F207375626D6974746564206D756C7469706C652061627374726163747320746F20746865205B687474703A2F2F6364632E676F762F706869636F6E666572656E63652F2032303131205075626C6963204865616C746820496E666F726D617469637320436F6E666572656E63655D20616E642077696C6C207570646174652074686973207061676520696620616E79206172652061636365707465642E',X'7574662D38'),
(7,X'4173204C616220706172746E65727320616C6C6F772075732C2077652077696C6C2073686172652064657461696C73206F662063757272656E742C20706C616E6E656420616E6420636F6D706C6574656420656E676167656D656E74732074686174207573656420746865206C616220616E6420686F7720746865792062656E6566697465642066726F6D207573696E6720746865204C6162206173206120726573656172636820746F6F6C2E',X'7574662D38'),
(8,X'506172746963756C6172206E657773206974656D73206F72206576656E7473206F6620696E746572657374732077696C6C2062652073686172656420686572652E',X'7574662D38'),
(9,X'5468697320706167652077696C6C20636F6E7461696E20696E666F726D6174696F6E206F6E20636F6D6D756E69636174696F6E73206D6174657269616C20616E6420696E746572616374696F6E7320746865204C61622068617320776974682074686520696E666F726D617469637320726573656172636820636F6D6D756E6974792E0A0A522644204C6162205374616B65686F6C6465727320616E64205061727469636970616E747320696E636C7564653A0A2A4344432050484954504F0A2A43444320504853504F',X'7574662D38'),
(10,X'5468697320706167652077696C6C20636F6E7461696E20696E666F726D6174696F6E206F6E20636F6D6D756E69636174696F6E73206D6174657269616C20616E6420696E746572616374696F6E7320746865204C61622068617320776974682074686520696E666F726D617469637320726573656172636820636F6D6D756E6974792E0A0A3D3D522644204C6162205374616B65686F6C6465727320616E64205061727469636970616E747320696E636C7564653A3D3D0A2A4344432050484954504F0A2A43444320504853504F',X'7574662D38'),
(11,X'54686973207061676520636F6E7461696E7320696E666F726D6174696F6E2061626F7574207468652061726368697465637475726520616E6420736F66747761726520757365642077697468696E20746865204C61622E0A0A3D3D50726F6A6563742042657374205072616374696365733D3D0A546869732070616765206465736372696265732074686520626573742070726163746963657320666F7220686F772052445520696E7465726E616C2070726F6A656374732061726520646576656C6F7065642C2064656D6F65642028616E64206576656E7475616C6C792070726F6D6F746564292E0A200A5468697320636F6E63657074206973206261736564206F6E20746865207468656F72792074686174206E6F206F6E65206C696B657320746F20646F63756D656E7420616E642074686174207765206E6576657220686176652074696D6520666F7220646F63756D656E746174696F6E2E2054686973207468656F72792069732076616C69646174656420627920746865206C61636B206F6620646F63756D656E746174696F6E20666F722074686520696E7465726E616C2070726F6A65637473207765277665206265656E207468726F7567682028576F726470726573732064617368626F6172642C2052504D532C20546F7847756964652C204D4D575244656D6F2C204D61704170702C206574632E292E2054686973206973206F6B2C2074686973206973206E61747572616C207769746820736D616C6C207465616D732077686F2068617665206C6F7473206F662070726F6A656374732E2054686520707572706F7365206F6620746865206265737420707261637469636520697320746F206964656E7469667920746865206D696E696D756C20657373656E7469616C20646F63756D656E746174696F6E20746861743A0A3129204C657473207573206B6E6F772077686174207765206861766520616E642061726520776F726B696E67206F6E0A322920506F696E747320746F2061637475616C20776F726B207468617420776520646F20666F7220646F63756D656E746174696F6E2E2028692E652E20736F7572636520636F646520636F6E7461696E7320636F6D6D656E747320776869636820697320746865207265616C20646F63756D656E746174696F6E290A200A3D3D3D446F63756D656E746174696F6E3D3D3D0A456163682050726F6A6563742073686F756C642063726561746520612070616765206F6E20746869732077696B692077697468206D696E696D616C20646F63756D656E746174696F6E2E204E6F206D6F7265207468616E203330206D696E757465732073686F756C64206265207370656E74206372656174696E672074686973207061676520616E642069742073686F756C64206265206C696768746C792075706461746564206173206E656365737361727920756E74696C207468652070726F6A65637420697320636F6D706C6574652E20496620796F7520646F6E277420686176652074696D6520746F2063726561746520616E6420757064617465207468697320706167652C20796F7527726520646F696E672069742077726F6E672E2054686520676F616C206F6620746869732070616765206973206E6F7420746F20686176652070657266656374206F72206576656E20676F6F6420646F63756D656E746174696F6E2C2062757420746F20686176652075736566756C20646F63756D656E746174696F6E2E0A200A496E697469616C2074656D706C61746520666F722074686520706167653A0A3129204E616D650A32292053686F7274206465736372697074696F6E20287768617420646F20796F752077616E7420746F20646F2077697468207468652070726F6A656374290A332920536F7572636520636F6465206C6F636174696F6E2028706F696E7420746F20746865207265706F7369746F7279290A342920486F7720746F206275696C64202620636F6E6669677572652E20466F7220694F53206170707320746869732069732073696D706C652D636865636B206F75742070726F6A6563742C20636C69636B20224275696C6420262052756E222D20666F72206F7468657273207468657265206D617920626520636F6E66696775726174696F6E2073746570732028652E672E2C2077696B6920726571756972657320636F6E66696775726174696F6E206F6E20746865206462290A352920506F696E7420746F206F74686572207265736F7572636573202F2070726F6A65637473207468617420746869732070726F6A65637420646570656E6473206F6E2E20496620796F752075736520616E206578697374696E67206462206F72207765622073657276696365206C69737420697420686572652E0A3629204F7074696F6E616C20646F63756D656E746174696F6E2D20616464206F6E20616E7920646F63756D656E746174696F6E20796F75206D61792070726F6475636520647572696E6720746865206372656174696F6E206F6620746869732070726F6A6563742E205468697320636F756C642062652070686F746F73206F66207768697465626F617264732C2075736520636173652077726974657570732C206469616772616D732C20696D616765732E2041646420776861746576657220796F75207573656420647572696E6720746865206372656174696F6E206F66207468652070726F636573732E0A200A5468617427732069742E20546865205244552070726F64756365732061206C6F74206F66206F75747075742C207468696E6B206F6620206372656174696E6720746865736520706167657320616E6420636F6C6C656374696E67207468656D20696E746F20616E20616374697669747920706F7274666F6C696F206173207468652077616B65206F66206F757220556E69742E205468697320626573742070726163746963652068656C707320757320756E6465727374616E64207768617420776520646F2C2064656D6F6E7374726174657320746F2070726F6772616D7320776861742077652063616E20646F2C20616E64206576656E7475616C6C792068656C7073206F7468657273206C65766572616765206F757220776F726B20696E746F207075626C6963206865616C746820696E666F726D61746963732E0A200A3D3D3D486F7374696E673A3D3D3D0A456163682070726F6A6563742073686F756C6420626520646576656C6F706564206F6E206120564D207768656E6576657220706F737369626C6520284D6163732063616E27742063757272656E746C79206265207669727475616C697A65642C20736F207468617427732074686520657863657074696F6E292E0A466F7220616E792070726F6A656374732074686174206861766520746F2062652065787465726E616C6C792061636365737369626C652C2061203320737461676520564D207365742073686F756C6420626520757365643A20446576656C6F706D656E74496E7467726174696F6E2C2053746167696E672C2044656D6F6E7374726174696F6E2E0A44656D6F6E7374726174696F6E20697320616E2065787465726E616C6C792061636365737369626C6520564D20746861742075736572732077696C6C2061636365737320746F20757365207468652070726F6A6563742773206170706C69636174696F6E2873292E0A53746167696E672069732061207265706C696361206F66207468652044656D6F20564D20616E64206973207573656420666F7220707265706172696E6720616E792072656C65617365732074686174206E65656420746F2062652070757368656420746F2044656D6F6E7374726174696F6E0A446576656C6F706D656E74496E746567726174696F6E20697320666F722074657374696E67206F757420646576656C6F706D656E7420636F6465206265666F726520697420697320617070726F76656420746F206D6F766520746F2070726F64756374696F6E2E0A436F646520736574732073686F756C64206E6F74206265206469726563746C7920636F706965642066726F6D20446576496E742D3E53746167696E67206E6F722053746167696E672D3E50726F64756374696F6E2C206275742073686F756C6420626520636865636B656420696E2F6F7574206F66206120736F7572636520636F6465207265706F7369746F72792E205468697320697320746F206B6565702074686520656E7669726F6E6D656E742022636C65616E2220616E6420616C6C20636F6E66696775726174696F6E20737465707320646F63756D656E7465642E0A456163682070726F6A6563742073686F756C642068617665206120636F6E66696775726174696F6E2070616765207468617420646F63756D656E7473207768617465766572206973206E656564656420746F206275696C642C20636F6E66696775726520616E64206465706C6F7920746F20656E7669726F6E6D656E74732E204175746F6D617465206275696C6473206173206D75636820617320726561736F6E61626C652E0A200A3D3D3D536F7572636520436F6465205265706F7369746F726965733A3D3D3D0A557365207468652053434D207265706F7369746F727920746F2076657273696F6E20796F757220636F64652E2043757272656E746C7920476F6F676C6520436F64652069732073657420757020666F722053564E2C20627574206576656E7475616C6C79207765276C6C2070726F6261626C7920636F6E7665727420746F204D657263757269616C2E0A41646420796F75722070726F6A65637420746F2053434D206F6E636520697427732061637469766520656E6F75676820666F7220736F6D656F6E6520656C736520746F207573652E2044726F70626F7820697320636F6E76656E69656E74206275742068617320616C6C2074686520647261776261636B73206F66202273686172656420666F6C6465722053434D222E0A436865636B20696E206368616E676573206173206D75636820617320697320726561736F6E61626C6520616E64206174206C65617374206265666F7265206D616B696E6720616E79207369676E69666963616E74206368616E67657320746F207468652070726F6A6563742E0A446F6E277420636865636B20696E20612070726F6A656374207468617420646F65736E2774206275696C642C207465737420616E642072756E2E0A55736520636F6D6D656E7473207768656E20636865636B696E6720696E2E205479706963616C6C79206F6E6C7920312D322070656F706C6520776F726B206F6E20612070726F6A6563742C20627574206F757220636F646520636F756C642062652075736566756C20666F722061207265666572656E636520666F722070726F6772616D7320616E6420706172746E6572732E20436F6D6D656E74732068656C702070656F706C6520756E6465727374616E642077686174206368616E67656420616E64207768792E0A200A3D3D3D436F64696E67205374796C6573202F204C616E677561676520426573742D5072616374696365733A3D3D3D0A4E6F742065737461626C6973686564207965742E20427574206174206C6561737420626520636F6E73697374656E742077697468696E20612070726F6A6563742E0A446F6E27742073617665207461627320696E20736F757263652066696C65732C20757365207370616365732E0A41646420696E207265666572656E63657320746F207374756666206C696B65204849472C206574632E0A0A3D3D4469616772616D733D3D',X'7574662D38'),
(12,X'54686973207061676520636F6E7461696E7320696E666F726D6174696F6E2061626F7574207468652061726368697465637475726520616E6420736F66747761726520757365642077697468696E20746865204C61622E0A0A3D3D50726F6A6563742042657374205072616374696365733D3D0A546869732070616765206465736372696265732074686520626573742070726163746963657320666F7220686F772052445520696E7465726E616C2070726F6A656374732061726520646576656C6F7065642C2064656D6F65642028616E64206576656E7475616C6C792070726F6D6F746564292E0A200A5468697320636F6E63657074206973206261736564206F6E20746865207468656F72792074686174206E6F206F6E65206C696B657320746F20646F63756D656E7420616E642074686174207765206E6576657220686176652074696D6520666F7220646F63756D656E746174696F6E2E2054686973207468656F72792069732076616C69646174656420627920746865206C61636B206F6620646F63756D656E746174696F6E20666F722074686520696E7465726E616C2070726F6A65637473207765277665206265656E207468726F7567682028576F726470726573732064617368626F6172642C2052504D532C20546F7847756964652C204D4D575244656D6F2C204D61704170702C206574632E292E2054686973206973206F6B2C2074686973206973206E61747572616C207769746820736D616C6C207465616D732077686F2068617665206C6F7473206F662070726F6A656374732E2054686520707572706F7365206F6620746865206265737420707261637469636520697320746F206964656E7469667920746865206D696E696D756C20657373656E7469616C20646F63756D656E746174696F6E20746861743A0A3129204C657473207573206B6E6F772077686174207765206861766520616E642061726520776F726B696E67206F6E0A322920506F696E747320746F2061637475616C20776F726B207468617420776520646F20666F7220646F63756D656E746174696F6E2E2028692E652E20736F7572636520636F646520636F6E7461696E7320636F6D6D656E747320776869636820697320746865207265616C20646F63756D656E746174696F6E290A200A3D3D3D446F63756D656E746174696F6E3D3D3D0A456163682050726F6A6563742073686F756C642063726561746520612070616765206F6E20746869732077696B692077697468206D696E696D616C20646F63756D656E746174696F6E2E204E6F206D6F7265207468616E203330206D696E757465732073686F756C64206265207370656E74206372656174696E672074686973207061676520616E642069742073686F756C64206265206C696768746C792075706461746564206173206E656365737361727920756E74696C207468652070726F6A65637420697320636F6D706C6574652E20496620796F7520646F6E277420686176652074696D6520746F2063726561746520616E6420757064617465207468697320706167652C20796F7527726520646F696E672069742077726F6E672E2054686520676F616C206F6620746869732070616765206973206E6F7420746F20686176652070657266656374206F72206576656E20676F6F6420646F63756D656E746174696F6E2C2062757420746F20686176652075736566756C20646F63756D656E746174696F6E2E0A200A496E697469616C2074656D706C61746520666F722074686520706167653A0A3129204E616D650A32292053686F7274206465736372697074696F6E20287768617420646F20796F752077616E7420746F20646F2077697468207468652070726F6A656374290A332920536F7572636520636F6465206C6F636174696F6E2028706F696E7420746F20746865207265706F7369746F7279290A342920486F7720746F206275696C64202620636F6E6669677572652E20466F7220694F53206170707320746869732069732073696D706C652D636865636B206F75742070726F6A6563742C20636C69636B20224275696C6420262052756E222D20666F72206F7468657273207468657265206D617920626520636F6E66696775726174696F6E2073746570732028652E672E2C2077696B6920726571756972657320636F6E66696775726174696F6E206F6E20746865206462290A352920506F696E7420746F206F74686572207265736F7572636573202F2070726F6A65637473207468617420746869732070726F6A65637420646570656E6473206F6E2E20496620796F752075736520616E206578697374696E67206462206F72207765622073657276696365206C69737420697420686572652E0A3629204F7074696F6E616C20646F63756D656E746174696F6E2D20616464206F6E20616E7920646F63756D656E746174696F6E20796F75206D61792070726F6475636520647572696E6720746865206372656174696F6E206F6620746869732070726F6A6563742E205468697320636F756C642062652070686F746F73206F66207768697465626F617264732C2075736520636173652077726974657570732C206469616772616D732C20696D616765732E2041646420776861746576657220796F75207573656420647572696E6720746865206372656174696F6E206F66207468652070726F636573732E0A200A5468617427732069742E20546865205244552070726F64756365732061206C6F74206F66206F75747075742C207468696E6B206F6620206372656174696E6720746865736520706167657320616E6420636F6C6C656374696E67207468656D20696E746F20616E20616374697669747920706F7274666F6C696F206173207468652077616B65206F66206F757220556E69742E205468697320626573742070726163746963652068656C707320757320756E6465727374616E64207768617420776520646F2C2064656D6F6E7374726174657320746F2070726F6772616D7320776861742077652063616E20646F2C20616E64206576656E7475616C6C792068656C7073206F7468657273206C65766572616765206F757220776F726B20696E746F207075626C6963206865616C746820696E666F726D61746963732E0A200A3D3D3D486F7374696E673A3D3D3D0A456163682070726F6A6563742073686F756C6420626520646576656C6F706564206F6E206120564D207768656E6576657220706F737369626C6520284D6163732063616E27742063757272656E746C79206265207669727475616C697A65642C20736F207468617427732074686520657863657074696F6E292E0A466F7220616E792070726F6A656374732074686174206861766520746F2062652065787465726E616C6C792061636365737369626C652C2061203320737461676520564D207365742073686F756C6420626520757365643A20446576656C6F706D656E74496E7467726174696F6E2C2053746167696E672C2044656D6F6E7374726174696F6E2E0A44656D6F6E7374726174696F6E20697320616E2065787465726E616C6C792061636365737369626C6520564D20746861742075736572732077696C6C2061636365737320746F20757365207468652070726F6A6563742773206170706C69636174696F6E2873292E0A53746167696E672069732061207265706C696361206F66207468652044656D6F20564D20616E64206973207573656420666F7220707265706172696E6720616E792072656C65617365732074686174206E65656420746F2062652070757368656420746F2044656D6F6E7374726174696F6E0A446576656C6F706D656E74496E746567726174696F6E20697320666F722074657374696E67206F757420646576656C6F706D656E7420636F6465206265666F726520697420697320617070726F76656420746F206D6F766520746F2070726F64756374696F6E2E0A436F646520736574732073686F756C64206E6F74206265206469726563746C7920636F706965642066726F6D20446576496E742D3E53746167696E67206E6F722053746167696E672D3E50726F64756374696F6E2C206275742073686F756C6420626520636865636B656420696E2F6F7574206F66206120736F7572636520636F6465207265706F7369746F72792E205468697320697320746F206B6565702074686520656E7669726F6E6D656E742022636C65616E2220616E6420616C6C20636F6E66696775726174696F6E20737465707320646F63756D656E7465642E0A456163682070726F6A6563742073686F756C642068617665206120636F6E66696775726174696F6E2070616765207468617420646F63756D656E7473207768617465766572206973206E656564656420746F206275696C642C20636F6E66696775726520616E64206465706C6F7920746F20656E7669726F6E6D656E74732E204175746F6D617465206275696C6473206173206D75636820617320726561736F6E61626C652E0A200A3D3D3D536F7572636520436F6465205265706F7369746F726965733A3D3D3D0A557365207468652053434D207265706F7369746F727920746F2076657273696F6E20796F757220636F64652E2043757272656E746C7920476F6F676C6520436F64652069732073657420757020666F722053564E2C20627574206576656E7475616C6C79207765276C6C2070726F6261626C7920636F6E7665727420746F204D657263757269616C2E0A41646420796F75722070726F6A65637420746F2053434D206F6E636520697427732061637469766520656E6F75676820666F7220736F6D656F6E6520656C736520746F207573652E2044726F70626F7820697320636F6E76656E69656E74206275742068617320616C6C2074686520647261776261636B73206F66202273686172656420666F6C6465722053434D222E0A436865636B20696E206368616E676573206173206D75636820617320697320726561736F6E61626C6520616E64206174206C65617374206265666F7265206D616B696E6720616E79207369676E69666963616E74206368616E67657320746F207468652070726F6A6563742E0A446F6E277420636865636B20696E20612070726F6A656374207468617420646F65736E2774206275696C642C207465737420616E642072756E2E0A55736520636F6D6D656E7473207768656E20636865636B696E6720696E2E205479706963616C6C79206F6E6C7920312D322070656F706C6520776F726B206F6E20612070726F6A6563742C20627574206F757220636F646520636F756C642062652075736566756C20666F722061207265666572656E636520666F722070726F6772616D7320616E6420706172746E6572732E20436F6D6D656E74732068656C702070656F706C6520756E6465727374616E642077686174206368616E67656420616E64207768792E0A200A3D3D3D436F64696E67205374796C6573202F204C616E677561676520426573742D5072616374696365733A3D3D3D0A4E6F742065737461626C6973686564207965742E20427574206174206C6561737420626520636F6E73697374656E742077697468696E20612070726F6A6563742E0A446F6E27742073617665207461627320696E20736F757263652066696C65732C20757365207370616365732E0A41646420696E207265666572656E63657320746F207374756666206C696B65204849472C206574632E0A0A3D3D4469616772616D733D3D0A0A3D3D55736566756C204C696E6B733D3D0A5B58436F6465546970735D0A5B54657374466C696768745D',X'7574662D38'),
(13,X'54686973207061676520636F6E7461696E7320696E666F726D6174696F6E2061626F7574207468652061726368697465637475726520616E6420736F66747761726520757365642077697468696E20746865204C61622E0A0A3D3D50726F6A6563742042657374205072616374696365733D3D0A546869732070616765206465736372696265732074686520626573742070726163746963657320666F7220686F772052445520696E7465726E616C2070726F6A656374732061726520646576656C6F7065642C2064656D6F65642028616E64206576656E7475616C6C792070726F6D6F746564292E0A200A5468697320636F6E63657074206973206261736564206F6E20746865207468656F72792074686174206E6F206F6E65206C696B657320746F20646F63756D656E7420616E642074686174207765206E6576657220686176652074696D6520666F7220646F63756D656E746174696F6E2E2054686973207468656F72792069732076616C69646174656420627920746865206C61636B206F6620646F63756D656E746174696F6E20666F722074686520696E7465726E616C2070726F6A65637473207765277665206265656E207468726F7567682028576F726470726573732064617368626F6172642C2052504D532C20546F7847756964652C204D4D575244656D6F2C204D61704170702C206574632E292E2054686973206973206F6B2C2074686973206973206E61747572616C207769746820736D616C6C207465616D732077686F2068617665206C6F7473206F662070726F6A656374732E2054686520707572706F7365206F6620746865206265737420707261637469636520697320746F206964656E7469667920746865206D696E696D756C20657373656E7469616C20646F63756D656E746174696F6E20746861743A0A3129204C657473207573206B6E6F772077686174207765206861766520616E642061726520776F726B696E67206F6E0A322920506F696E747320746F2061637475616C20776F726B207468617420776520646F20666F7220646F63756D656E746174696F6E2E2028692E652E20736F7572636520636F646520636F6E7461696E7320636F6D6D656E747320776869636820697320746865207265616C20646F63756D656E746174696F6E290A200A3D3D3D446F63756D656E746174696F6E3D3D3D0A456163682050726F6A6563742073686F756C642063726561746520612070616765206F6E20746869732077696B692077697468206D696E696D616C20646F63756D656E746174696F6E2E204E6F206D6F7265207468616E203330206D696E757465732073686F756C64206265207370656E74206372656174696E672074686973207061676520616E642069742073686F756C64206265206C696768746C792075706461746564206173206E656365737361727920756E74696C207468652070726F6A65637420697320636F6D706C6574652E20496620796F7520646F6E277420686176652074696D6520746F2063726561746520616E6420757064617465207468697320706167652C20796F7527726520646F696E672069742077726F6E672E2054686520676F616C206F6620746869732070616765206973206E6F7420746F20686176652070657266656374206F72206576656E20676F6F6420646F63756D656E746174696F6E2C2062757420746F20686176652075736566756C20646F63756D656E746174696F6E2E0A200A496E697469616C2074656D706C61746520666F722074686520706167653A0A3129204E616D650A32292053686F7274206465736372697074696F6E20287768617420646F20796F752077616E7420746F20646F2077697468207468652070726F6A656374290A332920536F7572636520636F6465206C6F636174696F6E2028706F696E7420746F20746865207265706F7369746F7279290A342920486F7720746F206275696C64202620636F6E6669677572652E20466F7220694F53206170707320746869732069732073696D706C652D636865636B206F75742070726F6A6563742C20636C69636B20224275696C6420262052756E222D20666F72206F7468657273207468657265206D617920626520636F6E66696775726174696F6E2073746570732028652E672E2C2077696B6920726571756972657320636F6E66696775726174696F6E206F6E20746865206462290A352920506F696E7420746F206F74686572207265736F7572636573202F2070726F6A65637473207468617420746869732070726F6A65637420646570656E6473206F6E2E20496620796F752075736520616E206578697374696E67206462206F72207765622073657276696365206C69737420697420686572652E0A3629204F7074696F6E616C20646F63756D656E746174696F6E2D20616464206F6E20616E7920646F63756D656E746174696F6E20796F75206D61792070726F6475636520647572696E6720746865206372656174696F6E206F6620746869732070726F6A6563742E205468697320636F756C642062652070686F746F73206F66207768697465626F617264732C2075736520636173652077726974657570732C206469616772616D732C20696D616765732E2041646420776861746576657220796F75207573656420647572696E6720746865206372656174696F6E206F66207468652070726F636573732E0A200A5468617427732069742E20546865205244552070726F64756365732061206C6F74206F66206F75747075742C207468696E6B206F6620206372656174696E6720746865736520706167657320616E6420636F6C6C656374696E67207468656D20696E746F20616E20616374697669747920706F7274666F6C696F206173207468652077616B65206F66206F757220556E69742E205468697320626573742070726163746963652068656C707320757320756E6465727374616E64207768617420776520646F2C2064656D6F6E7374726174657320746F2070726F6772616D7320776861742077652063616E20646F2C20616E64206576656E7475616C6C792068656C7073206F7468657273206C65766572616765206F757220776F726B20696E746F207075626C6963206865616C746820696E666F726D61746963732E0A200A3D3D3D486F7374696E673A3D3D3D0A456163682070726F6A6563742073686F756C6420626520646576656C6F706564206F6E206120564D207768656E6576657220706F737369626C6520284D6163732063616E27742063757272656E746C79206265207669727475616C697A65642C20736F207468617427732074686520657863657074696F6E292E0A466F7220616E792070726F6A656374732074686174206861766520746F2062652065787465726E616C6C792061636365737369626C652C2061203320737461676520564D207365742073686F756C6420626520757365643A20446576656C6F706D656E74496E7467726174696F6E2C2053746167696E672C2044656D6F6E7374726174696F6E2E0A44656D6F6E7374726174696F6E20697320616E2065787465726E616C6C792061636365737369626C6520564D20746861742075736572732077696C6C2061636365737320746F20757365207468652070726F6A6563742773206170706C69636174696F6E2873292E0A53746167696E672069732061207265706C696361206F66207468652044656D6F20564D20616E64206973207573656420666F7220707265706172696E6720616E792072656C65617365732074686174206E65656420746F2062652070757368656420746F2044656D6F6E7374726174696F6E0A446576656C6F706D656E74496E746567726174696F6E20697320666F722074657374696E67206F757420646576656C6F706D656E7420636F6465206265666F726520697420697320617070726F76656420746F206D6F766520746F2070726F64756374696F6E2E0A436F646520736574732073686F756C64206E6F74206265206469726563746C7920636F706965642066726F6D20446576496E742D3E53746167696E67206E6F722053746167696E672D3E50726F64756374696F6E2C206275742073686F756C6420626520636865636B656420696E2F6F7574206F66206120736F7572636520636F6465207265706F7369746F72792E205468697320697320746F206B6565702074686520656E7669726F6E6D656E742022636C65616E2220616E6420616C6C20636F6E66696775726174696F6E20737465707320646F63756D656E7465642E0A456163682070726F6A6563742073686F756C642068617665206120636F6E66696775726174696F6E2070616765207468617420646F63756D656E7473207768617465766572206973206E656564656420746F206275696C642C20636F6E66696775726520616E64206465706C6F7920746F20656E7669726F6E6D656E74732E204175746F6D617465206275696C6473206173206D75636820617320726561736F6E61626C652E0A200A3D3D3D536F7572636520436F6465205265706F7369746F726965733A3D3D3D0A557365207468652053434D207265706F7369746F727920746F2076657273696F6E20796F757220636F64652E2043757272656E746C7920476F6F676C6520436F64652069732073657420757020666F722053564E2C20627574206576656E7475616C6C79207765276C6C2070726F6261626C7920636F6E7665727420746F204D657263757269616C2E0A41646420796F75722070726F6A65637420746F2053434D206F6E636520697427732061637469766520656E6F75676820666F7220736F6D656F6E6520656C736520746F207573652E2044726F70626F7820697320636F6E76656E69656E74206275742068617320616C6C2074686520647261776261636B73206F66202273686172656420666F6C6465722053434D222E0A436865636B20696E206368616E676573206173206D75636820617320697320726561736F6E61626C6520616E64206174206C65617374206265666F7265206D616B696E6720616E79207369676E69666963616E74206368616E67657320746F207468652070726F6A6563742E0A446F6E277420636865636B20696E20612070726F6A656374207468617420646F65736E2774206275696C642C207465737420616E642072756E2E0A55736520636F6D6D656E7473207768656E20636865636B696E6720696E2E205479706963616C6C79206F6E6C7920312D322070656F706C6520776F726B206F6E20612070726F6A6563742C20627574206F757220636F646520636F756C642062652075736566756C20666F722061207265666572656E636520666F722070726F6772616D7320616E6420706172746E6572732E20436F6D6D656E74732068656C702070656F706C6520756E6465727374616E642077686174206368616E67656420616E64207768792E0A200A3D3D3D436F64696E67205374796C6573202F204C616E677561676520426573742D5072616374696365733A3D3D3D0A4E6F742065737461626C6973686564207965742E20427574206174206C6561737420626520636F6E73697374656E742077697468696E20612070726F6A6563742E0A446F6E27742073617665207461627320696E20736F757263652066696C65732C20757365207370616365732E0A41646420696E207265666572656E63657320746F207374756666206C696B65204849472C206574632E0A0A3D3D4469616772616D733D3D0A0A3D3D55736566756C204C696E6B733D3D0A5B5B58436F6465546970735D5D0A5B5B54657374466C696768745D5D',X'7574662D38'),
(14,X'54686973207061676520636F6E7461696E7320696E666F726D6174696F6E2061626F7574207468652061726368697465637475726520616E6420736F66747761726520757365642077697468696E20746865204C61622E0A0A3D3D50726F6A6563742042657374205072616374696365733D3D0A546869732070616765206465736372696265732074686520626573742070726163746963657320666F7220686F772052445520696E7465726E616C2070726F6A656374732061726520646576656C6F7065642C2064656D6F65642028616E64206576656E7475616C6C792070726F6D6F746564292E0A200A5468697320636F6E63657074206973206261736564206F6E20746865207468656F72792074686174206E6F206F6E65206C696B657320746F20646F63756D656E7420616E642074686174207765206E6576657220686176652074696D6520666F7220646F63756D656E746174696F6E2E2054686973207468656F72792069732076616C69646174656420627920746865206C61636B206F6620646F63756D656E746174696F6E20666F722074686520696E7465726E616C2070726F6A65637473207765277665206265656E207468726F7567682028576F726470726573732064617368626F6172642C2052504D532C20546F7847756964652C204D4D575244656D6F2C204D61704170702C206574632E292E2054686973206973206F6B2C2074686973206973206E61747572616C207769746820736D616C6C207465616D732077686F2068617665206C6F7473206F662070726F6A656374732E2054686520707572706F7365206F6620746865206265737420707261637469636520697320746F206964656E7469667920746865206D696E696D756C20657373656E7469616C20646F63756D656E746174696F6E20746861743A0A3129204C657473207573206B6E6F772077686174207765206861766520616E642061726520776F726B696E67206F6E0A322920506F696E747320746F2061637475616C20776F726B207468617420776520646F20666F7220646F63756D656E746174696F6E2E2028692E652E20736F7572636520636F646520636F6E7461696E7320636F6D6D656E747320776869636820697320746865207265616C20646F63756D656E746174696F6E290A200A3D3D3D446F63756D656E746174696F6E3D3D3D0A456163682050726F6A6563742073686F756C642063726561746520612070616765206F6E20746869732077696B692077697468206D696E696D616C20646F63756D656E746174696F6E2E204E6F206D6F7265207468616E203330206D696E757465732073686F756C64206265207370656E74206372656174696E672074686973207061676520616E642069742073686F756C64206265206C696768746C792075706461746564206173206E656365737361727920756E74696C207468652070726F6A65637420697320636F6D706C6574652E20496620796F7520646F6E277420686176652074696D6520746F2063726561746520616E6420757064617465207468697320706167652C20796F7527726520646F696E672069742077726F6E672E2054686520676F616C206F6620746869732070616765206973206E6F7420746F20686176652070657266656374206F72206576656E20676F6F6420646F63756D656E746174696F6E2C2062757420746F20686176652075736566756C20646F63756D656E746174696F6E2E0A200A496E697469616C2074656D706C61746520666F722074686520706167653A0A3129204E616D650A32292053686F7274206465736372697074696F6E20287768617420646F20796F752077616E7420746F20646F2077697468207468652070726F6A656374290A332920536F7572636520636F6465206C6F636174696F6E2028706F696E7420746F20746865207265706F7369746F7279290A342920486F7720746F206275696C64202620636F6E6669677572652E20466F7220694F53206170707320746869732069732073696D706C652D636865636B206F75742070726F6A6563742C20636C69636B20224275696C6420262052756E222D20666F72206F7468657273207468657265206D617920626520636F6E66696775726174696F6E2073746570732028652E672E2C2077696B6920726571756972657320636F6E66696775726174696F6E206F6E20746865206462290A352920506F696E7420746F206F74686572207265736F7572636573202F2070726F6A65637473207468617420746869732070726F6A65637420646570656E6473206F6E2E20496620796F752075736520616E206578697374696E67206462206F72207765622073657276696365206C69737420697420686572652E0A3629204F7074696F6E616C20646F63756D656E746174696F6E2D20616464206F6E20616E7920646F63756D656E746174696F6E20796F75206D61792070726F6475636520647572696E6720746865206372656174696F6E206F6620746869732070726F6A6563742E205468697320636F756C642062652070686F746F73206F66207768697465626F617264732C2075736520636173652077726974657570732C206469616772616D732C20696D616765732E2041646420776861746576657220796F75207573656420647572696E6720746865206372656174696F6E206F66207468652070726F636573732E0A200A5468617427732069742E20546865205244552070726F64756365732061206C6F74206F66206F75747075742C207468696E6B206F6620206372656174696E6720746865736520706167657320616E6420636F6C6C656374696E67207468656D20696E746F20616E20616374697669747920706F7274666F6C696F206173207468652077616B65206F66206F757220556E69742E205468697320626573742070726163746963652068656C707320757320756E6465727374616E64207768617420776520646F2C2064656D6F6E7374726174657320746F2070726F6772616D7320776861742077652063616E20646F2C20616E64206576656E7475616C6C792068656C7073206F7468657273206C65766572616765206F757220776F726B20696E746F207075626C6963206865616C746820696E666F726D61746963732E0A200A3D3D3D486F7374696E673A3D3D3D0A456163682070726F6A6563742073686F756C6420626520646576656C6F706564206F6E206120564D207768656E6576657220706F737369626C6520284D6163732063616E27742063757272656E746C79206265207669727475616C697A65642C20736F207468617427732074686520657863657074696F6E292E0A466F7220616E792070726F6A656374732074686174206861766520746F2062652065787465726E616C6C792061636365737369626C652C2061203320737461676520564D207365742073686F756C6420626520757365643A20446576656C6F706D656E74496E7467726174696F6E2C2053746167696E672C2044656D6F6E7374726174696F6E2E0A44656D6F6E7374726174696F6E20697320616E2065787465726E616C6C792061636365737369626C6520564D20746861742075736572732077696C6C2061636365737320746F20757365207468652070726F6A6563742773206170706C69636174696F6E2873292E0A53746167696E672069732061207265706C696361206F66207468652044656D6F20564D20616E64206973207573656420666F7220707265706172696E6720616E792072656C65617365732074686174206E65656420746F2062652070757368656420746F2044656D6F6E7374726174696F6E0A446576656C6F706D656E74496E746567726174696F6E20697320666F722074657374696E67206F757420646576656C6F706D656E7420636F6465206265666F726520697420697320617070726F76656420746F206D6F766520746F2070726F64756374696F6E2E0A436F646520736574732073686F756C64206E6F74206265206469726563746C7920636F706965642066726F6D20446576496E742D3E53746167696E67206E6F722053746167696E672D3E50726F64756374696F6E2C206275742073686F756C6420626520636865636B656420696E2F6F7574206F66206120736F7572636520636F6465207265706F7369746F72792E205468697320697320746F206B6565702074686520656E7669726F6E6D656E742022636C65616E2220616E6420616C6C20636F6E66696775726174696F6E20737465707320646F63756D656E7465642E0A456163682070726F6A6563742073686F756C642068617665206120636F6E66696775726174696F6E2070616765207468617420646F63756D656E7473207768617465766572206973206E656564656420746F206275696C642C20636F6E66696775726520616E64206465706C6F7920746F20656E7669726F6E6D656E74732E204175746F6D617465206275696C6473206173206D75636820617320726561736F6E61626C652E0A200A3D3D3D536F7572636520436F6465205265706F7369746F726965733A3D3D3D0A557365207468652053434D207265706F7369746F727920746F2076657273696F6E20796F757220636F64652E2043757272656E746C7920476F6F676C6520436F64652069732073657420757020666F722053564E2C20627574206576656E7475616C6C79207765276C6C2070726F6261626C7920636F6E7665727420746F204D657263757269616C2E0A41646420796F75722070726F6A65637420746F2053434D206F6E636520697427732061637469766520656E6F75676820666F7220736F6D656F6E6520656C736520746F207573652E2044726F70626F7820697320636F6E76656E69656E74206275742068617320616C6C2074686520647261776261636B73206F66202273686172656420666F6C6465722053434D222E0A436865636B20696E206368616E676573206173206D75636820617320697320726561736F6E61626C6520616E64206174206C65617374206265666F7265206D616B696E6720616E79207369676E69666963616E74206368616E67657320746F207468652070726F6A6563742E0A446F6E277420636865636B20696E20612070726F6A656374207468617420646F65736E2774206275696C642C207465737420616E642072756E2E0A55736520636F6D6D656E7473207768656E20636865636B696E6720696E2E205479706963616C6C79206F6E6C7920312D322070656F706C6520776F726B206F6E20612070726F6A6563742C20627574206F757220636F646520636F756C642062652075736566756C20666F722061207265666572656E636520666F722070726F6772616D7320616E6420706172746E6572732E20436F6D6D656E74732068656C702070656F706C6520756E6465727374616E642077686174206368616E67656420616E64207768792E0A200A3D3D3D436F64696E67205374796C6573202F204C616E677561676520426573742D5072616374696365733A3D3D3D0A4E6F742065737461626C6973686564207965742E20427574206174206C6561737420626520636F6E73697374656E742077697468696E20612070726F6A6563742E0A446F6E27742073617665207461627320696E20736F757263652066696C65732C20757365207370616365732E0A41646420696E207265666572656E63657320746F207374756666206C696B65204849472C206574632E0A0A3D3D4469616772616D733D3D0A0A3D3D55736566756C204C696E6B733D3D0A2A5B5B58436F6465546970735D5D0A2A5B5B54657374466C696768745D5D',X'7574662D38'),
(15,X'41206665772068696E747320666F72206C696E6B696E672058436F64652070726F6A6563747320746F2073756276657273696F6E207265706F7369746F726965732E0A0A3129204164642074686973206C696E6520746F20796F7572207E2F2E73756276657273696F6E2F636F6E6669672066696C653A0A676C6F62616C2D69676E6F726573203D202E44535F53746F7265202A2E737770202A7E2E6E6962206275696C642F202A2E70627875736572202A2E7065727370656374697665202A2E70657273706563746976657633202A2E6D6F6465317633202A2E6D6F64653276330A74686973206D616B65732073756276657273696F6E2069676E6F726520616C6C206F662074686520757365722D73706563696669632066696C657320746861742078636F64652067656E65726174657320616E6420746865206275696C64206469726563746F72790A0A3229204164642061207265706F7369746F727920696E2058436F6465207573696E672053434D7C5265706F7369746F726965732C20756E6465722074686520224F7074696F6E7322207461622C20636865636B2022436F6E6669677572652053434D206175746F6D61746963616C6C792220616E642022536176652066696C6573206265666F72652053434D206F7065726174696F6E73220A0A3329204F70656E20746865207265706F7369746F72792062726F77736572207573696E672053434D7C5265706F7369746F726965732C2073656C656374207468652070726F6A65637420796F752077616E742028652E672E2C2022476F6F676C6520436F64652F6950686F6E656D6F62696C65746F7822292C20616E6420636C69636B2022436865636B6F7574222E2053656C65637420736F6D6520666F6C646572206F6E20796F7572206C6F63616C206469736B2028652E672E207E2F536F757263652F6950686F6E656D6F62696C65746F78292E205468697320636F756C642074616B65206120666577206D696E757465732E0A0A3429204E6F77206F70656E207468652070726F6A65637420616E6420796F752077696C6C207365652053434D2070726F6D707473206F6E636520796F75206368616E6765207468696E67732028652E672E2C206368616E67696E6720612066696C652077696C6C20706C61636520616E20224D2220746F20746865206C656674206F66207468652066696C6520696E2070726F6A656374206578706C6F726572292E205768656E20796F75206172652066696E69736865642C20636F6D6D697420796F7572206368616E676573206261636B20746F20746865207265706F7369746F72792062792073656C656374696E67207468652070726F6A65637420726F6F7420616E6420636C69636B696E672053434D7C436F6D6D6974204368616E6765732E',X'7574662D38'),
(16,X'54686973207061676520646F63756D656E747320686F77204952445520286F72206F7468657273292063616E207573652054657374466C6967687420746F206D6F726520656173696C79206465706C6F7920694F53206170707320666F722074657374696E672E205479706963616C6C792C20696620796F752764206C696B6520746F206465706C6F7920796F75722061707020746F20616E20694F53206465766963652C20796F752061726520726571756972656420746F2061747461636820746861742064657669636520746F206120776F726B73746174696F6E2072756E6E696E672078636F646520616E6420636F6E66696775726564207769746820612070726F766973696F6E696E672070726F66696C65207468617420696E636C756465732074686174206465766963652E2054657374466C696768742073696D706C696669657320746869732070726F6365737320736F206120757365722063616E20696E7374616C6C207468652054657374466C6967687420617070206F6E2074686569722064657669636520616E64207468656E20696E7374616C6C2061707073207468726F756768207468652054657374466C69676874207369746520776974686F7574206576657220706879736963616C6C7920636F6E6E656374696E672074686569722064657669636520746F206120776F726B73746174696F6E2E0A0A234C6F6720696E746F205B687474703A2F2F7777772E676F6F676C652E636F6D2F75726C3F713D6874747073253341253246253246646576656C6F7065722E6170706C652E636F6D253246696F732532466D616E6167652532466F76657276696577253246696E6465782E616374696F6E2673613D4426736E747A3D31267573673D41467271457A63636D6142614B64687552454E644656646B596354322D424D75537720694F532050726F766973696F6E696E6720506F7274616C5D20617420646576656C6F7065722E6170706C652E636F6D20616E6420646F776E6C6F61642061205B687474703A2F2F7777772E676F6F676C652E636F6D2F75726C3F713D6874747073253341253246253246646576656C6F7065722E6170706C652E636F6D253246696F732532466D616E61676525324670726F766973696F6E696E6770726F66696C657325324676696577446973747269627574696F6E50726F66696C65732E616374696F6E2673613D4426736E747A3D31267573673D41467271457A6341456C455559776A45674D6E6341665355784674414A37764657412050726F766973696F6E696E672050726F66696C6520666F7220446973747269627574696F6E5D20286E6F74206120446973747269627574696F6E2050726F66696C65292E204D616B65207375726520796F75722050726F766973696F6E696E672050726F66696C6520696E636C75646573207468652064657669636573206F6E20776869636820796F752077616E7420746F207465737420746865206170702E0A232353686F756C6420796F75206E65656420746F2065646974207468652050726F766973696F6E696E672050726F66696C652C207573652074686520666F6C6C6F77696E672073657474696E67733A20446973747269627574696F6E204D6574686F64203D20416420486F633B2050726F66696C65204E616D65203D2022496E666F726D61746963734C61624164486F63223B20446973747269627574696F6E204365727469666963617465203D20224C696E646120436F6F6B223B204170704944203D20224164486F634170704944223B2044657669636573203D207768617465766572206465766963657320796F752077616E7420746F207573652E0A2323416E79206E65772064657669636573206E65656420746F2062652061646465642077697468696E20746865205B687474703A2F2F7777772E676F6F676C652E636F6D2F75726C3F713D6874747073253341253246253246646576656C6F7065722E6170706C652E636F6D253246696F732532466D616E61676525324664657669636573253246696E6465782E616374696F6E2673613D4426736E747A3D31267573673D41467271457A65386E6362754A385175314B64586671646261744D4E514E4C5F3267204465766963652050616E656C5D206F662074686520694F532050726F766973696F6E696E6720506F7274616C2E204164642061206465766963652062792063686F6F73696E672061206E6577206C6162656C20706169726564207769746820746865206465766963652069642028652E672E2C2032396438646239616334663737363565366332363530323235306231363538343932383963336431292E20596F752077696C6C206E6F742062652061626C6520746F20746573742074686520617070206F6E20612064657669636520756E6C657373206974206973206C696E6B656420746F207468652070726F766973696F6E696E672070726F66696C6520666F7220646973747269627574696F6E2E0A23446F776E6C6F61642074686520496E666F726D61746963734C61624164486F632070726F766973696F6E696E672070726F66696C6520746F2074686520776F726B73746174696F6E20776865726520796F752077696C6C206275696C64207468652061707020796F752764206C696B6520746F20746573742E0A23496E7374616C6C2074686520496E666F726D61746963734C61624164486F632E6D6F62696C6570726F766973696F6E2070726F66696C6520776974682058436F64652E0A234F70656E207468652070726F6A65637420696E2058436F646520616E642063686F6F7365204275696C647C204275696C6420616E6420417263686976650A23496E204F7267616E697A65722C2063686F6F736520796F75722070726F6A65637420756E646572204172636869766564204170706C69636174696F6E7320616E642073656C65637420225368617265222E0A2323466F72204964656E746974792073656C6563742022496E666F726D61746963734C61624164486F63220A232353656C65637420225361766520746F204469736B220A232343686F6F73652022416C6C6F7722207768656E2070726F6D7074656420776974682022636F64657369676E2077616E747320746F207369676E207573696E67206B657920223C6B65793E2220696E20796F7572206B6579636861696E0A232343686F6F736520612066696C65206E616D652028652E672E2C206D7970726F6A2E697061290A234C6F67696E20746F2074657374666C696768746170702E636F6D0A23436C69636B204275696C6473207C2055706C6F6164206E6577206275696C640A232343686F6F736520746865206970612066696C652067656E65726174656420696E20737465702023350A232341646420696E20736F6D652072656C65617365206E6F7465732C20636C69636B2022636F6E6669726D2074657374657273220A2343686F6F7365207768696368207465616D6D6174657320796F752077616E7420746F2061636365737320746865206275696C6420286265666F72652074686973207465616D6D61746573206E65656420746F20726567697374657220776974682074657374666C6967687461707020616E6420696E7374616C6C2074686520617070206F6E2074686569722064657669636520746F2073686F7720757020696E2074686973206C697374292E0A23436C69636B20436F6D706C6574650A234E6F77207465616D206D656D626572732063616E206F70656E207468652054657374466C6967687420617070206F6E2074686569722064657669636520616E6420696E7374616C6C20796F7572206275696C6420666F722074657374696E672E205468657265277320616E206F7074696F6E20696E2073746570203920746F20656D61696C206F75742061206C696E6B20776865726520746865207465616D206D656D6265722063616E20636C69636B206F6E20746F206175746F6D61746963616C6C7920646F776E6C6F616420746865206275696C64206F6E746F207468656972206465766963652E0A0A3D3D3D4C696E6B733A3D3D3D0A5B687474703A2F2F74657374666C696768746170702E636F6D2F20687474703A2F2F74657374666C696768746170702E636F6D2F5D',X'7574662D38'),
(17,X'235245444952454354205B5B4D61696E3A4172636869746563747572655D5D',X'7574662D38'),
(18,X'235245444952454354205B<KEY>',X'7574662D38'),
(19,X'546869732077696B69207365727665732061732061206D6F72652063617375616C20636F6C6C61626F726174696F6E20737061636520666F722074686520496E666F726D617469637320522644204C61626F7261746F72792E204974206973206F70656E20746F2065646974696E6720627920746865207075626C6963202865697468657220616E6F6E796D6F75736C79206F72207468726F7567682072656769737465726564206163636F756E7473292E205768696C6520746865206D61696E207369746520636F6E7461696E7320696E666F726D6174696F6E206F6E2070726F6A656374732C206E65777320616E64206F74686572206163746976697469657320746869732077696B6920736572766573206173206120736372617463682070616420746F2070726F76696465206164646974696F6E616C20696E666F726D6174696F6E206F7220746F20657870616E64206F6E206120636F6E63657074206173206E65636573736172792E20416C6C20636F6E74656E74206973206D6F646572617465642062792074686520636F6D6D756E6974792E0A0A0A52384634355320203C6120687265663D22687474703A2F2F6473716F767A69626C7463632E636F6D2F223E6473716F767A69626C7463633C2F613E2C205B75726C3D687474703A2F2F70666F7A706B6B65736479782E636F6D2F5D70666F7A706B6B65736479785B2F75726C5D2C205B6C696E6B3D687474703A2F2F7671696665686B6E7567756F2E636F6D2F5D7671696665686B6E7567756F5B2F6C696E6B5D2C20687474703A2F2F7169647878776A726D75637A2E636F6D2F0A0A3D3D2047657474696E672073746172746564202D20746F2062652072656D6F7665643D3D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A436F6E66696775726174696F6E5F73657474696E677320436F6E66696775726174696F6E2073657474696E6773206C6973745D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A464151204D6564696157696B69204641515D0A2A205B68747470733A2F2F6C697374732E77696B696D656469612E6F72672F6D61696C6D616E2F6C697374696E666F2F6D6564696177696B692D616E6E6F756E6365204D6564696157696B692072656C65617365206D61696C696E67206C6973745D0A436F6E73756C7420746865205B687474703A2F2F6D6574612E77696B696D656469612E6F72672F77696B692F48656C703A436F6E74656E7473205573657227732047756964655D20666F7220696E666F726D6174696F6E206F6E207573696E67207468652077696B6920736F6674776172652E',X'7574662D38'),
(20,X'546869732077696B69207365727665732061732061206D6F72652063617375616C20636F6C6C61626F726174696F6E20737061636520666F722074686520496E666F726D617469637320522644204C61626F7261746F72792E204974206973206F70656E20746F2065646974696E6720627920746865207075626C6963202865697468657220616E6F6E796D6F75736C79206F72207468726F7567682072656769737465726564206163636F756E7473292E205768696C6520746865206D61696E207369746520636F6E7461696E7320696E666F726D6174696F6E206F6E2070726F6A656374732C206E65777320616E64206F74686572206163746976697469657320746869732077696B6920736572766573206173206120736372617463682070616420746F2070726F76696465206164646974696F6E616C20696E666F726D6174696F6E206F7220746F20657870616E64206F6E206120636F6E63657074206173206E65636573736172792E20416C6C20636F6E74656E74206973206D6F646572617465642062792074686520636F6D6D756E6974792E0A0A0A3D3D204D616A6F722053656374696F6E73203D3D0A2A5B5B4D697373696F6E2F4F766572766965775D5D0A2A5B5B52657365617263685D5D0A2A5B5B456E676167656D656E74735D5D0A2A5B5B4E6577732F4576656E74735D5D0A2A5B5B5374616B65686F6C646572204F757472656163685D5D0A2A5B5B4172636869746563747572655D5D0A2A5B5B4E6F7465735D5D0A2A5B5B496E746572657374696E674C696E6B735D5D0A0A3D3D2047657474696E672073746172746564202D20746F2062652072656D6F7665643D3D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A436F6E66696775726174696F6E5F73657474696E677320436F6E66696775726174696F6E2073657474696E6773206C6973745D0A2A205B687474703A2F2F7777772E6D6564696177696B692E6F72672F77696B692F4D616E75616C3A464151204D6564696157696B69204641515D0A2A205B68747470733A2F2F6C697374732E77696B696D656469612E6F72672F6D61696C6D616E2F6C697374696E666F2F6D6564696177696B692D616E6E6F756E6365204D6564696157696B692072656C65617365206D61696C696E67206C6973745D0A436F6E73756C7420746865205B687474703A2F2F6D6574612E77696B696D656469612E6F72672F77696B692F48656C703A436F6E74656E7473205573657227732047756964655D20666F7220696E666F726D6174696F6E206F6E207573696E67207468652077696B6920736F6674776172652E',X'7574662D38'),
(21,X'5468697320706167652077696C6C20636F6E7461696E20696E666F726D6174696F6E206F6E20636F6D6D756E69636174696F6E73206D6174657269616C20616E6420696E746572616374696F6E7320746865204C61622068617320776974682074686520696E666F726D617469637320726573656172636820636F6D6D756E6974792E0A0A3D3D522644204C6162205374616B65686F6C6465727320616E64205061727469636970616E747320696E636C7564653A3D3D0A2A436F6D696E6720736F6F6E',X'7574662D38');
/*!40000 ALTER TABLE `text` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table watchlist
# ------------------------------------------------------------
DROP TABLE IF EXISTS `watchlist`;
CREATE TABLE `watchlist` (
`wl_user` int(10) unsigned NOT NULL,
`wl_namespace` int(11) NOT NULL default '0',
`wl_title` varbinary(255) NOT NULL default '',
`wl_notificationtimestamp` varbinary(14) default NULL,
UNIQUE KEY `wl_user` (`wl_user`,`wl_namespace`,`wl_title`),
KEY `namespace_title` (`wl_namespace`,`wl_title`)
) ENGINE=InnoDB DEFAULT CHARSET=binary;
LOCK TABLES `watchlist` WRITE;
/*!40000 ALTER TABLE `watchlist` DISABLE KEYS */;
INSERT INTO `watchlist` (`wl_user`,`wl_namespace`,`wl_title`,`wl_notificationtimestamp`)
VALUES
(2,0,'Architecture',NULL),
(2,0,'Engagements',NULL),
(2,0,'Main:Architecture',NULL),
(2,0,'Main:Architecture:XCodeTips',NULL),
(2,0,'Main_Page','20110422110758'),
(2,0,'Mission/Overview',NULL),
(2,0,'News/Events',NULL),
(2,0,'Research',NULL),
(2,0,'Stakeholder_Outreach','20110523184820'),
(2,0,'TestFlight',NULL),
(2,0,'XCodeTips',NULL),
(2,1,'Architecture',NULL),
(2,1,'Engagements',NULL),
(2,1,'Main:Architecture',NULL),
(2,1,'Main:Architecture:XCodeTips',NULL),
(2,1,'Main_Page',NULL),
(2,1,'Mission/Overview',NULL),
(2,1,'News/Events',NULL),
(2,1,'Research',NULL),
(2,1,'Stakeholder_Outreach',NULL),
(2,1,'TestFlight',NULL),
(2,1,'XCodeTips',NULL);
/*!40000 ALTER TABLE `watchlist` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
package randomizer.common.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteOrder;
/**
* Created by Ethan on 3/30/2017.
*/
public class DecUtils
{
/**
* Converts an integer into its byte representation.
*
* @param i the integer that should be converted to bytes
* @return the byte representation of the integer
*/
public static byte[] getBytes(int i) {
byte[] result = new byte[4];
if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
result[0] = (byte) (i);
result[1] = (byte) (i >> 8);
result[2] = (byte) (i >> 16);
result[3] = (byte) (i >> 24);
} else {
result[0] = (byte) (i >> 24);
result[1] = (byte) (i >> 16);
result[2] = (byte) (i >> 8);
result[3] = (byte) (i);
}
return result;
}
/**
* Reads a file's bytes into an array and returns them.
*
* @param source the file from which the bytes should be read
* @return the file's bytes
*/
public static byte[] getFileBytes(File source) {
byte[] bytes;
try (FileInputStream input = new FileInputStream(source)) {
bytes = new byte[(int) source.length()];
input.read(bytes);
} catch (IOException ex) {
ex.printStackTrace();
bytes = new byte[0];
}
return bytes;
}
/**
* Reads an unsigned 16-bit integer from the specified index in a byte array.
*
* @param bytes the array of bytes from which the integer will be read
* @param index the index at which the integer is found
* @return the 16-bit unsigned integer at the specified index
*/
public static int getUInt16(byte[] bytes, int index) {
if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
return ((bytes[index + 1] & 0xff) << 8) + (bytes[index] & 0xff);
} else {
return ((bytes[index] & 0xff) << 8) + (bytes[index + 1] & 0xff);
}
}
/**
* Reads an unsigned 24-bit integer from the specified index in a byte array.
*
* @param bytes the array of bytes from which the integer will be read
* @param index the index at which the integer is found
* @return the 24-bit unsigned integer at the specified index
*/
public static int getUInt24(byte[] bytes, int index) {
if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
return ((bytes[index + 2] & 0xff) << 16) +
((bytes[index + 1] & 0xff) << 8) + (bytes[index] & 0xff);
} else {
return ((bytes[index + 0] & 0xff) << 16) +
((bytes[index + 1] & 0xff) << 8) + (bytes[index + 2] & 0xff);
}
}
/**
* Reads an unsigned 32-bit integer from the specified index in a byte array.
*
* @param bytes the array of bytes from which the integer will be read
* @param index the index at which the integer is found
* @return the 32-bit unsigned integer at the specified index
*/
public static int getUInt32(byte[] bytes, int index) {
if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
return ((bytes[index + 3] & 0xff) << 24) +
((bytes[index + 2] & 0xff) << 16) +
((bytes[index + 1] & 0xff) << 8) + (bytes[index] & 0xff);
} else {
return ((bytes[index] & 0xff) << 24) +
((bytes[index + 1] & 0xff) << 16) +
((bytes[index + 2] & 0xff) << 8) + (bytes[index + 3] & 0xff);
}
}
}
|
<reponame>Melgo4/ICS4U<gh_stars>0
package zoo;
public class Amphibian extends Animal {
public Amphibian(String name, int population, int cost) {
super(name, population, cost);
}
@Override
public int getCost() {
return this.unitCost;
}
}
|
package org.yessan.destinyweather.util;
import android.text.TextUtils;
import com.google.gson.Gson;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.yessan.destinyweather.db.City;
import org.yessan.destinyweather.db.County;
import org.yessan.destinyweather.db.Province;
import org.yessan.destinyweather.gson.Weather;
/**
* Created by YesSan on 2017-06-09.
*/
public class Utility {
/**
* 解析和处理服务器返回的省级数据
**/
public static boolean handleProvinceResponse( final String response ) {
if ( !TextUtils.isEmpty( response ) ) {
try {
JSONArray allProvinces = new JSONArray( response );
for ( int n = 0; n < allProvinces.length(); ++n ) {
JSONObject provinceObject = allProvinces.getJSONObject( n );
Province province = new Province();
province.setProvinceName( provinceObject.getString( "name" ) );
province.setProvinceCode( provinceObject.getInt( "id" ) );
province.save();
}
return true;
} catch ( JSONException e ) {
e.printStackTrace();
}
}
return false;
}
/**
* 解析和处理服务器返回的市级数据
*/
public static boolean handleCityResponse( final String response, final int provinceId ) {
if ( !TextUtils.isEmpty( response ) ) {
try {
JSONArray allCities = new JSONArray( response );
for ( int n = 0; n < allCities.length(); ++n ) {
JSONObject cityObject = allCities.getJSONObject( n );
City city = new City();
city.setCityName( cityObject.getString( "name" ) );
city.setCityCode( cityObject.getInt( "id" ) );
city.setProvinceId( provinceId );
city.save();
}
return true;
} catch ( JSONException e ) {
e.printStackTrace();
}
}
return false;
}
/**
* 解析和处理服务器返回的县级数据
*/
public static boolean handleCountyResponse( final String response, final int cityId ) {
if ( !TextUtils.isEmpty( response ) ) {
try {
JSONArray allCounties = new JSONArray( response );
for ( int n = 0; n < allCounties.length(); ++n ) {
JSONObject countyObject = allCounties.getJSONObject( n );
County county = new County();
county.setCountyName( countyObject.getString( "name" ) );
county.setWeatherId( countyObject.getString( "weather_id" ) );
county.setCityId( cityId );
county.save();
}
return true;
} catch ( JSONException e ) {
e.printStackTrace();
}
}
return false;
}
/**
* 将返回的 JSON 数据解析成 Weather 实体类
*/
public static Weather handleWeatherResponse( final String response ) {
try {
JSONObject jsonObject = new JSONObject( response );
JSONArray jsonArray = jsonObject.getJSONArray( "HeWeather" );
String weatherContent = jsonArray.getJSONObject( 0 ).toString();
return new Gson().fromJson( weatherContent, Weather.class );
} catch ( Exception e ) {
e.printStackTrace();
}
return null;
}
}
|
<gh_stars>1-10
/**
* Copyright 2019 <NAME> <<EMAIL>> and vmngr/libvirt contributers.
*
* This file is part of the vmngr/libvirt project and is subject to the MIT
* license as in the LICENSE file in the project root.
*
* @brief Contains actual libvirt bindings and related declarations.
*/
import bindings from "bindings";
// TODO: Check whether it is possible to not use default in this case.
// tslint:disable-next-line:no-default-export
export default bindings("libvirt");
export declare interface HypervisorOptions {
uri: string;
}
export declare class Hypervisor {
constructor(options: HypervisorOptions);
connectOpen(): Promise<void>;
connectClose(): Promise<void>;
connectListAllDomains(flags?: ConnectListAllDomainsFlags):
Promise<Domain[]>;
connectListDomains(): Promise<number[]>;
connectListDefinedDomains(): Promise<string[]>;
connectGetMaxVcpus(type?: string): Promise<number>;
connectGetHostname(): Promise<string>;
domainCreateXML(xml: string): Promise<Domain>;
domainDefineXML(xml: string): Promise<Domain>;
domainGetInfo(domain: Domain): Promise<DomainInfo>;
domainGetID(domain: Domain): Promise<number | null>;
domainGetName(domain: Domain): Promise<string>;
domainGetUUIDString(domain: Domain): Promise<string>;
domainLookupByID(id: number): Promise<Domain>;
domainLookupByName(name: string): Promise<Domain>;
domainLookupByUUIDString(uuid: string): Promise<Domain>;
domainSave(domain: Domain, filename: string): Promise<void>;
domainRestore(filename: string): Promise<void>;
domainCreate(domain: Domain): Promise<void>;
domainShutdown(domain: Domain): Promise<void>;
domainGetXMLDesc(domain: Domain, flags?: DomainGetXMLDescFlags):
Promise<string>;
nodeGetInfo(): Promise<NodeInfo>;
}
export declare const enum ConnectListAllDomainsFlags {
ACTIVE = 1,
INACTIVE = 2,
PERSISTENT = 4,
TRANSIENT = 8,
RUNNING = 16,
PAUSED = 32,
SHUTOFF = 64,
OTHER = 128,
MANAGEDSAVE = 256,
NO_MANAGEDSAVE = 512,
AUTOSTART = 1024,
NO_AUTOSTART = 2048,
HAS_SNAPSHOT = 4096,
NO_SNAPSHOT = 8192,
HAS_CHECKPOINT = 16384,
NO_CHECKPOINT = 32768,
}
export declare const enum DomainGetXMLDescFlags {
SECURE = 1,
INACTIVE = 2,
UPDATE_CPU = 4,
MIGRATABLE = 8,
}
export declare class Domain {}
export declare const enum DomainState {
NOSTATE = 0,
RUNNING = 1,
BLOCKED = 2,
PAUSED = 3,
SHUTDOWN = 4,
SHUTOFF = 5,
CRASHED = 6,
PMSUSPENDED = 7,
}
export declare interface DomainInfo {
state: DomainState;
maxMem: number;
memory: number;
nrVirtCpu: number;
cpuTime: number;
}
export declare interface NodeInfo {
model: string;
memory: number;
cpus: number;
mhz: number;
nodes: number;
sockets: number;
cores: number;
threads: number;
}
|
<reponame>milomai/Mekanism<filename>src/main/java/mekanism/client/gui/machine/GuiFactory.java
package mekanism.client.gui.machine;
import com.mojang.blaze3d.matrix.MatrixStack;
import javax.annotation.Nonnull;
import mekanism.client.gui.GuiConfigurableTile;
import mekanism.client.gui.element.GuiDumpButton;
import mekanism.client.gui.element.bar.GuiChemicalBar;
import mekanism.client.gui.element.bar.GuiVerticalPowerBar;
import mekanism.client.gui.element.progress.GuiProgress;
import mekanism.client.gui.element.progress.ProgressType;
import mekanism.client.gui.element.tab.GuiEnergyTab;
import mekanism.client.gui.element.tab.GuiSortingTab;
import mekanism.common.content.blocktype.FactoryType;
import mekanism.common.inventory.container.tile.MekanismTileContainer;
import mekanism.common.registries.MekanismBlocks;
import mekanism.common.tier.FactoryTier;
import mekanism.common.tile.factory.TileEntityFactory;
import mekanism.common.tile.factory.TileEntityItemStackGasToItemStackFactory;
import mekanism.common.tile.factory.TileEntityMetallurgicInfuserFactory;
import mekanism.common.tile.factory.TileEntitySawingFactory;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
public class GuiFactory extends GuiConfigurableTile<TileEntityFactory<?>, MekanismTileContainer<TileEntityFactory<?>>> {
public GuiFactory(MekanismTileContainer<TileEntityFactory<?>> container, PlayerInventory inv, ITextComponent title) {
super(container, inv, title);
if (tile.hasSecondaryResourceBar()) {
imageHeight += 11;
inventoryLabelY = 85;
} else if (tile instanceof TileEntitySawingFactory) {
imageHeight += 21;
inventoryLabelY = 95;
} else {
inventoryLabelY = 75;
}
if (tile.tier == FactoryTier.ULTIMATE) {
imageWidth += 34;
inventoryLabelX = 26;
}
titleLabelY = 4;
dynamicSlots = true;
}
@Override
public void init() {
super.init();
addButton(new GuiSortingTab(this, tile));
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), imageWidth - 12, 16, tile instanceof TileEntitySawingFactory ? 73 : 52));
addButton(new GuiEnergyTab(tile.getEnergyContainer(), tile::getLastUsage, this));
if (tile.hasSecondaryResourceBar()) {
if (tile instanceof TileEntityMetallurgicInfuserFactory) {
TileEntityMetallurgicInfuserFactory factory = (TileEntityMetallurgicInfuserFactory) this.tile;
addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getInfusionTank(), tile.getInfusionTanks(null)), 7, 76,
tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
} else if (tile instanceof TileEntityItemStackGasToItemStackFactory) {
TileEntityItemStackGasToItemStackFactory factory = (TileEntityItemStackGasToItemStackFactory) this.tile;
addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getGasTank(), tile.getGasTanks(null)), 7, 76,
tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
}
}
int baseX = tile.tier == FactoryTier.BASIC ? 55 : tile.tier == FactoryTier.ADVANCED ? 35 : tile.tier == FactoryTier.ELITE ? 29 : 27;
int baseXMult = tile.tier == FactoryTier.BASIC ? 38 : tile.tier == FactoryTier.ADVANCED ? 26 : 19;
for (int i = 0; i < tile.tier.processes; i++) {
int cacheIndex = i;
addProgress(new GuiProgress(() -> tile.getScaledProgress(1, cacheIndex), ProgressType.DOWN, this, 4 + baseX + (i * baseXMult), 33));
}
}
private void addProgress(GuiProgress progressBar) {
if (tile.getFactoryType() == FactoryType.SMELTING) {
addButton(progressBar.jeiCategories(MekanismBlocks.ENERGIZED_SMELTER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.ENRICHING) {
addButton(progressBar.jeiCategories(MekanismBlocks.ENRICHMENT_CHAMBER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.CRUSHING) {
addButton(progressBar.jeiCategories(MekanismBlocks.CRUSHER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.COMPRESSING) {
addButton(progressBar.jeiCategories(MekanismBlocks.OSMIUM_COMPRESSOR.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.COMBINING) {
addButton(progressBar.jeiCategories(MekanismBlocks.COMBINER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.PURIFYING) {
addButton(progressBar.jeiCategories(MekanismBlocks.PURIFICATION_CHAMBER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.INJECTING) {
addButton(progressBar.jeiCategories(MekanismBlocks.CHEMICAL_INJECTION_CHAMBER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.INFUSING) {
addButton(progressBar.jeiCategories(MekanismBlocks.METALLURGIC_INFUSER.getRegistryName()));
} else if (tile.getFactoryType() == FactoryType.SAWING) {
addButton(progressBar.jeiCategories(MekanismBlocks.PRECISION_SAWMILL.getRegistryName()));
}
}
@Override
protected void drawForegroundText(@Nonnull MatrixStack matrix, int mouseX, int mouseY) {
renderTitleText(matrix);
drawString(matrix, inventory.getDisplayName(), inventoryLabelX, inventoryLabelY, titleTextColor());
super.drawForegroundText(matrix, mouseX, mouseY);
}
} |
/*
* Copyright 2017 ~ 2025 the original author or authors. <<EMAIL>, <EMAIL>>
*
* 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.wl4g.devops.dguid.strategy;
/**
* uid策略接口
*
* @author Wangl.sir <<EMAIL>, <EMAIL>>
* @version v1.0 2019年2月10日
* @since
*/
public interface IUidStrategy {
/**
* @方法名称 getUID
* @功能描述
*
* <pre>
* 获取ID
* </pre>
*
* @param group
* 分组
* @return id
*/
public long getUID(String group);
/**
* @方法名称 parseUID
* @功能描述
*
* <pre>
* 解析ID
* </pre>
*
* @param uid
* @param group
* 分组
* @return 输出json字符串:{\"UID\":\"\",\"timestamp\":\"\",\"workerId\":\"\",\"dataCenterId\":\"\",\"sequence\":\"\"}
*/
String parseUID(long uid, String group);
} |
<gh_stars>10-100
//
// Ryu
//
// Copyright (C) 2017 <NAME>
// All Rights Reserved.
//
// See the LICENSE file for details about the license covering
// this source code file.
//
#include "dip_switch.h"
RTTR_REGISTRATION {
rttr::registration::class_<ryu::hardware::dip_switch>("ryu::hardware::dip_switch") (
rttr::metadata(ryu::hardware::meta_data_key::type_id, ryu::hardware::dip_switch_id),
rttr::metadata(ryu::hardware::meta_data_key::type_name, "Dip Switch"),
rttr::metadata(ryu::hardware::meta_data_key::type_category, ryu::hardware::category_memory))
.constructor<>(rttr::registration::public_access) (
rttr::policy::ctor::as_raw_ptr
);
}
namespace ryu::hardware {
void dip_switch::init() {
}
dip_switch::dip_switch() : integrated_circuit("dip-switch-ic") {
}
void dip_switch::zero() {
_switches.reset();
}
void dip_switch::on_initialize() {
}
void dip_switch::fill(uint8_t value) {
for (uint32_t i = 0; i < address_space(); i++)
write_byte(i, value);
}
void dip_switch::on_address_space_changed() {
assert(address_space() <= 4);
zero();
}
access_type_flags dip_switch::access_type() const {
return access_types::writable | access_types::readable;
}
uint8_t dip_switch::read_byte(uint32_t address) const {
uint8_t bits = 0;
for (size_t i = 0; i < 8; i++)
bits |= _switches[(address * 8) + i];
return bits;
}
void dip_switch::write_byte(uint32_t address, uint8_t value) {
uint8_t mask = 0b00000001;
for (size_t i = 0; i <= 8; i++) {
_switches[(address * 8) + i] = (value & mask) != 0;
mask <<= 1;
}
}
uint16_t dip_switch::read_word(
uint32_t address,
integrated_circuit::endianness::types endianess) const {
return 0;
}
uint32_t dip_switch::read_dword(
uint32_t address,
integrated_circuit::endianness::types endianess) const {
return 0;
}
std::vector<uint8_t> dip_switch::write_word(
uint32_t address,
uint16_t value,
integrated_circuit::endianness::types endianess) {
return {};
}
std::vector<uint8_t> dip_switch::write_dword(
uint32_t address,
uint32_t value,
integrated_circuit::endianness::types endianess) {
return {};
}
} |
#!/bin/bash
dieharder -d 4 -g 54 -S 2647201908
|
var path = require('path')
, fs = require('fs')
, qs = require('querystring')
, url = require('url')
module.exports = (function(){
return {
// Brute force way of removing querystring and hash
getImageNameWithoutQueryStringOrHash: function(u){
var urlObj = url.parse(u)
return u.replace( urlObj.search, '').replace('#', '')
},
// Build path from urlObj after parsing
getUrlPath: function(u){
var urlObj = url.parse(u)
return urlObj.protocol + "//" + urlObj.hostname + urlObj.pathname
}
}
})() |
<gh_stars>0
package com.niki.spi.java.impl;
import com.niki.spi.java.Transaction;
/**
* Created by Niki on 2020/8/4 10:48 下午
*/
public class TenceTransaction implements Transaction {
@Override
public void transaction() {
System.out.println("微信支付");
}
}
|
<gh_stars>1-10
import { Item } from '../../blocks/item.js';
export class SearchSuggestions extends Item {
artist;
}
//# sourceMappingURL=searchSuggestions.js.map |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.