text stringlengths 1 1.05M |
|---|
import {expect} from 'chai';
import {spec} from 'modules/clicktripzBidAdapter.js';
const ENDPOINT_URL = 'https://www.clicktripz.com/x/prebid/v1';
describe('clicktripzBidAdapter', function () {
describe('isBidRequestValid', function () {
let bid = {
'bidder': 'clicktripz',
'params': {
placementId: 'testPlacementId',
siteId: 'testSiteId'
},
'adUnitCode': 'adunit-code',
'sizes': [
[300, 250]
],
'bidId': '1234asdf1234',
'bidderRequestId': '1234asdf1234asdf',
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf120'
};
let bid2 = {
'bidder': 'clicktripz',
'params': {
placementId: 'testPlacementId'
},
'adUnitCode': 'adunit-code',
'sizes': [
[300, 250]
],
'bidId': '1234asdf1234',
'bidderRequestId': '1234asdf1234asdf',
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf120'
};
let bid3 = {
'bidder': 'clicktripz',
'params': {
siteId: 'testSiteId'
},
'adUnitCode': 'adunit-code',
'sizes': [
[300, 250]
],
'bidId': '1234asdf1234',
'bidderRequestId': '1234asdf1234asdf',
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf120'
};
it('should return true when required params found', function () {
expect(spec.isBidRequestValid(bid)).to.equal(true);
});
it('should return false when required params are NOT found', function () {
expect(spec.isBidRequestValid(bid2)).to.equal(false);
expect(spec.isBidRequestValid(bid3)).to.equal(false);
});
});
describe('buildRequests', function () {
let validBidRequests = [{
'bidder': 'clicktripz',
'params': {
placementId: 'testPlacementId',
siteId: 'testSiteId'
},
'sizes': [
[300, 250],
[300, 300]
],
'bidId': '23beaa6af6cdde',
'bidderRequestId': '19c0c1efdf37e7',
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
}, {
'bidder': 'clicktripz',
'params': {
placementId: 'testPlacementId2',
siteId: 'testSiteId2'
},
'sizes': [
[300, 250]
],
'bidId': '25beaa6af6cdde',
'bidderRequestId': '19c0c1efdf37e7',
'auctionId': '61466567-d482-4a16-96f0-fe5f25ffbdf1',
}];
const request = spec.buildRequests(validBidRequests);
it('sends bid request to our endpoint via POST', function () {
expect(request.method).to.equal('POST');
});
it('sends bid request to our endpoint via POST', function () {
expect(request.method).to.equal('POST');
});
it('sends bid request to our endpoint at the correct URL', function () {
expect(request.url).to.equal(ENDPOINT_URL);
});
it('sends bid request to our endpoint at the correct URL', function () {
expect(request.url).to.equal(ENDPOINT_URL);
});
it('transforms sizes into an array of strings. Pairs of concatenated sizes joined with an x', function () {
expect(request.data[0].sizes.toString()).to.equal('300x250,300x300');
});
it('transforms sizes into an array of strings. Pairs of concatenated sizes joined with an x', function () {
expect(request.data[1].sizes.toString()).to.equal('300x250');
});
it('includes bidId, siteId, and placementId in payload', function () {
expect(request.data[0].bidId).to.equal('23beaa6af6cdde');
expect(request.data[0].siteId).to.equal('testSiteId');
expect(request.data[0].placementId).to.equal('testPlacementId');
});
it('includes bidId, siteId, and placementId in payload', function () {
expect(request.data[1].bidId).to.equal('25beaa6af6cdde');
expect(request.data[1].siteId).to.equal('testSiteId2');
expect(request.data[1].placementId).to.equal('testPlacementId2');
});
});
describe('interpretResponse', function () {
let serverResponse = {
body: [{
'bidId': 'bid-request-id',
'ttl': 120,
'netRevenue': true,
'size': '300x200',
'currency': 'USD',
'adUrl': 'https://www.clicktripz.com/n3/crane/v0/render?t=<KEY>',
'creativeId': '25ef9876abc5681f153',
'cpm': 50
}]
};
it('should get the correct bid response', function () {
let expectedResponse = [{
'requestId': 'bid-request-id',
'cpm': 50,
'netRevenue': true,
'width': '300',
'height': '200',
'creativeId': '25ef9876abc5681f153',
'currency': 'USD',
'adUrl': 'https://www.clicktripz.com/n3/crane/v0/render?t=<KEY>',
'ttl': 120
}];
let result = spec.interpretResponse(serverResponse);
expect(result).to.deep.equal(expectedResponse);
});
});
});
|
#!/bin/bash
# NOTE: There are sleeps in this to make sure that each application can finish starting before continuing. These may not be long enough and cause an issue, but just re-run this once the flow-rules have expired.
set -x
term() {
echo "Cancelling test..."
pkill -P $$
source ./kill.sh
# Copy results back
oc cp receiver:/receiver_logs receiver_logs
oc cp requester:/requester_logs requester_logs
exit 1
}
trap term SIGTERM SIGINT
# Add Resources
source ./setup.sh
# Copy files into Pods
oc cp main.py receiver:/receiver.py
oc cp main.py requester:/requester.py
# Run the Test
oc exec -t receiver -- sh -c "python3 -u /receiver.py --conn-end='receiver' 2>&1 >receiver_logs" &
sleep 2
oc exec -t requester -- sh -c "python3 -u /requester.py --no-reinit 2>&1 >requester_logs"
# Copy results back
oc cp receiver:/receiver_logs receiver_logs
oc cp requester:/requester_logs requester_logs
|
<filename>__tests__/cookie.test.ts<gh_stars>1-10
import { checkCookie } from '../src/lib/cookie'
describe('cookie', () => {
describe('#checkCookie', () => {
beforeAll(() => {
global['document'] = {
cookie: '',
} as any
})
afterAll(() => {
delete global['document']
})
it('should return true if cookie has expected value', () => {
document.cookie = 'foo=bar;'
expect(checkCookie('foo', 'bar')).toBe(true)
})
it('should return false if cookie has different value', () => {
document.cookie = 'foo=barbar;'
expect(checkCookie('foo', 'bar')).toBe(false)
})
it('should return false if cookie does not exist', () => {
document.cookie = 'foobar=bar;'
expect(checkCookie('foo', 'bar')).toBe(false)
})
it('should return false sever-side (if document is undefined)', () => {
global['document'] = undefined
expect(checkCookie('foo', 'bar')).toBe(false)
})
})
})
|
(function(){
var team_id = location.search.split("=")[1];
/*获取团队未读数量*/
$.ajax({
type: "POST",
data:{team_id:team_id,state:'0'},
url: cur_site + "team/apply/list/",
dataType: "json",
success: function (data) {
var err = data.err;
if (err == '-129') {
console.log("无投递记录");
}
if (err == '-1') {
console.log("请求方法错误");
}
if (err == '-10') {
console.log("操作失败");
}
if (err == '0') {
$('.info-tag').css('display','inline-block').html(data.unread_num);
}
},
headers: {
"Access-Control-Allow-Origin": "*"
}
});
var user_click=$('#user_click');
var list=$('#main-list');
$('body').click(function(){
list.css('display','none');
});
$('#pub-posi').attr('href','http://192.168.3.11:8080/team/position/addPosition.html?t_id='+team_id);
$('#pub-proj').attr('href','http://192.168.3.11:8080/team/manageProject/manageProject.html?tid='+team_id);//设置
user_click.click(function(){
if(list.css('display')=='block'){
list.css('display','none');
}
else{
list.css('display','block');
}
event.stopPropagation();
});
list.click(function(){
event.stopPropagation();
});
})(); |
<reponame>TellTales/prob<filename>test/simulator/abilities/disguise.js
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Disguise', function () {
afterEach(() => battle.destroy());
it('should block damage from one move', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Mewtwo', ability: 'pressure', moves: ['psystrike']}]);
assert.false.hurts(battle.p1.active[0], () => battle.makeChoices());
assert.hurts(battle.p1.active[0], () => battle.makeChoices());
});
it('should only block damage from the first hit of a move', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Beedrill', ability: 'swarm', moves: ['twineedle']}]);
assert.hurts(battle.p1.active[0], () => battle.makeChoices());
});
it('should block a hit from confusion', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Sableye', ability: 'prankster', moves: ['confuseray']}]);
assert.false.hurts(battle.p1.active[0], () => battle.makeChoices());
assert.ok(battle.p1.active[0].abilityData.busted);
});
it('should not block damage from weather effects', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Tyranitar', ability: 'sandstream', moves: ['rest']}]);
assert.hurts(battle.p1.active[0], () => battle.makeChoices());
});
it('should not block damage from entry hazards', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [
{species: 'Zangoose', ability: 'toxicboost', item: 'laggingtail', moves: ['return']},
{species: 'Mimikyu', ability: 'disguise', moves: ['splash']},
]);
battle.join('p2', 'Guest 2', 1, [{species: 'forretress', ability: 'sturdy', item: 'redcard', moves: ['spikes']}]);
battle.makeChoices();
assert.false.fullHP(battle.p1.active[0]);
});
it('should not block status moves or damage from status', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Ariados', ability: 'swarm', moves: ['toxicthread']}]);
let pokemon = battle.p1.active[0];
assert.sets(() => pokemon.status, 'psn', () => battle.makeChoices());
assert.statStage(pokemon, 'spe', -1);
assert.false.fullHP(pokemon);
});
it('should not block secondary effects from damaging moves', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['splash']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Pikachu', ability: 'lightningrod', moves: ['nuzzle']}]);
let pokemon = battle.p1.active[0];
assert.sets(() => pokemon.status, 'par', () => battle.makeChoices());
assert.fullHP(pokemon);
});
it('should cause Counter to deal 1 damage if it blocks a move', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['counter']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Weavile', ability: 'pressure', moves: ['feintattack']}]);
assert.hurtsBy(battle.p2.active[0], 1, () => battle.makeChoices());
});
it.skip('should not trigger critical hits while active', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Mimikyu', ability: 'disguise', moves: ['counter']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Cryogonal', ability: 'noguard', moves: ['frostbreath']}]);
let successfulEvent = false;
battle.onEvent('Damage', battle.getFormat(), function (damage, attacker, defender, move) {
if (move.id === 'frostbreath') {
successfulEvent = true;
assert.ok(!move.crit);
}
});
battle.makeChoices();
assert.ok(successfulEvent);
});
});
|
<gh_stars>0
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzureWizardPromptStep, IWizardOptions } from "vscode-azureextensionui";
import { ext } from "../../extensionVariables";
import { localize } from "../../localize";
import { ConfirmPassphraseStep } from "./ConfirmPassphraseStep";
import { IVirtualMachineWizardContext } from "./IVirtualMachineWizardContext";
export class PassphrasePromptStep extends AzureWizardPromptStep<IVirtualMachineWizardContext> {
public async prompt(wizardContext: IVirtualMachineWizardContext): Promise<void> {
const prompt: string = localize('passphrasePrompt', 'Enter a passphrase for connecting to this Virtual Machine');
const placeHolder: string = localize('enterPassphrase', 'Enter passphrase (empty for no passphrase)');
wizardContext.passphrase = (await ext.ui.showInputBox({
prompt,
placeHolder,
password: true,
validateInput: async (value: string | undefined): Promise<string | undefined> => await this.validatePassphrase(value)
}));
}
public shouldPrompt(wizardContext: IVirtualMachineWizardContext): boolean {
return !wizardContext.passphrase;
}
public async getSubWizard(wizardContext: IVirtualMachineWizardContext): Promise<IWizardOptions<IVirtualMachineWizardContext> | undefined> {
if (wizardContext.passphrase) {
return {
promptSteps: [new ConfirmPassphraseStep()]
};
} else {
return undefined;
}
}
private async validatePassphrase(passphrase: string | undefined): Promise<string | undefined> {
const passphraseMinLength: number = 5;
if (passphrase && passphrase.length < passphraseMinLength) {
return localize('invalidLength', 'The passphrase must be at least {0} characters or empty for no passphrase.', passphraseMinLength);
} else {
return undefined;
}
}
}
|
<reponame>mehedi8gb/Laravel-Social-Dating-project
declare type notifyType = 1 | 2 | 3;
declare type notifyStatus = 'success' | 'warning' | 'error' | 'info';
declare type notifyEffect = 'fade' | 'slide';
declare type notifyPosition = 'left top' | 'top left' | 'right top' | 'top right' | 'left bottom' | 'bottom left' | 'right bottom' | 'bottom right' | 'center' | 'left y-center' | 'right y-center' | 'y-center left' | 'y-center right' | 'top x-center' | 'bottom x-center' | 'x-center top' | 'x-center bottom';
interface IArgs {
status?: notifyStatus;
type?: notifyType;
effect?: notifyEffect;
position?: notifyPosition;
title?: string;
text?: string;
showIcon?: boolean;
customIcon?: string;
showCloseButton?: boolean;
customClass?: string;
speed?: number;
autoclose?: boolean;
autotimeout?: number;
gap?: number;
distance?: number;
customWrapper?: string;
}
export { notifyType, notifyStatus, notifyEffect, notifyPosition, IArgs };
|
#code based on example found at:
#http://www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/
# import the necessary packages
from collections import deque
import numpy as np
import argparse
import imutils
import cv2
import time as t
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video",
help="path to the (optional) video file")
ap.add_argument("-b", "--buffer", type=int, default=32,
help="max buffer size")
ap.add_argument("-r", "--real", type=str, default="real",
help="real image or mask")
ap.add_argument("-t", "--type", type=str, default="blank",
help="type of find")
args = vars(ap.parse_args())
real = args.get("real")
typ = args.get("type")
raspi = False
if typ == "blank":
greenLower = (0, 0, 0)
greenUpper = (0, 0, 0)
elif typ == "BD":
greenLower = (71, 32, 37)
greenUpper = (203, 67, 65)
elif typ == "Servo":
greenLower = (72, 80, 26)
greenUpper = (140, 165, 142)
elif typ == "ppbo":
greenLower = (14, 20, 157)
greenUpper = (40, 228, 246)
elif typ == "TAC":
greenLower = (0, 16, 46)
greenUpper = (183, 170, 105)
elif typ == "bby":
greenLower = (17,121,76)
greenUpper = (52,228,218)
elif typ == "plier":
greenLower = (73,108,78)
greenUpper = (100,201,149)
elif typ == "bluey":
greenLower = (108,222,155)
greenUpper = (126,245,234)
#my eyes(broken)
#greenLower = (106, 84, 38)
#greenUpper = (138, 143, 55)
pts = deque(maxlen=args["buffer"])
# if a video path was not supplied, grab the reference
# to the webcam
if not args.get("video", False):
if raspi:
camera = cv2.VideoCapture("/dev/stdin")
else:
camera = cv2.VideoCapture(0)
# otherwise, grab a reference to the video file
else:
camera = cv2.VideoCapture(args["video"])
# keep looping
while True:
# grab the current frame
(grabbed, frame) = camera.read()
# if we are viewing a video and we did not grab a frame,
# then we have reached the end of the video
if args.get("video") and not grabbed:
break
# resize the frame, blur it, and convert it to the HSV
# color space
frame = imutils.resize(frame, width=600)
# blurred = cv2.GaussianBlur(frame, (11, 11), 0)
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
# construct a mask for the color "green", then perform
# a series of dilations and erosions to remove any small
# blobs left in the mask
mask = cv2.inRange(hsv, greenLower, greenUpper)
mask = cv2.erode(mask, None, iterations=2)
mask = cv2.dilate(mask, None, iterations=2)
# find contours in the mask and initialize the current
# (x, y) center of the ball
cnts = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL,
cv2.CHAIN_APPROX_SIMPLE)[-2]
center = None
# only proceed if at least one contour was found
if len(cnts) > 0:
# find the largest contour in the mask, then use
# it to compute the minimum enclosing circle and
# centroid
c = max(cnts, key=cv2.contourArea)
((x, y), radius) = cv2.minEnclosingCircle(c)
M = cv2.moments(c)
center = (int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"]))
# only proceed if the radius meets a minimum size
if radius > 10:
# draw the circle and centroid on the frame,
# then update the list of tracked points
cv2.circle(frame, (int(x), int(y)), int(radius),
(0, 255, 255), 2)
cv2.circle(frame, center, 5, (0, 0, 255), -1)
# update the points queue
pts.appendleft(center)
# loop over the set of tracked points
for i in xrange(1, len(pts)):
# if either of the tracked points are None, ignore
# them
if pts[i - 1] is None or pts[i] is None:
continue
# otherwise, compute the thickness of the line and
# draw the connecting lines
thickness = int(np.sqrt(args["buffer"] / float(i + 1)) * 2.5)
cv2.line(frame, pts[i - 1], pts[i], (0, 0, 0), thickness)
# show the frame to our screen
if real == "real":
cv2.imshow("Frame", frame)
elif real == "mask":
cv2.imshow("Frame",mask)
else:
cv2.imshow("Frame",hsv)
key = cv2.waitKey(1) & 0xFF
# if the 'q' key is pressed, stop the loop
if key == ord("q"):
break
#t.sleep(0.1)
# cleanup the camera and close any open windows
camera.release()
cv2.destroyAllWindows()
|
/* UserPreference.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 3.50
//
// Tag: Desktop
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 2016 <NAME>. All rights reserved.
//
//----------------------------------------------------------------------------------------
#include <CCore/inc/video/UserPreference.h>
#include <CCore/inc/video/DesktopKey.h>
#include <CCore/inc/video/FontLookup.h>
namespace CCore {
namespace Video {
/* struct UserPreferenceBag */
template <class Ptr,class Func>
void UserPreferenceBag::Members(Ptr ptr,Func func) // Update here
{
// common
func("frame_pos_ry"_c,ptr->frame_pos_ry);
func("width"_c,ptr->width);
func("space_dxy"_c,ptr->space_dxy);
func("check_dxy"_c,ptr->check_dxy);
func("knob_dxy"_c,ptr->knob_dxy);
func("radio_dxy"_c,ptr->radio_dxy);
func("switch_dxy"_c,ptr->switch_dxy);
func("light_dxy"_c,ptr->light_dxy);
func("scroll_dxy"_c,ptr->scroll_dxy);
func("progress_dy"_c,ptr->progress_dy);
func("shift_len"_c,ptr->shift_len);
func("gray"_c,ptr->gray);
func("grayUp"_c,ptr->grayUp);
func("snow"_c,ptr->snow);
func("snowUp"_c,ptr->snowUp);
func("back"_c,ptr->back);
func("line"_c,ptr->line);
func("inactive"_c,ptr->inactive);
func("border"_c,ptr->border);
func("focus"_c,ptr->focus);
func("face"_c,ptr->face);
func("faceUp"_c,ptr->faceUp);
func("mark"_c,ptr->mark);
func("alert"_c,ptr->alert);
func("warning"_c,ptr->warning);
func("text_Yes"_c,ptr->text_Yes);
func("text_No"_c,ptr->text_No);
func("text_Ok"_c,ptr->text_Ok);
func("text_Cancel"_c,ptr->text_Cancel);
func("text_LoadFile"_c,ptr->text_LoadFile);
func("text_SaveFile"_c,ptr->text_SaveFile);
func("text_Alert"_c,ptr->text_Alert);
func("text_AskSave"_c,ptr->text_AskSave);
func("text_Error"_c,ptr->text_Error);
func("text_Warning"_c,ptr->text_Warning);
func("text_Close"_c,ptr->text_Close);
func("text_Insert"_c,ptr->text_Insert);
func("text_Select"_c,ptr->text_Select);
func("text_Find"_c,ptr->text_Find);
func("text_Replace"_c,ptr->text_Replace);
func("text_Save"_c,ptr->text_Save);
func("text_Apply"_c,ptr->text_Apply);
func("text_Section"_c,ptr->text_Section);
func("title_UserPref"_c,ptr->title_UserPref);
func("title_AppPref"_c,ptr->title_AppPref);
func("title_BookPref"_c,ptr->title_BookPref);
func("text_none"_c,ptr->text_none);
// text
func("text_cursor_dx"_c,ptr->text_cursor_dx);
func("text_select"_c,ptr->text_select);
func("text_cursor"_c,ptr->text_cursor);
func("label_text"_c,ptr->label_text);
func("contour_text"_c,ptr->contour_text);
func("button_text"_c,ptr->button_text);
func("message_text"_c,ptr->message_text);
func("info_text"_c,ptr->info_text);
func("line_edit_text"_c,ptr->line_edit_text);
func("list_text"_c,ptr->list_text);
func("spinor_text"_c,ptr->spinor_text);
func("button_space"_c,ptr->button_space);
func("message_space"_c,ptr->message_space);
func("line_edit_space"_c,ptr->line_edit_space);
func("info_space"_c,ptr->info_space);
func("list_space"_c,ptr->list_space);
func("menu_space"_c,ptr->menu_space);
func("fav_space"_c,ptr->fav_space);
func("label_font"_c,ptr->label_font);
func("contour_font"_c,ptr->contour_font);
func("button_font"_c,ptr->button_font);
func("message_font"_c,ptr->message_font);
func("info_font"_c,ptr->info_font);
func("line_edit_font"_c,ptr->line_edit_font);
func("list_font"_c,ptr->list_font);
func("menu_font"_c,ptr->menu_font);
func("spinor_font"_c,ptr->spinor_font);
func("fav_font"_c,ptr->fav_font);
func("code_font"_c,ptr->code_font);
// switch
func("switch_on"_c,ptr->switch_on);
func("switch_off"_c,ptr->switch_off);
// shift switch
func("shift_shift"_c,ptr->shift_shift);
func("shift_on"_c,ptr->shift_on);
func("shift_off"_c,ptr->shift_off);
// progress
func("progress_time"_c,ptr->progress_time);
func("progress_period"_c,ptr->progress_period);
func("progress_border"_c,ptr->progress_border);
func("progress_grayUp"_c,ptr->progress_grayUp);
func("progress_snowUp"_c,ptr->progress_snowUp);
func("progress_grayPing"_c,ptr->progress_grayPing);
func("progress_snowPing"_c,ptr->progress_snowPing);
func("progress_grayArrow"_c,ptr->progress_grayArrow);
func("progress_snowArrow"_c,ptr->progress_snowArrow);
// scroll
func("scroll_speedUpPeriod"_c,ptr->scroll_speedUpPeriod);
// line_edit
func("line_edit_period"_c,ptr->line_edit_period);
func("line_edit_ex"_c,ptr->line_edit_ex);
// list
func("list_net"_c,ptr->list_net);
// scroll_list
func("scroll_list_title"_c,ptr->scroll_list_title);
func("scroll_list_titleTop"_c,ptr->scroll_list_titleTop);
func("scroll_list_titleBottom"_c,ptr->scroll_list_titleBottom);
// slider
func("slider_dxy"_c,ptr->slider_dxy);
// spinor
func("spinor_period"_c,ptr->spinor_period);
// run button
func("run"_c,ptr->run);
func("run_period"_c,ptr->run_period);
func("run_steps"_c,ptr->run_steps);
// menu
func("menu_back"_c,ptr->menu_back);
func("menu_text"_c,ptr->menu_text);
func("menu_hilight"_c,ptr->menu_hilight);
func("menu_select"_c,ptr->menu_select);
func("menu_hot"_c,ptr->menu_hot);
func("menu_hotcolor"_c,ptr->menu_hotcolor);
// Frame
func("blinkTime"_c,ptr->blinkTime);
func("blinkPeriod"_c,ptr->blinkPeriod);
func("frame_dxy"_c,ptr->frame_dxy);
func("title_dy"_c,ptr->title_dy);
func("btn_dx"_c,ptr->btn_dx);
func("btn_dy"_c,ptr->btn_dy);
func("frame"_c,ptr->frame);
func("frameHilight"_c,ptr->frameHilight);
func("frameDrag"_c,ptr->frameDrag);
func("title"_c,ptr->title);
func("titleActive"_c,ptr->titleActive);
func("titleInactive"_c,ptr->titleInactive);
func("drag"_c,ptr->drag);
func("dragHilight"_c,ptr->dragHilight);
func("dragActive"_c,ptr->dragActive);
func("dragSmall"_c,ptr->dragSmall);
func("btnFace"_c,ptr->btnFace);
func("btnFaceHilight"_c,ptr->btnFaceHilight);
func("btnPict"_c,ptr->btnPict);
func("btnPictClose"_c,ptr->btnPictClose);
func("btnPictAlert"_c,ptr->btnPictAlert);
func("btnPictNoAlert"_c,ptr->btnPictNoAlert);
func("btnPictCloseAlert"_c,ptr->btnPictCloseAlert);
func("hintBack"_c,ptr->hintBack);
func("hintText"_c,ptr->hintText);
func("hintBorder"_c,ptr->hintBorder);
func("hintWidth"_c,ptr->hintWidth);
func("title_font"_c,ptr->title_font);
func("hint_font"_c,ptr->hint_font);
func("shadeColor"_c,ptr->shadeColor);
func("shadeAlpha"_c,ptr->shadeAlpha);
func("text_Fatal_error"_c,ptr->text_Fatal_error);
func("text_No_hint"_c,ptr->text_No_hint);
func("hint_ResizeTopLeft"_c,ptr->hint_ResizeTopLeft);
func("hint_ResizeLeft"_c,ptr->hint_ResizeLeft);
func("hint_ResizeBottomLeft"_c,ptr->hint_ResizeBottomLeft);
func("hint_ResizeBottom"_c,ptr->hint_ResizeBottom);
func("hint_ResizeBottomRight"_c,ptr->hint_ResizeBottomRight);
func("hint_ResizeRight"_c,ptr->hint_ResizeRight);
func("hint_ResizeTopRight"_c,ptr->hint_ResizeTopRight);
func("hint_Alert"_c,ptr->hint_Alert);
func("hint_Help"_c,ptr->hint_Help);
func("hint_Minimize"_c,ptr->hint_Minimize);
func("hint_Maximize"_c,ptr->hint_Maximize);
func("hint_Restore"_c,ptr->hint_Restore);
func("hint_Close"_c,ptr->hint_Close);
// Exception
func("exception_back"_c,ptr->exception_back);
func("exception_text"_c,ptr->exception_text);
func("exception_divider"_c,ptr->exception_divider);
// Message
func("message_knob_dxy"_c,ptr->message_knob_dxy);
// File
func("file_alt_dxy"_c,ptr->file_alt_dxy);
func("file_accent"_c,ptr->file_accent);
func("file_filter_text"_c,ptr->file_filter_text);
func("file_faceRight"_c,ptr->file_faceRight);
func("file_faceDown"_c,ptr->file_faceDown);
func("file_filter_font"_c,ptr->file_filter_font);
func("text_New_file"_c,ptr->text_New_file);
func("hint_FileHitList"_c,ptr->hint_FileHitList);
func("hint_FileAddHit"_c,ptr->hint_FileAddHit);
func("hint_FileUpdir"_c,ptr->hint_FileUpdir);
func("hint_FileCurdir"_c,ptr->hint_FileCurdir);
func("hint_FileDirList"_c,ptr->hint_FileDirList);
func("hint_FileList"_c,ptr->hint_FileList);
func("hint_FileMakeDir"_c,ptr->hint_FileMakeDir);
func("hint_FileRemoveDir"_c,ptr->hint_FileRemoveDir);
func("hint_FileAlt"_c,ptr->hint_FileAlt);
func("hint_FileEnableFilter"_c,ptr->hint_FileEnableFilter);
func("hint_FileDelFilter"_c,ptr->hint_FileDelFilter);
func("hint_FileFilter"_c,ptr->hint_FileFilter);
func("hint_FileAddFilter"_c,ptr->hint_FileAddFilter);
// ConfigEditor
func("cfg_edit_width"_c,ptr->cfg_edit_width);
func("cfg_edit_mark_dy"_c,ptr->cfg_edit_mark_dy);
func("cfg_edit_line"_c,ptr->cfg_edit_line);
func("cfg_width"_c,ptr->cfg_width);
func("cfg_radius"_c,ptr->cfg_radius);
func("cfg_mix_len"_c,ptr->cfg_mix_len);
func("cfg_mix_width"_c,ptr->cfg_mix_width);
func("cfg_white_len"_c,ptr->cfg_white_len);
func("cfg_pal_len"_c,ptr->cfg_pal_len);
func("text_cfg_all"_c,ptr->text_cfg_all);
func("text_cfg_Coord"_c,ptr->text_cfg_Coord);
func("text_cfg_MCoord"_c,ptr->text_cfg_MCoord);
func("text_cfg_VColor"_c,ptr->text_cfg_VColor);
func("text_cfg_Clr"_c,ptr->text_cfg_Clr);
func("text_cfg_unsigned"_c,ptr->text_cfg_unsigned);
func("text_cfg_String"_c,ptr->text_cfg_String);
func("text_cfg_Point"_c,ptr->text_cfg_Point);
func("text_cfg_Font"_c,ptr->text_cfg_Font);
func("text_cfg_bool"_c,ptr->text_cfg_bool);
func("text_cfg_Ratio"_c,ptr->text_cfg_Ratio);
func("text_cfg_Set"_c,ptr->text_cfg_Set);
func("text_cfg_Back"_c,ptr->text_cfg_Back);
func("text_cfg_Save"_c,ptr->text_cfg_Save);
func("text_cfg_Self"_c,ptr->text_cfg_Self);
func("hint_cfg_list"_c,ptr->hint_cfg_list);
func("hint_cfg_Set"_c,ptr->hint_cfg_Set);
func("hint_cfg_Back"_c,ptr->hint_cfg_Back);
func("hint_cfg_Save"_c,ptr->hint_cfg_Save);
func("hint_cfg_Self"_c,ptr->hint_cfg_Self);
func("hint_cfg_x"_c,ptr->hint_cfg_x);
func("hint_cfg_y"_c,ptr->hint_cfg_y);
func("hint_cfg_a"_c,ptr->hint_cfg_a);
func("hint_cfg_b"_c,ptr->hint_cfg_b);
func("text_cfg_scalable"_c,ptr->text_cfg_scalable);
func("text_cfg_monospace"_c,ptr->text_cfg_monospace);
func("text_cfg_bold"_c,ptr->text_cfg_bold);
func("text_cfg_italic"_c,ptr->text_cfg_italic);
func("text_cfg_Hint"_c,ptr->text_cfg_Hint);
func("text_cfg_no_hint"_c,ptr->text_cfg_no_hint);
func("text_cfg_native_hint"_c,ptr->text_cfg_native_hint);
func("text_cfg_auto_hint"_c,ptr->text_cfg_auto_hint);
func("text_cfg_Smooth"_c,ptr->text_cfg_Smooth);
func("text_cfg_no_smooth"_c,ptr->text_cfg_no_smooth);
func("text_cfg_smooth"_c,ptr->text_cfg_smooth);
func("text_cfg_RGB"_c,ptr->text_cfg_RGB);
func("text_cfg_BGR"_c,ptr->text_cfg_BGR);
func("text_cfg_kerning"_c,ptr->text_cfg_kerning);
func("text_cfg_strength"_c,ptr->text_cfg_strength);
func("text_cfg_sample"_c,ptr->text_cfg_sample);
func("text_cfg_table"_c,ptr->text_cfg_table);
func("hint_cfg_font_list"_c,ptr->hint_cfg_font_list);
func("hint_cfg_height"_c,ptr->hint_cfg_height);
func("hint_cfg_length_enable"_c,ptr->hint_cfg_length_enable);
func("hint_cfg_length"_c,ptr->hint_cfg_length);
func("hint_cfg_color"_c,ptr->hint_cfg_color);
// FontSelect
func("font_select_title"_c,ptr->font_select_title);
// FontReplace
func("font_replace_title"_c,ptr->font_replace_title);
// FavListWindow
func("fav_text"_c,ptr->fav_text);
func("fav_text_select"_c,ptr->fav_text_select);
func("fav_section_text"_c,ptr->fav_section_text);
func("fav_section_back"_c,ptr->fav_section_back);
// FavWindow
func("hint_Ins"_c,ptr->hint_Ins);
func("hint_MoveUp"_c,ptr->hint_MoveUp);
func("hint_MoveDown"_c,ptr->hint_MoveDown);
func("hint_OpenAll"_c,ptr->hint_OpenAll);
func("hint_CloseAll"_c,ptr->hint_CloseAll);
func("hint_Del"_c,ptr->hint_Del);
func("hint_SectionName"_c,ptr->hint_SectionName);
func("hint_Path"_c,ptr->hint_Path);
}
void UserPreferenceBag::bindItems(ConfigItemBind &binder) // Update here
{
binder.group("Common"_str);
binder.item("Y-position ratio"_str,frame_pos_ry);
binder.item("line width"_str,width);
binder.item("space"_str,space_dxy);
binder.space();
binder.item("check box"_str,check_dxy);
binder.item("knob box"_str,knob_dxy);
binder.item("radio box"_str,radio_dxy);
binder.item("switch box"_str,switch_dxy);
binder.item("light box"_str,light_dxy);
binder.item("scroll width"_str,scroll_dxy);
binder.item("progress height"_str,progress_dy);
binder.item("shift switch length"_str,shift_len);
binder.space();
binder.item("gray"_str,gray);
binder.item("grayUp"_str,grayUp);
binder.item("snow"_str,snow);
binder.item("snowUp"_str,snowUp);
binder.space();
binder.item("back"_str,back);
binder.item("line"_str,line);
binder.item("inactive"_str,inactive);
binder.space();
binder.item("border"_str,border);
binder.item("focus"_str,focus);
binder.space();
binder.item("face"_str,face);
binder.item("faceUp"_str,faceUp);
binder.item("mark"_str,mark);
binder.item("alert"_str,alert);
binder.item("warning"_str,warning);
binder.space();
binder.item("'Yes'"_str,text_Yes);
binder.item("'No'"_str,text_No);
binder.item("'Ok'"_str,text_Ok);
binder.item("'Cancel'"_str,text_Cancel);
binder.item("'LoadFile'"_str,text_LoadFile);
binder.item("'SaveFile'"_str,text_SaveFile);
binder.item("'Alert'"_str,text_Alert);
binder.item("'AskSave'"_str,text_AskSave);
binder.item("'Error'"_str,text_Error);
binder.item("'Warning'"_str,text_Warning);
binder.item("'Close'"_str,text_Close);
binder.item("'Insert'"_str,text_Insert);
binder.item("'Select'"_str,text_Select);
binder.item("'Find'"_str,text_Find);
binder.item("'Replace'"_str,text_Replace);
binder.item("'Save'"_str,text_Save);
binder.item("'Apply'"_str,text_Apply);
binder.item("'Section'"_str,text_Section);
binder.item("'UserPref'"_str,title_UserPref);
binder.item("'AppPref'"_str,title_AppPref);
binder.item("'BookPref'"_str,title_BookPref);
binder.item("'<none>'"_str,text_none);
binder.group("Text"_str);
binder.item("cursor width"_str,text_cursor_dx);
binder.space();
binder.item("select"_str,text_select);
binder.item("cursor"_str,text_cursor);
binder.space();
binder.item("label text"_str,label_text);
binder.item("contour text"_str,contour_text);
binder.space();
binder.item("button text"_str,button_text);
binder.item("message text"_str,message_text);
binder.item("info text"_str,info_text);
binder.item("editor text"_str,line_edit_text);
binder.item("list text"_str,list_text);
binder.item("spinor text"_str,spinor_text);
binder.space();
binder.item("button space"_str,button_space);
binder.item("message space"_str,message_space);
binder.item("editor space"_str,line_edit_space);
binder.item("info space"_str,info_space);
binder.item("list space"_str,list_space);
binder.item("menu space"_str,menu_space);
binder.item("fav space"_str,fav_space);
binder.space();
binder.item("label font"_str,label_font);
binder.item("contour font"_str,contour_font);
binder.space();
binder.item("button font"_str,button_font);
binder.item("message font"_str,message_font);
binder.item("info font"_str,info_font);
binder.item("editor font"_str,line_edit_font);
binder.item("list font"_str,list_font);
binder.item("menu font"_str,menu_font);
binder.item("spinor font"_str,spinor_font);
binder.item("fav font"_str,fav_font);
binder.space();
binder.item("code font"_str,code_font);
binder.group("Switch"_str);
binder.item("on"_str,switch_on);
binder.item("off"_str,switch_off);
binder.group("Shift switch"_str);
binder.item("shift"_str,shift_shift);
binder.item("on"_str,shift_on);
binder.item("off"_str,shift_off);
binder.group("Progress"_str);
binder.item("ping time"_str,progress_time);
binder.item("ping period"_str,progress_period);
binder.space();
binder.item("border"_str,progress_border);
binder.item("grayUp"_str,progress_grayUp);
binder.item("snowUp"_str,progress_snowUp);
binder.item("grayPing"_str,progress_grayPing);
binder.item("snowPing"_str,progress_snowPing);
binder.item("grayArrow"_str,progress_grayArrow);
binder.item("snowArrow"_str,progress_snowArrow);
binder.group("Scroll"_str);
binder.item("speedUp period"_str,scroll_speedUpPeriod);
binder.group("List"_str);
binder.item("net"_str,list_net);
binder.group("Line editor"_str);
binder.item("cursor blink period"_str,line_edit_period);
binder.space();
binder.item("round ext"_str,line_edit_ex);
binder.group("Scroll list"_str);
binder.item("title"_str,scroll_list_title);
binder.item("title top"_str,scroll_list_titleTop);
binder.item("title bottom"_str,scroll_list_titleBottom);
binder.group("Slider"_str);
binder.item("width"_str,slider_dxy);
binder.group("Spinor"_str);
binder.item("period"_str,spinor_period);
binder.group("Run button"_str);
binder.item("run"_str,run);
binder.item("period"_str,run_period);
binder.item("steps"_str,run_steps);
binder.group("Menu"_str);
binder.item("back"_str,menu_back);
binder.item("text"_str,menu_text);
binder.item("hilight"_str,menu_hilight);
binder.item("select"_str,menu_select);
binder.item("hot"_str,menu_hot);
binder.space();
binder.item("use hotcolor"_str,menu_hotcolor);
binder.group("Frames"_str);
binder.item("alert blink time"_str,blinkTime);
binder.item("alert blink period"_str,blinkPeriod);
binder.space();
binder.item("'Fatal error'"_str,text_Fatal_error);
binder.item("'<No hint available>'"_str,text_No_hint);
binder.space();
binder.item("?'Resize top-left'"_str,hint_ResizeTopLeft);
binder.item("?'Resize left'"_str,hint_ResizeLeft);
binder.item("?'Resize bottom-left'"_str,hint_ResizeBottomLeft);
binder.item("?'Resize bottom'"_str,hint_ResizeBottom);
binder.item("?'Resize bottom-right'"_str,hint_ResizeBottomRight);
binder.item("?'Resize right'"_str,hint_ResizeRight);
binder.item("?'Resize top-right'"_str,hint_ResizeTopRight);
binder.space();
binder.item("?'Open/close alert view'"_str,hint_Alert);
binder.item("?'Help on/off'"_str,hint_Help);
binder.item("?'Minimize'"_str,hint_Minimize);
binder.item("?'Maximize'"_str,hint_Maximize);
binder.item("?'Restore'"_str,hint_Restore);
binder.item("?'Close'"_str,hint_Close);
binder.space();
binder.item("frame width"_str,frame_dxy);
binder.item("title height"_str,title_dy);
binder.item("frame button width"_str,btn_dx);
binder.item("frame button height"_str,btn_dy);
binder.space();
binder.item("frame"_str,frame);
binder.item("hilight frame"_str,frameHilight);
binder.item("drag frame"_str,frameDrag);
binder.item("title"_str,title);
binder.item("active title"_str,titleActive);
binder.item("inactive title"_str,titleInactive);
binder.space();
binder.item("drag"_str,drag);
binder.item("hilight drag"_str,dragHilight);
binder.item("active drag"_str,dragActive);
binder.item("small size indicator"_str,dragSmall);
binder.space();
binder.item("button face"_str,btnFace);
binder.item("button hilight"_str,btnFaceHilight);
binder.item("button picture"_str,btnPict);
binder.item("button close picture"_str,btnPictClose);
binder.item("button alert picture"_str,btnPictAlert);
binder.item("button no-alert picture"_str,btnPictNoAlert);
binder.item("button close-alert picture"_str,btnPictCloseAlert);
binder.space();
binder.item("hint back"_str,hintBack);
binder.item("hint text"_str,hintText);
binder.item("hint border"_str,hintBorder);
binder.item("hint line width"_str,hintWidth);
binder.space();
binder.item("title font"_str,title_font);
binder.item("hint font"_str,hint_font);
binder.space();
binder.item("shade color"_str,shadeColor);
binder.item("shade alpha"_str,shadeAlpha);
binder.group("Exception window"_str);
binder.item("back"_str,exception_back);
binder.item("text"_str,exception_text);
binder.item("divider"_str,exception_divider);
binder.group("Message window"_str);
binder.item("knob box"_str,message_knob_dxy);
binder.group("File window"_str);
binder.item("alt box"_str,file_alt_dxy);
binder.space();
binder.item("slash accent"_str,file_accent);
binder.space();
binder.item("alt right"_str,file_faceRight);
binder.item("alt down"_str,file_faceDown);
binder.space();
binder.item("filter text"_str,file_filter_text);
binder.item("filter font"_str,file_filter_font);
binder.space();
binder.item("'New file'"_str,text_New_file);
binder.space();
binder.item("?'Hit list'"_str,hint_FileHitList);
binder.item("?'Add hit'"_str,hint_FileAddHit);
binder.item("?'Goto the parent'"_str,hint_FileUpdir);
binder.item("?'Current directory'"_str,hint_FileCurdir);
binder.item("?'Subdirectory list'"_str,hint_FileDirList);
binder.item("?'File list'"_str,hint_FileList);
binder.item("?'Make directory'"_str,hint_FileMakeDir);
binder.item("?'Remove directory'"_str,hint_FileRemoveDir);
binder.item("?'Alt new/existing file'"_str,hint_FileAlt);
binder.item("?'Enable filter'"_str,hint_FileEnableFilter);
binder.item("?'Delete filter'"_str,hint_FileDelFilter);
binder.item("?'Filename filter'"_str,hint_FileFilter);
binder.item("?'Add filter'"_str,hint_FileAddFilter);
binder.group("ConfigEditor window"_str);
binder.item("line width"_str,cfg_edit_width);
binder.item("mark height"_str,cfg_edit_mark_dy);
binder.item("line"_str,cfg_edit_line);
binder.space();
binder.item("width"_str,cfg_width);
binder.item("radius"_str,cfg_radius);
binder.item("mix length"_str,cfg_mix_len);
binder.item("mix width"_str,cfg_mix_width);
binder.item("white length"_str,cfg_white_len);
binder.item("palette row count"_str,cfg_pal_len);
binder.space();
binder.item("'all'"_str,text_cfg_all);
binder.item("'Coord'"_str,text_cfg_Coord);
binder.item("'MCoord'"_str,text_cfg_MCoord);
binder.item("'VColor'"_str,text_cfg_VColor);
binder.item("'Clr'"_str,text_cfg_Clr);
binder.item("'unsigned'"_str,text_cfg_unsigned);
binder.item("'String'"_str,text_cfg_String);
binder.item("'Point'"_str,text_cfg_Point);
binder.item("'Font'"_str,text_cfg_Font);
binder.item("'bool'"_str,text_cfg_bool);
binder.item("'Ratio'"_str,text_cfg_Ratio);
binder.space();
binder.item("'Set'"_str,text_cfg_Set);
binder.item("'Back'"_str,text_cfg_Back);
binder.item("'Save'"_str,text_cfg_Save);
binder.item("'Self'"_str,text_cfg_Self);
binder.space();
binder.item("?'item list'"_str,hint_cfg_list);
binder.item("?'Set'"_str,hint_cfg_Set);
binder.item("?'Back'"_str,hint_cfg_Back);
binder.item("?'Save'"_str,hint_cfg_Save);
binder.item("?'Self'"_str,hint_cfg_Self);
binder.space();
binder.item("?'x-coord'"_str,hint_cfg_x);
binder.item("?'y-coord'"_str,hint_cfg_y);
binder.item("?'divisible'"_str,hint_cfg_a);
binder.item("?'divider'"_str,hint_cfg_b);
binder.space();
binder.item("'scalable'"_str,text_cfg_scalable);
binder.item("'monospace'"_str,text_cfg_monospace);
binder.item("'bold'"_str,text_cfg_bold);
binder.item("'italic'"_str,text_cfg_italic);
binder.space();
binder.item("'Hint'"_str,text_cfg_Hint);
binder.space();
binder.item("'No hint'"_str,text_cfg_no_hint);
binder.item("'Native hint'"_str,text_cfg_native_hint);
binder.item("'Auto hint'"_str,text_cfg_auto_hint);
binder.space();
binder.item("'Smooth'"_str,text_cfg_Smooth);
binder.space();
binder.item("'No smooth'"_str,text_cfg_no_smooth);
binder.item("'Smooth'"_str,text_cfg_smooth);
binder.item("'LCD RGB'"_str,text_cfg_RGB);
binder.item("'LCD BGR'"_str,text_cfg_BGR);
binder.space();
binder.item("'Kerning'"_str,text_cfg_kerning);
binder.item("'Strength'"_str,text_cfg_strength);
binder.item("'sample'"_str,text_cfg_sample);
binder.item("'table'"_str,text_cfg_table);
binder.space();
binder.item("?'Font file list'"_str,hint_cfg_font_list);
binder.item("?'Font height'"_str,hint_cfg_height);
binder.item("?'Enable font length'"_str,hint_cfg_length_enable);
binder.item("?'Font length'"_str,hint_cfg_length);
binder.space();
binder.item("?'Color hint'"_str,hint_cfg_color);
binder.group("FontSelect window"_str);
binder.item("frame title"_str,font_select_title);
binder.group("FontReplace window"_str);
binder.item("frame title"_str,font_replace_title);
binder.group("FavList window"_str);
binder.item("text"_str,fav_text);
binder.item("text select"_str,fav_text_select);
binder.item("section text"_str,fav_section_text);
binder.item("section back"_str,fav_section_back);
binder.group("Fav window"_str);
binder.item("?'Insert current book'"_str,hint_Ins);
binder.item("?'Move selected item up'"_str,hint_MoveUp);
binder.item("?'Move selected item down'"_str,hint_MoveDown);
binder.item("?'Open all sections'"_str,hint_OpenAll);
binder.item("?'Close all sections'"_str,hint_CloseAll);
binder.item("?'Delete selected item'"_str,hint_Del);
binder.item("?'Enter a section name here'"_str,hint_SectionName);
binder.item("?'Path of the selected book'"_str,hint_Path);
}
void UserPreferenceBag::findFonts() // Update fonts here
{
DialogFontLookup dev;
label_font=dev.build("Georgia"_c|Italic,18);
contour_font=dev.build("Microsoft Sans Serif"_c,20);
button_font=dev.build("Tahoma"_c,20,Bolder(20));
message_font=dev.build("Bookman Old Style"_c,20);
info_font=dev.build("Bookman Old Style"_c,18);
line_edit_font=dev.build("Segoe UI"_c|Italic,20);
list_font=dev.build("Bookman Old Style"_c|Italic,18);
menu_font=dev.build("Georgia"_c|Italic,17);
spinor_font=dev.build("Anonymous Pro"_c,22,Bolder(20));
fav_font=dev.build("Bookman Old Style"_c|Italic,20);
code_font=dev.build("Anonymous Pro"_c,20,Bolder(20));
title_font=dev.build("Times New Roman"_c,28);
hint_font=dev.build("Bookman Old Style"_c|Bold|Italic,17);
file_filter_font=dev.build("Anonymous Pro"_c,20,Bolder(20));
}
/* class UserPreference */
StrLen UserPreference::PrefFile() { return "/UserPreference.ddl"_c; }
UserPreference::UserPreference() noexcept
{
}
UserPreference::~UserPreference()
{
}
void UserPreference::sync() noexcept
{
if( !syncHome(HomeKey(),PrefFile()) )
{
ref().findFonts();
update();
}
}
void UserPreference::update() noexcept
{
updateHome(HomeKey(),PrefFile());
}
} // namespace Video
} // namespace CCore
|
<reponame>Dung1128/GoGoApp
const fs = require('fs');
function processGradle() {
console.log('################################');
console.log('# Upgrade Android build.gradle #');
console.log('################################\n');
if (!fs.existsSync('./node_modules')) {
console.log('node_modules directory does not exists');
return;
}
const dirs = fs.readdirSync('./node_modules');
const subDirs = [];
dirs.forEach(dir => {
let exists = fs.existsSync(`./node_modules/${dir}/android/build.gradle`);
if (exists) {
subDirs.push(`./node_modules/${dir}/android/build.gradle`);
return true;
}
exists = fs.existsSync(`./node_modules/${dir}/ReactAndroid/build.gradle`);
if (exists) {
subDirs.push(`./node_modules/${dir}/ReactAndroid/build.gradle`);
return true;
}
exists = fs.existsSync(`./node_modules/${dir}/src/android/build.gradle`);
if (exists) {
subDirs.push(`./node_modules/${dir}/src/android/build.gradle`);
return true;
}
exists = fs.existsSync(`./node_modules/${dir}/lib/android/build.gradle`);
if (exists) {
subDirs.push(`./node_modules/${dir}/lib/android/build.gradle`);
}
});
subDirs.forEach(gradle => {
console.log(`Processing "${gradle}"`);
let content = fs.readFileSync(gradle).toString();
content = content.split(/compile\s/).join('implementation ');
content = content
.split(/androidTestCompile\s/)
.join('androidTestImplementation ');
content = content.split(/testCompile\s/).join('testImplementation ');
content = content.split(/debugCompile\s/).join('debugImplementation ');
content = content.split(/testApi\s/).join('testImplementation ');
content = content.split(/provided\s/).join('compileOnly ');
fs.writeFileSync(gradle, content);
console.log(`Processed file: ${gradle}`);
});
}
processGradle();
|
const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp');
const expect = require('chai').expect;
describe('Oid tests', function() {
const OID = openpgp.OID;
const util = openpgp.util;
const p256_oid = new Uint8Array([0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07]);
const p384_oid = new Uint8Array([0x2B, 0x81, 0x04, 0x00, 0x22]);
const p521_oid = new Uint8Array([0x2B, 0x81, 0x04, 0x00, 0x23]);
it('Constructing', function() {
const oids = [p256_oid, p384_oid, p521_oid];
oids.forEach(function (data) {
const oid = new OID(data);
expect(oid).to.exist;
expect(oid.oid).to.exist;
expect(oid.oid).to.have.length(data.length);
expect(oid.toHex()).to.equal(util.Uint8Array_to_hex(data));
});
});
it('Reading and writing', function() {
const oids = [p256_oid, p384_oid, p521_oid];
oids.forEach(function (data) {
data = openpgp.util.concatUint8Array([new Uint8Array([data.length]), data]);
const oid = new OID();
expect(oid.read(data)).to.equal(data.length);
expect(oid.oid).to.exist;
expect(oid.oid).to.have.length(data.length-1);
expect(oid.toHex()).to.equal(util.Uint8Array_to_hex(data.subarray(1)));
const result = oid.write();
expect(result).to.exist;
expect(result).to.have.length(data.length);
expect(result[0]).to.equal(data.length-1);
expect(
util.Uint8Array_to_hex(result.subarray(1))
).to.equal(util.Uint8Array_to_hex(data.subarray(1)));
});
});
});
|
import numpy as np
import pandas as pd
def data_analysis(data):
# Get the descriptive statistics
desc_stats = data.describe()
# Calculate the mean, median, mode, etc.
summary_stats = data.agg(['mean', 'median', 'mode'])
# Create a plot of the data
data.plot()
# Write the output to a CSV file
data.to_csv('data_stats.csv') |
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
# The following approach to retrieve the version number is inspired by this
# comment:
#
# https://github.com/zestsoftware/zest.releaser/issues/37#issuecomment-14496733
#
# With this approach, development installs always show the right version number
# and do not require a reinstall (as the definition of the verdion umber in
# this setup file would).
version = 'no version defined'
current_dir = os.path.dirname(__file__)
with open(os.path.join(current_dir, "skempy", "__init__.py")) as f:
rx = re.compile("__version__ = '(.*)'")
for line in f:
m = rx.match(line)
if m:
version = m.group(1)
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='skempy',
version=version,
description='Provides functionality to support Python development in Emacs',
long_description=readme,
author='<NAME>',
author_email='<EMAIL>',
# url='home page of the project',
license=license,
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
'console_scripts': [
'skempy-find-test=skempy.find_path:main',
],
},
)
|
import Hascalator.Prelude.{Bool, False, True}
import scala.language.implicitConversions
/**
* Root package of Hascalator.
*
* @author Glavo
* @since 0.1.0
*/
package object Hascalator {
type ⊥ = scala.Nothing
type `_|_` = scala.Nothing
type Int = Data.Int.Int
/**
* Checks that the specified object reference is not `null`. This
* method is designed primarily for doing parameter validation in methods
* and constructors, as demonstrated below:
*/
def requireNonNull[T](obj: T): T = {
if (obj == null)
throw new NullPointerException
else obj
}
implicit def booleanToBool(b: Boolean): Bool = {
if (b) True
else False
}
implicit def boolToBoolean(b: Bool): Boolean = {
requireNonNull(b)
if (b == True) true
else false
}
}
|
<reponame>samlanning/hub-detect
/**
* hub-detect
*
* Copyright (C) 2018 Black Duck Software, Inc.
* http://www.blackducksoftware.com/
*
* 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 com.blackducksoftware.integration.hub.detect.tool.signaturescanner;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.blackducksoftware.integration.hub.detect.configuration.DetectProperty;
import com.blackducksoftware.integration.hub.detect.exception.DetectUserFriendlyException;
import com.blackducksoftware.integration.hub.detect.exitcode.ExitCodeType;
import com.blackducksoftware.integration.hub.detect.lifecycle.shutdown.ExitCodeRequest;
import com.blackducksoftware.integration.hub.detect.workflow.codelocation.CodeLocationNameManager;
import com.blackducksoftware.integration.hub.detect.workflow.event.Event;
import com.blackducksoftware.integration.hub.detect.workflow.event.EventSystem;
import com.blackducksoftware.integration.hub.detect.workflow.file.DetectFileFinder;
import com.blackducksoftware.integration.hub.detect.workflow.file.DirectoryManager;
import com.blackducksoftware.integration.hub.detect.workflow.hub.ExclusionPatternCreator;
import com.blackducksoftware.integration.hub.detect.workflow.status.SignatureScanStatus;
import com.blackducksoftware.integration.hub.detect.workflow.status.StatusType;
import com.synopsys.integration.blackduck.signaturescanner.ScanJob;
import com.synopsys.integration.blackduck.signaturescanner.ScanJobBuilder;
import com.synopsys.integration.blackduck.signaturescanner.ScanJobManager;
import com.synopsys.integration.blackduck.signaturescanner.ScanJobOutput;
import com.synopsys.integration.blackduck.signaturescanner.command.ScanCommandOutput;
import com.synopsys.integration.blackduck.signaturescanner.command.ScanTarget;
import com.synopsys.integration.blackduck.signaturescanner.command.SnippetMatching;
import com.synopsys.integration.blackduck.summary.Result;
import com.synopsys.integration.exception.IntegrationException;
import com.synopsys.integration.util.NameVersion;
public abstract class BlackDuckSignatureScanner {
private final Logger logger = LoggerFactory.getLogger(BlackDuckSignatureScanner.class);
private final DirectoryManager directoryManager;
private final DetectFileFinder detectFileFinder;
private final CodeLocationNameManager codeLocationNameManager;
private final BlackDuckSignatureScannerOptions signatureScannerOptions;
private final EventSystem eventSystem;
private final ScanJobManager scanJobManager;
public BlackDuckSignatureScanner(final DirectoryManager directoryManager, final DetectFileFinder detectFileFinder, final CodeLocationNameManager codeLocationNameManager,
final BlackDuckSignatureScannerOptions signatureScannerOptions, EventSystem eventSystem, final ScanJobManager scanJobManager) {
this.directoryManager = directoryManager;
this.detectFileFinder = detectFileFinder;
this.codeLocationNameManager = codeLocationNameManager;
this.signatureScannerOptions = signatureScannerOptions;
this.eventSystem = eventSystem;
this.scanJobManager = scanJobManager;
}
protected abstract ScanJob createScanJob(NameVersion projectNameVersion, File installDirectory, List<SignatureScanPath> signatureScanPaths, File dockerTarFile);
public void performScanActions(NameVersion projectNameVersion, File installDirectory, File dockerTarFile) throws InterruptedException, IntegrationException, DetectUserFriendlyException, IOException {
scanPaths(projectNameVersion, installDirectory, dockerTarFile);
}
private void scanPaths(final NameVersion projectNameVersion, File installDirectory, File dockerTarFile) throws IntegrationException, InterruptedException, IOException {
List<SignatureScanPath> signatureScanPaths = determinePathsAndExclusions(projectNameVersion, signatureScannerOptions.getMaxDepth(), dockerTarFile);
final ScanJob scanJob = createScanJob(projectNameVersion, installDirectory, signatureScanPaths, dockerTarFile);
List<ScanCommandOutput> scanCommandOutputs = new ArrayList<>();
try {
final ScanJobOutput scanJobOutput = scanJobManager.executeScans(scanJob);
if (scanJobOutput.getScanCommandOutputs() != null) {
for (ScanCommandOutput scanCommandOutput : scanJobOutput.getScanCommandOutputs()) {
scanCommandOutputs.add(scanCommandOutput);
}
}
} catch (IOException e) {
throw new IntegrationException("Could not execute the scans: " + e.getMessage());
}
reportResults(signatureScanPaths, scanCommandOutputs);
}
private void reportResults(List<SignatureScanPath> signatureScanPaths, List<ScanCommandOutput> scanCommandOutputList) {
boolean anyFailed = false;
boolean anyExitCodeIs64 = false;
for (final SignatureScanPath target : signatureScanPaths) {
Optional<ScanCommandOutput> targetOutput = scanCommandOutputList.stream()
.filter(output -> output.getScanTarget().equals(target.targetPath))
.findFirst();
StatusType scanStatus;
if (!targetOutput.isPresent()) {
scanStatus = StatusType.FAILURE;
logger.info(String.format("Scanning target %s was never scanned by the BlackDuck CLI.", target.targetPath));
} else {
ScanCommandOutput output = targetOutput.get();
if (output.getResult() == Result.FAILURE) {
scanStatus = StatusType.FAILURE;
if (output.getException().isPresent() && output.getErrorMessage().isPresent()) {
logger.error(String.format("Scanning target %s failed: %s", target.targetPath, output.getErrorMessage().get()));
logger.debug(output.getErrorMessage().get(), output.getException().get());
} else if (output.getErrorMessage().isPresent()) {
logger.error(String.format("Scanning target %s failed: %s", target.targetPath, output.getErrorMessage().get()));
} else {
logger.error(String.format("Scanning target %s failed for an unknown reason.", target.targetPath));
}
if (output.getScanExitCode().isPresent()) {
anyExitCodeIs64 = anyExitCodeIs64 || output.getScanExitCode().get() == 64;
}
} else {
scanStatus = StatusType.SUCCESS;
logger.info(String.format("%s was successfully scanned by the BlackDuck CLI.", target.targetPath));
}
}
anyFailed = anyFailed || scanStatus == StatusType.FAILURE;
eventSystem.publishEvent(Event.StatusSummary, new SignatureScanStatus(target.targetPath, scanStatus));
}
if (anyFailed) {
eventSystem.publishEvent(Event.ExitCode, new ExitCodeRequest(ExitCodeType.FAILURE_SCAN));
}
if (anyExitCodeIs64) {
logger.error("");
logger.error("Signature scanner returned 64. The most likely cause is you are using an unsupported version of Black Duck (<5.0.0).");
logger.error("You should update your Black Duck or downgrade your version of detect.");
logger.error("If you are using the detect scripts, you can use DETECT_LATEST_RELEASE_VERSION.");
logger.error("");
eventSystem.publishEvent(Event.ExitCode, new ExitCodeRequest(ExitCodeType.FAILURE_BLACKDUCK_VERSION_NOT_SUPPORTED));
}
}
private List<SignatureScanPath> determinePathsAndExclusions(final NameVersion projectNameVersion, Integer maxDepth, File dockerTarFile) throws IntegrationException, IOException {
final String[] providedSignatureScanPaths = signatureScannerOptions.getSignatureScannerPaths();
final boolean userProvidedScanTargets = null != providedSignatureScanPaths && providedSignatureScanPaths.length > 0;
final String[] providedExclusionPatterns = signatureScannerOptions.getExclusionPatterns();
final String[] hubSignatureScannerExclusionNamePatterns = signatureScannerOptions.getExclusionNamePatterns();
List<SignatureScanPath> signatureScanPaths = new ArrayList<>();
if (null != projectNameVersion.getName() && null != projectNameVersion.getVersion() && userProvidedScanTargets) {
for (final String path : providedSignatureScanPaths) {
logger.info(String.format("Registering explicit scan path %s", path));
SignatureScanPath scanPath = createScanPath(path, maxDepth, hubSignatureScannerExclusionNamePatterns, providedExclusionPatterns);
signatureScanPaths.add(scanPath);
}
} else if (dockerTarFile != null) {
SignatureScanPath scanPath = createScanPath(dockerTarFile.getCanonicalPath(), maxDepth, hubSignatureScannerExclusionNamePatterns, providedExclusionPatterns);
signatureScanPaths.add(scanPath);
} else {
final String sourcePath = directoryManager.getSourceDirectory().getAbsolutePath();
if (userProvidedScanTargets) {
logger.warn(String.format("No Project name or version found. Skipping User provided scan targets - registering the source path %s to scan", sourcePath));
} else {
logger.info(String.format("No scan targets provided - registering the source path %s to scan", sourcePath));
}
SignatureScanPath scanPath = createScanPath(sourcePath, maxDepth, hubSignatureScannerExclusionNamePatterns, providedExclusionPatterns);
signatureScanPaths.add(scanPath);
}
return signatureScanPaths;
}
private SignatureScanPath createScanPath(final String path, Integer maxDepth, final String[] hubSignatureScannerExclusionNamePatterns, final String[] providedExclusionPatterns) throws IntegrationException {
try {
final File target = new File(path);
final String targetPath = target.getCanonicalPath();
final ExclusionPatternCreator exclusionPatternCreator = new ExclusionPatternCreator(detectFileFinder, target);
final String maxDepthHitMsg = String.format("Maximum depth %d hit while traversing source tree to generate signature scanner exclusion patterns. To search deeper, adjust the value of property %s",
maxDepth, DetectProperty.DETECT_BLACKDUCK_SIGNATURE_SCANNER_EXCLUSION_PATTERN_SEARCH_DEPTH.getPropertyName());
final Set<String> scanExclusionPatterns = exclusionPatternCreator.determineExclusionPatterns(maxDepthHitMsg, maxDepth, hubSignatureScannerExclusionNamePatterns);
if (null != providedExclusionPatterns) {
for (final String providedExclusionPattern : providedExclusionPatterns) {
scanExclusionPatterns.add(providedExclusionPattern);
}
}
SignatureScanPath signatureScanPath = new SignatureScanPath();
signatureScanPath.targetPath = targetPath;
signatureScanPath.exclusions.addAll(scanExclusionPatterns);
return signatureScanPath;
} catch (final IOException e) {
throw new IntegrationException(e.getMessage(), e);
}
}
protected ScanJobBuilder createDefaultScanJobBuilder(final NameVersion projectNameVersion, File installDirectory, final List<SignatureScanPath> signatureScanPaths, File dockerTarFile) {
final ScanJobBuilder scanJobBuilder = new ScanJobBuilder();
scanJobBuilder.scanMemoryInMegabytes(signatureScannerOptions.getScanMemory());
scanJobBuilder.installDirectory(installDirectory);
scanJobBuilder.outputDirectory(directoryManager.getScanOutputDirectory());
scanJobBuilder.dryRun(signatureScannerOptions.getDryRun());
scanJobBuilder.cleanupOutput(signatureScannerOptions.getCleanupOutput());
if (signatureScannerOptions.getSnippetMatching()) {
scanJobBuilder.snippetMatching(SnippetMatching.SNIPPET_MATCHING);
}
scanJobBuilder.additionalScanArguments(signatureScannerOptions.getAdditionalArguments());
final String projectName = projectNameVersion.getName();
final String projectVersionName = projectNameVersion.getVersion();
scanJobBuilder.projectAndVersionNames(projectName, projectVersionName);
final String sourcePath = directoryManager.getSourceDirectory().getAbsolutePath();
final String prefix = signatureScannerOptions.getCodeLocationPrefix();
final String suffix = signatureScannerOptions.getCodeLocationSuffix();
String dockerTarFilename = null;
if (dockerTarFile != null) {
dockerTarFilename = dockerTarFile.getName();
}
for (final SignatureScanPath scanPath : signatureScanPaths) {
final String codeLocationName = codeLocationNameManager.createScanCodeLocationName(sourcePath, scanPath.targetPath, dockerTarFilename, projectName, projectVersionName, prefix, suffix);
scanJobBuilder.addTarget(ScanTarget.createBasicTarget(scanPath.targetPath, scanPath.exclusions, codeLocationName));
}
return scanJobBuilder;
}
} |
async fn prune(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
let channel = msg.channel_id;
let total = args.find::<u64>()?;
// Retrieve the messages from the channel
let messages = channel.messages(ctx, |retriever| {
retriever.limit(total + 1) // Include the command message
}).await?;
// Delete the retrieved messages
for message in messages.iter() {
channel.delete_message(ctx, message).await?;
}
// Notify the user about the successful pruning
let response = format!("Successfully pruned {} messages.", total);
msg.channel_id.say(ctx, response).await?;
Ok(())
} |
#!/bin/sh
mkdir -pv classes target
clojure -M -e "(compile 'sysinfo)"
clojure -M:uberdeps --main-class sysinfo
|
angular.module('footer', [])
.controller('FooterController', ['$scope', 'Settings', 'Docker', function ($scope, Settings, Docker) {
$scope.template = 'app/components/footer/statusbar.html';
$scope.uiVersion = Settings.uiVersion;
Docker.get({}, function (d) {
$scope.apiVersion = d.ApiVersion;
});
}]);
|
<gh_stars>1-10
//
// BGModelInfo.h
// BGFMDB
//
// Created by huangzhibiao on 17/2/22.
// Copyright © 2017年 Biao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface BGModelInfo : NSObject
//属性名
@property (nonatomic, copy, readonly) NSString *propertyName;
//属性的类型
@property (nonatomic, copy, readonly) NSString *propertyType;
//属性值
@property (nonatomic, strong, readonly) id propertyValue;
//保存到数据库的列名
@property (nonatomic, copy, readonly) NSString *sqlColumnName;
//保存到数据库的类型
@property (nonatomic, copy, readonly) NSString *sqlColumnType;
//保存到数据库的值
@property (nonatomic, strong, readonly) id sqlColumnValue;
//获取对象相关信息
+(NSArray<BGModelInfo*>*)modelInfoWithObject:(id)object;
@end
NS_ASSUME_NONNULL_END
|
package irutil
import (
"strings"
"github.com/llir/llvm/ir"
)
// Comment is an LLVM IR comment represented as a pseudo-instruction. Comment
// implements ir.Instruction.
type Comment struct {
// Comment text; may contain multiple lines.
Text string
// embed ir.Instruction to satisfy the ir.Instruction interface.
ir.Instruction
}
// LLString returns the LLVM syntax representation of the value.
func (c *Comment) LLString() string {
// handle multi-line comments.
text := strings.ReplaceAll(c.Text, "\n", "; ")
return "; " + text
}
// NewComment returns a new LLVM IR comment represented as a pseudo-instruction.
// Text may contain multiple lines.
func NewComment(text string) *Comment {
return &Comment{
Text: text,
}
}
|
<filename>codes/java/concurrency/src/test/java/tamp/appendix1/Software/software/MonitorQueueTest.java
/*
* MonitorQueueTest.java
* JUnit based test
*
* Created on December 27, 2005, 11:15 PM
*/
package tamp.appendix1.Software.software;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* @author <NAME>
*/
public class MonitorQueueTest extends TestCase {
private final static int THREADS = 8;
private final static int TEST_SIZE = 512;
private final static int PER_THREAD = TEST_SIZE / THREADS;
int index;
MonitorQueue instance;
boolean[] map = new boolean[TEST_SIZE];
Thread[] thread = new Thread[THREADS];
public MonitorQueueTest(String testName) {
super(testName);
instance = new MonitorQueue(TEST_SIZE);
}
public static Test suite() {
TestSuite suite = new TestSuite(MonitorQueueTest.class);
return suite;
}
/**
* Sequential calls.
*/
public void testSequential() {
System.out.println("sequential push and pop");
for (int i = 0; i < TEST_SIZE; i++) {
instance.enq(i);
}
for (int i = 0; i < TEST_SIZE; i++) {
int j = (Integer) instance.deq();
if (j != i) {
fail("bad deq: " + j + " expected " + i);
}
}
}
/**
* Parallel enMonitorQueues, sequential deMonitorQueues
*/
public void testParallelEnq() throws Exception {
System.out.println("parallel enq");
for (int i = 0; i < THREADS; i++) {
thread[i] = new EnqThread(i * PER_THREAD);
}
for (int i = 0; i < THREADS; i++) {
thread[i].start();
}
for (int i = 0; i < THREADS; i++) {
thread[i].join();
}
for (int i = 0; i < TEST_SIZE; i++) {
int j = (Integer) instance.deq();
if (map[j]) {
fail("duplicate pop: " + j);
} else {
map[j] = true;
}
}
}
/**
* Sequential enMonitorQueues, parallel deMonitorQueues
*/
public void testParallelDeq() throws Exception {
System.out.println("parallel deq");
for (int i = 0; i < TEST_SIZE; i++) {
map[i] = false;
}
for (int i = 0; i < TEST_SIZE; i++) {
instance.enq(i);
}
for (int i = 0; i < THREADS; i++) {
thread[i] = new DeqThread();
}
for (int i = 0; i < THREADS; i++) {
thread[i].start();
}
for (int i = 0; i < THREADS; i++) {
thread[i].join();
}
}
/**
* Sequential enMonitorQueues, parallel deMonitorQueues
*/
public void testParallelBoth() throws Exception {
System.out.println("parallel both");
Thread[] myThreads = new Thread[2 * THREADS];
for (int i = 0; i < THREADS; i++) {
myThreads[i] = new EnqThread(i * PER_THREAD);
myThreads[i + THREADS] = new DeqThread();
}
for (int i = 0; i < 2 * THREADS; i++) {
myThreads[i].start();
}
for (int i = 0; i < 2 * THREADS; i++) {
myThreads[i].join();
}
}
class EnqThread extends Thread {
int value;
EnqThread(int i) {
value = i;
}
public void run() {
for (int i = 0; i < PER_THREAD; i++) {
instance.enq(value + i);
}
}
}
class DeqThread extends Thread {
public void run() {
for (int i = 0; i < PER_THREAD; i++) {
int value = (Integer) instance.deq();
if (map[value]) {
fail("DeqThread: duplicate pop");
}
map[value] = true;
}
}
}
}
|
<filename>node_modules/react-icons-kit/oct/search.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.search = void 0;
var search = {
"viewBox": "0 0 16 16",
"children": [{
"name": "path",
"attribs": {
"fill-rule": "evenodd",
"d": "M15.7 13.3l-3.81-3.83A5.93 5.93 0 0013 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 000-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"
},
"children": []
}],
"attribs": {}
};
exports.search = search; |
class Library
def initialize
@cd_collection = Array.new
end
def add(album)
@cd_collection.push(album)
end
def list
puts "Collection: \n\n"
@cd_collection.each_with_index do |album, index|
puts (index + 1).to_s + ". " + album.to_s
end
puts
end
def count
@cd_collection.count
end
def delete(index)
if index < @cd_collection.count
@cd_collection.delete_at(index)
puts "Deleted element with index: " + index.to_s
end
end
end
|
<filename>app/controllers/campaigns_controller.rb
# キャンペーン用コントローラ
class CampaignsController < ApplicationController
before_action :set_campaign, only: [:edit, :update, :destroy]
# 一覧表示
def index
unless params[:cuepoint_id]
@campaigns = Campaign.all
else
# 下記はVAST URL呼び出しを想定
@cuepoint = Cuepoint.find(params[:cuepoint_id])
@campaigns = Campaign.current_available(@cuepoint)
response.headers['Access-Control-Allow-Origin'] = request.headers['Origin'] || '*'
response.headers['Access-Control-Allow-Methods'] = 'GET'
headers['Access-Control-Request-Method'] = '*'
headers['Access-Control-Allow-Credentials'] = 'true'
headers['Access-Control-Allow-Headers'] = 'Origin, Content-Type'
end
end
# 新規
def new
@campaign = Campaign.new
end
def create
@campaign = Campaign.new(campaign_params)
if @campaign.save
flash[:success] = "Create Campaign"
redirect_to campaigns_url
else
flash.now[:danger] = "Invalid Values"
render :new
end
end
def edit
end
def update
if @campaign.update(campaign_params)
CampaignCuepoint.find_or_create_by(campaign_id: params[:id])
flash[:success] = "キャンペーンを登録しました"
redirect_to campaigns_url
else
flash.now[:danger] = "Invalid Values"
render :edit
end
end
def destroy
@campaign.destroy
flash[:success] = 'キャンペーンを削除しました'
redirect_to campaign_url
end
private
# キャンペーン用パラメータ
def set_campaign
@campaign = Campaign.find(params[:id])
end
def campaign_params
params.require(:campaign).permit(:name, :start_at, :end_at, :limit_start, :movie_url, cuepoint_ids: [])
end
end |
import {Component, ViewEncapsulation} from '@angular/core';
import {OrderService} from '../../../services/order.service';
@Component({
selector: 'order-pie-chart',
encapsulation: ViewEncapsulation.None,
providers: [OrderService],
template: require('./orderPieChart.html')
})
export class OrderPieChart {
public ordersTypesChartOptions = {
chartType: 'PieChart',
dataTable: [],
options: {is3D:true,
height: '230',
slices:{0:{color: 'green'}, 1:{color: 'pink'}, 2:{color: 'yellow'}, 3:{color: 'red'}},
backgroundColor: 'transparent'}
};
constructor(private orderService:OrderService) {
setInterval(() => {
this.ordersTypesChartOptions = Object.create(this.ordersTypesChartOptions);
this.orderService.getOrderTypesChartData()
.subscribe(
types => this.ordersTypesChartOptions.dataTable = types,
err => console.error('Error: ' + err)
);
}, 3000);
}
public ngOnInit() {
this.orderService.getOrderTypesChartData()
.subscribe(
types => this.ordersTypesChartOptions.dataTable = types,
err => console.error('Error: ' + err)
);
}
} |
<filename>src/main/java/io/github/lprakashv/patternmatcher4j/exceptions/ActionEvaluationException.java
package io.github.lprakashv.patternmatcher4j.exceptions;
public class ActionEvaluationException extends PMatcherException {
public ActionEvaluationException(
int index, Object matchedObject, String message, Throwable cause) {
super(index, matchedObject, message, cause);
}
}
|
step="core-dns-service"
printf "Starting to run ${step}\n"
. /etc/sysconfig/heat-params
_dns_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/coredns/}
_autoscaler_prefix=${CONTAINER_INFRA_PREFIX:-gcr.io/google_containers/}
CORE_DNS=/srv/magnum/kubernetes/manifests/kube-coredns.yaml
[ -f ${CORE_DNS} ] || {
echo "Writing File: $CORE_DNS"
mkdir -p $(dirname ${CORE_DNS})
cat << EOF > ${CORE_DNS}
apiVersion: v1
kind: ServiceAccount
metadata:
name: coredns
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:coredns
rules:
- apiGroups:
- ""
resources:
- endpoints
- services
- pods
- namespaces
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:coredns
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:coredns
subjects:
- kind: ServiceAccount
name: coredns
namespace: kube-system
---
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
data:
Corefile: |
.:53 {
errors
log stdout
health
kubernetes ${DNS_CLUSTER_DOMAIN} ${PORTAL_NETWORK_CIDR} ${PODS_NETWORK_CIDR} {
pods verified
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: coredns
namespace: kube-system
labels:
k8s-app: kube-dns
kubernetes.io/name: "CoreDNS"
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
k8s-app: kube-dns
template:
metadata:
labels:
k8s-app: kube-dns
spec:
priorityClassName: system-cluster-critical
serviceAccountName: coredns
tolerations:
# Make sure the pod can be scheduled on master kubelet.
- effect: NoSchedule
operator: Exists
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
nodeSelector:
beta.kubernetes.io/os: linux
containers:
- name: coredns
image: ${_dns_prefix}coredns:${COREDNS_TAG}
imagePullPolicy: IfNotPresent
resources:
limits:
memory: 170Mi
requests:
cpu: 100m
memory: 70Mi
args: [ "-conf", "/etc/coredns/Corefile" ]
volumeMounts:
- name: config-volume
mountPath: /etc/coredns
readOnly: true
- name: tmp
mountPath: /tmp
ports:
- containerPort: 53
name: dns
protocol: UDP
- containerPort: 53
name: dns-tcp
protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_BIND_SERVICE
drop:
- all
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
readinessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
dnsPolicy: Default
volumes:
- name: tmp
emptyDir: {}
- name: config-volume
configMap:
name: coredns
items:
- key: Corefile
path: Corefile
---
apiVersion: v1
kind: Service
metadata:
name: kube-dns
namespace: kube-system
annotations:
prometheus.io/port: "9153"
prometheus.io/scrape: "true"
labels:
k8s-app: kube-dns
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "CoreDNS"
spec:
selector:
k8s-app: kube-dns
clusterIP: ${DNS_SERVICE_IP}
ports:
- name: dns
port: 53
protocol: UDP
- name: dns-tcp
port: 53
protocol: TCP
- name: metrics
port: 9153
protocol: TCP
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: kube-dns-autoscaler
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: Reconcile
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:kube-dns-autoscaler
labels:
addonmanager.kubernetes.io/mode: Reconcile
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list"]
- apiGroups: [""]
resources: ["replicationcontrollers/scale"]
verbs: ["get", "update"]
- apiGroups: ["extensions"]
resources: ["deployments/scale", "replicasets/scale"]
verbs: ["get", "update"]
# Remove the configmaps rule once below issue is fixed:
# kubernetes-incubator/cluster-proportional-autoscaler#16
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "create"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:kube-dns-autoscaler
labels:
addonmanager.kubernetes.io/mode: Reconcile
subjects:
- kind: ServiceAccount
name: kube-dns-autoscaler
namespace: kube-system
roleRef:
kind: ClusterRole
name: system:kube-dns-autoscaler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-dns-autoscaler
namespace: kube-system
labels:
k8s-app: kube-dns-autoscaler
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
selector:
matchLabels:
k8s-app: kube-dns-autoscaler
template:
metadata:
labels:
k8s-app: kube-dns-autoscaler
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
priorityClassName: system-cluster-critical
containers:
- name: autoscaler
image: ${_autoscaler_prefix}cluster-proportional-autoscaler-${ARCH}:1.1.2
resources:
requests:
cpu: "20m"
memory: "10Mi"
command:
- /cluster-proportional-autoscaler
- --namespace=kube-system
- --configmap=kube-dns-autoscaler
# Should keep target in sync with above coredns deployment name
- --target=Deployment/coredns
# When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
# If using small nodes, "nodesPerReplica" should dominate.
- --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"preventSinglePointFailure":true}}
- --logtostderr=true
- --v=2
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"
serviceAccountName: kube-dns-autoscaler
EOF
}
echo "Waiting for Kubernetes API..."
until [ "ok" = "$(kubectl get --raw='/healthz')" ]
do
sleep 5
done
kubectl apply --validate=false -f $CORE_DNS
printf "Finished running ${step}\n"
|
<filename>src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { TranslationProvider } from './translation'
const urlParams = new URLSearchParams(window.location.search);
const lang = urlParams.get('lang');
ReactDOM.render(
<TranslationProvider lang={lang}>
<App />
</TranslationProvider>,
document.getElementById('root')
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.register();
|
falias () {
CMD=$(
(
(alias)
(functions | grep "()" | cut -d ' ' -f1 | grep -v "^_" )
) | fzf | cut -d '=' -f1
);
eval $CMD
}
|
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, bool } from '@polkadot/types';
import type { AuthorityList, SetId } from '@polkadot/types/interfaces/grandpa';
import type { BlockNumber, H256, Header } from '@polkadot/types/interfaces/runtime';
/** @name BridgedBlockHash */
export interface BridgedBlockHash extends H256 {}
/** @name BridgedBlockNumber */
export interface BridgedBlockNumber extends BlockNumber {}
/** @name BridgedHeader */
export interface BridgedHeader extends Header {}
/** @name InitializationData */
export interface InitializationData extends Struct {
readonly header: Header;
readonly authorityList: AuthorityList;
readonly setId: SetId;
readonly isHalted: bool;
}
export type PHANTOM_BRIDGES = 'bridges';
|
<filename>Modules/Feature/Edge/test/otbLocalHough.cxx
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "itkMacro.h"
#include <iostream>
#include "otbImageFileReader.h"
#include "otbLocalHoughFilter.h"
#include <iostream>
#include <fstream>
int otbLocalHough(int itkNotUsed(argc), char* argv[])
{
const char * inputFilename = argv[1];
const char * outfname = argv[2];
unsigned int RadiusX((unsigned int) ::atoi(argv[3]));
unsigned int RadiusY((unsigned int) ::atoi(argv[4]));
unsigned int NumberOfLines((unsigned int) ::atoi(argv[5]));
typedef unsigned char InputPixelType;
const unsigned int Dimension = 2;
typedef otb::Image<InputPixelType, Dimension> InputImageType;
typedef otb::LocalHoughFilter<InputImageType> FilterType;
FilterType::Pointer filter = FilterType::New();
typedef otb::ImageFileReader<InputImageType> ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(inputFilename);
reader->Update();
FilterType::SizeType Radius;
Radius[0] = RadiusX;
Radius[1] = RadiusY;
typedef otb::LineSpatialObjectList LinesListType;
LinesListType::Pointer list = LinesListType::New();
filter->SetRadius(Radius);
filter->SetNumberOfLines(NumberOfLines);
filter->SetInput(reader->GetOutput());
filter->Update();
list = filter->GetOutput();
LinesListType::const_iterator itList;
std::ofstream outfile(outfname);
outfile << "size of the Line list " << list->size() << std::endl;
for (itList = list->begin(); itList != list->end(); itList++)
outfile << (*itList)->GetPoints()[0].GetPosition() << " \t" << (*itList)->GetPoints()[1].GetPosition() <<
std::endl;
outfile.close();
return EXIT_SUCCESS;
}
|
<filename>packages/ui/rmwc/base/code/utils/deprecation.js<gh_stars>0
"use strict";
var __assign =
(this && this.__assign) ||
function () {
__assign =
Object.assign ||
function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) {
t[p] = s[p];
}
}
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.deprecationWarning = function (message) {
if (process && process.env && process.env.NODE_ENV !== "production") {
console.warn("RMWC Deprecation Warning: " + message);
}
};
exports.handleDeprecations = function (props, deprecate, displayName) {
props = __assign({}, props);
for (var oldPropName in deprecate) {
var newProp = deprecate[oldPropName];
var newPropName = void 0;
var transformProp = function (value) {
return value;
};
if (Array.isArray(newProp)) {
newPropName = newProp[0];
transformProp = newProp[1];
} else {
newPropName = newProp;
}
if (props[oldPropName] !== undefined) {
if (newPropName === "") {
/* istanbul ignore next */
exports.deprecationWarning(
(displayName || "") +
" component prop '" +
oldPropName +
"' has been removed from and is no longer a valid prop."
);
} else {
props[newPropName] = transformProp(props[oldPropName]);
var propTransformMessage = "";
if (props[newPropName] !== props[oldPropName]) {
propTransformMessage =
" The old value has also been converted from '" +
props[oldPropName] +
"' to '" +
props[newPropName] +
"'";
}
/* istanbul ignore next */
exports.deprecationWarning(
(displayName || "") +
" component prop '" +
oldPropName +
"' has been replaced with '" +
newPropName +
"'. " +
propTransformMessage
);
}
delete props[oldPropName];
}
}
return props;
};
|
#!/bin/bash -f
#*********************************************************************************************************
# Vivado (TM) v2020.1 (64-bit)
#
# Filename : design_1.sh
# Simulator : Xilinx Vivado Simulator
# Description : Simulation script for compiling, elaborating and verifying the project source files.
# The script will automatically create the design libraries sub-directories in the run
# directory, add the library logical mappings in the simulator setup file, create default
# 'do/prj' file, execute compilation, elaboration and simulation steps.
#
# Generated by Vivado on Sun Apr 11 17:33:50 EDT 2021
# SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
#
# Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
#
# usage: design_1.sh [-help]
# usage: design_1.sh [-lib_map_path]
# usage: design_1.sh [-noclean_files]
# usage: design_1.sh [-reset_run]
#
#*********************************************************************************************************
# Command line options
xv_boost_lib_path=/opt/Xilinx/Vitis/Vivado/2020.1/tps/boost_1_64_0
xvlog_opts="--relax"
xvhdl_opts="--relax"
# Script info
echo -e "design_1.sh - Script generated by export_simulation (Vivado v2020.1 (64-bit)-id)\n"
# Main steps
run()
{
check_args $# $1
setup $1 $2
compile
elaborate
simulate
}
# RUN_STEP: <compile>
compile()
{
# Compile design files
xvlog $xvlog_opts -prj vlog.prj 2>&1 | tee compile.log
xvhdl $xvhdl_opts -prj vhdl.prj 2>&1 | tee compile.log
}
# RUN_STEP: <elaborate>
elaborate()
{
xelab --relax --debug typical --mt auto -L xil_defaultlib -L axi_lite_ipif_v3_0_4 -L lib_pkg_v1_0_2 -L lib_srl_fifo_v1_0_2 -L lib_cdc_v1_0_2 -L axi_uartlite_v2_0_25 -L microblaze_v11_0_3 -L lmb_v10_v3_0_11 -L lmb_bram_if_cntlr_v4_0_18 -L blk_mem_gen_v8_4_4 -L mdm_v3_2_18 -L proc_sys_reset_v5_0_13 -L unisims_ver -L unimacro_ver -L secureip -L xpm --snapshot design_1 xil_defaultlib.design_1 xil_defaultlib.glbl -log elaborate.log
}
# RUN_STEP: <simulate>
simulate()
{
xsim design_1 -key {Behavioral:sim_1:Functional:design_1} -tclbatch cmd.tcl -protoinst "protoinst_files/design_1.protoinst" -log simulate.log
}
# STEP: setup
setup()
{
case $1 in
"-lib_map_path" )
if [[ ($2 == "") ]]; then
echo -e "ERROR: Simulation library directory path not specified (type \"./design_1.sh -help\" for more information)\n"
exit 1
fi
copy_setup_file $2
;;
"-reset_run" )
reset_run
echo -e "INFO: Simulation run files deleted.\n"
exit 0
;;
"-noclean_files" )
# do not remove previous data
;;
* )
copy_setup_file $2
esac
# Add any setup/initialization commands here:-
# <user specific commands>
}
# Copy xsim.ini file
copy_setup_file()
{
file="xsim.ini"
lib_map_path="/opt/Xilinx/Vitis/Vivado/2020.1/data/xsim"
if [[ ($1 != "") ]]; then
lib_map_path="$1"
fi
if [[ ($lib_map_path != "") ]]; then
src_file="$lib_map_path/$file"
if [[ -e $src_file ]]; then
cp $src_file .
fi
# Map local design libraries to xsim.ini
map_local_libs
fi
}
# Map local design libraries
map_local_libs()
{
updated_mappings=()
local_mappings=()
# Local design libraries
local_libs=(xil_defaultlib)
if [[ 0 == ${#local_libs[@]} ]]; then
return
fi
file="xsim.ini"
file_backup="xsim.ini.bak"
if [[ -e $file ]]; then
rm -f $file_backup
# Create a backup copy of the xsim.ini file
cp $file $file_backup
# Read libraries from backup file and search in local library collection
while read -r line
do
IN=$line
# Split mapping entry with '=' delimiter to fetch library name and mapping
read lib_name mapping <<<$(IFS="="; echo $IN)
# If local library found, then construct the local mapping and add to local mapping collection
if `echo ${local_libs[@]} | grep -wq $lib_name` ; then
line="$lib_name=xsim.dir/$lib_name"
local_mappings+=("$lib_name")
fi
# Add to updated library mapping collection
updated_mappings+=("$line")
done < "$file_backup"
# Append local libraries not found originally from xsim.ini
for (( i=0; i<${#local_libs[*]}; i++ )); do
lib_name="${local_libs[i]}"
if `echo ${local_mappings[@]} | grep -wvq $lib_name` ; then
line="$lib_name=xsim.dir/$lib_name"
updated_mappings+=("$line")
fi
done
# Write updated mappings in xsim.ini
rm -f $file
for (( i=0; i<${#updated_mappings[*]}; i++ )); do
lib_name="${updated_mappings[i]}"
echo $lib_name >> $file
done
else
for (( i=0; i<${#local_libs[*]}; i++ )); do
lib_name="${local_libs[i]}"
mapping="$lib_name=xsim.dir/$lib_name"
echo $mapping >> $file
done
fi
}
# Delete generated data from the previous run
reset_run()
{
files_to_remove=(xelab.pb xsim.jou xvhdl.log xvlog.log compile.log elaborate.log simulate.log xelab.log xsim.log run.log xvhdl.pb xvlog.pb design_1.wdb xsim.dir)
for (( i=0; i<${#files_to_remove[*]}; i++ )); do
file="${files_to_remove[i]}"
if [[ -e $file ]]; then
rm -rf $file
fi
done
}
# Check command line arguments
check_args()
{
if [[ ($1 == 1 ) && ($2 != "-lib_map_path" && $2 != "-noclean_files" && $2 != "-reset_run" && $2 != "-help" && $2 != "-h") ]]; then
echo -e "ERROR: Unknown option specified '$2' (type \"./design_1.sh -help\" for more information)\n"
exit 1
fi
if [[ ($2 == "-help" || $2 == "-h") ]]; then
usage
fi
}
# Script usage
usage()
{
msg="Usage: design_1.sh [-help]\n\
Usage: design_1.sh [-lib_map_path]\n\
Usage: design_1.sh [-reset_run]\n\
Usage: design_1.sh [-noclean_files]\n\n\
[-help] -- Print help information for this script\n\n\
[-lib_map_path <path>] -- Compiled simulation library directory path. The simulation library is compiled\n\
using the compile_simlib tcl command. Please see 'compile_simlib -help' for more information.\n\n\
[-reset_run] -- Recreate simulator setup files and library mappings for a clean run. The generated files\n\
from the previous run will be removed. If you don't want to remove the simulator generated files, use the\n\
-noclean_files switch.\n\n\
[-noclean_files] -- Reset previous run, but do not remove simulator generated files from the previous run.\n\n"
echo -e $msg
exit 1
}
# Launch script
run $1 $2
|
mv ~/.protoncore ~/.phasecore
mv ~/.phasecore/proton.conf ~/.phasecore/phase.conf
phased -daemon -index
|
// test helpers
package web_test
import (
"io/ioutil"
"net/http"
"net/http/cookiejar"
"net/http/httptest"
"strings"
"testing"
"github.com/alicebob/verssion/core"
)
var noRedirect = func(*http.Request, []*http.Request) error {
return http.ErrUseLastResponse
}
// get is a helper for GETs
func get(t *testing.T, s *httptest.Server, url string) (int, string) {
t.Helper()
c := s.Client()
c.CheckRedirect = noRedirect
if c.Jar == nil {
jar, err := cookiejar.New(nil)
if err != nil {
t.Fatal(err)
}
c.Jar = jar
}
r, err := s.Client().Get(s.URL + url)
if err != nil {
t.Fatal(err)
}
defer r.Body.Close()
b, err := ioutil.ReadAll(r.Body)
if err != nil {
t.Fatal(err)
}
return r.StatusCode, string(b)
}
// getRedirect does a GET and expects a redirect. Returns the Location header
func getRedirect(t *testing.T, s *httptest.Server, url string) string {
t.Helper()
c := s.Client()
c.CheckRedirect = noRedirect
r, err := s.Client().Get(s.URL + url)
if err != nil {
t.Fatal(err)
}
defer r.Body.Close()
switch c := r.StatusCode; c {
case 301, 302:
default:
t.Fatalf("not a redirect: %d", c)
}
return r.Header.Get("Location")
}
type test func(*testing.T, string)
func mustcontain(need string) test {
return func(t *testing.T, body string) {
t.Helper()
if in, want := body, need; !strings.Contains(in, want) {
t.Fatalf("no %q found in %q", want, in)
}
}
}
func mustnotcontain(need string) test {
return func(t *testing.T, body string) {
t.Helper()
if in, wantnot := body, need; strings.Contains(in, wantnot) {
t.Fatalf("%q found in %q", wantnot, in)
}
}
}
func with(t *testing.T, body string, tests ...test) {
t.Helper()
for _, test_ := range tests {
test_(t, body)
}
}
type FixedSpider struct {
pages map[string]core.Page
errs map[string]error
}
func NewFixedSpider(pages ...core.Page) *FixedSpider {
ps := map[string]core.Page{}
for _, p := range pages {
ps[p.Page] = p
}
return &FixedSpider{
pages: ps,
errs: map[string]error{},
}
}
var _ core.Spider = NewFixedSpider()
func (s *FixedSpider) Spider(page string) (*core.Page, error) {
if err, ok := s.errs[page]; ok && err != nil {
return nil, err
}
p, ok := s.pages[page]
if !ok {
return nil, core.ErrNotFound{Page: page}
}
return &p, nil
}
func (s *FixedSpider) SetError(page string, err error) {
s.errs[page] = err
}
|
/**
* Autogenerated code by SdkModelGenerator.
* Do not edit. Any modification on this file will be removed automatically after project build
*
*/
package test.backend.www.model.hotelbeds.basic.util;
import java.util.StringJoiner;
public class ObjectJoiner {
public static String join(CharSequence separator, Object... arguments) {
StringJoiner st = new StringJoiner(separator);
if (arguments != null) {
for (Object object : arguments) {
if (object != null) {
st.add(object.toString());
} else {
st.add("");
}
}
}
return st.toString();
}
public static String simplyJoin(Object... arguments) {
return join("", arguments);
}
}
|
module.exports = require('@dash4/config/jest.config');
|
#!/usr/bin/env bash
#------------------------------------------------------------------------------
# dotfiles
# m1 mac에 환경 복구
# Github URL: https://github.com/ic4r/dotfiles
#------------------------------------------------------------------------------
export DOTFILES=$HOME/dotfiles
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
if ! [[ -f $DOTFILES/.key.env.sh ]]; then
echo "키 변수파일(.key.env.sh)이 없습니다."; exit;
else
. .key.env.sh
echo "환경변수(.key.env.sh) 로딩..."
fi
read -p "홈폴더의 설정파일들을 덮어쓰게 되는데도 진심 실행하시렵니까? (y/n) " -n 1;
echo "";
if ! [[ $REPLY =~ ^[Yy]$ ]]; then
echo "=> 취소 되었습니다."
exit 1
fi;
cd "$(dirname "${BASH_SOURCE}")";
# dotfiles 업데이트
if [ -d "$DOTFILES/.git" ]; then
git --work-tree="$DOTFILES" --git-dir="$DOTFILES/.git" pull origin main
fi
# Command Line Tool 설치 (기본명령어 설치 /Library/Developer/CommandLineTools/usr/bin)
xcode-select --install
# Homebrew 설치가 안되어 있으면 설치
if ! [[ -x "$(command -v brew)" ]]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# [Apple Silicon M1] rosetta 2 설치 (x86 기반의 프로그램을 m1-arm64 환경에서 구동해주는 해석기)
if [[ "arm64" == $(arch) ]]; then
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
fi
# 주요파일 Symbolic link로 강제 update
for name in gitignore gitalias zshrc; do
ln -nfs $DOTFILES/.$name ~
done
#------------------------------------------------------------------------------
# Install executables and libraries
# Brewfile 백업 -> brew bundle dump -f
# Brewfile 복구 -> brew bundle --file=${DOTFILES}/Brewfile
#------------------------------------------------------------------------------
brew bundle --file=${DOTFILES}/Brewfile
#------------------------------------------------------------------------------
# Restore hammerspoon Config files
#------------------------------------------------------------------------------
# git clone git@github.com:ic4r/.hammerspoon.git ~/.hammerspoon
# 변경 => 설정코드는 dotfiles 폴더로 옮기고 symlink 걸어주도록 변경
ln -nfs $DOTFILES/.hammerspoon ~
#------------------------------------------------------------------------------
# Git & github 설정
#------------------------------------------------------------------------------
cat << EOF > ~/.gitconfig
[user]
signingkey = $GPG_KEY
[commit]
gpgsign = true
[init]
defaultBranch = main
[color]
ui = auto
[include]
path = ~/.gitalias
EOF
# github
brew install pinentry-mac # github gpg key pw-input window
mkdir -p ~/.gnupg && echo "pinentry-program /opt/homebrew/bin/pinentry-mac" > ~/.gnupg/gpg-agent.conf
# git-lfs
git lfs install
git config --global user.name "$NAME"
git config --global user.email "$EMAIL"
#한글파일명 처리
git config --global core.precomposeunicode true
git config --global core.quotepath false
#------------------------------------------------------------------------------
# Java 환경설정
#------------------------------------------------------------------------------
# For intel cpu (확인: arch -x86_64 java -version)
# brew install adoptopenjdk/openjdk/adoptopenjdk8 --cask
# brew install adoptopenjdk11 --cask
# For Apple silicon - M1 cpu (확인: arch -arm64 java -version)
brew install zulu8 --cask
# brew install zulu11 --cask
brew install openjdk # openjdk v17
jenv add $(/usr/libexec/java_home -v1.8)
jenv add $(/usr/libexec/java_home -v17)
#------------------------------------------------------------------------------
# iterm2 & shell 환경설정
#------------------------------------------------------------------------------
function install_iterm2() {
# Install - iterm2 shell integration and util
curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash
# Restore iterm2 config file
cp com.googlecode.iterm2.plist ~/Library/Preferences/com.googlecode.iterm2.plist
#oh-my-zsh 설치
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
#powerlevel9k theme 다운로드
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/themes/powerlevel9k
# cat <<EOF >> ~/.zshrc
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir vcs)
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status)
# EOF
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting #syntax-highlighting 플러그인 설치
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions #autosuggestion plugin 설치
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
}
# 최초설치시에만 실행
if ! [[ -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]]; then
install_iterm2
fi
#------------------------------------------------------------------------------
# vim 환경설정
#------------------------------------------------------------------------------
function install_vim() {
# amix/vimrc를 통하여 기본환경 구성
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
# Ctrl+f 단축키 매핑 변경 (기본설정은 페이지넘김 이슈)
sed -i '' 's/C-f/C-l/' ~/.vim_runtime/vimrcs/plugins_config.vim
# 옵션: vim brogrammer 색상테마 적용
mkdir -p ~/.vim/colors && curl https://raw.githubusercontent.com/marciomazza/vim-brogrammer-theme/master/colors/brogrammer.vim > ~/.vim/colors/brogrammer.vim
echo "colorscheme brogrammer" >> ~/.vimrc
}
# 최초설치시에만 실행
if [[ ! -d ~/.vim_runtime ]]; then
install_vim
fi
#------------------------------------------------------------------------------
# gpg & ssh 환경복구
# gpg 키는 bitwarden에 암호화되어 보관 (bitwarden -> base64 -> gpg 복구 -> ssh key 복구)
#------------------------------------------------------------------------------
# bitwarden에 저장된 gpg key를 추출한다.
sh import_gpg_ssh.sh
if ! [ 0 == "$?" ]; then echo "gpg key import fail."; exit; fi
#------------------------------------------------------------------------------
# Application
#------------------------------------------------------------------------------
# brew install --cask lens # docker/k8s admin ui & monitoring
# brew install --cask charles # HTTP Comunication Proxy Hooking (HTTP 디버깅)
# brew install --cask "authy" # OTP앱 - Authy Desktop 말고, 1/10 사이즈인 iPad용 authy 설치
# brew install --cask "shiftit" # 윈도우 이동
# source .macos
#------------------------------------------------------------------------------
# 복구 작업 완료 - backup.sh crontab에 등록 및 쓰잘데기 없는 알람기능
#------------------------------------------------------------------------------
# 작업완료를 알리는 고양이 - crontab 등록시 터미널경고가 발생하므로 사용자 액션을 넣어봄
nyancat
# crontab에 백업 스크립트 및 로그 제거 스크립트 등록
if [[ ! -d $DOTFILES/log ]]; then
# 로그폴더 생성 - .gitignore에 등록됨
mkdir -p $DOTFILES/log
# 매일 12시 정각 백업을 수행하고 로그를 남긴다.
CRONJOB="00 12 * * * yes | $DOTFILES/backup.sh > $DOTFILES/log/backup_\$(date +\%m\%d_\%H\%M).log 2>&1"
# 매일 12시10분에 30일 경과 로그를 삭제한다.
LOGDJOB="10 12 * * * find $DOTFILES/log -maxdepth 1 -mtime +30 -type f -exec rm -f {} \;"
# crontab 등록
(crontab -l && echo "$CRONJOB" && echo "$LOGDJOB") | crontab -
fi
# 일기예보 CLI API (윈도우사이즈:125에 최적화) - pc 환경설정을 끝냈으면 날씨 확인하고 밖에 나가자.
curl https://wttr.in/seoul -H "Accept-Language: ko-KR"
echo -e "\n👻 crontab list:"
crontab -l
echo -e "\n👏👏👏 macos configuration restore complete!!" |
<filename>realm/realm-library/src/objectServer/java/io/realm/internal/network/StreamNetworkTransport.java
/*
* Copyright 2020 Realm Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.realm.internal.network;
import java.io.IOException;
import io.realm.internal.objectstore.OsApp;
import io.realm.internal.objectstore.OsJavaNetworkTransport;
import io.realm.internal.objectstore.OsSyncUser;
/**
* StreamNetworkTransport provides an interface to the Realm remote streaming functions.
* Such functions are package protected and this class offers a portable way to access them.
*/
public class StreamNetworkTransport {
private final OsApp app;
private final OsSyncUser user;
public StreamNetworkTransport(OsApp app, OsSyncUser user) {
this.app = app;
this.user = user;
}
/**
* Creates a request for a streaming function
*
* @param functionName name of the function
* @param arguments function arguments encoded as a {@link String}
* @param serviceName service that will handle the function
* @return {@link io.realm.internal.objectstore.OsJavaNetworkTransport.Request}
*/
public OsJavaNetworkTransport.Request makeStreamingRequest(String functionName,
String arguments,
String serviceName){
return app.makeStreamingRequest(user, functionName, arguments, serviceName);
}
/**
* Executes a given request
*
* @param request to execute
* @return {@link io.realm.internal.objectstore.OsJavaNetworkTransport.Response}
* @throws IOException
*/
public OsJavaNetworkTransport.Response
sendRequest(OsJavaNetworkTransport.Request request) throws IOException{
return app.getNetworkTransport().sendStreamingRequest(request);
}
}
|
<gh_stars>1-10
/*
* 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 org.apache.flink.runtime.operators.lifecycle.graph;
import org.apache.flink.api.common.eventtime.SerializableTimestampAssigner;
import org.apache.flink.api.common.eventtime.Watermark;
import org.apache.flink.api.common.eventtime.WatermarkGenerator;
import org.apache.flink.api.common.eventtime.WatermarkOutput;
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.runtime.operators.lifecycle.TestJobWithDescription;
import org.apache.flink.runtime.operators.lifecycle.command.TestCommandDispatcher;
import org.apache.flink.runtime.operators.lifecycle.event.TestEventQueue;
import org.apache.flink.streaming.api.CheckpointingMode;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.MultipleConnectedStreams;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.sink.DiscardingSink;
import org.apache.flink.streaming.api.operators.ChainingStrategy;
import org.apache.flink.streaming.api.transformations.MultipleInputTransformation;
import org.apache.flink.testutils.junit.SharedObjects;
import org.apache.flink.util.function.ThrowingConsumer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import static java.util.Arrays.asList;
import static java.util.Collections.singleton;
import static java.util.Collections.singletonList;
import static org.apache.flink.api.common.restartstrategy.RestartStrategies.noRestart;
import static org.apache.flink.configuration.JobManagerOptions.EXECUTION_FAILOVER_STRATEGY;
/** Helper to build {@link TestJobWithDescription}. */
public class TestJobBuilders {
/** {@link TestJobWithDescription} builder. */
@FunctionalInterface
public interface TestingGraphBuilder {
TestJobWithDescription build(
SharedObjects shared,
ThrowingConsumer<Configuration, Exception> modifyConfig,
ThrowingConsumer<StreamExecutionEnvironment, Exception> modifyEnvironment)
throws Exception;
}
private TestJobBuilders() {}
public static final TestingGraphBuilder SIMPLE_GRAPH_BUILDER =
new TestingGraphBuilder() {
@Override
public TestJobWithDescription build(
SharedObjects shared,
ThrowingConsumer<Configuration, Exception> confConsumer,
ThrowingConsumer<StreamExecutionEnvironment, Exception> envConsumer)
throws Exception {
TestEventQueue eventQueue = TestEventQueue.createShared(shared);
TestCommandDispatcher commandQueue = TestCommandDispatcher.createShared(shared);
StreamExecutionEnvironment env = prepareEnv(confConsumer, envConsumer);
// using hashes so that operators emit identifiable events
String unitedSourceLeft = OP_ID_HASH_PREFIX + "1";
String mapForward = OP_ID_HASH_PREFIX + "5";
DataStream<TestDataElement> src =
env.addSource(
new TestEventSource(
unitedSourceLeft, eventQueue, commandQueue))
.setUidHash(unitedSourceLeft)
.assignTimestampsAndWatermarks(createWmAssigner());
SingleOutputStreamOperator<TestDataElement> forwardTransform =
src.transform(
"transform-1-forward",
TypeInformation.of(TestDataElement.class),
new OneInputTestStreamOperatorFactory(
mapForward, eventQueue, commandQueue))
.setUidHash(mapForward);
forwardTransform.addSink(new DiscardingSink<>());
Map<String, Integer> operatorsNumberOfInputs = new HashMap<>();
operatorsNumberOfInputs.put(mapForward, 1);
return new TestJobWithDescription(
env.getStreamGraph().getJobGraph(),
singleton(unitedSourceLeft),
new HashSet<>(singletonList(mapForward)),
new HashSet<>(asList(unitedSourceLeft, mapForward)),
operatorsNumberOfInputs,
eventQueue,
commandQueue);
}
@Override
public String toString() {
return "simple graph";
}
};
public static final TestingGraphBuilder COMPLEX_GRAPH_BUILDER =
new TestingGraphBuilder() {
@Override
public TestJobWithDescription build(
SharedObjects shared,
ThrowingConsumer<Configuration, Exception> confConsumer,
ThrowingConsumer<StreamExecutionEnvironment, Exception> envConsumer)
throws Exception {
TestEventQueue eventQueue = TestEventQueue.createShared(shared);
TestCommandDispatcher commandQueue = TestCommandDispatcher.createShared(shared);
StreamExecutionEnvironment env = prepareEnv(confConsumer, envConsumer);
// using hashes so that operators emit identifiable events
String unitedSourceLeft = OP_ID_HASH_PREFIX + "1";
String unitedSourceRight = OP_ID_HASH_PREFIX + "2";
String connectedSource = OP_ID_HASH_PREFIX + "3";
String multiSource = OP_ID_HASH_PREFIX + "4";
String mapForward = OP_ID_HASH_PREFIX + "5";
String mapKeyed = OP_ID_HASH_PREFIX + "6";
String mapTwoInput = OP_ID_HASH_PREFIX + "7";
String multipleInput = OP_ID_HASH_PREFIX + "8";
// todo: FLIP-27 sources
// todo: chain sources
DataStream<TestDataElement> unitedSources =
env.addSource(
new TestEventSource(
unitedSourceLeft, eventQueue, commandQueue))
.setUidHash(unitedSourceLeft)
.assignTimestampsAndWatermarks(createWmAssigner())
.union(
env.addSource(
new TestEventSource(
unitedSourceRight,
eventQueue,
commandQueue))
.setUidHash(unitedSourceRight)
.assignTimestampsAndWatermarks(
createWmAssigner()));
SingleOutputStreamOperator<TestDataElement> sideSource =
env.addSource(
new TestEventSource(
multiSource, eventQueue, commandQueue))
.setUidHash(multiSource)
.assignTimestampsAndWatermarks(createWmAssigner());
DataStream<?>[] inputs = new DataStream[] {unitedSources, sideSource};
final MultipleInputTransformation<TestDataElement> multipleInputsTransform =
new MultipleInputTransformation<>(
"MultipleInputOperator",
new MultiInputTestOperatorFactory(
inputs.length, eventQueue, multipleInput),
TypeInformation.of(TestDataElement.class),
env.getParallelism());
for (DataStream<?> input : inputs) {
multipleInputsTransform.addInput(input.getTransformation());
}
multipleInputsTransform.setChainingStrategy(ChainingStrategy.HEAD_WITH_SOURCES);
env.addOperator(multipleInputsTransform);
SingleOutputStreamOperator<TestDataElement> multipleSources =
new MultipleConnectedStreams(env)
.transform(multipleInputsTransform)
.setUidHash(multiSource);
SingleOutputStreamOperator<TestDataElement> forwardTransform =
multipleSources
.startNewChain()
.transform(
"transform-1-forward",
TypeInformation.of(TestDataElement.class),
new OneInputTestStreamOperatorFactory(
mapForward, eventQueue, commandQueue))
.setUidHash(mapForward);
SingleOutputStreamOperator<TestDataElement> keyedTransform =
forwardTransform
.startNewChain()
.keyBy(e -> e)
.transform(
"transform-2-keyed",
TypeInformation.of(TestDataElement.class),
new OneInputTestStreamOperatorFactory(
mapKeyed, eventQueue, commandQueue))
.setUidHash(mapKeyed);
SingleOutputStreamOperator<TestDataElement> twoInputTransform =
keyedTransform
.startNewChain()
.connect(
env.addSource(
new TestEventSource(
connectedSource,
eventQueue,
commandQueue))
.setUidHash(connectedSource))
.transform(
"transform-3-two-input",
TypeInformation.of(TestDataElement.class),
new TwoInputTestStreamOperator(mapTwoInput, eventQueue))
.setUidHash(mapTwoInput);
twoInputTransform.addSink(new DiscardingSink<>());
Map<String, Integer> operatorsNumberOfInputs = new HashMap<>();
operatorsNumberOfInputs.put(mapForward, 1);
operatorsNumberOfInputs.put(mapKeyed, 1);
operatorsNumberOfInputs.put(mapTwoInput, 2);
operatorsNumberOfInputs.put(multipleInput, 2);
return new TestJobWithDescription(
env.getStreamGraph().getJobGraph(),
new HashSet<>(
asList(unitedSourceLeft, unitedSourceRight, connectedSource)),
new HashSet<>(asList(mapForward, mapKeyed, mapTwoInput, multipleInput)),
new HashSet<>(
asList(
unitedSourceLeft,
unitedSourceRight,
connectedSource,
mapForward,
mapKeyed,
mapTwoInput,
multipleInput)),
operatorsNumberOfInputs,
eventQueue,
commandQueue);
}
@Override
public String toString() {
return "complex graph";
}
};
private static StreamExecutionEnvironment prepareEnv(
ThrowingConsumer<Configuration, Exception> confConsumer,
ThrowingConsumer<StreamExecutionEnvironment, Exception> envConsumer)
throws Exception {
Configuration configuration = new Configuration();
configuration.set(EXECUTION_FAILOVER_STRATEGY, "full");
confConsumer.accept(configuration);
StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment(configuration);
env.setParallelism(4);
env.setRestartStrategy(noRestart());
env.enableCheckpointing(200); // shouldn't matter
env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
env.getConfig().setAutoWatermarkInterval(50);
envConsumer.accept(env);
return env;
}
private static final String OP_ID_HASH_PREFIX = "0000000000000000000000000000000";
private static WatermarkStrategy<TestDataElement> createWmAssigner() {
return WatermarkStrategy.forGenerator(
ctx ->
new WatermarkGenerator<TestDataElement>() {
private Watermark watermark = new Watermark(Long.MIN_VALUE);
@Override
public void onEvent(
TestDataElement event,
long eventTimestamp,
WatermarkOutput output) {
this.watermark = new Watermark(eventTimestamp);
}
@Override
public void onPeriodicEmit(WatermarkOutput output) {
output.emitWatermark(watermark);
}
})
.withTimestampAssigner(
(SerializableTimestampAssigner<TestDataElement>)
(element, recordTimestamp) -> element.seq);
}
}
|
import { ModalProps } from "@ohfinance/oh-ui";
import BigNumber from "bignumber.js";
import { TransactionConfirmationModal } from "components/TransactionConfirmationModal";
import { Bank } from "config/constants/types";
import { useAddress } from "hooks/useAddress";
import { useBankContract } from "hooks/useContract";
import { useTokenApprove } from "hooks/useTokenApprove";
import { useTokenBalance } from "hooks/useTokenBalance";
import { FC, useCallback, useMemo, useState } from "react";
import { useTransactionAdder } from "state/transactions/hooks";
import { useApprovalManager } from "state/user/hooks";
import { getDecimalAmount, getFullDisplayBalance } from "utils/formatBalances";
import { useBankData } from "views/Earn/hooks/useBankData";
import { EarnDepositConfirmation } from "./EarnDepositConfirmation";
import { EarnDepositInput } from "./EarnDepositInput";
export interface EarnDepositModalProps extends ModalProps {
bank: Bank;
}
export const EarnDepositModal: FC<EarnDepositModalProps> = ({
isOpen,
onDismiss,
bank,
}) => {
const [confirming, setConfirming] = useState<boolean>(false);
const [txPending, setTxPending] = useState<boolean>(false);
const [txHash, setTxHash] = useState<string>("");
const addTransaction = useTransactionAdder();
const [input, setInput] = useState("");
const bankAddress = useAddress(bank.address);
const underlyingAddress = useAddress(bank.underlying.address);
const bankContract = useBankContract(bankAddress);
const { approvalState, onApprove } = useTokenApprove(
underlyingAddress,
bankAddress,
bank.underlying.symbol,
getDecimalAmount(input, bank.underlying.decimals)
);
const { balance } = useTokenBalance(underlyingAddress);
const underlyingBalance = useMemo(() => {
return getFullDisplayBalance(
balance,
bank.underlying.decimals,
bank.underlying.decimals
);
}, [balance, bank]);
const { virtualPrice, getTokenValue, getTotalBankShare } =
useBankData(bankAddress);
const depositAmount = useMemo(() => {
return getFullDisplayBalance(
getDecimalAmount(input, bank.underlying.decimals),
bank.underlying.decimals
);
}, [bank, input]);
const receiveAmount = useMemo(() => {
const tokenValue = getTokenValue(new BigNumber(input));
if (tokenValue) {
return getFullDisplayBalance(
getDecimalAmount(tokenValue, bank.decimals),
bank.decimals
);
}
}, [bank, input, getTokenValue]);
const exchangeRate = useMemo(() => {
return (
virtualPrice &&
getFullDisplayBalance(virtualPrice, bank.decimals, bank.decimals)
);
}, [bank, virtualPrice]);
const totalShare = useMemo(() => {
if (receiveAmount) {
return getTotalBankShare(
getDecimalAmount(receiveAmount, bank.decimals)
).toString();
}
}, [bank, receiveAmount, getTotalBankShare]);
const handleDeposit = useCallback(async () => {
setTxPending(true);
await bankContract
.deposit(getDecimalAmount(input, bank.underlying.decimals).toString())
.then((response) => {
setTxPending(false);
addTransaction(response, {
summary: `Deposit ${depositAmount} ${bank.underlying.symbol} for ${receiveAmount} ${bank.symbol}`,
});
setTxHash(response.hash);
})
.catch((error) => {
setTxPending(false);
});
}, [bank, bankContract, input, depositAmount, receiveAmount, addTransaction]);
const handleDismiss = useCallback(() => {
if (confirming) {
setConfirming(false);
} else if (txPending) {
setTxPending(false);
} else {
setTxHash("");
}
onDismiss();
}, [confirming, txPending, onDismiss]);
const content = () => {
if (!confirming) {
return (
<EarnDepositInput
bank={bank}
input={input}
setInput={setInput}
underlyingBalance={underlyingBalance}
onConfirm={() => setConfirming(true)}
onDismiss={handleDismiss}
/>
);
} else if (!txPending) {
return (
<EarnDepositConfirmation
bank={bank}
input={input}
approvalState={approvalState}
depositAmount={depositAmount}
receiveAmount={receiveAmount}
exchangeRate={exchangeRate}
totalShare={totalShare}
onApprove={onApprove}
onBack={() => setConfirming(false)}
onDeposit={handleDeposit}
onDismiss={handleDismiss}
/>
);
}
};
return (
<TransactionConfirmationModal
title={`Deposit ${bank.underlying.symbol}`}
isOpen={isOpen}
onDismiss={handleDismiss}
hash={txHash}
pending={txPending}
onBack={() => setTxPending(false)}
pendingText={`Depositing ${depositAmount} ${bank.underlying.symbol} for ${receiveAmount} ${bank.symbol}...`}
content={content}
/>
);
};
|
CREATE TABLE users (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50),
email VARCHAR(50),
first_name VARCHAR(50),
last_name VARCHAR(50),
image_name VARCHAR(50),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
); |
#!/bin/sh
set -e
echo "---- Check shell scripts styling with ShellCheck ----"
docker pull nlknguyen/alpine-shellcheck
alias shellcheck='docker run --rm -it -v $(pwd):/mnt nlknguyen/alpine-shellcheck'
shellcheck --version
shellcheck **/*.sh \
onbuild/auto_update_hosts \
onbuild/get_hosts \
onbuild/mpi_bootstrap \
echo "=> No styling trouble found"
|
#!/usr/bin/env bash
# Copyright 2018 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script runs the end-to-end tests against Knative Serving built from source.
# It is started by prow for each PR. For convenience, it can also be executed manually.
# If you already have a Knative cluster setup and kubectl pointing
# to it, call this script with the --run-tests arguments and it will use
# the cluster and run the tests.
# Calling this script without arguments will create a new cluster in
# project $PROJECT_ID, start knative in it, run the tests and delete the
# cluster.
source $(dirname $0)/e2e-common.sh
# Helper functions.
function knative_setup() {
install_knative_serving
}
# Script entry point.
# Skip installing istio as an add-on
initialize $@ --skip-istio-addon
# Run the tests
header "Running tests"
failed=0
# Run conformance and e2e tests.
go_test_e2e -timeout=30m \
./test/conformance/api/v1alpha1 \
./test/conformance/api/v1beta1 \
./test/conformance/runtime \
./test/e2e \
"--resolvabledomain=$(use_resolvable_domain)" || failed=1
# Dump cluster state after e2e tests to prevent logs being truncated.
(( failed )) && dump_cluster_state
# Run scale tests.
go_test_e2e -timeout=10m ./test/scale || failed=1
# Require that both set of tests succeeded.
(( failed )) && fail_test
success
|
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EnableGlibcCompat
InstallStep() {
DefaultInstallStep
if [ "${NACL_LIBC}" = "newlib" ]; then
local pkgconfig_file=${INSTALL_DIR}/webports-dummydir/lib/pkgconfig/xcb.pc
if ! grep -Eq "lglibc-compat" $pkgconfig_file; then
sed -i.bak 's/-lxcb/-lxcb -lglibc-compat/' $pkgconfig_file
fi
fi
}
|
#!/usr/bin/env bash
#
# Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Audio and video will be read from separate Pravega streams as MPEG Transport Streams.
# This will read data generated by avtestsrc-to-pravega-split.sh.
set -ex
ROOT_DIR=$(readlink -f $(dirname $0)/..)
pushd ${ROOT_DIR}/gst-plugin-pravega
cargo build
ls -lh ${ROOT_DIR}/target/debug/*.so
export GST_PLUGIN_PATH=${ROOT_DIR}/target/debug:${GST_PLUGIN_PATH}
export GST_DEBUG="pravegasrc:INFO,basesrc:INFO,mpegtsbase:INFO,mpegtspacketizer:INFO"
export RUST_BACKTRACE=1
export GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-dot/pravega-to-speaker
mkdir -p ${GST_DEBUG_DUMP_DOT_DIR}
PRAVEGA_STREAM=${PRAVEGA_STREAM:-split1}
gst-launch-1.0 \
-v \
pravegasrc stream=examples/${PRAVEGA_STREAM}-a1 \
! tsdemux \
! avdec_aac \
! audioconvert \
! audioresample \
! autoaudiosink
|
<gh_stars>0
package net.kardexo.kardexotools.command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.commands.arguments.ResourceLocationArgument;
import net.minecraft.commands.arguments.coordinates.ColumnPosArgument;
import net.minecraft.commands.synchronization.SuggestionProviders;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.commands.LocateBiomeCommand;
import net.minecraft.server.level.ColumnPos;
import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.Mth;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.chunk.LevelChunk;
public class CommandSetBiome
{
public static void register(CommandDispatcher<CommandSourceStack> dispatcher)
{
dispatcher.register(Commands.literal("setbiome")
.requires(source -> source.hasPermission(4))
.then(Commands.argument("from", ColumnPosArgument.columnPos())
.then(Commands.argument("to", ColumnPosArgument.columnPos())
.then(Commands.argument("biome", ResourceLocationArgument.id())
.suggests(SuggestionProviders.AVAILABLE_BIOMES)
.executes(context -> CommandSetBiome.setBiome(context.getSource(), ColumnPosArgument.getColumnPos(context, "from"), ColumnPosArgument.getColumnPos(context, "to"), ResourceLocationArgument.getId(context, "biome")))))));
}
private static int setBiome(CommandSourceStack source, ColumnPos from, ColumnPos to, ResourceLocation resource) throws CommandSyntaxException
{
ServerLevel level = source.getLevel();
Biome biome = source.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getOptional(resource).orElseThrow(() -> LocateBiomeCommand.ERROR_INVALID_BIOME.create(resource));
int minX = Math.min(from.x, to.x);
int maxX = Math.max(from.x, to.x);
int minZ = Math.min(from.z, to.z);
int maxZ = Math.max(from.z, to.z);
int chunkMinX = minX >> 4;
int chunkMaxX = maxX >> 4;
int chunkMinZ = minZ >> 4;
int chunkMaxZ = maxZ >> 4;
int chunkClampMinX = Mth.clamp(chunkMinX, -1875000, 1875000);
int chunkClampMaxX = Mth.clamp(chunkMaxX, -1875000, 1875000);
int chunkClampMinZ = Mth.clamp(chunkMinZ, -1875000, 1875000);
int chunkClampMaxZ = Mth.clamp(chunkMaxZ, -1875000, 1875000);
for(int chunkX = chunkClampMinX; chunkX <= chunkClampMaxX; chunkX++)
{
for(int chunkZ = chunkClampMinZ; chunkZ <= chunkClampMaxZ; chunkZ++)
{
LevelChunk chunk = level.getChunk(chunkX, chunkZ);
Biome[] biomes = chunk.getBiomes().biomes;
boolean flag = false;
int subChunkMinX = minChunkOffset(chunkX, chunkMinX, minX) >> 2;
int subChunkMinZ = minChunkOffset(chunkZ, chunkMinZ, minZ) >> 2;
int subChunkMaxX = maxChunkOffset(chunkX, chunkMaxX, maxX) >> 2;
int subChunkMaxZ = maxChunkOffset(chunkZ, chunkMaxZ, maxZ) >> 2;
for(int y = 0; y < 64; y++)
{
for(int z = subChunkMinZ; z <= subChunkMaxZ; z++)
{
for(int x = subChunkMinX; x <= subChunkMaxX; x++)
{
int index = (y << 4) + (z << 2) + x;
if(!biomes[index].equals(biome))
{
biomes[index] = biome;
flag = true;
}
}
}
}
if(flag)
{
chunk.markUnsaved();
ServerChunkCache chunkCache = level.getChunkSource();
chunkCache.chunkMap.getPlayers(chunk.getPos(), false).forEach(player ->
{
player.connection.send(new ClientboundLevelChunkPacket(chunk));
});
}
}
}
source.sendSuccess(new TextComponent("Set biome to " + resource), false);
return (maxX - minX) * (maxZ - minZ);
}
private static int chunkOffset(int chunk, int borderChunk, int position, int def)
{
if(chunk == borderChunk)
{
return Math.floorMod(position, 16);
}
return def;
}
private static int minChunkOffset(int chunk, int borderChunk, int position)
{
return chunkOffset(chunk, borderChunk, position, 0);
}
private static int maxChunkOffset(int chunk, int borderChunk, int position)
{
return chunkOffset(chunk, borderChunk, position, 15);
}
}
|
import createPlayer from '../player.js';
import createEnemies from '../enemy.js';
import { rectIntersectsRect, intersectionSide } from '../rect.js';
import hud from '../hud.js';
let canvas = kontra.getCanvas();
// TODO: refactor enemy collision test
// use refine collision (player's solution)
// move it into enemy
function testEnemyCollisionWithGroundLayer(sprite, tileEngine) {
// Calculate tile type next to player
// If tile type biger then zerom there is a collision
let tilePosPlayer = kontra.Vector(sprite.x / tileEngine.tilewidth | 0, sprite.y / tileEngine.tileheight | 0);
let tilePosRight = kontra.Vector(tilePosPlayer.x + 1, tilePosPlayer.y);
let tilePosBottom = kontra.Vector(tilePosPlayer.x, tilePosPlayer.y + 1);
let tilePosDiag = kontra.Vector(tilePosPlayer.x + 1, tilePosPlayer.y + 1);
let tileTypePlayer = tileEngine.tileAtLayer('ground', {row: tilePosPlayer.y, col: tilePosPlayer.x});
let tileTypeRight = tileEngine.tileAtLayer('ground', {row: tilePosRight.y, col: tilePosRight.x});
let tileTypeBottom = tileEngine.tileAtLayer('ground', {row: tilePosBottom.y, col: tilePosBottom.x});
let tileTypeDiag = tileEngine.tileAtLayer('ground', {row: tilePosDiag.y, col: tilePosDiag.x});;
// Check vertically if there is a collision
if (sprite.dy > 0) {
if (tileTypeBottom || (tileTypeDiag && !tileTypeRight)) {
sprite.y = (tilePosBottom.y - 1 ) * tileEngine.tileheight;
sprite.dy = 0;
sprite.ddy = 0;
}
}
// Check horizontally if there is a collision
if (sprite.dx > 0) {
if (tileTypeRight && !tileTypePlayer) {
sprite.x = tilePosPlayer.x * tileEngine.tilewidth;
sprite.dx = 0
sprite.speed = -sprite.speed;
}
}
else if (sprite.dx < 0) {
if (tileTypePlayer && !tileTypeRight) {
sprite.x = (tilePosPlayer.x + 1) * tileEngine.tilewidth;
sprite.dx = 0;
sprite.speed = -sprite.speed;
}
}
}
let mapScene = kontra.Scene({
id: 'map',
gameOver: false,
timer: 0,
tileEngine: undefined,
brick: undefined,
enemies: undefined,
player: undefined,
earth: undefined,
onShow: function() {
this.gameOver = false;
this.timer = 0;
let mapAsset = kontra.dataAssets['assets/map'];
this.tileEngine = kontra.TileEngine(mapAsset);
this.tileEngine.sx = 0;
this.tileEngine.sy = 0;
hud.reset();
this.tileEngine.properties.map(property => {
if (property.name == 'name') {
hud.updateWorld(property.value);
}
});
let brickSpriteSheet = kontra.SpriteSheet({
image: kontra.imageAssets['assets/brick_animation'],
frameWidth: 96,
frameHeight: 96,
animations: {
destroy: {
frames: '0..4',
frameRate: 10,
loop: false
}
}
});
this.brick = kontra.Sprite({
x: 1000,
y: 0,
animations: brickSpriteSheet.animations
});
this.tileEngine.addObject(this.brick);
this.enemies = createEnemies(this.tileEngine);
this.enemies.map( enemy => this.tileEngine.addObject(enemy));
this.player = createPlayer(this.tileEngine, this.brick, hud);
this.tileEngine.addObject(this.player);
this.earth = kontra.Sprite({
x: 500,
y: 100,
width: 128,
height: 69,
image: kontra.imageAssets['assets/earth']
});
},
update: function(dt) {
if (this.gameOver) {
// TODO: game over animation
if (this.timer > 3) {
kontra.emit('navigate', 'over');
}
this.timer += dt;
}
else {
if (this.timer > 400) {
kontra.emit('navigate', 'over');
}
this.timer += dt;
this.player.update(dt);
this.enemies.map(enemy => {
if (enemy.active == true) {
enemy.update(dt);
testEnemyCollisionWithGroundLayer(enemy, this.tileEngine);
let rectPlayer = this.player.getRect();
let rectEnemy = enemy.getRect();
if (rectIntersectsRect(rectPlayer, rectEnemy)) {
if (intersectionSide(rectPlayer, rectEnemy) == 'top') {
enemy.ttl = 0;
this.player.ddy -= 950 * dt; // jump impulse
this.player.jumping = true;
this.player.advance();
hud.updatePoints(100);
}
else {
this.timer = 0;
this.gameOver = true;
}
}
}
else if (enemy.active == false && this.tileEngine.sx + canvas.width >= enemy.x) {
enemy.active = true;
}
});
if (this.player.y + this.player.height >= this.tileEngine.tileheight * this.tileEngine.height) {
this.timer = 0;
this.gameOver = true;
}
this.brick.update();
hud.update(dt);
}
},
render: function() {
this.earth.render();
this.tileEngine.renderLayer("ground");
this.tileEngine.renderLayer("background");
this.player.render();
this.enemies = this.enemies.filter(enemy => enemy.isAlive());
this.enemies.map(enemy => enemy.render());
this.brick.render();
hud.render();
}
});
export default mapScene; |
# set params
NDK_ROOT_LOCAL=/cygdrive/e/android/android-ndk-r8
COCOS2DX_ROOT_LOCAL=/cygdrive/f/Project/dumganhar/cocos2d-x
buildexternalsfromsource=
usage(){
cat << EOF
usage: $0 [options]
Build C/C++ native code using Android NDK
OPTIONS:
-s Build externals from source
-h this help
EOF
}
while getopts "s" OPTION; do
case "$OPTION" in
s)
buildexternalsfromsource=1
;;
h)
usage
exit 0
;;
esac
done
# try to get global variable
if [ $NDK_ROOT"aaa" != "aaa" ]; then
echo "use global definition of NDK_ROOT: $NDK_ROOT"
NDK_ROOT_LOCAL=$NDK_ROOT
fi
if [ $COCOS2DX_ROOT"aaa" != "aaa" ]; then
echo "use global definition of COCOS2DX_ROOT: $COCOS2DX_ROOT"
COCOS2DX_ROOT_LOCAL=$COCOS2DX_ROOT
fi
HELLOWORLD_ROOT=$COCOS2DX_ROOT_LOCAL/HelloWorld/proj.android
# make sure assets is exist
if [ -d $HELLOWORLD_ROOT/assets ]; then
rm -rf $HELLOWORLD_ROOT/assets
fi
mkdir $HELLOWORLD_ROOT/assets
# copy resources
for file in $COCOS2DX_ROOT_LOCAL/HelloWorld/Resources/*
do
if [ -d $file ]; then
cp -rf $file $HELLOWORLD_ROOT/assets
fi
if [ -f $file ]; then
cp $file $HELLOWORLD_ROOT/assets
fi
done
if [[ $buildexternalsfromsource ]]; then
echo "Building external dependencies from source"
$NDK_ROOT_LOCAL/ndk-build -C $HELLOWORLD_ROOT $* \
NDK_MODULE_PATH=${COCOS2DX_ROOT_LOCAL}:${COCOS2DX_ROOT_LOCAL}/cocos2dx/platform/third_party/android/source
else
echo "Using prebuilt externals"
$NDK_ROOT_LOCAL/ndk-build -C $HELLOWORLD_ROOT $* \
NDK_MODULE_PATH=${COCOS2DX_ROOT_LOCAL}:${COCOS2DX_ROOT_LOCAL}/cocos2dx/platform/third_party/android/prebuilt
fi
|
<reponame>christo707/restaurant-list<filename>src/app/app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { Page404Component } from './page404/page404.component';
import { ListsComponent } from './lists/lists.component';
const routes: Routes = [
{ path:'lists', component : ListsComponent },
{ path:'', redirectTo:'/lists', pathMatch:'full' },
{ path: '**', component: Page404Component }
];
@NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true})],
exports: [RouterModule]
})
export class AppRoutingModule { }
|
<filename>routes/api/creations.js<gh_stars>1-10
//routes/api/creations.js
const router = require("express").Router();
const creationsController = require("../../controllers/creationsController");
// Matches with "/api/creations"
router.route("/")
.get(creationsController.findAll)
.post(creationsController.create);
// Matches with "/api/creations/:id"
router.route("/:id")
.get(creationsController.findById)
.put(creationsController.update)
.delete(creationsController.remove);
module.exports = router;
|
<reponame>ooooo-youwillsee/leetcode
//
// Created by ooooo on 2020/1/6.
//
#ifndef CPP_0219_SOLUTION2_H
#define CPP_0219_SOLUTION2_H
#include <iostream>
#include <vector>
#include <unordered_set>
using namespace std;
/**
* 滑动窗口 (窗口大小为k)
*/
class Solution {
public:
bool containsNearbyDuplicate(vector<int> &nums, int k) {
unordered_set<int> s;
for (int i = 0, len = nums.size(); i < len; ++i) {
if (s.count(nums[i])) return true;
s.insert(nums[i]);
if (s.size() > k) {
s.erase(nums[i - k]);
}
}
return false;
}
};
#endif //CPP_0219_SOLUTION2_H
|
<filename>src/tests.ts
import 'source-map-support/register';
import { assert } from 'chai';
import type { DocumentNode, FragmentDefinitionNode } from 'graphql';
import gql from './index';
const loader = require('../loader');
describe('gql', () => {
it('parses queries', () => {
assert.equal(gql`{ testQuery }`.kind, 'Document');
});
it('parses queries when called as a function', () => {
assert.equal(gql('{ testQuery }').kind, 'Document');
});
it('parses queries with weird substitutions', () => {
const obj = Object.create(null);
assert.equal(gql`{ field(input: "${obj.missing}") }`.kind, 'Document');
assert.equal(gql`{ field(input: "${null}") }`.kind, 'Document');
assert.equal(gql`{ field(input: "${0}") }`.kind, 'Document');
});
it('allows interpolation of documents generated by the webpack loader', () => {
const sameFragment = "fragment SomeFragmentName on SomeType { someField }";
const jsSource = loader.call(
{ cacheable() {} },
sameFragment,
);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
const document = gql`query { ...SomeFragmentName } ${module.exports}`;
assert.equal(document.kind, 'Document');
assert.equal(document.definitions.length, 2);
assert.equal(document.definitions[0].kind, 'OperationDefinition');
assert.equal(document.definitions[1].kind, 'FragmentDefinition');
});
it('parses queries through webpack loader', () => {
const jsSource = loader.call({ cacheable() {} }, '{ testQuery }');
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.equal(module.exports.kind, 'Document');
});
it('parses single query through webpack loader', () => {
const jsSource = loader.call({ cacheable() {} }, `
query Q1 { testQuery }
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.equal(module.exports.kind, 'Document');
assert.exists(module.exports.Q1);
assert.equal(module.exports.Q1.kind, 'Document');
assert.equal(module.exports.Q1.definitions.length, 1);
});
it('parses single query and exports as default', () => {
const jsSource = loader.call({ cacheable() {} }, `
query Q1 { testQuery }
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.deepEqual(module.exports.definitions, module.exports.Q1.definitions);
});
it('parses multiple queries through webpack loader', () => {
const jsSource = loader.call({ cacheable() {} }, `
query Q1 { testQuery }
query Q2 { testQuery2 }
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.exists(module.exports.Q1);
assert.exists(module.exports.Q2);
assert.equal(module.exports.Q1.kind, 'Document');
assert.equal(module.exports.Q2.kind, 'Document');
assert.equal(module.exports.Q1.definitions.length, 1);
assert.equal(module.exports.Q2.definitions.length, 1);
});
it('parses fragments with variable definitions', () => {
gql.enableExperimentalFragmentVariables();
const parsed: any = gql`fragment A ($arg: String!) on Type { testQuery }`;
assert.equal(parsed.kind, 'Document');
assert.exists(parsed.definitions[0].variableDefinitions);
gql.disableExperimentalFragmentVariables()
});
// see https://github.com/apollographql/graphql-tag/issues/168
it('does not nest queries needlessly in named exports', () => {
const jsSource = loader.call({ cacheable() {} }, `
query Q1 { testQuery }
query Q2 { testQuery2 }
query Q3 { test Query3 }
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.notExists(module.exports.Q2.Q1);
assert.notExists(module.exports.Q3.Q1);
assert.notExists(module.exports.Q3.Q2);
});
it('tracks fragment dependencies from multiple queries through webpack loader', () => {
const jsSource = loader.call({ cacheable() {} }, `
fragment F1 on F { testQuery }
fragment F2 on F { testQuery2 }
fragment F3 on F { testQuery3 }
query Q1 { ...F1 }
query Q2 { ...F2 }
query Q3 {
...F1
...F2
}
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.exists(module.exports.Q1);
assert.exists(module.exports.Q2);
assert.exists(module.exports.Q3);
const Q1 = module.exports.Q1.definitions;
const Q2 = module.exports.Q2.definitions;
const Q3 = module.exports.Q3.definitions;
assert.equal(Q1.length, 2);
assert.equal(Q1[0].name.value, 'Q1');
assert.equal(Q1[1].name.value, 'F1');
assert.equal(Q2.length, 2);
assert.equal(Q2[0].name.value, 'Q2');
assert.equal(Q2[1].name.value, 'F2');
assert.equal(Q3.length, 3);
assert.equal(Q3[0].name.value, 'Q3');
assert.equal(Q3[1].name.value, 'F1');
assert.equal(Q3[2].name.value, 'F2');
});
it('tracks fragment dependencies across nested fragments', () => {
const jsSource = loader.call({ cacheable() {} }, `
fragment F11 on F { testQuery }
fragment F22 on F {
...F11
testQuery2
}
fragment F33 on F {
...F22
testQuery3
}
query Q1 {
...F33
}
query Q2 {
id
}
`);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.exists(module.exports.Q1);
assert.exists(module.exports.Q2);
const Q1 = module.exports.Q1.definitions;
const Q2 = module.exports.Q2.definitions;
assert.equal(Q1.length, 4);
assert.equal(Q1[0].name.value, 'Q1');
assert.equal(Q1[1].name.value, 'F33');
assert.equal(Q1[2].name.value, 'F22');
assert.equal(Q1[3].name.value, 'F11');
assert.equal(Q2.length, 1);
});
it('correctly imports other files through the webpack loader', () => {
const query = `#import "./fragment_definition.graphql"
query {
author {
...authorDetails
}
}`;
const jsSource = loader.call({ cacheable() {} }, query);
const module = { exports: Object.create(null) };
const require = (path: string) => {
assert.equal(path, './fragment_definition.graphql');
return gql`
fragment authorDetails on Author {
firstName
lastName
}`;
};
Function("module,require", jsSource)(module, require);
assert.equal(module.exports.kind, 'Document');
const definitions = module.exports.definitions;
assert.equal(definitions.length, 2);
assert.equal(definitions[0].kind, 'OperationDefinition');
assert.equal(definitions[1].kind, 'FragmentDefinition');
});
it('tracks fragment dependencies across fragments loaded via the webpack loader', () => {
const query = `#import "./fragment_definition.graphql"
fragment F111 on F {
...F222
}
query Q1 {
...F111
}
query Q2 {
a
}
`;
const jsSource = loader.call({ cacheable() {} }, query);
const module = { exports: Object.create(null) };
const require = (path: string) => {
assert.equal(path, './fragment_definition.graphql');
return gql`
fragment F222 on F {
f1
f2
}`;
};
Function("module,require", jsSource)(module, require);
assert.exists(module.exports.Q1);
assert.exists(module.exports.Q2);
const Q1 = module.exports.Q1.definitions;
const Q2 = module.exports.Q2.definitions;
assert.equal(Q1.length, 3);
assert.equal(Q1[0].name.value, 'Q1');
assert.equal(Q1[1].name.value, 'F111');
assert.equal(Q1[2].name.value, 'F222');
assert.equal(Q2.length, 1);
});
it('does not complain when presented with normal comments', (done) => {
assert.doesNotThrow(() => {
const query = `#normal comment
query {
author {
...authorDetails
}
}`;
const jsSource = loader.call({ cacheable() {} }, query);
const module = { exports: Object.create(null) };
Function("module", jsSource)(module);
assert.equal(module.exports.kind, 'Document');
done();
});
});
it('returns the same object for the same query', () => {
assert.isTrue(gql`{ sameQuery }` === gql`{ sameQuery }`);
});
it('returns the same object for the same query, even with whitespace differences', () => {
assert.isTrue(gql`{ sameQuery }` === gql` { sameQuery, }`);
});
const fragmentAst = gql`
fragment UserFragment on User {
firstName
lastName
}
`;
it('returns the same object for the same fragment', () => {
assert.isTrue(gql`fragment same on Same { sameQuery }` ===
gql`fragment same on Same { sameQuery }`);
});
it('returns the same object for the same document with substitution', () => {
// We know that calling `gql` on a fragment string will always return
// the same document, so we can reuse `fragmentAst`
assert.isTrue(gql`{ ...UserFragment } ${fragmentAst}` ===
gql`{ ...UserFragment } ${fragmentAst}`);
});
it('can reference a fragment that references as fragment', () => {
const secondFragmentAst = gql`
fragment SecondUserFragment on User {
...UserFragment
}
${fragmentAst}
`;
const ast = gql`
{
user(id: 5) {
...SecondUserFragment
}
}
${secondFragmentAst}
`;
assert.deepEqual(ast, gql`
{
user(id: 5) {
...SecondUserFragment
}
}
fragment SecondUserFragment on User {
...UserFragment
}
fragment UserFragment on User {
firstName
lastName
}
`);
});
describe('fragment warnings', () => {
let warnings = [];
const oldConsoleWarn = console.warn;
beforeEach(() => {
gql.resetCaches();
warnings = [];
console.warn = (w: string) => warnings.push(w);
});
afterEach(() => {
console.warn = oldConsoleWarn;
});
it('warns if you use the same fragment name for different fragments', () => {
const frag1 = gql`fragment TestSame on Bar { fieldOne }`;
const frag2 = gql`fragment TestSame on Bar { fieldTwo }`;
assert.isFalse(frag1 === frag2);
assert.equal(warnings.length, 1);
});
it('does not warn if you use the same fragment name for the same fragment', () => {
const frag1 = gql`fragment TestDifferent on Bar { fieldOne }`;
const frag2 = gql`fragment TestDifferent on Bar { fieldOne }`;
assert.isTrue(frag1 === frag2);
assert.equal(warnings.length, 0);
});
it('does not warn if you use the same embedded fragment in two different queries', () => {
const frag1 = gql`fragment TestEmbedded on Bar { field }`;
const query1 = gql`{ bar { fieldOne ...TestEmbedded } } ${frag1}`;
const query2 = gql`{ bar { fieldTwo ...TestEmbedded } } ${frag1}`;
assert.isFalse(query1 === query2);
assert.equal(warnings.length, 0);
});
it('does not warn if you use the same fragment name for embedded and non-embedded fragments', () => {
const frag1 = gql`fragment TestEmbeddedTwo on Bar { field }`;
gql`{ bar { ...TestEmbedded } } ${frag1}`;
gql`{ bar { ...TestEmbedded } } fragment TestEmbeddedTwo on Bar { field }`;
assert.equal(warnings.length, 0);
});
});
describe('unique fragments', () => {
beforeEach(() => {
gql.resetCaches();
});
it('strips duplicate fragments from the document', () => {
const frag1 = gql`fragment TestDuplicate on Bar { field }`;
const query1 = gql`{ bar { fieldOne ...TestDuplicate } } ${frag1} ${frag1}`;
const query2 = gql`{ bar { fieldOne ...TestDuplicate } } ${frag1}`;
assert.equal(query1.definitions.length, 2);
assert.equal(query1.definitions[1].kind, 'FragmentDefinition');
// We don't test strict equality between the two queries because the source.body parsed from the
// document is not the same, but the set of definitions should be.
assert.deepEqual(query1.definitions, query2.definitions);
});
it('ignores duplicate fragments from second-level imports when using the webpack loader', () => {
// take a require function and a query string, use the webpack loader to process it
const load = (
require: (path: string) => DocumentNode | null,
query: string,
): DocumentNode | null => {
const jsSource = loader.call({ cacheable() {} }, query);
const module = { exports: Object.create(null) };
Function("require,module", jsSource)(require, module);
return module.exports;
}
const test_require = (path: string) => {
switch (path) {
case './friends.graphql':
return load(test_require, [
'#import "./person.graphql"',
'fragment friends on Hero { friends { ...person } }',
].join('\n'));
case './enemies.graphql':
return load(test_require, [
'#import "./person.graphql"',
'fragment enemies on Hero { enemies { ...person } }',
].join('\n'));
case './person.graphql':
return load(test_require, 'fragment person on Person { name }\n');
default:
return null;
};
};
const result = load(test_require, [
'#import "./friends.graphql"',
'#import "./enemies.graphql"',
'query { hero { ...friends ...enemies } }',
].join('\n'))!;
assert.equal(result.kind, 'Document');
assert.equal(result.definitions.length, 4, 'after deduplication, only 4 fragments should remain');
assert.equal(result.definitions[0].kind, 'OperationDefinition');
// the rest of the definitions should be fragments and contain one of
// each: "friends", "enemies", "person". Order does not matter
const fragments = result.definitions.slice(1) as FragmentDefinitionNode[];
assert(fragments.every(fragment => fragment.kind === 'FragmentDefinition'))
assert(fragments.some(fragment => fragment.name.value === 'friends'))
assert(fragments.some(fragment => fragment.name.value === 'enemies'))
assert(fragments.some(fragment => fragment.name.value === 'person'))
});
});
// How to make this work?
// it.only('can reference a fragment passed as a document via shorthand', () => {
// const ast = gql`
// {
// user(id: 5) {
// ...${userFragmentDocument}
// }
// }
// `;
//
// assert.deepEqual(ast, gql`
// {
// user(id: 5) {
// ...UserFragment
// }
// }
// fragment UserFragment on User {
// firstName
// lastName
// }
// `);
// });
});
|
import matplotlib.pyplot as plt
# Function to generate payload size range
def mpsrange(start, end):
return list(range(start, end+1, 10))
# Function to calculate time on air
def get_line(payload_sizes, sf, bw):
# Placeholder function, replace with actual calculation
return [size * sf / bw for size in payload_sizes]
# Create a new figure and axis
fig, ax = plt.subplots()
# Plot for SF7
ax.plot(mpsrange(8, 250), get_line(mpsrange(8, 250), 7, bw=500), "g-", label="SF7/500kHz", linewidth=3, alpha=1)
# Plot for SF8
ax.plot(mpsrange(8, 250), get_line(mpsrange(8, 250), 8, bw=500), "b-", label="SF8/500kHz", linewidth=3, alpha=1)
# Plot for SF9
ax.plot(mpsrange(8, 250), get_line(mpsrange(8, 250), 9, bw=500), "y-", label="SF9/500kHz", linewidth=3, alpha=1)
# Plot for SF10
ax.plot(mpsrange(8, 250), get_line(mpsrange(8, 250), 10, bw=500), "r-", label="SF10/500kHz", linewidth=3, alpha=1)
# Set x and y axis limits
ax.set_xlim(0, 260)
ax.set_ylim(0, 5000)
# Set labels for x and y axes
ax.set_xlabel("PHY Payload Size (Byte)")
ax.set_ylabel("Time on Air (ms)")
# Enable grid
ax.grid(True)
# Add legend
ax.legend(loc="best", fancybox=True, shadow=True)
# Adjust layout
fig.tight_layout()
# Display the plot
plt.show()
# Save the plot as an image
fig.savefig("image/as923-comparison.png") |
import socket
def get_software_views(server_address: str, port: int) -> list:
views = []
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((server_address, port))
s.sendall(b'GET /software-views HTTP/1.1\r\nHost: ' + server_address.encode() + b'\r\n\r\n')
data = s.recv(1024)
while data:
views.extend(data.decode().split('\n'))
data = s.recv(1024)
return [view.strip() for view in views if view.strip()] |
#
# Utility to disassemble a specific function.
# Usage:
# ./disasm-func.sh ../build/wasm3 i32_Divide_sr
#
FILE="$1"
FUNC="$2"
# get starting address and size of function fact from nm
ADDR=$(nm --print-size --radix=d $FILE | grep $FUNC | cut -d ' ' -f 1,2)
# strip leading 0's to avoid being interpreted by objdump as octal addresses
STARTADDR=$(echo $ADDR | cut -d ' ' -f 1 | sed 's/^0*\(.\)/\1/')
SIZE=$(echo $ADDR | cut -d ' ' -f 2 | sed 's/^0*//')
STOPADDR=$(( $STARTADDR + $SIZE ))
objdump --disassemble $FILE --start-address=$STARTADDR --stop-address=$STOPADDR -M suffix
|
<gh_stars>0
import Badge from "react-bootstrap/Badge";
import * as dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
dayjs.extend(relativeTime);
export function TimeSince(date) {
return dayjs(date).fromNow();
}
export function TimeSinceUnix(date) {
return dayjs.unix(date).fromNow();
}
export const RemoteResourceState = Object.freeze({
fetching: 0,
successful: 1,
failed: 2,
notFound: 3,
});
export const ResourceRegex = new RegExp("^[a-z][a-z0-9._-]{1,34}[a-z0-9]$");
// This is a workaround, but might even be alright in handling most status
// TODO: Find a better way to handle all statuses
export function InstanceStatusParse(instanceStatus) {
if (!instanceStatus) {
return null;
}
let splitStatus = instanceStatus.split(":");
return splitStatus[0];
}
export function InstanceBadge(instanceStatus) {
if (!instanceStatus) {
return <Badge variant="dark">Status: Not Set</Badge>;
}
switch (instanceStatus) {
case "ended":
case "complete":
return <Badge variant="success">Status: Complete</Badge>;
case "pending":
return <Badge variant="warning">Status: Pending</Badge>;
case "running":
return <Badge variant="info">Status: Running</Badge>;
case "failed":
return <Badge variant="danger">Status: Failed</Badge>;
case "listening":
return <Badge variant="secondary">Status: Listening</Badge>;
case "crashed":
return <Badge variant="dark">Status: Crashed</Badge>;
case "cancelled":
return (
<Badge style={{backgroundColor: "#777777"}} variant="primary">
Status: Cancelled
</Badge>
);
default:
return (
<Badge variant="dark">Status: Unkown Type '${instanceStatus}'</Badge>
);
}
}
|
<filename>graphql-java-support/src/main/java/com/apollographql/federation/graphqljava/SchemaTransformer.java
package com.apollographql.federation.graphqljava;
import graphql.GraphQLError;
import graphql.schema.Coercing;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetcherFactory;
import graphql.schema.FieldCoordinates;
import graphql.schema.GraphQLCodeRegistry;
import graphql.schema.GraphQLDirectiveContainer;
import graphql.schema.GraphQLObjectType;
import graphql.schema.GraphQLSchema;
import graphql.schema.GraphQLType;
import graphql.schema.TypeResolver;
import graphql.schema.idl.SchemaPrinter;
import graphql.schema.idl.errors.SchemaProblem;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
public final class SchemaTransformer {
private static final Object DUMMY = new Object();
private final GraphQLSchema originalSchema;
private TypeResolver entityTypeResolver = null;
private DataFetcher entitiesDataFetcher = null;
private DataFetcherFactory entitiesDataFetcherFactory = null;
private Coercing coercingForAny = _Any.defaultCoercing;
SchemaTransformer(GraphQLSchema originalSchema) {
this.originalSchema = originalSchema;
}
@NotNull
public SchemaTransformer resolveEntityType(TypeResolver entityTypeResolver) {
this.entityTypeResolver = entityTypeResolver;
return this;
}
@NotNull
public SchemaTransformer fetchEntities(DataFetcher entitiesDataFetcher) {
this.entitiesDataFetcher = entitiesDataFetcher;
this.entitiesDataFetcherFactory = null;
return this;
}
@NotNull
public SchemaTransformer fetchEntitiesFactory(DataFetcherFactory entitiesDataFetcherFactory) {
this.entitiesDataFetcher = null;
this.entitiesDataFetcherFactory = entitiesDataFetcherFactory;
return this;
}
public SchemaTransformer coercingForAny(Coercing coercing) {
this.coercingForAny = coercing;
return this;
}
@NotNull
public final GraphQLSchema build() throws SchemaProblem {
final List<GraphQLError> errors = new ArrayList<>();
// Make new Schema
final GraphQLSchema.Builder newSchema = GraphQLSchema.newSchema(originalSchema);
final GraphQLObjectType originalQueryType = originalSchema.getQueryType();
final GraphQLCodeRegistry.Builder newCodeRegistry =
GraphQLCodeRegistry.newCodeRegistry(originalSchema.getCodeRegistry());
// Print the original schema as sdl and expose it as query { _service { sdl } }
final String sdl = sdl();
final GraphQLObjectType.Builder newQueryType = GraphQLObjectType.newObject(originalQueryType)
.field(_Service.field);
newCodeRegistry.dataFetcher(FieldCoordinates.coordinates(
originalQueryType.getName(),
_Service.fieldName
),
(DataFetcher<Object>) environment -> DUMMY);
newCodeRegistry.dataFetcher(FieldCoordinates.coordinates(
_Service.typeName,
_Service.sdlFieldName
),
(DataFetcher<String>) environment -> sdl);
// Collecting all entity types: Types with @key directive and all types that implement them
final Set<String> entityTypeNames = originalSchema.getAllTypesAsList().stream()
.filter(t -> t instanceof GraphQLDirectiveContainer &&
((GraphQLDirectiveContainer) t).getDirective(FederationDirectives.keyName) != null)
.map(GraphQLType::getName)
.collect(Collectors.toSet());
final Set<String> entityConcreteTypeNames = originalSchema.getAllTypesAsList()
.stream()
.filter(type -> type instanceof GraphQLObjectType)
.filter(type -> entityTypeNames.contains(type.getName()) ||
((GraphQLObjectType) type).getInterfaces()
.stream()
.anyMatch(itf -> entityTypeNames.contains(itf.getName())))
.map(GraphQLType::getName)
.collect(Collectors.toSet());
// If there are entity types install: Query._entities(representations: [_Any!]!): [_Entity]!
if (!entityConcreteTypeNames.isEmpty()) {
newQueryType.field(_Entity.field(entityConcreteTypeNames));
final GraphQLType originalAnyType = originalSchema.getType(_Any.typeName);
if (originalAnyType == null) {
newSchema.additionalType(_Any.type(coercingForAny));
}
if (entityTypeResolver != null) {
newCodeRegistry.typeResolver(_Entity.typeName, entityTypeResolver);
} else {
if (!newCodeRegistry.hasTypeResolver(_Entity.typeName)) {
errors.add(new FederationError("Missing a type resolver for _Entity"));
}
}
final FieldCoordinates _entities = FieldCoordinates.coordinates(originalQueryType.getName(), _Entity.fieldName);
if (entitiesDataFetcher != null) {
newCodeRegistry.dataFetcher(_entities, entitiesDataFetcher);
} else if (entitiesDataFetcherFactory != null) {
newCodeRegistry.dataFetcher(_entities, entitiesDataFetcherFactory);
} else if (!newCodeRegistry.hasDataFetcher(_entities)) {
errors.add(new FederationError("Missing a data fetcher for _entities"));
}
}
if (!errors.isEmpty()) {
throw new SchemaProblem(errors);
}
return newSchema
.query(newQueryType.build())
.codeRegistry(newCodeRegistry.build())
.build();
}
private String sdl() {
final SchemaPrinter.Options options = SchemaPrinter.Options.defaultOptions()
.includeScalarTypes(true)
.includeExtendedScalarTypes(true)
.includeSchemaDefintion(true)
.includeDirectives(true);
return new SchemaPrinter(options).print(originalSchema);
}
}
|
from textblob import TextBlob
sentence = "This is a really great movie!"
blob = TextBlob(sentence)
sentiment = blob.sentiment
print(f"Sentiment of the sentence '{sentence}' is: {sentiment.polarity}") |
<reponame>DrYaoHongBin/shop<filename>src/main/java/com/shop/service/user/impl/ValidationCodeServiceImpl.java<gh_stars>1-10
package com.shop.service.user.impl;
import com.shop.dao.user.UserMapper;
import com.shop.dao.user.ValidationCodeMapper;
import com.shop.model.user.User;
import com.shop.model.user.ValidationCode;
import com.shop.service.user.ValidationCodeService;
import com.shop.util.Mail;
import com.shop.util.MiaoDi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpSession;
import java.util.Calendar;
import java.util.List;
/**
* <p>Description:</p>
*
* @Author 姚洪斌
* @Date 2017/7/20 13:56
*/
@Service
public class ValidationCodeServiceImpl implements ValidationCodeService {
@Autowired
private UserMapper userMapper;
@Autowired
private ValidationCodeMapper validationCodeMapper;
public void emailCode(ValidationCode validationCode) throws Exception {
// 生成6位数的随机数
int randomNumber =(int)((Math.random()*9+1)*100000);
// 向用户发送验证码
Mail.MailValidationCode(validationCode.getEmail(), randomNumber);
// 获取当前系统的时间,getInstance()返回值是long型的整数 表示从1790-1-1 00:00:00到当前时间总共经过的时间的毫秒数
Calendar c = Calendar.getInstance();
// 设置验证码发送的时间
long time = c.getTimeInMillis();
// 设置过期时间为5分钟
long exptime =(time+1000*300);
validationCode.setEndTime(exptime);
validationCode.setValidationCode(randomNumber);
validationCodeMapper.insert(validationCode);
}
public String phoneNumberCode(ValidationCode validationCode) {
// 生成6位数的随机数
int randomNumber =(int)((Math.random()*9+1)*100000);
// 向用户发送验证码
String respCode = MiaoDi.execute(validationCode.getPhoneNumber(), randomNumber);
// 获取当前系统的时间,getInstance()返回值是long型的整数 表示从1790-1-1 00:00:00到当前时间总共经过的时间的毫秒数
Calendar c = Calendar.getInstance();
// 设置验证码发送的时间
long time = c.getTimeInMillis();
// 设置过期时间为5分钟
long exptime =(time+1000*300);
validationCode.setEndTime(exptime);
validationCode.setValidationCode(randomNumber);
validationCodeMapper.insert(validationCode);
// 返回发送短信后返回的状态码
return respCode;
}
/**
* 检查验证码是否过期
* @param validationCode
* @return
*/
public Integer validationCodeCheck(ValidationCode validationCode) {
// 新建一个对象,用于保存查询的条件
ValidationCode validation = new ValidationCode();
validation.setValidationCode(validationCode.getValidationCode());
// 前台的原因传过来的值有一个为""会影响查询(没有填写传过来的值为"")
if ("".equals(validationCode.getEmail())) {
// 用户没有填写邮箱,则按提交的手机号码查询
validation.setPhoneNumber(validationCode.getPhoneNumber());
} else {
// 用户没有填写手机号码,则按提交的邮箱查询
validation.setEmail(validationCode.getEmail());
}
// 通用Mapper的select方法,根据实体类不为空的字段查询
List<ValidationCode> validationCodes = validationCodeMapper.select(validation);
if (validationCodes.isEmpty()) { //查询不到验证码
return null;
} else {
ValidationCode code = validationCodes.get(0);
// 获取从1790-1-1 00:00:00到当前时间的时间
Calendar c = Calendar.getInstance();
// 获取从1790-1-1 00:00:00到当前时间总共经过的时间的毫秒数
long time = c.getTimeInMillis();
if (time > code.getEndTime()) {
// 当前系统的时间大于验证码过期的时间
return 0;
}
// 如果验证码通过则删除,防止重复利用
validationCodeMapper.delete(validation);
return 1; // 1无意义,解决无返回值问题
}
}
public String resetPhoneNumber(HttpSession session) {
User loginUser = (User)session.getAttribute("loginUser");
ValidationCode validationCode = new ValidationCode();
// 传入登录用户的手机号码
validationCode.setPhoneNumber(loginUser.getPhoneNumber());
try {
// 根据登录用户的手机号码发送验证码
String respCode = phoneNumberCode(validationCode);
}catch (Exception e) {
e.printStackTrace();
}
return "验证码已发送至您的手机,请输入验证码后再修改绑定!";
}
public String resetEmail(HttpSession session) {
User loginUser = (User)session.getAttribute("loginUser");
ValidationCode validationCode = new ValidationCode();
// 传入登录用户的邮箱
validationCode.setEmail(loginUser.getEmail());
try {
// 根据登录用户的邮箱发送验证码
emailCode(validationCode);
}catch (Exception e) {
e.printStackTrace();
}
return "验证码已发送至您的邮箱,请输入验证码后再修改绑定!";
}
}
|
<reponame>soham9403/gurukrupa
function hide_navbar(){
var left_pos = $(".header_link_list").css("left");
if(left_pos == "-310px"){
$(".header_link_list").css("left",'0px');
$(".bar-icon i").removeClass("fa fa-bars");
$(".bar-icon i").addClass("fa fa-times");
}
else{
$(".header_link_list").css("left",'-310px');
$(".bar-icon i").removeClass("fa fa-times");
$(".bar-icon i").addClass("fa fa-bars");
}
}
function create_slider(id,count=1){
var mySwiper = new Swiper('#'+id, {
// Optional parameters
loop: true,
slidesPerView :count,
// If we need pagination
pagination: {
el: '.swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// And if we need scrollbar
scrollbar: {
el: '.swiper-scrollbar',
},
})
}
function create_responsive_slider(id,full_screen_count = 3,med_screen_count = 2,small_screen_count = 1){
var window_width = $(window).width();
if(window_width<1250 && window_width>550){
create_slider(id,med_screen_count);
}
else if(window_width<550){
create_slider(id,small_screen_count);
}
else{
create_slider(id,full_screen_count);
}
}
function hide_popup(){
$(".pop_up_container").hide();
}
function show_popup(){
$(".pop_up_container").show();
}
function create_loader(id){
var loader = `<div class='container_loader'><img src='files/system/loader_small.gif'></div>`;
$("#"+id).append(loader);
}
function remove_loader(id){
$("#"+id).children('.container_loader').remove();
}
function show_alert(msg,description = "",heading=""){
$("#alert_msg").html(msg);
$("#alert_msg_heading").html(heading);
$("#alert_msg_des").html(description);
$(".pop_up_alert_container").show();
}
function hide_alert(){
$(".pop_up_alert_container").hide();
$("#alert_msg").html("");
$("#alert_msg_heading").html("");
$("#alert_msg_des").html("");
}
function open_form(url=""){
$(".pop_up_container").show();
create_loader('pop_up_box');
$.ajax({
url:url,
method:"post",
success:function(data){
$("#pop_up_box").html(data);
remove_loader('pop_up_box');
}
})
}
function send_data(id="",url=""){
var my_form = document.getElementById(id);
var form_data = new FormData(my_form);
var category_val = $("[name='category_name']").val();
console.log(form_data);
$.ajax({
url: url,
type: "POST",
data: form_data,
processData:false,
contentType: false,
success:function(return_data)
{
return_data = JSON.parse(return_data);
if(return_data.status==1){
hide_popup();
get_data();
show_alert(return_data.message);
}else{
show_alert(return_data.message);
}
}
})
}
function fileValidation(url="",id="file") {
var fileInput =
document.getElementById(id);
var filePath = fileInput.value;
// Allowing file type
var allowedExtensions =
/(\.jpg|\.jpeg|\.gif|\.png)$/i;
if (!allowedExtensions.exec(filePath)) {
show_alert('only " .jpg || .jpeg || .png || .gif " are allowed Extensions');
return false;
}
else if(fileInput.files.item(0).size>5242880 )
{
show_alert("File is Greaterthan 5MB");
return false;
}
else
{
val = 1;
data = new FormData();
data.append('file', $('#'+id)[0].files[0]);
data.append('action',"uploade_image");
data.append('is_first',val);
var old_file = $("#image_name").val();
create_loader("drop-area");
$.ajax({
url: url,
type: "POST",
data: data,
enctype: 'multipart/form-data',
processData: false,
contentType: false,
success:function(return_data)
{
return_data = JSON.parse(return_data);
if(return_data.status==1)
{
$('#imagePreview').attr('src',return_data.image);
$("#image_name").val(return_data.image_name);
delete_file('admincategory/delete_file',old_file);
remove_loader("drop-area");
}
else
{
show_alert("OOPS! Something Went Wrong");
return false;
remove_loader("drop-area");
}
}
})
}
}
function delete_file(url = "",file =""){
var data = {"file_name": file};
$.ajax({
url: url,
type: "POST",
data: data
})
}
function show_dlt_alert(url,id){
var html = `<div class="pop_up_alert_container" id="pop_up_dlt" style="display:block">
<div class="pop_up_box" id="pop_dlt_box">
<div class="primary-theme header">
<span id="alert_msg_heading"></span><i class="fa fa-times" onclick="hide_dlt_alert()"></i>
</div>
<div class="content">
<h3 id="alert_msg"> Are You Sure To want to Delete??</h3>
<p id="alert_msg_des"></p>
</div>
<div class="footer" >
<button onclick="hide_dlt_alert()" class="primary-theme">cancel</button>
<button onclick="delete_data('`+url+`',`+id+`)" class="danger-theme" >Delete</button>
</div>
</div>
</div>`;
$("body").prepend(html);
}
function hide_dlt_alert(){
$("body").children('#pop_up_dlt').remove();
}
function delete_data(url="",id=""){
var data = {"dlt_id": id};
create_loader("pop_dlt_box");
$.ajax({
url: url,
type: "POST",
data: data,
success:function(return_data){
remove_loader("pop_dlt_box");
hide_dlt_alert();
return_data = JSON.parse(return_data);
if(return_data.status==1){
show_alert("Data Deleted SuccessFully");
get_data();
}else{
show_alert(return_data.message);
}
}
})
}
function get_one(url="",id){
create_loader("update_btn");
$(".pop_up_container").show();
data = {"id":id,"action":"update"};
$.ajax({
url :url,
method:"POST",
data:data,
success:function(return_data){
$("#pop_up_box").html(return_data);
remove_loader("update_btn");
}
})
}
function pop_up_product(id){
var offer = $("#"+id).children('.offer_box').html();
var image = $("#"+id).children('.image_card ').children('.image').attr("src");
var prodct_title = $("#"+id).children('.prodct_title').html();
var product_rate = $("#"+id).children('.product_rate').html();
var product_offer = $("#"+id).children('.descount_description').html();
var product_description = $("#"+id).children('.product_description').html();
$(".product_pop_up").children('.product_pop_up_box').children('.image_card').children('.pop_up_product_image').attr('src',image);
$(".product_pop_up").children('.product_pop_up_box').children('.pop_up_product_title').html(prodct_title);
$(".product_pop_up").children('.product_pop_up_box').children('.pop_up_description').html(product_description);
$(".product_pop_up").children('.product_pop_up_box').children('.pop_up_product_rate').html(product_rate);
$(".product_pop_up").children('.product_pop_up_box').children('#pop_up_offer').children("p").html(product_offer);
var full_pop_up = $("#product_pop_up").html();
$("#pop_up_box").html(full_pop_up);
$(".pop_up_container").show();
$(".product_pop_up").show();
} |
package org.spongycastle.tls.crypto;
/**
* Interface for message digest, or hash, services.
*/
public interface TlsHash
{
/**
* Update the hash with the passed in input.
*
* @param input input array containing the data.
* @param inOff offset into the input array the input starts at.
* @param length the length of the input data.
*/
void update(byte[] input, int inOff, int length);
/**
* Return calculated hash for any input passed in.
*
* @return the hash value.
*/
byte[] calculateHash();
/**
* Return a clone of this hash object representing its current state.
*
* @return a clone of the current hash.
*/
Object clone();
/**
* Reset the hash underlying this service.
*/
void reset();
}
|
<filename>client/src/js/setupWeb3.js
import { ethers } from 'ethers';
export default async function setupWeb3() {
if (window.ethereum || window.web3) {
if (window.ethereum) {
window.ethereum.enable()
}
window.dapp.provider = new ethers.providers.Web3Provider(web3.currentProvider);
} else {
console.log('no provider detected');
window.dapp.provider = new ethers.providers.BaseProvider();
}
} |
<filename>apps/settings/js/panels/browser_privacy/browser_privacy.js
define(function(require) {
'use strict';
function BrowserPrivacy() {}
/**
* Clear browser history.
*/
BrowserPrivacy.prototype.clearHistory = function() {
navigator.mozSettings.createLock().set({'clear.browser.history': true});
};
/**
* Clear browser private data.
*/
BrowserPrivacy.prototype.clearPrivateData = function() {
navigator.mozSettings.createLock().set({
'clear.browser.private-data': true
});
};
/**
* Clear bookmarks data
*/
BrowserPrivacy.prototype.clearBookmarksData = function() {
navigator.mozSettings.createLock().set({'clear.browser.bookmarks': true});
};
return function() {
return new BrowserPrivacy();
};
});
|
import React, { useState, useEffect } from 'react';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import Selecter from './Selecter';
import CustomInput from 'components/CustomInput/CustomInput';
import IconButton from '@material-ui/core/IconButton';
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import PropTypes from 'prop-types';
import Box from '@material-ui/core/Box';
import Collapse from '@material-ui/core/Collapse';
import Typography from '@material-ui/core/Typography';
import axios from 'axios';
import NutFactsModal from './NutFacts/NutFactsModal';
const DDRow = ({ portion, handleChange, i }) => {
const [dropDown, setDropDown] = useState(false);
const [loading, setLoading] = useState(true);
const [ingredients, setIngredients] = useState([]);
const [pw, setPW] = useState(null);
const [ingredientAmountSum, setIngredientAmountSum] = useState(0);
const [ingredientWeightSum, setIngredientWeightSum] = useState(0);
const url =
portion === undefined
? ''
: `api/foodingredient/foodid/${portion['food']['_id']}`;
const reducer = (accumulator, currentValue) => accumulator + currentValue;
useEffect(() => {
const fetchData = async () => {
setLoading(true);
const result = await axios(url);
setIngredients(result.data);
let a = result.data.map((x) => x['Amount']).reduce(reducer);
setIngredientAmountSum(a);
let w = result.data.map((x) => x['IngredWeight']).reduce(reducer);
setIngredientWeightSum(w);
setLoading(false);
};
fetchData();
}, [portion]);
return (
<>
<TableRow key={portion['_id']}>
<TableCell component="th" scope="row">
{portion['food']['Code']}
</TableCell>
<TableCell align="right">{portion['food']['Desc']}</TableCell>
<TableCell align="right">{portion['food']['AddDescs']}</TableCell>
<TableCell align="right">
<Selecter
portionFormData={portion}
pw={pw}
setPW={setPW}
i={i}
handleChange={handleChange}
/>
</TableCell>
<TableCell align="right">
<CustomInput
id={`${portion['_id']}-taken`}
type={'number'}
formControlProps={{ fullWidth: true }}
inputProps={{
placeholder: 'taken',
name: 'taken',
value: portion['taken'],
onChange: (e) => handleChange(e, i)
}}
/>
</TableCell>
<TableCell align="right">
<CustomInput
id={`${portion['_id']}-returned`}
type={'number'}
formControlProps={{ fullWidth: true }}
inputProps={{
placeholder: 'returned',
name: 'returned',
value: portion['returned'],
onChange: (e) => handleChange(e, i)
}}
/>
</TableCell>
<TableCell>
<NutFactsModal />
</TableCell>
<TableCell>
{' '}
<IconButton
aria-label="expand row"
size="small"
onClick={() => setDropDown(!dropDown)}
>
{dropDown ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}
</IconButton>
</TableCell>
</TableRow>
<TableRow>
<TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
<Collapse in={dropDown} timeout="auto" unmountOnExit>
<Box margin={1}>
<Typography variant="h6" gutterBottom component="div">
Ingredients
</Typography>
<Table size="small" aria-label="purchases">
<TableHead>
<TableRow>
<TableCell>Ingredient Code</TableCell>
<TableCell>Ingredient Description</TableCell>
<TableCell align="right">Amount</TableCell>
<TableCell align="right">Measure</TableCell>
<TableCell align="right">Portion Description</TableCell>
<TableCell align="right">Retention Code</TableCell>
<TableCell align="right">Ingredient Weight (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{loading ? (
<TableRow>
<TableCell>Loading...</TableCell>
</TableRow>
) : (
ingredients.map((row) => (
<TableRow key={row._id}>
<TableCell>{row.IngredCode}</TableCell>
<TableCell align="right">{row.IngredDesc}</TableCell>
<TableCell align="right">
{parseFloat(
(row.Amount / ingredientAmountSum) *
(pw * (portion['taken'] - portion['returned']))
).toFixed(1)}
</TableCell>
<TableCell align="right">{row.Measure}</TableCell>
<TableCell align="right">{row.PortDesc}</TableCell>
<TableCell align="right">{row.RetCode}</TableCell>
<TableCell align="right">
{parseFloat(
(row.IngredWeight / ingredientWeightSum) *
(pw * (portion['taken'] - portion['returned']))
).toFixed(1)}
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</Box>
</Collapse>
</TableCell>
</TableRow>
</>
);
};
DDRow.propTypes = {
portion: PropTypes.object,
handleChange: PropTypes.func,
i: PropTypes.number
};
export default DDRow;
|
#include <stdio.h>
// Returns maximum in arr[][] of size MxN
int findMax(int M, int N, int arr[][N])
{
int i, j;
int max_indices[2]; // store indices of max element
int max = arr[0][0]; // store maximum value
max_indices[0] = 0;
max_indices[1] = 0;
// Find maximum element
for (i = 0; i < M; i++)
{
for (j = 0; j < N; j++)
{
if (arr[i][j] > max)
{
max = arr[i][j];
max_indices[0] = i;
max_indices[1] = j;
}
}
}
return max_indices;
}
// Driver Code
int main()
{
int M = 3;
int N = 4;
int arr[3][4];
// Get input
for (int i = 0; i < M; i++)
{
for (int j = 0; j < N; j++)
{
scanf("%d", &arr[i][j]);
}
}
int *max_indices = findMax(M, N, arr);
// Print indices of maximum element
printf("Maximum element is at (%d, %d)\n",
max_indices[0], max_indices[1]);
return 0;
} |
<gh_stars>1-10
module Near
class Transaction < Common::Resource
field :id
field :time
field :height
field :hash
field :sender
field :receiver
field :gas_burnt, type: :integer
field :success
collection :actions
end
end
|
<filename>src/platform/mt8195/lib/dai.c
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2021 Mediatek
//
// Author: <NAME> <<EMAIL>>
#include <sof/common.h>
#include <sof/lib/dai.h>
#include <sof/lib/memory.h>
#include <sof/sof.h>
#include <sof/spinlock.h>
#include <ipc/dai.h>
#include <ipc/stream.h>
#include <sof/drivers/afe-dai.h>
#include <mt8195-afe-common.h>
static int afe_dai_handshake[MT8195_DAI_NUM] = {
AFE_HANDSHAKE(MT8195_AFE_IO_ETDM2_OUT, MT8195_IRQ_13, MT8195_MEMIF_DL2),
AFE_HANDSHAKE(MT8195_AFE_IO_ETDM1_OUT, MT8195_IRQ_14, MT8195_MEMIF_DL3),
AFE_HANDSHAKE(MT8195_AFE_IO_UL_SRC1, MT8195_IRQ_21, MT8195_MEMIF_UL4),
AFE_HANDSHAKE(MT8195_AFE_IO_ETDM2_IN, MT8195_IRQ_22, MT8195_MEMIF_UL5),
};
static SHARED_DATA struct dai afe_dai[MT8195_DAI_NUM];
const struct dai_type_info dti[] = {
{
.type = SOF_DAI_MEDIATEK_AFE,
.dai_array = afe_dai,
.num_dais = ARRAY_SIZE(afe_dai),
},
};
const struct dai_info lib_dai = {
.dai_type_array = dti,
.num_dai_types = ARRAY_SIZE(dti),
};
int dai_init(struct sof *sof)
{
int i;
/* initialize spin locks early to enable ref counting */
for (i = 0; i < ARRAY_SIZE(afe_dai); i++) {
spinlock_init(&afe_dai[i].lock);
afe_dai[i].index = AFE_HS_GET_DAI(afe_dai_handshake[i]);
afe_dai[i].drv = &afe_dai_driver;
/* TODO, fifo[0] change to target playback or capture */
afe_dai[i].plat_data.fifo[0].handshake = afe_dai_handshake[i];
}
sof->dai_info = &lib_dai;
return 0;
}
|
/*
* Copyright (c) 2010 Intel Corporation. All rights reserved.
* Copyright (c) Imagination Technologies Limited, UK
* Redistribution. Redistribution and use in binary form, without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions must reproduce the above copyright notice and the following
* disclaimer in the documentation and/or other materials provided with the
* distribution.Neither the name of Intel Corporation nor the names of its
* suppliers may be used to endorse or promote products derived from this
* software without specific prior written permission. No reverse engineering,
* decompilation, or disassembly of this software is permitted.
* Limited patent license. Intel Corporation grants a world-wide, royalty-free,
* non-exclusive license under patents it now or hereafter owns or controls
* to make, have made, use, import,offer to sell and sell ("utilize") this
* software, but solely to the extent that any such patent is necessary to
* Utilize the software alone. The patent license shall not apply to any
* combinations which include this software. No hardware per se is licensed hereunder.
*
* DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// This file was automatically generated from ../release/H264MasterFirmwareVBR.dnl using dnl2c.
unsigned char *szH264MasterFirmwareVBR_buildtag="BUILD_TOPAZ_SC_1_00_00_0327";
unsigned long ui32H264VBR_MasterMTXTOPAZFWTextSize = 3881;
unsigned long ui32H264VBR_MasterMTXTOPAZFWDataSize = 604;
unsigned long ui32H264VBR_MasterMTXTOPAZFWTextRelocSize = 0;
unsigned long ui32H264VBR_MasterMTXTOPAZFWDataRelocSize = 0;
unsigned long ui32H264VBR_MasterMTXTOPAZFWTextOrigin = 0x80900000;
unsigned long ui32H264VBR_MasterMTXTOPAZFWDataOrigin = 0x82883cc0;
unsigned long aui32H264VBR_MasterMTXTOPAZFWText[] =
{
0x9040c001,
0xc80993fe,
0xc0000e42,
0xc8290e00,
0xc4628422,
0xc8298440,
0xc3cc8622,
0x9e838600,
0xc8099e43,
0xc7920d42,
0xc8090d20,
0xc7920942,
0xc8090960,
0xc00a0e42,
0xc8090e40,
0xc00e87c2,
0x9c1887d0,
0x0c020802,
0x09820d82,
0x09020d02,
0x08820c82,
0x9320fffe,
0xa401c838,
0x0dc2c809,
0x0de0c790,
0x0e42c809,
0x0b46b080,
0x7e74b77f,
0xa48d0882,
0xffff9ff3,
0x9d1393e0,
0xf8398081,
0x0707a205,
0x06850307,
0x03839e97,
0x0fa0060f,
0x018d058d,
0x9c62008f,
0x9340ffff,
0x0ea0060b,
0xffff9c62,
0x058d93a0,
0xb700018d,
0xb780540c,
0x9c015394,
0x0687a605,
0x0ea0060b,
0xffff9c62,
0xf9f893a0,
0xf9f8aa9d,
0x9c22aa1d,
0xa6059c22,
0x85028420,
0xb55f0a82,
0x850a7f7c,
0x9c89c037,
0x9c80c971,
0x75002a08,
0x9184c000,
0x9979c014,
0x450cb780,
0xc0007500,
0x0d8290a4,
0x9998c054,
0x7f6cb79f,
0xc0007500,
0xc05490e4,
0x0d8a99a0,
0x998ec054,
0x8d80e032,
0x99b2c014,
0x0800e000,
0x91c4c000,
0x9abcc014,
0x450cb780,
0x2a797402,
0x450cb580,
0x90e4c000,
0x9100c000,
0xc0149e83,
0x75409a2f,
0x9162fffe,
0x7eeeb79f,
0x7f6eb7bf,
0x9c228c60,
0x85028702,
0x6818b543,
0x6898b543,
0x6918b543,
0x6c18b543,
0x6c98b543,
0x6d18b543,
0x4d18b542,
0x7218b543,
0x4784b540,
0x4804b540,
0x4884b540,
0x4904b540,
0x4984b540,
0x4b84b540,
0x4c04b540,
0x4c84b540,
0x4202b540,
0x4282b540,
0x4f84b540,
0x7a84b540,
0x4e04b540,
0x4602b540,
0xa6059c22,
0xfff48420,
0x0d8a9b8b,
0x9938c054,
0x9bcafff4,
0x9943c054,
0x0cd2c420,
0xb4810a02,
0xb105c000,
0x0d8a4220,
0x8d80e031,
0x9aebc014,
0x0922c829,
0x0920c462,
0x7f6cb73f,
0x2a5ed071,
0x448cb580,
0x2a80c01e,
0xf0088502,
0x7102a8c2,
0x5a95c280,
0x458cb5a0,
0x4434b341,
0xb5407640,
0xb520451c,
0xc000440c,
0xd01190c2,
0xf0080e12,
0xb780a241,
0xc807548c,
0xc57008c2,
0xc0320880,
0xb5800caa,
0xb421530c,
0x0a2ac000,
0xb4810cf4,
0x1a28c000,
0xc0020902,
0xb96008ba,
0xc2004078,
0xd2240a00,
0xb441588b,
0xce00c000,
0xffff0a11,
0xe0009301,
0xffff1884,
0xc8079244,
0xc5760a42,
0xc0320a00,
0xb4810caa,
0x0a02c000,
0x09020882,
0xb9600884,
0xc2004078,
0xd2240a00,
0xb441588b,
0xce00c000,
0xffff0a11,
0xc0049301,
0xffff745a,
0x0a02923c,
0x0c9ec034,
0xc000b481,
0x9b11fff4,
0xb79f0802,
0xb7bf7eee,
0x8c607f6e,
0x9e549c22,
0x0c82c040,
0xb4219e59,
0xc040c000,
0xb4820d02,
0x9c22c000,
0x2d7cc00e,
0x29e0c00e,
0x9e545d30,
0x0c82c040,
0xb46131b8,
0xc040c000,
0xb4420d02,
0x9c22c000,
0x8420a60d,
0x06870703,
0x5c8dc280,
0xd0a21c84,
0x02875ca0,
0x0a5ed011,
0x5a0dc200,
0xc2001a04,
0x5cd05a30,
0x9e4c3098,
0xc0320405,
0x30980c8a,
0x3880c801,
0xc000b421,
0xc8019ea9,
0xc0020a02,
0x65530a00,
0x0c8ac030,
0xc000b481,
0x0882c002,
0xb4210c84,
0x9e93c000,
0x5f09d022,
0x5d0d9e53,
0xfff41d04,
0xc2809bb4,
0x1e845e91,
0x5e84c280,
0x1a849e6c,
0x5a90c280,
0x3a80c181,
0x09820d8a,
0x314a0d02,
0x9baefff4,
0x0d82c0c0,
0xc0020992,
0xc0020d02,
0xc0540902,
0x0a0a9862,
0x0c9ec034,
0xc000b481,
0x75bf1b04,
0xc0008502,
0x9dcf9202,
0x7f7cb55f,
0x9835c054,
0xa045f231,
0x7f7cb75f,
0x75bf1b04,
0xffff8510,
0xc0029284,
0xc0300a42,
0xb4810c8e,
0xb79fc000,
0xb7bf7e6e,
0xb7df7eee,
0xc0027f6e,
0x9c228c00,
0xf8399c22,
0xb780a285,
0x0986448c,
0x0d0270c8,
0x9096c001,
0x4514b760,
0x08020c06,
0x0902c1cc,
0x19c4d010,
0x9e5d9e44,
0x508cc200,
0xc0007942,
0xd1249202,
0xc400588b,
0xb4013c80,
0xb104c000,
0x9e554220,
0x750230d2,
0x4822b321,
0xc00c9e8a,
0x09840900,
0x9101ffff,
0x4514b540,
0xaa9df9f8,
0xc2009c22,
0xc0378502,
0xc1719c89,
0xc8179c80,
0x9c229c80,
0xb780a605,
0x9e5d450c,
0xc000790a,
0xfff49162,
0xfff49bf0,
0xb7809bbe,
0x790a450c,
0x9324ffff,
0x7f6eb79f,
0x7feeb7bf,
0x9c228c40,
0xc002a61d,
0x9e5d8400,
0xaa21f208,
0xc0017500,
0xc4209004,
0x0a020cda,
0xc000b481,
0x4220b101,
0xb4811c84,
0xb106c000,
0xb4814220,
0xb107c000,
0x008f4220,
0xc000b481,
0x4240b106,
0xc000b481,
0x4240b105,
0x2a6ed1f1,
0xb40d7516,
0xf2084622,
0x7480a921,
0x92c2c000,
0x8c80e092,
0x098a0dc2,
0x0d02c002,
0x9b0afff4,
0x7cecb7df,
0x7c6cb79f,
0x7d6cb7ff,
0x7df4b7df,
0x7e74b7bf,
0xa221f208,
0x5aa1c300,
0x2afcc00e,
0x0d869ea9,
0xfff455e4,
0xd3129ba3,
0xc1c068d1,
0x5c8b0c80,
0xc000b4c1,
0x6951d312,
0x0d10c1c0,
0xb4e25d0b,
0xd312c000,
0x9e7468d1,
0x0ca0c1c0,
0xb4815c8b,
0xd312c000,
0x9e6c6951,
0x0d30c1c0,
0xb4825d0b,
0xd312c000,
0x0a0268d1,
0x0cc0c1c0,
0xc4005c8b,
0xb4813c80,
0xb106c000,
0xcfff4220,
0xd3122b7c,
0xc1c068d1,
0x5c8b0cc0,
0xc000b4c1,
0x450cb720,
0xc2000a04,
0x000b5214,
0xb5203098,
0xb79f450c,
0xb7bf7c6e,
0xb7df7cee,
0xb7ff7d6e,
0xc0047dee,
0x9c228c00,
0xa205f839,
0x0e30f011,
0x919cc000,
0x9ea10a04,
0x55e40d86,
0xc0343d88,
0x0d8a9b3d,
0x9b3ac034,
0xaa1df9f8,
0xa6059c22,
0x0a42c801,
0x0a00c010,
0x2ebed3f2,
0x0caac032,
0xc000b481,
0x0cf408aa,
0xc000b421,
0x550cb780,
0x0c92c080,
0xa881f208,
0xc000b421,
0x550cb780,
0xf2080c88,
0xb421a889,
0xb780c000,
0x0c84550c,
0xa88df208,
0xc000b421,
0x1c980902,
0xc000b441,
0x550cb780,
0xf2080c90,
0xb421a885,
0xb7a0c000,
0x0dd2550c,
0x9af5c034,
0xaa25f208,
0xffff7008,
0x0daa9344,
0x0d060982,
0x0902c121,
0x9a4afff4,
0x4694b760,
0x0d02c021,
0x09c20d04,
0x9a37fff4,
0x4694b760,
0x0d0609c2,
0x9a31fff4,
0x09820daa,
0xc1010d02,
0xfff40902,
0x0d929a35,
0x9ad1c034,
0xaa25f208,
0xffff7008,
0x77409344,
0x90a2c000,
0xc0340d8e,
0x0d8a9ad3,
0x9ad0c034,
0x7f6eb79f,
0x7feeb7bf,
0x9c228c40,
0xc470a60d,
0x0a020c8e,
0xc000b481,
0x4220b101,
0x550cb780,
0xa085f208,
0x0a021c8c,
0xc000b481,
0x4220b105,
0x2b5ed1f1,
0x550cb780,
0xcff09ead,
0xc2802e80,
0xf2085ea1,
0xc280a281,
0x2a845a9d,
0x0a020c84,
0xc000b481,
0x4220b101,
0x460cb520,
0xb4810c84,
0xb101c000,
0xb5204220,
0xc070468c,
0xb4810c8e,
0x0882c000,
0xb4211c8c,
0x0c90c000,
0xc000b481,
0xb4211c8c,
0x0c84c000,
0xc000b481,
0x6104b740,
0x5908d326,
0xe0309e2d,
0x9ea4aa4d,
0xb7809c62,
0x7740550c,
0x9ea98502,
0xd0010d82,
0xf2080db2,
0x2596a10f,
0x9b3ffff4,
0xc0700a06,
0xb4810c82,
0x000dc000,
0x7eeeb79f,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c60,
0x4494b760,
0xc0020a7f,
0x9ea18502,
0x89afe220,
0xfff355ad,
0xc01c91a0,
0xc0007ebe,
0xd1a29244,
0xc0905e08,
0xd2240a00,
0x08825909,
0x3d00c400,
0xc000b422,
0x4220b104,
0xffff7500,
0xc1809364,
0xc0905c88,
0x5c890c80,
0xc000b461,
0xc1809c22,
0xc0905c88,
0x5c890c80,
0x3c80c400,
0xb4810a02,
0xb101c000,
0xf0084220,
0x5d88a0e1,
0x0d80c090,
0xb4835d89,
0x9c22c000,
0xd3129e5b,
0x0a0268b1,
0x0cc0c1c0,
0xc4005c8b,
0xb4813c80,
0xb102c000,
0xb7604220,
0xd3125894,
0x85026931,
0xb9609e51,
0xc1c04070,
0xf03108e0,
0xd0a4aa65,
0xb4815889,
0x0890c000,
0xffff8510,
0xc1c09301,
0xe2108560,
0xb76080ad,
0xc0015a94,
0xce3e3904,
0xb9608521,
0xf0314048,
0xd0a4aa65,
0xb4815889,
0x0890c000,
0xffff8510,
0xe2209301,
0xb780812d,
0xc001580c,
0xc1c03908,
0x5d090d60,
0xa885dac8,
0xc000b422,
0x68b1d312,
0x0cc0c1c0,
0xb4415c8b,
0x9c22c000,
0x500cb740,
0x6cb1d312,
0xc1c00a02,
0x5c8b0cc0,
0x3c80c400,
0xc000b481,
0x4220b101,
0x6cb1d312,
0x0cf0c1ca,
0xb4415c8b,
0xc00cc000,
0xc0016d82,
0xc1c038c0,
0x5d8b0dc0,
0xc000b423,
0x84209c22,
0xe0318502,
0x09068d80,
0x7f7cb55f,
0x0cd2c472,
0xb4810a02,
0xb101c000,
0x9e8a4220,
0xc0010203,
0x75002a40,
0x9362c000,
0x68a1d312,
0xc1ca0a02,
0x5c8b0cf0,
0x3c80c400,
0xc000b481,
0x4220b101,
0xa0e1f008,
0x501cb740,
0x7f6cb79f,
0xf3109e51,
0xcfff8021,
0xb58028be,
0xd312500c,
0xc1c068a1,
0x5c8b0cc0,
0xc000b421,
0x9c228c20,
0xc006a605,
0x87028420,
0xc4720c06,
0x0a020cd2,
0xc000b481,
0x4220b105,
0x020b9eaa,
0x2a04c001,
0xc0017500,
0xd31190c2,
0xe1b16c81,
0xb7608d00,
0x09825894,
0x4070b960,
0x08e0c1c0,
0x5889d0a4,
0x3c80c400,
0xc000b461,
0x4220b104,
0xa245f029,
0x87100890,
0x9281ffff,
0xa973f050,
0x796cb79f,
0xf3109e55,
0xcfff8021,
0xf0502afa,
0x020ba271,
0x2a08c001,
0xd3127500,
0xc0026e81,
0xe0b19082,
0xc1c08d00,
0xe1108760,
0xb74082a3,
0x09825a94,
0x4048b960,
0xd0a49e93,
0xc4005889,
0xb4613c80,
0xb104c000,
0xf0294220,
0x0890a245,
0x92a1ffff,
0x580cb780,
0xa943f010,
0xa891da08,
0xaa61f010,
0xa95cf012,
0xa9c7f050,
0x8021f310,
0xa94bd850,
0xd8101884,
0xf010a0c9,
0xb79fa241,
0xb73f7b6a,
0xb73f7eec,
0xf3107ff4,
0xe2108021,
0xe22082a3,
0xcfff80bb,
0xd8502af6,
0xf010a249,
0xf050a0dd,
0x020ba0c6,
0x2a10c001,
0xc0007500,
0xc01490c2,
0xcfff9838,
0xc1c02aee,
0xc2800ec0,
0xb4a15c8b,
0xb79fc000,
0xb7bf78ee,
0xc006796e,
0x9c228c60,
0x6cb1d312,
0xc1c00a02,
0x5c8b0cc0,
0x3c80c400,
0xc000b481,
0x4220b103,
0x5994b740,
0x6d31d311,
0x4058b960,
0xc1c00085,
0xf03108e0,
0xd0a4aa45,
0xb4815889,
0x0890c000,
0x9321ffff,
0x3990c001,
0x0940c1c0,
0x588bd124,
0xc000b461,
0xa6059c22,
0x8440c002,
0x5994b740,
0xc4720a86,
0x08820cd2,
0x8502c00c,
0xc000b421,
0x4220b104,
0xc0010189,
0x75002a10,
0x9302ffff,
0x8d00e0d1,
0x08029d47,
0x4058b960,
0x08e0c1c0,
0x5889d0a4,
0x3c80c400,
0xc000b401,
0x4220b104,
0xa245f029,
0xffff0890,
0x9dc792a1,
0x29eecfff,
0x0cc0c1c0,
0xb4615c8b,
0xf010c000,
0xb79fa94b,
0xf0127b6c,
0xb73fa94c,
0xd8107bec,
0xf310a9cb,
0xf0108021,
0xe210a953,
0xd81282a3,
0xf010a94c,
0xf010a249,
0xb79fa0cd,
0xb73f7c6c,
0xb73f75ea,
0xf3107572,
0xe2108021,
0xe22082a3,
0x0d8680bb,
0xa251f010,
0xa0cdd810,
0xa0cad810,
0x9b7efff4,
0x68d1d312,
0xc1c00a02,
0x5c8b0cc0,
0x3c80c400,
0xc000b481,
0x4220b104,
0x3a20c001,
0x68d1d312,
0x0cc0c1c0,
0xb4815c8b,
0xb79fc000,
0xb7bf7c6e,
0xc0047cee,
0x9c228c00,
0xa285f839,
0xaa61f010,
0xc0007500,
0xd0089164,
0x9e48a8c1,
0xc2000a06,
0x30985200,
0xa0c1d008,
0x0d38d011,
0xa9f2d010,
0x1a30f011,
0xa943f010,
0xc0001984,
0xcff193e2,
0xcff08702,
0xc00f8700,
0xc00e087e,
0xc050087c,
0xf0290c1a,
0xd020a8c5,
0x5ca12095,
0x22109e4d,
0x5a20c200,
0xba0930d8,
0xb4204006,
0xf011c000,
0x19841a30,
0x91e4ffff,
0x802ff210,
0xa241f010,
0xaa9df9f8,
0xa60d9c22,
0x59409e5d,
0x5841f124,
0x2d2ed3f1,
0x4422b350,
0x93e2c002,
0xaa61f008,
0x2a1ce000,
0x4422b425,
0xaa61d808,
0xe2108522,
0x2a1c88a9,
0x9ea31218,
0x0a7ec00e,
0x400bba1b,
0x5207c200,
0xc0012128,
0x9e599276,
0x5a20c100,
0xc2001103,
0x9ea25209,
0x58a1c200,
0xd0319e8d,
0xd2080cb0,
0xc00ea8a2,
0xc2002a7c,
0xc00e5207,
0x349a2a7c,
0xa0a2d208,
0xa963f008,
0xd3f19ea1,
0xc2012a2e,
0xf3108128,
0x85028821,
0xa261f008,
0xa127d228,
0xcff09eab,
0x59402d01,
0x35225941,
0x2d7cc00e,
0x9bb1fff4,
0x92e0c000,
0xaa21d208,
0x000b9e5e,
0x324250d8,
0xa205d029,
0xa8e1f008,
0x291ed013,
0x8029f210,
0x9e447510,
0xf0080098,
0xb350a0e1,
0xb79f4426,
0xb7bf7eee,
0xb7df7f6e,
0x8c607fee,
0xa6059c22,
0x59409e58,
0x74b05941,
0x06850287,
0x9374c000,
0x5d61c280,
0x59401960,
0xfff45941,
0x9e839b82,
0xc280018b,
0xc00e5d41,
0x09222d7c,
0x9b79fff4,
0x018b9e83,
0x5d21c280,
0x2d7cc00e,
0xc0010922,
0x74a090a0,
0x92d4c000,
0x018b9e83,
0x5d41c280,
0x2d7cc00e,
0x59401940,
0xfff45941,
0x9e839b62,
0xc280018b,
0xc00e5d21,
0x09222d7c,
0x91c0c000,
0xc0007490,
0x9e8392d4,
0xc280018b,
0xc00e5d21,
0x19202d7c,
0x59415940,
0x9b4bfff4,
0x018b9e83,
0x2d5ed3f2,
0xfff40922,
0xc0009b44,
0x9e839100,
0xd3f2018b,
0xfff42d5e,
0xb79f9b3c,
0xb7bf7f6e,
0x8c407fee,
0xa60d9c22,
0x9e690685,
0x0b029e9e,
0x0a867182,
0x9208c000,
0x16d29ea9,
0xc2809e69,
0xd0115a84,
0x71021a52,
0x08e2d011,
0x2b1ed3f1,
0x9286ffff,
0x0a62d011,
0x028d7510,
0x91d4c000,
0x0d029e73,
0xfff40922,
0x1aa09b14,
0x0a52d011,
0x9e837510,
0x92d2ffff,
0x0d069e73,
0x0952d011,
0x297cc00e,
0x9b05fff4,
0x9e837590,
0x92f4c000,
0x1a60d031,
0x2b4ed3f1,
0x9e739e6c,
0x5299c200,
0x295ed3f2,
0xfff40922,
0x9e839af4,
0x52b8c200,
0x75909ea9,
0xffff16d2,
0x9e7391b2,
0x2d5ed3f2,
0xfff4010d,
0xb79f9ae6,
0xb7bf7eee,
0xb7df7f6e,
0x8c607fee,
0xf0119c22,
0x9e990ca0,
0x5a04d09a,
0x1a42d00d,
0x909ac000,
0x12421203,
0x9ea29e4b,
0x9360fffc,
0x8420a60d,
0x9e558502,
0xb55f9e9e,
0xf0107f7c,
0xf012aa61,
0xb55f8c8e,
0x1a087ffc,
0xd2267512,
0x8540590c,
0x8044e05a,
0x9200c006,
0x9280c000,
0x90e0c001,
0x9200c001,
0x9340c001,
0x9040c002,
0x92a0c002,
0x9120c003,
0x9320c004,
0x9060c005,
0x9240c005,
0x568cb720,
0x49adb780,
0x75002a08,
0xb352856a,
0x9d574462,
0x8d88e011,
0x1954d072,
0xb5a0058b,
0xfff44f8c,
0xc0059bb6,
0xb7409120,
0xe0114f94,
0x9ea98d88,
0x1514058b,
0x9babfff4,
0x93c0c004,
0x8d88e011,
0x295ed3f2,
0x0916058b,
0x9a7dfff4,
0x4f8cb5a0,
0x9240c004,
0x8d88e011,
0x295ed3f2,
0x0916058b,
0x9a71fff4,
0x9100c004,
0xaa41d210,
0x8c88f011,
0x4a7d058b,
0x2aced012,
0x09060d06,
0xfff4018b,
0x9e839a62,
0x018b9e6a,
0xfff40d02,
0xc0039a5c,
0xd2109260,
0xf011aa41,
0x058b8c88,
0xd0124a7d,
0x0d022ace,
0x018b0906,
0x9a4dfff4,
0x9e6a9e83,
0xc00e018b,
0xfff40d7e,
0xc0029a46,
0xb72093a0,
0xd272568c,
0xb7800890,
0x7500404d,
0xc0000303,
0xf2c89104,
0xb580aa51,
0xc000404d,
0xb7809100,
0xf248588c,
0xb520a895,
0xd271404d,
0xf2080ae0,
0xfa88a8a1,
0x0c82a951,
0x05830183,
0x9a29c0b4,
0x0a60d2b1,
0xa903f208,
0xe0119e41,
0xe2208d88,
0x058b8923,
0xf208095e,
0xfff4a0a1,
0xc0019a84,
0xb7809160,
0xe011570c,
0xf2088d88,
0x058ba902,
0xfff4095e,
0xc0009a78,
0xb74093e0,
0xb7837f1c,
0xe0117e08,
0xf3108d88,
0x9dcb8021,
0x095e058b,
0x7f0cb580,
0x9a67fff4,
0x91c0c000,
0x7e10b743,
0x8d88e011,
0x091e058b,
0x99edfff4,
0x9080c000,
0x90e0c001,
0x7e68b79f,
0x0cfec00f,
0x0cfcc00e,
0xb59f9e4a,
0xb73f7c68,
0xcff17f6c,
0xcff00a02,
0xc0500a00,
0x22180c9a,
0x5a21c200,
0x58a02094,
0xba243242,
0xb59f4006,
0xb4817f6c,
0xf210c000,
0xb79fa943,
0xf3107fec,
0xf2108021,
0xb79fa241,
0xb7bf7e6e,
0xb7df7eee,
0xc0027f6e,
0x9c228c00,
0x8440a61d,
0x9e9d8502,
0xabe5f031,
0xb55f0b02,
0xb55f7878,
0x718e7efc,
0xc0019d3a,
0xaa4191e8,
0xc0007502,
0xd0189392,
0xe032aad1,
0xe0518d08,
0x9dcf8d00,
0x85109eb1,
0x7f7cb55f,
0x0a9cc002,
0x5a95c280,
0xfff4018b,
0xb75f9957,
0xc2807f7c,
0xc3015a88,
0xc0008122,
0xe03191a0,
0x9dcf8d88,
0x8510050b,
0x7f7cb55f,
0x9ab8fff4,
0x7f7cb75f,
0x718e0b04,
0x92a6fffe,
0x7868b79f,
0x0c9ec050,
0xc000b481,
0x0d16c050,
0xc000b4e2,
0x7eecb71f,
0x7d6eb79f,
0x7deeb7bf,
0x7e6eb7df,
0x7eeeb7ff,
0x8c40c002,
0xa6059c22,
0x0c8ac450,
0xb4810a02,
0xb102c000,
0xe00e4240,
0xd1042d7c,
0xc8015d10,
0x0a400a02,
0x0c8ac030,
0xc000b481,
0x0c8408c2,
0xc000b421,
0x5d8cb740,
0xa947f048,
0x802df210,
0xa245f048,
0x0c86c450,
0xb4810a02,
0xb101c000,
0xc8014220,
0xc0100a42,
0xc0320a00,
0xb4810caa,
0x08aac000,
0x0d1ec034,
0xc000b422,
0x0cf2c450,
0xb4810a02,
0xb101c000,
0xd0534220,
0xb7801910,
0xf248568c,
0xf210a891,
0x0d8288a3,
0x018b0d06,
0x9ad7ffd4,
0x0ca2c080,
0xc000b4a1,
0x0d82c002,
0x991bc014,
0xffff700a,
0x0daa9364,
0x0d0a0982,
0x0902c121,
0x9872ffd4,
0x568cb780,
0xa992f248,
0x0d02c0a1,
0x09c20d04,
0x985dffd4,
0x0d82c0c0,
0x0d420992,
0xc0140942,
0xb79f991e,
0xb7bf7f6e,
0x8c407fee,
0xa6059c22,
0x8400c010,
0x568cb720,
0x49adb780,
0x75002a20,
0x588cb7a0,
0xc0000902,
0xb7829182,
0x75004d08,
0x90e2c000,
0xaa21d288,
0xc0037500,
0xb7209284,
0xd01149ad,
0x75002a18,
0x3924d002,
0x9124c000,
0x2a14d011,
0xd0027500,
0xd0013922,
0xc0503926,
0xb4410c82,
0x9d87c000,
0x460cb740,
0x09c20dc2,
0x0d02c010,
0x0c81cff0,
0x9834ffd4,
0x4d08b782,
0x75009d0b,
0x0901cff0,
0x9282c000,
0xaa21d288,
0xc0007500,
0xb79f91e2,
0xe211606c,
0xc0108d00,
0x75002a00,
0x0a03cff0,
0x8001f310,
0x4422b342,
0x4068b79e,
0x08c2c801,
0x0880c010,
0x0ceac032,
0x606cb59f,
0xc000b421,
0xa9adda08,
0xfff49e93,
0xc8019add,
0xc00a0a02,
0xc0300a00,
0xb4810c8a,
0xc008c000,
0x0c8408c2,
0xc000b421,
0x0a02c008,
0xb4810c88,
0xc0c0c000,
0x09920d82,
0x0d02c008,
0x0902c008,
0x989bc014,
0x0a02c008,
0x0c8ec030,
0xc000b481,
0x590cb720,
0xb5408506,
0xfff44039,
0xb79f9b08,
0xb7bf6f6e,
0xc0106fee,
0x9c228c40,
0xa205f839,
0x0c82c450,
0xb4810a02,
0xb101c000,
0xc0084220,
0xc0300a40,
0xb4810c8e,
0xc002c000,
0xc05038c0,
0xb4210c82,
0xc0c0c000,
0x09920d82,
0x0d02c008,
0x0902c008,
0x9869c014,
0x0a02c008,
0x0c8ec030,
0xc000b481,
0xaa1df9f8,
0x9320fff6,
0xf011a60d,
0xc0010eb0,
0xc01e9182,
0xc0080f7e,
0xc0300b02,
0xc0400e8e,
0x9e747540,
0x0c96c050,
0x4426b354,
0xc20012d8,
0xb4815a14,
0xc030c000,
0xb4c20d0a,
0xb4c5c000,
0xc030c000,
0xb4c10c96,
0xc0c0c000,
0x09920d82,
0x0d02c008,
0x0902c008,
0x9835c014,
0xc000b4c5,
0xfffe7540,
0xfff493c4,
0xb79f9aa8,
0xb7bf7eee,
0xb7df7f6e,
0x8c607fee,
0xb4639c22,
0x9c22c000,
0xa062f812,
0xc2009c22,
0x5d890d80,
0x09829e59,
0x3d80c400,
0xc000b463,
0x4620b203,
0x9c220007,
0x9c8fc127,
0x080a9c22,
0x56f1b971,
0x9c81c017,
0x9c80c071,
0x9c80c017,
0x4000b960,
0xffff9c22,
0x9e5c9280,
0xd1a401c6,
0x08825889,
0x3c80c400,
0xc000b421,
0x4220b104,
0x9e532244,
0xffff7106,
0x9c229324,
0xc004a60d,
0xc8298420,
0xc4400ca2,
0xc0300cf0,
0xe133ac3d,
0xc0388d00,
0xc030a45d,
0xc038ac3d,
0xc010a45d,
0xc018ac3d,
0xc010a45d,
0xc018ac25,
0xb7a0a445,
0x9ea9568c,
0xb5408502,
0xb541641a,
0xb7404998,
0x0dc2460c,
0x0d42c00a,
0xffb409c2,
0xd2519b1b,
0xda080a58,
0x7502aa01,
0xc0009ead,
0xb5809084,
0xb780440c,
0x87025d8c,
0xa8a2f210,
0xb543850a,
0xf2107e18,
0xb540a8a5,
0xb5405004,
0xf20a4702,
0xf208a100,
0xf210a086,
0xf208a929,
0xf210a089,
0xf210a92e,
0xf208a8b2,
0xf250a10d,
0xf208a8b1,
0xf208a112,
0xf208a096,
0xc050a09a,
0x08c00cf2,
0xa085f248,
0xc000b421,
0xc0360a0a,
0xb4810c92,
0x0896c000,
0xb4211c8c,
0x8502c000,
0x8c00f031,
0x8d80e131,
0xb7c09ea3,
0x0d025c0c,
0x4078b960,
0x7ffcb55f,
0xa103f208,
0xd1229dba,
0x9e2d5d0d,
0xa8e5f029,
0x2caed012,
0xd1265c88,
0x9e4a5908,
0xaa4de038,
0x28bc0d04,
0x324250a8,
0xffffa241,
0xf01091c1,
0xc036aa61,
0xb4810c8e,
0xb73fc000,
0x1c847fec,
0xc000b421,
0x998fc014,
0xaa4dd208,
0xc0007500,
0xf2909262,
0xf011aa2d,
0xc0002ac8,
0xc80091a4,
0x75002a00,
0x90c4c000,
0xa9c6f208,
0x9ae8fff4,
0xa2cdd208,
0xaaadf290,
0x2a54d011,
0xc0007500,
0xc8099102,
0xc5320a42,
0xb5800a70,
0xb780528c,
0x7500458c,
0x9162c000,
0x5a31c280,
0xc03e2a04,
0xb4810cea,
0xc000c000,
0xb7809280,
0x7502440c,
0x915cc000,
0x2a80c100,
0x0a0e7540,
0x1a46d001,
0x9060c000,
0xc03e0a02,
0xb4810cea,
0xb79fc000,
0xb7bf7a6e,
0xb7df7aee,
0xc0067b6e,
0x9c228c00,
0x530cb780,
0x0892c0c8,
0x40f8b960,
0x0948d011,
0xaa45f029,
0x5889d0a4,
0xc000b481,
0xffff0890,
0x9c229321,
0xb720a605,
0xb780458c,
0x74407b8c,
0xb5800a04,
0xc0007b8c,
0xb7829364,
0x75004d08,
0x92c2c000,
0x440cb720,
0x508cb780,
0x3a407442,
0x508cb580,
0x919cc000,
0x5c0cb780,
0xa889d208,
0xc0007440,
0x850690a4,
0x7218b543,
0x0a42c801,
0x0a00c010,
0x0ceac032,
0xc000b481,
0x08c2c008,
0x1ce0c002,
0xc000b421,
0x0a42c008,
0x0d0ec030,
0xc000b482,
0x0c82c450,
0x1a40c008,
0xc000b481,
0x4220b101,
0x38c0c002,
0x0c82c050,
0xc000b421,
0x0d82c0c0,
0xc0080992,
0xc0080d02,
0xfff40902,
0xc4509aac,
0x0a020c86,
0xc000b481,
0x4220b105,
0x0a00c008,
0x0d0ec030,
0xc000b482,
0xc0080c84,
0xb4811a00,
0xb101c000,
0xc0804220,
0xc8015a35,
0x09400902,
0x28fcc00e,
0x5910d0a8,
0x29ced071,
0x0c8ac030,
0xb4419dc8,
0x0a42c000,
0xb4810c84,
0x7680c000,
0x9182c000,
0x5d8cb720,
0x44bdb740,
0x8a27f210,
0x8021f310,
0x44adb580,
0x0c86c450,
0xb4810a02,
0xb105c000,
0x0cec4220,
0xc000b481,
0x4220b105,
0x08ea12d6,
0x0c9ec034,
0xc000b421,
0x568cb780,
0xa891f248,
0x1950d053,
0x88a3f210,
0x0d060d82,
0x5a0cc280,
0x500cb580,
0xffb4018b,
0xc0809bea,
0xb4a10ca2,
0xb780c000,
0x0c88470c,
0xc000b481,
0x5814b7a0,
0x0d82c002,
0x9a27fff4,
0xffff700a,
0xb7809364,
0xf2107b8c,
0xf250a8ad,
0x6243a8a2,
0x71029e49,
0x90b8c000,
0xb5438506,
0xb7807018,
0x7500458c,
0xc0010a82,
0xb7809204,
0x7502440c,
0x933cc000,
0x4d08b782,
0xc0007500,
0xb7809282,
0x2a79450c,
0x450cb580,
0x9ba8ffb4,
0x7208b783,
0xc0007500,
0xffd490c2,
0xb5a3987f,
0xffd47208,
0xb7829844,
0x75004d08,
0x92a2c000,
0x996bc014,
0x5c0cb780,
0xa889d208,
0xc0007440,
0xc0809182,
0xc0000a82,
0x0d829100,
0x9810ffd4,
0xffd40d82,
0xc08098fb,
0xb4a10ca6,
0xc002c000,
0xfff40d92,
0x700a99d4,
0x9364ffff,
0x09820dea,
0xc1210d0a,
0xffb40902,
0xb780992b,
0xf248568c,
0xc0a1a992,
0x0d040d02,
0xffb409c2,
0xc0c09916,
0x09920d82,
0x09420d42,
0x99d7fff4,
0xc03e0a02,
0xb4810cea,
0xb79fc000,
0xb7bf7f6e,
0x8c407fee,
0xa61d9c22,
0x568cb720,
0x49adb780,
0x2a00c002,
0xc0037500,
0xc8099242,
0xc54a0942,
0xc8090960,
0xc5de0d42,
0xc8090d30,
0xc63009c2,
0xc8090990,
0xc5fe0c42,
0xc8090c00,
0xc5420cc2,
0xc8090cd0,
0xc6b40842,
0xc8090860,
0xc6fe0ec2,
0xc8090e80,
0xc7600b42,
0xc8090b40,
0xc5360f42,
0xc8090f20,
0xc53a85c2,
0xb7e085e0,
0xc809568c,
0xc5368742,
0xc8098740,
0xc76208c2,
0xd15108c0,
0x9eab0af0,
0x5e8cb780,
0xb5428506,
0x0f824d18,
0x7b94b5e0,
0x7010b5e3,
0xa109f208,
0xa112f208,
0xa195f208,
0xa01af208,
0xa08ef208,
0xa01df208,
0xa282f248,
0xa305f248,
0xa30af248,
0xa187f208,
0xa100f20a,
0xa08df248,
0x9c620603,
0xaa6df288,
0x5894b720,
0xa8a1d208,
0x75002a08,
0x4312b5e0,
0x41cbb520,
0x90e2c000,
0xb540856a,
0xc0004f9c,
0xb78090c0,
0xb58041cb,
0xb7c04f8c,
0xb720580c,
0xf2085694,
0xb780a8d9,
0x70484d4d,
0x9142c000,
0x5e8cb780,
0xa88df248,
0x0d90d152,
0x9c629e8c,
0x4d08b782,
0xc0037500,
0xb72092e2,
0x76404594,
0x9244c003,
0x430ab720,
0xc0007440,
0xda0890e2,
0x7048aa55,
0x9324c000,
0x5e8cb7a0,
0x5c14b7a0,
0xa9d6da08,
0x4312b520,
0xaa29f208,
0xd210098a,
0x1d84a0aa,
0x9c629ea4,
0xa8b1f208,
0x9e8c0d8a,
0xc0009c62,
0xb7809180,
0xf2085e8c,
0xb7a0a891,
0x0d865c14,
0x9e8c0289,
0xb7809c62,
0xb720430a,
0x0a04588c,
0x430ab580,
0xaa29d210,
0x598cb7c0,
0x4829b580,
0xa8a1f208,
0x9e8c9eb3,
0xd2109c62,
0x7500aa29,
0x92a4c000,
0xa9c1f208,
0xa83df208,
0x9e840d82,
0xf2089c62,
0xf248a041,
0x9eb3a825,
0x9e840982,
0xda089c62,
0xb581aa41,
0xb780788a,
0x7502440c,
0x90bcc000,
0xffb40d86,
0xd2109a9f,
0x7500aa29,
0x9122c000,
0x550cb720,
0x412db780,
0xc0003a08,
0xb72090e0,
0xb780550c,
0x2a75412d,
0x412db580,
0x4d08b722,
0x508cb780,
0x3a047440,
0x508cb580,
0x9204c000,
0x568cb7e0,
0x588cb740,
0x0a70d151,
0xa882d208,
0xa881d208,
0x4f94b520,
0xa0cdd808,
0x7e6eb79f,
0x7eeeb7bf,
0x7f6eb7df,
0x7feeb7ff,
0x8c00c002,
0xa60d9c22,
0x5e94b7a0,
0x5994b760,
0xa825f210,
0x5c14b7c0,
0x500cb7c0,
0x9c629e84,
0xaa49d210,
0x02817500,
0x9184c000,
0xaa21f250,
0x9c629ea4,
0xa8b5f210,
0x11ead020,
0x9c629e8c,
0xaa39f210,
0x9e739eb3,
0x9c629ea4,
0x568cb720,
0x49adb780,
0x2a00c400,
0xc0007500,
0x85029102,
0xa14bd210,
0xd2108506,
0xb780a143,
0xcffe508c,
0xb5802a3d,
0xb79f508c,
0xb7bf7eee,
0xb7df7f6e,
0x8c607fee,
0xb7209c22,
0x9e5c4a8c,
0x2a40c0ff,
0x28c0c0ff,
0x85027102,
0x9062c000,
0xb5408506,
0xb5604b1c,
0x9c224a94,
0x9e5da605,
0x2a50d051,
0xc0007500,
0xb78090e4,
0x75004b0c,
0x9142c000,
0x0d82c0c0,
0x09c2c012,
0x09420d02,
0x983dfff4,
0x4a8cb780,
0x0cb6c034,
0xc000b481,
0x0d32c034,
0xc000b4a2,
0x4a0cb5a0,
0x7f6eb79f,
0x7feeb7bf,
0x9c228c40,
0x8420a61d,
0x4d08b782,
0xc0007500,
0xb7809122,
0xd288588c,
0x7440a881,
0x9284c015,
0x460cb740,
0x5614b7a0,
0x098e0dc2,
0x0d42c002,
0xff94048b,
0xf2109b65,
0xb7c0aa35,
0xf210558c,
0xf210a8a5,
0xb7a0a8aa,
0xda10568c,
0xb580a922,
0xda10470c,
0xf208aa39,
0xda10a0d5,
0xf208a8bd,
0xd252a0de,
0xf25008d0,
0xf208a927,
0xf248a259,
0xd131a0c1,
0xda080a50,
0x9e53a881,
0x404bb740,
0xa8b2da90,
0xc08060b2,
0xc2005a7f,
0x00985a71,
0x58945893,
0x80a3e210,
0x7e7edffc,
0xc1005915,
0x018b5b90,
0xa0ddf248,
0x91e2c000,
0x5d40e100,
0x9164c000,
0xaa35da90,
0xb5208502,
0xb5404692,
0xb580479a,
0xf288458a,
0xd132aa21,
0xda100950,
0xf248a8a1,
0xf248a255,
0xd810a259,
0xf248aa41,
0xda48a93b,
0x6218a8ba,
0x8021f310,
0xa93dda48,
0xa0caf248,
0xa249f288,
0xaa29da48,
0xa151f248,
0xa923f208,
0xa8aeda48,
0xc2006218,
0xf3105a10,
0xf2088021,
0xf208a241,
0x9e4ca927,
0xa928f20a,
0x588c6098,
0x8023f210,
0x82a3e210,
0x5d8cb740,
0xa249f208,
0xa8aada48,
0xaa21da10,
0xa0cdf208,
0xa8c1d810,
0xa0c6f208,
0xa937f248,
0x62430a04,
0xa8a1da10,
0x8021f310,
0xa8a2da10,
0xa245f288,
0xa953f008,
0xa954f00a,
0x5c9c58a0,
0x80a3e210,
0x82a3e020,
0xaa2dda48,
0xa0adf208,
0xa0b2f208,
0xa0c5f248,
0xa0cef248,
0xa251f208,
0xa941d810,
0x1880c004,
0x4e8cb520,
0x0a54d131,
0xa881da08,
0x1c80c002,
0x4f14b520,
0x59515940,
0xa155f288,
0x58d158c0,
0xa0d9f288,
0x0cf2c42e,
0xb4810a02,
0xb101c000,
0x28844220,
0xd1327440,
0xc0000b50,
0xda109102,
0xc09caa41,
0xc00e753e,
0xc0c092b2,
0xc05008c6,
0xb4210ce2,
0xf210c000,
0xd131a939,
0xda080a30,
0xd052a881,
0x764028a0,
0xb5205891,
0xc0004e0c,
0x0a029222,
0x0caec060,
0xc000b481,
0xa8a1da10,
0xc0007440,
0x85029302,
0x4e1cb540,
0x9260c000,
0x2900c200,
0xc0007480,
0x0a0a9122,
0x0caec060,
0xc000b481,
0x90e0c000,
0xc0600a06,
0xb4810cae,
0xf210c000,
0x2a04aa39,
0x850a7500,
0x489cb540,
0x90a2c000,
0xb5408504,
0xb782489c,
0x75004d08,
0x5e94b7e0,
0x91a2c000,
0x458cb780,
0xc0007500,
0xb7609102,
0xf2105994,
0x9ea4aa61,
0xf2109c62,
0x2a20aa39,
0xc0007500,
0xda1090e2,
0x7500aa21,
0x9244c000,
0x588cb780,
0x528cb720,
0xa98eda08,
0x9c629e8c,
0x4d08b782,
0xc0007500,
0x850690a2,
0x7518b543,
0xa8b9f210,
0x2a14d011,
0xc0017500,
0xd01190e2,
0x75002a12,
0xcffe8516,
0xc0380a7e,
0xe0010cfa,
0xb5408d28,
0xb4814c9c,
0xda10c000,
0xb720a8c1,
0xc2846194,
0xc6840a6a,
0xc058856a,
0xb5207462,
0xc0385194,
0xb3240c82,
0xb4814c28,
0x0882c000,
0x0c80c002,
0xc000b421,
0x9b98ffd4,
0x488cb780,
0x0c82c03e,
0xc000b481,
0x4c8cb720,
0x0c82c050,
0xc000b421,
0xa921da10,
0xa8d5f288,
0xa926da10,
0x9e536123,
0xaa21da10,
0xb7206097,
0x87025d14,
0x7982b541,
0xb540857f,
0x851a449a,
0x439ab540,
0x1a040d86,
0x4d0cb580,
0x405bb540,
0xb5408526,
0xb540415b,
0x5891450a,
0xb52018a0,
0xb55f40cb,
0xc0147fe4,
0xb75f9b0b,
0xda107fe4,
0xf288a8a6,
0x8506aa55,
0x7418b543,
0xb7209e49,
0xb5435614,
0xb5437480,
0xb5437a00,
0xb5437a80,
0xb5437580,
0x62437600,
0x434db720,
0x0a828502,
0xc10158c8,
0x9e892880,
0xa9c2da10,
0x4d9cb540,
0x511cb540,
0x5a11c200,
0xc0ff5dc0,
0xca012dc0,
0xb5803db0,
0x3596440a,
0x99ddfff4,
0x0d82c0c0,
0x09c2c012,
0x09420d02,
0x9a35ffd4,
0x8546714e,
0x9148c001,
0xfff49dcf,
0xc0c099df,
0xc0120d82,
0x0d0209c2,
0xffd40906,
0xd0919a26,
0x71481a70,
0xd00b0a02,
0xda100a42,
0xc200a9c2,
0x9ea15a28,
0xc0ff5dc0,
0xc8012dc0,
0x35963db0,
0x99b3fff4,
0x0a50d051,
0x5a40c200,
0x5ac1c200,
0x8506714e,
0x9346fffe,
0xaa71f250,
0xcfce7500,
0xb540857f,
0xc0007e1c,
0xf2109102,
0xb760a9be,
0x9ea4440a,
0x0d829c62,
0x9899c014,
0x7488b783,
0x85027500,
0x7418b543,
0x9144c000,
0xc0140d86,
0xb783988e,
0x75007488,
0x9342ffff,
0x0d82c0c0,
0x09c2c012,
0x09060d02,
0x99dfffd4,
0x0a02c801,
0x510cb580,
0x0d82c0c0,
0x09c2c012,
0x09420d02,
0x99d3ffd4,
0x5114b760,
0x996ffff4,
0xfff40d86,
0xc0c0997d,
0xc0120d82,
0x0d0209c2,
0xffd40906,
0x850299c4,
0x0892c006,
0x0c9ac430,
0xb5400902,
0xc006511c,
0xb4418510,
0xb104c000,
0x2a404220,
0x9d4f7500,
0x4422b313,
0xe0000087,
0xffff1884,
0xb7409284,
0xc0064594,
0xc4300892,
0x09020c9a,
0x8512c006,
0xc000b441,
0x4220b104,
0x2a00c002,
0x9d537500,
0x4422b314,
0xe0000089,
0xffff1884,
0x0a029264,
0x0ceac03e,
0x40e8b960,
0xc000b481,
0x93c1ffff,
0xc0007680,
0x0a029122,
0x0ceac03e,
0xc000b481,
0x9180c000,
0x440cb780,
0x088a7504,
0x0ceac03e,
0x1894d00c,
0xc000b421,
0x0d82c0c0,
0x0d0209e2,
0xffd40942,
0x0a029970,
0x0cb6c034,
0xc000b481,
0x7deeb79f,
0x7e6eb7bf,
0x7eeeb7df,
0x7f6eb7ff,
0x8c20c002,
0xa60d9c22,
0x7efec01c,
0xc0000a82,
0xc0c09182,
0xc0120d82,
0x0d0209c2,
0xffd40906,
0xc0009952,
0xc4349240,
0x0a020cb2,
0xc000b481,
0x4220b101,
0x74402884,
0x90e2c000,
0x7408b783,
0xc0067500,
0xb7809322,
0x75024d8c,
0x90c4c000,
0xc0140d82,
0x3ac099d5,
0x5614b740,
0x558cb740,
0xa8c5d810,
0xaa55f088,
0x4492b720,
0x9e496243,
0x5a11c200,
0xba090a04,
0xba244002,
0x70484002,
0x06850305,
0x9138c000,
0x488cb780,
0xb5802a51,
0xc003488c,
0xf21091c0,
0x2a04aa39,
0xc0027500,
0xb78093a2,
0x7440488c,
0x3942d011,
0x488cb540,
0x929cc002,
0x4692b760,
0xba249e5c,
0xc002400a,
0xc00291a2,
0xb760911c,
0xb740640a,
0x9e995e04,
0xba099e2d,
0xd0a24003,
0x9e485e7f,
0x5a6dc200,
0xc2000208,
0xd2265a17,
0x0c065908,
0x5a14c200,
0x9e401208,
0xa94ee038,
0x4002ba24,
0x9e545090,
0xc0017902,
0xb7819102,
0x75004988,
0x9064c001,
0x460ab780,
0xba249e48,
0x70084002,
0x9378c000,
0xc0007640,
0xb78190e4,
0x75024908,
0x92c2c000,
0x1e32d011,
0x468ab580,
0x48fd9e54,
0x460ab560,
0x4990b501,
0xb5402959,
0x20c2488c,
0xc000a0c1,
0x850290a0,
0x4998b541,
0x448ab780,
0x400aba24,
0x90fcc000,
0x640ab780,
0xb5800a04,
0xb720640a,
0xc03e488c,
0xb4210c82,
0xb780c000,
0x0a04448a,
0x448ab580,
0x9a42c014,
0x983ec014,
0x4d8cb780,
0xa955f288,
0x71040a04,
0x4d8cb580,
0x90a4c000,
0xb5408502,
0xda104d9c,
0xb720a8a5,
0x58914492,
0xba0960a3,
0x9e484003,
0x08843a84,
0x020b7002,
0x2a3dcffe,
0x4426b354,
0xd0510289,
0x744028d0,
0x9142c000,
0x0d82c0c0,
0x09c2c012,
0x09420d02,
0x9871ffd4,
0x510cb780,
0xc0007500,
0x9eab90a2,
0x981afff4,
0x7eeeb79f,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c60,
0xa205f839,
0x7a08b723,
0x5184b740,
0x438ab780,
0x5908d0a6,
0xb7409e2d,
0xe030568c,
0xb760a94e,
0xb743621c,
0xb7437a98,
0x1a047a00,
0x438ab580,
0xa8cdc030,
0x5a40e200,
0x0a20d251,
0xa882da08,
0x82a3e210,
0x5114b540,
0x5c905c95,
0x7a08b523,
0x92c4c001,
0x7a88b783,
0xd3f10a04,
0x744428ce,
0x7a88b583,
0x9034c001,
0x7e14b760,
0xb5438506,
0x24a67498,
0xb5437640,
0xb5207618,
0xc0005114,
0xd1319202,
0xb78008a0,
0xc801402b,
0x9e483c80,
0x5a40c200,
0x2a40c0ff,
0xb5803208,
0x0806510c,
0xaa1df9f8,
0xb7239c22,
0xb7407a88,
0xd0a65d04,
0x9e2d5904,
0xaa4dc830,
0x438ab580,
0x09a0d132,
0x448ab720,
0xaa61d810,
0x4002ba19,
0x5a11c200,
0x70c81a04,
0x9104c000,
0x7e0cb780,
0x3a00c040,
0x7e0cb580,
0x4e0cb720,
0x0a18d011,
0xc00070c8,
0xb7809104,
0xc0107e0c,
0xb5803a00,
0xd0117e0c,
0x70c80a1c,
0x9104c000,
0x7e0cb780,
0x3a00c020,
0x7e0cb580,
0x558cb780,
0xa916f288,
0xa919f288,
0xb7209e50,
0xd011450a,
0x62411a24,
0x4002ba09,
0x704800b2,
0x9106c000,
0x7e0cb780,
0x2a7acfff,
0x7e0cb580,
0x1a22d011,
0x62459e52,
0xc0007048,
0xb7809106,
0xc7fe7e0c,
0xb5802a7e,
0xb7407e0c,
0xd0a2441a,
0xf3105e11,
0x70c88821,
0x9104c000,
0x7e0cb780,
0x2a4ecfff,
0x7e0cb580,
0x560cb740,
0x7e0cb720,
0xaa45d808,
0x9e8a9e50,
0x5a11c200,
0x62091a04,
0x5114b720,
0xba240a04,
0x70c84002,
0xb5202494,
0xc0005114,
0xc8019118,
0xb5203c80,
0xc0005114,
0xd81091c0,
0xc801aa61,
0x9e483c80,
0x5a40c200,
0x2a40c0ff,
0xb5803208,
0xf008510c,
0xc040aa59,
0x75002a00,
0x9102c000,
0x510cb780,
0x3a00c101,
0x510cb580,
0x5114b760,
0x9b09ffd4,
0xf9f80802,
0x9c22aa1d,
0x5694b700,
0x0e04d251,
0x558cb760,
0xa881da08,
0x2dfcc00e,
0x0cbac034,
0xa961f008,
0xc0805895,
0x9e825810,
0xc000b441,
0x454ab780,
0xa963f008,
0x5a10c200,
0x8021f310,
0xa8e9f008,
0xf0080c84,
0xb421a261,
0xb780c000,
0xf00846ca,
0xf310a96b,
0xf0088021,
0x0c84a8ed,
0xa269f008,
0xc000b421,
0x46cab780,
0xa96ff008,
0x8021f310,
0xa8f5f008,
0xf0080c8c,
0xb421a26d,
0xf008c000,
0x0c84a97d,
0xc000b441,
0x4d0cb780,
0xd2240a08,
0x72445890,
0x931cc000,
0x0e04d131,
0xa903da08,
0xe2109e4c,
0x710288a1,
0x91d6c000,
0xaa75f008,
0xa8fdf008,
0x0a00c010,
0xa275f008,
0x0880c008,
0xa0fdf008,
0x4e8cb780,
0x0cdac034,
0xc000b481,
0x4f0cb720,
0xb4210c84,
0xb780c000,
0x0ce44e8c,
0xb4810a40,
0xb720c000,
0x0c844f0c,
0xb42108c0,
0xb780c000,
0xb7204e8c,
0x1ce44f0c,
0x0a00c010,
0x4e8cb580,
0xaa65f048,
0x0880c008,
0x4f0cb520,
0xc000b481,
0xa8edf048,
0xb4210c84,
0xf048c000,
0xf048aa65,
0x0c84a8ed,
0x0a00c010,
0xa265f048,
0xaa75f048,
0x0880c008,
0xa0edf048,
0xc000b481,
0xa965f088,
0xb4410c88,
0xd131c000,
0xb7800c80,
0xf088402b,
0xcffea967,
0xf3102a40,
0xf0888021,
0x0c88a969,
0xa265f088,
0xc000b441,
0x0c80d131,
0x402bb780,
0xa96bf088,
0x2a40cffe,
0x8021f310,
0xa97df048,
0xf0881c8c,
0xb441a269,
0xd131c000,
0xb7800c80,
0xf048402b,
0x76c0a97f,
0x5a11c200,
0x5a14c200,
0x8021f310,
0xa27df048,
0x9182c001,
0x454ab720,
0xb4211ca8,
0xb780c000,
0x0c8446ca,
0x5a0dc200,
0x58c0c200,
0xb4813242,
0xd131c000,
0xd8080d04,
0x0c8caa41,
0x588cc200,
0x28fccffe,
0x5a50c200,
0xb4213098,
0xd251c000,
0xd8080d04,
0x0ca0aa41,
0x5a11c200,
0x2a3c1a10,
0x3a00c004,
0xc000b481,
0x4d0cb780,
0xb5800a04,
0x9c224d0c,
0xc43ea685,
0x0a020c92,
0xc000b481,
0x4240b102,
0x5b8cb780,
0xa885da08,
0xa909da08,
0xa10ada08,
0xa081da08,
0xa105da08,
0x0a020cd0,
0xc000b481,
0x4240b102,
0x5b0cb720,
0x510cb780,
0x5b94b700,
0x40b3b720,
0x412bb740,
0x4133b540,
0x75002a40,
0xb5200283,
0xb5404033,
0xc00040ab,
0xb78390e2,
0x750a7a08,
0x90f2c000,
0x7a08b783,
0xc006751a,
0xb7819104,
0x0a04798a,
0x798ab581,
0x0ca6c450,
0xb4810a02,
0xb102c000,
0x9e514240,
0x9e509e54,
0x2a7cc00f,
0x59c1d228,
0x2880c031,
0x59e1c080,
0x287ccffe,
0x0a020c88,
0xc000b481,
0x4240b102,
0x5f41d122,
0xcffe0585,
0x0cbc2dfc,
0xc000b481,
0x4240b102,
0x2caed0f2,
0x560cb720,
0x4a2bb780,
0xdffc9e8a,
0xb5217d3e,
0xc0027892,
0x74c291a2,
0x9364c000,
0x470ab780,
0x5e04b740,
0x4002ba24,
0x58ffc200,
0x00c258ed,
0xd0a65897,
0x9e2d5908,
0x12425894,
0xe0385270,
0x4a7da8ce,
0x249a9ea5,
0xc001a0c2,
0xb7809180,
0xb720458a,
0xba24404a,
0x70484002,
0x907cc001,
0x478ab780,
0x4712b720,
0x5e04b740,
0xb5800a04,
0xba09478a,
0xd0a24003,
0x9e495e7f,
0xc2009e2d,
0x02185a6d,
0x5a17c200,
0x5908d226,
0x5a14c200,
0xe0389ea5,
0x149aa94d,
0x08869e4c,
0x312250b0,
0xb780a141,
0x0a04470a,
0x470ab580,
0xf01074c2,
0x0882aa59,
0x0892d001,
0x5994b720,
0x79022a04,
0xc0010360,
0xc00005b6,
0xb78090e2,
0x0a04414b,
0x414bb580,
0x415db740,
0x41c5b740,
0x8025f310,
0x82a7e010,
0x414db580,
0x41cdb520,
0x7088b783,
0x08827500,
0x0892d002,
0x0a0274c2,
0x0a42d002,
0xc0007848,
0xc07c90c2,
0xb5408542,
0x74c2405a,
0x425db740,
0x90c4c000,
0xaa21da08,
0x9080c000,
0x404ab780,
0x80a1e310,
0x41cbb780,
0x424db520,
0xb5800a04,
0xb7bf41cb,
0xb7df7f6e,
0x8c407fee,
0xc0369c22,
0x9e5c0cfe,
0xc000b481,
0xc0029c22,
0xd01172c0,
0x9c221c0a,
0x9c220802,
0x588cb780,
0xda088502,
0xf010a88d,
0xf010a16b,
0xf010a16f,
0xd810a173,
0xd810a16f,
0xf010a16b,
0x9c22a0e1,
0x5a14b720,
0xa8e9d810,
0x414bb520,
0xaa71f010,
0x5a8cb740,
0x5a0fc200,
0xa245f048,
0xa8edf010,
0x41cdb520,
0xaa69f010,
0x414db580,
0xa96ff010,
0xa869f010,
0x8021e210,
0xa041f008,
0xc0309c22,
0xb740ac7d,
0xc038581c,
0xc030a45d,
0xc038ac7d,
0xc030a45d,
0xc038ac7d,
0xb720a45d,
0xb7805794,
0x8706588c,
0x5c0cb720,
0x8576c002,
0xa108d28a,
0x475bb540,
0xb5408502,
0xb5404039,
0x9c2240a1,
0x8420a61d,
0x5814b7a0,
0xb7a09e5a,
0xb57f578c,
0xd0117f74,
0x00810822,
0xaa2df210,
0x01030c82,
0xd2100503,
0x0189a8a9,
0x59ffd224,
0x5894b7c0,
0x2a1ed3f1,
0x7524c004,
0x5c8cb7c0,
0x0c020b82,
0x1c02d003,
0xa8cef250,
0xa3a5f208,
0xa04df208,
0x9e409e44,
0xa0a2f248,
0x20904a7d,
0x2a44c002,
0xd2103098,
0xc054a0a9,
0x097f98ac,
0x01819e92,
0xc0540581,
0xf20898a6,
0x0089aa35,
0x58ffd224,
0x9eaf7202,
0x90fac000,
0x90e4c000,
0xc0007002,
0xf2109094,
0xf208a075,
0xf250a947,
0xf210aa25,
0xf310a949,
0xd1248021,
0x00895908,
0x58ffd224,
0xfa08769c,
0xc000a0c9,
0x850a90b2,
0x91e0c000,
0x5a04c100,
0xc000751c,
0x850e90b2,
0x90e0c000,
0x7698c004,
0xe009850a,
0xf2108d22,
0xf210aa39,
0x1209a8f5,
0x6245c301,
0x70485890,
0x9236c000,
0xaa65d2d0,
0xc0007500,
0xda509184,
0x8506aa79,
0xa167d2d0,
0xda500a04,
0xc000a279,
0xf21093e0,
0xf210a8b9,
0xc301aa75,
0xc2006095,
0x71025a0c,
0x923cc000,
0xaa65d2d0,
0xc0007500,
0xda509184,
0x8506aa79,
0xa167d2d0,
0xda501a04,
0xc000a279,
0x850290a0,
0xa167d2d0,
0xaa79da50,
0x4002ba24,
0x752ac004,
0x90dac000,
0x855ac002,
0x9100c000,
0x7502c008,
0x90dcc000,
0x8506c004,
0xa17bda50,
0xa8f9da50,
0xaa4df208,
0xa8aef210,
0x4002ba09,
0xb7406243,
0x9e495a94,
0x62438502,
0xa959d050,
0x0a00c002,
0x5919d228,
0xf2087482,
0xc000a147,
0xf21090c4,
0xc000aa75,
0xf21092a0,
0xf210a8f6,
0xd0a2aa39,
0x12095c90,
0xc0007048,
0x764090b8,
0x91dcc000,
0x5d04d0a6,
0x802bf210,
0x5a13c200,
0x8a21f310,
0xa245f208,
0x9080c000,
0xa144f20a,
0xaa49f210,
0x7f6cb75f,
0x75020a04,
0xa149f208,
0xa249f210,
0x9144c000,
0xaa21d210,
0xa225dad0,
0xa251da50,
0x9040c009,
0x5a94b740,
0xaa51d050,
0xc0007500,
0xd0509184,
0x7500aa59,
0x9142c000,
0xaa41da90,
0xc0007504,
0x850690b4,
0x9060c000,
0xd2908502,
0xda10a153,
0xf210a94b,
0xf252aa4d,
0xd0b1a974,
0xf3100ed0,
0xd20889a1,
0xd3a4a922,
0xe0205987,
0x5d0483a7,
0x55eb018f,
0x9b48c034,
0xa9caf210,
0xaa65f250,
0x1cb4d011,
0x60c38502,
0xa8a2d208,
0xa177f250,
0x9e5b1d84,
0x0102d030,
0xe2205d85,
0x050381af,
0xa1e6f250,
0xc03455e7,
0xb7209b2f,
0xb7805a8c,
0x75004629,
0xa065f250,
0x90e2c001,
0xaa55da50,
0xda507500,
0xc000a957,
0xda909102,
0xe200aa41,
0xc0005a40,
0xb7809144,
0xda08598c,
0xdad0a881,
0xc001a0a1,
0xc2009120,
0xf3105a45,
0xda908021,
0xdad0a9c1,
0xdad0a221,
0x0d02a9a2,
0x9b04c034,
0xc0001804,
0xb74092e0,
0xda105a8c,
0xd848aa49,
0xc200a947,
0xc2005a40,
0xf3105a45,
0xda108021,
0xdad0a9c9,
0xdad0a221,
0x0d02a9a2,
0x9aecc034,
0xa021dad0,
0x7f6cb71f,
0x0a02d031,
0x5993d224,
0xf21076c2,
0x0d82aa49,
0x0db2d00d,
0xc0017504,
0xdad09094,
0xda50a8a2,
0xd011a8d1,
0x70480e14,
0x913ac000,
0xa961da10,
0x1a14d011,
0xc0007088,
0xd01190d6,
0xc0001e12,
0xd01191c0,
0x70481e14,
0x90f8c000,
0x0a14d011,
0xc0007088,
0xd01190dc,
0xdad00e12,
0xdad0a221,
0xf210a923,
0xdad0882f,
0xdad0a221,
0x7468a8a1,
0x9298c000,
0xa8e2da10,
0x1e14d011,
0xd00e7048,
0xc0000a12,
0xd011913c,
0x70480e14,
0x90dcc000,
0x1a12d011,
0xa221dad0,
0xaa49f210,
0xc0007504,
0xd21093b4,
0x752caa2d,
0x9312c000,
0xa8e2da10,
0xaa5dda50,
0x1c9cd011,
0x4002ba24,
0xc0007102,
0xdad091b6,
0xd011a8a1,
0x70481e16,
0x90dcc000,
0x1a14d011,
0xa221dad0,
0xa929d210,
0xaa21dad0,
0xd2107104,
0x0a02a8a6,
0x1a42d00a,
0xa8a1dad0,
0x9ea29e48,
0x4d7d2098,
0x21289e54,
0xc0803094,
0xc2005a40,
0x70085a41,
0xd0040902,
0x9e921922,
0x42440a7f,
0x20982494,
0x34949e8a,
0xa0a2dad0,
0xa0a6dad0,
0xa0d2da50,
0xb7808502,
0x87065a8c,
0xa148d292,
0xa14ff210,
0xa113d248,
0xa11bd248,
0xa15bd290,
0xa117d248,
0xa15fd290,
0xa107da48,
0xaa25dad0,
0xa14bda10,
0xa157da50,
0xa143da90,
0xa25dda50,
0x7deeb79f,
0x7e6eb7bf,
0x7eeeb7df,
0x7f6eb7ff,
0x8c20c002,
0xa60d9c22,
0x5a8cb7c0,
0x588cb780,
0x5a14b7c0,
0x76c20802,
0xa182f208,
0xc0030289,
0xb7a09044,
0xf2485794,
0xda10a045,
0xf210a049,
0xf210a9b6,
0x0d02a9a5,
0xc0345d84,
0xda089a0f,
0x0a22a8aa,
0x7008c010,
0xc01208c3,
0x76407002,
0x92e2c000,
0x580cb780,
0xa88df208,
0xa8a6f210,
0x5914d0a6,
0x88a3e210,
0x5d04d0a6,
0xc2015897,
0xe210812a,
0x088880a3,
0xf248588b,
0xf210a0b1,
0xd226aa25,
0xf3105904,
0xf2488021,
0xd224a8b1,
0x9e4c5889,
0xb3117102,
0x9e894828,
0xa0b2f248,
0xaa51d248,
0xc0007500,
0xd24891e2,
0x7500aa59,
0x9144c000,
0x5d0cd0a6,
0x802bf210,
0x5a0fc200,
0xa231f248,
0xa8b1f248,
0x5c8cb740,
0xf0086211,
0xc200a8da,
0x10985a17,
0xc4109e8a,
0xf2487244,
0x8502a0b2,
0xa14bf210,
0xa14ff210,
0xa143f208,
0x7eeeb79f,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c60,
0xb720a61d,
0xb7e05c94,
0xb7405a8c,
0xf20840dd,
0x9e9daa61,
0x8821f310,
0x5884b760,
0x40cdb580,
0xaa29d210,
0xa265d080,
0xa8a9d210,
0x74429e4d,
0xb4279e5c,
0xb7c04622,
0xb7c05814,
0xf20a578c,
0xf210a960,
0xf208aa4d,
0xf040a957,
0xf310a9f7,
0xe3108a21,
0xf31080a1,
0xde018031,
0xf0407440,
0xf208a275,
0xc000a0d5,
0xcf0190d6,
0xf2080a02,
0xf210a255,
0xf208a94f,
0xf310aa61,
0xfa088821,
0x0089a829,
0x58ffd224,
0x0002e000,
0xd0030402,
0xd0220c02,
0xc0005e0c,
0xd02058f5,
0xc0003118,
0xe000590c,
0x15201120,
0x1d22d003,
0x5cf4d122,
0x5a0dc100,
0xf0403198,
0x0087aa75,
0x58ffd1a4,
0xfa087500,
0xfa08a029,
0xc000a0ad,
0x850290b6,
0xa177f040,
0xaa61f000,
0xc0007504,
0xd0b19344,
0xd2080e60,
0xf208a882,
0xf208a9a9,
0x9e4ca8a5,
0x5985d1a4,
0x5133d026,
0x81afe220,
0xf2080503,
0xc034a1c6,
0xf208992b,
0xc001a045,
0xf2089320,
0xd800aa29,
0x8502a8e9,
0xa16fd080,
0xf2081a04,
0x0884a229,
0xa0e9d800,
0xa8a2d210,
0xc0017640,
0xf21090e4,
0xf040aa5d,
0x6a36a8f5,
0x5a13c200,
0xc0007048,
0x8506929c,
0xa12bd210,
0xaa29f208,
0xc0007500,
0xd21091c2,
0xda48aa49,
0xf310a967,
0xda488021,
0xc000a265,
0xd2109080,
0xf208a0aa,
0x7500aa29,
0x9084c000,
0xa229d210,
0x7e6eb79f,
0x7eeeb7bf,
0x7f6eb7df,
0x7feeb7ff,
0x8c00c002,
0xb7809c22,
0xb7205a8c,
0xf208588c,
0xb720a903,
0x9e8a4035,
0x812fe210,
0x01897642,
0xa101f208,
0x9144c008,
0xaa49d810,
0xc0007500,
0xd09090e2,
0x76c0a9ce,
0x91c2c000,
0x5a0cb780,
0x578cb720,
0xa88ada08,
0x00039ea0,
0x46b3b520,
0x9220c001,
0x5a14b720,
0x580cb720,
0x414bb780,
0x412bb740,
0xd0116a14,
0x710268a6,
0x578cb700,
0xc0000403,
0xb78091bc,
0xb72046aa,
0xba24414a,
0x6a164002,
0x70485888,
0x917ac000,
0x414ab720,
0x6a26d3f1,
0x5a23c200,
0xc0007048,
0x8506915c,
0xa177d048,
0xd090850e,
0xc000a14b,
0xd0489080,
0xb780a1f6,
0xf2085c8c,
0x747ca88d,
0x93b2c004,
0xaa49f010,
0xc0007502,
0xd8109364,
0x7500aa49,
0x90e2c000,
0xaa4dd090,
0xc0007500,
0xf0489222,
0x8502a8e5,
0xa157d090,
0x412cb520,
0x414ab780,
0x40aab580,
0xa15bd090,
0x93e0c003,
0xa8dad090,
0xc0007640,
0xb7809342,
0xb72040aa,
0xba24414a,
0x688c4002,
0xc2000242,
0xb5805a0b,
0xf04840aa,
0x8502a8e5,
0x412cb520,
0xa15bd090,
0xd0908506,
0xc003a157,
0xb7409040,
0xd090580c,
0xb720a0d6,
0xd808414a,
0x68a8aa49,
0x70486a24,
0x925cc001,
0x40aab780,
0x414ab720,
0x4002ba24,
0x58846a0e,
0xc0017048,
0xb78090fc,
0xf048412c,
0xd226a8e5,
0xf3105904,
0x70488021,
0x939cc000,
0xd0908506,
0xd090a15b,
0xd808a15f,
0xd048aa55,
0xd810a173,
0x6a14a8c9,
0x5a0fc200,
0xd8507048,
0xd890a0d6,
0xc000a0c2,
0x8502907a,
0xa17bd048,
0x90a0c001,
0xaa75d048,
0x85027500,
0xa15bd090,
0x93a4c000,
0x40aab780,
0x414ab720,
0x4002ba24,
0x6947d013,
0x80a3e210,
0x4134b720,
0xb520588b,
0xf04840aa,
0xd0a6aa65,
0xc2015d04,
0xf310812a,
0xc2008021,
0xb5805a0b,
0xb780412c,
0xb580414a,
0xd09046aa,
0x7440a8dd,
0x9202c000,
0xaa71d048,
0x85067500,
0x9102c000,
0xaa79d048,
0xc0007500,
0x850e9064,
0xa14bd090,
0xaa49d810,
0xb3407500,
0xb78048a4,
0xb580414c,
0x9c2245ac,
0xb3407644,
0xc00348a4,
0xc0007486,
0xb720931a,
0xb7405814,
0xb7205f04,
0x9e2d4ccb,
0x5904d0a6,
0xaa4dc830,
0x578cb720,
0x05836229,
0xc2000003,
0xb5805a37,
0xc00141ad,
0xb7009100,
0xc100578c,
0x75005a4b,
0x5814b760,
0xc0000c82,
0xc200911c,
0x75005a07,
0xffff0c84,
0xd8d0939a,
0xb740a8e5,
0xd0a65f04,
0x9e2d5904,
0xaa61f008,
0xa8cdc830,
0xc2009e4a,
0x6243520b,
0xe2108536,
0xc20088ab,
0xb5805207,
0xf01041ac,
0x7502aa49,
0x90e4c000,
0x41acb780,
0x422cb580,
0xd0909c22,
0x74c0a9d1,
0x90e4c005,
0x422cb740,
0x41b4b720,
0x590cd126,
0x5c88d0a2,
0x8825f210,
0xc0007048,
0xd0a69176,
0xe2105d0c,
0xc10088ab,
0x70485a08,
0x91bac004,
0x85869e4c,
0xd0907104,
0xd090a1cf,
0xc002a1df,
0x9e49905c,
0x5a04c100,
0xc0007048,
0xd0a290f6,
0x71045e04,
0x937ac000,
0x472ab720,
0x5c94b720,
0xb5200898,
0xb780472a,
0xf01041cd,
0xb740a8ed,
0x624340c5,
0xc2000a20,
0xf3105a11,
0x851a8221,
0xa14bd090,
0xc002850e,
0xb7209340,
0xb720472a,
0x08885c94,
0x472ab520,
0x41cdb780,
0xa8edf010,
0x40c5b740,
0x0a406243,
0x5a15c200,
0x8221f310,
0xd090850e,
0xb580a14b,
0xb56040cd,
0xfffc4c38,
0x9e499320,
0x5a04c100,
0xc0007048,
0xd0a290f6,
0x71045e04,
0x937ac000,
0x472ab720,
0x5c94b720,
0xb5201888,
0xb780472a,
0xf01041cd,
0xb740a8ed,
0x624340c5,
0xc2000a40,
0xf3105a15,
0x851a8a21,
0xa14bd090,
0xc000857b,
0xb7209340,
0xb720472a,
0x18845c94,
0x472ab520,
0x41cdb780,
0xa8edf010,
0x40c5b740,
0xc0026243,
0xc2000a00,
0xf3105a19,
0x850e8a21,
0xa14bd090,
0xb580857f,
0xb54040cd,
0xfffa4c38,
0xd09092e0,
0xfffaa1cd,
0x85029260,
0xa14fd090,
0x91c0fffa,
0xb780a60d,
0xf208588c,
0x9ea5a881,
0x00077444,
0xc0000301,
0xb7809104,
0xdac8580c,
0xc008a805,
0x74429160,
0x9104c008,
0xaa29da10,
0xc0007500,
0xd2909324,
0x7500aa2d,
0x9284c000,
0xaa25d290,
0x580cb720,
0x5a94b720,
0xb7007500,
0xb7804cab,
0xd00244cb,
0x02400a46,
0x44cbb580,
0x9180c007,
0xaa2dd290,
0xc0017500,
0xb7209342,
0xb7805814,
0xd290578c,
0xb760a926,
0xb7605a94,
0xd2c840c9,
0xb740a881,
0x76804149,
0xba090407,
0x00024000,
0x0a02d011,
0x4422b304,
0xc0100009,
0xcc127004,
0x768070c0,
0xaa65d850,
0xd0020007,
0x02400a46,
0xa265d850,
0x4648b780,
0xc0007500,
0xda5091a2,
0xda90a937,
0xe210aa21,
0x0a0480a7,
0xa221da90,
0xa0b5da50,
0xc0050007,
0xd29091e0,
0x7500aa39,
0x9162c001,
0x580cb780,
0xa881d208,
0xa909d208,
0xaa85d208,
0xaa25d290,
0x0812d011,
0x7004c010,
0x5a8cb720,
0x7140d412,
0x000b7500,
0x44abb780,
0x0a46d002,
0xda500240,
0xb580a937,
0xda9044ab,
0xf310a8a1,
0x000b8023,
0xda900884,
0xda50a0a1,
0xc004a235,
0xb7809020,
0xf250578c,
0xf248a8b1,
0x7440a991,
0xf2489ea6,
0xc000a189,
0xb7209316,
0xb7805a8c,
0x75004729,
0xd0029e88,
0xc0000802,
0xd29090a4,
0x0008aa29,
0x580cb780,
0xa889d208,
0xc0109ea2,
0xc0017040,
0xb7a091a0,
0xd0b1580c,
0xd2080a50,
0xf250a882,
0x1196a929,
0xa8adf208,
0x9e4c5c85,
0xcc12588b,
0x515070c2,
0xd12651f3,
0xd1a45914,
0xe2205987,
0x0d0281af,
0xa129f250,
0x99f6c014,
0xc0149e83,
0xd2909a1d,
0x9eaaa8a9,
0x5a94b700,
0xc0100262,
0x10e27008,
0x7040c012,
0xa8a6d290,
0xa8c9d010,
0xd0107640,
0xd011a945,
0xb3040a02,
0x00094422,
0x7040c010,
0x7080c812,
0xb7807640,
0x000544ca,
0x0a46d002,
0xb78000c0,
0x75004648,
0x44cab520,
0x91a2c000,
0xa937da50,
0xaa21da90,
0x80a5e210,
0xda900a04,
0xda50a221,
0xd810a0b5,
0xda10aa55,
0x1a08a8a9,
0xb4167048,
0x00054443,
0x7eeeb79f,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c60,
0xb720a60d,
0xb780588c,
0x7502402d,
0xc00b0283,
0xb78093a4,
0xf2085a0c,
0xc003a90e,
0x01897686,
0x93bac000,
0x598cb780,
0x5f04b740,
0xa882f208,
0x580cb740,
0xd0a69e2d,
0xd0b15d04,
0xc8300a20,
0xd208a8cd,
0x9e54a882,
0x9e9660c3,
0x5817d0a4,
0x578cb7c0,
0xc0015407,
0xd1229180,
0xb7c05ccb,
0x74405814,
0x578cb7c0,
0xc0000d02,
0x588790fc,
0x0d047440,
0x93baffff,
0x598cb780,
0x5f04b740,
0xa882f208,
0xd0a69e2d,
0xd0b15d04,
0xc8300e60,
0xf008a8ce,
0xd208a8ed,
0x9e54a901,
0x50b39d1e,
0x6097c301,
0xd0a49e91,
0x54075817,
0xda085408,
0x7500aa29,
0x90e2c000,
0xaa2dd288,
0xc0007500,
0xf24892c2,
0xf210a957,
0xf2488029,
0xf248a255,
0xf248a026,
0xf248a02a,
0xf008a042,
0xf248aa69,
0xf248a24d,
0xc007a251,
0xd2889320,
0x7500aa39,
0x91e4c007,
0x5a8cb720,
0x46a9b780,
0x9e897500,
0x90e4c007,
0xa957f248,
0x8029f210,
0xa255f248,
0xa8b5d288,
0xc0007440,
0xf00890c2,
0xc000aa69,
0xf2489240,
0xf008a8cd,
0xd0a6aa69,
0xe2405908,
0xd2268123,
0xf3105904,
0xf3108021,
0xc2008221,
0xf2485a0d,
0xf248a24d,
0xf248aa4d,
0xd288a251,
0x7440a8b5,
0x9102c000,
0xa026f248,
0xa02af248,
0x9380c005,
0x4649b780,
0xc0017500,
0xda8890e2,
0xf248a8a2,
0xda88a925,
0x1c84aa21,
0xd0b19d1e,
0xd3330ce0,
0xb7606127,
0xc2004031,
0xc2005a40,
0xc2015a45,
0xf3108128,
0x9ea18021,
0xa9a1da88,
0xf2480507,
0x55afa225,
0x98d8c014,
0xa025f248,
0xa029f248,
0x9240c004,
0xa92bda08,
0xaa2df208,
0xa8a6f248,
0x88a1e310,
0xda0a9e4a,
0x8185a928,
0xd0331884,
0xf3206122,
0xf31088b1,
0xc0088a21,
0xc2007740,
0xc2015a07,
0xf3108128,
0xf2488021,
0xc000a225,
0x058b91dc,
0x9be1ffb4,
0xaa25f248,
0xc2009e81,
0xc20056a7,
0xf2485203,
0xb740a225,
0xf2485f84,
0xd2a6aa25,
0x9e2d5d04,
0xa8cdc830,
0xd2240189,
0x0c8259ff,
0x05030103,
0x98ffc014,
0x601cb740,
0xc2109dc7,
0x0181a92a,
0xc0140581,
0xf20898db,
0x7502aa29,
0xa025f248,
0x90c4c000,
0xa029f248,
0x9040c002,
0xa8aada08,
0xa954da12,
0x5c84d0a2,
0x8e22f011,
0xc0007048,
0xf2489176,
0x0208aa41,
0x5a07c200,
0xa229f248,
0x91c0c001,
0xa8c1f248,
0x0e12d011,
0xf3109e4a,
0xd0338a21,
0x60996104,
0x8122c201,
0xa12bf248,
0xaa55da10,
0x0ce0d0b1,
0xc2001a04,
0xf3105a07,
0xb7608021,
0xf2484031,
0xda10a229,
0x9ea1a9d5,
0x55af0507,
0xc0141984,
0xf248984b,
0xc000a029,
0xf20890e0,
0x0a04aa2d,
0xa22df208,
0xa8c5f248,
0xaa29f208,
0xa8aaf248,
0x5904d0a6,
0xc2017502,
0xf2108122,
0xf248802b,
0xc200a0ae,
0xc000588b,
0x9e4a90f4,
0x7044d010,
0xa229f248,
0x7eeeb79f,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c60,
0x588cb720,
0xaa61d810,
0xb5800802,
0x9c2241ab,
0x580cb740,
0x5c94b720,
0xa96cf012,
0xaa4df008,
0x414db720,
0x40ddb740,
0x8a21f310,
0xf3106243,
0xb5808021,
0xf01040cd,
0xf008a8ed,
0x9c22a0cd,
0x74c0c008,
0x9e529e58,
0x90fcc000,
0x70c0d002,
0x51f31a14,
0xc0055013,
0xc0007400,
0xd00290fc,
0x1a507000,
0x01285013,
0x5f84b740,
0x600cb780,
0x5904d1a6,
0xc0409e2d,
0xc830a8e5,
0x7044aa4d,
0xd01d6009,
0xd01a1214,
0xb3405013,
0x122248ba,
0x9c225010,
0x75269e5c,
0xd01e0882,
0xb3404000,
0xc38048bc,
0xc0007500,
0xc00290bc,
0x9c22084e,
0x7508c004,
0x915cc000,
0xc2000a04,
0xc0045a07,
0x08847508,
0x935affff,
0x609cb740,
0xc2209d4b,
0xd013a805,
0xe210691d,
0x9c228021,
0x0d00e000,
0x4422b330,
0x4842b330,
0x48a2b340,
0x8502c002,
0x882df210,
0xc0007500,
0x9e5990fa,
0x12090c02,
0x9c225031,
0x50d09e5a,
0x54699e52,
0x30425269,
0xa6859c22,
0x9e810007,
0xcffe9e90,
0x9e412cfc,
0x5c419e4c,
0xcffe6491,
0x62c328fc,
0x9e445841,
0x60096083,
0x5a41c280,
0x04909ea0,
0x9d099e88,
0x9e4c0490,
0xc0017102,
0xd0a28504,
0xb3025e41,
0xf3204468,
0xd0a68121,
0xcffe5d40,
0xf3102afc,
0x000d8123,
0x9e54040d,
0x6138d033,
0x61459e5c,
0x8125e210,
0x04629e91,
0x7f6eb7bf,
0x7feeb7df,
0x9c228c40,
0x87c2c809,
0x0c20b060,
0x87c2c809,
0x0a60b060,
0x87c2c809,
0x09c0b060,
};
unsigned long aui32H264VBR_MasterMTXTOPAZFWData[] =
{
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x809000b0,
0x80900364,
0x82884394,
0x82883ec0,
0x82883ed0,
0x82883f70,
0x82883de0,
0x82883e78,
0x82883fa0,
0x82883fd8,
0x82884014,
0x8288404c,
0x82884050,
0x82884080,
0x828840b0,
0x828840d8,
0x82883dd4,
0x828840e0,
0x828840e8,
0x82884118,
0x82884120,
0x82884154,
0x828845f4,
0x828844c6,
0x8288452e,
0x828845b0,
0x828844a0,
0x82884354,
0x8288445c,
0x8288449c,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x809007b8,
0x809007b8,
0x809028e0,
0x80902444,
0x809037f8,
0x80902cb8,
0x80902688,
0x809007b8,
0x809007b8,
0x809007b8,
0x809007b8,
0x809007b8,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0xa0101100,
0xa01001b0,
0xa0101102,
0xa01001b2,
0xa0101104,
0xa0100124,
0xa0101106,
0xa0100126,
0xa0100134,
0x00000000,
0xa0101120,
0xa0100136,
0xa0101122,
0xa0100144,
0x80101160,
0x80101162,
0x80101180,
0x80101182,
0x80100140,
0x80100142,
0x80100150,
0x80100152,
0x80100154,
0x80100146,
0x803003a0,
0x80100100,
0x80105156,
0xa0101164,
0xa0100184,
0x80101194,
0x801001b4,
0x80100146,
0x00000000,
0x00000003,
0x00000002,
0x00000002,
0x00000001,
0x00000001,
0x00000001,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000005,
0x000f9400,
0x000f9401,
0x000fd403,
0x000fd407,
0x000fd517,
0x000fdd37,
0x000fff37,
0x000ffb37,
0x00006b37,
0x00006b36,
0x00002b36,
0x00002b30,
0x00002a20,
0x40002220,
0x00000000,
0x00000000,
0x00010001,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x01010000,
0x02020201,
0x04030303,
0x05040404,
0x00140005,
0x001a0016,
0x0020001c,
0x00280024,
0x0034002c,
0x00400038,
0x00500048,
0x00680058,
0x00800070,
0x00a00090,
0x00d000b0,
0x010000e0,
0x01400120,
0x01a00160,
0x020001c0,
0x02800240,
0x034002c0,
0x04000380,
0x05000480,
0x06800580,
0x08000700,
0x0a000900,
0x0d000b00,
0x10000e00,
0x14001200,
0x1a001600,
0x00001c00,
0x00200040,
0x001002ab,
0x015500cd,
0x00080249,
0x00cd01c7,
0x0155005d,
0x0249013b,
0x00040111,
0x01c700f1,
0x00cd01af,
0x005d00c3,
0x01550059,
0x013b0029,
0x0249025f,
0x01110235,
0x00020021,
0x00f1001f,
0x01c70075,
0x01af006f,
0x00cd0069,
0x00c30019,
0x005d017d,
0x0059005b,
0x015502b9,
0x002900a7,
0x013b0283,
0x025f0135,
0x02490095,
0x0235023f,
0x0111008b,
0x00210219,
0x00010041,
0x0b060600,
0x0c0b0a06,
0x0a0b0c06,
0x0c0d0c0c,
0x0d0d0c06,
0x0b0b0c0c,
0x0e0d0a0d,
0x0a0d0e0e,
0x0c0d0a06,
0x0c0e0c0e,
0x0e0d0a0d,
0x0f0c0c0c,
0x0f0b0d0e,
0x0d0f0e0e,
0x0d0f0f0f,
0x0c0b0f0e,
0x00000006,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x1234baac,
0x00000000,
};
unsigned long aui32H264VBR_MasterMTXTOPAZFWTextReloc[] =
{
0
};
unsigned char aui8H264VBR_MasterMTXTOPAZFWTextRelocType[] =
{
0
};
unsigned long aui32H264VBR_MasterMTXTOPAZFWTextRelocFullAddr[] =
{
0
};
unsigned long aui32H264VBR_MasterMTXTOPAZFWDataReloc[] =
{
0
};
|
<gh_stars>0
import React from 'react'
import bannerImg from '../../asset/banner/banner.jpg'
import style from './Banner.module.scss'
const Banner = (props) =>{
const classWrapper = ['parallax-container', style.bannerParallax ];
let strHeader, subParagraph, strJoin = '';
if ( (props.headerText.pathname === '/') ){
strHeader = ('Psalm 9:9-10 ');
subParagraph = ('Many people are trapped and hurting because they have many troubles. Those people are crushed by the weight of their problems. Lord, be a safe place for them to run to. People who know your name should trust you. Lord, if people come to you, you will not leave them without help.');
}else{
strHeader = (props.headerText.pathname).replace(/[-/]/g," ").trim();
let headingBanr = strHeader.split(' ');
let newStr = headingBanr.map((e , i )=> {
if( i !== 1){
return e.charAt(0).toUpperCase() + e.slice(1);
}
return e;
})
console.log( strHeader );
strJoin = newStr.join(' ');
strHeader = strHeader === 'privacy policy'
? (<span>Privacy Policy</span>)
: strJoin;
}
return(
<div className={classWrapper.join(' ')}>
<div className="parallax">
<div id={style.bannerCustomContainer}>
<h1 className={style.headingBannerFt}>{strHeader}</h1>
<p className={style.subCatsFt}>{subParagraph}</p>
</div>
<img alt="banner-img" id={style.ParallaxImage} src={bannerImg} />
</div>
</div>
)
}
export default Banner; |
// Copyright 2018 Toyota Research Institute.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <chrono>
#include <condition_variable>
#include <functional>
#include <mutex>
#include <string>
#include <thread>
#include <vector>
#include <Eigen/Geometry>
#include "geometry_msgs/msg/twist.hpp"
#include "nav_msgs/msg/odometry.hpp"
#include "rclcpp/rclcpp.hpp"
#include "std_srvs/srv/trigger.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
#include "tf2/LinearMath/Matrix3x3.h"
#include "tf2/LinearMath/Quaternion.h"
#include "jaguar4x4_nav_msgs/srv/go_to_goal_pose.hpp" // pattern is all lower case name w/ underscores
class Jaguar4x4Nav final : public rclcpp::Node
{
public:
Jaguar4x4Nav() : Node("jaguar4x4nav")
{
cmd_vel_pub_ = this->create_publisher<geometry_msgs::msg::Twist>("cmd_vel",
rmw_qos_profile_sensor_data);
go_to_goal_pose_srv_ = this->create_service<jaguar4x4_nav_msgs::srv::GoToGoalPose>(
"go_to_goal_pose",
std::bind(&Jaguar4x4Nav::goToGoalPose, this,
std::placeholders::_1, std::placeholders::_2));
// We use a separate callback group for the odometry callback so that a
// thread can service this separately from the service callback.
odom_cb_grp_ = this->create_callback_group(
rclcpp::callback_group::CallbackGroupType::MutuallyExclusive);
odom_sub_ = this->create_subscription<nav_msgs::msg::Odometry>(
"odom",
std::bind(&Jaguar4x4Nav::odomCallback, this, std::placeholders::_1),
rmw_qos_profile_sensor_data,
odom_cb_grp_);
this->set_parameter_if_not_set("velocity_constant", VELOCITY_CONSTANT_DEFAULT);
this->set_parameter_if_not_set("heading_constant", HEADING_CONSTANT_DEFAULT);
this->set_parameter_if_not_set("distance_epsilon", DISTANCE_EPSILON_DEFAULT);
this->set_parameter_if_not_set("heading_epsilon", HEADING_EPSILON_DEFAULT);
}
~Jaguar4x4Nav()
{
}
private:
void odomCallback(const nav_msgs::msg::Odometry::SharedPtr msg)
{
std::unique_lock<std::timed_mutex> odom_lk(odom_mutex_, std::defer_lock);
bool got_lock = odom_lk.try_lock_for(std::chrono::milliseconds(100));
if (!got_lock) {
RCLCPP_INFO(get_logger(), "Could not acquire odom mutex before timeout");
return;
}
odom_ = msg;
odom_cv_.notify_one();
}
std::string goToGoalXY(double goal_x_m, double goal_y_m)
{
std::string error;
double vel_const;
double h_const;
double distance_epsilon;
this->get_parameter("velocity_constant", vel_const);
this->get_parameter("heading_constant", h_const);
this->get_parameter("distance_epsilon", distance_epsilon);
double x_diff;
double y_diff;
double distance;
double goal_theta_world_frame;
double velocity;
double omega;
std::chrono::time_point<std::chrono::system_clock> start_time = std::chrono::system_clock::now();
std::chrono::time_point<std::chrono::system_clock> last_pose_change_time = start_time;
double last_x = 0.0;
double last_y = 0.0;
while (true) {
std::string error_odom = waitForOdom();
if (!error.empty()) {
error += error_odom;
break;
}
nav_msgs::msg::Odometry odom_copy;
{
std::unique_lock<std::timed_mutex> odom_lk(odom_mutex_, std::defer_lock);
bool got_lock = odom_lk.try_lock_for(std::chrono::milliseconds(100));
if (!got_lock) {
RCLCPP_INFO(get_logger(), "Could not acquire odom mutex to copy odom");
error += "Couldn't acquire odom mutex to copy odom!";
break;
}
odom_copy.pose.pose.position.x = odom_->pose.pose.position.x;
odom_copy.pose.pose.position.y = odom_->pose.pose.position.y;
odom_copy.pose.pose.position.z = odom_->pose.pose.position.z;
odom_copy.pose.pose.orientation.x = odom_->pose.pose.orientation.x;
odom_copy.pose.pose.orientation.y = odom_->pose.pose.orientation.y;
odom_copy.pose.pose.orientation.z = odom_->pose.pose.orientation.z;
odom_copy.pose.pose.orientation.w = odom_->pose.pose.orientation.w;
}
if (odom_copy.pose.pose.position.x != last_x ||
odom_copy.pose.pose.position.y != last_y) {
last_pose_change_time = std::chrono::system_clock::now();
last_x = odom_copy.pose.pose.position.x;
last_y = odom_copy.pose.pose.position.y;
}
std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
auto last_pose_change_diff_ms = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_pose_change_time);
if (last_pose_change_diff_ms.count() > NO_MOVEMENT_TIMEOUT_MS) {
// We didn't have any changes in pose in the last 5 seconds; assume we
// are stuck or eStopped and fail the service.
RCLCPP_INFO(get_logger(), "No movement in %u milliseconds, giving up", NO_MOVEMENT_TIMEOUT_MS);
error += "No movement in 5 seconds ";
break;
}
x_diff = goal_x_m - odom_copy.pose.pose.position.x;
y_diff = goal_y_m - odom_copy.pose.pose.position.y;
goal_theta_world_frame = atan2(y_diff, x_diff);
distance = sqrt(x_diff*x_diff + y_diff*y_diff);
velocity = vel_const * distance;
// TODO: we actually want to be within a bounding box of the goal
if (distance < distance_epsilon) {
// we've gone the goal distance
break;
}
if (fabs(velocity) > VELOCITY_MAX_MPS) {
if (velocity > 0.0) {
velocity = VELOCITY_MAX_MPS;
} else {
velocity = -VELOCITY_MAX_MPS;
}
}
if (fabs(velocity) < VELOCITY_MIN_MPS) {
if (velocity > 0.0) {
velocity = VELOCITY_MIN_MPS;
} else {
velocity = -VELOCITY_MIN_MPS;
}
}
double roll;
double pitch;
double yaw;
tf2::Quaternion quat{odom_copy.pose.pose.orientation.x, odom_copy.pose.pose.orientation.y,
odom_copy.pose.pose.orientation.z, odom_copy.pose.pose.orientation.w};
tf2::Matrix3x3(quat).getRPY(roll, pitch, yaw);
omega = h_const * (goal_theta_world_frame - yaw);
if (fabs(omega) > OMEGA_MAX_RAD_PER_SECOND) {
if (omega > 0.0) {
omega = OMEGA_MAX_RAD_PER_SECOND;
} else {
omega = -OMEGA_MAX_RAD_PER_SECOND;
}
}
RCLCPP_INFO(get_logger(), "x_diff: %f, y_diff: %f, distance: %f, yaw: %f, omega: %f, velocity: %f", x_diff, y_diff, distance, yaw, omega, velocity);
auto cmd_vel_msg = std::make_shared<geometry_msgs::msg::Twist>();
cmd_vel_msg->linear.x = velocity;
cmd_vel_msg->linear.y = 0.0;
cmd_vel_msg->linear.z = 0.0;
cmd_vel_msg->angular.x = 0.0;
cmd_vel_msg->angular.y = 0.0;
cmd_vel_msg->angular.z = omega;
cmd_vel_pub_->publish(cmd_vel_msg);
}
return error;
}
std::string goToGoalTheta(double goal_theta_rad)
{
std::string error;
double heading_epsilon;
this->get_parameter("heading_epsilon", heading_epsilon);
RCLCPP_INFO(get_logger(), "in goToGoalTheta with goal theta = %f", goal_theta_rad);
std::unique_lock<std::timed_mutex> lk(odom_mutex_, std::defer_lock);
bool got_lock = lk.try_lock_for(std::chrono::milliseconds(100));
if (!got_lock) {
error = "Failed to acquire lock";
return error;
}
// current heading... Quaternion odom_->pose.pose.orientation
// goal heading... request->goal_theta_rad
geometry_msgs::msg::Quaternion last_orientation = odom_->pose.pose.orientation;
std::chrono::time_point<std::chrono::system_clock> start_time = std::chrono::system_clock::now();
std::chrono::time_point<std::chrono::system_clock> last_pose_change_time = start_time;
while (true) {
std::cv_status cv_status = odom_cv_.wait_for(lk,
std::chrono::milliseconds(NO_ODOM_TIMEOUT_MS));
if (cv_status == std::cv_status::timeout) {
RCLCPP_INFO(get_logger(), "No odom update in %d ms, giving up", NO_ODOM_TIMEOUT_MS);
error += "No data before timeout ";
break;
}
if (odom_->pose.pose.orientation != last_orientation) {
last_pose_change_time = std::chrono::system_clock::now();
last_orientation = odom_->pose.pose.orientation;
}
std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
auto last_pose_change_diff_ms = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_pose_change_time);
if (last_pose_change_diff_ms.count() > NO_MOVEMENT_TIMEOUT_MS) {
// We didn't have any changes in pose in the last 5 seconds; assume we
// are stuck or eStopped and fail the service.
RCLCPP_INFO(get_logger(), "No movement in %u milliseconds, giving up", NO_MOVEMENT_TIMEOUT_MS);
error += "No movement in 5 seconds ";
break;
}
// Check if we have reached our goal yet.
tf2::Quaternion current_quat;
tf2::fromMsg(odom_->pose.pose.orientation, current_quat);
tf2::Quaternion goal_quat;
goal_quat.setRPY(0.0, 0.0, goal_theta_rad);
double angle_abs_diff = current_quat.angleShortestPath(goal_quat);
RCLCPP_INFO(get_logger(), "angle diff: %f", angle_abs_diff);
if (std::isnan(angle_abs_diff)) {
// how did this happen?
RCLCPP_INFO(get_logger(), "Got NaN for angle difference, giving up");
error += "got NaN for angle difference ";
break;
}
if (fabs(angle_abs_diff) < heading_epsilon) {
break;
}
double roll;
double pitch;
double yaw;
tf2::Quaternion difference = goal_quat * current_quat.inverse();
tf2::Matrix3x3(difference).getRPY(roll, pitch, yaw);
auto cmd_vel_msg = std::make_shared<geometry_msgs::msg::Twist>();
cmd_vel_msg->linear.x = 0.0;
cmd_vel_msg->linear.y = 0.0;
cmd_vel_msg->linear.z = 0.0;
cmd_vel_msg->angular.x = 0.0;
cmd_vel_msg->angular.y = 0.0;
if (yaw >= 0.0) {
cmd_vel_msg->angular.z = OMEGA_MAX_RAD_PER_SECOND;
} else {
cmd_vel_msg->angular.z = -OMEGA_MAX_RAD_PER_SECOND;
}
cmd_vel_pub_->publish(cmd_vel_msg);
}
return error;
}
std::string goToGoalPoseImpl(double goal_x_m, double goal_y_m, double goal_theta_rad)
{
std::string error = goToGoalXY(goal_x_m, goal_y_m);
if (error.empty()) {
error = goToGoalTheta(goal_theta_rad);
}
// Send a stop message.
auto cmd_vel_msg = std::make_shared<geometry_msgs::msg::Twist>();
cmd_vel_msg->linear.x = 0.0;
cmd_vel_msg->linear.y = 0.0;
cmd_vel_msg->linear.z = 0.0;
cmd_vel_msg->angular.x = 0.0;
cmd_vel_msg->angular.y = 0.0;
cmd_vel_msg->angular.z = 0.0;
cmd_vel_pub_->publish(cmd_vel_msg);
return error;
}
void goToGoalPose(const std::shared_ptr<jaguar4x4_nav_msgs::srv::GoToGoalPose::Request> request,
std::shared_ptr<jaguar4x4_nav_msgs::srv::GoToGoalPose::Response> response)
{
if (go_to_goal_pose_service_running_) {
response->status = -1;
response->message = "already running";
return;
}
go_to_goal_pose_service_running_ = true;
std::string error = goToGoalPoseImpl(request->goal_x_m, request->goal_y_m, request->goal_theta_rad);
go_to_goal_pose_service_running_ = false;
if (!error.empty()) {
response->status = -1;
response->message = error;
} else {
response->status = 0;
response->message = "MOOOOOO";
}
RCLCPP_INFO(get_logger(), "End of service");
}
std::string waitForOdom()
{
// Wait for new odom_
std::unique_lock<std::timed_mutex> lk(odom_mutex_, std::defer_lock);
bool got_lock = lk.try_lock_for(std::chrono::milliseconds(100));
if (!got_lock) {
return "Failed to acquire lock";
}
std::cv_status cv_status = odom_cv_.wait_for(lk,
std::chrono::milliseconds(500));
if (cv_status == std::cv_status::timeout) {
return "No odom acquired before timeout";
}
return "";
}
// Tunable constants
const uint32_t NO_ODOM_TIMEOUT_MS = 500;
const uint32_t NO_MOVEMENT_TIMEOUT_MS = 5000;
const double VELOCITY_MAX_MPS = 0.6; // Don't go faster than this; it is scary
const double VELOCITY_MIN_MPS = 0.1; // Don't go slower than this; the vehicle can't move
const double OMEGA_MAX_RAD_PER_SECOND = 0.15;
const double VELOCITY_CONSTANT_DEFAULT = 0.3;
const double HEADING_CONSTANT_DEFAULT = 1.5;
const double DISTANCE_EPSILON_DEFAULT = 0.05;
const double HEADING_EPSILON_DEFAULT = 0.05;
rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr cmd_vel_pub_;
rclcpp::Service<jaguar4x4_nav_msgs::srv::GoToGoalPose>::SharedPtr go_to_goal_pose_srv_;
rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odom_sub_;
nav_msgs::msg::Odometry::SharedPtr odom_;
std::timed_mutex odom_mutex_;
std::condition_variable_any odom_cv_;
bool go_to_goal_pose_service_running_;
rclcpp::callback_group::CallbackGroup::SharedPtr odom_cb_grp_;
};
int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
rclcpp::executors::MultiThreadedExecutor executor;
auto nav = std::make_shared<Jaguar4x4Nav>();
executor.add_node(nav);
executor.spin();
rclcpp::shutdown();
return 0;
}
|
import pytest
from rich.progress import Progress
class TestProgressTracker:
def __init__(self):
self.collect_progress = Progress()
self.collect_task = self.collect_progress.add_task("[cyan]Collecting", total=100)
self.items_per_file = {}
self.status_per_item = {}
self.total_items_collected = 0
self.items = {}
def start(self):
self.collect_progress.start()
def update_progress(self, report_nodeid, total_items_collected):
self.collect_progress.update(
self.collect_task,
description=f"[cyan][bold]Collecting[/cyan] [magenta]{report_nodeid}[/magenta] ([green]{total_items_collected}[/green] total items)"
)
def store_items_per_file(self, item_path, item):
self.items_per_file.setdefault(item_path, []).append(item)
def track_item_status(self, item_nodeid, status):
self.status_per_item[item_nodeid] = status
def display_progress(self):
# Generate a visually appealing representation of the progress
progress_display = f"Total items collected: {self.total_items_collected}\n"
for item_nodeid, status in self.status_per_item.items():
progress_display += f"Item {item_nodeid}: {status}\n"
return progress_display |
<reponame>therealkevinard/kubernetes-ingress
package api
import (
parser "github.com/haproxytech/config-parser/v4"
"github.com/haproxytech/config-parser/v4/types"
)
func (c *clientNative) UserListExistsByGroup(group string) (exist bool, err error) {
c.activeTransactionHasChanges = true
var p parser.Parser
var sections []string
if p, err = c.nativeAPI.Configuration.GetParser(c.activeTransaction); err != nil {
return
}
sections, err = p.SectionsGet(parser.UserList)
for _, section := range sections {
if section == group {
exist = true
break
}
}
return
}
func (c *clientNative) UserListDeleteAll() (err error) {
c.activeTransactionHasChanges = true
var p parser.Parser
if p, err = c.nativeAPI.Configuration.GetParser(c.activeTransaction); err != nil {
return
}
var sections []string
sections, err = p.SectionsGet(parser.UserList)
for _, section := range sections {
err = p.SectionsDelete(parser.UserList, section)
if err != nil {
return
}
}
return
}
func (c *clientNative) UserListCreateByGroup(group string, userPasswordMap map[string][]byte) (err error) {
c.activeTransactionHasChanges = true
var p parser.Parser
if p, err = c.nativeAPI.Configuration.GetParser(c.activeTransaction); err != nil {
return
}
if err = p.SectionsCreate(parser.UserList, group); err != nil {
return
}
names := make([]string, 0, len(userPasswordMap))
for name, password := range userPasswordMap {
user := &types.User{
Name: name,
Password: string(password),
Groups: []string{"authenticated-users"},
}
if err = p.Insert(parser.UserList, group, "user", user); err != nil {
return
}
names = append(names, user.Name)
}
err = p.Insert(parser.UserList, group, "group", types.Group{
Name: "authenticated-users",
Users: names,
})
return
}
|
#
# Copyright (C) 2021 Vaticle
#
# 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.
#
from typing import Iterator
import typedb_protocol.common.concept_pb2 as concept_proto
from typedb.api.concept.thing.relation import Relation, RemoteRelation
from typedb.api.concept.type.relation_type import RelationType
from typedb.api.concept.type.role_type import RoleType
from typedb.common.rpc.request_builder import relation_add_player_req, relation_remove_player_req, \
relation_get_players_req, relation_get_players_by_role_type_req, relation_get_relating_req
from typedb.concept.proto import concept_proto_builder, concept_proto_reader
from typedb.concept.thing.thing import _Thing, _RemoteThing
from typedb.concept.type.role_type import _RoleType
class _Relation(Relation, _Thing):
def __init__(self, iid: str, is_inferred: bool, relation_type: RelationType):
super(_Relation, self).__init__(iid, is_inferred)
self._type = relation_type
@staticmethod
def of(thing_proto: concept_proto.Thing):
return _Relation(concept_proto_reader.iid(thing_proto.iid), thing_proto.inferred, concept_proto_reader.type_(thing_proto.type))
def as_remote(self, transaction):
return _RemoteRelation(transaction, self.get_iid(), self.is_inferred(), self.get_type())
def get_type(self) -> "RelationType":
return self._type
def as_relation(self) -> "Relation":
return self
class _RemoteRelation(_RemoteThing, RemoteRelation):
def __init__(self, transaction, iid: str, is_inferred: bool, relation_type: RelationType):
super(_RemoteRelation, self).__init__(transaction, iid, is_inferred)
self._type = relation_type
def as_remote(self, transaction):
return _RemoteRelation(transaction, self.get_iid(), self.is_inferred(), self.get_type())
def get_type(self) -> "RelationType":
return self._type
def as_relation(self) -> "RemoteRelation":
return self
def add_player(self, role_type, player):
self.execute(relation_add_player_req(self.get_iid(), concept_proto_builder.role_type(role_type), concept_proto_builder.thing(player)))
def remove_player(self, role_type, player):
self.execute(relation_remove_player_req(self.get_iid(), concept_proto_builder.role_type(role_type), concept_proto_builder.thing(player)))
def get_players(self, role_types=None):
return (concept_proto_reader.thing(t) for rp in self.stream(relation_get_players_req(self.get_iid(), concept_proto_builder.types(role_types)))
for t in rp.relation_get_players_res_part.things)
def get_players_by_role_type(self):
stream = (role_player for res_part in self.stream(relation_get_players_by_role_type_req(self.get_iid()))
for role_player in res_part.relation_get_players_by_role_type_res_part.role_types_with_players)
role_player_dict = {}
for role_player in stream:
role = concept_proto_reader.type_(role_player.role_type)
player = concept_proto_reader.thing(role_player.player)
if role not in role_player_dict:
role_player_dict[role] = []
role_player_dict[role].append(player)
return role_player_dict
def get_relating(self) -> Iterator[RoleType]:
return (_RoleType.of(rt) for rp in self.stream(relation_get_relating_req(self.get_iid()))
for rt in rp.relation_get_relating_res_part.role_types)
|
<reponame>DevangMstryls/ev-simulator
import ChargingStationConfiguration from './ChargingStationConfiguration';
import {Connectors} from './Connectors';
import {OCPPProtocol} from './ocpp/OCPPProtocol';
import {OCPPVersion} from './ocpp/OCPPVersion';
export enum CurrentType {
AC = 'AC',
DC = 'DC',
}
export enum PowerUnits {
WATT = 'W',
KILO_WATT = 'kW',
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
VOLTAGE_800 = 800
}
export interface AutomaticTransactionGenerator {
enable: boolean;
minDuration: number;
maxDuration: number;
minDelayBetweenTwoTransactions: number;
maxDelayBetweenTwoTransactions: number;
probabilityOfStart: number;
stopAfterHours: number;
stopOnConnectionFailure: boolean;
requireAuthorize?: boolean
}
export default interface ChargingStationTemplate {
supervisionURL?: string;
supervisionUser?: string;
supervisionPassword?: string;
ocppVersion?: OCPPVersion;
ocppProtocol?: OCPPProtocol;
authorizationFile?: string;
baseName: string;
nameSuffix?: string;
fixedName?: boolean;
chargePointModel: string;
chargePointVendor: string;
chargeBoxSerialNumberPrefix?: string;
firmwareVersion?: string;
power: number | number[];
powerSharedByConnectors?: boolean;
powerUnit: PowerUnits;
currentOutType?: CurrentType;
voltageOut?: Voltage;
numberOfPhases?: number;
numberOfConnectors?: number | number[];
useConnectorId0?: boolean;
randomConnectors?: boolean;
resetTime?: number;
autoRegister: boolean;
autoReconnectMaxRetries?: number;
reconnectExponentialDelay?: boolean;
registrationMaxRetries?: number;
enableStatistics?: boolean;
mayAuthorizeAtRemoteStart: boolean;
beginEndMeterValues?: boolean;
outOfOrderEndMeterValues?: boolean;
meteringPerTransaction?: boolean;
transactionDataMeterValues?: boolean;
mainVoltageMeterValues?: boolean;
phaseLineToLineVoltageMeterValues?: boolean;
Configuration?: ChargingStationConfiguration;
AutomaticTransactionGenerator: AutomaticTransactionGenerator;
Connectors: Connectors;
}
|
class Stack:
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def push(self, data):
self.items.append(data)
def pop(self):
return self.items.pop()
def peek(self):
return self.items[len(self.items)-1]
def size(self):
return len(self.items) |
const request = require('request');
const key = 'ENTER_YOUR_API_KEY';
const getTrafficCongestion = (location) => {
request(`http://api.mapbox.com/ Traffic-congestion/v1/mapbox/driving-traffic.json?access_token=${key}&location=${location}`, { json: true }, (err, res, body) => {
if (err) {
console.error(err);
} else {
console.log(body);
}
})
};
getTrafficCongestion(location);
// Output:
// {
// "congestion": "medium",
// "air_quality": "good",
// "location": "Toronto"
// } |
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <string>
#include <fc/crypto/sha256.hpp>
#include <eosio/chain/types.hpp>
#include <eosio/chain/contracts/genesis_state.hpp>
namespace eosio { namespace egenesis {
/**
* Get the chain ID of the built-in egenesis, or chain_id_type()
* if none was compiled in.
*/
eosio::chain::chain_id_type get_egenesis_chain_id();
/**
* Get the egenesis JSON, or the empty string if none was compiled in.
*/
void compute_egenesis_json( std::string& result );
/**
* The file returned by compute_egenesis_json() should have this hash.
*/
fc::sha256 get_egenesis_json_hash();
} } // eosio::egenesis
|
import open3d as o3d
import numpy as np
mesh = o3d.io.read_triangle_mesh("../test_data/input.ply")
vertices = np.asarray(mesh.vertices)
static_ids = [idx for idx in np.where(vertices[:, 1] < -30)[0]]
static_pos = []
for id in static_ids:
static_pos.append(vertices[id])
handle_ids = [2490]
handle_pos = [vertices[2490] + np.array((-40, -40, -40))]
constraint_ids = o3d.utility.IntVector(static_ids + handle_ids)
constraint_pos = o3d.utility.Vector3dVector(static_pos + handle_pos)
with o3d.utility.VerbosityContextManager(
o3d.utility.VerbosityLevel.Debug) as cm:
mesh_prime = mesh.deform_as_rigid_as_possible(constraint_ids,
constraint_pos,
max_iter=50)
print('Original Mesh')
R = mesh.get_rotation_matrix_from_xyz((0, np.pi, 0))
o3d.visualization.draw_geometries([mesh.rotate(R, center=mesh.get_center())])
print('Deformed Mesh')
mesh_prime.compute_vertex_normals()
o3d.visualization.draw_geometries(
[mesh_prime.rotate(R, center=mesh_prime.get_center())]) |
function doIt() {
rsync --exclude ".git/" \
--exclude ".DS_Store" \
--exclude "bootstrap.sh" \
--exclude "README.md" \
--exclude "brew.sh" \
--exclude "LICENSE-MIT.txt" \
--exclude "iterm-profile.json" \
--exclude ".editorconfig" \
-avh --no-perms . ~;
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt;
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
doIt;
fi;
fi;
unset doIt;
|
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=GNU-Linux-x86
CND_CONF=Release
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/hw2_aikeboer_aizezi_131044086
OUTPUT_BASENAME=hw2_aikeboer_aizezi_131044086
PACKAGE_TOP_DIR=hw2aikeboeraizezi131044086/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
rm -rf ${NBTMPDIR}
mkdir -p ${NBTMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory "${NBTMPDIR}/hw2aikeboeraizezi131044086/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/hw2aikeboeraizezi131044086.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/hw2aikeboeraizezi131044086.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}
|
#!/bin/bash --
MY_DIR=`dirname $0`
source $MY_DIR/../SetEnv
ge100k='SPAC23A1.10,SPBC19C2.07,SPBC32F12.11,SPCC13B11.01,SPBC1815.01,SPBC26H8.01,SPBC14F5.04c,SPBP22H7.08,SPBC1685.09,SPAC4H3.10c,SPAC1F8.07c,SPCC576.03c,SPAC26F1.06,SPAC1F7.13c,SPBC14F5.05c,SPCC1739.13,SPCC1223.02,SPBC32H8.12c,SPCC962.04,SPAC3H5.12c,SPBC56F2.12,SPAC9.09,SPAC26H5.10c,SPAC6B12.15,SPAC926.04c,SPBC8D2.18c,SPBC660.16,SPCC330.06c,SPCC16C4.13c,SPAC821.10c,SPAPJ698.02c,SPBC28F2.03,SPCC417.08,SPAC3A12.10,SPAC31G5.03,SPAC25B8.12c,SPBC215.05,SPBC1685.10,SPAC664.05,SPBC1709.05,SPBC428.11,SPBC21B10.08c,SPBC16H5.02,SPCC1183.08c,SPBC530.07c,SPAC3G9.03,SPBC29A3.04,SPCC18.14c,SPCC576.08c,SPBC16G5.14c,SPAC24C9.12c,SPBC19F8.08,SPBC2G5.05,SPAC4F10.14c,SPAC3C7.14c,SPAC23H4.06,SPAC23A1.08c,SPBC16D10.11c,SPAC1006.07,SPCP31B10.07,SPAPB8E5.06c,SPCC1020.06c,SPAC18G6.14c,SPAC3H5.05c,SPBP8B7.06,SPAC6G10.11c,SPBC1289.03c,SPAC1071.10c,SPAC6F6.07c,SPAC1782.11,SPAC1071.08,SPBC27.08c,SPAC10F6.06,SPAC9G1.03c,SPBC25H2.05,SPCC622.12c,SPAC23C11.05,SPAC9E9.09c,SPAC8E11.02c,SPAC4F8.07c,SPCC74.05,SPAC29A4.02c,SPAC22A12.15c,SPBC776.11,SPBC18E5.06,SPCC613.05c,SPCC1450.04,SPBC18H10.12c,SPAC29B12.04,SPBC21C3.08c,SPCC364.07,SPAC11E3.15,SPCC1322.04,SPCC191.02c,SPAC5D6.01,SPBC106.18,SPAC24H6.07,SPBC17G9.10,SPAC2C4.16c,SPAC4G9.03,SPAP8A3.07c,SPAC4F8.14c,SPBC2G2.04c,SPBC24C6.04,SPCC777.09c,SPAC4F10.20,SPBC3B8.03,SPAC23H4.10c,SPBC215.09c,SPCC622.09,SPAC607.03c,SPBC3F6.03,SPCC576.09'
cd ..
mkdir -p data/tmp
cp data/FTP/cdna_nointrons_noutrs.fa.gz data/tmp
gunzip data/tmp/cdna_nointrons_noutrs.fa.gz
sed -i -e 's/|.*//g' data/tmp/cdna_nointrons_noutrs.fa
perl misc_scripts/get_cDNA.pl -eg_host $DBHOST -eg_port $DBPORT -eg_user $DBUSER -eg_pass $DBPASS -eg_species $SPECIES -eg_dbname $DBCORENAME -genes $ge100k
# Insert the analysis_id required.
# insert into attrib_type (code, name, description) VALUES ('CodonAdaptIndex', 'Codon Adaptation Index', 'Pepstats attributes');
python misc_scripts/calculate_cai_ratios.py --host $DBPOMBEHOST --port $DBPOMBEPORT --user $DBPOMBEUSER --pswd $DBPOMBEPASS --db $DBCORENAME --loaddb 1
|
#!/usr/bin/env bash
if [[ -f "${CONFIG_PATH}" ]]; then
# Hass.IO configuration
profile_name="$(jq --raw-output '.profile_name' "${CONFIG_PATH}")"
profile_dir="$(jq --raw-output '.profile_dir' "${CONFIG_PATH}")"
RHASSPY_ARGS=('--profile' "${profile_name}" '--user-profiles' "${profile_dir}")
# Copy user-defined asoundrc to root
asoundrc="$(jq --raw-output '.asoundrc' "${CONFIG_PATH}")"
if [[ ! -z "${asoundrc}" ]]; then
echo "${asoundrc}" > /root/.asoundrc
fi
# Add SSL settings
ssl="$(jq --raw-output '.ssl' "${CONFIG_PATH}")"
if [[ "${ssl}" == 'true' ]]; then
certfile="$(jq --raw-output '.certfile' "${CONFIG_PATH}")"
if [[ -n "${certfile}" ]]; then
RHASSPY_ARGS+=('--certfile' "/ssl/${certfile}")
fi
keyfile="$(jq --raw-output '.keyfile' "${CONFIG_PATH}")"
if [[ -n "${keyfile}" ]]; then
RHASSPY_ARGS+=('--keyfile' "/ssl/${keyfile}")
fi
fi
# Prefix for HTTP UI
http_root="$(jq --raw-output '.http_root' "${CONFIG_PATH}")"
if [[ ! -z "${http_root}" ]]; then
RHASSPY_ARGS+=('--http-root' "${http_root}")
fi
fi
if [[ -z "${RHASSPY_ARGS[*]}" ]]; then
/usr/lib/rhasspy/bin/rhasspy-voltron "$@"
else
/usr/lib/rhasspy/bin/rhasspy-voltron "${RHASSPY_ARGS[@]}" "$@"
fi
|
<filename>AdoptionApplication/src/userinterface/BankManager/ViewLoanApplicationWorkAreaJPanel.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package userinterface.BankManager;
import Business.Enterprise.Enterprise;
import userinterface.CounselorRole.*;
import Business.Organization.Organization;
import Business.UserAccount.UserAccount;
import Business.WorkQueue.BirthMotherToCounselor;
import Business.WorkQueue.BirthMotherToLoan;
import java.awt.CardLayout;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;
/**
*
* @author HP
*/
public class ViewLoanApplicationWorkAreaJPanel extends javax.swing.JPanel {
private JPanel userProcessContainer;
private Organization organization;
private UserAccount userAccount;
private Enterprise enterprise;
/**
* Creates new form ViewLoanApplicationWorkAreaJPanel
*/
public ViewLoanApplicationWorkAreaJPanel(JPanel userProcessContainer, UserAccount account, Enterprise enterprise) {
initComponents();
this.userProcessContainer = userProcessContainer;
this.enterprise = enterprise;
this.organization = organization;
this.userAccount = account;
valueLabel.setText(enterprise.getName());
populateRequestTable();
}
public void populateRequestTable(){
DefaultTableModel model = (DefaultTableModel) workRequestJTable.getModel();
model.setRowCount(0);
for (BirthMotherToLoan request : enterprise.getWorkQueue().getBirthMotherToLoan()){
Object[] row = new Object[5];
row[0] = request;
row[1] = request.getLoan().getHospital();
row[2] = request.getLoan().getFunds();
row[3] = request.getStatus();
row[4] = request.getBirthMother().getLoanAmountApproved();
model.addRow(row);
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
workRequestJTable = new javax.swing.JTable();
viewBirthMother = new javax.swing.JButton();
refreshTestJButton = new javax.swing.JButton();
enterpriseLabel = new javax.swing.JLabel();
valueLabel = new javax.swing.JLabel();
btnBack = new javax.swing.JButton();
setBackground(java.awt.SystemColor.activeCaption);
setMaximumSize(new java.awt.Dimension(1245, 1000));
setMinimumSize(new java.awt.Dimension(1245, 1000));
workRequestJTable.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N
workRequestJTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"<NAME>", "Hospital", "Amount Requested", "Status", "Approved Amount"
}
) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class
};
boolean[] canEdit = new boolean [] {
false, false, false, false, false
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jScrollPane1.setViewportView(workRequestJTable);
if (workRequestJTable.getColumnModel().getColumnCount() > 0) {
workRequestJTable.getColumnModel().getColumn(0).setResizable(false);
workRequestJTable.getColumnModel().getColumn(1).setResizable(false);
workRequestJTable.getColumnModel().getColumn(2).setResizable(false);
workRequestJTable.getColumnModel().getColumn(3).setResizable(false);
workRequestJTable.getColumnModel().getColumn(4).setResizable(false);
}
viewBirthMother.setBackground(new java.awt.Color(255, 153, 51));
viewBirthMother.setFont(new java.awt.Font("Times New Roman", 1, 18)); // NOI18N
viewBirthMother.setText("VIEW LOAN REQUEST");
viewBirthMother.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
viewBirthMotherActionPerformed(evt);
}
});
refreshTestJButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
refreshTestJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Refresh.jpg"))); // NOI18N
refreshTestJButton.setText("Refresh");
refreshTestJButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
refreshTestJButtonActionPerformed(evt);
}
});
enterpriseLabel.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
enterpriseLabel.setText("ORGANIZATION:");
valueLabel.setFont(new java.awt.Font("Lucida Grande", 1, 24)); // NOI18N
valueLabel.setText("<value>");
btnBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/left-arrow-in-circular-button-black-symbol-2.png"))); // NOI18N
btnBack.setText("Back");
btnBack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnBackActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(430, 430, 430)
.addComponent(viewBirthMother))
.addGroup(layout.createSequentialGroup()
.addGap(151, 151, 151)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(btnBack)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(refreshTestJButton))
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 714, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(139, 139, 139)
.addComponent(enterpriseLabel)
.addGap(18, 18, 18)
.addComponent(valueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 454, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap(279, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(0, 98, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(valueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(enterpriseLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(73, 73, 73)
.addComponent(viewBirthMother, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(refreshTestJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(539, 539, 539))
);
}// </editor-fold>//GEN-END:initComponents
private void viewBirthMotherActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewBirthMotherActionPerformed
int selectedRow = workRequestJTable.getSelectedRow();
if (selectedRow < 0){
JOptionPane.showMessageDialog(null, "Please select a row from the table");
return;
}
else{
BirthMotherToLoan request = (BirthMotherToLoan)workRequestJTable.getValueAt(selectedRow,0);
if(request.getStatus().equals("Pending")){
request.setStatus("Processing");
request.setReceiver(userAccount);
CardLayout layout = (CardLayout) userProcessContainer.getLayout();
userProcessContainer.add("ViewBirthMotherJPanel", new ViewLoanRequest(userProcessContainer, userAccount, request, enterprise));
layout.next(userProcessContainer);
}
else{
JOptionPane.showMessageDialog(null, "Loan request completed");
return;
}
}
}//GEN-LAST:event_viewBirthMotherActionPerformed
private void refreshTestJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTestJButtonActionPerformed
populateRequestTable();
}//GEN-LAST:event_refreshTestJButtonActionPerformed
private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBackActionPerformed
// TODO add your handling code here:
userProcessContainer.remove(this);
CardLayout cardlayout = (CardLayout) userProcessContainer.getLayout();
cardlayout.previous(userProcessContainer);
}//GEN-LAST:event_btnBackActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnBack;
private javax.swing.JLabel enterpriseLabel;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton refreshTestJButton;
private javax.swing.JLabel valueLabel;
private javax.swing.JButton viewBirthMother;
private javax.swing.JTable workRequestJTable;
// End of variables declaration//GEN-END:variables
}
|
#!/usr/bin/env bash
###############################################################################
# Copyright (c) 2016-19, Lawrence Livermore National Security, LLC
# and RAJA project contributors. See the RAJA/COPYRIGHT file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################
##
## Execute these commands before running this script to build RAJA.
##
## First grab a node to compile and run your code:
##
## > qsub -I -n 1 -A <your_project> -t <# minutes> -q debug
##
## Then set up your build environment.
##
## > soft add +cmake-3.9.1
## > soft add +clang-4.0
## > soft add +cuda-9.1
##
BUILD_SUFFIX=alcf-cooley-nvcc9.1_clang4.0
rm -rf build_${BUILD_SUFFIX} 2>/dev/null
mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX}
cmake \
-DCMAKE_BUILD_TYPE=Release \
-C ../host-configs/alcf-builds/cooley_nvcc_clang4_0.cmake \
-DENABLE_OPENMP=On \
-DENABLE_CUDA=On \
-DCUDA_TOOLKIT_ROOT_DIR=/soft/visualization/cuda-9.1 \
-DCMAKE_INSTALL_PREFIX=../install_${BUILD_SUFFIX} \
"$@" \
..
|
def process_commands(commands):
global last_fix
if commands == last_fix:
last_fix = commands
else:
error_message = ' ' + str(e) + ': ' + ' && '.join(commands) + '\n'
print(error_message) |
/**
* 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 org.apache.jena.fuseki.mgt;
import java.util.List ;
import org.apache.jena.atlas.json.JsonBuilder ;
import org.apache.jena.fuseki.server.DataAccessPoint ;
import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
import org.apache.jena.fuseki.server.Endpoint ;
import org.apache.jena.fuseki.server.OperationName ;
/** Create a description of a service */
public class JsonDescription {
public static void arrayDatasets(JsonBuilder builder, DataAccessPointRegistry registry) {
builder.startArray() ;
for ( String ds : registry.keys() ) {
DataAccessPoint access = DataAccessPointRegistry.get().get(ds) ;
JsonDescription.describe(builder, access) ;
}
builder.finishArray() ;
}
public static void describe(JsonBuilder builder, DataAccessPoint access) {
builder.startObject() ;
builder.key(JsonConst.dsName).value(access.getName()) ;
builder.key(JsonConst.dsState).value(access.getDataService().isAcceptingRequests()) ;
builder.key(JsonConst.dsService) ;
builder.startArray() ;
for ( OperationName opName : access.getDataService().getOperations() ) {
List<Endpoint> endpoints = access.getDataService().getOperation(opName) ;
describe(builder, opName, endpoints) ;
}
builder.finishArray() ;
builder.finishObject() ;
}
private static void describe(JsonBuilder builder, OperationName opName, List<Endpoint> endpoints) {
builder.startObject() ;
builder.key(JsonConst.srvType).value(opName.name()) ;
builder.key(JsonConst.srvDescription).value(opName.getDescription()) ;
builder.key(JsonConst.srvEndpoints) ;
builder.startArray() ;
for ( Endpoint endpoint : endpoints )
builder.value(endpoint.getEndpoint()) ;
builder.finishArray() ;
builder.finishObject() ;
}
}
|
import Vue from "vue"
import Router from "vue-router"
import Index from "@/templates/Header"
Vue.use(Router)
export default new Router({
routes: [
{
path: "/",
name: "Header",
component: Header,
},
],
})
|
/**
*/
package PhotosMetaModel.tests;
import PhotosMetaModel.Index;
import PhotosMetaModel.PhotosMetaModelFactory;
import junit.framework.TestCase;
import junit.textui.TestRunner;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Index</b></em>'.
* <!-- end-user-doc -->
* @generated
*/
public class IndexTest extends TestCase {
/**
* The fixture for this Index test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Index fixture = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static void main(String[] args) {
TestRunner.run(IndexTest.class);
}
/**
* Constructs a new Index test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IndexTest(String name) {
super(name);
}
/**
* Sets the fixture for this Index test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void setFixture(Index fixture) {
this.fixture = fixture;
}
/**
* Returns the fixture for this Index test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Index getFixture() {
return fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
@Override
protected void setUp() throws Exception {
setFixture(PhotosMetaModelFactory.eINSTANCE.createIndex());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#tearDown()
* @generated
*/
@Override
protected void tearDown() throws Exception {
setFixture(null);
}
} //IndexTest
|
#!/usr/bin/env bash
set -e
source $SNAP/actions/common/utils.sh
CA_CERT=/snap/core/current/etc/ssl/certs/ca-certificates.crt
ARCH=$(arch)
if ! [ "${ARCH}" = "amd64" ]; then
echo "Cilium is not available for ${ARCH}" >&2
exit 1
fi
"$SNAP/microk8s-enable.wrapper" helm3
echo "Restarting kube-apiserver"
refresh_opt_in_config "allow-privileged" "true" kube-apiserver
run_with_sudo preserve_env snapctl restart "${SNAP_NAME}.daemon-apiserver"
# Reconfigure kubelet/containerd to pick up the new CNI config and binary.
echo "Restarting kubelet"
refresh_opt_in_config "cni-bin-dir" "\${SNAP_DATA}/opt/cni/bin/" kubelet
run_with_sudo preserve_env snapctl restart "${SNAP_NAME}.daemon-kubelet"
set_service_not_expected_to_start flanneld
run_with_sudo preserve_env snapctl stop "${SNAP_NAME}.daemon-flanneld"
remove_vxlan_interfaces
if grep -qE "bin_dir.*SNAP}\/" $SNAP_DATA/args/containerd-template.toml; then
echo "Restarting containerd"
run_with_sudo "${SNAP}/bin/sed" -i 's;bin_dir = "${SNAP}/opt;bin_dir = "${SNAP_DATA}/opt;g' "$SNAP_DATA/args/containerd-template.toml"
run_with_sudo preserve_env snapctl restart "${SNAP_NAME}.daemon-containerd"
fi
echo "Enabling Cilium"
read -ra CILIUM_VERSION <<< "$1"
if [ -z "$CILIUM_VERSION" ]; then
CILIUM_VERSION="v1.6"
fi
CILIUM_ERSION=$(echo $CILIUM_VERSION | sed 's/v//g')
if [ -f "${SNAP_DATA}/bin/cilium-$CILIUM_ERSION" ]
then
echo "Cilium version $CILIUM_VERSION is already installed."
else
CILIUM_DIR="cilium-$CILIUM_ERSION"
SOURCE_URI="https://github.com/cilium/cilium/archive"
CILIUM_CNI_CONF="plugins/cilium-cni/05-cilium-cni.conf"
CILIUM_LABELS="k8s-app=cilium"
NAMESPACE=kube-system
echo "Fetching cilium version $CILIUM_VERSION."
run_with_sudo mkdir -p "${SNAP_DATA}/tmp/cilium"
(cd "${SNAP_DATA}/tmp/cilium"
run_with_sudo "${SNAP}/usr/bin/curl" --cacert $CA_CERT -L $SOURCE_URI/$CILIUM_VERSION.tar.gz -o "$SNAP_DATA/tmp/cilium/cilium.tar.gz"
if ! run_with_sudo gzip -f -d "$SNAP_DATA/tmp/cilium/cilium.tar.gz"; then
echo "Invalid version \"$CILIUM_VERSION\". Must be a branch on https://github.com/cilium/cilium."
exit 1
fi
run_with_sudo tar -xf "$SNAP_DATA/tmp/cilium/cilium.tar" "$CILIUM_DIR/install" "$CILIUM_DIR/$CILIUM_CNI_CONF")
run_with_sudo mv "$SNAP_DATA/args/cni-network/cni.conf" "$SNAP_DATA/args/cni-network/10-kubenet.conf" 2>/dev/null || true
run_with_sudo mv "$SNAP_DATA/args/cni-network/flannel.conflist" "$SNAP_DATA/args/cni-network/20-flanneld.conflist" 2>/dev/null || true
run_with_sudo cp "$SNAP_DATA/tmp/cilium/$CILIUM_DIR/$CILIUM_CNI_CONF" "$SNAP_DATA/args/cni-network/05-cilium-cni.conf"
# Generate the YAMLs for Cilium and apply them
(cd "${SNAP_DATA}/tmp/cilium/$CILIUM_DIR/install/kubernetes"
${SNAP_DATA}/bin/helm3 template cilium \
--namespace $NAMESPACE \
--set global.cni.confPath="$SNAP_DATA/args/cni-network" \
--set global.cni.binPath="$SNAP_DATA/opt/cni/bin" \
--set global.cni.customConf=true \
--set global.containerRuntime.integration="containerd" \
--set global.containerRuntime.socketPath="$SNAP_COMMON/run/containerd.sock" \
| run_with_sudo tee cilium.yaml >/dev/null)
run_with_sudo mkdir -p "$SNAP_DATA/actions/cilium/"
run_with_sudo cp "$SNAP_DATA/tmp/cilium/$CILIUM_DIR/install/kubernetes/cilium.yaml" "$SNAP_DATA/actions/cilium.yaml"
run_with_sudo sed -i 's;path: \(/var/run/cilium\);path: '"$SNAP_DATA"'\1;g' "$SNAP_DATA/actions/cilium.yaml"
${SNAP}/microk8s-status.wrapper --wait-ready >/dev/null
echo "Deploying $SNAP_DATA/actions/cilium.yaml. This may take several minutes."
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" apply -f "$SNAP_DATA/actions/cilium.yaml"
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" -n $NAMESPACE rollout status ds/cilium
if [ -e "$SNAP_DATA/args/cni-network/cni.yaml" ]
then
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" delete -f "$SNAP_DATA/args/cni-network/cni.yaml"
run_with_sudo mv "$SNAP_DATA/args/cni-network/cni.yaml" "$SNAP_DATA/args/cni-network/cni.yaml.disabled"
fi
# Fetch the Cilium CLI binary and install
CILIUM_POD=$("$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" -n $NAMESPACE get pod -l $CILIUM_LABELS -o jsonpath="{.items[0].metadata.name}")
CILIUM_BIN=$(mktemp)
"$SNAP/kubectl" "--kubeconfig=$SNAP_DATA/credentials/client.config" -n $NAMESPACE cp $CILIUM_POD:/usr/bin/cilium $CILIUM_BIN >/dev/null
run_with_sudo mkdir -p "$SNAP_DATA/bin/"
run_with_sudo mv $CILIUM_BIN "$SNAP_DATA/bin/cilium-$CILIUM_ERSION"
run_with_sudo chmod +x "$SNAP_DATA/bin/"
run_with_sudo chmod +x "$SNAP_DATA/bin/cilium-$CILIUM_ERSION"
run_with_sudo ln -s $SNAP_DATA/bin/cilium-$CILIUM_ERSION $SNAP_DATA/bin/cilium
run_with_sudo rm -rf "$SNAP_DATA/tmp/cilium"
fi
echo "Cilium is enabled"
|
package com.zhcs.dao;
import java.util.Map;
import com.zhcs.entity.WeixintokenEntity;
//*****************************************************************************
/**
* <p>Title:WeixintokenDao</p>
* <p>Description: 微信token</p>
* <p>Copyright: Copyright (c) 2017</p>
* <p>Company: 深圳市智慧城市管家信息科技有限公司 </p>
* @author 刘晓东 - Alter
* @version v1.0 2017年2月23日
*/
//*****************************************************************************
public interface WeixintokenDao extends BaseDao<WeixintokenEntity> {
String queryAccessToken(Map<String, String> map);
}
|
ENV['RACK_ENV'] = 'test'
require 'rack/test'
include Rack::Test::Methods
RSpec.configure do |config|
end
|
#!/usr/bin/env bash
###############################################################################
# deployhasp.sh - Configure Home Assistant for HASP integration, then download
# the latest HASP automation package and modify for the provided device name
###############################################################################
# First order of business is to find 'configuration.yaml' in some likely places
if [ ! -f configuration.yaml ] # check current directory first
then
if [ -f /config/configuration.yaml ] # next check container config dir
then
cd /config
elif [ -f ~/.homeassistant/configuration.yaml ]
then
cd ~/.homeassistant
else
echo "WARNING: 'configuration.yaml' not found in current directory."
echo " Searching for 'configuration.yaml'..."
foundConfigFiles=$(find / -name configuration.yaml 2>/dev/null)
foundConfigCount=$(echo "$foundConfigFiles" | wc -l)
if [ $foundConfigCount == 1 ]
then
foundConfigDir=$(dirname "${foundConfigFiles}")
cd $foundConfigDir
echo "INFO: configuration.yaml found under: $foundConfigDir"
else
echo "ERROR: Failed to locate the active 'configuration.yaml'"
echo " Please run this script from the homeassistant"
echo " configuration folder for your environment."
exit 1
fi
fi
fi
# Check for write access to configuration.yaml
if [ ! -w configuration.yaml ]
then
echo "ERROR: Cannot write to 'configuration.yaml'. Check that you are"
echo " running as user 'homeassistant'. Exiting."
exit 1
fi
# Check that a new device name has been supplied and ask the user if we're missing
hasp_input_name="$@"
if [ "$hasp_input_name" == "" ]
then
read -e -p "Enter the new HASP device name (lower case letters, numbers, and '_' only): " -i "plate01" hasp_input_name
fi
# If it's still empty just pout and quit
if [ "$hasp_input_name" == "" ]
then
echo "ERROR: No device name provided"
exit 1
fi
# Santize the requested devicename to work with hass
hasp_device=`echo "$hasp_input_name" | tr '[:upper:]' '[:lower:]' | tr ' [:punct:]' '_'`
# Warn the user if we had rename anything
if [ "$hasp_input_name" != "$hasp_device" ]
then
echo "WARNING: Sanitized device name to \"$hasp_device\""
fi
# Check to see if packages are being included
if ! grep "^ packages: \!include_dir_named packages" configuration.yaml > /dev/null
then
if grep "^ packages: " configuration.yaml > /dev/null
then
echo "==========================================================================="
echo "WARNING: Conflicting packages definition found in 'configuration.yaml'."
echo " Please add the following statement to your configuration:"
echo ""
echo "homeassistant:"
echo " packages: !include_dir_named packages"
echo "==========================================================================="
else
if grep "^homeassistant:" configuration.yaml > /dev/null
then
sed -i 's/^homeassistant:.*/homeassistant:\n packages: !include_dir_named packages/' configuration.yaml
elif grep "^default_config:" configuration.yaml > /dev/null
then
sed -i 's/^default_config:.*/default_config:\nhomeassistant:\n packages: !include_dir_named packages/' configuration.yaml
else
echo "==========================================================================="
echo "WARNING: Could not add package declaration to 'configuration.yaml'."
echo " Please add the following statement to your configuration:"
echo "default_config:"
echo " packages: !include_dir_named packages"
echo "==========================================================================="
fi
fi
fi
# Enable recorder if not enabled to persist relevant values
if ! grep "^recorder:" configuration.yaml > /dev/null
then
echo "\nrecorder:" >> configuration.yaml
fi
# Warn if MQTT is not enabled
if ! grep "^mqtt:" configuration.yaml > /dev/null
then
if ! grep '"domain": "mqtt"' .storage/core.config_entries > /dev/null
then
echo "==========================================================================="
echo "WARNING: Required MQTT broker configuration not setup in configuration.yaml"
echo " or added under Configuration > Integrations."
echo ""
echo "HASP WILL NOT FUNCTION UNTIL THIS HAS BEEN CONFIGURED!"
echo ""
echo "Review the following for options on setting up your Home Assistant install"
echo "with MQTT: https://www.home-assistant.io/docs/mqtt/broker"
echo ""
echo "For hassio users, you can deploy the Mosquitto broker add-on here:"
echo "https://github.com/home-assistant/hassio-addons/blob/master/mosquitto"
echo "==========================================================================="
fi
fi
# Create a temp dir
hasp_temp_dir=`mktemp -d`
# Download latest packages
wget -q -P $hasp_temp_dir https://github.com/aderusha/HASwitchPlate/raw/master/Home_Assistant/hasppackages.tar.gz
tar -zxf $hasp_temp_dir/hasppackages.tar.gz -C $hasp_temp_dir
rm $hasp_temp_dir/hasppackages.tar.gz
# Rename things if we are calling it something other than plate01
if [[ "$hasp_input_name" != "plate01" ]]
then
# rename text in contents of files
sed -i -- 's/plate01/'"$hasp_device"'/g' $hasp_temp_dir/packages/plate01/hasp_plate01_*.yaml
sed -i -- 's/plate01/'"$hasp_device"'/g' $hasp_temp_dir/hasp-examples/plate01/hasp_plate01_*.yaml
sed -i -- 's/plate01/'"$hasp_device"'/g' $hasp_temp_dir/packages/hasp_plate01_lovelace.txt
# rename files and folder - thanks to @cloggedDrain for this loop!
mkdir $hasp_temp_dir/packages/$hasp_device
for file in $hasp_temp_dir/packages/plate01/*
do
new_file=`echo $file | sed s/plate01/$hasp_device/g`
if [ -f $file ]
then
mv $file $new_file
if [ $? -ne 0 ]
then
echo "ERROR: Could not copy $file to $new_file"
exit 1
fi
fi
done
rm -rf $hasp_temp_dir/packages/plate01
# do it again for the examples
mkdir $hasp_temp_dir/hasp-examples/$hasp_device
for file in $hasp_temp_dir/hasp-examples/plate01/*
do
new_file=`echo $file | sed s/plate01/$hasp_device/g`
if [ -f $file ]
then
mv $file $new_file
if [ $? -ne 0 ]
then
echo "ERROR: Could not copy $file to $new_file"
exit 1
fi
fi
done
rm -rf $hasp_temp_dir/hasp-examples/plate01
# rename the lovelace UI file
mv $hasp_temp_dir/packages/hasp_plate01_lovelace.txt $hasp_temp_dir/packages/hasp_${hasp_device}_lovelace.txt
fi
# Check to see if the target directories already exist
if [[ -d ./packages/$hasp_device ]] || [[ -d ./hasp-examples/$hasp_device ]]
then
echo "==========================================================================="
echo "WARNING: This device already exists. You have 3 options:"
echo " [r] Replace - Delete existing device and replace with new device [RECOMMENDED]"
echo " [u] Update - Overwrite existing device with new configuration, retain any additional files created"
echo " [c] Canel - Cancel the process with no changes made"
echo ""
read -e -p "Enter overwrite action [r|u|c]: " -i "r" hasp_overwrite_action
if [[ "$hasp_overwrite_action" == "r" ]] || [[ "$hasp_overwrite_action" == "R" ]]
then
echo "Deleting existing device and creating new device"
rm -rf ./packages/$hasp_device
rm -rf ./hasp-examples/$hasp_device
rm ./packages/hasp_${hasp_device}_lovelace.txt
cp -rf $hasp_temp_dir/* .
rm -rf $hasp_temp_dir
elif [[ "$hasp_overwrite_action" == "u" ]] || [[ "$hasp_overwrite_action" == "U" ]]
then
echo "Overwriting existing device with updated files"
cp -rf $hasp_temp_dir/* .
rm -rf $hasp_temp_dir
else
echo "Exiting with no changes made"
rm -rf $hasp_temp_dir
exit 1
fi
else
# Copy everything over and burn the evidence
cp -rf $hasp_temp_dir/* .
rm -rf $hasp_temp_dir
fi
echo "==========================================================================="
echo "SUCCESS! Restart Home Assistant to enable HASP device $hasp_device"
echo "Check the file packages/hasp_${hasp_device}_lovelace.txt for a set of"
echo "basic Lovelace UI elements you can include in your configuration"
echo "to manage the new device."
echo ""
echo "Here are the contents of that file to paste into your Lovelace config."
echo "Hold 'shift' while selecting this text to copy to your clipboard:"
echo ""
cat packages/hasp_${hasp_device}_lovelace.txt
|
/* GENERATED FILE */
import { html, svg, define } from "hybrids";
const PhStop = {
color: "currentColor",
size: "1em",
weight: "regular",
mirrored: false,
render: ({ color, size, weight, mirrored }) => html`
<svg
xmlns="http://www.w3.org/2000/svg"
width="${size}"
height="${size}"
fill="${color}"
viewBox="0 0 256 256"
transform=${mirrored ? "scale(-1, 1)" : null}
>
${weight === "bold" &&
svg`<rect x="52" y="52" width="152" height="152" rx="6.90909" stroke-width="24" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`}
${weight === "duotone" &&
svg`<rect x="52" y="52" width="152" height="152" rx="6.90909" opacity="0.2"/>
<rect x="52" y="52" width="152" height="152" rx="6.90909" stroke-width="16" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`}
${weight === "fill" &&
svg`<rect x="44" y="44" width="168" height="168" rx="14.90918"/>`}
${weight === "light" &&
svg`<rect x="52" y="52" width="152" height="152" rx="6.90909" stroke-width="12" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`}
${weight === "thin" &&
svg`<rect x="52" y="52" width="152" height="152" rx="6.90909" stroke-width="8" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`}
${weight === "regular" &&
svg`<rect x="52" y="52" width="152" height="152" rx="6.90909" stroke-width="16" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`}
</svg>
`,
};
define("ph-stop", PhStop);
export default PhStop;
|
#!/bin/bash
#
#SBATCH --job-name=Test-singularity-environment-variable-passing
#
#SBATCH --time=00:10:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2G
# Hypothesis:
#
# I should be able to pass environment variables to a python program through
# the singularity --env and assume a default if it hasn't been passed.
CONTAINER=ghcr.io/phargogh/inspring-no-gcloud-keys
DIGEST=sha256:66c4a760dece610f992ee2f2aa4fff6a8d9e96951bf6f9a81bf16779aa7f26c4
# Expected workspace: $TARGET_WORKSPACE
TARGET_WORKSPACE=$L_SCRATCH/test-echo-workspace
srun mkdir $TARGET_WORKSPACE \
&& singularity run \
--env WORKSPACE_DIR=$TARGET_WORKSPACE \
docker://$CONTAINER@$DIGEST \
echo-workspace.py > $TARGET_WORKSPACE/out.txt \
; cp -r $TARGET_WORKSPACE $SCRATCH/test-echo-workspace
# Expected workspace: default/workspace
singularity run \
docker://$CONTAINER@$DIGEST echo-workspace.py
|
#!/bin/bash -l
# SLURM SUBMIT SCRIPT
#SBATCH --nodes=4
#SBATCH --gres=gpu:4
#SBATCH --ntasks-per-node=4
#SBATCH --mem=0
#SBATCH --time=0-02:00:00
# activate conda env
conda activate my_env
# -------------------------
# debugging flags (optional)
# export NCCL_DEBUG=INFO
# export PYTHONFAULTHANDLER=1
# on your cluster you might need these:
# set the network interface
# export NCCL_SOCKET_IFNAME=^docker0,lo
# might need the latest cuda
# module load NCCL/2.4.7-1-cuda.10.0
# -------------------------
# random port between 12k and 20k
export MASTER_PORT=$((12000 + RANDOM % 20000))
# run script from above
python minimal_multi_node_demo.py |
#!/bibn/bash
set -e
make -C ../../../UTILS/src/
make -C ../lua/ clean
make -C ../lua/
gcc -g -std=gnu99 \
test_cum_for_dt.c \
-I../gen_inc \
-I../../../UTILS/inc \
-I../../../UTILS/gen_inc \
../gen_src/_cum_for_dt_F4_I4.c \
-o a.out -lm
VG=" "
VG=" valgrind "
$VG ./a.out 2>_x
set +e
grep 'ERROR SUMMARY' _x | grep ' 0 errors' 1>/dev/null 2>&1
status=$?
if [ $status != 0 ]; then echo VG: FAILURE; else echo VG: SUCCESS; fi
set -e
#-------------------
gcc -g -std=gnu99 \
test_cum_for_evan_dt.c \
-I../gen_inc \
-I../../../UTILS/inc \
-I../../../UTILS/gen_inc \
../gen_src/_cum_for_evan_dt_F4_I4.c \
-o a.out -lm
VG=" "
VG=" valgrind "
$VG ./a.out 2>_x
set +e
grep 'ERROR SUMMARY' _x | grep ' 0 errors' 1>/dev/null 2>&1
status=$?
if [ $status != 0 ]; then echo VG: FAILURE; else echo VG: SUCCESS; fi
set -e
#-------------------
#luajit test_cum_for_dt.lua
#rm _x a.out
echo "Completed $0 in $PWD"
|
<gh_stars>1-10
// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.enterprise.secmgr.testing;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.GuardedBy;
import junit.framework.TestCase;
public abstract class TearDownTestCase extends TestCase {
/** Creates a TearDownTestCase with the default (empty) name. */
public TearDownTestCase() {}
/** Creates a TearDownTestCase with the specified name. */
public TearDownTestCase(String name) {
super(name);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
final TearDownStack stack = new TearDownStack(true);
/** Registers a TearDown implementor which will be run during {@link #tearDown()} */
public final void addTearDown(TearDown tearDown) {
stack.addTearDown(tearDown);
}
@Override
protected final void tearDown() {
stack.runTearDown();
}
// Override to run setUp() inside the try block, not outside
@Override
public final void runBare() throws Throwable {
try {
setUp();
runTest();
} finally {
tearDown();
}
}
public interface TearDown {
/**
* Performs a <b>single</b> tear-down operation.
*
* @throws Exception for any reason. {@code TearDownTestCase} ensures that any exception thrown
* will not interfere with other TearDown operations.
*/
void tearDown() throws Exception;
}
public interface TearDownAccepter {
/**
* Registers a TearDown implementor which will be run after the test proper.
*
* <p>In JUnit4 language, that means as an {@code @After}.
*
* <p>In JUnit3 language, that means during the {@link junit.framework.TestCase#tearDown()}
* step.
*/
void addTearDown(TearDown tearDown);
}
public static class TearDownStack implements TearDownAccepter {
private static final Logger logger = Logger.getLogger(TearDownStack.class.getName());
@GuardedBy("stack")
final LinkedList<TearDown> stack = new LinkedList<>();
private final boolean suppressThrows;
public TearDownStack() {
this.suppressThrows = false;
}
public TearDownStack(boolean suppressThrows) {
this.suppressThrows = suppressThrows;
}
@Override
public final void addTearDown(TearDown tearDown) {
synchronized (stack) {
stack.addFirst(checkNotNull(tearDown));
}
}
/** Causes teardown to execute. */
public final void runTearDown() {
List<Throwable> exceptions = new ArrayList<>();
List<TearDown> stackCopy;
synchronized (stack) {
stackCopy = Lists.newArrayList(stack);
stack.clear();
}
for (TearDown tearDown : stackCopy) {
try {
tearDown.tearDown();
} catch (Throwable t) {
if (suppressThrows) {
logger.log(Level.INFO, "exception thrown during tearDown", t);
} else {
exceptions.add(t);
}
}
}
if ((!suppressThrows) && (exceptions.size() > 0)) {
throw ClusterException.create(exceptions);
}
}
}
static final class ClusterException extends RuntimeException {
public final Collection<? extends Throwable> exceptions;
private ClusterException(Collection<? extends Throwable> exceptions) {
super(
exceptions.size() + " exceptions were thrown. The first exception is listed as a cause.",
exceptions.iterator().next());
ArrayList<Throwable> temp = new ArrayList<>();
temp.addAll(exceptions);
this.exceptions = Collections.unmodifiableCollection(temp);
}
/** @see #create(Collection) */
public static RuntimeException create(Throwable... exceptions) {
ArrayList<Throwable> temp = new ArrayList<>(Arrays.asList(exceptions));
return create(temp);
}
/**
* Given a collection of exceptions, returns a {@link RuntimeException}, with the following
* rules:
*
* <ul>
* <li>If {@code exceptions} has a single exception and that exception is a {@link
* RuntimeException}, return it
* <li>If {@code exceptions} has a single exceptions and that exceptions is <em>not</em> a
* {@link RuntimeException}, return a simple {@code RuntimeException} that wraps it
* <li>Otherwise, return an instance of {@link ClusterException} that wraps the first
* exception in the {@code exceptions} collection.
* </ul>
*
* <p>Though this method takes any {@link Collection}, it often makes most sense to pass a
* {@link java.util.List} or some other collection that preserves the order in which the
* exceptions got added.
*
* @throws NullPointerException if {@code exceptions} is null
* @throws IllegalArgumentException if {@code exceptions} is empty
*/
public static RuntimeException create(Collection<? extends Throwable> exceptions) {
if (exceptions.size() == 0) {
throw new IllegalArgumentException(
"Can't create an ExceptionCollection with no exceptions");
}
if (exceptions.size() == 1) {
Throwable temp = exceptions.iterator().next();
if (temp instanceof RuntimeException) {
return (RuntimeException) temp;
} else {
return new RuntimeException(temp);
}
}
return new ClusterException(exceptions);
}
}
}
|
my_hashtable = {
141043851 : 'John Doe',
143093159 : 'Jane Smith',
145066976 : 'Peter Jones'
} |
#!/bin/bash
##
# Generated by Cloudera Manager and should not be modified directly
##
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.