max_stars_count
int64 301
224k
| text
stringlengths 6
1.05M
| token_count
int64 3
727k
|
---|---|---|
344 | //===============================================================================
// @ Game.cpp
// ------------------------------------------------------------------------------
// Game core routines
//
// Copyright (C) 2008-2015 by <NAME> and <NAME>.
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This demo implements a very simple clipping routine. A red triangle is
// clipped against a plane, represented by yellow lines. See IvClipper for more
// details on how the clipping is handled.
//
// The key commands are:
//
// i, k - move triangle in and out
// j, l - move triangle left and right
// space - reset to start
//
//===============================================================================
//-------------------------------------------------------------------------------
//-- Dependencies ---------------------------------------------------------------
//-------------------------------------------------------------------------------
#include <math.h>
#include <IvClock.h>
#include <IvRenderer.h>
#include <IvEventHandler.h>
#include <IvMath.h>
#include <IvMatrix33.h>
#include <IvMatrix44.h>
#include <IvRendererHelp.h>
#include <IvVector4.h>
#include <IvResourceManager.h>
#include "Game.h"
//-------------------------------------------------------------------------------
//-- Static Members -------------------------------------------------------------
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
//-- Methods --------------------------------------------------------------------
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
// @ IvGame::Create()
//-------------------------------------------------------------------------------
// Static constructor
//-------------------------------------------------------------------------------
bool
IvGame::Create()
{
IvGame::mGame = new Game();
return ( IvGame::mGame != 0 );
} // End of IvGame::Create()
//-------------------------------------------------------------------------------
// @ Game::Game()
//-------------------------------------------------------------------------------
// Constructor
//-------------------------------------------------------------------------------
Game::Game() : IvGame(), mPosition( 0.0f, -0.5f, 0.0f ), mPlaneBuffer(0)
{
IvPlane clipPlane( 0.0f, -1.0f, 0.0f, 1.0f );
mClipper.SetPlane( clipPlane );
} // End of Game::Game()
//-------------------------------------------------------------------------------
// @ Game::~Game()
//-------------------------------------------------------------------------------
// Destructor
//-------------------------------------------------------------------------------
Game::~Game()
{
} // End of Game::~Game()
//-------------------------------------------------------------------------------
// @ Game::PostRendererInitialize()
//-------------------------------------------------------------------------------
// Set up internal subsystems
//-------------------------------------------------------------------------------
bool
Game::PostRendererInitialize()
{
// Set up base class
if ( !IvGame::PostRendererInitialize() )
return false;
IvSetDefaultLighting();
return true;
} // End of Game::PostRendererInitialize()
//-------------------------------------------------------------------------------
// @ Game::Update()
//-------------------------------------------------------------------------------
// Main update loop
//-------------------------------------------------------------------------------
void
Game::UpdateObjects( float dt )
{
// set up triangle translation
IvVector3 xlate;
xlate.Zero();
if (IvGame::mGame->mEventHandler->IsKeyDown('k'))
{
xlate -= 3.0f*dt*IvVector3::xAxis;
}
if (IvGame::mGame->mEventHandler->IsKeyDown('i'))
{
xlate += 3.0f*dt*IvVector3::xAxis;
}
if (IvGame::mGame->mEventHandler->IsKeyDown('l'))
{
xlate -= 3.0f*dt*IvVector3::yAxis;
}
if (IvGame::mGame->mEventHandler->IsKeyDown('j'))
{
xlate += 3.0f*dt*IvVector3::yAxis;
}
mPosition += xlate;
// clear transforms
if (IvGame::mGame->mEventHandler->IsKeyDown(' '))
{
mPosition.Set( 0.0f, -0.5f, 0.0f );
}
} // End of Game::Update()
//-------------------------------------------------------------------------------
// @ Game::Render()
//-------------------------------------------------------------------------------
// Render stuff
//-------------------------------------------------------------------------------
void
Game::Render()
{
// set viewer
IvSetDefaultViewer( -10.0f, -2.0f, 5.f );
// draw plane
if ( !mPlaneBuffer )
{
mPlaneBuffer = IvRenderer::mRenderer->GetResourceManager()->CreateVertexBuffer(kCPFormat, 44,
nullptr, kDefaultUsage);
IvCPVertex* dataPtr = (IvCPVertex*) mPlaneBuffer->BeginLoadData();
for ( float x = -10.0f; x <= 10.0f; x += 2.0f )
{
dataPtr->color = kYellow;
dataPtr->position.Set( x, 1.0f, 10.0f );
++dataPtr;
dataPtr->color = kYellow;
dataPtr->position.Set( x, 1.0f, -10.0f );
++dataPtr;
}
for ( float z = -10.0f; z <= 10.0f; z += 2.0f )
{
dataPtr->color = kYellow;
dataPtr->position.Set( -10.0f, 1.0f, z );
++dataPtr;
dataPtr->color = kYellow;
dataPtr->position.Set( 10.0f, 1.0f, z );
++dataPtr;
}
(void) mPlaneBuffer->EndLoadData();
}
IvRenderer::mRenderer->Draw( kLineListPrim, mPlaneBuffer );
// draw clipped triangle
mClipper.StartClip();
mClipper.ClipVertex( IvVector3( 1.0f, 1.0f, 2.0f )+mPosition );
mClipper.ClipVertex( IvVector3( 0.0f, 3.0f, -2.0f )+mPosition );
mClipper.ClipVertex( IvVector3( -1.0f, -3.0f, -1.0f )+mPosition );
// duplicate first vertex (important)
mClipper.ClipVertex( IvVector3( 1.0f, 1.0f, 2.0f )+mPosition );
mClipper.FinishClip();
}
| 2,017 |
581 | package io.sentry.samples.android;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import io.sentry.Attachment;
import io.sentry.ISpan;
import io.sentry.Sentry;
import io.sentry.SpanStatus;
import io.sentry.UserFeedback;
import io.sentry.protocol.SentryId;
import io.sentry.protocol.User;
import io.sentry.samples.android.databinding.ActivityMainBinding;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Calendar;
import java.util.Collections;
import java.util.Locale;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ActivityMainBinding binding = ActivityMainBinding.inflate(getLayoutInflater());
final File imageFile = getApplicationContext().getFileStreamPath("sentry.png");
try (final InputStream inputStream =
getApplicationContext().getResources().openRawResource(R.raw.sentry);
FileOutputStream outputStream = new FileOutputStream(imageFile)) {
final byte[] bytes = new byte[1024];
while (inputStream.read(bytes) != -1) {
// To keep the sample code simple this happens on the main thread. Don't do this in a
// real app.
outputStream.write(bytes);
}
outputStream.flush();
} catch (IOException e) {
Sentry.captureException(e);
}
final Attachment image = new Attachment(imageFile.getAbsolutePath(), "sentry.png", "image/png");
Sentry.configureScope(
scope -> {
scope.addAttachment(image);
});
binding.crashFromJava.setOnClickListener(
view -> {
throw new RuntimeException("Uncaught Exception from Java.");
});
binding.sendMessage.setOnClickListener(view -> Sentry.captureMessage("Some message."));
binding.sendUserFeedback.setOnClickListener(
view -> {
SentryId sentryId = Sentry.captureException(new Exception("I have feedback"));
UserFeedback userFeedback = new UserFeedback(sentryId);
userFeedback.setComments("It broke on Android. I don't know why, but this happens.");
userFeedback.setEmail("<EMAIL>");
userFeedback.setName("<NAME>");
Sentry.captureUserFeedback(userFeedback);
});
binding.addAttachment.setOnClickListener(
view -> {
String fileName = Calendar.getInstance().getTimeInMillis() + "_file.txt";
File file = getApplication().getFileStreamPath(fileName);
try (final FileOutputStream fileOutputStream = new FileOutputStream(file);
final OutputStreamWriter outputStreamWriter =
new OutputStreamWriter(fileOutputStream);
final Writer writer = new BufferedWriter(outputStreamWriter)) {
for (int i = 0; i < 1024; i++) {
// To keep the sample code simple this happens on the main thread. Don't do this in a
// real app.
writer.write(String.format(Locale.getDefault(), "%d\n", i));
}
writer.flush();
} catch (IOException e) {
Sentry.captureException(e);
}
Sentry.configureScope(
scope -> {
String json = "{ \"number\": 10 }";
Attachment attachment = new Attachment(json.getBytes(), "log.json");
scope.addAttachment(attachment);
scope.addAttachment(new Attachment(file.getPath()));
});
});
binding.captureException.setOnClickListener(
view ->
Sentry.captureException(
new Exception(new Exception(new Exception("Some exception.")))));
binding.breadcrumb.setOnClickListener(
view -> {
Sentry.addBreadcrumb("Breadcrumb");
Sentry.setExtra("extra", "extra");
Sentry.setFingerprint(Collections.singletonList("fingerprint"));
Sentry.setTransaction("transaction");
Sentry.captureException(new Exception("Some exception with scope."));
});
binding.unsetUser.setOnClickListener(
view -> {
Sentry.setTag("user_set", "null");
Sentry.setUser(null);
});
binding.setUser.setOnClickListener(
view -> {
Sentry.setTag("user_set", "instance");
User user = new User();
user.setUsername("username_from_java");
// works with some null properties?
// user.setId("id_from_java");
user.setEmail("email_from_java");
// Use the client's IP address
user.setIpAddress("{{auto}}");
Sentry.setUser(user);
});
binding.nativeCrash.setOnClickListener(view -> NativeSample.crash());
binding.nativeCapture.setOnClickListener(view -> NativeSample.message());
binding.anr.setOnClickListener(
view -> {
// Try cause ANR by blocking for 10 seconds.
// By default the SDK sends an event if blocked by at least 5 seconds.
// Keep clicking on the ANR button till you've gotten the "App. isn''t responding" dialog,
// then either click on Wait or Close, at this point you should have seen an event on
// Sentry.
// NOTE: By default it doesn't raise if the debugger is attached. That can also be
// configured.
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});
binding.openSecondActivity.setOnClickListener(
view -> {
// finishing so its completely destroyed
finish();
startActivity(new Intent(this, SecondActivity.class));
});
binding.openSampleFragment.setOnClickListener(
view -> SampleFragment.newInstance().show(getSupportFragmentManager(), null));
binding.openThirdFragment.setOnClickListener(
view -> {
startActivity(new Intent(this, ThirdActivityFragment.class));
});
setContentView(binding.getRoot());
}
@Override
protected void onResume() {
super.onResume();
final ISpan span = Sentry.getSpan();
if (span != null) {
span.finish(SpanStatus.OK);
}
}
}
| 2,566 |
660 | package quick.pager.shop.enums;
/**
* 通用排序枚举
*
* @author siguiyang
* @version 3.0.0
*/
public enum SortEnums implements IEnum<String> {
DESC("DESC", "倒序"),
AES("AES", "升序");
private String code;
private String desc;
SortEnums(String code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public String getCode() {
return this.code;
}
@Override
public String getDesc() {
return this.desc;
}
}
| 233 |
390 | /*
* Copyright 2021 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.tinylog.util;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import org.tinylog.Level;
/**
* This is intended to provide information about which log levels can be logged by a severity level. For example, TRACE is able to log all
* levels, whereas ERROR can log only at the ERROR level and OFF means none of the levels may be logged.
*/
public final class LevelConfiguration {
/**
* List of all severity levels each other levels are "enabled" by them. The other level is enabled if it can be logged. This usually
* means that the other level is also of a higher severity level.
*/
public static final Collection<LevelConfiguration> AVAILABLE_LEVELS = Collections.unmodifiableList(Arrays.asList(
new LevelConfiguration(Level.TRACE, true, true, true, true, true),
new LevelConfiguration(Level.DEBUG, false, true, true, true, true),
new LevelConfiguration(Level.INFO, false, false, true, true, true),
new LevelConfiguration(Level.WARN, false, false, false, true, true),
new LevelConfiguration(Level.ERROR, false, false, false, false, true),
new LevelConfiguration(Level.OFF, false, false, false, false, false)
));
private final Level level;
private final boolean traceEnabled;
private final boolean debugEnabled;
private final boolean infoEnabled;
private final boolean warnEnabled;
private final boolean errorEnabled;
/**
* @param level
* Actual severity level
* @param traceEnabled
* Determines if {@link Level#TRACE TRACE} level is enabled
* @param debugEnabled
* Determines if {@link Level#DEBUG DEBUG} level is enabled
* @param infoEnabled
* Determines if {@link Level#INFO INFO} level is enabled
* @param warnEnabled
* Determines if {@link Level#WARN WARN} level is enabled
* @param errorEnabled
* Determines if {@link Level#ERROR ERROR} level is enabled
*/
public LevelConfiguration(final Level level, final boolean traceEnabled, final boolean debugEnabled, final boolean infoEnabled,
final boolean warnEnabled, final boolean errorEnabled) {
this.level = level;
this.traceEnabled = traceEnabled;
this.debugEnabled = debugEnabled;
this.infoEnabled = infoEnabled;
this.warnEnabled = warnEnabled;
this.errorEnabled = errorEnabled;
}
/** @return the actual severity level */
public Level getLevel() {
return level;
}
/** @return {@code true} if the TRACE level is enabled for the severity {@link #level}, otherwise {@code false} */
public boolean isTraceEnabled() {
return traceEnabled;
}
/** @return {@code true} if the DEBUG level is enabled for the severity {@link #level}, otherwise {@code false} */
public boolean isDebugEnabled() {
return debugEnabled;
}
/** @return {@code true} if the INFO level is enabled for the severity {@link #level}, otherwise {@code false} */
public boolean isInfoEnabled() {
return infoEnabled;
}
/** @return {@code true} if the WARN level is enabled for the severity {@link #level}, otherwise {@code false} */
public boolean isWarnEnabled() {
return warnEnabled;
}
/** @return {@code true} if the ERROR level is enabled for the severity {@link #level}, otherwise {@code false} */
public boolean isErrorEnabled() {
return errorEnabled;
}
/**
* @return a textual representation of the severity level
*/
@Override
public String toString() {
return level.toString();
}
}
| 1,166 |
1,338 | // Mona1ASIC96 (Converted by RBF2VxD)
// ----------------------------------------------------------------------------
//
// Copyright Echo Digital Audio Corporation (c) 1998 - 2004
// All rights reserved
// www.echoaudio.com
//
// Echo Digital Audio does not disclose the source code from which these
// firmware images are derived. Permission is hereby granted for the
// distribution of these firmware images as part of the Linux kernel or
// other GPL project in text or binary
// form as required.
//
// This file is part of Echo Digital Audio's generic driver library.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// ***************************************************************************
// The array is 31146 bytes.
BYTE pbMona1ASIC96[] =
{
0xff,0x04,0x3c,0x2b,0xf9,0xda,0xff,0xd7,
0xfd,0xf5,0xb7,0x75,0x7f,0xfd,0xf5,0xd7,
0xdf,0xde,0xfd,0xed,0xbd,0xf5,0x5b,0xef,
0xd7,0xdf,0xf6,0xfd,0xf5,0xd7,0x5f,0x7f,
0xfd,0x6d,0xdd,0xdf,0xff,0x7f,0xf5,0xff,
0xdd,0xf7,0xdf,0xff,0xff,0xfd,0xf7,0xdf,
0x7f,0xff,0xff,0xf7,0xff,0xfd,0xf7,0x7f,
0xff,0x7d,0xff,0xdf,0xf5,0xdf,0x7f,0xff,
0xfd,0xf7,0xff,0x7d,0xff,0xdd,0xfd,0x93,
0xff,0xff,0xff,0xff,0xff,0xbf,0xff,0xff,
0xff,0xff,0xff,0xff,0xfc,0xff,0xdf,0x3f,
0xff,0xff,0xef,0xff,0xff,0xfc,0xff,0xff,
0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,
0x7f,0xfd,0xff,0xfd,0xf7,0xdf,0x7f,0xff,
0xfd,0xf7,0xdf,0x7f,0xff,0xfd,0xf7,0xdf,
0x7f,0xff,0xf7,0xdf,0x7f,0xff,0xfd,0xf6,
0xdf,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,0xff,
0xfd,0xfe,0xe8,0xff,0xff,0xf9,0xf7,0xdf,
0x7d,0xfe,0xfd,0xf7,0xdf,0x7f,0xf7,0xf9,
0x77,0x9f,0x7d,0xde,0x67,0xdf,0x7f,0xf7,
0xf1,0xf7,0xdf,0x7f,0xff,0xfd,0x77,0x9f,
0x7f,0xff,0xf1,0x27,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xbf,0x3f,0xe8,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,
0xfa,0xff,0xff,0xbf,0xff,0xfe,0xff,0xaf,
0xbf,0xff,0xfa,0xfb,0xff,0xbf,0xfe,0xff,
0xbf,0xff,0xff,0xfa,0xeb,0xff,0xbf,0xfe,
0xfa,0xfb,0xef,0xbf,0xfd,0xff,0xfb,0xff,
0xff,0xd6,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xdf,0x7f,0xff,0xff,
0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xa3,0xee,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,
0xbf,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,
0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xf7,0xff,0xbf,0xfc,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,
0xff,0xff,0xfe,0xff,0xf7,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xff,0xea,0xff,0xff,
0xff,0x3d,0xff,0xdf,0xff,0xff,0xfd,0xff,
0xdf,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xff,0xdf,0x17,0xff,
0xff,0xfe,0xfb,0xed,0xbf,0xff,0xfe,0xfb,
0xef,0xbf,0xff,0xfe,0xf3,0xef,0xbb,0xbf,
0xbb,0xce,0xbf,0xff,0xfe,0xf3,0xef,0xbf,
0xff,0xfe,0xfb,0xaf,0xbf,0xff,0xfe,0xbf,
0xf8,0xff,0xf7,0xdf,0x7f,0xff,0xfd,0xf7,
0xdf,0x7f,0xdf,0xfd,0xf7,0xdd,0x7f,0xdf,
0x7d,0x5f,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,
0xff,0x7d,0xf7,0xdf,0x73,0xff,0xfd,0xf7,
0xff,0xc7,0xff,0xe7,0x9f,0x6f,0x7f,0xf9,
0xe7,0x9b,0x7f,0xee,0xf9,0xe5,0x9b,0x7f,
0xfe,0xd9,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,0xff,0xff,0xff,0xfe,
0xff,0xff,0xbb,0xfb,0xff,0xff,0xff,0xff,
0xff,0x7f,0xbf,0xff,0xff,0xef,0x7f,0xdf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0x7f,0xcd,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,
0xff,0xef,0xfb,0xbf,0x5e,0xfb,0xf5,0xff,
0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0x8f,0xfe,0xff,
0xef,0xff,0xf3,0xff,0xff,0xff,0xfc,0xff,
0xff,0xff,0xbf,0xff,0xff,0xfb,0xff,0xff,
0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xf4,
0xff,0xef,0xbf,0xbf,0xfe,0xfb,0xef,0xaf,
0xff,0xfa,0xfb,0xef,0xbf,0xff,0xfa,0xfb,
0xbb,0xef,0xfe,0xfb,0xaf,0xbb,0xff,0xfe,
0xfb,0xef,0x3f,0xff,0xfe,0xfb,0xef,0xff,
0x8f,0xff,0x2f,0xff,0xff,0xff,0xfb,0xff,
0xff,0xbf,0xff,0xff,0xef,0xfe,0x9f,0xf6,
0xcb,0xbf,0xfd,0xff,0xff,0xfd,0xff,0xff,
0xff,0xff,0xfd,0xff,0xff,0x7e,0xff,0xfd,
0xfe,0x1f,0xfc,0xff,0xff,0xef,0x3f,0xff,
0xff,0x7f,0xff,0xff,0xf7,0xfd,0xff,0xff,
0xf7,0xbb,0xef,0xfb,0xfc,0xfb,0xdf,0xef,
0xff,0xfd,0xfb,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xef,0xe8,0xff,0xf7,0xff,0xff,
0xdf,0xfd,0xff,0xff,0xff,0xff,0x7f,0xf7,
0xff,0xbf,0xf7,0xcf,0xe7,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xff,0x7f,0xff,0xfb,0x57,0xbf,0xff,0xdf,
0xff,0xff,0xfe,0xff,0xff,0xff,0xbf,0xff,
0xff,0xff,0xff,0xbf,0xff,0xbf,0xff,0xfe,
0xbf,0xff,0xfd,0xff,0xff,0xff,0xfb,0xff,
0xff,0xff,0xff,0xff,0xff,0x3f,0xfa,0xfd,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xfd,0xff,0xbf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc9,
0xfb,0xff,0xff,0xff,0xff,0xfd,0xff,0xff,
0xff,0xff,0xff,0xe7,0xff,0x7f,0xfd,0xf5,
0x4f,0xcf,0xfd,0xff,0xdf,0xfd,0xff,0xff,
0xff,0xff,0xf7,0x6f,0xfe,0xff,0xff,0xff,
0x9f,0xfe,0xff,0xff,0xff,0xff,0x7f,0xf7,
0xff,0xff,0xff,0xff,0xff,0xd7,0xff,0xdf,
0xbe,0xfb,0xf5,0xfb,0xff,0xfb,0xbf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,
0xff,0x7f,0xf4,0xfe,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xfd,
0xdf,0x7f,0xff,0xff,0xfe,0xbf,0xff,0xbd,
0xff,0xff,0xbf,0xff,0xff,0xff,0xef,0xbf,
0xff,0x7f,0xff,0x97,0xfb,0xff,0xff,0xff,
0xff,0xfd,0xff,0xff,0xff,0xdf,0xff,0x7f,
0xfe,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0xff,0xff,0xcf,0x7f,0x7f,0xff,0xfd,
0xff,0xff,0xff,0xff,0x5e,0xbd,0xff,0xff,
0xbf,0xff,0xfa,0xff,0xff,0xff,0xff,0xff,
0xff,0xdf,0xff,0xff,0xff,0x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0x94,0xf5,
0xff,0xff,0xff,0x7f,0xfe,0xfc,0xf3,0x9f,
0x3f,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xba,
0xbd,0xff,0xff,0xff,0xbf,0xff,0xfe,0xff,
0xff,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xf7,0x65,0xff,0xf7,0xdf,0x7f,0xff,0xfd,
0xf7,0xdf,0x7f,0xfb,0xfd,0xf7,0xdf,0x7f,
0xff,0xed,0xdf,0x7f,0xff,0xfd,0xf7,0xdf,
0x7f,0xff,0xfd,0xf7,0xdf,0xff,0xff,0xff,
0xff,0xff,0x3e,0xff,0xef,0xfe,0xeb,0xcf,
0x3f,0xfe,0xfa,0xeb,0xaf,0xbf,0xff,0xfe,
0xfb,0xef,0xbf,0xff,0xfb,0xef,0xbf,0xff,
0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xeb,0xbf,
0xff,0xfe,0xfb,0x6f,0xdb,0x2f,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xbf,0x89,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,
0xff,0xff,0xeb,0xff,0xbf,0xfe,0xff,0xff,
0xbf,0xff,0xff,0xfb,0xff,0xff,0xff,0xfe,
0xff,0xff,0xb7,0xff,0xff,0xff,0xbd,0xfe,
0xff,0xff,0xef,0xff,0xf5,0xe6,0xfb,0xef,
0xbf,0xff,0xff,0xff,0xff,0xff,0xfd,0x7f,
0xff,0xff,0xf9,0xff,0x9f,0xff,0xff,0xff,
0xe7,0xff,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fe,0xfb,0xef,0xf7,0xff,0xff,
0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xff,0xbf,0xff,0xff,
0xff,0xf7,0xff,0xbf,0xff,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xfe,
0xfb,0xff,0xff,0xce,0xff,0x7f,0xfd,0xd5,
0x97,0x5f,0x7f,0xf5,0xe5,0x97,0x5e,0x7f,
0xed,0xe5,0x97,0x5f,0xed,0xf4,0xd7,0x5f,
0x7b,0xf9,0xf5,0xd7,0x5f,0x7f,0xfd,0xf5,
0x57,0x5f,0x7f,0xfd,0x1f,0xfe,0xff,0xfc,
0xfb,0x8f,0xff,0xff,0xff,0xff,0xef,0xff,
0xfe,0xfc,0xf3,0xbf,0xbe,0xfb,0xe3,0x7f,
0x3f,0xff,0xff,0xf3,0xcf,0xf7,0xfe,0xfc,
0xf3,0xff,0xff,0xff,0xdc,0xff,0xe3,0xff,
0x7c,0xfb,0x3d,0xaf,0xbf,0xff,0xfb,0xef,
0xff,0xff,0xbc,0xf7,0xfd,0xff,0xdd,0xf6,
0xef,0xff,0xfc,0xfe,0xcf,0xd7,0xf7,0xbf,
0xf3,0xce,0xef,0xff,0xff,0xf3,0xfe,0xa1,
0xff,0xdf,0x7f,0xff,0xff,0xff,0xff,0xff,
0xff,0xfd,0xff,0xbf,0x77,0xff,0xff,0xff,
0xef,0xfe,0xff,0xff,0xf7,0xff,0xff,0xfd,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x7f,0xfc,0xff,0xff,0xfd,0xf7,0x5f,0x6f,
0xff,0xf5,0xd7,0xff,0x7f,0xfd,0xff,0xf7,
0x5f,0xff,0xff,0xd6,0x7f,0x6f,0x7d,0xf1,
0xd7,0x5f,0xff,0xfd,0xf5,0xfe,0xff,0xf7,
0xff,0x7f,0xc7,0xff,0xff,0xbf,0xff,0xfe,
0xfb,0xef,0x7f,0xef,0x7e,0xbf,0xee,0xff,
0xff,0xfd,0xeb,0xf3,0xbf,0x7d,0xff,0xde,
0xdf,0x77,0xfe,0xf6,0xfb,0x9f,0xff,0xbf,
0xff,0xff,0xff,0x5f,0xee,0xff,0xfd,0xf7,
0x7f,0xb7,0xff,0x75,0xdf,0xdd,0x7f,0xdd,
0xff,0xff,0x7f,0xf3,0x9d,0xdf,0xef,0xf7,
0xdf,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xef,0xff,0x9f,0xb3,0xff,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfe,0xf7,0xdf,0xfe,0xff,
0xdf,0xe7,0xff,0xff,0xff,0xff,0xf3,0xff,
0x7f,0xff,0xff,0xfd,0xff,0xff,0xd9,0xff,
0xfe,0xff,0xfb,0xaf,0xdf,0xff,0xff,0xff,
0xf7,0xff,0xfe,0xfd,0xff,0xff,0xff,0xff,
0xef,0xff,0xbf,0xff,0xee,0xff,0xff,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,
0xfc,0x3f,0xff,0xbc,0xfd,0xcf,0x9f,0xff,
0xf5,0xfb,0xcf,0x3b,0x7f,0xbc,0xd3,0xcf,
0xbf,0xf4,0xe3,0xcf,0x3b,0xfe,0xfc,0xf3,
0xdf,0x3d,0xff,0xbe,0xff,0xff,0xff,0xff,
0xfe,0xf3,0xff,0xfb,0xef,0xff,0xff,0xfd,
0xfd,0xdb,0xdf,0x7f,0xfe,0xfb,0xef,0xaf,
0x7f,0xfe,0xef,0xff,0xfe,0xfe,0xfb,0xef,
0xbf,0xff,0xfe,0xfb,0xf7,0xef,0xfd,0xff,
0xff,0xff,0x9b,0xed,0xdf,0x7f,0xfd,0xfb,
0xf7,0xff,0xbf,0xfe,0xff,0xef,0xdf,0x7f,
0xee,0xed,0xbf,0x7f,0xf6,0xfa,0xc7,0xff,
0x7f,0xfc,0xf9,0xef,0x1f,0xff,0xfe,0xff,
0xee,0x7f,0xff,0xbf,0xfd,0xfe,0xfd,0xff,
0xff,0xff,0xef,0xff,0xf5,0xfb,0xff,0xff,
0xff,0xf3,0xdf,0xef,0xfb,0xf5,0xd7,0x5f,
0xbf,0xff,0xf5,0xd7,0x5f,0x7f,0xfd,0xf5,
0xff,0x7f,0xff,0xff,0xff,0xe4,0xfb,0xb7,
0xff,0xbf,0xff,0xff,0xff,0xff,0xfe,0xff,
0xfe,0xff,0xdf,0x7f,0xff,0xff,0xef,0xff,
0xff,0xfe,0xff,0xef,0x9f,0x7b,0xfe,0xfb,
0xef,0xff,0xff,0xfa,0xff,0xff,0x7f,0xfc,
0xff,0xaf,0xbf,0x7e,0x7e,0xff,0xfd,0xff,
0xdf,0xff,0xeb,0xff,0xff,0xff,0xff,0xff,
0xff,0x9f,0xfc,0xeb,0xfd,0xff,0xcf,0xff,
0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0x4f,
0x5a,0xff,0x7f,0xfd,0xf5,0xf3,0xfd,0xef,
0xff,0xff,0xfe,0x9f,0x7f,0xfd,0xff,0xff,
0xff,0xfd,0xff,0xe6,0x9f,0xff,0xff,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,
0xaf,0xdb,0xfb,0xff,0xff,0xff,0xfb,0xff,
0xff,0xff,0xfe,0xff,0xef,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xff,0xff,0x7f,0xff,
0xff,0xff,0xef,0xff,0xff,0xff,0xfb,0xef,
0xff,0x7f,0xbf,0xf6,0x7f,0xff,0xfd,0xb7,
0xff,0xff,0xff,0xed,0xff,0xdf,0x7e,0xff,
0xfd,0xf7,0xdf,0x7e,0xfd,0xff,0xdf,0xff,
0xff,0xfd,0xf7,0x5f,0x7f,0xff,0xfd,0xbf,
0xff,0xfe,0xff,0xef,0xf5,0xff,0xaf,0xbf,
0xfe,0xfa,0xef,0xbf,0xbf,0xff,0xfb,0xfb,
0xaf,0xbf,0xfe,0xfa,0xfb,0xbf,0xfe,0xfb,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xff,0xff,
0xff,0xf9,0xbf,0xff,0xff,0xff,0xff,0xff,
0xbf,0xe0,0xff,0xf3,0xf7,0x5b,0xff,0xfc,
0xff,0xcf,0xff,0xff,0xbe,0xf3,0xf7,0xf7,
0x7f,0xff,0xcf,0x7f,0xfd,0xff,0xd7,0xc7,
0x3f,0x7f,0xfd,0xf3,0xff,0x3f,0xfe,0xff,
0xff,0xff,0x57,0xff,0x9f,0xff,0xef,0xf7,
0xdf,0xff,0xdf,0xfd,0xff,0xf7,0xff,0xfe,
0x7f,0xff,0xff,0x17,0xdd,0xfb,0xff,0x7f,
0x7f,0xfe,0xf7,0xbf,0x9f,0xff,0x7f,0xef,
0xff,0xff,0xff,0xbf,0xf9,0xfe,0xfb,0xff,
0x7f,0x7f,0xdf,0x7f,0xd7,0xfd,0xdb,0xff,
0xf5,0xef,0xff,0xdf,0xfd,0xdf,0xff,0xff,
0xfd,0xf2,0xff,0x5d,0xf7,0xff,0xf3,0xff,
0x3f,0xef,0xff,0xf7,0xff,0x81,0xef,0xdf,
0x7f,0xef,0xff,0xff,0xff,0xff,0xff,0xbd,
0xef,0xff,0x3f,0xff,0xf7,0xff,0xff,0x7f,
0xfd,0x7f,0xdf,0xff,0xbf,0xff,0xff,0xdf,
0xff,0xff,0xfd,0xff,0xff,0xff,0x57,0xbe,
0xbf,0xfe,0xeb,0xff,0xff,0xf6,0xff,0xff,
0xaf,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,
0xef,0xff,0xff,0x7f,0x7f,0x7f,0xff,0xff,
0xbf,0xfe,0xff,0xab,0xff,0xfe,0xff,0x7f,
0xc6,0xff,0xff,0xff,0xff,0xff,0x97,0x5f,
0x7e,0xff,0xff,0x3f,0xff,0xfa,0xdf,0xcd,
0xf7,0x7b,0xfe,0xcf,0x37,0x5f,0xfe,0xf3,
0xff,0x27,0xff,0x7a,0xff,0xcf,0xbf,0xfe,
0xff,0xbe,0xf5,0xff,0xe7,0xff,0xff,0xbf,
0xf5,0xd7,0xff,0xff,0xff,0xf5,0xd7,0x5f,
0x6e,0xfd,0xfc,0xff,0x7f,0xfd,0xf9,0xf2,
0x5f,0x7f,0xdd,0xff,0xe7,0xff,0xff,0xff,
0xf9,0xff,0x7a,0xbd,0xff,0xff,0xef,0xff,
0xff,0xff,0xf7,0xdf,0xbf,0xff,0xff,0xff,
0xef,0xf7,0xff,0xfd,0xdf,0xd7,0xff,0xfd,
0xff,0xff,0xff,0xff,0xff,0xfb,0xdf,0xff,
0xff,0xff,0x3f,0xf7,0x6e,0xff,0xf7,0xdf,
0xff,0xff,0xff,0xff,0xff,0x7f,0xfb,0xff,
0xff,0xdf,0xbe,0xff,0xff,0xff,0x37,0xfe,
0xff,0xff,0xdf,0xff,0xff,0xff,0xd7,0xff,
0x7f,0xff,0xff,0xff,0xfd,0x36,0xff,0xff,
0xfa,0xe3,0xbf,0xff,0xfe,0xfb,0xef,0xaf,
0xff,0xfe,0xfb,0xfb,0xbd,0xff,0xbe,0x6f,
0xaf,0xff,0xfe,0xfb,0xeb,0xbf,0xff,0xfe,
0xfa,0xef,0xaf,0xff,0xfe,0xdb,0x4f,0xdb,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xef,0xfe,0xff,
0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb7,
0x99,0xff,0xff,0xff,0xff,0xbf,0xfe,0xff,
0xff,0xff,0xff,0x5f,0xfe,0xf9,0x7f,0xf7,
0xff,0xff,0x7d,0xfd,0xdf,0x7e,0xff,0xff,
0xbf,0xfe,0xff,0xff,0xfd,0xff,0xdf,0xff,
0xbf,0x1d,0xfe,0xff,0xfb,0x6f,0x3d,0xfc,
0xfc,0xc3,0xcf,0xbf,0xff,0xfd,0xc3,0xff,
0x7b,0xfd,0x74,0x1f,0xab,0xff,0xe5,0xf7,
0xef,0x3f,0xfd,0xd4,0xfb,0x1f,0xbf,0xff,
0xd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d,0xff,0xff,0xff,0x3f,0xfb,0xff,0xef,
0xbe,0xff,0xfe,0xbb,0xff,0xff,0xff,0xf7,
0xfb,0x7f,0xbf,0x2f,0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,
0xff,0xff,0xff,0xff,0x7f,0xff,0xc4,0x7f,
0x7f,0xfd,0xb4,0xd7,0x5f,0x7d,0xed,0xb5,
0x57,0x4f,0x7f,0xf5,0xf5,0x56,0x5f,0xff,
0xd5,0xd7,0x5f,0x7f,0xfd,0xf5,0xd7,0x5f,
0x3d,0xf9,0xa5,0xd7,0x5e,0x7f,0xfd,0x4f,
0xfe,0xff,0x7c,0xff,0xce,0xbf,0xff,0xfc,
0xff,0x4f,0xbd,0xfe,0x5f,0xf3,0xdf,0xb6,
0xfb,0xff,0xcf,0xff,0xfe,0xfa,0xff,0xff,
0xff,0xff,0xff,0xf3,0xcf,0xff,0xff,0xfc,
0xff,0xe5,0xff,0xfc,0xff,0xbe,0xff,0xf9,
0xfd,0xfd,0x5f,0xff,0xff,0xfe,0xf7,0xbf,
0xff,0xbf,0xfb,0x2f,0xff,0xbf,0x77,0xff,
0xff,0xff,0xff,0xff,0xdf,0xbf,0xff,0xff,
0xfd,0xfe,0x9d,0xff,0xbf,0xfd,0xff,0xfd,
0xff,0xbf,0xff,0xff,0xff,0xf7,0xff,0xff,
0xfe,0xff,0x6f,0xef,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xbf,0xff,0xfb,
0xff,0xbf,0xff,0x3f,0xf8,0x7f,0xfd,0xff,
0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,
0xef,0x7f,0xf7,0xff,0xf7,0x7f,0xfd,0xdf,
0xd7,0xff,0xff,0xff,0x7f,0xe4,0xff,0xeb,
0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,
0xbf,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,
0xb9,0xff,0xfe,0xff,0xff,0xff,0xbf,0xe7,
0xfe,0xff,0x6e,0xbf,0xff,0xff,0x07,0xfe,
0xff,0xff,0xfb,0xff,0xff,0xfd,0xff,0xff,
0x7f,0xff,0xff,0xff,0xdf,0xff,0x7f,0xdd,
0xef,0x7f,0xff,0xfd,0x7f,0xff,0x5f,0xff,
0xff,0xff,0xdf,0xfd,0xff,0xff,0xff,0x1f,
0xfa,0xff,0xff,0xff,0xfd,0xff,0xff,0xdf,
0xff,0xff,0xfe,0x7f,0xff,0xff,0xff,0xff,
0xff,0xfe,0xf7,0xff,0xf7,0xff,0xdf,0xff,
0xdf,0xff,0xff,0xdf,0xff,0xed,0xff,0xff,
0xff,0xd5,0xbf,0xff,0xfb,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xbe,0x7f,0xfb,0xff,
0xff,0xfe,0xff,0xef,0xff,0xff,0xff,0xfe,
0xff,0xff,0xff,0x7b,0xfe,0xff,0xff,0xff,
0xff,0xff,0xef,0xfe,0x3f,0xff,0xff,0xf7,
0xcf,0xff,0xff,0xff,0xf3,0xcf,0x3f,0xff,
0xfc,0xf3,0xff,0xbf,0xff,0xff,0xcf,0x2f,
0xfa,0xff,0xe3,0xc6,0x3f,0xff,0xfe,0xfd,
0xff,0xff,0xff,0x7f,0xf1,0xff,0xfb,0xff,
0xfe,0xfe,0xfe,0xff,0xff,0x5f,0xff,0xde,
0xfb,0xef,0x7f,0xff,0xdf,0xff,0xff,0xef,
0xfe,0xfb,0xff,0xbf,0xff,0xfd,0xfb,0xf7,
0xff,0xff,0xff,0xff,0xff,0xab,0xfb,0x8f,
0xf7,0xff,0x6f,0xe3,0xaf,0xff,0xff,0xf7,
0xe3,0xdf,0x7f,0xff,0xf5,0xff,0xbf,0xfe,
0xd7,0xe7,0xff,0xf7,0xff,0xf7,0xf7,0xdf,
0xbf,0xfe,0xff,0xfe,0xff,0xff,0x9f,0xdd,
0x7f,0xfd,0x7f,0xff,0x5f,0x7f,0xfd,0xf7,
0xff,0x5d,0xff,0xff,0xff,0xff,0xff,0xfb,
0x74,0xdf,0x7f,0xfb,0xff,0xff,0xff,0xff,
0xff,0xff,0x66,0xff,0xff,0xff,0xdf,0xff,
0xe5,0xff,0xff,0xff,0xff,0xfb,0x7f,0xbf,
0xb7,0xfe,0xff,0xff,0xff,0xff,0xff,0x7f,
0xef,0xff,0xfd,0x7e,0xfc,0xff,0xff,0xd7,
0x7f,0xef,0xff,0xbf,0xff,0xff,0xef,0xff,
0xff,0x27,0xfc,0xff,0xe7,0xb7,0xde,0xff,
0xff,0xaf,0x9f,0x9f,0x3f,0xf3,0xaf,0xf3,
0xdf,0x7f,0xeb,0x37,0xff,0xff,0xf3,0xad,
0x37,0xdf,0x74,0xff,0xff,0x37,0xdf,0x7a,
0xf3,0xfd,0x8f,0x58,0xff,0x7f,0xde,0x75,
0xff,0xff,0x7f,0xfd,0xf5,0xff,0xcd,0x7f,
0xdd,0x79,0xfd,0x5b,0xbd,0xfc,0xff,0xcf,
0x6f,0xbe,0xf5,0x97,0xff,0xff,0xbf,0xf9,
0xd6,0xfb,0xef,0xaf,0xdd,0xfb,0xff,0xff,
0xff,0xff,0xff,0xbf,0xff,0xfe,0xf7,0xff,
0xff,0xff,0x7f,0xfd,0xff,0xff,0xff,0xfb,
0xff,0xff,0xff,0xff,0xf7,0xdd,0xff,0xff,
0xff,0xff,0xff,0xff,0x7f,0xcf,0xf6,0x7f,
0xff,0xff,0xff,0xdf,0x7f,0xfb,0xfd,0xff,
0xdf,0x7f,0xff,0x7d,0xeb,0xff,0xff,0xff,
0xf7,0xdf,0xff,0xff,0xff,0xff,0xef,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0x6f,0xf7,
0xff,0xaf,0xff,0xfe,0xfb,0xeb,0xef,0x3f,
0xfe,0xfb,0xfb,0xaf,0xbf,0xf7,0xfb,0xef,
0xfb,0xfe,0xf8,0xfb,0xbf,0xff,0xfe,0x7b,
0xef,0xaf,0xff,0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xeb,0xff,0xff,
0xdf,0xdf,0xf9,0xbf,0xff,0xfe,0xff,0xff,
0xef,0xff,0xfe,0xff,0x36,0xff,0xbf,0xff,
0xff,0xff,0xbf,0x5f,0xfa,0xff,0xff,0xfe,
0xff,0xff,0xff,0xfd,0xfe,0xff,0xff,0xfe,
0xf7,0xff,0xfd,0x3b,0xf7,0xf2,0xff,0xfd,
0xdf,0xfc,0xf3,0xff,0xff,0xff,0xff,0xf3,
0xcf,0x3f,0xff,0xfc,0xff,0xc5,0xff,0xf7,
0xff,0xdf,0xff,0xfd,0xff,0x7f,0xff,0xff,
0xf5,0xc7,0x1f,0xff,0xff,0xff,0xfe,0x7f,
0xdf,0xf4,0xfd,0xff,0xff,0xf7,0xff,0xe7,
0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xfe,
0xff,0xfe,0xbf,0xff,0xbf,0xf6,0xff,0xff,
0xff,0x9e,0xbf,0xff,0xfe,0xff,0xfe,0xff,
0xbf,0xdf,0x7f,0xff,0xef,0xff,0xff,0xff,
0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xf3,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,
0xf5,0xf7,0xff,0xdf,0xff,0xff,0xff,0xff,
0xf7,0xff,0xf7,0x7f,0xff,0xff,0xbe,0xff,
0xff,0xff,0x73,0xff,0xff,0xf7,0xff,0xff,
0xff,0xbf,0xff,0xff,0xff,0xff,0xff,0x7e,
0xff,0xff,0xfd,0xff,0xbf,0xff,0xf9,0xff,
0xdf,0xff,0xef,0xff,0xdf,0xdf,0xff,0xff,
0xfd,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x5f,0xfc,0xff,0xff,0xff,0xff,
0xff,0xfd,0xf7,0xff,0x7e,0xf7,0xbb,0xb7,
0xff,0x7f,0xff,0xa7,0xff,0x7a,0xff,0xbf,
0xb7,0xff,0xff,0xff,0xbd,0xff,0xff,0x7f,
0xff,0xff,0xff,0xee,0xe0,0xff,0xf7,0xdf,
0xff,0xff,0xf8,0xe3,0xef,0xff,0xbf,0xff,
0xe3,0xff,0x3f,0x6f,0xbe,0xf3,0xff,0xff,
0xf8,0xc3,0x87,0x1f,0x6e,0xf8,0xdf,0xff,
0xfe,0xff,0xff,0xf3,0xff,0x67,0xff,0x7f,
0xff,0xbe,0xff,0xef,0xff,0x7e,0xff,0xff,
0xff,0xff,0xfe,0xff,0xed,0xf7,0xdf,0xff,
0xff,0xef,0xff,0xfe,0xfd,0xef,0xdf,0xfd,
0xff,0xff,0xff,0xff,0xdf,0xfe,0x7f,0xfa,
0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xaf,0xff,0xec,0xbb,0xef,0xff,0xff,0xff,
0xdd,0xbe,0xbf,0xf6,0xf7,0xfe,0xff,0xff,
0xff,0xe7,0xed,0xff,0xff,0xff,0xe7,0xff,
0x95,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,
0x7f,0xff,0xf5,0xf3,0xcf,0x3f,0xfe,0xff,
0xff,0x6f,0xff,0xfc,0xf6,0xfe,0xff,0xff,
0xbf,0xff,0xff,0xfb,0xfb,0xef,0xbf,0xff,
0xff,0x37,0xfe,0xff,0xfb,0xfb,0xff,0xfe,
0xfe,0xff,0xfb,0xf7,0xdf,0x7f,0x7f,0xfd,
0xff,0xff,0xff,0xfb,0xef,0xbf,0xff,0xff,
0xff,0xbf,0xff,0xff,0xfb,0xfe,0xff,0xff,
0xff,0xff,0xff,0xc1,0x9f,0xdf,0xff,0xf9,
0xe5,0xf7,0xff,0x3f,0xff,0xff,0xff,0xff,
0x3f,0xff,0xfd,0xff,0xff,0xf9,0xfd,0xef,
0xbf,0xff,0xd9,0xe7,0xaf,0x7c,0xfe,0xff,
0xff,0xef,0xff,0xff,0xb0,0xf5,0xf9,0xff,
0x5f,0x7f,0xde,0xff,0xff,0x9b,0xfc,0xff,
0xff,0xff,0xfb,0xf7,0xff,0xdf,0x5f,0xf7,
0xff,0xff,0xff,0xcf,0x38,0xff,0xe5,0xf3,
0xff,0x7f,0xfe,0xff,0xff,0x7a,0xbd,0xff,
0xf7,0xff,0x7f,0xff,0xff,0xff,0xef,0x9f,
0xff,0xfe,0xff,0xef,0xff,0xff,0xff,0xef,
0xff,0xff,0xfe,0xfb,0xef,0x97,0xff,0x7e,
0xfb,0xef,0xff,0xff,0xff,0xff,0xf7,0x6e,
0xff,0xff,0xdf,0xff,0xff,0xff,0xf7,0xdf,
0x3e,0xfb,0xed,0xf7,0xdf,0xfe,0xff,0xff,
0xd7,0xfe,0xff,0xed,0xbf,0xff,0xbf,0xfc,
0xf7,0xb3,0x7f,0xff,0xff,0xff,0xff,0xff,
0x16,0xdf,0xff,0xfb,0xeb,0xbf,0xff,0xfe,
0xfa,0xfb,0xa7,0xbb,0xfe,0xfa,0xfb,0xbf,
0xff,0xfe,0xeb,0xbf,0xbf,0xfe,0xfb,0xf7,
0xf5,0xff,0xfe,0xfa,0xef,0xbf,0xff,0xfe,
0xfb,0x3f,0xd8,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xef,0xc6,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xaf,0xfe,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xbf,0x9b,0xff,0x7f,0xf9,0xff,
0x9f,0xff,0xff,0xfb,0xff,0xfd,0xff,0xff,
0xff,0xff,0x97,0x3f,0xee,0xef,0xff,0xff,
0x7f,0xff,0x7f,0xfd,0x9f,0xff,0xff,0xfd,
0xff,0xdf,0x7f,0xff,0x77,0xfe,0xff,0xc7,
0xef,0x3f,0xfc,0xfc,0x1b,0xff,0xbb,0xff,
0xfe,0xfb,0x3f,0x7f,0xff,0xfc,0x6f,0x3e,
0xfc,0xfe,0xff,0xff,0xeb,0xff,0xff,0xfb,
0xff,0xbf,0xf5,0xff,0xff,0xff,0xf3,0xff,
0xef,0xbf,0xff,0xfe,0xfb,0x6f,0xbf,0xf9,
0xe6,0xdb,0xee,0xbf,0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xff,0xff,0xff,0xff,0xee,
0xff,0xff,0xff,0xff,0xfb,0xff,0xbf,0xff,
0xfe,0xff,0xf6,0x7f,0xff,0xff,0xff,0xef,
0xff,0x5d,0xff,0x7d,0xf5,0xd5,0xd7,0x5f,
0x7d,0xfd,0xf5,0xd7,0x5f,0x7f,0xf9,0xc5,
0x97,0x5f,0xed,0xe5,0x97,0x5f,0x7f,0xfd,
0xb5,0x57,0x5f,0x6f,0xfd,0xf5,0xd7,0x5f,
0x7f,0xed,0x3b,0xde,0xff,0xfb,0xf3,0xcf,
0x3f,0xff,0xff,0xf3,0xcf,0x3f,0xff,0x7f,
0xf3,0x9f,0xff,0xfb,0xf3,0xbf,0x3f,0xff,
0xfe,0xff,0xff,0xff,0xbf,0xfc,0xe7,0x8f,
0xff,0xff,0xfe,0x7f,0xe3,0xff,0xff,0xcf,
0x7f,0xff,0xfd,0xff,0xfb,0xff,0xff,0x7f,
0xff,0xff,0xdd,0xff,0xff,0xfe,0xf7,0xf5,
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,
0xdf,0xff,0xff,0xff,0xff,0xb1,0xff,0xff,
0xff,0xff,0xfe,0x7b,0xff,0x3f,0xff,0xfc,
0xf3,0xff,0x3f,0xff,0xff,0xff,0x2c,0xbf,
0xdf,0xf0,0xbd,0xff,0xff,0x7f,0xfe,0xcd,
0xf7,0xfb,0xfd,0xff,0xdf,0xff,0x3f,0xec,
0xff,0xff,0xf7,0xff,0xff,0xef,0xf7,0xfe,
0xff,0xfb,0xff,0xbf,0xf7,0xff,0xff,0xff,
0xff,0xfd,0x7f,0xdf,0x9f,0xff,0xff,0xff,
0x5f,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
0xea,0xff,0xff,0xef,0xff,0xef,0xff,0xff,
0xff,0xff,0xef,0xff,0xff,0xeb,0xff,0xef,
0xbf,0xff,0xdf,0xbb,0xbf,0xff,0xff,0xf7,
0xbf,0xff,0x7d,0xfb,0xfb,0xff,0xff,0xff,
0xff,0x17,0xff,0xff,0xff,0xdf,0xff,0xff,
0xff,0xff,0xff,0xbf,0xff,0xfd,0xfb,0xff,
0xff,0xff,0xdf,0xff,0xff,0xf7,0xff,0xff,
0xaf,0xf7,0x3f,0xdf,0xff,0xff,0xbf,0xff,
0xff,0xff,0xbf,0xf9,0xff,0xff,0xff,0xff,
0xff,0xff,0xf7,0xfd,0xff,0xff,0xff,0xbf,
0xff,0xff,0xfe,0xff,0xde,0xff,0xfe,0xf7,
0xf7,0xff,0xcf,0xfd,0xf7,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xc5,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xbf,
0xff,0xfb,0xff,0xff,0xdf,0xee,0xff,0xff,
0xde,0xff,0xfb,0xdb,0xcd,0xff,0x7f,0xee,
0xff,0xff,0xff,0xff,0xff,0xef,0xfe,0x3f,
0x7e,0xff,0xff,0xcf,0xff,0xff,0xfc,0xfb,
0xff,0xff,0x7f,0xff,0xfd,0xdf,0xbf,0xdf,
0xe8,0xfe,0x2f,0xf7,0xff,0xf7,0xff,0x0f,
0xbe,0xf8,0xff,0xff,0xff,0xff,0x7f,0xf1,
0xff,0xf7,0xff,0xfd,0xff,0xfd,0xff,0xdf,
0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,
0xff,0xff,0xef,0xff,0xad,0xff,0xbf,0xef,
0xaf,0xf7,0xef,0xff,0xf7,0xff,0xff,0xff,
0xb3,0xff,0x2f,0xbf,0xfe,0xfb,0xf7,0xaf,
0x7f,0xff,0xfa,0xff,0xff,0xfb,0xfe,0xf7,
0xff,0xdd,0xbd,0xfb,0xff,0x7f,0xff,0xfb,
0xff,0xdf,0xbf,0xff,0xfe,0xf7,0xbf,0xfe,
0xff,0x3f,0xf8,0x7f,0xfd,0xf5,0x8f,0xff,
0x7f,0xfd,0xff,0xd7,0xf7,0xbf,0xff,0xe7,
0xff,0xfe,0xfb,0xfe,0xdf,0xff,0xff,0xff,
0xbf,0xd6,0xff,0x7f,0xec,0xa5,0xf9,0xfe,
0xff,0xfb,0x7f,0xe9,0xff,0xff,0xff,0x7f,
0xff,0xef,0xfd,0xff,0xff,0xfb,0xef,0xff,
0xcf,0xff,0xf7,0xef,0xff,0xbf,0xfe,0xaf,
0xbf,0xff,0xff,0xff,0xef,0xff,0xee,0xfe,
0xff,0xef,0xff,0xff,0x77,0xfc,0xff,0xcf,
0x3f,0x7f,0x7e,0xd3,0xff,0xff,0xff,0xff,
0xf9,0xab,0xbf,0xfe,0x7f,0xff,0x9f,0xdf,
0xff,0xfe,0xff,0xff,0xff,0x7f,0xde,0x67,
0xaf,0xfe,0xff,0xff,0xff,0x8f,0x5b,0xff,
0xff,0xff,0xff,0xe7,0xfb,0xfe,0xff,0xff,
0xff,0xcf,0x7f,0xfe,0xf9,0xff,0xfd,0xfd,
0x7c,0xff,0xff,0x3f,0xff,0xff,0xff,0x9b,
0x3e,0xe3,0xf5,0xff,0x5f,0xff,0xaf,0xc9,
0xfb,0xbf,0xff,0xfe,0xfb,0xff,0xb7,0xff,
0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,
0xff,0x4f,0xed,0xff,0xff,0xff,0x2f,0xfd,
0xff,0xbf,0x5f,0xfe,0xff,0xff,0xff,0x7f,
0x0f,0xf6,0x7f,0xff,0xf5,0xd7,0xff,0x3f,
0xfb,0xff,0xf7,0xff,0xff,0xff,0xfd,0xff,
0xff,0x7f,0x7f,0xeb,0xff,0xff,0xff,0xff,
0xe3,0xff,0x77,0xfd,0xf2,0xff,0xff,0xff,
0xff,0x6f,0xf4,0xff,0x8f,0xbf,0xff,0xfa,
0xef,0xad,0xff,0xfe,0xfe,0xff,0xbf,0x3f,
0xff,0xfb,0xef,0xff,0xf6,0xfb,0xef,0xbf,
0xff,0xfe,0xfa,0x6f,0xad,0xd7,0xfe,0xfb,
0xef,0xbf,0xff,0x8b,0xfd,0xff,0xff,0xff,
0xff,0xff,0xef,0xfe,0xff,0xff,0xff,0x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0xfd,0xf7,0xdf,0xff,0x9f,0xf8,
0xff,0xff,0xff,0xff,0xff,0xbf,0xff,0xff,
0xff,0xff,0xbf,0xff,0xfd,0xbf,0xff,0xfe,
0xf4,0xff,0x7f,0xff,0xff,0xf7,0xbf,0xff,
0xff,0xff,0xff,0xdb,0x7d,0xff,0xfd,0xbf,
0xc3,0xb7,0xf7,0x5f,0x7f,0xff,0xff,0xd6,
0xff,0xf7,0xff,0xf5,0xff,0xfb,0xdf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0x7f,
0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0x3f,0xbe,0xff,0xfe,0x77,0xdf,0xff,
0xff,0xfe,0xbf,0x7f,0x9f,0xff,0xff,0xff,
0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xbf,
0xff,0xef,0xfb,0xfe,0xaf,0xff,0xff,0xff,
0xfb,0xf7,0x7f,0xf3,0xff,0xff,0xf7,0xff,
0xf7,0x6f,0xfd,0xff,0xff,0xff,0xfb,0xff,
0xdf,0x7f,0xfd,0xfd,0xdd,0xfe,0xff,0xfd,
0x57,0xff,0xdf,0xff,0xff,0xff,0xcf,0x35,
0xff,0xfc,0xff,0xff,0xbf,0xef,0xff,0xfd,
0xdd,0xff,0xff,0xff,0xff,0xef,0x67,0xff,
0x7f,0xbf,0xff,0xde,0xfb,0xaf,0xff,0xff,
0x7b,0xef,0xbf,0xfe,0xff,0x6b,0xff,0xbf,
0xfc,0xce,0xff,0xef,0xff,0xbf,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfe,
0xff,0xbf,0xff,0xe7,0x9f,0x7f,0xfe,0xe6,
0xff,0x7b,0xfe,0xf9,0xff,0x7f,0xff,0xdb,
0xf7,0x7f,0xdf,0xff,0xff,0xfd,0xff,0xe6,
0xff,0xf3,0xc7,0x1f,0xff,0xfc,0xf3,0xcf,
0xff,0xff,0xfc,0xd3,0xcf,0x2f,0xff,0xfc,
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0xff,0xfd,0xff,0xff,0xff,0xdf,0xfe,0xff,
0xfd,0xef,0xfd,0xff,0xf7,0xdf,0xdf,0xf7,
0xff,0xfd,0xff,0xdf,0x7f,0xf7,0xff,0x7f,
0xef,0xbd,0xf7,0xff,0xff,0x3f,0xfb,0xff,
0xdf,0xff,0xff,0xff,0xff,0xbf,0xeb,0xff,
0xfd,0xff,0xff,0xeb,0xff,0xff,0xf7,0xff,
0x6f,0xff,0xff,0xbf,0xdf,0xff,0xf7,0xfd,
0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,
0xff,0xff,0xff,0xfd,0xff,0x9f,0xff,0xff,
0xfb,0x7f,0xff,0x7f,0xff,0xfe,0xff,0xff,
0xff,0x7b,0xfb,0xbf,0xff,0xff,0xff,0xf7,
0xfe,0xff,0xff,0xfd,0xff,0xde,0xff,0xff,
0xff,0xfe,0xff,0xff,0xfa,0xf7,0xff,0x3f,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,
0x87,0x1f,0xff,0xf3,0xfb,0xbf,0xff,0xdc,
0xf1,0x0f,0xef,0xff,0xff,0xff,0xaf,0xff,
0xff,0x7f,0xf6,0xff,0xff,0xff,0xef,0xfe,
0xff,0xfb,0xff,0xff,0xef,0xff,0xff,0xff,
0xff,0xff,0xfb,0xff,0xa7,0xbf,0xff,0xfc,
0xef,0xbf,0xff,0x7e,0xfe,0xff,0xef,0xff,
0xff,0xff,0xff,0xab,0xef,0xff,0xff,0xff,
0x77,0xff,0x17,0xff,0xfe,0xfb,0xff,0xff,
0xdf,0x7c,0xff,0x7d,0xf7,0xff,0xfd,0xff,
0xff,0x7f,0x7e,0xdd,0xff,0x7f,0xdf,0xff,
0xd7,0xff,0xfb,0xff,0xdf,0xf8,0xfe,0xff,
0xff,0xff,0xff,0xff,0xff,0xf7,0xdf,0xff,
0xff,0xfd,0xf1,0xff,0xff,0xff,0xbf,0xff,
0xfe,0xfb,0xff,0xf6,0xdf,0xff,0xff,0xff,
0xff,0xff,0xef,0xef,0xff,0x7f,0xe9,0xfb,
0xff,0xff,0xff,0xff,0x7f,0xfb,0xaf,0xbf,
0xfe,0xef,0xef,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xc7,0x7f,0xff,0xbf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x77,
0xfd,0xff,0xff,0xff,0x5f,0xfe,0xff,0xfc,
0xef,0xff,0x7a,0xff,0xff,0xbf,0xfe,0xfa,
0xaa,0xbf,0xfe,0xfa,0xeb,0xfb,0xff,0xff,
0xff,0xcb,0xff,0xbf,0xfe,0xfa,0xf9,0xff,
0xcf,0x59,0xff,0xff,0xff,0x7f,0xd7,0xff,
0xf7,0xf3,0x9f,0xd7,0xff,0xff,0x7f,0xf9,
0xe7,0x9f,0xff,0xf5,0xe7,0x9f,0xff,0xff,
0xff,0xff,0x9f,0x78,0xfd,0xf9,0xe7,0xcf,
0xff,0xaf,0xcf,0xfb,0xbf,0xff,0xff,0xff,
0xff,0xff,0xff,0xaf,0xff,0xdf,0xff,0xeb,
0xff,0xff,0xff,0xff,0x2f,0xf9,0xff,0xff,
0x7f,0xff,0xfd,0xef,0xd7,0xff,0xff,0xff,
0xff,0xff,0x7f,0x0f,0xf6,0x7f,0xfb,0xff,
0xff,0xff,0x7f,0x9f,0x7f,0xff,0xff,0xff,
0xdf,0xff,0xff,0xff,0xff,0xff,0xcb,0xff,
0xff,0x9f,0xf9,0xe7,0xff,0xbe,0xfe,0xff,
0xff,0xff,0xff,0xff,0x6f,0xe2,0xbf,0xae,
0xff,0xfe,0xfb,0xef,0xef,0xff,0x76,0xfe,
0xef,0xff,0xbd,0xec,0xfb,0xef,0xfb,0x7e,
0xb6,0xef,0xbf,0xbf,0xfe,0xfa,0xef,0xb5,
0xff,0xfe,0xfb,0xef,0xbf,0xff,0xbf,0xfd,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x77,
0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0x7f,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ff,0x7f,0xf9,0xff,0xbf,0x5f,0x7f,
0xfd,0xe5,0xff,0xff,0xff,0xff,0xef,0xff,
0xff,0x1f,0xfe,0xff,0xfb,0xf7,0xff,0xff,
0xff,0xfb,0xeb,0xff,0x7f,0xff,0xfb,0xef,
0xdf,0xff,0x7f,0xff,0xaf,0xff,0xff,0xff,
0xef,0xbf,0xbf,0xff,0xfd,0xff,0xff,0xff,
0xff,0xff,0x7f,0xf0,0xff,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xfb,0xef,0xff,0xde,0xff,0xef,
0xbf,0xdf,0xff,0x7f,0xff,0xbf,0xff,0xfe,
0xfb,0xef,0xbf,0xff,0xbb,0xff,0xff,0xff,
0xfb,0xff,0x7f,0xff,0xfd,0xff,0xf3,0xff,
0xff,0x3f,0xfd,0xff,0xbf,0xff,0xfb,0xe6,
0x7f,0xff,0xbf,0xdc,0xee,0xff,0xff,0xff,
0xfb,0xef,0xbf,0xff,0xfe,0x7f,0xfc,0xdf,
0xd7,0x5f,0x7e,0xf9,0xe5,0x97,0x5f,0x7e,
0xed,0xf5,0xd7,0x5f,0x7f,0xfd,0xb5,0x5e,
0x7f,0xfd,0xf5,0xd7,0x1b,0x6d,0xfd,0xf5,
0xd7,0x5f,0x7f,0xfd,0xf4,0xd7,0xbf,0xe0,
0xff,0xcf,0xbf,0xff,0xff,0xe3,0xfe,0xff,
0xff,0xfc,0xeb,0xff,0xdf,0xff,0xdc,0xff,
0xff,0x2f,0xfc,0xef,0xff,0xfd,0xfe,0xff,
0xf3,0xcd,0x3f,0xfe,0x7f,0xff,0x8f,0xff,
0x57,0xfe,0xcf,0xef,0xff,0xfe,0xef,0xf7,
0xdf,0xff,0x7b,0xff,0xff,0xff,0xff,0xfa,
0xfb,0xff,0xff,0xfa,0xbb,0xff,0xff,0xff,
0xff,0x73,0x3a,0x3f,0x7f,0xff,0xff,0xdb,
0xbf,0x5f,0xfb,0xff,0xfb,0xed,0xff,0x7f,
0xfd,0xff,0xff,0xbf,0xff,0xfe,0xff,0xff,
0xbf,0xff,0xff,0x5e,0xdf,0xff,0xff,0xff,
0xff,0xfb,0xdf,0xfe,0xff,0xf6,0xff,0xff,
0xaf,0xfd,0xff,0x97,0xff,0xd7,0xff,0xbf,
0xff,0xef,0xf7,0xfd,0x7f,0xfd,0xff,0xdf,
0x5b,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,
0xf7,0xff,0x67,0xfc,0xfd,0xfd,0xff,0xff,
0xbf,0xff,0xff,0xff,0x7f,0xfa,0xbf,0xfa,
0xff,0xff,0xff,0xff,0xfd,0xff,0xe7,0xfe,
0xbb,0xaf,0xf9,0xfe,0xff,0xff,0xff,0xff,
0xfb,0xef,0xbd,0xff,0xf7,0xbb,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xe2,0x7f,
0xff,0xff,0xff,0xfb,0xdf,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,
0xfd,0xf7,0xdf,0x6f,0xff,0xfe,0xf7,0xdf,
0xff,0xbd,0xfe,0xf7,0x6f,0xbf,0xff,0xba,
0xff,0xff,0xfd,0xff,0xdf,0xff,0x7f,0xdf,
0xfd,0xf7,0xff,0xff,0xff,0xeb,0xff,0xff,
0xef,0xfd,0xff,0xdf,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xf7,0xff,0xf7,0xff,
0x7f,0xfc,0xff,0xff,0xdf,0xff,0xff,0xfb,
0xef,0xff,0xfa,0xff,0xff,0xaf,0xbf,0x7f,
0xff,0xfb,0xbf,0xff,0xff,0xdb,0xe7,0xbf,
0xfe,0xfb,0xff,0xff,0xff,0xff,0xfe,0xff,
0xff,0xff,0xe9,0xff,0xff,0xff,0xff,0xff,
0xff,0xfd,0xc5,0x3f,0xff,0x7c,0xff,0xcf,
0x3f,0xfe,0xf8,0x8a,0xff,0xff,0xff,0xeb,
0xff,0x3f,0xff,0xdf,0xff,0x8f,0xef,0xbf,
0x7a,0xff,0xff,0x07,0xff,0xff,0xff,0xff,
0xff,0xfb,0xff,0xff,0xf6,0xfb,0xef,0xff,
0x7f,0xf3,0xef,0xbf,0xff,0xfb,0xff,0xfd,
0xff,0xf7,0xff,0xfb,0xff,0xf7,0xff,0xfb,
0xff,0xff,0xff,0xff,0xbf,0xf8,0xff,0xf7,
0xfe,0x77,0xff,0x7d,0xdf,0xe3,0x9f,0x7f,
0xff,0x7f,0xdd,0xf7,0xd7,0x7f,0xfd,0xff,
0xff,0x7d,0xff,0xfd,0x87,0xff,0xff,0xf7,
0xfd,0xf7,0xdf,0xff,0xff,0xff,0xc1,0xff,
0xfb,0xff,0xfb,0xff,0xff,0xff,0x5f,0xfb,
0xfd,0xbf,0xff,0xfe,0xfb,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xef,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x15,
0xfe,0xff,0xdf,0xff,0x7f,0xff,0xff,0xff,
0xbf,0xf3,0xff,0xff,0xff,0x7f,0x7d,0xfe,
0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xef,
0xff,0xff,0xfb,0xaf,0xff,0xfe,0xff,0xef,
0xff,0xc7,0xff,0xff,0xfa,0xfe,0xff,0xef,
0x3f,0xfe,0xff,0xff,0xff,0xff,0xfc,0xff,
0xff,0xff,0xff,0xeb,0xff,0xff,0xfd,0xff,
0xfe,0xe4,0xbf,0xfe,0xfa,0xea,0xfb,0xff,
0xff,0xdf,0xb6,0xf5,0xcf,0x3f,0xff,0xfc,
0xf3,0xff,0xff,0xff,0x7f,0xfe,0xf5,0xe7,
0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xef,
0xff,0xff,0x77,0xfd,0xf9,0xe7,0x9f,0xff,
0xff,0xfc,0xff,0x3b,0xbd,0x6f,0xbb,0xed,
0xb6,0xdb,0xfe,0xfb,0xff,0xff,0xff,0xff,
0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0x6b,0x7f,0xed,
0x35,0xd7,0x5a,0xeb,0xbf,0xdf,0x7f,0xff,
0xfd,0xb7,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xfb,0xff,0x7f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xdf,0x2b,0xff,
0x7f,0xa9,0xdd,0x76,0xdb,0xec,0xff,0xfb,
0xef,0xbf,0xfe,0xfa,0xef,0xbf,0xff,0xfe,
0xef,0xbf,0xff,0xde,0xfb,0xef,0xef,0xff,
0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xfb,0xdf,
0xd9,0xff,0xde,0xf9,0xe7,0x9f,0x57,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xee,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xbf,0x90,0xe7,0xf7,0xc2,0x5f,0x7f,0xfd,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,
0xff,0xff,0xef,0xff,0xff,0xff,0xf6,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,
0xff,0xff,0x1d,0x7e,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0xff,0xff,0xff,0xff,0xfe,0xfb,
0xff,0xbf,0xff,0xfe,0xef,0xbf,0xff,0xa2,
0xfb,0xef,0xff,0xff,0xfe,0xfb,0xef,0xbf,
0xff,0xf3,0xfb,0xbf,0xf5,0xff,0xbd,0xf7,
0xdc,0x73,0xcf,0x3f,0xbf,0xff,0xe6,0xdb,
0xee,0xbf,0xff,0xfe,0xfb,0xbf,0xff,0xfe,
0xfb,0xef,0xbf,0xff,0xb6,0xfb,0xef,0xbf,
0xff,0xfe,0xfb,0xef,0xff,0x8f,0xff,0xff,
0xff,0xcb,0x2f,0xff,0xbc,0xf3,0xd9,0x67,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xff,0xef,0xfe,0xf3,
0xdf,0x7f,0xff,0x7f,0xff,0xff,0x7f,0xf3,
0xff,0xbf,0xd0,0x46,0x1b,0x6d,0xb4,0xb1,
0x47,0x1f,0x7b,0xe4,0xf9,0xe7,0x9f,0x7f,
0xfe,0xe7,0x8e,0x7f,0xfe,0xf9,0x67,0x8f,
0x7f,0xee,0xb9,0xe7,0x9e,0x7f,0xee,0xf9,
0x93,0xff,0xaf,0x9f,0xfe,0xfa,0xeb,0xaf,
0xff,0xfe,0xfb,0xeb,0xbf,0xff,0xff,0xf7,
0xdf,0xdf,0xfd,0xf7,0x9d,0x7f,0xff,0xff,
0xfe,0xfd,0x7f,0xff,0xfd,0xf7,0x9f,0x7f,
0xff,0x1f,0xfd,0x7f,0xf5,0xd5,0x57,0x5f,
0x7d,0xf5,0xd5,0x5f,0x5f,0x7d,0xf7,0xff,
0xbf,0xff,0xfe,0xef,0xff,0xfb,0xff,0xfb,
0xff,0x77,0xff,0xff,0xff,0xef,0xff,0xff,
0xff,0xff,0xff,0xe8,0xff,0xeb,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xf7,0xff,0xfd,0xff,
0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xff,
0xfd,0xff,0xdf,0xff,0x73,0xfb,0x5f,0xef,
0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,
0xff,0xff,0xef,0xbf,0xff,0xfe,0xef,0xbf,
0xfe,0xfe,0xfb,0xef,0xff,0xfe,0xfe,0xfb,
0xef,0xbf,0xff,0xfe,0xfb,0xbf,0xfa,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xef,0xff,0xef,0x7f,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xf2,0xff,0xff,0xff,0xfb,
0xef,0xbf,0xff,0xff,0xff,0xef,0xff,0x4f,
0xff,0x7f,0xf5,0xf1,0xc7,0x5e,0x7f,0xfd,
0xf5,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ff,0x77,
0xff,0xff,0xdf,0xff,0xff,0xfd,0xff,0xfe,
0xbf,0xfe,0xff,0xbf,0xff,0xff,0xff,0xaf,
0xff,0xff,0x6f,0xfc,0xf9,0xfd,0xbf,0xfe,
0x7a,0xfe,0xaf,0xf7,0xff,0xff,0xff,0xfc,
0xff,0xff,0xfa,0xbe,0xbf,0xfe,0xfa,0xfe,
0xff,0x27,0xff,0x7f,0xf3,0xfd,0xaf,0xfe,
0xff,0xeb,0xff,0x0f,0x59,0x5f,0xef,0xff,
0xf5,0xf3,0xff,0x3f,0xff,0xff,0xff,0xff,
0xf7,0xff,0xff,0xe7,0xff,0xff,0xf9,0xe7,
0xff,0xff,0xbf,0xfc,0xff,0xcd,0xff,0xff,
0xf9,0xd7,0x9f,0xff,0xaf,0xd5,0xfb,0xff,
0xff,0xff,0xfb,0xdf,0xbf,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xff,0xff,0xff,0xff,0xff,0x7f,0xcf,0xf6,
0xff,0xff,0xfd,0xb7,0xff,0x7f,0xfb,0xff,
0xf7,0xdf,0x7f,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6f,
0xf4,0xff,0xbf,0xbf,0xfe,0xfe,0xef,0xef,
0xff,0xfe,0xfa,0xfb,0xef,0xff,0xfe,0xfb,
0xef,0xfb,0xfe,0xfb,0xef,0xbf,0xff,0xfe,
0xfa,0xef,0xbf,0xff,0xfe,0xfb,0xef,0xbf,
0xff,0x8b,0xfd,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xdb,0xf8,0xff,0xf7,0xff,0xff,
0xff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ff,0xff,
0xef,0xaf,0x7f,0xff,0xfb,0xf7,0xaf,0xbf,
0xfe,0xfb,0xff,0xef,0xff,0x7f,0xfb,0xff,
0xbf,0xff,0xff,0xff,0xaf,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfd,0xff,0xf0,0xff,
0xff,0xbf,0x7f,0xff,0xff,0xff,0xff,0xdf,
0x7f,0xff,0xff,0xff,0x7e,0xfb,0xef,0xdf,
0xfe,0xf3,0xed,0xbf,0xff,0xff,0xff,0xff,
0xff,0xff,0xfe,0xfb,0xef,0xbf,0xff,0x9f,
0xff,0xfd,0xff,0xff,0xef,0xbf,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xbf,0xff,0xff,0xf7,0xff,
0x7f,0xff,0xfd,0xf7,0xdf,0xff,0xff,0xfe,
0xdf,0xf5,0xff,0xd7,0x5f,0x3f,0xfd,0xb5,
0xd3,0x5f,0x7f,0xfd,0xf5,0x97,0x5f,0x7f,
0xfd,0xd5,0x5e,0x7e,0xf9,0xb5,0xd7,0x1f,
0x7d,0xfd,0xd4,0xd7,0x5f,0x7b,0xfd,0xf5,
0xd7,0xbe,0xe8,0xff,0xff,0x3f,0xff,0xfa,
0xf3,0xcf,0x3f,0xef,0xff,0xff,0x7f,0x3f,
0xf6,0xef,0xdf,0x3f,0xfe,0xef,0xbf,0x8f,
0xbf,0xfe,0x7f,0xe7,0x9f,0x3f,0xfe,0xfb,
0xff,0xef,0xff,0x4f,0xfe,0xfb,0xff,0x9c,
0xff,0xeb,0x3f,0xff,0xfe,0xff,0xff,0xf7,
0x7f,0xff,0xfe,0xfb,0x6f,0xff,0xfe,0xfb,
0xd7,0xff,0xfd,0xff,0xef,0xaf,0x3f,0xff,
0xff,0xff,0xef,0xff,0x9e,0xf8,0xff,0xff,
0xff,0xdf,0x7f,0xff,0xff,0xf7,0xfd,0xff,
0xff,0xff,0x57,0xff,0xff,0xf7,0xf4,0xff,
0xff,0xff,0xfd,0xff,0xff,0xff,0x7f,0xff,
0xf7,0xff,0xf7,0xf7,0xdb,0xff,0xd3,0xfe,
0xff,0xdf,0x67,0xf9,0xef,0x9f,0xff,0x7e,
0xfc,0xf1,0xf7,0xff,0xff,0x77,0xff,0xfe,
0x7f,0xbc,0xff,0xff,0xff,0xfb,0xff,0xff,
0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0xef,0xef,0xf7,0xeb,0xff,0xbf,0xef,
0xff,0xf7,0xef,0xff,0xf9,0xff,0xfd,0xff,
0x7f,0xff,0xfb,0xff,0xef,0xff,0xdf,0xff,
0xfb,0xef,0xff,0xff,0xfe,0xff,0xef,0xff,
0x6f,0xf7,0xff,0xdf,0xff,0xff,0xff,0xff,
0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,
0xff,0xff,0xf9,0xf7,0xdf,0xef,0x7f,0xff,
0xfd,0xff,0xef,0xff,0xff,0xfd,0xfe,0xdf,
0x7f,0xff,0x8b,0xff,0xff,0xff,0x7f,0xff,
0x7d,0xfb,0xff,0x57,0xff,0xdf,0xff,0xfb,
0xfd,0xdf,0xdf,0xef,0xb7,0xdf,0xff,0xff,
0xff,0x6d,0xff,0xff,0xff,0xff,0xff,0xff,
0xdf,0xff,0xff,0x7f,0xfd,0xff,0xff,0xbf,
0xfe,0xff,0xeb,0xbf,0xff,0x7f,0xff,0xbf,
0x77,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,
0xff,0xff,0xbf,0xfb,0xff,0xff,0xbf,0xff,
0xfe,0xee,0xfd,0x7f,0xff,0xe9,0xff,0xf3,
0xc7,0xbf,0xfe,0xfa,0xf3,0xff,0xff,0xff,
0xfd,0xf7,0xff,0x3f,0xfb,0xf5,0xfb,0x3f,
0xfe,0xfc,0xfe,0xcf,0x3f,0xff,0xfc,0xf3,
0x5e,0x7f,0xaf,0xf8,0xff,0xff,0x37,0xff,
0xbf,0x7f,0xfe,0xff,0xff,0xbf,0xff,0xff,
0xff,0xdf,0xff,0xde,0x7f,0xf9,0xdd,0xff,
0xff,0xd7,0xd6,0xf7,0xff,0xfe,0xfb,0xef,
0xbf,0xdf,0xfd,0xef,0xbf,0xff,0xff,0xff,
0xdb,0x6e,0x75,0xff,0xfd,0xff,0xff,0x71,
0xff,0xff,0xfd,0xfd,0xdf,0x5f,0x7f,0xff,
0xfd,0xff,0xf7,0xff,0xf6,0xe7,0xd7,0x8f,
0x7f,0x7f,0xf9,0x5f,0x2f,0xef,0x77,0xff,
0xdf,0x17,0xef,0xdf,0x7f,0xff,0xbf,0xff,
0xef,0xff,0xf7,0xff,0xbf,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,0xff,0xeb,0xfd,0x5f,
0xff,0xff,0xf7,0xdf,0xff,0xff,0xfd,0xff,
0xff,0xfb,0xe6,0xbe,0xff,0xde,0xed,0xff,
0xff,0xfe,0xdf,0xef,0xff,0xff,0xff,0xdf,
0xdf,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,
0xfb,0x5f,0xff,0xbf,0xbf,0xfe,0xff,0x77,
0xff,0xfe,0xfb,0xff,0xd7,0xff,0xff,0x3a,
0xf8,0xad,0xb7,0xce,0xff,0xf9,0xfd,0xf7,
0xff,0xfa,0xff,0xfb,0xff,0xff,0xf8,0xf9,
0xaf,0xfe,0xff,0xff,0xac,0x8f,0xcf,0xff,
0xff,0xab,0xaf,0xfe,0xff,0x92,0xf5,0xff,
0xff,0x5f,0x7f,0xbd,0x75,0xff,0xcf,0x2f,
0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0x5f,
0xef,0xff,0xf9,0xff,0xff,0x77,0xfd,0x7c,
0xff,0xff,0x7f,0xfe,0xf9,0xff,0xda,0xbd,
0xff,0xff,0xcf,0x7f,0xff,0xff,0xff,0xef,
0xff,0xff,0xfd,0xff,0xff,0xd4,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xf7,
0x64,0xff,0xf7,0xdf,0xfe,0xff,0xff,0xf7,
0xdf,0xfe,0xff,0xff,0xff,0xff,0xbf,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0x7f,
0xff,0xfd,0xf7,0xff,0xff,0xff,0xff,0xff,
0xf9,0x6e,0xfe,0xff,0xfa,0xfb,0xbf,0xff,
0xfe,0xfe,0xfb,0xbf,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0xfe,0xef,0xbf,0xff,0xfe,0xfb,
0xeb,0xef,0xbf,0xfe,0xfe,0xef,0xbf,0xff,
0xfe,0xfb,0x17,0xd8,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x8b,0xe7,0xff,0xff,
0xff,0xff,0x9f,0xff,0xff,0xff,0xb7,0xdf,
0x7f,0xf8,0x7b,0xfd,0xbf,0xff,0xef,0xf7,
0xff,0xff,0xff,0xaf,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x7e,0xff,
0xfb,0xff,0x3f,0xff,0xfd,0xff,0xff,0x7f,
0xf1,0xfd,0xc7,0xef,0xab,0xff,0x7e,0xef,
0x7e,0xff,0xfe,0xcb,0x6f,0xff,0xff,0xfe,
0xff,0xef,0xbf,0xff,0xfe,0xcb,0x7f,0xe0,
0xf9,0x6f,0xbe,0xff,0xfe,0xfb,0xef,0xbf,
0xed,0xfe,0xfb,0xef,0xbf,0xf9,0xfe,0xfb,
0xbf,0xff,0xb6,0xfb,0xef,0xbf,0xe5,0xfe,
0x9b,0x6f,0xbe,0xff,0xfe,0xfb,0xef,0xff,
0x81,0xef,0x7d,0xf7,0xd9,0xe7,0x9f,0x7f,
0xfe,0xf9,0xe7,0x9f,0x7f,0xfe,0xd9,0xe7,
0x9f,0xdf,0xf9,0xe7,0x9f,0x7f,0xfe,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d,0xff,0xff,0xff,0x7f,0xff,0xff,
0xdf,0xde,0x8f,0x3d,0xfc,0xa2,0xff,0x3f,
0xfe,0x58,0xc3,0xff,0x39,0xbe,0xff,0xe3,
0x8f,0x2d,0xfe,0xf8,0xf7,0xc5,0xff,0xff,
0xff,0xfd,0xbf,0x9f,0xfb,0xfb,0xeb,0xff,
0xff,0xff,0xff,0xfb,0xff,0xbf,0xfe,0xff,
0xb7,0xff,0xff,0xff,0xff,0x77,0xff,0xff,
0xfb,0xef,0xff,0xff,0xfe,0xff,0x0b,0xfe,
0x7f,0xbf,0x7f,0xf7,0xd7,0x2f,0x7f,0xff,
0xd7,0xee,0xff,0xfd,0xfd,0xdf,0xf7,0xbf,
0x7f,0xff,0xff,0xf3,0xff,0xf7,0xf7,0xfb,
0xff,0xef,0xff,0xff,0xfe,0xff,0xef,0xff,
0xf7,0xff,0xef,0xff,0xff,0xfe,0xfb,0xf9,
0xff,0x7f,0x7f,0xff,0xff,0xdf,0xff,0xff,
0xff,0xfc,0xff,0xfb,0xff,0xff,0xfb,0xff,
0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,
0x77,0x83,0xff,0xbf,0xbb,0xee,0xf7,0xeb,
0x2e,0xfb,0xff,0xff,0xff,0xff,0xff,0xfd,
0xfb,0xef,0xbf,0xfe,0xfa,0xad,0xbf,0xff,
0xfe,0xfb,0xef,0x2f,0xff,0xf6,0xfb,0x6f,
0xb7,0xef,0x9f,0xfd,0xdf,0xfc,0xf7,0xbf,
0x5f,0xff,0xff,0xff,0xff,0xff,0x7f,0xfd,
0xbf,0x83,0x17,0xde,0x76,0xd7,0x1f,0x3f,
0xfc,0xf1,0xdf,0x1f,0xff,0xfd,0xf1,0xc7,
0x1e,0x7f,0xec,0xff,0xe6,0xff,0xaf,0xd7,
0xff,0xff,0xef,0xff,0xff,0xfe,0x7f,0xff,
0xbf,0xff,0xfe,0xff,0xff,0xbf,0xff,0xef,
0xff,0xbf,0xff,0x3e,0xff,0xef,0x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xff,0xff,0xff,0xff,0xfa,0xcf,0xbd,
0xff,0xeb,0xfa,0xdf,0xbf,0xdf,0xee,0xfa,
0xaf,0xdb,0xbd,0xff,0xef,0xbe,0xbf,0x7c,
0xff,0xdf,0xff,0xff,0xfe,0xff,0xff,0xff,
0x57,0xff,0xff,0xff,0xff,0xff,0x9f,0xb7,
0xff,0xfd,0xff,0xdf,0xff,0xff,0xfe,0xfb,
0xdf,0xbf,0xfd,0xff,0xff,0x7f,0xff,0xfc,
0xf7,0xdf,0xff,0xff,0xfd,0xf7,0xff,0xff,
0xef,0x0f,0xfb,0xff,0xff,0xbf,0xff,0x7f,
0xff,0x7f,0xf3,0xff,0x7f,0xff,0xff,0xfd,
0xff,0xff,0xfe,0xf7,0xff,0xfe,0xff,0xda,
0xef,0xbf,0x7e,0xff,0xff,0xf7,0xcd,0xff,
0xf7,0xdf,0xff,0x4b,0xfb,0xff,0xf9,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xfc,
0xfe,0xfd,0xf7,0xdf,0xff,0xcd,0xef,0xdf,
0x7f,0xff,0xad,0xff,0xdf,0xfc,0xfe,0xfd,
0xf7,0xdf,0x7f,0xff,0x53,0xf6,0xff,0x9f,
0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,
0xf2,0xff,0xef,0xbf,0xff,0xfe,0x6f,0xfd,
0xff,0xfe,0xfb,0xee,0xff,0xff,0xd6,0xff,
0xec,0xbf,0xff,0x7e,0xfb,0xeb,0xf3,0xff,
0xef,0xff,0xff,0xff,0xfb,0xef,0xbf,0xff,
0xff,0xfb,0xff,0xda,0x6b,0x67,0xbf,0xf6,
0xff,0xe7,0xbd,0xfc,0xff,0xff,0x66,0xff,
0x7f,0xf6,0xd3,0xcf,0xfd,0xf7,0xdf,0x0f,
0xed,0xdf,0xfe,0xff,0xff,0xb7,0xdf,0x7e,
0xfb,0xfd,0xb7,0xff,0xbf,0x9f,0xfe,0xfb,
0xff,0xfe,0xff,0xfb,0xbd,0x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ff,0xfe,
0xff,0xfc,0xf3,0xef,0xff,0xff,0xfc,0xbf,
0xcf,0x37,0xef,0xfc,0xcf,0xf5,0xfe,0xfc,
0xf3,0xcf,0xff,0x9f,0xfc,0xbf,0xc5,0x3f,
0xff,0xfc,0xf3,0xff,0x87,0xff,0xff,0xff,
0xff,0xf7,0xff,0xff,0xff,0xdf,0xff,0xff,
0xfb,0xef,0xff,0xff,0xff,0xff,0xfb,0xff,
0xbe,0xfe,0xef,0xbf,0xff,0xff,0xfd,0xff,
0xee,0xff,0xfe,0xff,0xee,0x57,0xfe,0x3f,
0xff,0xff,0xff,0xcf,0x3f,0xff,0xdd,0x7f,
0xcf,0xff,0xbf,0xfc,0xf3,0xcf,0xbf,0xfc,
0xff,0xcf,0x3f,0xf7,0xfc,0xff,0xcf,0xff,
0xff,0xfc,0xf2,0xc7,0x17,0xf7,0xf9,0xf4,
0xff,0xfd,0xfd,0xfe,0xff,0xff,0xf5,0xff,
0xdf,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,
0xdf,0xff,0xff,0xff,0xff,0xfe,0xfb,0x7f,
0xdf,0xff,0xff,0x7f,0x7f,0xfb,0xfd,0xfd,
0xa8,0xff,0x7f,0xff,0xeb,0xff,0xff,0xbf,
0xff,0xff,0xf7,0xfb,0xfb,0xff,0xff,0xff,
0xff,0x4d,0xaf,0xff,0xfe,0xff,0xff,0xff,
0xff,0xef,0xfa,0xff,0xff,0xfd,0xdf,0xbf,
0xdf,0x9f,0xfd,0xff,0x7f,0xff,0xbf,0xff,
0x7f,0xe7,0xff,0xff,0xff,0xf7,0x7f,0xbf,
0xdf,0x7d,0x3e,0xf7,0xbf,0x7e,0xf7,0xdd,
0x7f,0xff,0x3d,0xff,0xeb,0xff,0xdf,0x7d,
0xff,0xfd,0x7f,0xeb,0xdf,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0x77,0xff,0x7d,
0xef,0x3f,0xfd,0xec,0xfb,0xff,0xff,0xfc,
0xcb,0x6f,0xef,0xff,0xdf,0xff,0xff,0x3b,
0xfd,0xfc,0x23,0xff,0x6e,0xff,0xff,0xfb,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xef,0x7f,0xff,0xf7,0xf7,0xbd,0xfb,0xff,
0xf3,0xff,0xfa,0xfd,0xff,0xfb,0xff,0xff,
0xff,0xfd,0xf7,0xff,0xff,0x27,0xf8,0xff,
0xf8,0xe3,0xdf,0xff,0xff,0xfc,0xff,0xf7,
0xdf,0xff,0xfc,0xff,0xff,0xff,0xff,0xfe,
0x87,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfc,0xf9,0xd7,0x9f,0xff,0xf5,0xbf,0xd3,
0xff,0xef,0xbf,0xff,0xfd,0xff,0xdf,0xff,
0xff,0xff,0xff,0xb7,0xfe,0xff,0xff,0xff,
0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,
0xff,0xb7,0xde,0xff,0xfe,0xfd,0xeb,0xfb,
0x2f,0xfe,0xff,0xff,0xff,0xff,0xff,0x7f,
0xfd,0xf7,0xfd,0xaf,0xff,0xfd,0xff,0xed,
0xff,0xff,0xff,0xfd,0xab,0xff,0xff,0xfa,
0xdd,0xfe,0xff,0xfd,0xff,0xff,0xff,0xff,
0xf7,0x7f,0xe4,0xff,0xff,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,0x7f,0xfd,0xff,0xff,
0xff,0xff,0xfd,0xfb,0xfd,0xff,0xff,0xff,
0xdf,0xff,0xff,0xff,0xff,0xdf,0x5e,0xff,
0xff,0xf5,0xff,0x87,0xff,0xff,0xff,0xf7,
0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,
0xde,0xff,0xfe,0xf7,0xfd,0xff,0xff,0xff,
0xff,0x7f,0xff,0xff,0xff,0xff,0xfe,0xfe,
0xff,0xff,0xff,0xff,0xdf,0xf0,0xe7,0x97,
0x7f,0x7e,0xf3,0xe5,0xe7,0xff,0xff,0xff,
0xcf,0xff,0xdf,0x77,0xff,0xfd,0xdf,0xff,
0xdf,0xfd,0xff,0xdf,0xff,0xfe,0xcd,0xff,
0xdd,0x7f,0xff,0xfd,0xf7,0x3f,0x68,0x7d,
0xfe,0xfc,0xf3,0x5d,0x2f,0xdf,0xff,0xff,
0xff,0x7f,0xfd,0xff,0xbe,0xfb,0x6f,0xf6,
0xff,0xff,0xee,0xf7,0xe9,0xff,0x9f,0xff,
0xff,0x6f,0xff,0xfd,0xf7,0xdf,0xbf,0x0e,
0xef,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x7f,0x9f,0x7f,0xde,
0xff,0xf5,0xff,0xf2,0x7f,0xff,0xf7,0x7f,
0x76,0xff,0xff,0x3d,0xf5,0xd2,0x73,0xff,
0x7d,0xdb,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,
0xe7,0xce,0xef,0xff,0xbf,0xff,0xff,0xfb,
0xff,0xbf,0xff,0x7f,0xfb,0xac,0xbf,0xce,
0xfe,0xbf,0xc9,0xff,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0xfe,0xfb,0xff,0xff,0xff,0x7e,
0x7b,0xff,0xbd,0xcf,0xfb,0xef,0xff,0xd7,
0x6e,0xb3,0xef,0xf7,0xff,0xd6,0x37,0xef,
0xfd,0xf7,0xeb,0x1f,0xf6,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xdb,0xfb,0xef,0xfd,0xde,0xff,0xff,
0xbf,0xb7,0xda,0xff,0xbf,0xff,0xff,0x7e,
0x79,0xef,0xff,0x7e,0xef,0xe7,0xff,0xff,
0xff,0xf9,0xfd,0xf7,0xdf,0x7f,0xff,0xff,
0xff,0xdf,0xd7,0x5f,0x7f,0xfd,0xd7,0xff,
0x7d,0xfd,0xf5,0xdf,0xff,0x7d,0xfd,0xdf,
0xdf,0xdf,0x7f,0xff,0xf5,0xfd,0xb1,0xff,
0xff,0xfc,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xfe,
0xd3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0x7f,0xf9,0xfd,0xff,0xdf,0xf7,0xdf,
0x7f,0xff,0xf7,0xff,0x7f,0xf7,0x7d,0xf7,
0xff,0x7f,0xff,0xdf,0xf7,0xdd,0x7f,0xf7,
0xfd,0x9d,0xf6,0xff,0xf3,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf2,
0xcf,0x2f,0xff,0xf2,0xff,0x4b,0xbf,0xfc,
0xf2,0x7f,0x2f,0xff,0xff,0xf3,0xfb,0x2f,
0xff,0xff,0xff,0xd1,0xff,0x5f,0x3f,0xfd,
0xf5,0xd3,0x5f,0x7f,0xf5,0xb5,0x57,0x5f,
0x77,0xf5,0x75,0x57,0x77,0xfd,0xf5,0x97,
0x5d,0x73,0xfd,0x75,0xd7,0x5f,0x7f,0xdd,
0xf5,0xd6,0x4f,0xff,0xa2,0xff,0xff,0xfe,
0xef,0xf7,0xdf,0xbf,0xff,0xfc,0xf3,0xff,
0xff,0xfe,0xfe,0xf7,0xef,0xff,0xff,0xab,
0xc7,0xff,0xff,0xff,0xe7,0x7f,0xff,0xca,
0xff,0xff,0xff,0xff,0xdf,0x7b,0xf9,0xff,
0xff,0xff,0xef,0xb7,0xff,0xfd,0xfc,0x6f,
0xff,0xff,0xff,0xff,0xf3,0xef,0xf7,0x7f,
0xdf,0x5b,0xbf,0xff,0xff,0xf3,0xef,0xbf,
0xff,0xbf,0xff,0xeb,0xfe,0xbf,0x7f,0xe1,
0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xbf,
0x7f,0xff,0xff,0xff,0xdf,0xfd,0xff,0xfd,
0xfb,0xef,0xff,0xff,0xff,0xff,0xff,0xf7,
0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x45,0xff,0xff,0xff,0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0x77,0xfd,0xf5,
0xd7,0x3b,0xfd,0xbf,0xdd,0x5f,0x6f,0xbd,
0xff,0xd7,0xfd,0x7f,0xbd,0xe7,0x96,0xff,
0xfe,0xbe,0xf8,0xff,0xff,0xff,0xff,0xff,
0xef,0xff,0xff,0xff,0xff,0xff,0xff,0x66,
0x9f,0x7f,0xfe,0x67,0xff,0xbf,0xf7,0xd7,
0x67,0xff,0x7f,0xe6,0xff,0xdf,0xdf,0xff,
0xfe,0xbf,0xf6,0xc9,0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xfe,0xdf,0xef,0xff,
0xfd,0xf7,0xdf,0x7f,0xf7,0xf7,0xbf,0x57,
0xf7,0xff,0xff,0xff,0xff,0xff,0xda,0xf7,
0xfd,0xfd,0xff,0xff,0x5f,0xfe,0xff,0xff,
0xff,0x7f,0xfb,0xfd,0xff,0xff,0xff,0xff,
0xff,0xfb,0xf7,0xff,0xff,0x3f,0xff,0xff,
0x6d,0xff,0xfd,0x77,0xdf,0xff,0xff,0xf7,
0xff,0xd3,0xfe,0xff,0xff,0xdd,0x76,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,
0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xfd,
0xff,0x7f,0xfb,0xbf,0xff,0xff,0xff,0xef,
0xff,0xff,0xcf,0xff,0xef,0xff,0xfe,0xbf,
0xff,0xcf,0x2f,0xbf,0xfe,0xf3,0xcb,0xff,
0xff,0xfc,0xf7,0xcf,0x3f,0xff,0xdc,0xf3,
0x07,0x7f,0xfc,0xd3,0xce,0x3f,0xff,0xf4,
0xf3,0xff,0x3f,0xf7,0xfc,0xf3,0xcf,0xff,
0x9f,0xfc,0xff,0xbe,0xfb,0xf7,0xbf,0xff,
0xee,0xff,0xed,0xbf,0x7f,0xee,0xfb,0xef,
0xb7,0xff,0xfb,0xb7,0xbf,0xdf,0xfe,0xba,
0xb5,0xbf,0xff,0xff,0xfb,0xef,0xbf,0xff,
0xfe,0xef,0xee,0xff,0xf7,0xdf,0xff,0xfe,
0xfd,0xe7,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ff,0xff,0x8f,0xff,
0xdf,0x7c,0xff,0xff,0xfe,0xff,0xff,0xfb,
0xff,0xf6,0xff,0xff,0x7d,0xfd,0xde,0xff,
0x6f,0xff,0xef,0xff,0xf7,0xfe,0xbf,0x9b,
0xff,0xf7,0x3f,0x5f,0xff,0xff,0xff,0x39,
0xbf,0xbf,0xf5,0xfe,0xef,0xbf,0xff,0xee,
0xfb,0xff,0x5f,0x7f,0xfb,0xfd,0xbf,0xff,
0xff,0xfb,0xed,0xf7,0xdf,0xfe,0xbe,0xef,
0xa7,0xfe,0xff,0xfc,0xff,0xed,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0x7f,
0xff,0xbf,0xbf,0xff,0xff,0xff,0xff,0xff,
0x7f,0xff,0xff,0x7f,0x7f,0xfd,0xfd,0xff,
0xff,0xff,0xf3,0xff,0xf5,0xff,0xdf,0xdf,
0xff,0xff,0xd7,0xdf,0x7f,0xfd,0xff,0xd7,
0x5f,0x7f,0xbd,0xc3,0xef,0x7f,0xfd,0xf5,
0xdd,0xff,0xf7,0xbd,0xff,0xd7,0xff,0xff,
0xf9,0xe7,0xcf,0x87,0xff,0xaf,0xfb,0xff,
0xb7,0xff,0xff,0xfb,0xff,0xfb,0xef,0xfb,
0x6f,0xbe,0xd9,0xe6,0xaf,0xf7,0xff,0xe7,
0x77,0xff,0xff,0xff,0xff,0xf7,0x7f,0xbe,
0x7f,0xf6,0xf5,0x6f,0xed,0xfc,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xcd,
0xff,0xff,0xaf,0xbf,0xff,0x77,0xff,0xff,
0xf7,0x7a,0xdf,0x7d,0xff,0xdd,0xfb,0xfb,
0xe7,0xff,0xfc,0x7b,0xdf,0x7f,0xe2,0xff,
0x7f,0xfb,0xff,0xff,0xff,0xfe,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xdf,0xef,0x77,
0xff,0xbf,0xff,0xff,0x7f,0xf7,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0x43,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xfd,0xff,0xef,0xf7,0xdf,0xff,
0xfa,0xff,0xfe,0x7e,0xff,0xfb,0xf7,0xff,
0xff,0xfe,0xfd,0xab,0xff,0xff,0xfb,0xef,
0xbb,0xfa,0xff,0xfc,0xf3,0xcf,0x3f,0xff,
0xfc,0xf3,0xcf,0x3f,0xff,0xff,0xff,0xcd,
0xff,0xff,0x7c,0xcf,0x3f,0xff,0xfc,0xf3,
0xcf,0x3f,0xff,0xfc,0xf3,0xcf,0x3f,0xff,
0xfc,0xff,0xc4,0xff,0xee,0xbf,0xff,0xfe,
0xfb,0xe7,0xbf,0xff,0xfe,0xfb,0xfb,0xff,
0x5f,0xeb,0xff,0xff,0x6f,0xfe,0xed,0xb7,
0xd7,0x7e,0xfb,0xed,0xb7,0xdf,0x76,0xfb,
0xf9,0xb7,0xd7,0x5d,0xfe,0x3f,0xfe,0xf1,
0xe7,0xdf,0xbf,0xfe,0xf5,0xf7,0xdf,0xef,
0xff,0xff,0xdf,0xff,0xff,0xf7,0xff,0x7d,
0xff,0xfd,0xf7,0xdf,0x7f,0xdf,0x75,0xe7,
0xdd,0xf7,0xdf,0xfd,0x7f,0xe0,0xff,0xf7,
0xdf,0x3f,0xf7,0xfd,0xf7,0xff,0x7f,0xff,
0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0x7f,0x97,0xff,
0xbf,0x3f,0xff,0xfb,0xef,0xbf,0xff,0xff,
0xfb,0xff,0xff,0xfe,0xff,0xff,0xff,0xdf,
0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,
0xf5,0xff,0xff,0xff,0x3f,0xff,0xcf,0xbf,
0xca,0xff,0xfe,0xe3,0xff,0x3f,0xfe,0xff,
0xcf,0xbf,0xff,0xfe,0xe7,0xef,0xff,0xff,
0xff,0xfb,0xef,0xbf,0xff,0xff,0xff,0xff,
0x3f,0x64,0xfd,0xff,0xff,0xff,0xfd,0xff,
0xff,0x75,0xff,0xff,0x3f,0xff,0xff,0xf3,
0x9f,0x7f,0xf6,0xff,0xff,0xff,0xf3,0xff,
0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0x7f,
0xfe,0xbf,0x0e,0xef,0xff,0xff,0xff,0xff,
0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfd,0xd9,0xff,0xfd,0xf7,
0xdf,0x7f,0xff,0xf5,0xf7,0xdf,0x7f,0xff,
0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xbf,0x9b,0xff,0xbb,
0xfe,0xfa,0xfb,0xef,0xbf,0xff,0xfe,0xeb,
0xaf,0xbf,0xff,0xfb,0xef,0xbf,0xff,0xfb,
0xef,0xbf,0xdf,0xfe,0xfb,0xef,0xbf,0xff,
0x5e,0xfb,0xef,0xbf,0xff,0xfe,0x8f,0xf6,
0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xff,0xff,0xff,0xbf,0x7b,0xff,0xff,0xff,
0xff,0xff,0xea,0xff,0xff,0xff,0xff,0xef,
0xe5,0xff,0xff,0xff,0xeb,0xef,0xbf,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xfd,
0xf7,0x7b,0xff,0xfd,0xf7,0xd7,0x7d,0xff,
0xa9,0xf7,0xdf,0x56,0xff,0xad,0xe7,0xdf,
0xff,0xb9,0xfc,0xff,0xfe,0xdb,0x3f,0xfe,
0xfd,0xff,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xff,0xfd,0xef,0xff,
0xff,0xfb,0xef,0xbf,0xff,0xfb,0xef,0xbf,
0xff,0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xfb,
0xef,0xbf,0xff,0xfe,0xef,0xfe,0xff,0xff,
0xff,0xbf,0xff,0xf7,0xff,0xef,0xff,0xff,
0xff,0xff,0xff,0xbf,0xfb,0xfc,0xef,0xff,
0xff,0xfe,0xbf,0xef,0xbf,0xff,0xff,0xff,
0xff,0xbe,0xff,0xef,0xff,0xff,0xd4,0xff,
0x5f,0x3f,0xfd,0xb5,0xd7,0x5f,0x7f,0xfd,
0xe5,0x57,0x5f,0x7f,0xfd,0xa5,0x97,0x7b,
0xed,0xf5,0xc7,0x5f,0x7f,0xfc,0xf5,0xd7,
0x5f,0x7f,0xf5,0xd5,0xc7,0x5e,0xfb,0x82,
0xff,0x3f,0xff,0xff,0xff,0xbf,0xff,0xf7,
0xdf,0xfb,0xff,0x3d,0xff,0x78,0xef,0xbf,
0xff,0xfb,0xef,0x7f,0xff,0xff,0xff,0xff,
0x7f,0xff,0xfe,0xfc,0xff,0xbf,0xff,0xff,
0x9b,0xf8,0xff,0xbc,0xff,0xfb,0xff,0xbf,
0xff,0xfe,0xde,0xff,0xff,0xfc,0xfd,0xfe,
0xff,0xbf,0xff,0xff,0xf5,0xbf,0x9f,0xff,
0xfb,0xef,0xbf,0xff,0xfd,0xff,0xef,0xfe,
0xff,0x7f,0xe8,0xff,0xff,0xff,0xdf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,
0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,
0xff,0xff,0x7f,0xbf,0xff,0xbf,0xff,0xcf,
0x7f,0xff,0xff,0x1d,0xff,0xff,0x7f,0xfd,
0xff,0xff,0xff,0x7f,0xfd,0xf1,0xc7,0x7f,
0xd7,0xff,0xb7,0xff,0xfb,0xff,0xff,0xff,
0xff,0xff,0xfb,0xef,0xff,0xfb,0xff,0xff,
0xff,0xff,0xff,0xff,0x3f,0xfb,0xf7,0xff,
0xef,0xff,0xff,0xff,0xff,0xfe,0xef,0xbf,
0xff,0xee,0xff,0xeb,0xff,0x7f,0xfc,0xfc,
0xff,0xff,0xdf,0xff,0xff,0xfb,0xef,0xff,
0xff,0xfb,0xef,0xef,0xbf,0xfe,0x51,0xff,
0xff,0xdf,0xf7,0xff,0xef,0xff,0xff,0xf7,
0xff,0xff,0xff,0xff,0xf7,0xff,0x7f,0x77,
0xff,0xff,0x6f,0xff,0xff,0xff,0xfc,0xff,
0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0x4f,
0xfe,0xf7,0xbf,0xff,0xff,0xff,0xef,0xff,
0xff,0xff,0xff,0xd5,0xff,0xff,0xdf,0x7f,
0xe7,0xfd,0xdf,0xff,0xbf,0xff,0xfe,0xfb,
0xfb,0xff,0xfd,0xff,0xdf,0xfe,0xff,0xff,
0xff,0xf7,0xfd,0xff,0xff,0xfe,0xff,0xff,
0xdf,0xfe,0xff,0xb9,0xff,0xfe,0xfe,0xfb,
0xef,0xef,0xfb,0xf7,0xef,0xff,0xf7,0xdf,
0xdf,0xff,0xff,0xfe,0xfb,0xfb,0xff,0xb7,
0xdf,0xbe,0x93,0xef,0xcb,0x6f,0xff,0xff,
0xf3,0xcf,0x3f,0xff,0xf8,0xff,0xcf,0x3f,
0xff,0xfc,0xf3,0x2f,0xff,0xff,0xe3,0xcf,
0x3f,0xff,0xfc,0xf3,0xcf,0xff,0xff,0xfc,
0xf3,0xcf,0xff,0xbf,0x7d,0xff,0xfe,0xfb,
0xff,0x9f,0xff,0x7e,0xf5,0xbf,0xff,0xf7,
0xee,0xfb,0xb7,0xdf,0xee,0xf9,0xff,0x7f,
0xff,0xfe,0xfb,0xef,0xdf,0x7e,0xfb,0xff,
0xb7,0xdf,0x7e,0xfb,0xef,0xe7,0x7f,0xc7,
0x7f,0xff,0xff,0xbb,0xe3,0x7e,0xfb,0xcf,
0xf7,0xc7,0x9f,0xff,0xfc,0xf7,0xfe,0xff,
0xf7,0xff,0xe3,0x8e,0x77,0xdb,0x77,0xdf,
0xff,0xdd,0x75,0xc7,0x9d,0xfb,0x2f,0xee,
0x7f,0xff,0xff,0xff,0xd7,0x7f,0xff,0xff,
0xfe,0xff,0xbf,0xfe,0xfd,0xff,0xff,0xff,
0xbf,0xff,0xff,0x7e,0xfa,0xed,0xff,0xff,
0xff,0xfd,0xdb,0xff,0xff,0xff,0xff,0xdf,
0xeb,0xff,0xfa,0xff,0xff,0xbf,0xff,0xfd,
0xff,0xff,0xff,0xff,0xff,0x33,0xef,0xff,
0xef,0xff,0xfe,0xff,0xfb,0xfd,0xaf,0xfe,
0xfe,0xfb,0xff,0xff,0xff,0xfc,0xff,0xff,
0xff,0x1b,0xff,0xff,0xff,0xe7,0xff,0xff,
0xff,0xf9,0xfd,0xf7,0xff,0x3f,0xff,0xfd,
0xff,0xbf,0xef,0xe7,0xef,0xbf,0xff,0xff,
0xe7,0xff,0xff,0xf7,0xff,0xff,0xef,0xbf,
0xfc,0xff,0xc3,0xd6,0xff,0xcf,0x3f,0xff,
0xff,0xd7,0xff,0xff,0xdf,0xff,0xf3,0xfd,
0xf6,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,
0xff,0x3f,0xff,0xff,0xbf,0x9f,0xff,0xff,
0xff,0xf3,0xff,0xeb,0xf1,0xfe,0xff,0xff,
0xff,0xff,0x9b,0xb5,0x7f,0xff,0xff,0xff,
0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0x7f,0xfe,0xff,0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xdf,0x87,0xfd,0xdf,
0xff,0xff,0xff,0xf7,0x8d,0xff,0xff,0xff,
0xff,0xdf,0xa7,0xfe,0xff,0xff,0xff,0xff,
0xff,0xff,0xdf,0x7f,0xff,0xfd,0xff,0xef,
0xff,0xff,0xff,0xff,0xff,0xff,0x7b,0xfd,
0xff,0xeb,0xbf,0xff,0xfe,0xd8,0xeb,0xbf,
0xff,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,0xff,0xff,0xf3,0xbf,0xbf,0xdd,0xfb,
0xef,0xbf,0x97,0xff,0xd5,0xff,0xfe,0xf9,
0xff,0xff,0x6f,0xff,0xfe,0xfb,0xfb,0xff,
0xef,0xff,0xff,0xce,0x7f,0xff,0xff,0xfb,
0xfb,0xff,0xff,0xff,0xf7,0xfd,0xfb,0xff,
0xff,0xfd,0xef,0x96,0xfe,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0xef,0xbf,0xfd,
0xff,0xff,0xff,0xff,0x97,0xbd,0xf5,0xf7,
0xff,0xbf,0xff,0xfd,0xf6,0x77,0xff,0xff,
0x77,0xff,0xff,0xff,0xdf,0xf1,0xff,0xff,
0xff,0xff,0x7f,0xff,0xff,0xff,0xfe,0xff,
0xff,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf5,0xd7,0x1f,0xff,0xff,0xfe,
0xff,0xfc,0xfe,0xff,0xff,0xff,0xa3,0xff,
0xff,0xff,0xff,0xff,0xdf,0xfe,0xef,0xef,
0xff,0xff,0xfe,0xfb,0xff,0xef,0xfd,0xdf,
0xff,0xff,0xff,0xbb,0xbf,0xfe,0xdd,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfc,0xff,0xff,0x7f,0xff,0xfe,0xff,0xbf,
0xff,0x3f,0xea,0xff,0xff,0xed,0xff,0xff,
0x7b,0xff,0xff,0xff,0x7b,0xdb,0xef,0xff,
0xfe,0xfa,0xdf,0xbf,0xff,0xff,0xff,0xff,
0xff,0xe3,0xff,0x7f,0xff,0xdf,0xff,0xcf,
0xfc,0xff,0xdf,0xef,0xff,0xff,0xff,0xff,
0xff,0xff,0xfb,0xff,0xbf,0xff,0xfb,0xaf,
0xff,0xdf,0xff,0xdf,0xff,0xff,0xf7,0xbf,
0xdf,0xff,0x1f,0xff,0xff,0xff,0xff,0xff,
0xfe,0xfb,0xff,0xbf,0xbe,0xff,0xff,0xef,
0xbf,0xfe,0xfe,0xbf,0xf7,0xff,0xff,0x7f,
0xff,0xef,0xff,0xff,0xf7,0xfd,0xbf,0xfe,
0xfb,0xeb,0xef,0x7b,0xe9,0xff,0xbd,0xff,
0xff,0x3f,0xff,0xff,0xff,0xcf,0x3f,0xff,
0xfc,0xf3,0xcf,0xdf,0x7f,0xde,0xc6,0xdf,
0x7f,0xfc,0xf3,0xcf,0x3f,0xdf,0xff,0xf3,
0xcf,0x7f,0xff,0xfc,0xbf,0xd5,0xff,0xef,
0xff,0xff,0xff,0xef,0xff,0xff,0x7f,0xbd,
0xfb,0xef,0xdf,0xfe,0xfb,0xff,0xff,0xff,
0xfe,0xbf,0xef,0xbf,0xff,0xfe,0xef,0xff,
0xcf,0x7e,0xfb,0xfb,0xe7,0xff,0xaf,0xfe,
0xff,0xff,0x7f,0xeb,0xdf,0xff,0xef,0xf7,
0xff,0x9f,0x7f,0x7f,0xd7,0x97,0xff,0xfd,
0xff,0xf7,0xab,0x7f,0xfb,0x7d,0xe3,0xdf,
0xff,0xff,0xf7,0xdf,0x7f,0xff,0xff,0xff,
0xe4,0xff,0xff,0xff,0x7f,0xff,0xdf,0xff,
0xff,0xff,0xff,0xfc,0xf7,0xff,0x7f,0xff,
0xff,0xfb,0xff,0xff,0xfd,0xff,0xff,0x7f,
0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,
0xff,0xb9,0xff,0xff,0xff,0xdf,0xeb,0xff,
0xff,0xff,0xfb,0xef,0xb7,0xbe,0xff,0xff,
0xfb,0xff,0xff,0xff,0xff,0xef,0xff,0xff,
0xff,0xbb,0xbf,0xff,0xff,0xff,0xef,0xff,
0xff,0xff,0xf7,0xf1,0xe7,0xf7,0xff,0xfa,
0xeb,0xe5,0xb7,0xde,0xff,0xf9,0xaf,0xe3,
0xbf,0x7f,0xeb,0xfb,0xff,0xf7,0xff,0xfb,
0x9f,0xff,0xff,0xff,0xfd,0xff,0xff,0xff,
0xff,0xff,0xff,0x3f,0x63,0x7d,0xfe,0xf9,
0xd7,0xcf,0x7f,0xfd,0xfc,0xff,0xcf,0x7f,
0xdd,0xff,0xff,0x9f,0x7f,0xf5,0xbf,0xff,
0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,
0xff,0xff,0xff,0xff,0xbf,0x3e,0xef,0xff,
0xfd,0xff,0xef,0x7f,0xff,0xfd,0xf7,0xff,
0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0x3f,
0xff,0x9f,0x53,0x4f,0xfd,0xf7,0xff,0x4b,
0xff,0xff,0xff,0xff,0xff,0xff,0x7d,0xd9,
0xff,0xff,0xff,0xdf,0xfe,0xff,0xff,0xff,
0xff,0x7f,0xff,0xfd,0xff,0xff,0xff,0xff,
0xff,0xdc,0x7f,0x9a,0x78,0xe2,0x9f,0xff,
0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xbf,
0xd9,0xff,0xff,0xfe,0xfb,0xeb,0xbf,0xff,
0xfe,0xfb,0xef,0xaf,0xbf,0xff,0xfb,0xef,
0xbf,0xef,0x7b,0xeb,0xaf,0xbf,0xfe,0xfa,
0xeb,0xbf,0xff,0xfe,0xfb,0xef,0xbf,0xff,
0xfe,0xdf,0xf6,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfb,0xff,0xfd,0xf7,
0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,
0xff,0xff,0x6f,0xe2,0xff,0xdf,0x7f,0xeb,
0xff,0x97,0x5f,0xfe,0xfe,0xed,0xff,0xff,
0x7f,0xeb,0xf9,0xbf,0x7b,0xfe,0xfb,0xbd,
0xff,0xff,0x7e,0xff,0xaf,0xf4,0x7e,0xea,
0xf9,0xff,0xdf,0xff,0xb9,0xff,0xff,0xfd,
0xd7,0xef,0x7f,0xfc,0xf1,0xf3,0xdf,0xbe,
0xff,0xff,0xdf,0xdf,0xbf,0xf8,0x5f,0xef,
0xef,0xf8,0xf3,0xfb,0xeb,0x3f,0xad,0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fd,0xff,0xff,0xff,0xff,0xbf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,
0xfe,0xff,0xf7,0xff,0xff,0xff,0xf6,0xff,
0xef,0xff,0xfb,0xff,0xff,0xdf,0xff,0xff,
0x7f,0xff,0xbe,0xef,0xff,0xff,0xff,0x93,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x7f,0xd1,0xff,0x5f,0x7f,0xfd,0xf5,0x97,
0x5f,0x7e,0xf9,0xf1,0x57,0x5f,0x7d,0xfd,
0xe5,0x97,0x7f,0xf9,0xe1,0xd7,0x1f,0x7f,
0xfc,0xb5,0x97,0x5f,0x7e,0xfd,0xf5,0xd7,
0x5f,0xff,0xaa,0xff,0x3f,0xfe,0x58,0xf3,
0xff,0x3f,0xff,0xf8,0xff,0xcf,0xf9,0xfe,
0xfb,0xff,0xff,0xff,0xff,0xe3,0xc7,0xff,
0xfe,0xfb,0xfd,0xdf,0x3f,0xfe,0xff,0xff,
0x8f,0xff,0xff,0x3b,0xf9,0xff,0xfd,0xf7,
0xcf,0xff,0xff,0xfd,0x77,0xfb,0xf7,0xff,
0xff,0xbe,0xfe,0xfb,0xff,0xff,0xf7,0xae,
0xbf,0xbf,0xff,0xff,0xbf,0x7b,0xff,0xff,
0xff,0xdf,0xff,0xff,0x7f,0xe7,0xff,0xfb,
0xef,0xff,0xff,0xff,0xfb,0xef,0xff,0xff,
0xda,0xff,0xff,0xff,0xff,0xff,0xf1,0xdf,
0xfe,0xfb,0xff,0xff,0xe7,0xff,0xff,0xf6,
0xf7,0xff,0x7f,0xfd,0xff,0xff,0x77,0xff,
0xff,0xff,0xff,0xf5,0xfb,0xff,0xef,0xff,
0xff,0xb7,0x1f,0xf6,0xff,0xff,0xfd,0xbf,
0xff,0xf5,0xff,0xdf,0xff,0xfd,0xe7,0xfd,
0xef,0xff,0xff,0xfe,0xff,0xef,0xff,0xbf,
0xf8,0xbf,0xbf,0xff,0xa6,0xff,0xff,0xbf,
0xfe,0xfe,0xf7,0xee,0xfd,0x7f,0xff,0xff,
0xff,0xff,0xbb,0xfd,0xff,0xfb,0x7a,0xd7,
0xff,0xff,0xff,0xff,0xfd,0xfb,0xfb,0xff,
0xff,0xdf,0xff,0x7f,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xeb,0xbf,0xbf,0xff,0xff,
0xff,0x7f,0xe7,0x7f,0x7f,0xe7,0xff,0xfe,
0xf7,0xbf,0xf3,0xcf,0x7e,0xff,0xfc,0x77,
0xcf,0xff,0x2b,0xfe,0xff,0x7f,0xff,0xff,
0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,
0xff,0x7f,0x7f,0xbf,0xe7,0xde,0xcb,0xff,
0xfd,0xff,0xfd,0xff,0xdf,0xff,0xf4,0xfe,
0x4e,0xff,0xff,0xff,0xf5,0xff,0xff,0x7f,
0xfb,0xff,0xbf,0xff,0xff,0xff,0xff,0xf7,
0xff,0xff,0xff,0xfd,0xff,0xff,0xef,0xef,
0xed,0xff,0xff,0xfe,0xfd,0xff,0xff,0xdf,
0xff,0xff,0xfd,0xff,0xfd,0xb3,0xfd,0xef,
0x37,0xff,0x7c,0xf3,0xcf,0x7f,0xbf,0xff,
0xf3,0xc7,0x3f,0xff,0xfc,0xf3,0xe7,0xff,
0xfc,0xf7,0xcf,0xff,0x5f,0xfd,0x75,0xfb,
0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xfd,
0x7f,0xff,0xfb,0xef,0x5b,0xff,0xfe,0xef,
0xff,0xb7,0x7f,0x3e,0x6c,0x6f,0xbf,0xff,
0xfe,0xee,0xbf,0xff,0x7e,0xff,0xbf,0xff,
0xfe,0x7f,0xff,0xfb,0xff,0xff,0xff,0xff,
0xe7,0xff,0xeb,0x9f,0x77,0xfd,0xbf,0xf7,
0xfe,0xbb,0xfe,0xf9,0xef,0x7f,0x7f,0xfe,
0xf1,0xff,0x7d,0xbb,0xff,0xe3,0xff,0xff,
0xff,0xe7,0xeb,0xaf,0xbf,0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f,0x5f,0xfd,0xfe,0xff,0xff,0xf7,0xff,
0xff,0xff,0xfb,0xbf,0xff,0xfe,0xed,0xef,
0xff,0xff,0xff,0xcf,0xf7,0xdf,0x57,0xfb,
0xff,0xff,0x7f,0xfb,0xff,0xfb,0xd6,0xfe,
0xff,0xfe,0xff,0xff,0xbb,0xfe,0xff,0xfb,
0xff,0xfd,0x7f,0xff,0xdf,0x7f,0xff,0xbf,
0x7d,0x7f,0xff,0xfd,0xff,0xff,0xff,0xef,
0xff,0xfb,0xff,0xfd,0xfb,0xfe,0xff,0x4f,
0xf5,0xff,0xff,0xd7,0x5f,0xff,0xff,0xf5,
0xff,0x7f,0xff,0xff,0xff,0xd3,0x5f,0x7f,
0xfc,0xff,0x1f,0xff,0xfd,0xff,0xf7,0xff,
0xff,0xff,0xfd,0xf7,0xdb,0x47,0xff,0xfd,
0xff,0xaf,0xff,0xff,0xbf,0xfe,0xfa,0xff,
0xaf,0xfb,0xff,0xbf,0xff,0xff,0xbf,0xee,
0xfb,0xb7,0xdf,0x9f,0xfe,0xfb,0xff,0xfb,
0xfd,0xff,0xff,0x7f,0xff,0xbe,0xb7,0xef,
0x7f,0xff,0x7f,0xfd,0xff,0xff,0x7f,0xff,
0xfd,0xff,0xff,0xff,0xf7,0xef,0xff,0xff,
0xdf,0xf7,0xff,0x7f,0xff,0xff,0xf3,0xa7,
0xff,0x7f,0x7f,0xff,0xdf,0x7f,0x7f,0xdf,
0x3f,0xef,0xfd,0xff,0xe7,0xff,0xff,0xff,
0xd7,0x7f,0xff,0xbf,0xfd,0xff,0xff,0xff,
0xff,0xff,0xfd,0xfd,0xbf,0xfb,0xb7,0xbe,
0xbf,0x7f,0xff,0xff,0xff,0xfe,0xeb,0xff,
0xef,0xfb,0xfa,0xd3,0xbd,0x37,0xff,0xff,
0xff,0xff,0xff,0xff,0xfb,0xff,0xf7,0xff,
0xff,0xfe,0xff,0xff,0xff,0x7f,0xbe,0xff,
0xdf,0x7f,0xff,0xff,0xff,0xff,0xdf,0xe7,
0xff,0xff,0x6f,0xff,0x7f,0xff,0xbb,0xfa,
0xff,0xff,0xdb,0xff,0xff,0xff,0xf8,0xf7,
0x8f,0xff,0xff,0xfd,0xf3,0xff,0x7f,0xff,
0xfe,0x87,0xdf,0x7f,0xff,0xf3,0xff,0xff,
0xbf,0xff,0xf9,0xf6,0xdf,0x7f,0xff,0xbd,
0xc9,0xff,0xff,0xdf,0xeb,0xff,0xff,0xbf,
0xbf,0xff,0xfb,0xff,0xdf,0xff,0xfe,0xff,
0xef,0xf7,0xff,0xfd,0xff,0xff,0x9f,0xff,
0xdf,0xff,0xfe,0xdf,0xef,0xff,0xdf,0xff,
0xff,0x7d,0xbe,0xff,0xff,0xe7,0xff,0xfd,
0xba,0xfe,0xff,0x6b,0xf7,0xff,0xff,0x78,
0xdf,0xfc,0xf7,0xff,0xed,0xff,0xff,0xff,
0xff,0xff,0xff,0xfb,0x7e,0xff,0xfd,0xad,
0xb3,0xfe,0xff,0xe6,0xfb,0xff,0xff,0x7f,
0xfb,0xfd,0x77,0xff,0x7f,0xff,0xed,0xff,
0xd7,0xff,0xfe,0xff,0xfe,0x3f,0xff,0xff,
0xff,0xff,0xff,0xbf,0xf5,0x56,0xff,0xff,
0xff,0xfd,0xe7,0xff,0xb9,0xef,0xff,0xff,
0xfb,0xfd,0xf7,0xbf,0xfe,0xf7,0xfb,0xaf,
0xff,0xfe,0xfb,0xff,0xff,0xdf,0x7f,0xfd,
0xff,0xff,0xff,0xff,0xff,0xef,0xaf,0xff,
0xff,0xff,0xef,0xbf,0xff,0xf7,0xf0,0xcf,
0x9f,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,
0xff,0x7f,0xff,0xdf,0x7f,0xf9,0xf9,0xce,
0xff,0xdf,0xe5,0xf7,0xdf,0xfc,0xff,0x7f,
0xff,0x9f,0xff,0xff,0xff,0xe3,0xef,0x6e,
0xf5,0xff,0xf5,0xff,0x9f,0xfe,0xff,0xf9,
0xff,0xff,0xff,0xfb,0xff,0xff,0xcf,0xf7,
0xff,0x3e,0xff,0xfe,0xff,0x7f,0xe7,0xff,
0xff,0xff,0xff,0xfe,0xff,0xff,0x3f,0xff,
0x4e,0xaf,0xff,0xff,0xff,0xef,0xb7,0xff,
0xfe,0xfb,0xef,0xbf,0xdf,0xff,0xf7,0xdf,
0xff,0xff,0xff,0xf7,0x77,0xfe,0xfd,0xff,
0x7f,0xfe,0xf3,0xfb,0xff,0xff,0xff,0xff,
0xff,0xff,0xdb,0xff,0xff,0xf7,0xdf,0x3f,
0xfd,0xfd,0xd7,0xdf,0x7f,0xff,0xfe,0xff,
0xff,0xff,0xff,0xff,0xcf,0xbf,0xff,0xff,
0xff,0xff,0xf3,0xce,0xff,0xff,0xff,0xe7,
0xff,0xfb,0x37,0xc6,0xff,0xff,0xfe,0xfa,
0xf3,0xed,0x3f,0xff,0xfa,0xf3,0x8f,0xf7,
0xfe,0xfb,0xef,0xbf,0xef,0xff,0xeb,0xbd,
0xff,0xfe,0xfb,0xef,0xff,0xff,0xff,0xfb,
0xff,0xff,0xfb,0xbf,0x07,0xb6,0xff,0xff,
0xff,0xff,0xef,0xfe,0xff,0xff,0xff,0xff,
0xbf,0xfb,0xff,0xff,0xff,0xff,0xff,0x7f,
0xe7,0xfe,0xff,0xff,0xff,0xff,0xfe,0x6b,
0xff,0xbf,0xb7,0xca,0x7b,0xaf,0xe1,0xff,
0xdf,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,
0xef,0xbf,0xdd,0x7f,0xff,0xff,0xff,0xff,
0xff,0x5f,0xe7,0x9f,0x7f,0xff,0xaf,0xff,
0xff,0xff,0xeb,0xdf,0xff,0xff,0xfd,0xa1,
0xff,0xff,0xff,0xdb,0x3f,0xfb,0xff,0xf3,
0xfb,0x3f,0xbe,0xe8,0xf1,0xf7,0xcf,0x3f,
0xdf,0xcf,0xff,0x7b,0xff,0xfd,0xf7,0x4f,
0xfd,0xff,0xff,0xd3,0xfb,0xff,0xff,0xff,
0x2b,0x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d,0xff,0xff,
0xff,0xfb,0xfe,0xff,0xff,0xeb,0xff,0xbf,
0xff,0xfd,0xfe,0x7f,0xc9,0xff,0xff,0xff,
0x2f,0xbf,0xff,0xf7,0xff,0xf5,0xff,0xff,
0xff,0xff,0xff,0xbf,0xff,0x67,0xfb,0xff,
0xff,0xff,0xff,0xff,0xff,0xfd,0xf6,0x7f,
0xfb,0xff,0xfd,0xff,0xff,0xdf,0xfe,0xff,
0xff,0xbf,0xdd,0xff,0xff,0x7d,0xf7,0x7d,
0xff,0xff,0xff,0xf7,0xdf,0x7f,0xbf,0xff,
0x7d,0xfb,0xef,0xfd,0xff,0xdf,0xff,0xfd,
0xfd,0xfd,0xdf,0xff,0xfb,0xbb,0x7f,0xf5,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xab,0xaf,0xff,0xff,0xff,0xfb,0xff,
0xbe,0xff,0xff,0xef,0xbf,0xff,0xfe,0xff,
0x7f,0xff,0xfb,0xff,0xff,0xff,0xfe,0xff,
0x92,0xff,0x8f,0xff,0xff,0xdf,0xf1,0xdd,
0x3f,0xef,0xfd,0xf3,0xcf,0x3f,0xf7,0xff,
0xf3,0x2f,0xff,0xff,0xf3,0xcf,0xff,0xff,
0xfd,0xe3,0xcf,0x3e,0xff,0xfc,0x35,0xdd,
0xff,0x3f,0xfc,0xff,0xfb,0xff,0xff,0xff,
0xfe,0xfb,0xf9,0xef,0x5f,0xff,0xfe,0xfb,
0xff,0xbf,0xff,0xfb,0xfd,0xbf,0xff,0xfe,
0xff,0xef,0xff,0x7e,0xfd,0xbb,0xef,0xbf,
0xfd,0xf6,0xbf,0xe8,0xff,0xff,0xff,0xff,
0xff,0xf5,0xdf,0xaf,0xff,0xfd,0xff,0xe3,
0x9f,0xff,0xee,0xf1,0x0e,0xff,0xf5,0xfd,
0xe6,0xbf,0xfe,0xff,0xff,0xff,0x9e,0x7f,
0xff,0xff,0xff,0xfd,0x77,0xfe,0xfd,0xfb,
0xef,0xe7,0xff,0xef,0x7f,0xfd,0xff,0xfe,
0x7f,0xff,0xfc,0xe5,0xcf,0xfb,0xbd,0xff,
0xff,0xfe,0xfb,0xfd,0xf7,0xff,0xfe,0xff,
0xdd,0xf4,0xff,0xff,0xff,0x8f,0xfa,0xff,
0xdf,0xbf,0xbf,0xff,0xff,0xef,0xff,0xff,
0xff,0xff,0xeb,0xb7,0xef,0xff,0xfe,0xf7,
0xff,0xff,0xff,0xee,0xf3,0xbf,0xff,0xff,
0xff,0xf3,0xff,0xff,0xff,0xff,0x3f,0x0f,
0xff,0xff,0xeb,0xcf,0x9f,0xff,0x7f,0xdf,
0xff,0xf7,0xff,0xfa,0xff,0xff,0x37,0xcf,
0xec,0xe7,0xef,0xff,0xff,0xf3,0xcf,0xf7,
0xff,0x7f,0xff,0xe3,0xef,0xdf,0x7a,0xff,
0x93,0xd6,0xff,0x9f,0xff,0xff,0xfc,0xff,
0xfd,0x3e,0xff,0xff,0xd7,0x5f,0xff,0xff,
0x79,0xf3,0x3f,0xff,0xff,0xff,0xff,0x7f,
0xdd,0xff,0xff,0xfd,0x3c,0xff,0x7f,0xf3,
0xfd,0xea,0xf5,0xfe,0xff,0xff,0xff,0xfe,
0xff,0xff,0xb7,0xff,0xfd,0xff,0xff,0xff,
0xff,0xfd,0x9f,0xf7,0xfe,0x2f,0x3f,0xf5,
0x9f,0xff,0xff,0xff,0xff,0xdf,0x7f,0xff,
0xff,0xff,0xd7,0xb7,0xfd,0xff,0xff,0xff,
0xf5,0xff,0xff,0x3f,0xfb,0xff,0xff,0xdf,
0x7f,0xff,0xff,0xf7,0x39,0xff,0xff,0xe7,
0x89,0x67,0xfa,0xff,0xff,0xff,0x3f,0xff,
0xf9,0xff,0xff,0xff,0x1b,0xfd,0xff,0xff,
0xbf,0xbf,0xff,0xfb,0xef,0xed,0xff,0xfe,
0xfb,0xeb,0xef,0xff,0xfe,0xfe,0xa6,0xff,
0xfe,0xfa,0xeb,0xaf,0xff,0xfe,0xfb,0xef,
0xa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x7f,0xff,0xff,0xfb,0xff,
0xff,0xfe,0xff,0xfe,0xf3,0xf7,0xff,0xd7,
0xbf,0x7b,0xef,0xff,0xff,0x7f,0xff,0xf7,
0xff,0x15,0xfe,0xef,0x7f,0xeb,0xff,0xff,
0xbf,0xfe,0xff,0xff,0xbf,0xff,0xff,0xff,
0xef,0xff,0xb7,0xff,0x6f,0xff,0xff,0xfe,
0xfd,0xef,0xbf,0xfd,0xbe,0xef,0xff,0xdf,
0xff,0xff,0xff,0xf7,0xff,0x7f,0xff,0x5f,
0xff,0xff,0xfe,0xf6,0xff,0xff,0xff,0xb1,
0xfe,0xff,0x6f,0xfd,0xfb,0xff,0x7f,0xfd,
0xf4,0xd7,0xff,0xff,0xff,0xff,0xc7,0xff,
0xff,0xff,0xff,0xff,0x2f,0xff,0xff,0xff,
0xdf,0xfa,0xff,0xff,0xff,0xfe,0xff,0xff,
0xef,0xfd,0xff,0xff,0xd7,0xff,0xff,0xdf,
0xea,0x5e,0xbf,0xfe,0xff,0xbf,0xfd,0xbf,
0xbf,0xff,0xff,0xff,0xff,0x17,0xb9,0xff,
0xec,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xef,0xff,0xbf,0xff,0x7f,0xb7,
0xff,0xff,0xff,0xff,0xff,0xcf,0x7d,0xfb,
0xff,0xff,0x9f,0xff,0xff,0xff,0xbe,0xcb,
0xfe,0xfb,0xff,0xff,0xbf,0xff,0xdf,0x7f,
0xff,0xfd,0xff,0xff,0xff,0xff,0xef,0xff,
0xf3,0xdf,0xbd,0xff,0xdf,0x7f,0xff,0xfd,
0xfc,0xdf,0xff,0x3f,0xff,0x77,0xdf,0xff,
0x67,0xff,0xdf,0xff,0xfb,0xdf,0xfe,0xef,
0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,
0xfe,0xfa,0xfb,0xff,0xff,0xff,0xbf,0xff,
0xff,0xdd,0xff,0xff,0xff,0xb6,0xff,0xfe,
0xff,0xff,0xf3,0xff,0xf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0xfd,0xdf,
0xf5,0x97,0x5f,0xff,0xdf,0xef,0x17,0x5f,
0xff,0xf7,0xbf,0x36,0xef,0xd3,0x7e,0xfb,
0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,
0xfe,0xf7,0xff,0x7f,0x79,0xff,0xff,0xdf,
0xff,0xff,0xff,0xfd,0xd7,0xff,0x7f,0xff,
0x77,0xde,0x7f,0xff,0xbd,0xd9,0x9f,0x6b,
0xbe,0xdf,0x7f,0xff,0xff,0xf7,0xdf,0x7f,
0xff,0xfd,0xff,0xdf,0xff,0xff,0xfb,0xdf,
0x7f,0xff,0xff,0xff,0xcf,0x33,0xfe,0xff,
0xfb,0xcf,0x73,0xfe,0xfd,0xbf,0xcd,0xef,
0xff,0x4d,0xaa,0xeb,0xef,0xff,0xfe,0xfe,
0xfb,0xaf,0x3f,0xff,0xfb,0xfb,0xbf,0xef,
0xfb,0xeb,0xa7,0xff,0xfe,0xfb,0xeb,0xaf,
0xff,0xde,0xfb,0xcb,0xae,0x9f,0xfe,0x6f,
0xf6,0xff,0x5f,0x9a,0xfd,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xdb,0xff,0xff,0xff,
0xff,0xfd,0xff,0xee,0xff,0xff,0xff,0xf7,
0xef,0xe1,0xff,0xf5,0xdf,0xff,0xef,0xff,
0xdf,0xff,0xff,0xff,0xff,0xff,0xfe,0xfb,
0xff,0xf7,0x53,0xff,0xff,0xfd,0xff,0x7f,
0xff,0xff,0xff,0x5f,0x76,0xfb,0xff,0xfd,
0xf7,0xe7,0xad,0xff,0xaf,0xbf,0xfc,0x6f,
0xfc,0xff,0xfd,0xff,0xff,0xbf,0xff,0xe3,
0x93,0xff,0x7f,0xbf,0xf6,0xef,0xbf,0xff,
0xd4,0xf7,0xef,0xff,0xff,0x95,0xb7,0xef,
0xaf,0xff,0xbf,0x1f,0x7c,0xfe,0xef,0xaf,
0xbf,0xed,0xb6,0x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ff,0xab,0xfb,0xff,
0xaf,0xff,0xf7,0xfb,0xff,0x9f,0xff,0xd7,
0xff,0xff,0xdf,0xff,0xff,0xef,0xff,0xdf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xf7,0xf7,0x7f,0xff,0xff,0x3f,0xff,0xfc,
0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xef,
0x7f,0xfe,0xff,0xf7,0xff,0xfd,0xff,0xff,
0xfd,0xff,0xbf,0xff,0xff,0xff,0xff,0xff,
0xff,0x9f,0xff,0xff,0x7b,0xff,0x7f,0xf6,
0xff,0x7d,0x9f,0xfe,0x77,0xff,0xff,0xdf,
0x7f,0x7f,0xf3,0xff,0xff,0x7f,0xff,0xef,
0xff,0xff,0xff,0xff,0xff,0xef,0xff,0x7f,
0xfe,0xef,0xf7,0xfe,0xff,0xff,0xff,0xff,
0xdf,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,
0xff,0xff,0xeb,0x83,0xff,0x8f,0xff,0xdf,
0xfd,0xfb,0xdf,0xff,0xff,0xf8,0xe3,0xff,
0x7f,0xff,0xfc,0xfd,0x1f,0xeb,0xb8,0xff,
0xff,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,
0xfc,0xff,0xff,0x7f,0xbf,0xfc,0xff,0xfd,
0xff,0xef,0xdf,0xff,0xfb,0xff,0xbf,0xff,
0xfe,0xff,0xfb,0xe7,0xff,0x7f,0xf4,0xbf,
0xff,0xff,0xff,0xff,0xff,0xff,0xf6,0xff,
0xff,0xe7,0xff,0xff,0xff,0xfb,0xeb,0xff,
0xff,0xfe,0xff,0xff,0x72,0xff,0x2f,0xfb,
0xfd,0xff,0xff,0xbf,0xff,0xfd,0xfb,0xfe,
0xfe,0xfd,0xf7,0xef,0xbf,0xbb,0xfe,0xff,
0xeb,0xff,0xff,0xff,0xff,0xcb,0xff,0x4f,
0xfe,0xff,0xfe,0x7f,0xff,0xd7,0xff,0xef,
0xfd,0xef,0xff,0xff,0xff,0xfd,0xff,0xdf,
0xff,0xff,0xff,0xd5,0x7f,0xff,0xfd,0xe7,
0xff,0x7f,0xfe,0xff,0x6f,0xbf,0x77,0xff,
0x5f,0xf8,0xff,0xff,0xff,0xff,0xff,0xdf,
0xff,0xaf,0xff,0xff,0xff,0xef,0xf3,0xff,
0x3f,0xff,0xff,0xff,0xfe,0xf7,0xfc,0xf3,
0xbf,0xff,0xff,0xfb,0xbf,0xff,0xff,0xff,
0xfb,0xff,0x01,0xff,0xff,0xf8,0xff,0xff,
0xff,0x7a,0xfe,0xff,0xff,0xff,0xff,0xff,
0xff,0xbf,0xfe,0xff,0xe3,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,
0xff,0xff,0xff,0x23,0xd6,0xff,0xcf,0xff,
0xff,0xff,0xd7,0xfd,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xf9,0x67,0x3f,0xff,0xdf,
0x7f,0xff,0xff,0xf3,0xff,0xe7,0xff,0xff,
0xf7,0xff,0xe7,0xff,0xea,0xf2,0xfe,0xff,
0xff,0xff,0xff,0xfb,0xff,0xbf,0xff,0xfe,
0xfb,0xef,0xbf,0xff,0xfe,0xfb,0xbf,0xff,
0xff,0xf9,0xe7,0xbf,0x7f,0x4e,0xfb,0xef,
0xda,0x7f,0xae,0x9d,0xe7,0xd7,0x97,0xfd,
0xff,0xff,0xff,0xff,0xb7,0xff,0x7f,0xfb,
0xed,0xb7,0xdf,0x7f,0xfb,0xed,0xb7,0x7f,
0xfd,0xfd,0xb7,0xdf,0x7e,0xfb,0x6c,0xa7,
0x5d,0xf7,0xfe,0x6d,0xef,0x9c,0xfe,0xfb,
0xfd,0xff,0xef,0xbf,0xff,0xfe,0xfa,0xef,
0xaf,0xbf,0xfe,0xfa,0xe3,0xaf,0xbf,0xfe,
0xfa,0xae,0xbf,0x7e,0xfa,0xe9,0xa7,0xbf,
0xf6,0x0a,0x69,0xbf,0x9f,0xf6,0xfb,0xeb,
0xff,0x61,0xff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f5,0xff,0xef,0xff,0xff,
0xfe,0xff,0xbf,0xdf,0xdf,0x7f,0xff,0xf5,
0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,
0xf7,0xff,0x7f,0xff,0xff,0xfd,0xd7,0xff,
0x7f,0xff,0xf7,0xff,0xaf,0xff,0xff,0xfe,
0xfb,0xef,0xef,0xff,0xff,0xfe,0xf3,0xef,
0xff,0xff,0xfd,0xf7,0xdf,0xff,0xff,0xff,
0xff,0xbf,0xff,0xff,0xfb,0xff,0xbf,0xff,
0xff,0xff,0xef,0xff,0xff,0x3f,0xfc,0xff,
0xff,0xff,0xff,0xff,0xfb,0xff,0xb7,0xb7,
0xde,0xfb,0xef,0xaf,0xbf,0xfe,0xfa,0xbf,
0xff,0xfe,0xfb,0xed,0xbf,0xdf,0xfe,0x7b,
0xef,0xbf,0xff,0xde,0xfb,0xed,0xff,0xe5,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xf4,0xdf,0x4f,0xff,0xff,
0xff,0xff,0x4f,0xff,0xfd,0xf4,0xdb,0xff,
0x47,0xff,0xff,0xf5,0xd7,0x5f,0x7f,0xfd,
0xf5,0xd7,0x5f,0x3f,0xfd,0xf5,0xd3,0x5f,
0x7f,0xbd,0xc7,0x5f,0x77,0xfd,0x75,0xd7,
0x5f,0x7f,0xfd,0x75,0xd7,0x5e,0x77,0xbd,
0xf5,0x7f,0xf8,0xff,0xe3,0x8f,0x3f,0xfe,
0xfc,0xff,0xcf,0x3f,0xff,0xfe,0xf3,0xcf,
0x3f,0xff,0xfc,0xff,0xff,0xfd,0xf8,0xf2,
0xcf,0x3f,0xff,0xbc,0xe3,0xff,0x2f,0xff,
0xff,0xf2,0xff,0x8d,0xff,0xf7,0xdf,0x7f,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd7,
0xff,0xef,0xdf,0x7f,0xee,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x7f,0xd7,0xfe,0xff,
0xff,0xff,0xff,0xfe,0xe7,0xfe,0x7f,0xff,
0xfd,0xf7,0xcf,0xff,0xff,0xfc,0xf3,0xdf,
0xff,0xff,0xfc,0xf3,0xcf,0xbf,0xff,0xff,
0xcf,0x3f,0xff,0xfc,0xd3,0xcf,0xff,0xff,
0xff,0xf3,0xff,0x3d,0x7f,0x7f,0xf6,0xff,
0xff,0xff,0xff,0x7f,0xfd,0xff,0xd7,0x5f,
0x7f,0xfd,0xf5,0xc7,0xdf,0x7f,0xfd,0xd7,
0x5f,0x7f,0xfd,0xf5,0xd7,0x5f,0xff,0xfd,
0xf5,0xc7,0x1f,0x7f,0xfc,0xff,0xff,0xb7,
0xff,0xff,0xff,0xff,0xff,0xdb,0xff,0x7f,
0xed,0xb5,0xd7,0x5f,0xbf,0xff,0xf7,0xd7,
0x7a,0xfd,0xf5,0xd5,0x5f,0x7f,0xfd,0xf5,
0xfb,0xaf,0x7f,0xbf,0xfd,0xf7,0xff,0xff,
0x7f,0xfd,0xff,0xff,0xef,0xcf,0xff,0xff,
0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,
0xff,0x7f,0xff,0x7f,0xff,0xff,0xdf,0xff,
0x3f,0xff,0xfe,0xfb,0xff,0xff,0xff,0xff,
0xfd,0xff,0xee,0xff,0xff,0xff,0xbf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xbf,0xfe,0xff,0x73,0xff,0xbf,0xf7,0xff,
0xff,0xff,0xff,0xff,0xff,0x7f,0xdf,0xff,
0xff,0xf3,0xff,0x17,0xff,0xff,0xcf,0xdf,
0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,0x3f,0xf9,0xff,0xff,
0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xd7,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xfe,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,
0xfb,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xe5,0xff,0xff,0xff,0x7f,0xff,0xef,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xfc,0xfb,0xfd,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xb1,0xff,0xff,0xff,0xff,0xfd,
0xff,0xff,0xfe,0xff,0xef,0xff,0xff,0xff,
0xff,0xef,0xaf,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0x3f,0xdc,0xff,0xf9,0xe7,
0x9f,0x7f,0xfe,0xf9,0x67,0x9f,0x7f,0xfe,
0xf9,0xe7,0x9f,0x7e,0xfe,0xe7,0x9f,0x7f,
0xfe,0xf9,0xe7,0x9f,0x7f,0xfe,0xf9,0xe7,
0x9f,0x7f,0xfe,0xf9,0x7f,0xea,0xff,0xdf,
0x7b,0xff,0xfd,0xf7,0xdf,0x7f,0xf9,0xfd,
0xf7,0xdf,0x7f,0xff,0xfd,0xf7,0x7f,0xff,
0xfd,0xf7,0xdf,0x7f,0xff,0xfd,0xd7,0xdf,
0x7f,0xff,0xfd,0xf7,0xdf,0xff,0x07,0xff,
0x7f,0xf7,0xfd,0xf7,0xdf,0x7f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xbf,0xf7,0xfe,0xfb,0xef,0xb7,
0xff,0xfe,0xfb,0xef,0xbf,0xfd,0xfe,0xff,
0xe0,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfe,0x3f,0xff,0xbf,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0xbe,0xfb,0xee,0xbf,0xff,0xfe,
0xfa,0xef,0xcd,0xfe,0xfb,0xef,0xbf,0xfe,
0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0x3f,0xfb,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xbf,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xc3,0xf7,0xbf,0xff,
0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xfb,0xef,
0xbf,0xff,0xfe,0xfb,0xef,0xfe,0xfe,0xfb,
0xef,0xbd,0xff,0xfe,0xfb,0xef,0xbf,0xff,
0xee,0xfb,0xef,0xbf,0xff,0xaf,0x9e,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,
0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,
0xff,0xff,0xef,0xff,0xff,0xff,0xfb,0xff,
0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0x7f,
0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x83,0xbf,0xff,0x3f,0xff,0xff,0xff,0xcf,
0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,
0xff,0xef,0xff,0xff,0xfd,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xfb,0x9d,0x7c,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xfb,
0xff,0xbf,0xff,0xfe,0xfb,0xef,0xbf,0xff,
0xfe,0xfb,0xff,0xbf,0xfe,0xfb,0xef,0xbf,
0xff,0xfe,0xfb,0xef,0xbf,0xff,0xfe,0xfb,
0xef,0xbf,0xff,0xff,0x0f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xbf,0xf9,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdb,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xdf,0xfe,0xff,0xdf,0x7f,0xff,0xfd,0xf7,
0xdf,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,0xff,
0xfd,0xf7,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,
0xff,0xfd,0xf7,0xdf,0x7f,0xff,0xfd,0xf7,
0x3f,0x7f,0xf1,0xfe,0xf7,0xdf,0x3f,0xff,
0xfd,0xf7,0xdf,0x7f,0xff,0xfd,0xf7,0xdf,
0x7f,0xff,0xfc,0xdd,0x7f,0xff,0xfd,0xf7,
0xdf,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,0xff,
0xfd,0xf7,0xf7,0xab,0xff,0xff,0xfd,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x9f,0xfd,0x7f,0xff,
0xfd,0xff,0xd7,0x7f,0xff,0xfd,0xf7,0xdf,
0x7f,0xff,0xfd,0xf7,0xf7,0xff,0xfd,0xf7,
0xdf,0x7f,0xff,0xfd,0xf7,0xdf,0x7f,0xff,
0xfd,0xf7,0xdf,0x7f,0x7f,0xff,0xef,0xff,
0x7e,0xd7,0xdf,0xde,0xfd,0xf5,0xd7,0x5f,
0x7f,0xfd,0xf5,0xd7,0x5f,0xdf,0xfb,0xdd,
0x5f,0x7f,0xfd,0xf5,0xd7,0x5f,0x7f,0xfd,
0xf5,0xd7,0x5f,0x7f,0xfd,0xf5,0x7d,0x6a,
0xff,0xff
};
| 125,124 |
5,534 | <reponame>qq940328720/dubbo
package com.alibaba.dubbo.examples.jackson.api;
import java.util.Date;
/**
* Created by dylan on 14-11-22.
*/
public class InheritBean extends AbstractInheritBean {
private String address = "ShangHai";
private Date birthDate = new Date();
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
@Override
public String toString() {
return "InheritBean{" +
"address='" + address + '\'' +
", birthDate=" + birthDate +
"} " + super.toString();
}
}
| 340 |
320 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.gde.materialdefinition.utils;
import com.jme3.gde.materialdefinition.dialog.AddNodeDialog;
import com.jme3.gde.core.editor.icons.Icons;
import com.jme3.shader.ShaderNodeDefinition;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.text.BadLocationException;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
import javax.swing.text.StyleContext;
import javax.swing.text.StyledDocument;
/**
*
* @author Nehon
*/
public class DocFormatter {
private static DocFormatter instance;
private Style regStyle = StyleContext.getDefaultStyleContext().
getStyle(StyleContext.DEFAULT_STYLE);
private DocFormatter() {
}
public static DocFormatter getInstance() {
if (instance == null) {
instance = new DocFormatter();
}
return instance;
}
private void makeStyles(StyledDocument doc) {
Style s1 = doc.addStyle("regular", regStyle);
StyleConstants.setFontFamily(s1, "SansSerif");
Style s2 = doc.addStyle("bold", s1);
StyleConstants.setBold(s2, true);
Style icon = doc.addStyle("input", s1);
StyleConstants.setAlignment(icon, StyleConstants.ALIGN_CENTER);
StyleConstants.setSpaceAbove(icon, 8);
StyleConstants.setIcon(icon, Icons.in);
Style icon2 = doc.addStyle("output", s1);
StyleConstants.setAlignment(icon2, StyleConstants.ALIGN_CENTER);
StyleConstants.setSpaceAbove(icon2, 8);
StyleConstants.setIcon(icon2, Icons.out);
}
public static void addDoc(ShaderNodeDefinition def, StyledDocument doc) {
if (doc.getStyle("regular") == null) {
getInstance().makeStyles(doc);
}
try {
String[] lines = def.getDocumentation().split("\\n");
doc.insertString(doc.getLength(), "Shader type : " + def.getType().toString() + "\n", doc.getStyle("regular"));
for (int i = 0; i < def.getShadersLanguage().size(); i++) {
doc.insertString(doc.getLength(), "Shader : " + def.getShadersLanguage().get(i) + " " + def.getShadersPath().get(i) + "\n", doc.getStyle("regular"));
}
// doc.insertString(doc.getLength(), "\n", doc.getStyle("regular"));
for (String string : lines) {
String l = string.trim() + "\n";
if (l.startsWith("@input")) {
l = l.substring(6).trim();
int spaceIdx = l.indexOf(' ');
doc.insertString(doc.getLength(), "\n", doc.getStyle("regular"));
doc.insertString(doc.getLength(), " ", doc.getStyle("input"));
doc.insertString(doc.getLength(), l.substring(0, spaceIdx), doc.getStyle("bold"));
doc.insertString(doc.getLength(), l.substring(spaceIdx), doc.getStyle("regular"));
} else if (l.startsWith("@output")) {
l = l.substring(7).trim();
int spaceIdx = l.indexOf(' ');
doc.insertString(doc.getLength(), "\n", doc.getStyle("regular"));
doc.insertString(doc.getLength(), " ", doc.getStyle("output"));
doc.insertString(doc.getLength(), l.substring(0, spaceIdx), doc.getStyle("bold"));
doc.insertString(doc.getLength(), l.substring(spaceIdx), doc.getStyle("regular"));
} else {
doc.insertString(doc.getLength(), l, doc.getStyle("regular"));
}
}
} catch (BadLocationException ex) {
Logger.getLogger(AddNodeDialog.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
| 1,825 |
598 | <reponame>qtweng/trafficcontrol
/*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.traffic_control.traffic_router.core.dns;
import org.apache.traffic_control.traffic_router.core.edge.CacheRegister;
import org.apache.traffic_control.traffic_router.core.router.StatTracker;
import org.apache.traffic_control.traffic_router.core.router.StatTracker.Track.ResultType;
import org.apache.traffic_control.traffic_router.core.router.TrafficRouterManager;
import org.apache.traffic_control.traffic_router.core.util.TrafficOpsUtils;
import org.apache.traffic_control.traffic_router.core.router.TrafficRouter;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.xbill.DNS.ARecord;
import org.xbill.DNS.DClass;
import org.xbill.DNS.NSECRecord;
import org.xbill.DNS.Name;
import org.xbill.DNS.RRSIGRecord;
import org.xbill.DNS.Record;
import org.xbill.DNS.SOARecord;
import org.xbill.DNS.SetResponse;
import org.xbill.DNS.Type;
import org.xbill.DNS.Zone;
import java.net.InetAddress;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.*;
import static org.powermock.api.mockito.PowerMockito.doCallRealMethod;
import static org.powermock.api.mockito.PowerMockito.whenNew;
@RunWith(PowerMockRunner.class)
@PrepareForTest({ZoneManager.class, SignatureManager.class})
public class ZoneManagerUnitTest {
ZoneManager zoneManager;
@Before
public void before() throws Exception {
TrafficRouter trafficRouter = mock(TrafficRouter.class);
CacheRegister cacheRegister = mock(CacheRegister.class);
when(trafficRouter.getCacheRegister()).thenReturn(cacheRegister);
PowerMockito.spy(ZoneManager.class);
PowerMockito.stub(PowerMockito.method(ZoneManager.class, "initTopLevelDomain")).toReturn(null);
PowerMockito.stub(PowerMockito.method(ZoneManager.class, "initZoneCache")).toReturn(null);
SignatureManager signatureManager = PowerMockito.mock(SignatureManager.class);
whenNew(SignatureManager.class).withArguments(any(ZoneManager.class), any(CacheRegister.class), any(TrafficOpsUtils.class), any(TrafficRouterManager.class)).thenReturn(signatureManager);
zoneManager = spy(new ZoneManager(trafficRouter, new StatTracker(), null, mock(TrafficRouterManager.class)));
}
@Test
public void itMarksResultTypeAndLocationInDNSAccessRecord() throws Exception {
final Name qname = Name.fromString("edge.www.google.com.");
final InetAddress client = InetAddress.getByName("192.168.56.78");
SetResponse setResponse = mock(SetResponse.class);
when(setResponse.isSuccessful()).thenReturn(false);
Zone zone = mock(Zone.class);
when(zone.findRecords(any(Name.class), anyInt())).thenReturn(setResponse);
when(zone.getOrigin()).thenReturn(new Name(qname, 1));
DNSAccessRecord.Builder builder = new DNSAccessRecord.Builder(1L, client);
builder = spy(builder);
doReturn(zone).when(zoneManager).getZone(qname, Type.A);
doCallRealMethod().when(zoneManager).getZone(qname, Type.A, client, false, builder);
zoneManager.getZone(qname, Type.A, client, false, builder);
verify(builder).resultType(any(ResultType.class));
verify(builder).resultLocation(null);
}
@Test
public void testZonesAreEqual() throws java.net.UnknownHostException, org.xbill.DNS.TextParseException {
class TestCase {
String reason;
Record[] r1;
Record[] r2;
boolean expected;
TestCase(String r, Record[] a, Record[] b, boolean e) {
reason = r;
r1 = a;
r2 = b;
expected = e;
}
}
final TestCase[] testCases = {
new TestCase("empty lists are equal", new Record[]{}, new Record[]{}, true),
new TestCase("different length lists are unequal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4"))
}, new Record[]{}, false),
new TestCase("same records but different order lists are equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
}, new Record[]{
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
}, true),
new TestCase("same non-empty lists are equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
}, new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
}, true),
new TestCase("lists that only differ in the SOA serial number are equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 1, 60, 1, 1, 1),
}, new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 2, 60, 1, 1, 1),
}, true),
new TestCase("lists that differ in the SOA (other than the serial number) are not equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 1, 60, 1, 1, 1),
}, new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 61, new Name("example.com."), new Name("example.com."), 2, 60, 1, 1, 1),
}, false),
new TestCase("lists that only differ in NSEC or RRSIG records are equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 1, 60, 1, 1, 1),
new NSECRecord(new Name("foo.example.com."), DClass.IN, 60, new Name("example.com."), new int[]{1}),
new RRSIGRecord(new Name("foo.example.com."), DClass.IN, 60, 1, 1, 60, new Date(), new Date(), 1, new Name("example.com."), new byte[]{1})
}, new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 2, 60, 1, 1, 1),
}, true),
new TestCase("lists that only differ in NSEC or RRSIG records are equal", new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 1, 60, 1, 1, 1),
}, new Record[]{
new ARecord(new Name("foo.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.4")),
new ARecord(new Name("bar.example.com."), DClass.IN, 60, InetAddress.getByName("1.2.3.5")),
new SOARecord(new Name("example.com."), DClass.IN, 60, new Name("example.com."), new Name("example.com."), 2, 60, 1, 1, 1),
new NSECRecord(new Name("foo.example.com."), DClass.IN, 60, new Name("example.com."), new int[]{1}),
new RRSIGRecord(new Name("foo.example.com."), DClass.IN, 60, 1, 1, 60, new Date(), new Date(), 1, new Name("example.com."), new byte[]{1})
}, true),
};
for (TestCase t : testCases) {
List<Record> input1 = Arrays.asList(t.r1);
List<Record> input2 = Arrays.asList(t.r2);
List<Record> copy1 = Arrays.asList(t.r1);
List<Record> copy2 = Arrays.asList(t.r2);
boolean actual = ZoneManager.zonesAreEqual(input1, input2);
assertThat(t.reason, actual, equalTo(t.expected));
// assert that the input lists were not modified
assertThat("zonesAreEqual input lists should not be modified", input1, equalTo(copy1));
assertThat("zonesAreEqual input lists should not be modified", input2, equalTo(copy2));
}
}
}
| 5,026 |
1,169 | {"name": "SnapchatRemix", "subtitle": "Take a photo, then draw on it in different colors.", "description": "Make an app that can take a photo and set it as the background, draw different-colored dots and lines on the photo, and sends the photo to your friends. Inspired by NPR story <a href='https://www.npr.org/2017/03/02/518197167/snapchat-goes-public-in-largest-tech-ipo-since-alibaba' target='_blank'>Snapchat Goes Public In Largest Tech IPO Since Alibaba</a>.", "screenshot": "screenshot.png", "thumbnail":"thumbnail.png"}
| 154 |
403 | <filename>snippets/springboot-keycloak-sso/plain-springboot-adapter/src/main/java/com/camunda/consulting/sso/WebAppSecurityConfig.java
package com.camunda.consulting.sso;
import java.util.Collections;
import org.camunda.bpm.webapp.impl.security.auth.ContainerBasedAuthenticationFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.filter.ForwardedHeaderFilter;
/**
* Camunda Web application SSO configuration for usage with
* KeycloakIdentityProviderPlugin.
*/
@ConditionalOnMissingClass("org.springframework.test.context.junit.jupiter.SpringExtension")
@Configuration
@Order(SecurityProperties.BASIC_AUTH_ORDER - 10)
public class WebAppSecurityConfig extends WebSecurityConfigurerAdapter {
private final KeycloakLogoutHandler keycloakLogoutHandler;
@Autowired
public WebAppSecurityConfig(KeycloakLogoutHandler keycloakLogoutHandler) {
this.keycloakLogoutHandler = keycloakLogoutHandler;
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().ignoringAntMatchers("/camunda/api/**", "/engine-rest/**").and().requestMatchers().antMatchers("/**")
.and()
.authorizeRequests(authorizeRequests -> authorizeRequests.antMatchers("/camunda/app/**", "/api/**", "/lib/**")
.authenticated().anyRequest().permitAll())
.oauth2Login().and().logout().logoutRequestMatcher(new AntPathRequestMatcher("/camunda/app/**/logout"))
.logoutSuccessHandler(this.keycloakLogoutHandler);
}
@Bean
public FilterRegistrationBean<ContainerBasedAuthenticationFilter> containerBasedAuthenticationFilter() {
FilterRegistrationBean<ContainerBasedAuthenticationFilter> filterRegistration = new FilterRegistrationBean<>();
filterRegistration.setFilter(new ContainerBasedAuthenticationFilter());
filterRegistration.setInitParameters(
Collections.singletonMap("authentication-provider", KeycloakAuthenticationProvider.class.getName()));
filterRegistration.setOrder(101); // make sure the filter is registered
// after the Spring Security Filter Chain
filterRegistration.addUrlPatterns("/camunda/app/*");
return filterRegistration;
}
// The ForwardedHeaderFilter is required to correctly assemble the redirect
// URL
// for OAUth2 login.
// Without the filter, Spring generates an HTTP URL even though the container
// route is accessed through HTTPS.
@Bean
public FilterRegistrationBean<ForwardedHeaderFilter> forwardedHeaderFilter() {
FilterRegistrationBean<ForwardedHeaderFilter> filterRegistrationBean = new FilterRegistrationBean<>();
filterRegistrationBean.setFilter(new ForwardedHeaderFilter());
filterRegistrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return filterRegistrationBean;
}
@Bean
@Order(0)
public RequestContextListener requestContextListener() {
return new RequestContextListener();
}
}
| 1,098 |
432 | /*
* Copyright (C) 1986-2005 The Free Software Foundation, Inc.
*
* Portions Copyright (C) 1998-2005 <NAME>, Ximbiot <http://ximbiot.com>,
* and others.
*
* Portions Copyright (C) 1992, <NAME> and <NAME>
* Portions Copyright (C) 1989-1992, <NAME>
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
*/
#include "cvs.h"
#include "getline.h"
#include "history.h"
/*
* Parse the INFOFILE file for the specified REPOSITORY. Invoke CALLPROC for
* the first line in the file that matches the REPOSITORY, or if ALL != 0, any
* lines matching "ALL", or if no lines match, the last line matching
* "DEFAULT".
*
* Return 0 for success, -1 if there was not an INFOFILE, and >0 for failure.
*/
int
Parse_Info (const char *infofile, const char *repository, CALLPROC callproc,
int opt, void *closure)
{
int err = 0;
FILE *fp_info;
char *infopath;
char *line = NULL;
size_t line_allocated = 0;
char *default_value = NULL;
int default_line = 0;
char *expanded_value;
bool callback_done;
int line_number;
char *cp, *exp, *value;
const char *srepos;
const char *regex_err;
assert (repository);
if (!current_parsed_root)
{
/* XXX - should be error maybe? */
error (0, 0, "CVSROOT variable not set");
return 1;
}
/* find the info file and open it */
infopath = Xasprintf ("%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, infofile);
fp_info = CVS_FOPEN (infopath, "r");
if (!fp_info)
{
/* If no file, don't do anything special. */
if (!existence_error (errno))
error (0, errno, "cannot open %s", infopath);
free (infopath);
return 0;
}
/* strip off the CVSROOT if repository was absolute */
srepos = Short_Repository (repository);
TRACE (TRACE_FUNCTION, "Parse_Info (%s, %s, %s)",
infopath, srepos, (opt & PIOPT_ALL) ? "ALL" : "not ALL");
/* search the info file for lines that match */
callback_done = false;
line_number = 0;
while (getline (&line, &line_allocated, fp_info) >= 0)
{
line_number++;
/* skip lines starting with # */
if (line[0] == '#')
continue;
/* skip whitespace at beginning of line */
for (cp = line; *cp && isspace ((unsigned char) *cp); cp++)
;
/* if *cp is null, the whole line was blank */
if (*cp == '\0')
continue;
/* the regular expression is everything up to the first space */
for (exp = cp; *cp && !isspace ((unsigned char) *cp); cp++)
;
if (*cp != '\0')
*cp++ = '\0';
/* skip whitespace up to the start of the matching value */
while (*cp && isspace ((unsigned char) *cp))
cp++;
/* no value to match with the regular expression is an error */
if (*cp == '\0')
{
error (0, 0, "syntax error at line %d file %s; ignored",
line_number, infopath);
continue;
}
value = cp;
/* strip the newline off the end of the value */
cp = strrchr (value, '\n');
if (cp) *cp = '\0';
/*
* At this point, exp points to the regular expression, and value
* points to the value to call the callback routine with. Evaluate
* the regular expression against srepos and callback with the value
* if it matches.
*/
/* save the default value so we have it later if we need it */
if (strcmp (exp, "DEFAULT") == 0)
{
if (default_value)
{
error (0, 0, "Multiple `DEFAULT' lines (%d and %d) in %s file",
default_line, line_number, infofile);
free (default_value);
}
default_value = xstrdup (value);
default_line = line_number;
continue;
}
/*
* For a regular expression of "ALL", do the callback always We may
* execute lots of ALL callbacks in addition to *one* regular matching
* callback or default
*/
if (strcmp (exp, "ALL") == 0)
{
if (!(opt & PIOPT_ALL))
error (0, 0, "Keyword `ALL' is ignored at line %d in %s file",
line_number, infofile);
else if ((expanded_value =
expand_path (value, current_parsed_root->directory,
true, infofile, line_number)))
{
err += callproc (repository, expanded_value, closure);
free (expanded_value);
}
else
err++;
continue;
}
if (callback_done)
/* only first matching, plus "ALL"'s */
continue;
/* see if the repository matched this regular expression */
regex_err = re_comp (exp);
if (regex_err)
{
error (0, 0, "bad regular expression at line %d file %s: %s",
line_number, infofile, regex_err);
continue;
}
if (re_exec (srepos) == 0)
continue; /* no match */
/* it did, so do the callback and note that we did one */
expanded_value = expand_path (value, current_parsed_root->directory,
true, infofile, line_number);
if (expanded_value)
{
err += callproc (repository, expanded_value, closure);
free (expanded_value);
}
else
err++;
callback_done = true;
}
if (ferror (fp_info))
error (0, errno, "cannot read %s", infopath);
if (fclose (fp_info) < 0)
error (0, errno, "cannot close %s", infopath);
/* if we fell through and didn't callback at all, do the default */
if (!callback_done && default_value)
{
expanded_value = expand_path (default_value,
current_parsed_root->directory,
true, infofile, line_number);
if (expanded_value)
{
err += callproc (repository, expanded_value, closure);
free (expanded_value);
}
else
err++;
}
/* free up space if necessary */
if (default_value) free (default_value);
free (infopath);
if (line) free (line);
return err;
}
/* Print a warning and return false if P doesn't look like a string specifying
* something that can be converted into a size_t.
*
* Sets *VAL to the parsed value when it is found to be valid. *VAL will not
* be altered when false is returned.
*/
static bool
readSizeT (const char *infopath, const char *option, const char *p,
size_t *val)
{
const char *q;
size_t num, factor = 1;
if (!strcasecmp ("unlimited", p))
{
*val = SIZE_MAX;
return true;
}
/* Record the factor character (kilo, mega, giga, tera). */
if (!isdigit (p[strlen(p) - 1]))
{
switch (p[strlen(p) - 1])
{
case 'T':
factor = xtimes (factor, 1024);
case 'G':
factor = xtimes (factor, 1024);
case 'M':
factor = xtimes (factor, 1024);
case 'k':
factor = xtimes (factor, 1024);
break;
default:
error (0, 0,
"%s: Unknown %s factor: `%c'",
infopath, option, p[strlen(p)]);
return false;
}
TRACE (TRACE_DATA, "readSizeT(): Found factor %u for %s",
factor, option);
}
/* Verify that *q is a number. */
q = p;
while (q < p + strlen(p) - 1 /* Checked last character above. */)
{
if (!isdigit(*q))
{
error (0, 0,
"%s: %s must be a postitive integer, not '%s'",
infopath, option, p);
return false;
}
q++;
}
/* Compute final value. */
num = strtoul (p, NULL, 10);
if (num == ULONG_MAX || num > SIZE_MAX)
/* Don't return an error, just max out. */
num = SIZE_MAX;
TRACE (TRACE_DATA, "readSizeT(): read number %u for %s", num, option);
*val = xtimes (strtoul (p, NULL, 10), factor);
TRACE (TRACE_DATA, "readSizeT(): returnning %u for %s", *val, option);
return true;
}
/* Allocate and initialize a new config struct. */
static inline struct config *
new_config (void)
{
struct config *new = xcalloc (1, sizeof (struct config));
TRACE (TRACE_FLOW, "new_config ()");
new->logHistory = xstrdup (ALL_HISTORY_REC_TYPES);
new->RereadLogAfterVerify = LOGMSG_REREAD_ALWAYS;
new->UserAdminOptions = xstrdup ("k");
new->MaxCommentLeaderLength = 20;
#ifdef SERVER_SUPPORT
new->MaxCompressionLevel = 9;
#endif /* SERVER_SUPPORT */
#ifdef PROXY_SUPPORT
new->MaxProxyBufferSize = (size_t)(8 * 1024 * 1024); /* 8 megabytes,
* by default.
*/
#endif /* PROXY_SUPPORT */
#ifdef AUTH_SERVER_SUPPORT
new->system_auth = true;
#endif /* AUTH_SERVER_SUPPORT */
return new;
}
void
free_config (struct config *data)
{
if (data->keywords) free_keywords (data->keywords);
free (data);
}
/* Return true if this function has already been called for line LN of file
* INFOPATH.
*/
bool
parse_error (const char *infopath, unsigned int ln)
{
static List *errors = NULL;
char *nodename = NULL;
if (!errors)
errors = getlist();
nodename = Xasprintf ("%s/%u", infopath, ln);
if (findnode (errors, nodename))
{
free (nodename);
return true;
}
push_string (errors, nodename);
return false;
}
#ifdef ALLOW_CONFIG_OVERRIDE
const char * const allowed_config_prefixes[] = { ALLOW_CONFIG_OVERRIDE };
#endif /* ALLOW_CONFIG_OVERRIDE */
/* Parse the CVS config file. The syntax right now is a bit ad hoc
* but tries to draw on the best or more common features of the other
* *info files and various unix (or non-unix) config file syntaxes.
* Lines starting with # are comments. Settings are lines of the form
* KEYWORD=VALUE. There is currently no way to have a multi-line
* VALUE (would be nice if there was, probably).
*
* CVSROOT is the $CVSROOT directory
* (current_parsed_root->directory might not be set yet, so this
* function takes the cvsroot as a function argument).
*
* RETURNS
* Always returns a fully initialized config struct, which on error may
* contain only the defaults.
*
* ERRORS
* Calls error(0, ...) on errors in addition to the return value.
*
* xmalloc() failures are fatal, per usual.
*/
struct config *
parse_config (const char *cvsroot, const char *path)
{
const char *infopath;
char *freeinfopath = NULL;
FILE *fp_info;
char *line = NULL;
unsigned int ln; /* Input file line counter. */
char *buf = NULL;
size_t buf_allocated = 0;
size_t len;
char *p;
struct config *retval;
int rescan = 0;
/* PROCESSING Whether config keys are currently being processed for
* this root.
* PROCESSED Whether any keys have been processed for this root.
* This is initialized to true so that any initial keys
* may be processed as global defaults.
*/
bool processing = true;
bool processed = true;
TRACE (TRACE_FUNCTION, "parse_config (%s)", cvsroot);
#ifdef ALLOW_CONFIG_OVERRIDE
if (path)
{
const char * const *prefix;
char *npath = xcanonicalize_file_name (path);
bool approved = false;
for (prefix = allowed_config_prefixes; *prefix != NULL; prefix++)
{
char *nprefix;
if (!isreadable (*prefix)) continue;
nprefix = xcanonicalize_file_name (*prefix);
if (!strncmp (nprefix, npath, strlen (nprefix))
&& (((*prefix)[strlen (*prefix)] != '/'
&& strlen (npath) == strlen (nprefix))
|| ((*prefix)[strlen (*prefix)] == '/'
&& npath[strlen (nprefix)] == '/')))
approved = true;
free (nprefix);
if (approved) break;
}
if (!approved)
error (1, 0, "Invalid path to config file specified: `%s'",
path);
infopath = path;
free (npath);
}
else
#endif
infopath = freeinfopath =
Xasprintf ("%s/%s/%s", cvsroot, CVSROOTADM, CVSROOTADM_CONFIG);
retval = new_config ();
again:
fp_info = CVS_FOPEN (infopath, "r");
if (!fp_info)
{
/* If no file, don't do anything special. */
if (!existence_error (errno))
{
/* Just a warning message; doesn't affect return
value, currently at least. */
error (0, errno, "cannot open %s", infopath);
}
if (freeinfopath) free (freeinfopath);
return retval;
}
ln = 0; /* Have not read any lines yet. */
while (getline (&buf, &buf_allocated, fp_info) >= 0)
{
ln++; /* Keep track of input file line number for error messages. */
line = buf;
/* Skip leading white space. */
while (isspace (*line)) line++;
/* Skip comments. */
if (line[0] == '#')
continue;
/* Is there any kind of written standard for the syntax of this
sort of config file? Anywhere in POSIX for example (I guess
makefiles are sort of close)? Red Hat Linux has a bunch of
these too (with some GUI tools which edit them)...
Along the same lines, we might want a table of keywords,
with various types (boolean, string, &c), as a mechanism
for making sure the syntax is consistent. Any good examples
to follow there (Apache?)? */
/* Strip the trailing newline. There will be one unless we
read a partial line without a newline, and then got end of
file (or error?). */
len = strlen (line) - 1;
if (line[len] == '\n')
line[len--] = '\0';
/* Skip blank lines. */
if (line[0] == '\0')
continue;
TRACE (TRACE_DATA, "parse_info() examining line: `%s'", line);
/* Check for a root specification. */
if (line[0] == '[' && line[len] == ']')
{
cvsroot_t *tmproot;
line++[len] = '\0';
tmproot = parse_cvsroot (line);
/* Ignoring method. */
if (!tmproot
#if defined CLIENT_SUPPORT || defined SERVER_SUPPORT
|| (tmproot->method != local_method
&& (!tmproot->hostname || !isThisHost (tmproot->hostname)))
#endif /* CLIENT_SUPPORT || SERVER_SUPPORT */
|| !isSamePath (tmproot->directory, cvsroot))
{
if (processed) processing = false;
}
else
{
TRACE (TRACE_FLOW, "Matched root section`%s'", line);
processing = true;
processed = false;
}
continue;
}
/* There is data on this line. */
/* Even if the data is bad or ignored, consider data processed for
* this root.
*/
processed = true;
if (!processing)
/* ...but it is for a different root. */
continue;
/* The first '=' separates keyword from value. */
p = strchr (line, '=');
if (!p)
{
if (!parse_error (infopath, ln))
error (0, 0,
"%s [%d]: syntax error: missing `=' between keyword and value",
infopath, ln);
continue;
}
*p++ = '\0';
if (strcmp (line, "RCSBIN") == 0)
{
/* This option used to specify the directory for RCS
executables. But since we don't run them any more,
this is a noop. Silently ignore it so that a
repository can work with either new or old CVS. */
;
}
else if (strcmp (line, "SystemAuth") == 0)
#ifdef AUTH_SERVER_SUPPORT
readBool (infopath, "SystemAuth", p, &retval->system_auth);
#else
{
/* Still parse the syntax but ignore the option. That way the same
* config file can be used for local and server.
*/
bool dummy;
readBool (infopath, "SystemAuth", p, &dummy);
}
#endif
else if (strcmp (line, "LocalKeyword") == 0 ||
strcmp (line, "tag") == 0)
RCS_setlocalid (infopath, ln, &retval->keywords, p);
else if (strcmp (line, "KeywordExpand") == 0 ||
strcmp (line, "tagexpand") == 0)
RCS_setincexc (&retval->keywords, p);
else if (strcmp (line, "PreservePermissions") == 0)
{
#ifdef PRESERVE_PERMISSIONS_SUPPORT
readBool (infopath, "PreservePermissions", p,
&retval->preserve_perms);
#else
if (!parse_error (infopath, ln))
error (0, 0, "\
%s [%u]: warning: this CVS does not support PreservePermissions",
infopath, ln);
#endif
}
else if (strcmp (line, "TopLevelAdmin") == 0)
readBool (infopath, "TopLevelAdmin", p, &retval->top_level_admin);
else if (strcmp (line, "LockDir") == 0)
{
if (retval->lock_dir)
free (retval->lock_dir);
retval->lock_dir = expand_path (p, cvsroot, false, infopath, ln);
/* Could try some validity checking, like whether we can
opendir it or something, but I don't see any particular
reason to do that now rather than waiting until lock.c. */
}
else if (strcmp (line, "HistoryLogPath") == 0)
{
if (retval->HistoryLogPath) free (retval->HistoryLogPath);
/* Expand ~ & $VARs. */
retval->HistoryLogPath = expand_path (p, cvsroot, false,
infopath, ln);
if (retval->HistoryLogPath && !ISABSOLUTE (retval->HistoryLogPath))
{
error (0, 0, "%s [%u]: HistoryLogPath must be absolute.",
infopath, ln);
free (retval->HistoryLogPath);
retval->HistoryLogPath = NULL;
}
}
else if (strcmp (line, "HistorySearchPath") == 0)
{
if (retval->HistorySearchPath) free (retval->HistorySearchPath);
retval->HistorySearchPath = expand_path (p, cvsroot, false,
infopath, ln);
if (retval->HistorySearchPath
&& !ISABSOLUTE (retval->HistorySearchPath))
{
error (0, 0, "%s [%u]: HistorySearchPath must be absolute.",
infopath, ln);
free (retval->HistorySearchPath);
retval->HistorySearchPath = NULL;
}
}
else if (strcmp (line, "LogHistory") == 0)
{
if (strcmp (p, "all") != 0)
{
static bool gotone = false;
if (gotone)
error (0, 0, "\
%s [%u]: warning: duplicate LogHistory entry found.",
infopath, ln);
else
gotone = true;
free (retval->logHistory);
retval->logHistory = xstrdup (p);
}
}
else if (strcmp (line, "RereadLogAfterVerify") == 0)
{
if (!strcasecmp (p, "never"))
retval->RereadLogAfterVerify = LOGMSG_REREAD_NEVER;
else if (!strcasecmp (p, "always"))
retval->RereadLogAfterVerify = LOGMSG_REREAD_ALWAYS;
else if (!strcasecmp (p, "stat"))
retval->RereadLogAfterVerify = LOGMSG_REREAD_STAT;
else
{
bool tmp;
if (readBool (infopath, "RereadLogAfterVerify", p, &tmp))
{
if (tmp)
retval->RereadLogAfterVerify = LOGMSG_REREAD_ALWAYS;
else
retval->RereadLogAfterVerify = LOGMSG_REREAD_NEVER;
}
}
}
else if (strcmp (line, "TmpDir") == 0)
{
if (retval->TmpDir) free (retval->TmpDir);
retval->TmpDir = expand_path (p, cvsroot, false, infopath, ln);
/* Could try some validity checking, like whether we can
* opendir it or something, but I don't see any particular
* reason to do that now rather than when the first function
* tries to create a temp file.
*/
}
else if (strcmp (line, "UserAdminOptions") == 0)
retval->UserAdminOptions = xstrdup (p);
else if (strcmp (line, "UseNewInfoFmtStrings") == 0)
#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
readBool (infopath, "UseNewInfoFmtStrings", p,
&retval->UseNewInfoFmtStrings);
#else /* !SUPPORT_OLD_INFO_FMT_STRINGS */
{
bool dummy;
if (readBool (infopath, "UseNewInfoFmtStrings", p, &dummy)
&& !dummy)
error (1, 0,
"%s [%u]: Old style info format strings not supported by this executable.",
infopath, ln);
}
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
else if (strcmp (line, "ImportNewFilesToVendorBranchOnly") == 0)
readBool (infopath, "ImportNewFilesToVendorBranchOnly", p,
&retval->ImportNewFilesToVendorBranchOnly);
else if (strcmp (line, "PrimaryServer") == 0)
retval->PrimaryServer = parse_cvsroot (p);
#ifdef PROXY_SUPPORT
else if (!strcmp (line, "MaxProxyBufferSize"))
readSizeT (infopath, "MaxProxyBufferSize", p,
&retval->MaxProxyBufferSize);
#endif /* PROXY_SUPPORT */
else if (!strcmp (line, "MaxCommentLeaderLength"))
readSizeT (infopath, "MaxCommentLeaderLength", p,
&retval->MaxCommentLeaderLength);
else if (!strcmp (line, "UseArchiveCommentLeader"))
readBool (infopath, "UseArchiveCommentLeader", p,
&retval->UseArchiveCommentLeader);
#ifdef SERVER_SUPPORT
else if (!strcmp (line, "MinCompressionLevel"))
readSizeT (infopath, "MinCompressionLevel", p,
&retval->MinCompressionLevel);
else if (!strcmp (line, "MaxCompressionLevel"))
readSizeT (infopath, "MaxCompressionLevel", p,
&retval->MaxCompressionLevel);
#endif /* SERVER_SUPPORT */
else
/* We may be dealing with a keyword which was added in a
subsequent version of CVS. In that case it is a good idea
to complain, as (1) the keyword might enable a behavior like
alternate locking behavior, in which it is dangerous and hard
to detect if some CVS's have it one way and others have it
the other way, (2) in general, having us not do what the user
had in mind when they put in the keyword violates the
principle of least surprise. Note that one corollary is
adding new keywords to your CVSROOT/config file is not
particularly recommended unless you are planning on using
the new features. */
if (!parse_error (infopath, ln))
error (0, 0, "%s [%u]: unrecognized keyword `%s'",
infopath, ln, line);
}
if (ferror (fp_info))
error (0, errno, "cannot read %s", infopath);
if (fclose (fp_info) < 0)
error (0, errno, "cannot close %s", infopath);
if (freeinfopath) free (freeinfopath);
if (buf) free (buf);
if (path == NULL && !rescan++) {
infopath = freeinfopath =
Xasprintf ("%s/%s/%s", cvsroot, CVSROOTADM, CVSROOTADM_OPTIONS);
buf = NULL;
goto again;
}
return retval;
}
| 8,317 |
4,253 | package org.ormtest.step000.entity;
/**
* 用户实体
*/
public class UserEntity {
/**
* 用户 Id
*/
public int _userId;
/**
* 用户名
*/
public String _userName;
/**
* 密码
*/
public String _password;
} | 134 |
1,847 | <reponame>tufeigunchu/orbit<gh_stars>1000+
// Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WINDOWS_CAPTURE_SERVICE_WINDOWS_CAPTURE_SERVICE_H_
#define WINDOWS_CAPTURE_SERVICE_WINDOWS_CAPTURE_SERVICE_H_
#include "CaptureService/CaptureService.h"
namespace orbit_windows_capture_service {
// Windows implementation of the grpc capture service.
class WindowsCaptureService final : public orbit_capture_service::CaptureService {
public:
grpc::Status Capture(
grpc::ServerContext* context,
grpc::ServerReaderWriter<orbit_grpc_protos::CaptureResponse,
orbit_grpc_protos::CaptureRequest>* reader_writer) override;
};
} // namespace orbit_windows_capture_service
#endif // WINDOWS_CAPTURE_SERVICE_WINDOWS_CAPTURE_SERVICE_H_
| 315 |
533 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
This module contains functions for analyzing domains and subdomains to determine if a domain
takeover is possible via dangling DNS records, cloud services, and various hosting providers.
"""
import re
from . import dns
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
class TakeoverChecks(object):
"""Class with tools to check for potential domain and subdomain takeovers."""
dns_toolkit = dns.DNSCollector()
# Fingerprints for the various CDNs and services and associated 404 pages
# Sources:
# https://github.com/EdOverflow/can-i-take-over-xyz
# https://github.com/Ice3man543/SubOver/blob/master/providers.json
fingerprints = [
{
"name":"github",
"cname":["github.io", "github.map.fastly.net"],
"response":["There isn't a GitHub Pages site here.", "For root URLs (like http:\/\/example.com\/) you must provide an index.html file"]
},
{
"name":"heroku",
"cname":["herokudns.com", "herokussl.com", "herokuapp.com"],
"response":["There's nothing here, yet.", "herokucdn.com/error-pages/no-such-app.html", "<title>No such app</title>"]
},
{
"name":"unbounce",
"cname":["unbouncepages.com"],
"response":["The requested URL / was not found on this server.", "The requested URL was not found on this server"]
},
{
"name":"tumblr",
"cname":["tumblr.com"],
"response":["There's nothing here.", "Whatever you were looking for doesn't currently exist at this address."]
},
{
"name":"shopify",
"cname":["myshopify.com"],
"response":["Sorry, this shop is currently unavailable.", "Only one step left!"]
},
{
"name":"instapage",
"cname":["pageserve.co", "secure.pageserve.co", "https:\/\/instapage.com\/"],
"response":["Looks Like You're Lost"]
},
{
"name":"desk",
"cname":["desk.com"],
"response":["Please try again or try Desk.com free for 14 days.", "Sorry, We Couldn't Find That Page"]
},
{
"name":"tictail",
"cname":["tictail.com", "domains.tictail.com"],
"response":["Building a brand of your own?", "to target URL: <a href=\"https:\/\/tictail.com", "Start selling on Tictail."]
},
{
"name":"campaignmonitor",
"cname":["createsend.com", "name.createsend.com"],
"response":["Double check the URL", "<strong>Trying to access your account?</strong>", "Double check the URL or <a href=\"mailto:<EMAIL>"]
},
{
"name":"cargocollective",
"cname":["cargocollective.com"],
"response":['<div class="notfound">']
},
{
"name":"statuspage",
"cname":["statuspage.io"],
"response":["StatusPage.io is the best way for web infrastructure", "You are being <a href=\"https:\/\/www.statuspage.io\">redirected"]
},
{
"name":"amazonaws",
"cname":["amazonaws.com"],
"response":["NoSuchBucket", "The specified bucket does not exist"]
},
{
"name":"cloudfront",
"cname":["cloudfront.net"],
"response":["The request could not be satisfied", "ERROR: The request could not be satisfied"]
},
{
"name":"bitbucket",
"cname":["bitbucket.org"],
"response":["The Git solution for professional teams"]
},
{
"name":"smartling",
"cname":["smartling.com"],
"response":["Domain is not configured"]
},
{
"name":"acquia",
"cname":["acquia.com"],
"response":["If you are an Acquia Cloud customer and expect to see your site at this address"]
},
{
"name":"fastly",
"cname":["fastly.net"],
"response":["Please check that this domain has been added to a service", "Fastly error: unknown domain"]
},
{
"name":"pantheon",
"cname":["pantheonsite.io"],
"response":["The gods are wise", "The gods are wise, but do not know of the site which you seek."]
},
{
"name":"zendesk",
"cname":["zendesk.com"],
"response":["<title>Help Center Closed | Zendesk</title>", "Help Center Closed"]
},
{
"name":"uservoice",
"cname":["uservoice.com"],
"response":["This UserVoice subdomain is currently available!", "This UserVoice instance does not exist."]
},
{
"name":"ghost",
"cname":["ghost.io"],
"response":["The thing you were looking for is no longer here", "The thing you were looking for is no longer here, or never was"]
},
{
"name":"pingdom",
"cname":["stats.pingdom.com"],
"response":["pingdom"]
},
{
"name":"tilda",
"cname":["tilda.ws"],
"response":["Domain has been assigned", "http:\/\/tilda.ws\/img\/logo404.png"]
},
{
"name":"wordpress",
"cname":["wordpress.com"],
"response":["Do you want to register"]
},
{
"name":"teamwork",
"cname":["teamwork.com"],
"response":["Oops - We didn't find your site."]
},
{
"name":"helpjuice",
"cname":["helpjuice.com"],
"response":["We could not find what you're looking for."]
},
{
"name":"helpscout",
"cname":["helpscoutdocs.com"],
"response":["No settings were found for this company:"]
},
{
"name":"cargo",
"cname":["cargocollective.com"],
"response":["If you're moving your domain away from Cargo you must make this configuration through your registrar's DNS control panel."]
},
{
"name":"feedpress",
"cname":["redirect.feedpress.me"],
"response":["The feed has not been found."]
},
{
"name":"surge",
"cname":["surge.sh"],
"response":["project not found"]
},
{
"name":"surveygizmo",
"cname":["privatedomain.sgizmo.com", "privatedomain.surveygizmo.eu", "privatedomain.sgizmoca.com"],
"response":["data-html-name"]
},
{
"name":"mashery",
"cname":["mashery.com"],
"response":["Unrecognized domain <strong>"]
},
{
"name":"intercom",
"cname":["custom.intercom.help"],
"response":["This page is reserved for artistic dogs.","<h1 class=\"headline\">Uh oh. That page doesn’t exist.</h1>"]
},
{
"name":"webflow",
"cname":["proxy.webflow.io"],
"response":["<p class=\"description\">The page you are looking for doesn't exist or has been moved.</p>"]
},
{
"name":"kajabi",
"cname":["endpoint.mykajabi.com"],
"response":["<h1>The page you were looking for doesn't exist.</h1>"]
},
{
"name":"thinkific",
"cname":["thinkific.com"],
"response":["You may have mistyped the address or the page may have moved."]
},
{
"name":"tave",
"cname":["clientaccess.tave.com"],
"response":["<h1>Error 404: Page Not Found</h1>"]
},
{
"name":"wishpond",
"cname":["wishpond.com"],
"response":["https:\/\/www.wishpond.com\/404\?campaign=true"]
},
{
"name":"aftership",
"cname":["aftership.com"],
"response":["Oops.</h2><p class=\"text-muted text-tight\">The page you're looking for doesn't exist."]
},
{
"name":"aha",
"cname":["ideas.aha.io"],
"response":["There is no portal here ... sending you back to Aha!"]
},
{
"name":"brightcove",
"cname":["brightcovegallery.com", "gallery.video", "bcvp0rtal.com"],
"response":["<p class=\"bc-gallery-error-code\">Error Code: 404</p>"]
},
{
"name":"bigcartel",
"cname":["bigcartel.com"],
"response":["<h1>Oops! We couldn’t find that page.</h1>"]
},
{
"name":"activecompaign",
"cname":["activehosted.com"],
"response":["alt=\"LIGHTTPD - fly light.\""]
},
{
"name":"acquia",
"cname":["acquia-test.co"],
"response":["The site you are looking for could not be found."]
},
{
"name":"proposify",
"cname":["proposify.biz"],
"response":["If you need immediate assistance, please contact <a href=\"mailto:<EMAIL>"]
},
{
"name":"simplebooklet",
"cname":["simplebooklet.com"],
"response":["We can't find this <a href=\"https:\/\/simplebooklet.com", "First Impressions Count"]
},
{
"name":"getresponse",
"cname":[".gr8.com"],
"response":["With GetResponse Landing Pages, lead generation has never been easier"]
},
{
"name":"vend",
"cname":["vendecommerce.com"],
"response":["Looks like you've traveled too far into cyberspace."]
},
{
"name":"jetbrains",
"cname":["myjetbrains.com"],
"response":["is not a registered InCloud YouTrack."]
},
{
"name":"azure",
"cname":["azurewebsites.net"],
"response":["404 Web Site not found"]
}
]
def __init__(self):
"""Everything that should be initiated with a new object goes here."""
pass
def check_domain_fronting(self,domain):
"""Check the A records for a given domain to look for references to various CDNs and
flag the domain for domain frontability.
Many CDN keywords provided by Rvrsh3ll on GitHub:
https://github.com/rvrsh3ll/FindFrontableDomains
Parameters:
domain The domain or subdomain to check
"""
domain = domain.strip()
try:
# Get the A record(s) for the domain
query = self.dns_toolkit.get_dns_record(domain,"A")
# Look for records matching known CDNs
for item in query.response.answer:
for text in item.items:
target = text.to_text()
if "s3.amazonaws.com" in target:
return "S3 Bucket: {}".format(target)
if "cloudfront" in target:
return "Cloudfront: {}".format(target)
elif "appspot.com" in target:
return "Google: {}".format(target)
elif "googleplex.com" in target:
return "Google: {}".format(target)
elif "msecnd.net" in target:
return "Azure: {}".format(target)
elif "aspnetcdn.com" in target:
return "Azure: {}".format(target)
elif "azureedge.net" in target:
return "Azure: {}".format(target)
elif "a248.e.akamai.net" in target:
return "Akamai: {}".format(target)
elif "secure.footprint.net" in target:
return "Level 3: {}".format(target)
elif "cloudflare" in target:
return "Cloudflare: {}".format(target)
elif "unbouncepages.com" in target:
return "Unbounce: {}".format(target)
elif "secure.footprint.net" in target:
return "Level 3: {}".format(target)
else:
return False
except Exception:
return False
def check_domain_takeover(self,domain):
"""Check the web response for a domain and compare it against fingerprints to identify
responses that could indicate a domain takeover is possible.
Parameters:
domain The domain or subdomain to check
"""
domain = domain.strip()
try:
session = requests.session()
request = session.get('https://' + domain.strip(),verify=False,timeout=10)
for indentifier in self.fingerprints:
for item in indentifier['response']:
take_reg = re.compile(item)
temp = take_reg.findall(request.text)
if temp != []:
return indentifier['name'].capitalize()
except Exception as e:
pass
return False
| 6,556 |
450 | //===- FillWeightVisitor.cpp ----------------------------------------------===//
//
// The ONNC Project
//
// See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "FillWeightVisitor.h"
#include "Compute/BMScale.h"
#include "Compute/Conv.h"
#include "Compute/Gemm.h"
#include "Compute/LRN.h"
#include "Compute/PRelu.h"
#include "Compute/SlicedConv.h"
#include <onnc/IR/Compute/Initializer.h>
using namespace onnc;
using namespace onnc::BM188X;
//===----------------------------------------------------------------------===//
// Non-member functions
//===----------------------------------------------------------------------===//
static const std::vector<int8_t> &getInt8Data(const onnc::Value *pValue)
{
auto *tensor = dynamic_cast<const onnc::Int8Tensor *>(pValue);
return tensor->getValues();
}
static const std::vector<int16_t> &getInt16Data(const onnc::Value *pValue)
{
auto *tensor = dynamic_cast<const onnc::Int16Tensor *>(pValue);
return tensor->getValues();
}
//===----------------------------------------------------------------------===//
// FillWeightVisitor
//===----------------------------------------------------------------------===//
FillWeightVisitor::FillWeightVisitor(GenWeightPass::WeightType &pWeight)
: m_Weight(pWeight), m_DoneOpndSet()
{
}
// visit TGConv
void FillWeightVisitor::visit(const BM188X::Conv &pConv)
{
Weight weight;
auto *input = dynamic_cast<const onnc::Int8Tensor *>(pConv.getInput(0));
auto *int8_weight = dynamic_cast<const onnc::Int8Tensor *>(pConv.getInput(1));
assert(input->getNumOfDimensions() == 4);
assert(int8_weight->getNumOfDimensions() == 4);
std::vector<int8_t> weight_data = int8_weight->getValues();
assert(weight_data.size() != 0);
weight.resize(weight_data.size());
// ks is kh * kw
int ks = pConv.getKernelShape().at(0) * pConv.getKernelShape().at(1);
int ic = input->dimension(1) / pConv.getGroup();
int oc = int8_weight->dimension(0);
Convert(weight, weight_data, ks, ic, oc);
// 16bit bias
if (pConv.isDoBias()) {
const std::vector<int16_t> data = getInt16Data(pConv.getInput(2));
Append16bit(weight, data);
}
// 8bit scale
if (pConv.isDoScale()) {
const std::vector<int8_t> data = getInt8Data(pConv.getScale());
Append8bit(weight, data);
}
// 16bit scale bias
if (pConv.isDoScaleBias()) {
const std::vector<int16_t> data = getInt16Data(pConv.getScaleBias());
Append16bit(weight, data);
}
// update weight
m_Weight.insert(m_Weight.end(), weight.begin(), weight.end());
}
// visit TLConv
void FillWeightVisitor::visit(const BM188X::SlicedConv &pConv)
{
Weight weight;
auto *int8_weight = dynamic_cast<const onnc::Int8Tensor *>(pConv.getInput(1));
assert(int8_weight->getNumOfDimensions() == 4);
if (!isWritten(*int8_weight)) {
setWritten(*int8_weight);
std::vector<int8_t> weight_data = int8_weight->getValues();
assert(weight_data.size() != 0);
weight.resize(weight_data.size());
auto *input = dynamic_cast<const onnc::Int8Tensor *>(pConv.getInput(0));
assert(input->getNumOfDimensions() == 4);
int ks = pConv.getKernelShape().at(0) * pConv.getKernelShape().at(1);
int ic = input->dimension(1) / pConv.getGroups();
int oc = int8_weight->dimension(0);
Convert(weight, weight_data, ks, ic, oc);
}
if (pConv.getDoBias() && !isWritten(*pConv.getInput(2))) {
auto *int16_weight =
dynamic_cast<const onnc::Int16Tensor *>(pConv.getInput(2));
setWritten(*int16_weight);
const std::vector<int16_t> weight_data = int16_weight->getValues();
Append16bit(weight, weight_data);
}
// update weight
m_Weight.insert(m_Weight.end(), weight.begin(), weight.end());
}
void FillWeightVisitor::visit(const BM188X::Gemm &pGemm)
{
const std::vector<int8_t> weight_data = getInt8Data(pGemm.getInput(1));
Append8bit(m_Weight, weight_data);
const std::vector<int16_t> bias_data = getInt16Data(pGemm.getInput(2));
Append16bit(m_Weight, bias_data);
}
void FillWeightVisitor::visit(const BM188X::LRN &pLRN)
{
const std::vector<int8_t> sqrlut_data = getInt8Data(pLRN.getInput(1));
Append8bit(m_Weight, sqrlut_data);
const std::vector<int8_t> powerlut_data = getInt8Data(pLRN.getInput(2));
Append8bit(m_Weight, powerlut_data);
}
void FillWeightVisitor::visit(const BM188X::PRelu &pPRelu)
{
const std::vector<int8_t> slope_data = getInt8Data(pPRelu.getInput(1));
Append8bit(m_Weight, slope_data);
}
void FillWeightVisitor::visit(const BM188X::BMScale &pBMScale)
{
const std::vector<int8_t> weight_data = getInt8Data(pBMScale.getInput(1));
Append8bit(m_Weight, weight_data);
const std::vector<int16_t> bias_data = getInt16Data(pBMScale.getInput(2));
Append16bit(m_Weight, bias_data);
}
//===----------------------------------------------------------------------===//
// FillWeightVisitor support members
//===----------------------------------------------------------------------===//
void FillWeightVisitor::Convert(Weight &pWeight,
const std::vector<int8_t> &pData, int pKS,
int pIC, int pOC)
{
// pKS is kh*kw
// conv weight is arranged by (1, oc, kh*kw, ic)
// convert (oc, ic, kh, kw) to (1, oc, kh*kw, ic)
for (int oc_i = 0; oc_i < pOC; ++oc_i) {
for (int k_i = 0; k_i < pKS; ++k_i) {
for (int ic_i = 0; ic_i < pIC; ++ic_i) {
int to = oc_i * (pKS * pIC) + k_i * pIC + ic_i;
int from = oc_i * (pKS * pIC) + ic_i * pKS + k_i;
pWeight[to] = pData[from];
}
}
}
}
void FillWeightVisitor::Append8bit(Weight &pW, const std::vector<int8_t> &pData)
{
std::copy(pData.begin(), pData.end(), std::back_inserter(pW));
}
void FillWeightVisitor::Append16bit(Weight &pW,
const std::vector<int16_t> &pData)
{
size_t count = pData.size();
size_t offset = pW.size();
pW.resize(offset + count * 2);
for (size_t i = 0; i < count; ++i) {
pW[offset + i] = (int8_t)(pData[i] & 0xff);
pW[offset + i + count] = (int8_t)(pData[i] >> 8 & 0xff);
}
}
bool FillWeightVisitor::isWritten(const onnc::Value &pValue) const
{
return (m_DoneOpndSet.end() != m_DoneOpndSet.find(&pValue));
}
void BM188X::FillWeightVisitor::setWritten(const onnc::Value &pValue)
{
m_DoneOpndSet.insert(&pValue);
}
| 2,536 |
488 | import unittest
from quantlib.quotes import SimpleQuote
from quantlib.observable import Observer
from quantlib.settings import Settings
from quantlib.time.api import Date
class SimpleObserverTestCase(unittest.TestCase):
def setUp(self):
self.count = 0
def test_quote_observability(self):
self.count = 0
q = SimpleQuote(0.1)
def counter():
self.count += 1
obs = Observer(counter)
obs.register_with(q)
self.assertEqual(self.count, 0)
q.value = 0.2
self.assertEqual(self.count, 1)
q.value = 0.3
self.assertEqual(self.count, 2)
obs.unregister_with(q)
q.value = 0.4
self.assertEqual(self.count, 2)
def test_settings_observability(self):
self.count = 0
def counter():
self.count += 1
obs = Observer(counter)
obs.register_with(Settings().observable_evaluation_date)
self.assertEqual(self.count, 0)
with Settings() as settings:
settings.evaluation_date = Date(1, 1, 2018)
self.assertEqual(self.count, 1)
self.assertEqual(self.count, 2)
if __name__ == "__main__":
unittest.main()
| 549 |
3,651 | <reponame>aberdev/orientdb
/*
* Copyright 2010-2016 OrientDB LTD (http://orientdb.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.graph.sql;
import com.orientechnologies.orient.core.command.script.OCommandScript;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.exception.OCommandExecutionException;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.impls.orient.OrientEdgeType;
import com.tinkerpop.blueprints.impls.orient.OrientVertexType;
import java.util.List;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class SQLCreateVertexAndEdgeTest {
private ODatabaseDocumentTx database;
private String url;
public SQLCreateVertexAndEdgeTest() {
url = "memory:" + SQLCreateVertexAndEdgeTest.class.getSimpleName();
database = new ODatabaseDocumentTx(url);
if (database.exists()) database.open("admin", "admin");
else database.create();
}
@Before
public void before() {}
@After
public void deinit() {
database.close();
}
@Test
public void testCreateEdgeDefaultClass() {
int vclusterId = database.addCluster("vdefault");
int eclusterId = database.addCluster("edefault");
database.command(new OCommandSQL("create class V1 extends V")).execute();
database.command(new OCommandSQL("alter class V1 addcluster vdefault")).execute();
database.command(new OCommandSQL("create class E1 extends E")).execute();
database.command(new OCommandSQL("alter class E1 addcluster edefault")).execute();
database.getMetadata().getSchema().reload();
// VERTEXES
ODocument v1 = database.command(new OCommandSQL("create vertex")).execute();
Assert.assertEquals(v1.getClassName(), OrientVertexType.CLASS_NAME);
ODocument v2 = database.command(new OCommandSQL("create vertex V1")).execute();
Assert.assertEquals(v2.getClassName(), "V1");
ODocument v3 = database.command(new OCommandSQL("create vertex set brand = 'fiat'")).execute();
Assert.assertEquals(v3.getClassName(), OrientVertexType.CLASS_NAME);
Assert.assertEquals(v3.field("brand"), "fiat");
ODocument v4 =
database
.command(new OCommandSQL("create vertex V1 set brand = 'fiat',name = 'wow'"))
.execute();
Assert.assertEquals(v4.getClassName(), "V1");
Assert.assertEquals(v4.field("brand"), "fiat");
Assert.assertEquals(v4.field("name"), "wow");
ODocument v5 = database.command(new OCommandSQL("create vertex V1 cluster vdefault")).execute();
Assert.assertEquals(v5.getClassName(), "V1");
Assert.assertEquals(v5.getIdentity().getClusterId(), vclusterId);
// EDGES
List<Object> edges =
database
.command(
new OCommandSQL("create edge from " + v1.getIdentity() + " to " + v2.getIdentity()))
.execute();
Assert.assertFalse(edges.isEmpty());
edges =
database
.command(
new OCommandSQL(
"create edge E1 from " + v1.getIdentity() + " to " + v3.getIdentity()))
.execute();
Assert.assertFalse(edges.isEmpty());
edges =
database
.command(
new OCommandSQL(
"create edge from "
+ v1.getIdentity()
+ " to "
+ v4.getIdentity()
+ " set weight = 3"))
.execute();
Assert.assertFalse(edges.isEmpty());
ODocument e3 = ((OIdentifiable) edges.get(0)).getRecord();
Assert.assertEquals(e3.getClassName(), OrientEdgeType.CLASS_NAME);
Assert.assertEquals(e3.field("out"), v1);
Assert.assertEquals(e3.field("in"), v4);
Assert.assertEquals(e3.<Object>field("weight"), 3);
edges =
database
.command(
new OCommandSQL(
"create edge E1 from "
+ v2.getIdentity()
+ " to "
+ v3.getIdentity()
+ " set weight = 10"))
.execute();
Assert.assertFalse(edges.isEmpty());
ODocument e4 = ((OIdentifiable) edges.get(0)).getRecord();
Assert.assertEquals(e4.getClassName(), "E1");
Assert.assertEquals(e4.field("out"), v2);
Assert.assertEquals(e4.field("in"), v3);
Assert.assertEquals(e4.<Object>field("weight"), 10);
edges =
database
.command(
new OCommandSQL(
"create edge e1 cluster edefault from "
+ v3.getIdentity()
+ " to "
+ v5.getIdentity()
+ " set weight = 17"))
.execute();
Assert.assertFalse(edges.isEmpty());
ODocument e5 = ((OIdentifiable) edges.get(0)).getRecord();
Assert.assertEquals(e5.getClassName(), "E1");
Assert.assertEquals(e5.getIdentity().getClusterId(), eclusterId);
}
/** from issue #2925 */
@Test
public void testSqlScriptThatCreatesEdge() {
long start = System.currentTimeMillis();
try {
String cmd = "begin\n";
cmd += "let a = create vertex set script = true\n";
cmd += "let b = select from v limit 1\n";
cmd += "let e = create edge from $a to $b\n";
cmd += "commit retry 100\n";
cmd += "return $e";
List<Vertex> result = database.query(new OSQLSynchQuery<Vertex>("select from V"));
int before = result.size();
database.command(new OCommandScript("sql", cmd)).execute();
result = database.query(new OSQLSynchQuery<Vertex>("select from V"));
Assert.assertEquals(result.size(), before + 1);
} catch (Exception ex) {
System.err.println("commit exception! " + ex);
ex.printStackTrace(System.err);
}
System.out.println("done in " + (System.currentTimeMillis() - start) + "ms");
}
@Test
public void testNewParser() {
ODocument v1 = database.command(new OCommandSQL("create vertex")).execute();
Assert.assertEquals(v1.getClassName(), OrientVertexType.CLASS_NAME);
ORID vid = v1.getIdentity();
// TODO remove this
database.command(new OCommandSQL("create edge from " + vid + " to " + vid)).execute();
database.command(new OCommandSQL("create edge E from " + vid + " to " + vid)).execute();
database
.command(new OCommandSQL("create edge from " + vid + " to " + vid + " set foo = 'bar'"))
.execute();
database
.command(new OCommandSQL("create edge E from " + vid + " to " + vid + " set bar = 'foo'"))
.execute();
}
@Test
public void testCannotAlterEClassname() {
database.command(new OCommandSQL("create class ETest extends E")).execute();
try {
database.command(new OCommandSQL("alter class ETest name ETest2")).execute();
Assert.assertTrue(false);
} catch (OCommandExecutionException e) {
Assert.assertTrue(true);
}
try {
database.command(new OCommandSQL("alter class ETest name ETest2 unsafe")).execute();
Assert.assertTrue(true);
} catch (OCommandExecutionException e) {
Assert.assertTrue(false);
}
}
public void testSqlScriptThatDeletesEdge() {
long start = System.currentTimeMillis();
database
.command(new OCommandSQL("create vertex V set name = 'testSqlScriptThatDeletesEdge1'"))
.execute();
database
.command(new OCommandSQL("create vertex V set name = 'testSqlScriptThatDeletesEdge2'"))
.execute();
database
.command(
new OCommandSQL(
"create edge E from (select from V where name = 'testSqlScriptThatDeletesEdge1') to (select from V where name = 'testSqlScriptThatDeletesEdge2') set name = 'testSqlScriptThatDeletesEdge'"))
.execute();
try {
String cmd = "BEGIN\n";
cmd += "LET $groupVertices = SELECT FROM V WHERE name = 'testSqlScriptThatDeletesEdge1'\n";
cmd += "LET $removeRoleEdge = DELETE edge E WHERE out IN $groupVertices\n";
cmd += "COMMIT\n";
cmd += "RETURN $groupVertices\n";
Object r = database.command(new OCommandScript("sql", cmd)).execute();
List<?> edges =
database.query(
new OSQLSynchQuery<Vertex>(
"select from E where name = 'testSqlScriptThatDeletesEdge'"));
Assert.assertEquals(edges.size(), 0);
} catch (Exception ex) {
System.err.println("commit exception! " + ex);
ex.printStackTrace(System.err);
}
System.out.println("done in " + (System.currentTimeMillis() - start) + "ms");
}
}
| 3,872 |
348 | {"nom":"Villers-sous-Prény","dpt":"Meurthe-et-Moselle","inscrits":261,"abs":47,"votants":214,"blancs":16,"nuls":5,"exp":193,"res":[{"panneau":"2","voix":109},{"panneau":"1","voix":84}]} | 81 |
1,338 | <gh_stars>1000+
/*
* Copyright 2001-2010, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME>
* DarkWyrm <<EMAIL>>
* <NAME>, <EMAIL>
* <NAME>, <EMAIL>
* <NAME> <<EMAIL>>
*/
#ifndef FONT_SELECTION_VIEW_H
#define FONT_SELECTION_VIEW_H
#include <Font.h>
#include <Handler.h>
class BLayoutItem;
class BBox;
class BMenu;
class BMenuField;
class BPopUpMenu;
class BStringView;
class BView;
class FontSelectionView : public BHandler {
public:
FontSelectionView(const char* name,
const char* label, bool separateStyles,
const BFont* font = NULL);
virtual ~FontSelectionView();
void AttachedToLooper();
virtual void MessageReceived(BMessage* message);
void SetMessage(BMessage* message);
void SetTarget(BHandler* target);
void SetFont(const BFont& font, float size);
void SetFont(const BFont& font);
void SetSize(float size);
const BFont& Font() const;
void SetDefaults();
void Revert();
bool IsDefaultable();
bool IsRevertable();
void UpdateFontsMenu();
BLayoutItem* CreateSizesLabelLayoutItem();
BLayoutItem* CreateSizesMenuBarLayoutItem();
BLayoutItem* CreateFontsLabelLayoutItem();
BLayoutItem* CreateFontsMenuBarLayoutItem();
BLayoutItem* CreateStylesLabelLayoutItem();
BLayoutItem* CreateStylesMenuBarLayoutItem();
BView* PreviewBox() const;
private:
void _Invoke();
BFont _DefaultFont() const;
void _SelectCurrentFont(bool select);
void _SelectCurrentSize(bool select);
void _UpdateFontPreview();
void _BuildSizesMenu();
void _AddStylesToMenu(const BFont& font,
BMenu* menu) const;
protected:
BMenuField* fFontsMenuField;
BMenuField* fStylesMenuField;
BMenuField* fSizesMenuField;
BPopUpMenu* fFontsMenu;
BPopUpMenu* fStylesMenu;
BPopUpMenu* fSizesMenu;
BStringView* fPreviewText;
BBox* fPreviewBox;
BFont fSavedFont;
BFont fCurrentFont;
BMessage* fMessage;
BHandler* fTarget;
};
#endif // FONT_SELECTION_VIEW_H
| 940 |
640 | /*
Minimal GUI functions, now included in X11.lib
<NAME>, 26/3/2008
$Id: win_close.c,v 1.1 2008-03-27 08:26:40 stefano Exp $
*/
#define _BUILDING_X
#include <gui.h>
void win_close(struct gui_win *win)
{
bkrestore(win->back);
free(win->back);
}
| 115 |
776 | package act.view;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2017 ActFramework
* %%
* 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.
* #L%
*/
import act.Act;
import act.apidoc.ApiManager;
import act.apidoc.Endpoint;
import act.app.ActionContext;
import act.controller.Controller;
import act.handler.RequestHandler;
import act.handler.builtin.controller.ActionHandlerInvoker;
import act.handler.builtin.controller.RequestHandlerProxy;
import act.handler.builtin.controller.impl.ReflectedHandlerInvoker;
import org.osgl.$;
import org.osgl.http.H;
import org.osgl.logging.LogManager;
import org.osgl.logging.Logger;
import org.osgl.mvc.result.ErrorResult;
import org.osgl.mvc.result.NotImplemented;
import org.osgl.mvc.result.Result;
public class ActToBeImplemented extends ErrorResult {
private static final Logger logger = LogManager.get(ActToBeImplemented.class);
private ActToBeImplemented() {
super(H.Status.of(inferStatusCode()));
}
private static int inferStatusCode() {
ActionContext context = ActionContext.current();
return context.successStatus().code();
}
@Override
protected void applyMessage(H.Request request, H.Response response) {
ActionContext context = ActionContext.current();
if ($.bool(context.hasTemplate())) {
throw createNotImplemented();
}
Endpoint endpoint = Act.getInstance(ApiManager.class).endpoint(context.actionPath());
if (null == endpoint) {
logger.warn("Cannot locate endpoint for %s", context.actionPath());
throw createNotImplemented();
}
RequestHandler handler = context.handler();
if (handler instanceof RequestHandlerProxy) {
RequestHandlerProxy proxy = $.cast(handler);
ActionHandlerInvoker invoker = proxy.actionHandler().invoker();
if (invoker instanceof ReflectedHandlerInvoker) {
ReflectedHandlerInvoker rfi = $.cast(invoker);
Result result = Controller.Util.inferResult(rfi.handlerMetaInfo(), endpoint.returnSampleObject, context, false);
result.apply(request, response);
return;
}
}
throw createNotImplemented();
}
public static ErrorResult create() {
return Act.isDev() ? new ActToBeImplemented() : createNotImplemented();
}
private static ErrorResult createNotImplemented() {
return ActNotImplemented.create("To be implemented");
}
}
| 1,067 |
1,056 | <filename>ide/editor.document/test/unit/src/org/netbeans/modules/editor/lib2/document/StableCompoundEditTest.java<gh_stars>1000+
/*
* 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.netbeans.modules.editor.lib2.document;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import javax.swing.undo.AbstractUndoableEdit;
import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import org.netbeans.junit.Filter;
import org.netbeans.junit.NbTestCase;
/**
*
* @author <NAME>
*/
public class StableCompoundEditTest extends NbTestCase {
public StableCompoundEditTest(String testName) {
super(testName);
List<String> includes = new ArrayList<String>();
// includes.add("testSimpleUndo");
// includes.add("testSimplePositionSharingMods");
// includes.add("testEndPosition");
// includes.add("testRandomMods");
// includes.add("testRemoveAtZero");
// includes.add("testBackwardBiasPositionsSimple");
// includes.add("testBackwardBiasPositions");
// includes.add("testRemoveSimple");
// filterTests(includes);
}
private void filterTests(List<String> includeTestNames) {
List<Filter.IncludeExclude> includeTests = new ArrayList<Filter.IncludeExclude>();
for (String testName : includeTestNames) {
includeTests.add(new Filter.IncludeExclude(testName, ""));
}
Filter filter = new Filter();
filter.setIncludes(includeTests.toArray(new Filter.IncludeExclude[includeTests.size()]));
setFilter(filter);
}
@Override
protected Level logLevel() {
// return Level.FINEST;
// return Level.FINE;
// return Level.INFO;
return null;
}
public void testBasicUndoRedo() throws Exception {
StableCompoundEdit cEdit = new StableCompoundEdit();
TestEdit e0 = new TestEdit();
TestEdit e1 = new TestEdit();
cEdit.addEdit(e0);
cEdit.addEdit(e1);
NbTestCase.assertFalse("Not ended yet", cEdit.canUndo());
NbTestCase.assertFalse("Not ended yet", cEdit.canRedo());
cEdit.end();
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
cEdit.undo();
NbTestCase.assertFalse("Expected non-undoable", cEdit.canUndo());
NbTestCase.assertTrue("Expected redoable", cEdit.canRedo());
NbTestCase.assertFalse("Expected non-undoable", e0.canUndo());
NbTestCase.assertTrue("Expected redoable", e0.canRedo());
NbTestCase.assertFalse("Expected non-undoable", e1.canUndo());
NbTestCase.assertTrue("Expected redoable", e1.canRedo());
cEdit.redo();
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
NbTestCase.assertTrue("Expected undoable", e0.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e0.canRedo());
NbTestCase.assertTrue("Expected undoable", e1.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e1.canRedo());
cEdit.die();
}
public void testBasicFailUndo0() throws Exception {
StableCompoundEdit cEdit = new StableCompoundEdit();
TestEdit e0 = new TestEdit(true);
TestEdit e1 = new TestEdit();
cEdit.addEdit(e0);
cEdit.addEdit(e1);
NbTestCase.assertFalse("Not ended yet", cEdit.canUndo());
NbTestCase.assertFalse("Not ended yet", cEdit.canRedo());
cEdit.end();
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
try {
cEdit.undo();
fail("Was expecting CannotUndoException exception.");
} catch (CannotUndoException ex) {
// Expected
}
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
NbTestCase.assertTrue("Expected undoable", e0.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e0.canRedo());
NbTestCase.assertTrue("Expected undoable", e1.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e1.canRedo());
}
public void testBasicFailUndo1() throws Exception {
StableCompoundEdit cEdit = new StableCompoundEdit();
TestEdit e0 = new TestEdit();
TestEdit e1 = new TestEdit(true);
cEdit.addEdit(e0);
cEdit.addEdit(e1);
NbTestCase.assertFalse("Not ended yet", cEdit.canUndo());
NbTestCase.assertFalse("Not ended yet", cEdit.canRedo());
cEdit.end();
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
try {
cEdit.undo();
fail("Was expecting CannotUndoException exception.");
} catch (CannotUndoException ex) {
// Expected
}
NbTestCase.assertTrue("Expected undoable", cEdit.canUndo());
NbTestCase.assertFalse("Expected non-redoable", cEdit.canRedo());
NbTestCase.assertTrue("Expected undoable", e0.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e0.canRedo());
NbTestCase.assertTrue("Expected undoable", e1.canUndo());
NbTestCase.assertFalse("Expected non-redoable", e1.canRedo());
}
private static final class TestEdit extends AbstractUndoableEdit {
private final boolean fireException;
TestEdit() {
this(false);
}
TestEdit(boolean fireException) {
this.fireException = fireException;
}
@Override
public void undo() throws CannotUndoException {
if (fireException) {
throw new CannotUndoException();
}
super.undo();
}
@Override
public void redo() throws CannotRedoException {
if (fireException) {
throw new CannotRedoException();
}
super.redo();
}
}
}
| 2,945 |
307 | <reponame>MageKing17/fs2open.github.com
#pragma once
#include "AbstractDialogModel.h"
#include "ship/ship.h"
#include "ui/widgets/sexp_tree.h"
namespace fso {
namespace fred {
namespace dialogs {
class ShipEditorDialogModel : public AbstractDialogModel {
private:
void initializeData();
template <typename T>
void modify(T& a, const T& b);
bool _modified = false;
bool _m_no_departure_warp;
bool _m_no_arrival_warp;
bool _m_player_ship;
int _m_departure_tree_formula;
int _m_arrival_tree_formula;
SCP_string _m_ship_name;
SCP_string _m_cargo1;
SCP_string _m_alt_name;
SCP_string _m_callsign;
int _m_ship_class;
int _m_team;
int _m_arrival_location;
int _m_departure_location;
int _m_ai_class;
int _m_arrival_delay;
int _m_departure_delay;
int _m_hotkey;
bool _m_update_arrival;
bool _m_update_departure;
int _m_score;
int _m_assist_score;
int _m_arrival_dist;
int _m_arrival_target;
int _m_departure_target;
int _m_persona;
SCP_string m_wing;
int mission_type;
void set_modified();
bool update_ship(int ship);
bool update_data();
void ship_alt_name_close(int base_ship);
void ship_callsign_close(int base_ship);
static int make_ship_list(int* arr);
public:
ShipEditorDialogModel(QObject* parent, EditorViewport* viewport);
bool apply() override;
void reject() override;
void onSelectedObjectMarkingChanged(int, bool);
void setShipName(const SCP_string& m_ship_name);
SCP_string getShipName();
void setShipClass(int);
int getShipClass();
void setAIClass(int);
int getAIClass();
void setTeam(int);
int getTeam();
void setCargo(const SCP_string&);
SCP_string getCargo();
void setAltName(const SCP_string&);
SCP_string getAltName();
void setCallsign(const SCP_string&);
SCP_string getCallsign();
SCP_string getWing();
void setHotkey(int);
int getHotkey();
void setPersona(int);
int getPersona();
void setScore(int);
int getScore();
void setAssist(int);
int getAssist();
void setPlayer(bool);
bool getPlayer();
void setArrivalLocation(int);
int getArrivalLocation();
void setArrivalTarget(int);
int getArrivalTarget();
void setArrivalDistance(int);
int getArrivalDistance();
void setArrivalDelay(int);
int getArrivalDelay();
void setArrivalCue(bool);
bool getArrivalCue();
void setArrivalFormula(int, int);
int getArrivalFormula();
void setNoArrivalWarp(bool);
bool getNoArrivalWarp();
void setDepartureLocation(int);
int getDepartureLocation();
void setDepartureTarget(int);
int getDepartureTarget();
void setDepartureDelay(int);
int getDepartureDelay();
void setDepartureCue(bool);
bool getDepartureCue();
void setDepartureFormula(int, int);
int getDepartureFormula();
void setNoDepartureWarp(bool);
bool getNoDepartureWarp();
void OnPrevious();
void OnNext();
void OnDeleteShip();
void OnShipReset();
static bool wing_is_player_wing(int);
static int get_ship_from_obj(object*);
static void stuff_special_arrival_anchor_name(char* buf, int iff_index, int restrict_to_players, int retail_format);
bool enable;
bool p_enable;
int select_sexp_node;
int player_count;
int ship_count;
int multi_edit;
int base_ship;
int cue_init;
int total_count;
int pvalid_count;
int pship_count; // a total count of the player ships not marked
int player_ship, single_ship;
int ship_orders;
static int tristate_set(int val, int cur_state);
};
template <typename T>
inline void ShipEditorDialogModel::modify(T& a, const T& b)
{
if (a != b) {
a = b;
set_modified();
modelChanged();
}
}
} // namespace dialogs
} // namespace fred
} // namespace fso | 1,358 |
4,985 | /*****************************************************************************
* pixel.h: msa pixel metrics
*****************************************************************************
* Copyright (C) 2015-2017 x264 project
*
* Authors: <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
*
* This program is also available under a commercial proprietary license.
* For more information, contact us at <EMAIL>.
*****************************************************************************/
#ifndef X264_MIPS_SAD_H
#define X264_MIPS_SAD_H
int32_t x264_pixel_sad_16x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_16x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_8x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_8x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_8x4_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_4x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_4x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_sad_4x4_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
void x264_pixel_sad_x4_16x16_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_16x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_8x16_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_8x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_8x4_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_4x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x4_4x4_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
uint8_t *p_ref3, intptr_t i_ref_stride,
int32_t p_sad_array[4] );
void x264_pixel_sad_x3_16x16_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_16x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_8x16_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_8x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_8x4_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_4x8_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
void x264_pixel_sad_x3_4x4_msa( uint8_t *p_src, uint8_t *p_ref0,
uint8_t *p_ref1, uint8_t *p_ref2,
intptr_t i_ref_stride,
int32_t p_sad_array[3] );
int32_t x264_pixel_ssd_16x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_16x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_8x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_8x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_8x4_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_4x16_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_4x8_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
int32_t x264_pixel_ssd_4x4_msa( uint8_t *p_src, intptr_t i_src_stride,
uint8_t *p_ref, intptr_t i_ref_stride );
void x264_intra_sad_x3_4x4_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
void x264_intra_sad_x3_16x16_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
void x264_intra_sad_x3_8x8_msa( uint8_t *p_enc, uint8_t p_edge[36],
int32_t p_sad_array[3] );
void x264_intra_sad_x3_8x8c_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
void x264_ssim_4x4x2_core_msa( const uint8_t *p_pix1, intptr_t i_stride1,
const uint8_t *p_pix2, intptr_t i_stride2,
int32_t i_sums[2][4] );
uint64_t x264_pixel_hadamard_ac_8x8_msa( uint8_t *p_pix, intptr_t i_stride );
uint64_t x264_pixel_hadamard_ac_8x16_msa( uint8_t *p_pix, intptr_t i_stride );
uint64_t x264_pixel_hadamard_ac_16x8_msa( uint8_t *p_pix, intptr_t i_stride );
uint64_t x264_pixel_hadamard_ac_16x16_msa( uint8_t *p_pix, intptr_t i_stride );
int32_t x264_pixel_satd_4x4_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_4x8_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_4x16_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_8x4_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_8x8_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_8x16_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_16x8_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_satd_16x16_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_sa8d_8x8_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
int32_t x264_pixel_sa8d_16x16_msa( uint8_t *p_pix1, intptr_t i_stride,
uint8_t *p_pix2, intptr_t i_stride2 );
void x264_intra_satd_x3_4x4_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
void x264_intra_satd_x3_16x16_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
void x264_intra_sa8d_x3_8x8_msa( uint8_t *p_enc, uint8_t p_edge[36],
int32_t p_sad_array[3] );
void x264_intra_satd_x3_8x8c_msa( uint8_t *p_enc, uint8_t *p_dec,
int32_t p_sad_array[3] );
uint64_t x264_pixel_var_16x16_msa( uint8_t *p_pix, intptr_t i_stride );
uint64_t x264_pixel_var_8x16_msa( uint8_t *p_pix, intptr_t i_stride );
uint64_t x264_pixel_var_8x8_msa( uint8_t *p_pix, intptr_t i_stride );
int32_t x264_pixel_var2_8x16_msa( uint8_t *p_pix1, intptr_t i_stride1,
uint8_t *p_pix2, intptr_t i_stride2,
int32_t *p_ssd );
int32_t x264_pixel_var2_8x8_msa( uint8_t *p_pix1, intptr_t i_stride1,
uint8_t *p_pix2, intptr_t i_stride2,
int32_t *p_ssd );
#endif
| 6,727 |
5,169 | {
"name": "SPXDefines",
"version": "1.0.6",
"summary": "Useful macro's for Objective-C projects",
"description": " Useful macro's for Objective-C projects.\n\n * SPXAssertionDefines - Provides convenience assertions that will NOT crash on release builds\n * SPXEncodingDefines - Provides cleaner encoding/decoding macros with compile-time checking\n * SPXLoggingDefines - Provides cleaner logging, using CocoaLumberjack if available, otherwise falling gracefully back to NSLog with cleaner output.\n",
"homepage": "https://github.com/shaps80/SPXDefines",
"license": {
"type": "MIT",
"file": "LICENSE.md"
},
"authors": {
"<NAME>": "<EMAIL>"
},
"social_media_url": "http://twitter.com/shaps",
"platforms": {
"ios": "5.0",
"osx": "10.7"
},
"source": {
"git": "https://github.com/shaps80/SPXDefines.git",
"tag": "1.0.6"
},
"source_files": "Classes/**/*.{h,m}",
"requires_arc": true,
"subspecs": [
{
"name": "Asserts",
"source_files": [
"Classes/SPXAsserts/*.{h,m}",
"Classes/SPXDefinesCommon.h"
]
},
{
"name": "Encoding",
"source_files": [
"Classes/SPXEncoding/*.{h,m}",
"Classes/SPXDefinesCommon.h"
]
},
{
"name": "Logging",
"source_files": [
"Classes/SPXLogging/*.{h,m}",
"Classes/SPXDefinesCommon.h"
]
},
{
"name": "Description",
"source_files": [
"Classes/SPXDescription/*.{h,m}",
"Classes/SPXDefinesCommon.h"
]
}
]
}
| 775 |
5,169 | {
"name": "RokidSDK",
"version": "1.9.2",
"summary": "Rokid Mobile SDK",
"swift_version": "4.0",
"description": "Rokid Mobile SDK 提供了,Rokid 帐号、设备、配网、Vui反馈、Skill 等功能,让开发者能快速的集成 并使用。",
"homepage": "https://github.com/Rokid/RokidMobileSDKiOSDemo",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"石旭盼": "<EMAIL>"
},
"platforms": {
"ios": "8.0"
},
"source": {
"git": "https://github.com/Rokid/RokidSDK-Swift.git",
"tag": "1.9.2"
},
"vendored_frameworks": "KGMusicSDK.framework",
"dependencies": {
"AFNetworking": [
],
"Alamofire": [
],
"MQTTClient": [
"~> 0.14.0"
],
"CocoaAsyncSocket": [
],
"ReachabilitySwift": [
]
}
}
| 425 |
778 | //--------------------------------------------------------------------------------------------------------------------//
// //
// Tuplex: Blazing Fast Python Data Science //
// //
// //
// (c) 2017 - 2021, Tuplex team //
// Created by <NAME> first on 1/1/2021 //
// License: Apache 2.0 //
//--------------------------------------------------------------------------------------------------------------------//
#ifndef TUPLEX_BLOCKBASEDTASKBUILDER_H
#define TUPLEX_BLOCKBASEDTASKBUILDER_H
#include "physical/PipelineBuilder.h"
#include "physical/CSVParseRowGenerator.h"
#include "physical/CodeDefs.h"
#include <memory>
namespace tuplex {
namespace codegen {
// to create BlockBasedPipelines, i.e. they take an input buffer
// then deserialize somehow (aka parsing) and call a pipeline.
class BlockBasedTaskBuilder {
protected:
std::shared_ptr<LLVMEnvironment> _env;
std::shared_ptr<codegen::PipelineBuilder> pipeline() { return _pipBuilder; }
llvm::Function *createFunction();
python::Type _inputRowType; //@TODO: make this private??
std::string _intermediateCallbackName;
Row _intermediateInitialValue;
python::Type _intermediateType;
llvm::Value *initIntermediate(llvm::IRBuilder<> &builder);
void writeIntermediate(llvm::IRBuilder<> &builder,
llvm::Value* userData,
const std::string &intermediateCallbackName);
/*!
* returns argument of function
* @param name name of the argument
* @return
*/
inline llvm::Value *arg(const std::string &name) {
assert(_args.size() == 6);
auto it = _args.find(name);
if (it == _args.end())
throw std::runtime_error("unknown arg " + name + " requested");
return it->second;
}
/*!
* creates a new exception block. Builder will be set to last block (i.e. where to conitnue logic)
*/
llvm::BasicBlock *exceptionBlock(llvm::IRBuilder<> &builder,
llvm::Value *userData,
llvm::Value *exceptionCode,
llvm::Value *exceptionOperatorID,
llvm::Value *rowNumber,
llvm::Value *badDataPtr,
llvm::Value *badDataLength);
bool hasExceptionHandler() const { return !_exceptionHandlerName.empty(); }
void generateTerminateEarlyOnCode(llvm::IRBuilder<>& builder,
llvm::Value* ecCode,
ExceptionCode code = ExceptionCode::OUTPUT_LIMIT_REACHED);
private:
std::shared_ptr<codegen::PipelineBuilder> _pipBuilder;
std::string _desiredFuncName;
llvm::Function *_func;
std::vector<std::tuple<int64_t, ExceptionCode>> _codesToIgnore;
std::string _exceptionHandlerName;
std::unordered_map<std::string, llvm::Value *> _args;
llvm::Value *_intermediate;
public:
BlockBasedTaskBuilder() = delete;
BlockBasedTaskBuilder(const std::shared_ptr<LLVMEnvironment> &env,
const python::Type &rowType,
const std::string &name) : _env(env), _inputRowType(rowType), _desiredFuncName(name),
_intermediate(nullptr),
_intermediateType(python::Type::UNKNOWN) {}
LLVMEnvironment &env() { return *_env; }
std::string getTaskFuncName() const { return _func->getName(); }
/*!
* set internal processing pipeline
* @param pip
*/
virtual void setPipeline(const std::shared_ptr<PipelineBuilder> &pip) {
assert(!_pipBuilder);
_pipBuilder = pip;
// check row compatibility
if (pip->inputRowType() != _inputRowType)
throw std::runtime_error("input types of pipeline and CSV Parser incompatible:\n"
"pipeline expects: " + pip->inputRowType().desc() +
" but csv parser yields: " + _inputRowType.desc());
}
void
setIgnoreCodes(const std::vector<std::tuple<int64_t, ExceptionCode>> &codes) { _codesToIgnore = codes; }
void setExceptionHandler(const std::string &name) { _exceptionHandlerName = name; }
// aggregation based writers
/*!
* this adds an initialized intermediate, e.g. for an aggregate and initializes by the values supplied in Row
* @param intermediateType type (row might be upcast to it!)
* @param row the values
*/
void setIntermediateInitialValueByRow(const python::Type &intermediateType, const Row &row);
/*!
* when using aggregates, within the pipeline nothing gets written back.
* I.e., instead the aggregate gets updated.
* Call this write back with the intermediate result after the whole input was processed.
* @param callbackName
*/
void setIntermediateWriteCallback(const std::string &callbackName);
/*!
* build task function
* @param terminateEarlyOnFailureCode when set to true, the return code of the pipeline is checked.
* If it's non-zero, the loop is terminated. Helpful for implementing
* limit operations (i.e. there OUTPUT_LIMIT_REACHED exception is
* returned in writeRow(...)).
* @return LLVM function of the task taking a memory block as input, returns nullptr if build failed
*/
virtual llvm::Function *build(bool terminateEarlyOnFailureCode=false) = 0;
};
// @TODO:
// later JSONSourceTaskBuilder { ... }
// also GeneralSourceTaskBuilder { ... }
// TuplexSourceTaskBuilder { ... } // <== takes Tuplex's internal memory format as source
static python::Type restrictRowType(const std::vector<bool> &columnsToSerialize, const python::Type &rowType) {
if (columnsToSerialize.empty())
return rowType;
std::vector<python::Type> cols;
assert(rowType.isTupleType());
assert(columnsToSerialize.size() == rowType.parameters().size());
for (int i = 0; i < rowType.parameters().size(); ++i) {
if (columnsToSerialize[i])
cols.push_back(rowType.parameters()[i]);
}
return python::Type::makeTupleType(cols);
}
}
}
#endif //TUPLEX_BLOCKBASEDTASKBUILDER_H | 4,181 |
348 | <reponame>chamberone/Leaflet.PixiOverlay<filename>docs/data/leg-t2/080/08004081.json
{"nom":"Belloy-Saint-Léonard","circ":"4ème circonscription","dpt":"Somme","inscrits":80,"abs":35,"votants":45,"blancs":2,"nuls":1,"exp":42,"res":[{"nuance":"REM","nom":"<NAME>","voix":24},{"nuance":"FN","nom":"<NAME>","voix":18}]} | 134 |
1,282 | <reponame>sumitchauhanlab/blockchain-explorer
{
"watch-extensions": "js",
"recursive": true,
"spec": ["./specs/**/*.test.js"],
"timeout": 20000,
"extension": ["js"]
}
| 74 |
521 | <filename>src/gfxlib2/gfx_palette.c
/* palette management */
#include "fb_gfx.h"
static const unsigned char cga_association[5][4] = {
{ 0, 11, 13, 15 }, { 0, 10, 12, 14 }, { 0, 3, 5, 7 }, { 0, 2, 4, 6 }, { 0, 15 }
};
static const unsigned char ega_association[2][16] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63 }
};
unsigned int fb_hMakeColor(int bpp, unsigned int index, int r, int g, int b)
{
unsigned int color;
if (bpp == 2)
color = (b >> 3) | ((g << 3) & 0x07E0) | ((r << 8) & 0xF800);
else
color = index;
return color;
}
unsigned int fb_hFixColor(int bpp, unsigned int color)
{
return fb_hMakeColor(bpp, color, (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF) & BPP_MASK(bpp);
}
void fb_hRestorePalette(void)
{
int i;
if (!__fb_gfx->driver->set_palette)
return;
for (i = 0; i < 256; i++) {
__fb_gfx->driver->set_palette(i, (__fb_gfx->device_palette[i] & 0xFF),
(__fb_gfx->device_palette[i] >> 8) & 0xFF,
(__fb_gfx->device_palette[i] >> 16) & 0xFF);
}
}
void fb_hSetPaletteColorRgb(int index, int r, int g, int b)
{
index &= (__fb_gfx->default_palette->colors - 1);
__fb_gfx->device_palette[index] = r | (g << 8) | (b << 16);
if (__fb_gfx->driver->set_palette)
__fb_gfx->driver->set_palette(index, r, g, b);
}
void fb_hSetPaletteColor(int index, unsigned int color)
{
int r, g, b;
index &= (__fb_gfx->default_palette->colors - 1);
if (__fb_gfx->default_palette == &__fb_palette[FB_PALETTE_256]) {
r = ((color & 0x3F) * 255.0) / 63.0;
g = (((color & 0x3F00) >> 8) * 255.0) / 63.0;
b = (((color & 0x3F0000) >> 16) * 255.0) / 63.0;
} else {
color &= (__fb_gfx->default_palette->colors - 1);
r = (__fb_gfx->palette[color] & 0xFF);
g = (__fb_gfx->palette[color] >> 8) & 0xFF;
b = (__fb_gfx->palette[color] >> 16) & 0xFF;
__fb_gfx->color_association[index] = color;
}
fb_hSetPaletteColorRgb(index, r, g, b);
}
FBCALL void fb_GfxPalette(int index, int red, int green, int blue)
{
int i, r, g, b;
const PALETTE *palette;
const unsigned char *mode_association;
FB_GRAPHICS_LOCK( );
if ((!__fb_gfx) || (__fb_gfx->depth > 8)) {
FB_GRAPHICS_UNLOCK( );
return;
}
DRIVER_LOCK();
if (index < 0) {
palette = __fb_gfx->default_palette;
switch (__fb_gfx->mode_num) {
case 1:
index = MID(0, -(index + 1), 3);
mode_association = cga_association[index];
break;
case 2:
mode_association = cga_association[4];
break;
case 7:
case 8:
mode_association = ega_association[0];
break;
case 9:
mode_association = ega_association[1];
break;
default:
mode_association = NULL;
break;
}
for (i = 0; i < palette->colors; i++) {
r = palette->data[i * 3];
g = palette->data[(i * 3) + 1];
b = palette->data[(i * 3) + 2];
__fb_gfx->palette[i] = r | (g << 8) | (b << 16);
if (i < (1 << __fb_gfx->depth)) {
if (mode_association) {
__fb_gfx->color_association[i] = mode_association[i];
r = palette->data[__fb_gfx->color_association[i] * 3];
g = palette->data[(__fb_gfx->color_association[i] * 3) + 1];
b = palette->data[(__fb_gfx->color_association[i] * 3) + 2];
}
__fb_gfx->device_palette[i] = r | (g << 8) | (b << 16);
if (__fb_gfx->driver->set_palette)
__fb_gfx->driver->set_palette(i, r, g, b);
}
}
} else {
if ((green < 0) || (blue < 0))
fb_hSetPaletteColor(index, (unsigned int)red);
else
fb_hSetPaletteColorRgb(index, red, green, blue);
}
fb_hMemSet(__fb_gfx->dirty, TRUE, __fb_gfx->h);
DRIVER_UNLOCK();
FB_GRAPHICS_UNLOCK( );
}
| 1,779 |
324 | /*
* 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.jclouds.b2.binders;
import java.util.Map;
import org.jclouds.http.HttpRequest;
import org.jclouds.b2.domain.UploadUrlResponse;
import org.jclouds.b2.reference.B2Headers;
import org.jclouds.rest.MapBinder;
import com.google.common.net.HttpHeaders;
import com.google.common.net.PercentEscaper;
public final class UploadFileBinder implements MapBinder {
private static final PercentEscaper escaper = new PercentEscaper("._-/~!$'()*;=:@", false);
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
UploadUrlResponse uploadUrl = (UploadUrlResponse) postParams.get("uploadUrl");
String fileName = (String) postParams.get("fileName");
String contentSha1 = (String) postParams.get("contentSha1");
if (contentSha1 == null) {
contentSha1 = "do_not_verify";
}
Map<String, String> fileInfo = (Map<String, String>) postParams.get("fileInfo");
HttpRequest.Builder builder = request.toBuilder()
.endpoint(uploadUrl.uploadUrl())
.replaceHeader(HttpHeaders.AUTHORIZATION, uploadUrl.authorizationToken())
.replaceHeader(B2Headers.CONTENT_SHA1, contentSha1)
.replaceHeader(B2Headers.FILE_NAME, escaper.escape(fileName));
for (Map.Entry<String, String> entry : fileInfo.entrySet()) {
builder.replaceHeader(B2Headers.FILE_INFO_PREFIX + entry.getKey(), escaper.escape(entry.getValue()));
}
return (R) builder.build();
}
@Override
public <R extends HttpRequest> R bindToRequest(R request, Object input) {
throw new UnsupportedOperationException();
}
}
| 817 |
411 | <gh_stars>100-1000
package com.documents4j.conversion;
import java.lang.annotation.*;
/**
* Documents a {@link com.documents4j.conversion.IExternalConverter}'s capabilities of converting a set of document
* formats into a set of output document formats. All document formats must be represented as MIME-types.
*
* @see com.documents4j.api.DocumentType
* @see com.documents4j.conversion.ViableConversions
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ViableConversion {
/**
* The source file formats.
*
* @return An array of supported source file formats.
*/
String[] from();
/**
* The target file formats.
*
* @return An array of supported target file formats.
*/
String[] to();
}
| 268 |
4,293 | package com.github.pockethub.android.dagger;
import com.github.pockethub.android.ui.repo.RepositoryContributorsFragment;
import dagger.Module;
import dagger.android.ContributesAndroidInjector;
@Module
interface RepositoryContributorsFragmentProvider {
@ContributesAndroidInjector
RepositoryContributorsFragment repositoryContributorsFragment();
}
| 105 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.communication.models;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.rest.ResponseBase;
import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceResourceInner;
/** Contains all response data for the createOrUpdate operation. */
public final class CommunicationServicesCreateOrUpdateResponse
extends ResponseBase<CommunicationServicesCreateOrUpdateHeaders, CommunicationServiceResourceInner> {
/**
* Creates an instance of CommunicationServicesCreateOrUpdateResponse.
*
* @param request the request which resulted in this CommunicationServicesCreateOrUpdateResponse.
* @param statusCode the status code of the HTTP response.
* @param rawHeaders the raw headers of the HTTP response.
* @param value the deserialized value of the HTTP response.
* @param headers the deserialized headers of the HTTP response.
*/
public CommunicationServicesCreateOrUpdateResponse(
HttpRequest request,
int statusCode,
HttpHeaders rawHeaders,
CommunicationServiceResourceInner value,
CommunicationServicesCreateOrUpdateHeaders headers) {
super(request, statusCode, rawHeaders, value, headers);
}
/** @return the deserialized response body. */
@Override
public CommunicationServiceResourceInner getValue() {
return super.getValue();
}
}
| 471 |
14,668 | <filename>chrome/browser/ui/views/toolbar/app_menu_browsertest.cc
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback_helpers.h"
#include "base/files/file_path.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/sessions/tab_restore_service_load_waiter.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/toolbar/browser_app_menu_button.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "url/gurl.h"
using AppMenuBrowserTest = InProcessBrowserTest;
namespace {
bool TabRestoreServiceHasClosedWindow(sessions::TabRestoreService* service) {
for (const auto& entry : service->entries()) {
if (entry->type == sessions::TabRestoreService::WINDOW)
return true;
}
return false;
}
} // namespace
// This test shows the app-menu with a closed window added to the
// TabRestoreService. This is a regression test to ensure menu code handles this
// properly (this was triggering a crash in AppMenu where it was trying to make
// use of RecentTabsMenuModelDelegate before created). See
// https://crbug.com/1249741 for more.
IN_PROC_BROWSER_TEST_F(AppMenuBrowserTest, ShowWithRecentlyClosedWindow) {
// Create an additional browser, close it, and ensure it is added to the
// TabRestoreService.
sessions::TabRestoreService* tab_restore_service =
TabRestoreServiceFactory::GetForProfile(browser()->profile());
TabRestoreServiceLoadWaiter tab_restore_service_load_waiter(
tab_restore_service);
tab_restore_service_load_waiter.Wait();
Browser* second_browser = CreateBrowser(browser()->profile());
content::WebContents* new_contents = chrome::AddSelectedTabWithURL(
second_browser,
ui_test_utils::GetTestUrl(base::FilePath(),
base::FilePath().AppendASCII("simple.html")),
ui::PAGE_TRANSITION_TYPED);
EXPECT_TRUE(content::WaitForLoadStop(new_contents));
chrome::CloseWindow(second_browser);
ui_test_utils::WaitForBrowserToClose(second_browser);
EXPECT_TRUE(TabRestoreServiceHasClosedWindow(tab_restore_service));
// Show the AppMenu.
BrowserView::GetBrowserViewForBrowser(browser())
->toolbar()
->app_menu_button()
->ShowMenu(views::MenuRunner::NO_FLAGS);
}
| 963 |
575 | <gh_stars>100-1000
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/ambient/test/ambient_ash_test_helper.h"
#include "ash/ambient/test/test_ambient_client.h"
#include "ash/public/cpp/test/test_image_downloader.h"
namespace ash {
AmbientAshTestHelper::AmbientAshTestHelper() {
image_downloader_ = std::make_unique<TestImageDownloader>();
ambient_client_ = std::make_unique<TestAmbientClient>(&wake_lock_provider_);
}
AmbientAshTestHelper::~AmbientAshTestHelper() = default;
void AmbientAshTestHelper::IssueAccessToken(const std::string& token,
bool with_error) {
ambient_client_->IssueAccessToken(token, with_error);
}
bool AmbientAshTestHelper::IsAccessTokenRequestPending() const {
return ambient_client_->IsAccessTokenRequestPending();
}
} // namespace ash
| 335 |
337 | public class J extends B {
public J(int i) {
super();
}
public J() {
}
void test() {
new B();
}
} | 71 |
796 | /*
* Copyright (c) [2019-2020] Huawei Technologies Co.,Ltd.All rights reserved.
*
* OpenArkCompiler is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain a copy of Mulan PSL v1 at:
*
* http://license.coscl.org.cn/MulanPSL
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
* FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v1 for more details.
*/
#include "me_cfg.h"
#include <iostream>
#include <algorithm>
#include "bb.h"
#include "ssa_mir_nodes.h"
#include "me_irmap.h"
#include "mir_builder.h"
namespace {
constexpr int kFuncNameLenLimit = 80;
static bool CaseValOfSwitchIsSuccInt(const maple::CaseVector &switchTable) {
ASSERT(!switchTable.empty(), "switch table is empty");
size_t caseNum = switchTable.size();
int val = switchTable[0].first;
for (size_t id = 1; id < caseNum; id++) {
val++;
if (val != switchTable[id].first) {
return false;
}
}
return true;
}
}
namespace maple {
// determine if need to be replaced by assertnonnull
bool MeCFG::IfReplaceWithAssertNonNull(const BB &bb) const {
(void) bb;
return false;
}
void MeCFG::ReplaceSwitchContainsOneCaseBranchWithBrtrue(maple::BB &bb, MapleVector<BB*> &exitBlocks) {
StmtNode &lastStmt = bb.GetStmtNodes().back();
ASSERT(lastStmt.GetOpCode() == OP_switch, "runtime check error");
auto &switchStmt = static_cast<SwitchNode&>(lastStmt);
auto &swithcTable = switchStmt.GetSwitchTable();
if (!CaseValOfSwitchIsSuccInt(swithcTable)) {
return;
}
LabelIdx defaultLabelIdx = switchStmt.GetDefaultLabel();
int32 minCaseVal = swithcTable.front().first;
int32 maxCaseVal = swithcTable.back().first;
auto *baseNode = switchStmt.Opnd(0);
auto &mirBuilder = func.GetMIRModule().GetMIRBuilder();
auto *minCaseNode = mirBuilder->CreateIntConst(minCaseVal, PTY_i32);
auto *ltNode = mirBuilder->CreateExprCompare(OP_lt, GetTypeFromTyIdx(TyIdx(PTY_u1)),
GetTypeFromTyIdx(TyIdx(PTY_i32)), baseNode, minCaseNode);
auto *condGoto = mirBuilder->CreateStmtCondGoto(ltNode, OP_brtrue, defaultLabelIdx);
bb.ReplaceStmt(&switchStmt, condGoto);
bb.SetKind(kBBCondGoto);
auto *newBB = func.NewBasicBlock();
auto *maxCaseNode = mirBuilder->CreateIntConst(maxCaseVal, PTY_i32);
auto *gtNode = mirBuilder->CreateExprCompare(OP_gt, GetTypeFromTyIdx(TyIdx(PTY_u1)),
GetTypeFromTyIdx(TyIdx(PTY_i32)), baseNode, maxCaseNode);
condGoto = mirBuilder->CreateStmtCondGoto(gtNode, OP_brtrue, defaultLabelIdx);
newBB->GetStmtNodes().push_back(condGoto);
newBB->SetKind(kBBCondGoto);
BB *defaultBB = func.GetLabelBBAt(defaultLabelIdx);
ASSERT(defaultBB != nullptr, "null ptr check");
while (!bb.GetSucc().empty()) {
bb.RemoveSucc(*bb.GetSucc(0));
}
bb.AddSucc(*newBB);
bb.AddSucc(*defaultBB);
BB *caseBB = func.GetLabelBBAt(switchStmt.GetSwitchTable().front().second);
ASSERT(caseBB != nullptr, "null ptr check");
newBB->AddSucc(*caseBB);
newBB->AddSucc(*defaultBB);
if (bb.GetAttributes(kBBAttrIsTry)) {
newBB->SetAttributes(kBBAttrIsTry);
func.SetBBTryNodeMap(*newBB, *func.GetBBTryNodeMap().at(&bb));
AddCatchHandlerForTryBB(bb, exitBlocks);
AddCatchHandlerForTryBB(*newBB, exitBlocks);
}
}
void MeCFG::AddCatchHandlerForTryBB(BB &bb, MapleVector<BB*> &exitBlocks) {
if (!bb.GetAttributes(kBBAttrIsTry)) {
return;
}
auto it = func.GetBBTryNodeMap().find(&bb);
CHECK_FATAL(it != func.GetBBTryNodeMap().end(), "try bb without try");
StmtNode *currTry = it->second;
const auto *tryNode = static_cast<const TryNode*>(currTry);
bool hasFinallyHandler = false;
// add exception handler bb
for (size_t j = 0; j < tryNode->GetOffsetsCount(); ++j) {
LabelIdx labelIdx = tryNode->GetOffset(j);
ASSERT(func.GetLabelBBIdMap().find(labelIdx) != func.GetLabelBBIdMap().end(), "runtime check error");
BB *meBB = func.GetLabelBBAt(labelIdx);
CHECK_FATAL(meBB != nullptr, "null ptr check");
ASSERT(meBB->GetAttributes(kBBAttrIsCatch), "runtime check error");
if (meBB->GetAttributes(kBBAttrIsJSFinally) || meBB->GetAttributes(kBBAttrIsCatch)) {
hasFinallyHandler = true;
}
// avoid redundant succ
if (!meBB->IsSuccBB(bb)) {
bb.AddSucc(*meBB);
}
}
// if try block don't have finally catch handler, add common_exit_bb as its succ
if (!hasFinallyHandler) {
if (!bb.GetAttributes(kBBAttrIsExit)) {
bb.SetAttributes(kBBAttrIsExit); // may exit
exitBlocks.push_back(&bb);
}
} else if ((func.GetMIRModule().GetSrcLang() == kSrcLangJava) && bb.GetAttributes(kBBAttrIsExit)) {
// deal with throw bb, if throw bb in a tryblock and has finallyhandler
auto &stmtNodes = bb.GetStmtNodes();
if (!stmtNodes.empty() && stmtNodes.back().GetOpCode() == OP_throw) {
bb.ClearAttributes(kBBAttrIsExit);
ASSERT(&bb == exitBlocks.back(), "runtime check error");
exitBlocks.pop_back();
}
}
}
void MeCFG::BuildMirCFG() {
MapleVector<BB*> entryBlocks(func.GetAlloc().Adapter());
MapleVector<BB*> exitBlocks(func.GetAlloc().Adapter());
std::vector<BB*> switchBBsWithOneCaseBranch;
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_entry() || bIt == func.common_exit()) {
continue;
}
BB *bb = *bIt;
CHECK_FATAL(bb != nullptr, "null ptr check ");
if (bb->GetAttributes(kBBAttrIsEntry)) {
entryBlocks.push_back(bb);
}
if (bb->GetAttributes(kBBAttrIsExit)) {
exitBlocks.push_back(bb);
}
switch (bb->GetKind()) {
case kBBGoto: {
StmtNode &lastStmt = bb->GetStmtNodes().back();
if (lastStmt.GetOpCode() == OP_throw) {
break;
}
ASSERT(lastStmt.GetOpCode() == OP_goto, "runtime check error");
auto &gotoStmt = static_cast<GotoNode&>(lastStmt);
LabelIdx lblIdx = gotoStmt.GetOffset();
BB *meBB = func.GetLabelBBAt(lblIdx);
bb->AddSucc(*meBB);
break;
}
case kBBCondGoto: {
StmtNode &lastStmt = bb->GetStmtNodes().back();
ASSERT(lastStmt.IsCondBr(), "runtime check error");
// succ[0] is fallthru, succ[1] is gotoBB
auto rightNextBB = bIt;
++rightNextBB;
CHECK_FATAL(rightNextBB != eIt, "null ptr check ");
bb->AddSucc(**rightNextBB);
// link goto
auto &gotoStmt = static_cast<CondGotoNode&>(lastStmt);
LabelIdx lblIdx = gotoStmt.GetOffset();
BB *meBB = func.GetLabelBBAt(lblIdx);
if (*rightNextBB == meBB) {
constexpr char tmpBool[] = "tmpBool";
auto *mirBuilder = func.GetMIRModule().GetMIRBuilder();
MIRSymbol *st = mirBuilder->GetOrCreateLocalDecl(tmpBool, *GlobalTables::GetTypeTable().GetUInt1());
auto *dassign = mirBuilder->CreateStmtDassign(st->GetStIdx(), 0, lastStmt.Opnd(0));
bb->ReplaceStmt(&lastStmt, dassign);
bb->SetKind(kBBFallthru);
} else {
bb->AddSucc(*meBB);
}
// can the gotostmt be replaced by assertnonnull ?
if (IfReplaceWithAssertNonNull(*meBB)) {
patternSet.insert(lblIdx);
}
break;
}
case kBBSwitch: {
StmtNode &lastStmt = bb->GetStmtNodes().back();
ASSERT(lastStmt.GetOpCode() == OP_switch, "runtime check error");
auto &switchStmt = static_cast<SwitchNode&>(lastStmt);
LabelIdx lblIdx = switchStmt.GetDefaultLabel();
BB *mirBB = func.GetLabelBBAt(lblIdx);
bb->AddSucc(*mirBB);
std::set<LabelIdx> caseLabels;
for (size_t j = 0; j < switchStmt.GetSwitchTable().size(); ++j) {
lblIdx = switchStmt.GetCasePair(j).second;
BB *meBB = func.GetLabelBBAt(lblIdx);
(void)caseLabels.insert(lblIdx);
// Avoid duplicate succs.
auto it = std::find(bb->GetSucc().begin(), bb->GetSucc().end(), meBB);
if (it == bb->GetSucc().end()) {
bb->AddSucc(*meBB);
}
}
if (bb->GetSucc().size() == 1) {
bb->RemoveLastStmt();
bb->SetKind(kBBFallthru);
} else if (caseLabels.size() == 1) {
switchBBsWithOneCaseBranch.push_back(bb);
}
break;
}
case kBBReturn:
break;
default: {
// fall through?
auto rightNextBB = bIt;
++rightNextBB;
if (rightNextBB != eIt) {
bb->AddSucc(**rightNextBB);
}
break;
}
}
// deal try blocks, add catch handler to try's succ. SwitchBB dealed individually
if (bb->GetAttributes(kBBAttrIsTry)) {
AddCatchHandlerForTryBB(*bb, exitBlocks);
}
}
for (BB *switchBB : switchBBsWithOneCaseBranch) {
ReplaceSwitchContainsOneCaseBranchWithBrtrue(*switchBB, exitBlocks);
}
// merge all blocks in entryBlocks
for (BB *bb : entryBlocks) {
func.GetCommonEntryBB()->AddEntry(*bb);
}
// merge all blocks in exitBlocks
for (BB *bb : exitBlocks) {
func.GetCommonExitBB()->AddExit(*bb);
}
}
bool MeCFG::FindExprUse(const BaseNode &expr, StIdx stIdx) const {
if (expr.GetOpCode() == OP_addrof || expr.GetOpCode() == OP_dread) {
const auto &addofNode = static_cast<const AddrofNode&>(expr);
return addofNode.GetStIdx() == stIdx;
} else if (expr.GetOpCode() == OP_iread) {
return FindExprUse(*expr.Opnd(0), stIdx);
} else {
for (size_t i = 0; i < expr.NumOpnds(); ++i) {
if (FindExprUse(*expr.Opnd(i), stIdx)) {
return true;
}
}
}
return false;
}
bool MeCFG::FindUse(const StmtNode &stmt, StIdx stIdx) const {
Opcode opcode = stmt.GetOpCode();
switch (opcode) {
case OP_call:
case OP_virtualcall:
case OP_virtualicall:
case OP_superclasscall:
case OP_interfacecall:
case OP_interfaceicall:
case OP_customcall:
case OP_polymorphiccall:
case OP_icall:
case OP_intrinsiccall:
case OP_xintrinsiccall:
case OP_intrinsiccallwithtype:
case OP_callassigned:
case OP_virtualcallassigned:
case OP_virtualicallassigned:
case OP_superclasscallassigned:
case OP_interfacecallassigned:
case OP_interfaceicallassigned:
case OP_customcallassigned:
case OP_polymorphiccallassigned:
case OP_icallassigned:
case OP_intrinsiccallassigned:
case OP_xintrinsiccallassigned:
case OP_intrinsiccallwithtypeassigned:
case OP_syncenter:
case OP_syncexit: {
for (size_t i = 0; i < stmt.NumOpnds(); ++i) {
BaseNode *argExpr = stmt.Opnd(i);
if (FindExprUse(*argExpr, stIdx)) {
return true;
}
}
break;
}
case OP_dassign: {
const auto &dNode = static_cast<const DassignNode&>(stmt);
return FindExprUse(*dNode.GetRHS(), stIdx);
}
case OP_regassign: {
const auto &rNode = static_cast<const RegassignNode&>(stmt);
if (rNode.GetRegIdx() < 0) {
return false;
}
return FindExprUse(*rNode.Opnd(0), stIdx);
}
case OP_iassign: {
const auto &iNode = static_cast<const IassignNode&>(stmt);
if (FindExprUse(*iNode.Opnd(0), stIdx)) {
return true;
} else {
return FindExprUse(*iNode.GetRHS(), stIdx);
}
}
case OP_assertnonnull:
case OP_eval:
case OP_free:
case OP_switch: {
BaseNode *argExpr = stmt.Opnd(0);
return FindExprUse(*argExpr, stIdx);
}
default:
break;
}
return false;
}
bool MeCFG::FindDef(const StmtNode &stmt, StIdx stIdx) const {
if (stmt.GetOpCode() != OP_dassign && !kOpcodeInfo.IsCallAssigned(stmt.GetOpCode())) {
return false;
}
if (stmt.GetOpCode() == OP_dassign) {
const auto &dassStmt = static_cast<const DassignNode&>(stmt);
return dassStmt.GetStIdx() == stIdx;
}
const auto &cNode = static_cast<const CallNode&>(stmt);
const CallReturnVector &nRets = cNode.GetReturnVec();
if (!nRets.empty()) {
ASSERT(nRets.size() == 1, "Single Ret value for now.");
StIdx idx = nRets[0].first;
RegFieldPair regFieldPair = nRets[0].second;
if (!regFieldPair.IsReg()) {
return idx == stIdx;
}
}
return false;
}
// Return true if there is no use or def of sym betweent from to to.
bool MeCFG::HasNoOccBetween(StmtNode &from, const StmtNode &to, StIdx stIdx) const {
for (StmtNode *stmt = &from; stmt && stmt != &to; stmt = stmt->GetNext()) {
if (FindUse(*stmt, stIdx) || FindDef(*stmt, stIdx)) {
return false;
}
}
return true;
}
// Fix the initially created CFG
void MeCFG::FixMirCFG() {
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_entry() || bIt == func.common_exit()) {
continue;
}
auto *bb = *bIt;
// Split bb in try if there are use -- def the same ref var.
if (bb->GetAttributes(kBBAttrIsTry)) {
// 1. Split callassigned/dassign stmt to two insns if it redefine a symbole and also use
// the same symbol as its operand.
for (StmtNode *stmt = to_ptr(bb->GetStmtNodes().begin()); stmt != nullptr; stmt = stmt->GetNext()) {
const MIRSymbol *sym = nullptr;
if (kOpcodeInfo.IsCallAssigned(stmt->GetOpCode())) {
auto *cNode = static_cast<CallNode*>(stmt);
sym = cNode->GetCallReturnSymbol(func.GetMIRModule());
} else if (stmt->GetOpCode() == OP_dassign) {
auto *dassStmt = static_cast<DassignNode*>(stmt);
// exclude the case a = b;
if (dassStmt->GetRHS()->GetOpCode() == OP_dread) {
continue;
}
sym = func.GetMirFunc()->GetLocalOrGlobalSymbol(dassStmt->GetStIdx());
}
if (sym == nullptr || sym->GetType()->GetPrimType() != PTY_ref || !sym->IsLocal()) {
continue;
}
if (kOpcodeInfo.IsCallAssigned(stmt->GetOpCode()) || FindUse(*stmt, sym->GetStIdx())) {
func.GetMirFunc()->IncTempCount();
std::string tempStr = std::string("tempRet").append(std::to_string(func.GetMirFunc()->GetTempCount()));
MIRBuilder *builder = func.GetMirFunc()->GetModule()->GetMIRBuilder();
MIRSymbol *targetSt = builder->GetOrCreateLocalDecl(tempStr, *sym->GetType());
targetSt->ResetIsDeleted();
if (stmt->GetOpCode() == OP_dassign) {
auto *rhs = static_cast<DassignNode*>(stmt)->GetRHS();
StmtNode *dassign = builder->CreateStmtDassign(*targetSt, 0, rhs);
bb->ReplaceStmt(stmt, dassign);
stmt = dassign;
} else {
auto *cNode = static_cast<CallNode*>(stmt);
CallReturnPair retPair = cNode->GetReturnPair(0);
retPair.first = targetSt->GetStIdx();
cNode->SetReturnPair(retPair, 0);
}
StmtNode *dassign = builder->CreateStmtDassign(*sym, 0, builder->CreateExprDread(*targetSt));
if (stmt->GetNext() != nullptr) {
bb->InsertStmtBefore(stmt->GetNext(), dassign);
} else {
ASSERT(stmt == &(bb->GetStmtNodes().back()), "just check");
stmt->SetNext(dassign);
dassign->SetPrev(stmt);
bb->GetStmtNodes().update_back(dassign);
}
}
}
}
}
// 2. Split bb to two bbs if there are use and def the same ref var in bb.
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_entry() || bIt == func.common_exit()) {
continue;
}
auto *bb = *bIt;
if (bb == nullptr) {
continue;
}
if (bb->GetAttributes(kBBAttrIsTry)) {
for (auto &splitPoint : bb->GetStmtNodes()) {
const MIRSymbol *sym = nullptr;
StmtNode *nextStmt = splitPoint.GetNext();
if (kOpcodeInfo.IsCallAssigned(splitPoint.GetOpCode())) {
auto *cNode = static_cast<CallNode*>(&splitPoint);
sym = cNode->GetCallReturnSymbol(func.GetMIRModule());
} else {
if (nextStmt == nullptr ||
(nextStmt->GetOpCode() != OP_dassign && !kOpcodeInfo.IsCallAssigned(nextStmt->GetOpCode()))) {
continue;
}
if (nextStmt->GetOpCode() == OP_dassign) {
auto *dassignStmt = static_cast<DassignNode*>(nextStmt);
const StIdx stIdx = dassignStmt->GetStIdx();
sym = func.GetMirFunc()->GetLocalOrGlobalSymbol(stIdx);
} else {
auto *cNode = static_cast<CallNode*>(nextStmt);
sym = cNode->GetCallReturnSymbol(func.GetMIRModule());
}
}
if (sym == nullptr || sym->GetType()->GetPrimType() != PTY_ref || !sym->IsLocal()) {
continue;
}
if (!kOpcodeInfo.IsCallAssigned(splitPoint.GetOpCode()) &&
HasNoOccBetween(*bb->GetStmtNodes().begin().d(), *nextStmt, sym->GetStIdx())) {
continue;
}
BB &newBB = func.SplitBB(*bb, splitPoint);
// because SplitBB will insert a bb, we need update bIt & eIt
auto newBBIt = std::find(func.cbegin(), func.cend(), bb);
bIt = build_filter_iterator(
newBBIt, std::bind(FilterNullPtr<MapleVector<BB*>::const_iterator>, std::placeholders::_1, func.end()));
eIt = func.valid_end();
for (size_t si = 0; si < newBB.GetSucc().size(); ++si) {
BB *sucBB = newBB.GetSucc(si);
if (sucBB->GetAttributes(kBBAttrIsCatch)) {
bb->AddSucc(*sucBB);
}
}
break;
}
}
// removing outgoing exception edge from normal return bb
if (bb->GetKind() != kBBReturn || !bb->GetAttributes(kBBAttrIsTry) || bb->IsEmpty()) {
continue;
}
// make sure this is a normal return bb
// throw, retsub and retgoto are not allowed here
if (bb->GetStmtNodes().back().GetOpCode() != OP_return) {
continue;
}
// fast path
StmtNode *stmt = bb->GetTheOnlyStmtNode();
if (stmt != nullptr) {
// simplify the cfg removing all succs of this bb
for (size_t si = 0; si < bb->GetSucc().size(); ++si) {
BB *sucBB = bb->GetSucc(si);
if (sucBB->GetAttributes(kBBAttrIsCatch)) {
sucBB->RemovePred(*bb);
--si;
}
}
continue;
}
// split this non-trivial bb
StmtNode *splitPoint = bb->GetStmtNodes().back().GetPrev();
while (splitPoint != nullptr && splitPoint->GetOpCode() == OP_comment) {
splitPoint = splitPoint->GetPrev();
}
CHECK_FATAL(splitPoint != nullptr, "null ptr check");
BB &newBB = func.SplitBB(*bb, *splitPoint);
// because SplitBB will insert a bb, we need update bIt & eIt
auto newBBIt = std::find(func.cbegin(), func.cend(), bb);
bIt = build_filter_iterator(
newBBIt, std::bind(FilterNullPtr<MapleVector<BB*>::const_iterator>, std::placeholders::_1, func.end()));
eIt = func.valid_end();
// redirect all succs of new bb to bb
for (size_t si = 0; si < newBB.GetSucc().size(); ++si) {
BB *sucBB = newBB.GetSucc(si);
if (sucBB->GetAttributes(kBBAttrIsCatch)) {
sucBB->ReplacePred(&newBB, bb);
--si;
}
}
if (bIt == eIt) {
break;
}
}
}
// replace "if() throw NPE()" with assertnonnull
void MeCFG::ReplaceWithAssertnonnull() {
}
bool MeCFG::IsStartTryBB(maple::BB &meBB) const {
if (!meBB.GetAttributes(kBBAttrIsTry) || meBB.GetAttributes(kBBAttrIsTryEnd)) {
return false;
}
return (!meBB.GetStmtNodes().empty() && meBB.GetStmtNodes().front().GetOpCode() == OP_try);
}
void MeCFG::FixTryBB(maple::BB &startBB, maple::BB &nextBB) {
startBB.RemoveAllPred();
for (size_t i = 0; i < nextBB.GetPred().size(); ++i) {
nextBB.GetPred(i)->ReplaceSucc(&nextBB, &startBB);
}
ASSERT(nextBB.GetPred().empty(), "pred of nextBB should be empty");
startBB.RemoveAllSucc();
startBB.AddSucc(nextBB);
}
// analyse the CFG to find the BBs that are not reachable from function entries
// and delete them
bool MeCFG::UnreachCodeAnalysis(bool updatePhi) {
std::vector<bool> visitedBBs(func.NumBBs(), false);
func.GetCommonEntryBB()->FindReachableBBs(visitedBBs);
// delete the unreached bb
bool cfgChanged = false;
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_exit()) {
continue;
}
auto *bb = *bIt;
if (bb->GetAttributes(kBBAttrIsEntry)) {
continue;
}
BBId idx = bb->GetBBId();
if (visitedBBs[idx]) {
continue;
}
// if bb is StartTryBB, relationship between endtry and try should be maintained
if (IsStartTryBB(*bb)) {
bool needFixTryBB = false;
size_t size = func.GetAllBBs().size();
for (size_t nextIdx = idx + 1; nextIdx < size; ++nextIdx) {
auto nextBB = func.GetBBFromID(BBId(nextIdx));
if (nextBB == nullptr) {
continue;
}
if (!visitedBBs[nextIdx] && nextBB->GetAttributes(kBBAttrIsTryEnd)) {
break;
}
if (visitedBBs[nextIdx]) {
needFixTryBB = true;
visitedBBs[idx] = true;
FixTryBB(*bb, *nextBB);
cfgChanged = true;
break;
}
}
if (needFixTryBB) {
continue;
}
}
if (!MeOption::quiet) {
LogInfo::MapleLogger() << "#### BB " << bb->GetBBId() << " deleted because unreachable\n";
}
if (bb->GetAttributes(kBBAttrIsTryEnd)) {
// unreachable bb has try end info
auto bbIt = std::find(func.rbegin(), func.rend(), bb);
auto prevIt = ++bbIt;
for (auto it = prevIt; it != func.rend(); ++it) {
if (*it != nullptr) {
// move entrytry tag to previous bb with try
if ((*it)->GetAttributes(kBBAttrIsTry) && !(*it)->GetAttributes(kBBAttrIsTryEnd)) {
(*it)->SetAttributes(kBBAttrIsTryEnd);
func.SetTryBBByOtherEndTryBB(*it, bb);
}
break;
}
}
}
func.DeleteBasicBlock(*bb);
cfgChanged = true;
// remove the bb from its succ's pred_ list
while (bb->GetSucc().size() > 0) {
BB *sucBB = bb->GetSucc(0);
sucBB->RemovePred(*bb, updatePhi);
if (updatePhi) {
if (sucBB->GetPred().empty()) {
sucBB->ClearPhiList();
} else if (sucBB->GetPred().size() == 1) {
ConvertPhis2IdentityAssigns(*sucBB);
}
}
}
// remove the bb from common_exit_bb's pred list if it is there
auto &predsOfCommonExit = func.GetCommonExitBB()->GetPred();
auto it = std::find(predsOfCommonExit.begin(), predsOfCommonExit.end(), bb);
if (it != predsOfCommonExit.end()) {
func.GetCommonExitBB()->RemoveExit(*bb);
}
}
return cfgChanged;
}
void MeCFG::ConvertPhiList2IdentityAssigns(BB &meBB) const {
auto phiIt = meBB.GetPhiList().begin();
while (phiIt != meBB.GetPhiList().end()) {
// replace phi with identify assignment as it only has 1 opnd
const OriginalSt *ost = func.GetMeSSATab()->GetOriginalStFromID(phiIt->first);
if (ost->IsSymbolOst() && ost->GetIndirectLev() == 0) {
const MIRSymbol *st = ost->GetMIRSymbol();
MIRType *type = GlobalTables::GetTypeTable().GetTypeFromTyIdx(st->GetTyIdx());
AddrofNode *dread = func.GetMIRModule().GetMIRBuilder()->CreateDread(*st, GetRegPrimType(type->GetPrimType()));
auto *dread2 = func.GetMirFunc()->GetCodeMemPool()->New<AddrofSSANode>(*dread);
dread2->SetSSAVar(*(*phiIt).second.GetPhiOpnd(0));
DassignNode *dassign = func.GetMIRModule().GetMIRBuilder()->CreateStmtDassign(*st, 0, dread2);
func.GetMeSSATab()->GetStmtsSSAPart().SetSSAPartOf(
*dassign, func.GetMeSSATab()->GetStmtsSSAPart().GetSSAPartMp()->New<MayDefPartWithVersionSt>(
&func.GetMeSSATab()->GetStmtsSSAPart().GetSSAPartAlloc()));
auto *theSSAPart =
static_cast<MayDefPartWithVersionSt*>(func.GetMeSSATab()->GetStmtsSSAPart().SSAPartOf(*dassign));
theSSAPart->SetSSAVar(*((*phiIt).second.GetResult()));
meBB.PrependStmtNode(dassign);
}
++phiIt;
}
meBB.ClearPhiList(); // delete all the phis
}
void MeCFG::ConvertMePhiList2IdentityAssigns(BB &meBB) const {
auto phiIt = meBB.GetMePhiList().begin();
while (phiIt != meBB.GetMePhiList().end()) {
// replace phi with identify assignment as it only has 1 opnd
const OriginalSt *ost = func.GetMeSSATab()->GetOriginalStFromID(phiIt->first);
if (ost->IsSymbolOst() && ost->GetIndirectLev() == 0) {
auto *dassign = func.GetIRMap()->NewInPool<DassignMeStmt>();
MePhiNode *varPhi = phiIt->second;
dassign->SetLHS(static_cast<VarMeExpr*>(varPhi->GetLHS()));
dassign->SetRHS(varPhi->GetOpnd(0));
dassign->SetBB(varPhi->GetDefBB());
dassign->SetIsLive(varPhi->GetIsLive());
meBB.PrependMeStmt(dassign);
} else if (ost->IsPregOst()) {
auto *regAss = func.GetIRMap()->New<RegassignMeStmt>();
MePhiNode *regPhi = phiIt->second;
regAss->SetLHS(static_cast<RegMeExpr*>(regPhi->GetLHS()));
regAss->SetRHS(regPhi->GetOpnd(0));
regAss->SetBB(regPhi->GetDefBB());
regAss->SetIsLive(regPhi->GetIsLive());
meBB.PrependMeStmt(regAss);
}
++phiIt;
}
meBB.GetMePhiList().clear(); // delete all the phis
}
// used only after DSE because it looks at live field of VersionSt
void MeCFG::ConvertPhis2IdentityAssigns(BB &meBB) const {
if (meBB.IsEmpty()) {
return;
}
ConvertPhiList2IdentityAssigns(meBB);
ConvertMePhiList2IdentityAssigns(meBB);
}
// analyse the CFG to find the BBs that will not reach any function exit; these
// are BBs inside infinite loops; mark their wontExit flag and create
// artificial edges from them to common_exit_bb
void MeCFG::WontExitAnalysis() {
if (func.NumBBs() == 0) {
return;
}
std::vector<bool> visitedBBs(func.NumBBs(), false);
func.GetCommonExitBB()->FindWillExitBBs(visitedBBs);
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_entry()) {
continue;
}
auto *bb = *bIt;
BBId idx = bb->GetBBId();
if (visitedBBs[idx]) {
continue;
}
bb->SetAttributes(kBBAttrWontExit);
if (!MeOption::quiet) {
LogInfo::MapleLogger() << "#### BB " << idx << " wont exit\n";
}
if (bb->GetKind() == kBBGoto) {
// create artificial BB to transition to common_exit_bb
BB *newBB = func.NewBasicBlock();
// update bIt & eIt
auto newBBIt = std::find(func.cbegin(), func.cend(), bb);
bIt = build_filter_iterator(
newBBIt, std::bind(FilterNullPtr<MapleVector<BB*>::const_iterator>, std::placeholders::_1, func.end()));
eIt = func.valid_end();
newBB->SetKindReturn();
newBB->SetAttributes(kBBAttrArtificial);
bb->AddSucc(*newBB);
func.GetCommonExitBB()->AddExit(*newBB);
}
}
}
// CFG Verify
// Check bb-vec and bb-list are strictly consistent.
void MeCFG::Verify() const {
// Check every bb in bb-list.
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
if (bIt == func.common_entry() || bIt == func.common_exit()) {
continue;
}
auto *bb = *bIt;
ASSERT(bb->GetBBId() < func.GetAllBBs().size(), "CFG Error!");
ASSERT(func.GetBBFromID(bb->GetBBId()) == bb, "CFG Error!");
if (bb->IsEmpty()) {
continue;
}
ASSERT(bb->GetKind() != kBBUnknown, "runtime check error");
// verify succ[1] is goto bb
if (bb->GetKind() == kBBCondGoto) {
if (!bb->GetAttributes(kBBAttrIsTry) && !bb->GetAttributes(kBBAttrWontExit)) {
ASSERT(bb->GetStmtNodes().rbegin().base().d() != nullptr, "runtime check error");
ASSERT(bb->GetSucc().size() == kBBVectorInitialSize, "runtime check error");
}
ASSERT(bb->GetSucc(1)->GetBBLabel() == static_cast<CondGotoNode&>(bb->GetStmtNodes().back()).GetOffset(),
"runtime check error");
} else if (bb->GetKind() == kBBGoto) {
if (bb->GetStmtNodes().back().GetOpCode() == OP_throw) {
continue;
}
if (!bb->GetAttributes(kBBAttrIsTry) && !bb->GetAttributes(kBBAttrWontExit)) {
ASSERT(bb->GetStmtNodes().rbegin().base().d() != nullptr, "runtime check error");
ASSERT(bb->GetSucc().size() == 1, "runtime check error");
}
ASSERT(bb->GetSucc(0)->GetBBLabel() == static_cast<GotoNode&>(bb->GetStmtNodes().back()).GetOffset(),
"runtime check error");
}
}
}
// check that all the target labels in jump statements are defined
void MeCFG::VerifyLabels() const {
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
BB *mirBB = *bIt;
auto &stmtNodes = mirBB->GetStmtNodes();
if (stmtNodes.rbegin().base().d() == nullptr) {
continue;
}
if (mirBB->GetKind() == kBBGoto) {
if (stmtNodes.back().GetOpCode() == OP_throw) {
continue;
}
ASSERT(
func.GetLabelBBAt(static_cast<GotoNode&>(stmtNodes.back()).GetOffset())->GetBBLabel() ==
static_cast<GotoNode&>(stmtNodes.back()).GetOffset(),
"undefined label in goto");
} else if (mirBB->GetKind() == kBBCondGoto) {
ASSERT(
func.GetLabelBBAt(static_cast<CondGotoNode&>(stmtNodes.back()).GetOffset())->GetBBLabel() ==
static_cast<CondGotoNode&>(stmtNodes.back()).GetOffset(),
"undefined label in conditional branch");
} else if (mirBB->GetKind() == kBBSwitch) {
auto &switchStmt = static_cast<SwitchNode&>(stmtNodes.back());
LabelIdx targetLabIdx = switchStmt.GetDefaultLabel();
BB *bb = func.GetLabelBBAt(targetLabIdx);
ASSERT(bb->GetBBLabel() == targetLabIdx, "undefined label in switch");
for (size_t j = 0; j < switchStmt.GetSwitchTable().size(); ++j) {
targetLabIdx = switchStmt.GetCasePair(j).second;
bb = func.GetLabelBBAt(targetLabIdx);
ASSERT(bb->GetBBLabel() == targetLabIdx, "undefined switch target label");
}
}
}
}
void MeCFG::Dump() const {
// BSF Dump the cfg
LogInfo::MapleLogger() << "####### CFG Dump: ";
ASSERT(func.NumBBs() != 0, "size to be allocated is 0");
auto *visitedMap = static_cast<bool*>(calloc(func.NumBBs(), sizeof(bool)));
if (visitedMap != nullptr) {
std::queue<BB*> qu;
qu.push(func.GetFirstBB());
while (!qu.empty()) {
BB *bb = qu.front();
qu.pop();
if (bb == nullptr) {
continue;
}
BBId id = bb->GetBBId();
if (visitedMap[static_cast<long>(id)]) {
continue;
}
LogInfo::MapleLogger() << id << " ";
visitedMap[static_cast<long>(id)] = true;
auto it = bb->GetSucc().begin();
while (it != bb->GetSucc().end()) {
BB *kidBB = *it;
if (!visitedMap[static_cast<long>(kidBB->GetBBId())]) {
qu.push(kidBB);
}
++it;
}
}
LogInfo::MapleLogger() << '\n';
free(visitedMap);
}
}
// replace special char in FunctionName for output file
static void ReplaceFilename(std::string &fileName) {
for (char &c : fileName) {
if (c == ';' || c == '/' || c == '|') {
c = '_';
}
}
}
static bool ContainsConststr(const BaseNode &x) {
if (x.GetOpCode() == OP_conststr || x.GetOpCode() == OP_conststr16) {
return true;
}
for (size_t i = 0; i < x.NumOpnds(); ++i)
if (ContainsConststr(*x.Opnd(i))) {
return true;
}
return false;
}
std::string MeCFG::ConstructFileNameToDump(const std::string &prefix) const {
std::string fileName;
if (!prefix.empty()) {
fileName.append(prefix);
fileName.append("-");
}
// the func name length may exceed OS's file name limit, so truncate after 80 chars
if (func.GetName().size() <= kFuncNameLenLimit) {
fileName.append(func.GetName());
} else {
fileName.append(func.GetName().c_str(), kFuncNameLenLimit);
}
ReplaceFilename(fileName);
fileName.append(".dot");
return fileName;
}
void MeCFG::DumpToFileInStrs(std::ofstream &cfgFile) const {
const auto &eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
auto *bb = *bIt;
if (bb->GetKind() == kBBCondGoto) {
cfgFile << "BB" << bb->GetBBId() << "[shape=diamond,label= \" BB" << bb->GetBBId() << ":\n{ ";
} else {
cfgFile << "BB" << bb->GetBBId() << "[shape=box,label= \" BB" << bb->GetBBId() << ":\n{ ";
}
if (bb->GetBBLabel() != 0) {
cfgFile << "@" << func.GetMirFunc()->GetLabelName(bb->GetBBLabel()) << ":\n";
}
for (auto &phiPair : bb->GetPhiList()) {
phiPair.second.Dump();
}
for (auto &stmt : bb->GetStmtNodes()) {
// avoid printing content that may contain " as this needs to be quoted
if (stmt.GetOpCode() == OP_comment) {
continue;
}
if (ContainsConststr(stmt)) {
continue;
}
stmt.Dump(1);
}
cfgFile << "}\"];\n";
}
}
// generate dot file for cfg
void MeCFG::DumpToFile(const std::string &prefix, bool dumpInStrs, bool dumpEdgeFreq) const {
if (MeOption::noDot) {
return;
}
std::ofstream cfgFile;
std::streambuf *coutBuf = LogInfo::MapleLogger().rdbuf(); // keep original cout buffer
std::streambuf *buf = cfgFile.rdbuf();
LogInfo::MapleLogger().rdbuf(buf);
const std::string &fileName = ConstructFileNameToDump(prefix);
cfgFile.open(fileName, std::ios::trunc);
cfgFile << "digraph {\n";
cfgFile << " # /*" << func.GetName() << " (red line is exception handler)*/\n";
// dump edge
auto eIt = func.valid_end();
for (auto bIt = func.valid_begin(); bIt != eIt; ++bIt) {
auto *bb = *bIt;
if (bIt == func.common_exit()) {
// specical case for common_exit_bb
for (auto it = bb->GetPred().begin(); it != bb->GetPred().end(); ++it) {
dumpEdgeFreq ? cfgFile << "BB" << (*it)->GetBBId() << "_freq_" << (*it)->GetFrequency() << " -> " <<
"BB" << bb->GetBBId() << "_freq_" << bb->GetFrequency() << "[style=dotted];\n" :
cfgFile << "BB" << (*it)->GetBBId()<< " -> " << "BB" << bb->GetBBId() << "[style=dotted];\n";
}
continue;
}
if (bb->GetAttributes(kBBAttrIsInstrument)) {
cfgFile << "BB" << bb->GetBBId() << "[color=blue];\n";
}
for (auto it = bb->GetSucc().begin(); it != bb->GetSucc().end(); ++it) {
dumpEdgeFreq ? cfgFile << "BB" << bb->GetBBId() << "_freq_" << bb->GetFrequency() << " -> " <<
"BB" << (*it)->GetBBId() << "_freq_" << (*it)->GetFrequency() :
cfgFile << "BB" << bb->GetBBId() << " -> " << "BB" << (*it)->GetBBId();
if (bb == func.GetCommonEntryBB()) {
cfgFile << "[style=dotted]";
continue;
}
if ((*it)->GetAttributes(kBBAttrIsCatch)) {
/* succ is exception handler */
cfgFile << "[color=red]";
}
if (dumpEdgeFreq) {
cfgFile << "[label=" << bb->GetEdgeFreq(*it) << "];\n";
} else {
cfgFile << ";\n";
}
}
}
// dump instruction in each BB
if (dumpInStrs) {
DumpToFileInStrs(cfgFile);
}
cfgFile << "}\n";
cfgFile.flush();
LogInfo::MapleLogger().rdbuf(coutBuf);
}
} // namespace maple
| 15,747 |
1,831 | <gh_stars>1000+
/**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/common/ClientHelloInfoTracer.h"
#include <algorithm>
#include <memory>
#include <string>
#include <folly/String.h>
#include "logdevice/common/Sockaddr.h"
#include "logdevice/include/LogAttributes.h"
namespace facebook { namespace logdevice {
ClientHelloInfoTracer::ClientHelloInfoTracer(
std::shared_ptr<TraceLogger> logger)
: SampledTracer(std::move(logger)) {}
void ClientHelloInfoTracer::traceClientHelloInfo(
const folly::Optional<folly::dynamic>& json,
const PrincipalIdentity& principal,
ConnectionType conn_type,
const Status status) {
if (json.has_value() && !(*json).isObject()) {
RATELIMIT_ERROR(std::chrono::seconds(1),
10,
"Invalid client build info. "
"Expecting folly dynamic object");
return;
}
auto sample_builder = [&]() -> std::unique_ptr<TraceSample> {
auto sample = std::make_unique<TraceSample>();
// include basic client socket description
sample->addNormalValue("client_address", principal.client_address);
// extra information on the hello / status
sample->addNormalValue("ack_status_code", error_name(status));
sample->addNormalValue(
"connection_type", connectionTypeToString(conn_type));
std::vector<std::string> identities;
for (auto& identity : principal.identities) {
identities.push_back(identity.first + ":" + identity.second);
}
sample->addNormVectorValue("identities", identities);
sample->addNormalValue("csid", principal.csid);
if (json.has_value()) {
// dynamically build the trace based on the field name prefixes
for (const auto& pair : (*json).items()) {
auto key_piece = pair.first.stringPiece();
folly::dynamic val = pair.second;
// do not care about logging null / empty values
if (val.isNull()) {
continue;
}
if (key_piece.startsWith("str_") && val.isString()) {
sample->addNormalValue(pair.first.asString(), val.asString());
} else if (key_piece.startsWith("int_") && val.isInt()) {
sample->addIntValue(pair.first.asString(), val.asInt());
} else {
RATELIMIT_WARNING(std::chrono::seconds(1),
10,
"Unknown build info field '%s' from '%s'",
pair.first.c_str(),
principal.client_address.c_str());
}
}
}
return sample;
};
publish(CLIENTINFO_TRACER, sample_builder);
}
}} // namespace facebook::logdevice
| 1,123 |
9,402 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// A set of integers in the range [0..N], for some N defined by the "Env" (via "BitSetTraits").
//
// Represented as a pointer-sized item. If N bits can fit in this item, the representation is "direct"; otherwise,
// the item is a pointer to an array of K size_t's, where K is the number of size_t's necessary to hold N bits.
#ifndef bitSetAsShortLong_DEFINED
#define bitSetAsShortLong_DEFINED 1
#include "bitset.h"
#include "compilerbitsettraits.h"
typedef size_t* BitSetShortLongRep;
template <typename Env, typename BitSetTraits>
class BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>
{
public:
typedef BitSetShortLongRep Rep;
private:
static const unsigned BitsInSizeT = sizeof(size_t) * BitSetSupport::BitsInByte;
inline static bool IsShort(Env env)
{
return BitSetTraits::GetArrSize(env, sizeof(size_t)) <= 1;
}
// The operations on the "long" (pointer-to-array-of-size_t) versions of the representation.
static void AssignLong(Env env, BitSetShortLongRep& lhs, BitSetShortLongRep rhs);
static BitSetShortLongRep MakeSingletonLong(Env env, unsigned bitNum);
static BitSetShortLongRep MakeCopyLong(Env env, BitSetShortLongRep bs);
static bool IsEmptyLong(Env env, BitSetShortLongRep bs);
static unsigned CountLong(Env env, BitSetShortLongRep bs);
static bool IsEmptyUnionLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2);
static void UnionDLong(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2);
static void DiffDLong(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2);
static void AddElemDLong(Env env, BitSetShortLongRep& bs, unsigned i);
static bool TryAddElemDLong(Env env, BitSetShortLongRep& bs, unsigned i);
static void RemoveElemDLong(Env env, BitSetShortLongRep& bs, unsigned i);
static void ClearDLong(Env env, BitSetShortLongRep& bs);
static BitSetShortLongRep MakeUninitArrayBits(Env env);
static BitSetShortLongRep MakeEmptyArrayBits(Env env);
static BitSetShortLongRep MakeFullArrayBits(Env env);
static bool IsMemberLong(Env env, BitSetShortLongRep bs, unsigned i);
static bool EqualLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2);
static bool IsSubsetLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2);
static bool IsEmptyIntersectionLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2);
static void IntersectionDLong(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2);
static void DataFlowDLong(Env env,
BitSetShortLongRep& out,
const BitSetShortLongRep gen,
const BitSetShortLongRep in);
static void LivenessDLong(Env env,
BitSetShortLongRep& in,
const BitSetShortLongRep def,
const BitSetShortLongRep use,
const BitSetShortLongRep out);
#ifdef DEBUG
static const char* ToStringLong(Env env, BitSetShortLongRep bs);
#endif
public:
inline static BitSetShortLongRep UninitVal()
{
return nullptr;
}
static bool MayBeUninit(BitSetShortLongRep bs)
{
return bs == UninitVal();
}
static void Assign(Env env, BitSetShortLongRep& lhs, BitSetShortLongRep rhs)
{
// We can't assert that rhs != UninitVal in the Short case, because in that
// case it's a legal value.
if (IsShort(env))
{
// Both are short.
lhs = rhs;
}
else if (lhs == UninitVal())
{
assert(rhs != UninitVal());
lhs = MakeCopy(env, rhs);
}
else
{
AssignLong(env, lhs, rhs);
}
}
static void AssignAllowUninitRhs(Env env, BitSetShortLongRep& lhs, BitSetShortLongRep rhs)
{
if (IsShort(env))
{
// Both are short.
lhs = rhs;
}
else if (rhs == UninitVal())
{
lhs = rhs;
}
else if (lhs == UninitVal())
{
lhs = MakeCopy(env, rhs);
}
else
{
AssignLong(env, lhs, rhs);
}
}
static void AssignNoCopy(Env env, BitSetShortLongRep& lhs, BitSetShortLongRep rhs)
{
lhs = rhs;
}
static void ClearD(Env env, BitSetShortLongRep& bs)
{
if (IsShort(env))
{
bs = (BitSetShortLongRep) nullptr;
}
else
{
assert(bs != UninitVal());
ClearDLong(env, bs);
}
}
static BitSetShortLongRep MakeSingleton(Env env, unsigned bitNum)
{
assert(bitNum < BitSetTraits::GetSize(env));
if (IsShort(env))
{
return BitSetShortLongRep(((size_t)1) << bitNum);
}
else
{
return MakeSingletonLong(env, bitNum);
}
}
static BitSetShortLongRep MakeCopy(Env env, BitSetShortLongRep bs)
{
if (IsShort(env))
{
return bs;
}
else
{
return MakeCopyLong(env, bs);
}
}
static bool IsEmpty(Env env, BitSetShortLongRep bs)
{
if (IsShort(env))
{
return bs == nullptr;
}
else
{
assert(bs != UninitVal());
return IsEmptyLong(env, bs);
}
}
static unsigned Count(Env env, BitSetShortLongRep bs)
{
if (IsShort(env))
{
return BitSetSupport::CountBitsInIntegral(size_t(bs));
}
else
{
assert(bs != UninitVal());
return CountLong(env, bs);
}
}
static bool IsEmptyUnion(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
return (((size_t)bs1) | ((size_t)bs2)) == 0;
}
else
{
return IsEmptyUnionLong(env, bs1, bs2);
}
}
static void UnionD(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
bs1 = (BitSetShortLongRep)(((size_t)bs1) | ((size_t)bs2));
}
else
{
UnionDLong(env, bs1, bs2);
}
}
static BitSetShortLongRep Union(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
BitSetShortLongRep res = MakeCopy(env, bs1);
UnionD(env, res, bs2);
return res;
}
static void DiffD(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
bs1 = (BitSetShortLongRep)(((size_t)bs1) & (~(size_t)bs2));
}
else
{
DiffDLong(env, bs1, bs2);
}
}
static BitSetShortLongRep Diff(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
BitSetShortLongRep res = MakeCopy(env, bs1);
DiffD(env, res, bs2);
return res;
}
static void RemoveElemD(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(i < BitSetTraits::GetSize(env));
if (IsShort(env))
{
size_t mask = ((size_t)1) << i;
mask = ~mask;
bs = (BitSetShortLongRep)(((size_t)bs) & mask);
}
else
{
assert(bs != UninitVal());
RemoveElemDLong(env, bs, i);
}
}
static BitSetShortLongRep RemoveElem(Env env, BitSetShortLongRep bs, unsigned i)
{
BitSetShortLongRep res = MakeCopy(env, bs);
RemoveElemD(env, res, i);
return res;
}
static void AddElemD(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(i < BitSetTraits::GetSize(env));
if (IsShort(env))
{
size_t mask = ((size_t)1) << i;
bs = (BitSetShortLongRep)(((size_t)bs) | mask);
}
else
{
AddElemDLong(env, bs, i);
}
}
static BitSetShortLongRep AddElem(Env env, BitSetShortLongRep bs, unsigned i)
{
BitSetShortLongRep res = MakeCopy(env, bs);
AddElemD(env, res, i);
return res;
}
static bool TryAddElemD(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(i < BitSetTraits::GetSize(env));
if (IsShort(env))
{
size_t mask = ((size_t)1) << i;
size_t bits = (size_t)bs;
bool added = (bits & mask) == 0;
bs = (BitSetShortLongRep)(bits | mask);
return added;
}
else
{
return TryAddElemDLong(env, bs, i);
}
}
static bool IsMember(Env env, const BitSetShortLongRep bs, unsigned i)
{
assert(i < BitSetTraits::GetSize(env));
if (IsShort(env))
{
size_t mask = ((size_t)1) << i;
return (((size_t)bs) & mask) != 0;
}
else
{
assert(bs != UninitVal());
return IsMemberLong(env, bs, i);
}
}
static void IntersectionD(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
size_t val = (size_t)bs1;
val &= (size_t)bs2;
bs1 = (BitSetShortLongRep)val;
}
else
{
IntersectionDLong(env, bs1, bs2);
}
}
static BitSetShortLongRep Intersection(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
BitSetShortLongRep res = MakeCopy(env, bs1);
IntersectionD(env, res, bs2);
return res;
}
static bool IsEmptyIntersection(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
return (((size_t)bs1) & ((size_t)bs2)) == 0;
}
else
{
return IsEmptyIntersectionLong(env, bs1, bs2);
}
}
static void DataFlowD(Env env, BitSetShortLongRep& out, const BitSetShortLongRep gen, const BitSetShortLongRep in)
{
if (IsShort(env))
{
out = (BitSetShortLongRep)((size_t)out & ((size_t)gen | (size_t)in));
}
else
{
DataFlowDLong(env, out, gen, in);
}
}
static void LivenessD(Env env,
BitSetShortLongRep& in,
const BitSetShortLongRep def,
const BitSetShortLongRep use,
const BitSetShortLongRep out)
{
if (IsShort(env))
{
in = (BitSetShortLongRep)((size_t)use | ((size_t)out & ~(size_t)def));
}
else
{
LivenessDLong(env, in, def, use, out);
}
}
static bool IsSubset(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
size_t u1 = (size_t)bs1;
size_t u2 = (size_t)bs2;
return (u1 & u2) == u1;
}
else
{
return IsSubsetLong(env, bs1, bs2);
}
}
static bool Equal(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
if (IsShort(env))
{
return (size_t)bs1 == (size_t)bs2;
}
else
{
return EqualLong(env, bs1, bs2);
}
}
#ifdef DEBUG
// Returns a string valid until the allocator releases the memory.
static const char* ToString(Env env, BitSetShortLongRep bs)
{
if (IsShort(env))
{
assert(sizeof(BitSetShortLongRep) == sizeof(size_t));
const int CharsForSizeT = sizeof(size_t) * 2;
char* res = nullptr;
const int ShortAllocSize = CharsForSizeT + 4;
res = (char*)BitSetTraits::DebugAlloc(env, ShortAllocSize);
size_t bits = (size_t)bs;
unsigned remaining = ShortAllocSize;
char* ptr = res;
if (sizeof(size_t) == sizeof(int64_t))
{
sprintf_s(ptr, remaining, "%016zX", bits);
}
else
{
assert(sizeof(size_t) == sizeof(int));
sprintf_s(ptr, remaining, "%08X", (DWORD)bits);
}
return res;
}
else
{
return ToStringLong(env, bs);
}
}
#endif
static BitSetShortLongRep MakeEmpty(Env env)
{
if (IsShort(env))
{
return nullptr;
}
else
{
return MakeEmptyArrayBits(env);
}
}
static BitSetShortLongRep MakeFull(Env env)
{
if (IsShort(env))
{
// Can't just shift by numBits+1, since that might be 32 (and (1 << 32( == 1, for an unsigned).
unsigned numBits = BitSetTraits::GetSize(env);
if (numBits == BitsInSizeT)
{
// Can't use the implementation below to get all 1's...
return BitSetShortLongRep(size_t(-1));
}
else
{
return BitSetShortLongRep((size_t(1) << numBits) - 1);
}
}
else
{
return MakeFullArrayBits(env);
}
}
class Iter
{
// The BitSet that we're iterating over. This is updated to point at the current
// size_t set of bits.
BitSetShortLongRep m_bs;
// The end of the iteration.
BitSetShortLongRep m_bsEnd;
// The remaining bits to be iterated over in the current size_t set of bits.
// In the "short" case, these are all the remaining bits.
// In the "long" case, these are remaining bits in the current element;
// these and the bits in the remaining elements comprise the remaining bits.
size_t m_bits;
// The number of bits that have already been iterated over (set or clear). If you
// add this to the bit number of the next bit in "m_bits", you get the proper bit number of that
// bit in "m_bs". This is only updated when we increment m_bs.
unsigned m_bitNum;
public:
Iter(Env env, const BitSetShortLongRep& bs) : m_bs(bs), m_bitNum(0)
{
if (BitSetOps::IsShort(env))
{
m_bits = (size_t)bs;
// Set the iteration end condition, valid even though this is not a pointer in the short case.
m_bsEnd = bs + 1;
}
else
{
assert(bs != BitSetOps::UninitVal());
m_bits = bs[0];
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
m_bsEnd = bs + len;
}
}
bool NextElem(unsigned* pElem)
{
#if BITSET_TRACK_OPCOUNTS
BitSetStaticsImpl::RecordOp(BitSetStaticsImpl::BSOP_NextBit);
#endif
for (;;)
{
DWORD nextBit;
bool hasBit;
#ifdef HOST_64BIT
static_assert_no_msg(sizeof(size_t) == 8);
hasBit = BitScanForward64(&nextBit, m_bits);
#else
static_assert_no_msg(sizeof(size_t) == 4);
hasBit = BitScanForward(&nextBit, m_bits);
#endif
// If there's a bit, doesn't matter if we're short or long.
if (hasBit)
{
*pElem = m_bitNum + nextBit;
m_bits &= ~(((size_t)1) << nextBit); // clear bit we just found so we don't find it again
return true;
}
else
{
// Go to the next size_t bit element. For short bitsets, this will hit the end condition
// and exit.
++m_bs;
if (m_bs == m_bsEnd)
{
return false;
}
// If we get here, it's not a short type, so get the next size_t element.
m_bitNum += sizeof(size_t) * BitSetSupport::BitsInByte;
m_bits = *m_bs;
}
}
}
};
typedef const BitSetShortLongRep& ValArgType;
typedef BitSetShortLongRep RetValType;
};
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::AssignLong(Env env, BitSetShortLongRep& lhs, BitSetShortLongRep rhs)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
lhs[i] = rhs[i];
}
}
template <typename Env, typename BitSetTraits>
BitSetShortLongRep BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::MakeSingletonLong(Env env, unsigned bitNum)
{
assert(!IsShort(env));
BitSetShortLongRep res = MakeEmptyArrayBits(env);
unsigned index = bitNum / BitsInSizeT;
res[index] = ((size_t)1) << (bitNum % BitsInSizeT);
return res;
}
template <typename Env, typename BitSetTraits>
BitSetShortLongRep BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::MakeCopyLong(Env env, BitSetShortLongRep bs)
{
assert(!IsShort(env));
BitSetShortLongRep res = MakeUninitArrayBits(env);
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
res[i] = bs[i];
}
return res;
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IsEmptyLong(Env env, BitSetShortLongRep bs)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
if (bs[i] != 0)
{
return false;
}
}
return true;
}
template <typename Env, typename BitSetTraits>
unsigned BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::CountLong(Env env, BitSetShortLongRep bs)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
unsigned res = 0;
for (unsigned i = 0; i < len; i++)
{
res += BitSetSupport::CountBitsInIntegral(bs[i]);
}
return res;
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::UnionDLong(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
bs1[i] |= bs2[i];
}
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::DiffDLong(Env env, BitSetShortLongRep& bs1, BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
bs1[i] &= ~bs2[i];
}
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::AddElemDLong(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(!IsShort(env));
unsigned index = i / BitsInSizeT;
size_t mask = ((size_t)1) << (i % BitsInSizeT);
bs[index] |= mask;
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::TryAddElemDLong(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(!IsShort(env));
unsigned index = i / BitsInSizeT;
size_t mask = ((size_t)1) << (i % BitsInSizeT);
size_t bits = bs[index];
bool added = (bits & mask) == 0;
bs[index] = bits | mask;
return added;
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::RemoveElemDLong(Env env, BitSetShortLongRep& bs, unsigned i)
{
assert(!IsShort(env));
unsigned index = i / BitsInSizeT;
size_t mask = ((size_t)1) << (i % BitsInSizeT);
mask = ~mask;
bs[index] &= mask;
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::ClearDLong(Env env, BitSetShortLongRep& bs)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
bs[i] = 0;
}
}
template <typename Env, typename BitSetTraits>
BitSetShortLongRep BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::MakeUninitArrayBits(Env env)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
assert(len > 1); // Or else would not require an array.
return (BitSetShortLongRep)(BitSetTraits::Alloc(env, len * sizeof(size_t)));
}
template <typename Env, typename BitSetTraits>
BitSetShortLongRep BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::MakeEmptyArrayBits(Env env)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
assert(len > 1); // Or else would not require an array.
BitSetShortLongRep res = (BitSetShortLongRep)(BitSetTraits::Alloc(env, len * sizeof(size_t)));
for (unsigned i = 0; i < len; i++)
{
res[i] = 0;
}
return res;
}
template <typename Env, typename BitSetTraits>
BitSetShortLongRep BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::MakeFullArrayBits(Env env)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
assert(len > 1); // Or else would not require an array.
BitSetShortLongRep res = (BitSetShortLongRep)(BitSetTraits::Alloc(env, len * sizeof(size_t)));
for (unsigned i = 0; i < len - 1; i++)
{
res[i] = size_t(-1);
}
// Start with all ones, shift in zeros in the last elem.
unsigned lastElemBits = (BitSetTraits::GetSize(env) - 1) % BitsInSizeT + 1;
res[len - 1] = (size_t(-1) >> (BitsInSizeT - lastElemBits));
return res;
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IsMemberLong(Env env, BitSetShortLongRep bs, unsigned i)
{
assert(!IsShort(env));
unsigned index = i / BitsInSizeT;
unsigned bitInElem = (i % BitsInSizeT);
size_t mask = ((size_t)1) << bitInElem;
return (bs[index] & mask) != 0;
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IntersectionDLong(Env env,
BitSetShortLongRep& bs1,
BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
bs1[i] &= bs2[i];
}
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IsEmptyIntersectionLong(Env env,
BitSetShortLongRep bs1,
BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
if ((bs1[i] & bs2[i]) != 0)
{
return false;
}
}
return true;
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IsEmptyUnionLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
if ((bs1[i] | bs2[i]) != 0)
{
return false;
}
}
return true;
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::DataFlowDLong(Env env,
BitSetShortLongRep& out,
const BitSetShortLongRep gen,
const BitSetShortLongRep in)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
out[i] = out[i] & (gen[i] | in[i]);
}
}
template <typename Env, typename BitSetTraits>
void BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::LivenessDLong(Env env,
BitSetShortLongRep& in,
const BitSetShortLongRep def,
const BitSetShortLongRep use,
const BitSetShortLongRep out)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
in[i] = use[i] | (out[i] & ~def[i]);
}
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::EqualLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
if (bs1[i] != bs2[i])
{
return false;
}
}
return true;
}
template <typename Env, typename BitSetTraits>
bool BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::IsSubsetLong(Env env, BitSetShortLongRep bs1, BitSetShortLongRep bs2)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
for (unsigned i = 0; i < len; i++)
{
if ((bs1[i] & bs2[i]) != bs1[i])
{
return false;
}
}
return true;
}
#ifdef DEBUG
template <typename Env, typename BitSetTraits>
const char* BitSetOps</*BitSetType*/ BitSetShortLongRep,
/*Brand*/ BSShortLong,
/*Env*/ Env,
/*BitSetTraits*/ BitSetTraits>::ToStringLong(Env env, BitSetShortLongRep bs)
{
assert(!IsShort(env));
unsigned len = BitSetTraits::GetArrSize(env, sizeof(size_t));
const int CharsForSizeT = sizeof(size_t) * 2;
unsigned allocSz = len * CharsForSizeT + 4;
unsigned remaining = allocSz;
char* res = (char*)BitSetTraits::DebugAlloc(env, allocSz);
char* temp = res;
for (unsigned i = len; 0 < i; i--)
{
size_t bits = bs[i - 1];
if (sizeof(size_t) == sizeof(int64_t))
{
sprintf_s(temp, remaining, "%016zX", bits);
temp += 16;
remaining -= 16;
}
else
{
assert(sizeof(size_t) == sizeof(unsigned));
sprintf_s(temp, remaining, "%08X", (unsigned)bits);
temp += 8;
remaining -= 8;
}
}
return res;
}
#endif
#endif // bitSetAsShortLong_DEFINED
| 15,614 |
1,652 | <filename>redis/redis-console/src/test/java/com/ctrip/xpipe/redis/console/dao/OrganizationDaoTest.java
package com.ctrip.xpipe.redis.console.dao;
import com.ctrip.xpipe.redis.console.AbstractConsoleIntegrationTest;
import com.ctrip.xpipe.redis.console.model.OrganizationTbl;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author chen.zhu
*
* Sep 04, 2017
*/
public class OrganizationDaoTest extends AbstractConsoleIntegrationTest {
@Autowired
private OrganizationDao organizationDao;
@Test
public void testInsertBatch() {
organizationDao.createBatchOrganizations(createBatchOrgTbl(5));
}
@Test
public void testUpdateBatch() {
organizationDao.createBatchOrganizations(createBatchOrgTbl(5));
List<OrganizationTbl> orgs = organizationDao.findAllOrgs();
List<OrganizationTbl> newOrgs = orgs.stream().map(org->{
if(org.getOrgId() > 0) {
org.setOrgId(org.getOrgId()).setOrgName(org.getOrgName()+"-update");
return org;
}
return null;
}).filter(org->org != null).collect(Collectors.toList());
organizationDao.updateBatchOrganizations(newOrgs);
organizationDao.findAllOrgs().forEach(org->logger.info("{}", org));
}
private OrganizationTbl createOrgTbl(long orgId, String orgName) {
OrganizationTbl organizationTbl = new OrganizationTbl();
organizationTbl.setOrgId(orgId).setOrgName(orgName);
return organizationTbl;
}
private List<OrganizationTbl> createBatchOrgTbl(int count) {
List<OrganizationTbl> result = new LinkedList<>();
for(int i = 1; i <= count; i++) {
result.add(createOrgTbl(i, "org-"+i));
}
return result;
}
@Test
public void testFindByOrgId() {
organizationDao.createBatchOrganizations(createBatchOrgTbl(5));
OrganizationTbl organizationTbl = organizationDao.findByOrgId(2L);
Assert.assertEquals(2L, organizationTbl.getOrgId());
}
}
| 892 |
713 | <reponame>franz1981/infinispan
package org.infinispan.transaction.xa.recovery;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import org.infinispan.commons.marshall.AbstractExternalizer;
import org.infinispan.commons.tx.XidImpl;
import org.infinispan.marshall.core.Ids;
import org.infinispan.remoting.transport.Address;
/**
* An object describing in doubt transaction's state. Needed by the transaction recovery process, for displaying
* transactions to the user.
*
* @author <NAME>
* @since 5.0
*/
public class InDoubtTxInfo {
public static final AbstractExternalizer<InDoubtTxInfo> EXTERNALIZER = new Externalizer();
private final XidImpl xid;
private final long internalId;
private int status;
private final transient Set<Address> owners = new HashSet<>();
private transient boolean isLocal;
public InDoubtTxInfo(XidImpl xid, long internalId, int status) {
this.xid = xid;
this.internalId = internalId;
this.status = status;
}
public InDoubtTxInfo(XidImpl xid, long internalId) {
this(xid, internalId, -1);
}
/**
* @return The transaction's {@link XidImpl}.
*/
public XidImpl getXid() {
return xid;
}
/**
* @return The unique long object associated to {@link XidImpl}. It makes possible the invocation of recovery
* operations.
*/
public long getInternalId() {
return internalId;
}
/**
* The value represent transaction's state as described by the {@code status} field.
*
* @return The {@link javax.transaction.Status} or -1 if not set.
*/
public int getStatus() {
return status;
}
/**
* Sets the transaction's state.
*/
public void setStatus(int status) {
this.status = status;
}
/**
* @return The set of nodes where this transaction information is maintained.
*/
public Set<Address> getOwners() {
return owners;
}
/**
* Adds {@code owner} as a node where this transaction information is maintained.
*/
public void addOwner(Address owner) {
owners.add(owner);
}
/**
* @return {@code True} if the transaction information is also present on this node.
*/
public boolean isLocal() {
return isLocal;
}
/**
* Sets {@code true} if this transaction information is stored locally.
*/
public void setLocal(boolean local) {
isLocal = local;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InDoubtTxInfo that = (InDoubtTxInfo) o;
return internalId == that.internalId &&
status == that.status &&
isLocal == that.isLocal &&
Objects.equals(xid, that.xid) &&
Objects.equals(owners, that.owners);
}
@Override
public int hashCode() {
return Objects.hash(xid, internalId, status, owners, isLocal);
}
@Override
public String toString() {
return getClass().getSimpleName() +
"{xid=" + xid +
", internalId=" + internalId +
", status=" + status +
", owners=" + owners +
", isLocal=" + isLocal +
'}';
}
private static class Externalizer extends AbstractExternalizer<InDoubtTxInfo> {
@Override
public void writeObject(ObjectOutput output, InDoubtTxInfo info) throws IOException {
XidImpl.writeTo(output, info.xid);
output.writeLong(info.internalId);
output.writeInt(info.status);
}
@Override
public InDoubtTxInfo readObject(ObjectInput input) throws IOException, ClassNotFoundException {
return new InDoubtTxInfo(XidImpl.readFrom(input), input.readLong(), input.readInt());
}
@Override
public Integer getId() {
return Ids.IN_DOUBT_TX_INFO;
}
@Override
public Set<Class<? extends InDoubtTxInfo>> getTypeClasses() {
return Collections.singleton(InDoubtTxInfo.class);
}
}
}
| 1,608 |
2,211 | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/application/browser/application_service.h"
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "xwalk/application/browser/application.h"
#include "xwalk/application/common/application_manifest_constants.h"
#include "xwalk/application/common/application_file_util.h"
#include "xwalk/application/common/id_util.h"
#include "xwalk/runtime/browser/runtime.h"
#include "xwalk/runtime/browser/xwalk_browser_context.h"
#include "xwalk/runtime/browser/xwalk_runner.h"
#include "xwalk/runtime/common/xwalk_paths.h"
#if defined(OS_WIN)
#include <shobjidl.h>
#endif
namespace xwalk {
namespace application {
ApplicationService::ApplicationService(XWalkBrowserContext* browser_context)
: browser_context_(browser_context) {
}
std::unique_ptr<ApplicationService> ApplicationService::Create(
XWalkBrowserContext* browser_context) {
return base::WrapUnique(new ApplicationService(browser_context));
}
ApplicationService::~ApplicationService() {
}
Application* ApplicationService::Launch(
scoped_refptr<ApplicationData> application_data) {
if (GetApplicationByID(application_data->ID()) != NULL) {
LOG(INFO) << "Application with id: " << application_data->ID()
<< " is already running.";
// FIXME: we need to notify application that it had been attempted
// to invoke and let the application to define the further behavior.
return NULL;
}
Application* application = Application::Create(application_data,
browser_context_).release();
ScopedVector<Application>::iterator app_iter =
applications_.insert(applications_.end(), application);
if (!application->Launch()) {
applications_.erase(app_iter);
return NULL;
}
application->set_observer(this);
#if defined (OS_WIN)
::SetCurrentProcessExplicitAppUserModelID(
base::ASCIIToUTF16(application->data()->Name()).c_str());
#endif
FOR_EACH_OBSERVER(Observer, observers_,
DidLaunchApplication(application));
return application;
}
Application* ApplicationService::LaunchFromManifestPath(
const base::FilePath& path, Manifest::Type manifest_type) {
std::string error;
std::unique_ptr<Manifest> manifest = LoadManifest(path, manifest_type, &error);
if (!manifest) {
LOG(ERROR) << "Failed to load manifest.";
return NULL;
}
base::FilePath app_path = path.DirName();
LOG(ERROR) << "Loading app from " << app_path.MaybeAsASCII();
std::string app_id = GenerateIdForPath(app_path);
#if defined (OS_WIN)
std::string update_id;
if (manifest->GetString(application_manifest_keys::kXWalkWindowsUpdateID,
&update_id)) {
app_id = GenerateId(update_id);
}
#endif
scoped_refptr<ApplicationData> application_data = ApplicationData::Create(
app_path, app_id, ApplicationData::LOCAL_DIRECTORY,
std::move(manifest), &error);
if (!application_data.get()) {
LOG(ERROR) << "Error occurred while trying to load application: "
<< error;
return NULL;
}
return Launch(application_data);
}
Application* ApplicationService::LaunchFromPackagePath(
const base::FilePath& path) {
std::unique_ptr<Package> package = Package::Create(path);
if (!package || !package->IsValid()) {
LOG(ERROR) << "Failed to obtain valid package from "
<< path.AsUTF8Unsafe();
return NULL;
}
base::FilePath tmp_dir, target_dir;
if (!GetTempDir(&tmp_dir)) {
LOG(ERROR) << "Failed to obtain system temp directory.";
return NULL;
}
#if defined (OS_WIN)
base::CreateTemporaryDirInDir(tmp_dir,
base::UTF8ToWide(package->name()), &target_dir);
#else
base::CreateTemporaryDirInDir(tmp_dir, package->name(), &target_dir);
#endif
if (!package->ExtractTo(target_dir)) {
LOG(ERROR) << "Failed to unpack to a temporary directory: "
<< target_dir.MaybeAsASCII();
return NULL;
}
std::string app_id;
if (package->manifest_type() == Manifest::TYPE_MANIFEST)
app_id = package->Id();
std::string error;
scoped_refptr<ApplicationData> application_data = LoadApplication(
target_dir, app_id, ApplicationData::TEMP_DIRECTORY,
package->manifest_type(), &error);
if (!application_data.get()) {
LOG(ERROR) << "Error occurred while trying to load application: "
<< error;
return NULL;
}
return Launch(application_data);
}
// Launch an application created from arbitrary url.
// FIXME: This application should have the same strict permissions
// as common browser apps.
Application* ApplicationService::LaunchHostedURL(const GURL& url) {
const std::string& url_spec = url.spec();
if (url_spec.empty()) {
LOG(ERROR) << "Failed to launch application from the URL: " << url;
return NULL;
}
const std::string& app_id = GenerateId(url_spec);
std::unique_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
// FIXME: define permissions!
settings->SetString(application_manifest_keys::kStartURLKey, url_spec);
// FIXME: Why use URL as name?
settings->SetString(application_manifest_keys::kNameKey, url_spec);
settings->SetString(application_manifest_keys::kXWalkVersionKey, "0");
std::unique_ptr<Manifest> manifest(
new Manifest(std::move(settings), Manifest::TYPE_MANIFEST));
std::string error;
scoped_refptr<ApplicationData> app_data =
ApplicationData::Create(base::FilePath(), app_id,
ApplicationData::EXTERNAL_URL, std::move(manifest), &error);
DCHECK(app_data.get());
return Launch(app_data);
}
namespace {
struct ApplicationRenderHostIDComparator {
explicit ApplicationRenderHostIDComparator(int id) : id(id) { }
bool operator() (Application* application) {
return id == application->GetRenderProcessHostID();
}
int id;
};
struct ApplicationIDComparator {
explicit ApplicationIDComparator(const std::string& app_id)
: app_id(app_id) { }
bool operator() (Application* application) {
return app_id == application->id();
}
std::string app_id;
};
} // namespace
Application* ApplicationService::GetApplicationByRenderHostID(int id) const {
ApplicationRenderHostIDComparator comparator(id);
ScopedVector<Application>::const_iterator found = std::find_if(
applications_.begin(), applications_.end(), comparator);
if (found != applications_.end())
return *found;
return NULL;
}
Application* ApplicationService::GetApplicationByID(
const std::string& app_id) const {
ApplicationIDComparator comparator(app_id);
ScopedVector<Application>::const_iterator found = std::find_if(
applications_.begin(), applications_.end(), comparator);
if (found != applications_.end())
return *found;
return NULL;
}
void ApplicationService::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}
void ApplicationService::RemoveObserver(Observer* observer) {
observers_.RemoveObserver(observer);
}
void ApplicationService::OnApplicationTerminated(
Application* application) {
ScopedVector<Application>::iterator found = std::find(
applications_.begin(), applications_.end(), application);
CHECK(found != applications_.end());
FOR_EACH_OBSERVER(Observer, observers_,
WillDestroyApplication(application));
scoped_refptr<ApplicationData> app_data = application->data();
applications_.erase(found);
if (app_data->source_type() == ApplicationData::TEMP_DIRECTORY) {
LOG(INFO) << "Deleting the app temporary directory "
<< app_data->path().AsUTF8Unsafe();
content::BrowserThread::PostTask(content::BrowserThread::FILE,
FROM_HERE, base::Bind(base::IgnoreResult(&base::DeleteFile),
app_data->path(), true /*recursive*/));
// FIXME: So far we simply clean up all the app persistent data,
// further we need to add an appropriate logic to handle it.
content::BrowserContext::GarbageCollectStoragePartitions(
browser_context_,
base::WrapUnique(new base::hash_set<base::FilePath>()), // NOLINT
base::Bind(&base::DoNothing));
}
if (applications_.empty()) {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
}
void ApplicationService::CheckAPIAccessControl(const std::string& app_id,
const std::string& extension_name,
const std::string& api_name, const PermissionCallback& callback) {
Application* app = GetApplicationByID(app_id);
if (!app) {
LOG(ERROR) << "No running application found with ID: "
<< app_id;
callback.Run(UNDEFINED_RUNTIME_PERM);
return;
}
if (!app->UseExtension(extension_name)) {
LOG(ERROR) << "Can not find extension: "
<< extension_name << " of Application with ID: "
<< app_id;
callback.Run(UNDEFINED_RUNTIME_PERM);
return;
}
// Permission name should have been registered at extension initialization.
std::string permission_name =
app->GetRegisteredPermissionName(extension_name, api_name);
if (permission_name.empty()) {
LOG(ERROR) << "API: " << api_name << " of extension: "
<< extension_name << " not registered!";
callback.Run(UNDEFINED_RUNTIME_PERM);
return;
}
// Okay, since we have the permission name, let's get down to the policies.
// First, find out whether the permission is stored for the current session.
StoredPermission perm = app->GetPermission(
SESSION_PERMISSION, permission_name);
if (perm != UNDEFINED_STORED_PERM) {
// "PROMPT" should not be in the session storage.
DCHECK(perm != PROMPT);
if (perm == ALLOW) {
callback.Run(ALLOW_SESSION);
return;
}
if (perm == DENY) {
callback.Run(DENY_SESSION);
return;
}
NOTREACHED();
}
// Then, query the persistent policy storage.
perm = app->GetPermission(PERSISTENT_PERMISSION, permission_name);
// Permission not found in persistent permission table, normally this should
// not happen because all the permission needed by the application should be
// contained in its manifest, so it also means that the application is asking
// for something wasn't allowed.
if (perm == UNDEFINED_STORED_PERM) {
callback.Run(UNDEFINED_RUNTIME_PERM);
return;
}
if (perm == PROMPT) {
// TODO(Bai): We needed to pop-up a dialog asking user to chose one from
// either allow/deny for session/one shot/forever. Then, we need to update
// the session and persistent policy accordingly.
callback.Run(UNDEFINED_RUNTIME_PERM);
return;
}
if (perm == ALLOW) {
callback.Run(ALLOW_ALWAYS);
return;
}
if (perm == DENY) {
callback.Run(DENY_ALWAYS);
return;
}
NOTREACHED();
}
bool ApplicationService::RegisterPermissions(const std::string& app_id,
const std::string& extension_name,
const std::string& perm_table) {
Application* app = GetApplicationByID(app_id);
if (!app) {
LOG(ERROR) << "No running application found with ID: " << app_id;
return false;
}
if (!app->UseExtension(extension_name)) {
LOG(ERROR) << "Can not find extension: "
<< extension_name << " of Application with ID: "
<< app_id;
return false;
}
return app->RegisterPermissions(extension_name, perm_table);
}
} // namespace application
} // namespace xwalk
| 4,068 |
1,604 | <reponame>slawekjaranowski/bc-java<gh_stars>1000+
package java.security.spec;
import java.math.BigInteger;
public class RSAPublicKeySpec extends Object implements KeySpec
{
private BigInteger modulus;
private BigInteger publicExponent;
public RSAPublicKeySpec(
BigInteger modulus,
BigInteger publicExponent)
{
this.modulus = modulus;
this.publicExponent = publicExponent;
}
public BigInteger getModulus()
{
return modulus;
}
public BigInteger getPublicExponent()
{
return publicExponent;
}
}
| 231 |
4,538 | /* File generated automatically by the QuickJS compiler. */
#include <inttypes.h>
const uint32_t jslib_tcp_size = 1792;
const uint8_t jslib_tcp[1792] = {
0x01, 0x28, 0x14, 0x73, 0x72, 0x63, 0x2f, 0x74,
0x63, 0x70, 0x2e, 0x6a, 0x73, 0x0c, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x06, 0x54, 0x43, 0x50,
0x18, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x43,
0x50, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x0a,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x45, 0x6d, 0x69, 0x74, 0x74,
0x65, 0x72, 0x10, 0x5f, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x08, 0x73, 0x65, 0x6e, 0x64,
0x18, 0x5f, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74,
0x65, 0x6e, 0x69, 0x6e, 0x67, 0x0a, 0x63, 0x6c,
0x6f, 0x73, 0x65, 0x12, 0x72, 0x65, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x0e, 0x6f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x08, 0x68, 0x6f,
0x73, 0x74, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x1c,
0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20,
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x0e, 0x73,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x08, 0x66,
0x61, 0x69, 0x6c, 0x04, 0x63, 0x62, 0x12, 0x63,
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64,
0x18, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
0x6f, 0x63, 0x6b, 0x65, 0x74, 0x08, 0x62, 0x69,
0x6e, 0x64, 0x08, 0x65, 0x6d, 0x69, 0x74, 0x0a,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x74, 0x63,
0x70, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x06,
0x72, 0x65, 0x74, 0x22, 0x74, 0x63, 0x70, 0x43,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x0e, 0x63, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x32, 0x74, 0x63,
0x70, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69,
0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x74, 0x63, 0x70, 0x20, 0x6e, 0x6f, 0x74, 0x20,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65,
0x64, 0x1c, 0x74, 0x63, 0x70, 0x20, 0x73, 0x65,
0x6e, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x20, 0x74, 0x63, 0x70, 0x20, 0x73, 0x65, 0x6e,
0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
0x73, 0x24, 0x74, 0x63, 0x70, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20,
0x69, 0x6e, 0x69, 0x74, 0x08, 0x72, 0x65, 0x63,
0x76, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x65,
0x6e, 0x08, 0x64, 0x61, 0x74, 0x61, 0x32, 0x74,
0x63, 0x70, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x14, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x2c, 0x74, 0x63, 0x70, 0x20,
0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x63,
0x6c, 0x6f, 0x73, 0x65, 0x20, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x30, 0x74, 0x63, 0x70, 0x20, 0x73,
0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x63, 0x6c,
0x6f, 0x73, 0x65, 0x20, 0x73, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x0f, 0x9c, 0x03, 0x02, 0x9e,
0x03, 0xa0, 0x03, 0x01, 0x00, 0x03, 0xa2, 0x03,
0x00, 0x02, 0x00, 0xf8, 0x01, 0x00, 0x01, 0xf8,
0x01, 0x01, 0x0e, 0x00, 0x06, 0x01, 0xa0, 0x01,
0x00, 0x02, 0x00, 0x03, 0x04, 0x07, 0x4a, 0x02,
0xa4, 0x03, 0x02, 0x00, 0x60, 0xea, 0x01, 0x03,
0x01, 0xe0, 0xa6, 0x03, 0x00, 0x0d, 0xa0, 0x03,
0x01, 0x0d, 0xa4, 0x03, 0x00, 0x09, 0xa2, 0x03,
0x01, 0x01, 0xbf, 0x06, 0xe3, 0x61, 0x00, 0x00,
0x65, 0x00, 0x00, 0x41, 0xd4, 0x00, 0x00, 0x00,
0x61, 0x01, 0x00, 0xbe, 0x00, 0x56, 0xd2, 0x00,
0x00, 0x00, 0x01, 0xbf, 0x01, 0x54, 0xd5, 0x00,
0x00, 0x00, 0x00, 0xbf, 0x02, 0x54, 0xd6, 0x00,
0x00, 0x00, 0x00, 0xbf, 0x03, 0x54, 0xd7, 0x00,
0x00, 0x00, 0x00, 0xbf, 0x04, 0x54, 0xd8, 0x00,
0x00, 0x00, 0x00, 0xbf, 0x05, 0x54, 0xd9, 0x00,
0x00, 0x00, 0x00, 0x06, 0xc9, 0x0e, 0xcc, 0x68,
0x01, 0x00, 0xe2, 0x29, 0x9c, 0x03, 0x01, 0x17,
0x01, 0x00, 0x03, 0x0a, 0x00, 0x16, 0x48, 0x00,
0x08, 0x26, 0x00, 0x08, 0x2a, 0x00, 0x08, 0x18,
0x00, 0x08, 0x0e, 0x2b, 0x00, 0x08, 0x08, 0x0e,
0xc6, 0x07, 0x01, 0x00, 0x01, 0x03, 0x01, 0x03,
0x01, 0x02, 0xa3, 0x01, 0x04, 0xb4, 0x03, 0x00,
0x01, 0x00, 0xe2, 0x01, 0x00, 0x01, 0x00, 0xe0,
0x01, 0x00, 0x01, 0x00, 0x10, 0x00, 0x01, 0x40,
0xea, 0x01, 0x01, 0x0d, 0x0c, 0x02, 0xc8, 0x0c,
0x03, 0xc9, 0x61, 0x02, 0x00, 0x2b, 0xc4, 0x34,
0xc5, 0x21, 0x00, 0x00, 0x11, 0x64, 0x02, 0x00,
0x65, 0x00, 0x00, 0x11, 0xe9, 0x08, 0x62, 0x02,
0x00, 0x1b, 0x24, 0x00, 0x00, 0x0e, 0x0e, 0xd0,
0x97, 0x11, 0xea, 0x14, 0x0e, 0xd0, 0x41, 0xdb,
0x00, 0x00, 0x00, 0x97, 0x11, 0xea, 0x09, 0x0e,
0xd0, 0x41, 0xdc, 0x00, 0x00, 0x00, 0x97, 0xe9,
0x10, 0x38, 0x8d, 0x00, 0x00, 0x00, 0x11, 0x04,
0xdd, 0x00, 0x00, 0x00, 0x21, 0x01, 0x00, 0x2f,
0x62, 0x02, 0x00, 0x0b, 0xd0, 0x41, 0xdb, 0x00,
0x00, 0x00, 0x4c, 0xdb, 0x00, 0x00, 0x00, 0xd0,
0x41, 0xdc, 0x00, 0x00, 0x00, 0x4c, 0xdc, 0x00,
0x00, 0x00, 0x43, 0xda, 0x00, 0x00, 0x00, 0x62,
0x02, 0x00, 0xd0, 0x41, 0xde, 0x00, 0x00, 0x00,
0x11, 0xea, 0x04, 0x0e, 0xbf, 0x00, 0x43, 0xde,
0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0xd0, 0x41,
0xdf, 0x00, 0x00, 0x00, 0x11, 0xea, 0x04, 0x0e,
0xbf, 0x01, 0x43, 0xdf, 0x00, 0x00, 0x00, 0x62,
0x02, 0x00, 0x42, 0xd5, 0x00, 0x00, 0x00, 0x24,
0x00, 0x00, 0x0e, 0x62, 0x02, 0x00, 0x28, 0x9c,
0x03, 0x06, 0x0c, 0x35, 0x80, 0x85, 0x49, 0x09,
0x17, 0x3a, 0x3a, 0x1d, 0x67, 0x67, 0x3f, 0x0e,
0x43, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x29, 0x9c, 0x03, 0x11,
0x00, 0x0e, 0x43, 0x06, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x29, 0x9c,
0x03, 0x12, 0x00, 0x0e, 0x42, 0x07, 0x01, 0x00,
0x00, 0x02, 0x00, 0x06, 0x01, 0x01, 0x4f, 0x02,
0xc0, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01,
0x00, 0xa0, 0x03, 0x01, 0x0c, 0x08, 0xc9, 0xc5,
0x09, 0x43, 0xe1, 0x00, 0x00, 0x00, 0xbf, 0x00,
0x4d, 0xe0, 0x00, 0x00, 0x00, 0xc8, 0x65, 0x00,
0x00, 0x42, 0xe2, 0x00, 0x00, 0x00, 0xc5, 0x41,
0xda, 0x00, 0x00, 0x00, 0xc4, 0x42, 0xe3, 0x00,
0x00, 0x00, 0xc5, 0x24, 0x01, 0x00, 0x24, 0x02,
0x00, 0xb4, 0xa4, 0xe9, 0x1f, 0xc5, 0x42, 0xdf,
0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x0e, 0xc5,
0x42, 0xe4, 0x00, 0x00, 0x00, 0x04, 0xe5, 0x00,
0x00, 0x00, 0x04, 0xe6, 0x00, 0x00, 0x00, 0x24,
0x02, 0x00, 0x0e, 0x29, 0x9c, 0x03, 0x16, 0x08,
0x0d, 0x00, 0x07, 0x18, 0x2c, 0x9e, 0x35, 0x68,
0x0e, 0x43, 0x06, 0x01, 0x00, 0x01, 0x01, 0x01,
0x04, 0x00, 0x00, 0x56, 0x02, 0xce, 0x03, 0x00,
0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0xc8,
0xd0, 0xb4, 0xa4, 0xe9, 0x1f, 0xc4, 0x42, 0xdf,
0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x0e, 0xc4,
0x42, 0xe4, 0x00, 0x00, 0x00, 0x04, 0xe5, 0x00,
0x00, 0x00, 0x04, 0xe6, 0x00, 0x00, 0x00, 0x24,
0x02, 0x00, 0x29, 0xc4, 0xd0, 0x43, 0xe8, 0x00,
0x00, 0x00, 0xc4, 0x0a, 0x43, 0xe1, 0x00, 0x00,
0x00, 0xc4, 0x42, 0xde, 0x00, 0x00, 0x00, 0x24,
0x00, 0x00, 0x0e, 0xc4, 0x42, 0xe4, 0x00, 0x00,
0x00, 0x04, 0xe9, 0x00, 0x00, 0x00, 0x24, 0x01,
0x00, 0x0e, 0xc4, 0x42, 0xd7, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0x29, 0x9c, 0x03, 0x18, 0x0a,
0x0d, 0x1c, 0x35, 0x63, 0x08, 0x26, 0x26, 0x35,
0x4e, 0x30, 0x0e, 0x42, 0x07, 0x01, 0x00, 0x01,
0x01, 0x01, 0x07, 0x01, 0x01, 0x56, 0x02, 0xb4,
0x03, 0x00, 0x01, 0x80, 0x10, 0x00, 0x01, 0x00,
0xa0, 0x03, 0x01, 0x0c, 0x08, 0xc8, 0xd0, 0x41,
0x33, 0x00, 0x00, 0x00, 0x97, 0xe9, 0x10, 0x38,
0x8d, 0x00, 0x00, 0x00, 0x11, 0x04, 0xea, 0x00,
0x00, 0x00, 0x21, 0x01, 0x00, 0x2f, 0xc4, 0x41,
0xe1, 0x00, 0x00, 0x00, 0x09, 0xac, 0xe9, 0x10,
0x38, 0x8d, 0x00, 0x00, 0x00, 0x11, 0x04, 0xeb,
0x00, 0x00, 0x00, 0x21, 0x01, 0x00, 0x2f, 0x65,
0x00, 0x00, 0x42, 0xd6, 0x00, 0x00, 0x00, 0xc4,
0x41, 0xe8, 0x00, 0x00, 0x00, 0xd0, 0x41, 0x33,
0x00, 0x00, 0x00, 0xbf, 0x00, 0x42, 0xe3, 0x00,
0x00, 0x00, 0xc4, 0x24, 0x01, 0x00, 0x24, 0x03,
0x00, 0x29, 0x9c, 0x03, 0x2b, 0x0b, 0x0d, 0x30,
0x49, 0x09, 0x35, 0x49, 0x08, 0x00, 0x14, 0x10,
0x49, 0x0e, 0x43, 0x06, 0x01, 0x00, 0x01, 0x01,
0x01, 0x04, 0x01, 0x00, 0x55, 0x02, 0xce, 0x03,
0x00, 0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0xb4,
0x03, 0x00, 0x03, 0x08, 0xc8, 0xd0, 0xb4, 0xa4,
0xe9, 0x28, 0xc4, 0x42, 0xe4, 0x00, 0x00, 0x00,
0x04, 0xe5, 0x00, 0x00, 0x00, 0x04, 0xec, 0x00,
0x00, 0x00, 0x24, 0x02, 0x00, 0x0e, 0xdc, 0x41,
0xdf, 0x00, 0x00, 0x00, 0xe9, 0x0b, 0xdc, 0x42,
0xdf, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x0e,
0x29, 0xc4, 0x42, 0xe4, 0x00, 0x00, 0x00, 0x04,
0xd6, 0x00, 0x00, 0x00, 0x04, 0xed, 0x00, 0x00,
0x00, 0x24, 0x02, 0x00, 0x0e, 0xdc, 0x41, 0xde,
0x00, 0x00, 0x00, 0xe9, 0x0b, 0xdc, 0x42, 0xde,
0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x0e, 0x29,
0x9c, 0x03, 0x33, 0x07, 0x0d, 0x1c, 0x67, 0x5e,
0x08, 0x67, 0x5d, 0x0e, 0x42, 0x07, 0x01, 0x00,
0x00, 0x01, 0x00, 0x06, 0x01, 0x01, 0x37, 0x01,
0x10, 0x00, 0x01, 0x00, 0xa0, 0x03, 0x01, 0x0c,
0x08, 0xc8, 0xc4, 0x41, 0xe8, 0x00, 0x00, 0x00,
0x97, 0xe9, 0x10, 0x38, 0x8d, 0x00, 0x00, 0x00,
0x11, 0x04, 0xee, 0x00, 0x00, 0x00, 0x21, 0x01,
0x00, 0x2f, 0x65, 0x00, 0x00, 0x42, 0xef, 0x00,
0x00, 0x00, 0xc4, 0x41, 0xe8, 0x00, 0x00, 0x00,
0xbf, 0x00, 0x42, 0xe3, 0x00, 0x00, 0x00, 0xc4,
0x24, 0x01, 0x00, 0x24, 0x02, 0x00, 0x29, 0x9c,
0x03, 0x3e, 0x08, 0x0d, 0x30, 0x49, 0x08, 0x00,
0x0e, 0x1c, 0x49, 0x0e, 0x43, 0x06, 0x01, 0x00,
0x02, 0x01, 0x02, 0x04, 0x00, 0x00, 0x54, 0x03,
0xe0, 0x03, 0x00, 0x01, 0x00, 0xe2, 0x03, 0x00,
0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0xc8,
0xd0, 0xbc, 0xfe, 0xac, 0xe9, 0x1c, 0xc4, 0x09,
0x43, 0xe1, 0x00, 0x00, 0x00, 0xc4, 0x42, 0xe4,
0x00, 0x00, 0x00, 0x04, 0xe5, 0x00, 0x00, 0x00,
0x04, 0xf2, 0x00, 0x00, 0x00, 0x24, 0x02, 0x00,
0x29, 0xd0, 0xb3, 0xac, 0xe9, 0x17, 0xc4, 0x09,
0x43, 0xe1, 0x00, 0x00, 0x00, 0xc4, 0x42, 0xe4,
0x00, 0x00, 0x00, 0x04, 0xf3, 0x00, 0x00, 0x00,
0x24, 0x01, 0x00, 0x29, 0xd0, 0xb4, 0xa6, 0xe9,
0x11, 0xc4, 0x42, 0xe4, 0x00, 0x00, 0x00, 0x04,
0x33, 0x00, 0x00, 0x00, 0xd1, 0x24, 0x02, 0x00,
0x0e, 0x29, 0x9c, 0x03, 0x42, 0x0b, 0x0d, 0x21,
0x26, 0x63, 0x08, 0x1c, 0x26, 0x4a, 0x08, 0x1c,
0x54, 0x0e, 0x42, 0x07, 0x01, 0x00, 0x00, 0x02,
0x00, 0x04, 0x01, 0x00, 0x58, 0x02, 0xce, 0x03,
0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0xa0,
0x03, 0x01, 0x0c, 0x08, 0xc9, 0xc5, 0x41, 0xe8,
0x00, 0x00, 0x00, 0x97, 0xe9, 0x10, 0x38, 0x8d,
0x00, 0x00, 0x00, 0x11, 0x04, 0xee, 0x00, 0x00,
0x00, 0x21, 0x01, 0x00, 0x2f, 0x65, 0x00, 0x00,
0x42, 0xd8, 0x00, 0x00, 0x00, 0xc5, 0x41, 0xe8,
0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0xcc, 0xb4,
0xab, 0xe9, 0x15, 0xc5, 0x42, 0xe4, 0x00, 0x00,
0x00, 0x04, 0xe5, 0x00, 0x00, 0x00, 0x04, 0xf4,
0x00, 0x00, 0x00, 0x24, 0x02, 0x00, 0x29, 0xc5,
0x42, 0xe4, 0x00, 0x00, 0x00, 0x04, 0xd8, 0x00,
0x00, 0x00, 0x04, 0xf5, 0x00, 0x00, 0x00, 0x24,
0x02, 0x00, 0x29, 0x9c, 0x03, 0x53, 0x09, 0x0d,
0x30, 0x49, 0x08, 0x5d, 0x17, 0x63, 0x08, 0x62,
0x0e, 0x42, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00,
0x03, 0x01, 0x00, 0x26, 0x01, 0x10, 0x00, 0x01,
0x00, 0xa0, 0x03, 0x01, 0x0c, 0x08, 0xc8, 0xc4,
0x41, 0xe8, 0x00, 0x00, 0x00, 0xe9, 0x13, 0x65,
0x00, 0x00, 0x42, 0xd8, 0x00, 0x00, 0x00, 0xc4,
0x41, 0xe8, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00,
0x0e, 0xc4, 0x42, 0xd5, 0x00, 0x00, 0x00, 0x24,
0x00, 0x00, 0x29, 0x9c, 0x03, 0x5f, 0x04, 0x0d,
0x2b, 0x5e, 0x30, 0x0e, 0x43, 0x06, 0x01, 0xa2,
0x03, 0x01, 0x00, 0x01, 0x03, 0x01, 0x00, 0x09,
0x01, 0xb4, 0x03, 0x00, 0x01, 0x00, 0xa4, 0x03,
0x02, 0x08, 0x65, 0x00, 0x00, 0x11, 0xd0, 0x21,
0x01, 0x00, 0x28, 0x9c, 0x03, 0x67, 0x01, 0x03,
};
| 7,670 |
831 | <reponame>phpc0de/idea-android<gh_stars>100-1000
/*
* Copyright (C) 2017 The Android Open Source Project
*
* 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.android.tools.adtui.model.updater;
public interface Updatable {
/**
* Used for resetting any cached states from previous frames that an {@link Updatable}
* depends on.
*/
default void reset() {
}
/**
* Triggered by the {@link Choreographer} to give an {@link Updatable} a chance to
* update/interpolate any components or data based on the current frame rate.
* @param elapsedNs the time elapsed since the last update in nanoseconds.
*/
void update(long elapsedNs);
/**
* Triggered by the {@link Choreographer} after all components have finished animating.
* This allows an {@link Updatable} to read any data modified by other components
* during {@link #update(float)}.
*/
default void postUpdate() {
}
/**
* An auxiliary function to allow an {@link Updatable} to configure its interpolation speed when calling the
* {@link Choreographer#lerp(float, float, float, float, float)} method.
*/
default void setLerpFraction(float fraction) {
}
/**
* An auxiliary function to allow an {@link Updatable} to configure its lerp snapping threshold when calling the
* {@link Choreographer#lerp(float, float, float, float, float)} method.
*/
default void setLerpThreshold(float threshold) {
}
}
| 578 |
319 | /*
Based on code from notnullnotvoid's comment on:
https://seabird.handmade.network/blogs/p/2460-be_aware_of_high_dpi
Author's page: https://handmade.network/m/notnullnotvoid
*/
#if !defined(_WIN32)
void initDpiAwareness() {
}
#else
#include "windows.h"
#include "sdl.h"
typedef enum PROCESS_DPI_AWARENESS {
PROCESS_DPI_UNAWARE = 0,
PROCESS_SYSTEM_DPI_AWARE = 1,
PROCESS_PER_MONITOR_DPI_AWARE = 2
} PROCESS_DPI_AWARENESS;
BOOL(WINAPI *SetProcessDPIAwareFn)(void); // Vista and later
HRESULT(WINAPI *SetProcessDpiAwarenessFn)(PROCESS_DPI_AWARENESS dpiAwareness); // Windows 8.1 and later
void initDpiAwareness() {
void* userDLL = SDL_LoadObject("USER32.DLL");
void* shcoreDLL = SDL_LoadObject("SHCORE.DLL");
if (userDLL) {
SetProcessDPIAwareFn = (BOOL(WINAPI *)(void)) SDL_LoadFunction(userDLL, "SetProcessDPIAware");
}
if (shcoreDLL) {
SetProcessDpiAwarenessFn = (HRESULT(WINAPI *)(PROCESS_DPI_AWARENESS)) SDL_LoadFunction(shcoreDLL, "SetProcessDpiAwareness");
}
if (SetProcessDpiAwarenessFn) {
// Try Windows 8.1+ version
//HRESULT result = SetProcessDpiAwarenessFn(PROCESS_PER_MONITOR_DPI_AWARE);
HRESULT result = SetProcessDpiAwarenessFn(PROCESS_SYSTEM_DPI_AWARE);
SDL_Log("called SetProcessDpiAwareness: %d", (result == S_OK) ? 1 : 0);
}
else if (SetProcessDPIAwareFn) {
// Try Vista - Windows 8 version.
// This has a constant scale factor for all monitors.
BOOL success = SetProcessDPIAwareFn();
SDL_Log("Called SetProcessDPIAware: %d", (int) success);
}
}
#endif
| 706 |
2,230 | <filename>df_console.py
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
# Console for DarkForest
import sys
import os
from collections import Counter
from rlpytorch import load_env, Evaluator, ModelInterface, ArgsProvider, EvalIters
def move2xy(v):
x = ord(v[0].lower()) - ord('a')
# Skip 'i'
if x >= 9: x -= 1
y = int(v[1:]) - 1
return x, y
def move2action(v):
x, y = move2xy(v)
return x * 19 + y
def xy2move(x, y):
if x >= 8: x += 1
return chr(x + 65) + str(y + 1)
def action2move(a):
x = a // 19
y = a % 19
return xy2move(x, y)
def plot_plane(v):
s = ""
for j in range(v.size(1)):
for i in range(v.size(0)):
if v[i, v.size(1) - 1 - j] != 0:
s += "o "
else:
s += ". "
s += "\n"
print(s)
def topk_accuracy2(batch, state_curr, topk=(1,)):
pi = state_curr["pi"]
import torch
if isinstance(pi, torch.autograd.Variable):
pi = pi.data
score, indices = pi.sort(dim=1, descending=True)
maxk = max(topk)
topn_count = [0] * maxk
for ind, gt in zip(indices, batch["offline_a"][0]):
for i in range(maxk):
if ind[i] == gt[0]:
topn_count[i] += 1
for i in range(maxk):
topn_count[i] /= indices.size(0)
return [ topn_count[i - 1] for i in topk ]
class DFConsole:
def __init__(self):
self.exit = False
def check(self, batch):
reply = self.evaluator.actor(batch)
topk = topk_accuracy2(batch, reply, topk=(1,2,3,4,5))
for i, v in enumerate(topk):
self.check_stats[i] += v
if sum(topk) == 0: self.check_stats[-1] += 1
def actor(self, batch):
reply = self.evaluator.actor(batch)
return reply
def prompt(self, prompt_str, batch):
if self.last_move_idx is not None:
curr_move_idx = batch["move_idx"][0][0]
if curr_move_idx - self.last_move_idx == 1:
self.check(batch)
self.last_move_idx = curr_move_idx
return
else:
n = sum(self.check_stats.values())
print("#Move: " + str(n))
accu = 0
for i in range(5):
accu += self.check_stats[i]
print("Top %d: %.3f" % (i, accu / n))
self.last_move_idx = None
print(batch.GC.ShowBoard(0))
# Ask user to choose
while True:
if getattr(self, "repeat", 0) > 0:
self.repeat -= 1
cmd = self.repeat_cmd
else:
cmd = input(prompt_str)
items = cmd.split()
if len(items) < 1:
print("Invalid input")
reply = dict(pi=None, a=None)
try:
if items[0] == 'p':
reply["a"] = move2action(items[1])
return reply
elif items[0] == 'c':
return self.evaluator.actor(batch)
elif items[0] == "s":
channel_id = int(items[1])
plot_plane(batch["s"][0][0][channel_id])
elif items[0] == "u":
batch.GC.UndoMove(0)
print(batch.GC.ShowBoard(0))
elif items[0] == "h":
handicap = int(items[1])
batch.GC.ApplyHandicap(0, handicap)
print(batch.GC.ShowBoard(0))
elif items[0] == "a":
reply = self.evaluator.actor(batch)
if "pi" in reply:
score, indices = reply["pi"].squeeze().sort(dim=0, descending=True)
first_n = int(items[1])
for i in range(first_n):
print("%s: %.3f" % (action2move(indices[i]), score[i]))
else:
print("No key \"pi\"")
elif items[0] == "check":
print("Top %d" % self.check(batch))
elif items[0] == 'check2end':
self.check_stats = Counter()
self.check(batch)
self.last_move_idx = batch["move_idx"][0][0]
if len(items) == 2:
self.repeat = int(items[1])
self.repeat_cmd = "check2end_cont"
return
elif items[0] == "check2end_cont":
if not hasattr(self, "check_stats"):
self.check_stats = Counter()
self.check(batch)
self.last_move_idx = batch["move_idx"][0][0]
return
elif items[0] == "aug":
print(batch["aug_code"][0][0])
elif items[0] == "show":
print(batch.GC.ShowBoard(0))
elif items[0] == "dbg":
import pdb
pdb.set_trace()
elif items[0] == 'offline_a':
if "offline_a" in batch:
for i, offline_a in enumerate(batch["offline_a"][0][0]):
print("[%d]: %s" % (i, action2move(offline_a)))
else:
print("No offline_a available!")
elif items[0] == "exit":
self.exit = True
return reply
else:
print("Invalid input: " + cmd + ". Please try again")
except Exception as e:
print("Something wrong! " + str(e))
def main_loop(self):
evaluator = Evaluator(stats=False)
# Set game to online model.
env, args = load_env(os.environ, evaluator=evaluator, overrides=dict(num_games=1, batchsize=1, num_games_per_thread=1, greedy=True, T=1, additional_labels="aug_code,move_idx"))
GC = env["game"].initialize()
model = env["model_loaders"][0].load_model(GC.params)
mi = ModelInterface()
mi.add_model("model", model)
mi.add_model("actor", model, copy=True, cuda=args.gpu is not None, gpu_id=args.gpu)
mi["model"].eval()
mi["actor"].eval()
self.evaluator = evaluator
self.last_move_idx = None
def human_actor(batch):
print("In human_actor")
return self.prompt("DF> ", batch)
def actor(batch):
return self.actor(batch)
def train(batch):
self.prompt("DF Train> ", batch)
evaluator.setup(sampler=env["sampler"], mi=mi)
GC.reg_callback_if_exists("actor", actor)
GC.reg_callback_if_exists("human_actor", human_actor)
GC.reg_callback_if_exists("train", train)
GC.Start()
evaluator.episode_start(0)
while True:
GC.Run()
if self.exit: break
GC.Stop()
if __name__ == '__main__':
console = DFConsole()
console.main_loop()
| 4,005 |
458 | <filename>manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/builder/NginxMetaDataBuilder.java
/**
* Copyright 2019 <NAME>, 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.hyscale.generator.services.builder;
import io.hyscale.commons.constants.ToolConstants;
import io.hyscale.commons.exception.HyscaleException;
import io.hyscale.commons.models.ConfigTemplate;
import io.hyscale.commons.models.LoadBalancer;
import io.hyscale.commons.models.ServiceMetadata;
import io.hyscale.commons.utils.MustacheTemplateResolver;
import io.hyscale.generator.services.model.ManifestResource;
import io.hyscale.generator.services.provider.PluginTemplateProvider;
import io.hyscale.plugin.framework.models.ManifestSnippet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
/**
* Builds Metadata for Nginx Ingress resource yaml
*/
@Component
public class NginxMetaDataBuilder implements IngressMetaDataBuilder {
private static final String INGRESS_CLASS = "INGRESS_CLASS";
private static final String STICKY = "STICKY";
private static final String INGRESS_NAME = "INGRESS_NAME";
private static final String APP_NAME = "APP_NAME";
private static final String ENV_NAME = "ENV_NAME";
private static final String SERVICE_NAME = "SERVICE_NAME";
private static final String SSL_REDIRECT = "SSL_REDIRECT";
private static final String CONFIGURATION_SNIPPET = "CONFIGURATION_SNIPPET";
@Autowired
private PluginTemplateProvider templateProvider;
@Autowired
private MustacheTemplateResolver templateResolver;
@Override
public ManifestSnippet build(ServiceMetadata serviceMetadata, LoadBalancer loadBalancer) throws HyscaleException {
ManifestSnippet manifestSnippet = new ManifestSnippet();
manifestSnippet.setKind(ManifestResource.INGRESS.getKind());
manifestSnippet.setPath("metadata");
ConfigTemplate nginxIngressTemplate = templateProvider.get(PluginTemplateProvider.PluginTemplateType.NGINX);
String yamlString = templateResolver.resolveTemplate(nginxIngressTemplate.getTemplatePath(), getContext(serviceMetadata,loadBalancer));
manifestSnippet.setSnippet(yamlString);
return manifestSnippet;
}
private Map<String,Object> getContext(ServiceMetadata serviceMetadata, LoadBalancer loadBalancer){
Map<String, Object> context = new HashMap<>();
context.put(INGRESS_NAME,ManifestResource.INGRESS.getName(serviceMetadata));
context.put(APP_NAME,serviceMetadata.getAppName());
context.put(ENV_NAME,serviceMetadata.getEnvName());
context.put(SERVICE_NAME,serviceMetadata.getServiceName());
if(loadBalancer.getClassName()!= null && !loadBalancer.getClassName().isBlank()){
context.put(INGRESS_CLASS,loadBalancer.getClassName());
}
if(loadBalancer.isSticky()){
context.put(STICKY,"cookie");
}
if(loadBalancer.getTlsSecret()!= null && !loadBalancer.getTlsSecret().isBlank()){
context.put(SSL_REDIRECT,"true");
}
if(loadBalancer.getHeaders()!= null && !loadBalancer.getHeaders().isEmpty()){
context.put(CONFIGURATION_SNIPPET, getConfigurationSnippetAkaHeaders(loadBalancer.getHeaders()));
}
return context;
}
private String getConfigurationSnippetAkaHeaders(Map<String,String> headers){
StringBuilder configurationSnippet = new StringBuilder();
headers.forEach((key, value) -> configurationSnippet.append("proxy_set_header").append(ToolConstants.SPACE).
append(key).append(ToolConstants.SPACE).append(value).append(ToolConstants.SEMI_COLON));
return configurationSnippet.toString();
}
}
| 1,498 |
315 | package com.frogermcs.gactions.api.request;
import java.util.List;
import lombok.*;
/**
* https://developers.google.com/actions/reference/rest/Shared.Types/PostalAddress
*/
@Builder
@EqualsAndHashCode
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class PostalAddress {
public int revision;
public String regionCode;
public String languageCode;
public String postalCode;
public String sortingCode;
public String administrativeArea;
public String locality;
public String sublocality;
public List<String> addressLines;
public List<String> recipients;
public String organization;
} | 199 |
1,152 | <reponame>krishnads/StickyCollectionView
//
// SCPrimerCollectionViewCell.h
// StickyCollectionView
//
// Created by <NAME> on 13/01/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SCPrimerCollectionViewCell : UICollectionViewCell
@property (strong, nonatomic) NSString *lesson;
@end
| 115 |
1,299 | /*
* Copyright 2015 Netflix, 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.reactivex.netty.protocol.http.sse;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.handler.codec.http.DefaultHttpContent;
import io.netty.handler.codec.http.HttpContent;
import java.nio.charset.Charset;
import static org.junit.Assert.*;
public final class SseTestUtil {
private SseTestUtil() {
}
public static ServerSentEvent newServerSentEvent(String eventType, String eventId, String data) {
ByteBuf eventTypeBuffer = null != eventType
? Unpooled.buffer().writeBytes(eventType.getBytes(Charset.forName("UTF-8")))
: null;
ByteBuf eventIdBuffer = null != eventId
? Unpooled.buffer().writeBytes(eventId.getBytes(Charset.forName("UTF-8")))
: null;
ByteBuf dataBuffer = Unpooled.buffer().writeBytes(data.getBytes(Charset.forName("UTF-8")));
return ServerSentEvent.withEventIdAndType(eventIdBuffer, eventTypeBuffer, dataBuffer);
}
public static String newSseProtocolString(String eventType, String eventId, String... dataElements) {
StringBuilder eventStream = new StringBuilder();
if (null != eventType) {
eventStream.append("event: ").append(eventType).append('\n');
}
if (null != eventId) {
eventStream.append("id: ").append(eventId).append('\n');
}
for (String aData : dataElements) {
eventStream.append("data: ").append(aData).append('\n');
}
return eventStream.toString();
}
public static void assertContentEquals(String message, ByteBuf expected, ByteBuf actual) {
assertEquals(message,
null == expected ? null : expected.toString(Charset.defaultCharset()),
null == actual ? null : actual.toString(Charset.defaultCharset()));
}
public static HttpContent toHttpContent(String event) {
ByteBuf in = Unpooled.buffer(1024);
in.writeBytes(event.getBytes(Charset.defaultCharset()));
return new DefaultHttpContent(in);
}
}
| 1,082 |
309 | #include <vtkSmartPointer.h>
#include <vtkPointData.h>
#include <vtkSphereSource.h>
#include <vtkPolyDataConnectivityFilter.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkCamera.h>
#include <vtkProperty.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkLookupTable.h>
#include <vtkNamedColors.h>
#include <vtkBYUReader.h>
#include <vtkOBJReader.h>
#include <vtkPLYReader.h>
#include <vtkPolyDataReader.h>
#include <vtkSTLReader.h>
#include <vtkXMLPolyDataReader.h>
#include <vtksys/SystemTools.hxx>
#include <random>
namespace
{
vtkSmartPointer<vtkPolyData> ReadPolyData(const char *fileName);
void RandomColors(vtkSmartPointer<vtkLookupTable> &lut, int numberOfColors);
}
int main(int argc, char*argv[])
{
vtkSmartPointer<vtkPolyData> polyData =
ReadPolyData(argc > 1 ? argv[1] : "");
auto colors =
vtkSmartPointer<vtkNamedColors>::New();
auto connectivityFilter =
vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
connectivityFilter->SetInputData(polyData);
connectivityFilter->SetExtractionModeToAllRegions();
connectivityFilter->ColorRegionsOn();
connectivityFilter->Update();
// Visualize
auto numberOfRegions = connectivityFilter->GetNumberOfExtractedRegions();
auto lut =
vtkSmartPointer<vtkLookupTable>::New();
lut->SetNumberOfTableValues(std::max(numberOfRegions, 10));
lut->Build();
RandomColors(lut, numberOfRegions);
auto mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(connectivityFilter->GetOutputPort());
mapper->SetScalarRange(connectivityFilter->GetOutput()->GetPointData()->GetArray("RegionId")->GetRange());
mapper->SetLookupTable(lut);
mapper->Update();
auto actor =
vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
auto renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->UseHiddenLineRemovalOn();
renderer->AddActor(actor);
renderer->SetBackground(colors->GetColor3d("Silver").GetData());
// Create a useful view
renderer->ResetCamera();
renderer->GetActiveCamera()->Azimuth(30);
renderer->GetActiveCamera()->Elevation(30);
renderer->GetActiveCamera()->Dolly(1.2);
renderer->ResetCameraClippingRange();
auto renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
renderWindow->SetSize(640, 480);
auto style =
vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();
auto interactor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
interactor->SetInteractorStyle(style);
interactor->SetRenderWindow(renderWindow);
renderWindow->Render();
interactor->Initialize();
interactor->Start();
return EXIT_SUCCESS;
}
namespace
{
vtkSmartPointer<vtkPolyData> ReadPolyData(const char *fileName)
{
vtkSmartPointer<vtkPolyData> polyData;
std::string extension = vtksys::SystemTools::GetFilenameLastExtension(std::string(fileName));
if (extension == ".ply")
{
auto reader =
vtkSmartPointer<vtkPLYReader>::New();
reader->SetFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".vtp")
{
auto reader =
vtkSmartPointer<vtkXMLPolyDataReader>::New();
reader->SetFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".obj")
{
auto reader =
vtkSmartPointer<vtkOBJReader>::New();
reader->SetFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".stl")
{
auto reader =
vtkSmartPointer<vtkSTLReader>::New();
reader->SetFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".vtk")
{
auto reader =
vtkSmartPointer<vtkPolyDataReader>::New();
reader->SetFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else if (extension == ".g")
{
auto reader =
vtkSmartPointer<vtkBYUReader>::New();
reader->SetGeometryFileName (fileName);
reader->Update();
polyData = reader->GetOutput();
}
else
{
auto source =
vtkSmartPointer<vtkSphereSource>::New();
source->Update();
polyData = source->GetOutput();
}
return polyData;
}
void RandomColors(vtkSmartPointer<vtkLookupTable> &lut, int numberOfColors)
{
// Fill in a few known colors, the rest will be generated if needed
auto colors =
vtkSmartPointer<vtkNamedColors>::New();
lut->SetTableValue(0, colors->GetColor4d("Gold").GetData());
lut->SetTableValue(1, colors->GetColor4d("Banana").GetData());
lut->SetTableValue(2, colors->GetColor4d("Tomato").GetData());
lut->SetTableValue(3, colors->GetColor4d("Wheat").GetData());
lut->SetTableValue(4, colors->GetColor4d("Lavender").GetData());
lut->SetTableValue(5, colors->GetColor4d("Flesh").GetData());
lut->SetTableValue(6, colors->GetColor4d("Raspberry").GetData());
lut->SetTableValue(7, colors->GetColor4d("Salmon").GetData());
lut->SetTableValue(8, colors->GetColor4d("Mint").GetData());
lut->SetTableValue(9, colors->GetColor4d("Peacock").GetData());
// If the number of color is larger than the number of specified colors,
// generate some random colors.
if (numberOfColors > 9)
{
std::mt19937 mt(4355412); //Standard mersenne_twister_engine
std::uniform_real_distribution<double> distribution(.6, 1.0);
for (auto i = 10; i < numberOfColors; ++i)
{
lut->SetTableValue(i, distribution(mt), distribution(mt), distribution(mt), 1.0);
}
}
}
}
| 2,086 |
352 | <reponame>swaroop0707/TinyWeb
/*
*Author:GeneralSandman
*Code:https://github.com/GeneralSandman/TinyWeb
*E-mail:<EMAIL>
*Web:www.generalsandman.cn
*/
/*---XXX---
*
****************************************
*
*/
#include <tiny_core/socketpair.h>
#include <tiny_core/eventloop.h>
#include <tiny_core/connection.h>
#include <tiny_base/buffer.h>
#include <tiny_core/time.h>
#include <tiny_core/timerid.h>
#include <tiny_core/callback.h>
#include <iostream>
#include <unistd.h>
#include <boost/bind.hpp>
using namespace std;
void getMessage(Connection *con, Buffer *buf, Time time)
{
std::cout << "receve data:" << buf->getAll() << std::endl;
}
void print()
{
// std::cout << getpid() << "--\n";
}
void parent()
{
}
void child()
{
}
int main()
{
int sockpairFds[2];
int res = socketpair(AF_UNIX, SOCK_STREAM, 0, sockpairFds);
if (res == -1)
handle_error("socketpair error:");
pid_t pid = fork();
if (pid < 0)
{
cout << "error\n";
}
else if (pid == 0)
{
EventLoop *loop = new EventLoop();
SocketPair pipe(loop, sockpairFds);
pipe.setChildSocket();
pipe.setMessageCallback(boost::bind(&getMessage, _1, _2, _3));
TimerId id1 = loop->runEvery(1, boost::bind(&SocketPair::writeToParent, &pipe, "bb"));
TimerId id2 = loop->runAfter(10, boost::bind(&EventLoop::quit, loop));
loop->loop();
pipe.clearSocket();
delete loop;
}
else
{
EventLoop *loop = new EventLoop();
SocketPair pipe(loop, sockpairFds);
pipe.setParentSocket();
pipe.setMessageCallback(boost::bind(&getMessage, _1, _2, _3));
TimerId id1 = loop->runEvery(1, boost::bind(&SocketPair::writeToChild, &pipe, "aa"));
TimerId id2 = loop->runAfter(10, boost::bind(&EventLoop::quit, loop));
loop->loop();
pipe.clearSocket();
delete loop;
}
return 0;
}
| 842 |
629 | /*
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include "cherrypi.h"
#include "src/gameutils/openbwprocess.h"
#include <torchcraft/client.h>
#include <vector>
namespace cherrypi {
class State;
struct ReplayerConfiguration {
std::string replayPath;
bool forceGui = false;
int combineFrames = 3;
};
/**
* Play back a Brood War replay using OpenBW
*
* Provides a TorchCraft view of the game state.
*/
class TCReplayer {
public:
TCReplayer(std::string replayPath);
TCReplayer(ReplayerConfiguration);
virtual ~TCReplayer(){};
torchcraft::State* tcstate() const;
void init();
void step();
void run();
bool isComplete() {
return tcstate()->game_ended;
}
virtual void onStep(){};
protected:
ReplayerConfiguration configuration_;
std::unique_ptr<OpenBwProcess> openbw_;
std::shared_ptr<torchcraft::Client> client_;
bool initialized_ = false;
};
/**
* Play back a Brood War replay using OpenBW
*
* Runs the bot alongside the replay, and provides access to the bot's state.
*/
class Replayer : public TCReplayer {
public:
Replayer(std::string replayPath);
Replayer(ReplayerConfiguration);
virtual ~Replayer() override{};
/// Convenience wrapper for State::setPerspective()
void setPerspective(PlayerId);
State* state();
virtual void onStep() override;
protected:
std::unique_ptr<State> state_;
};
} // namespace cherrypi
| 479 |
716 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Quaternion math.
This module assumes the xyzw quaternion format where xyz is the imaginary part
and w is the real part.
Functions in this module support both batched and unbatched quaternions.
"""
from jax import numpy as jnp
from jax.numpy import linalg
def safe_acos(t, eps=1e-8):
"""A safe version of arccos which avoids evaluating at -1 or 1."""
return jnp.arccos(jnp.clip(t, -1.0 + eps, 1.0 - eps))
def im(q):
"""Fetch the imaginary part of the quaternion."""
return q[..., :3]
def re(q):
"""Fetch the real part of the quaternion."""
return q[..., 3:]
def identity():
return jnp.array([0.0, 0.0, 0.0, 1.0])
def conjugate(q):
"""Compute the conjugate of a quaternion."""
return jnp.concatenate([-im(q), re(q)], axis=-1)
def inverse(q):
"""Compute the inverse of a quaternion."""
return normalize(conjugate(q))
def normalize(q):
"""Normalize a quaternion."""
return q / norm(q)
def norm(q):
return linalg.norm(q, axis=-1, keepdims=True)
def multiply(q1, q2):
"""Multiply two quaternions."""
c = (re(q1) * im(q2)
+ re(q2) * im(q1)
+ jnp.cross(im(q1), im(q2)))
w = re(q1) * re(q2) - jnp.dot(im(q1), im(q2))
return jnp.concatenate([c, w], axis=-1)
def rotate(q, v):
"""Rotate a vector using a quaternion."""
# Create the quaternion representation of the vector.
q_v = jnp.concatenate([v, jnp.zeros_like(v[..., :1])], axis=-1)
return im(multiply(multiply(q, q_v), conjugate(q)))
def log(q, eps=1e-8):
"""Computes the quaternion logarithm.
References:
https://en.wikipedia.org/wiki/Quaternion#Exponential,_logarithm,_and_power_functions
Args:
q: the quaternion in (x,y,z,w) format.
eps: an epsilon value for numerical stability.
Returns:
The logarithm of q.
"""
mag = linalg.norm(q, axis=-1, keepdims=True)
v = im(q)
s = re(q)
w = jnp.log(mag)
denom = jnp.maximum(
linalg.norm(v, axis=-1, keepdims=True), eps * jnp.ones_like(v))
xyz = v / denom * safe_acos(s / eps)
return jnp.concatenate((xyz, w), axis=-1)
def exp(q, eps=1e-8):
"""Computes the quaternion exponential.
References:
https://en.wikipedia.org/wiki/Quaternion#Exponential,_logarithm,_and_power_functions
Args:
q: the quaternion in (x,y,z,w) format or (x,y,z) if is_pure is True.
eps: an epsilon value for numerical stability.
Returns:
The exponential of q.
"""
is_pure = q.shape[-1] == 3
if is_pure:
s = jnp.zeros_like(q[..., -1:])
v = q
else:
v = im(q)
s = re(q)
norm_v = linalg.norm(v, axis=-1, keepdims=True)
exp_s = jnp.exp(s)
w = jnp.cos(norm_v)
xyz = jnp.sin(norm_v) * v / jnp.maximum(norm_v, eps * jnp.ones_like(norm_v))
return exp_s * jnp.concatenate((xyz, w), axis=-1)
def to_rotation_matrix(q):
"""Constructs a rotation matrix from a quaternion.
Args:
q: a (*,4) array containing quaternions.
Returns:
A (*,3,3) array containing rotation matrices.
"""
x, y, z, w = jnp.split(q, 4, axis=-1)
s = 1.0 / jnp.sum(q ** 2, axis=-1)
return jnp.stack([
jnp.stack([1 - 2 * s * (y ** 2 + z ** 2),
2 * s * (x * y - z * w),
2 * s * (x * z + y * w)], axis=0),
jnp.stack([2 * s * (x * y + z * w),
1 - s * 2 * (x ** 2 + z ** 2),
2 * s * (y * z - x * w)], axis=0),
jnp.stack([2 * s * (x * z - y * w),
2 * s * (y * z + x * w),
1 - 2 * s * (x ** 2 + y ** 2)], axis=0),
], axis=0)
def from_rotation_matrix(m, eps=1e-9):
"""Construct quaternion from a rotation matrix.
Args:
m: a (*,3,3) array containing rotation matrices.
eps: a small number for numerical stability.
Returns:
A (*,4) array containing quaternions.
"""
trace = jnp.trace(m)
m00 = m[..., 0, 0]
m01 = m[..., 0, 1]
m02 = m[..., 0, 2]
m10 = m[..., 1, 0]
m11 = m[..., 1, 1]
m12 = m[..., 1, 2]
m20 = m[..., 2, 0]
m21 = m[..., 2, 1]
m22 = m[..., 2, 2]
def tr_positive():
sq = jnp.sqrt(trace + 1.0) * 2. # sq = 4 * w.
w = 0.25 * sq
x = jnp.divide(m21 - m12, sq)
y = jnp.divide(m02 - m20, sq)
z = jnp.divide(m10 - m01, sq)
return jnp.stack((x, y, z, w), axis=-1)
def cond_1():
sq = jnp.sqrt(1.0 + m00 - m11 - m22 + eps) * 2. # sq = 4 * x.
w = jnp.divide(m21 - m12, sq)
x = 0.25 * sq
y = jnp.divide(m01 + m10, sq)
z = jnp.divide(m02 + m20, sq)
return jnp.stack((x, y, z, w), axis=-1)
def cond_2():
sq = jnp.sqrt(1.0 + m11 - m00 - m22 + eps) * 2. # sq = 4 * y.
w = jnp.divide(m02 - m20, sq)
x = jnp.divide(m01 + m10, sq)
y = 0.25 * sq
z = jnp.divide(m12 + m21, sq)
return jnp.stack((x, y, z, w), axis=-1)
def cond_3():
sq = jnp.sqrt(1.0 + m22 - m00 - m11 + eps) * 2. # sq = 4 * z.
w = jnp.divide(m10 - m01, sq)
x = jnp.divide(m02 + m20, sq)
y = jnp.divide(m12 + m21, sq)
z = 0.25 * sq
return jnp.stack((x, y, z, w), axis=-1)
def cond_idx(cond):
cond = jnp.expand_dims(cond, -1)
cond = jnp.tile(cond, [1] * (len(m.shape) - 2) + [4])
return cond
where_2 = jnp.where(cond_idx(m11 > m22), cond_2(), cond_3())
where_1 = jnp.where(cond_idx((m00 > m11) & (m00 > m22)), cond_1(), where_2)
return jnp.where(cond_idx(trace > 0), tr_positive(), where_1)
| 2,678 |
679 | <filename>main/svx/source/form/fmexch.cxx<gh_stars>100-1000
/**************************************************************
*
* 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.
*
*************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include "fmexch.hxx"
#include <sot/storage.hxx>
#include <svl/itempool.hxx>
#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
#endif
#include <sot/formats.hxx>
#include <svtools/svtreebx.hxx>
#include <tools/diagnose_ex.h>
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
//........................................................................
namespace svxform
{
//........................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::datatransfer;
//====================================================================
//= OLocalExchange
//====================================================================
//--------------------------------------------------------------------
OLocalExchange::OLocalExchange( )
:m_bDragging( sal_False )
,m_bClipboardOwner( sal_False )
{
}
//--------------------------------------------------------------------
void OLocalExchange::copyToClipboard( Window* _pWindow, const GrantAccess& )
{
if ( m_bClipboardOwner )
{ // simulate a lostOwnership to notify parties interested in
if ( m_aClipboardListener.IsSet() )
m_aClipboardListener.Call( this );
}
m_bClipboardOwner = sal_True;
CopyToClipboard( _pWindow );
}
//--------------------------------------------------------------------
void OLocalExchange::clear()
{
if ( isClipboardOwner() )
{
try
{
Reference< clipboard::XClipboard > xClipBoard( getOwnClipboard() );
if ( xClipBoard.is() )
xClipBoard->setContents( NULL, NULL );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
m_bClipboardOwner = sal_False;
}
}
//--------------------------------------------------------------------
void SAL_CALL OLocalExchange::lostOwnership( const Reference< clipboard::XClipboard >& _rxClipboard, const Reference< XTransferable >& _rxTrans ) throw(RuntimeException)
{
TransferableHelper::implCallOwnLostOwnership( _rxClipboard, _rxTrans );
m_bClipboardOwner = sal_False;
if ( m_aClipboardListener.IsSet() )
m_aClipboardListener.Call( this );
}
//--------------------------------------------------------------------
void OLocalExchange::startDrag( Window* _pWindow, sal_Int8 _nDragSourceActions, const GrantAccess& )
{
m_bDragging = sal_True;
StartDrag( _pWindow, _nDragSourceActions );
}
//--------------------------------------------------------------------
void OLocalExchange::DragFinished( sal_Int8 nDropAction )
{
TransferableHelper::DragFinished( nDropAction );
m_bDragging = sal_False;
}
//--------------------------------------------------------------------
sal_Bool OLocalExchange::hasFormat( const DataFlavorExVector& _rFormats, sal_uInt32 _nFormatId )
{
DataFlavorExVector::const_iterator aSearch;
for ( aSearch = _rFormats.begin(); aSearch != _rFormats.end(); ++aSearch )
if ( aSearch->mnSotId == _nFormatId )
break;
return aSearch != _rFormats.end();
}
//--------------------------------------------------------------------
sal_Bool OLocalExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& /*_rFlavor*/ )
{
return sal_False; // do not have any formats by default
}
//====================================================================
//= OControlTransferData
//====================================================================
//--------------------------------------------------------------------
OControlTransferData::OControlTransferData( )
:m_pFocusEntry( NULL )
{
}
//--------------------------------------------------------------------
OControlTransferData::OControlTransferData( const Reference< XTransferable >& _rxTransferable )
:m_pFocusEntry( NULL )
{
TransferableDataHelper aExchangedData( _rxTransferable );
// try the formats we know
if ( OControlExchange::hasControlPathFormat( aExchangedData.GetDataFlavorExVector() ) )
{ // paths to the controls, relative to a root
Sequence< Any > aControlPathData;
if ( aExchangedData.GetAny( OControlExchange::getControlPathFormatId() ) >>= aControlPathData )
{
DBG_ASSERT( aControlPathData.getLength() >= 2, "OControlTransferData::OControlTransferData: invalid data for the control path format!" );
if ( aControlPathData.getLength() >= 2 )
{
aControlPathData[0] >>= m_xFormsRoot;
aControlPathData[1] >>= m_aControlPaths;
}
}
else
{
DBG_ERROR( "OControlTransferData::OControlTransferData: invalid data for the control path format (2)!" );
}
}
if ( OControlExchange::hasHiddenControlModelsFormat( aExchangedData.GetDataFlavorExVector() ) )
{ // sequence of models of hidden controls
aExchangedData.GetAny( OControlExchange::getHiddenControlModelsFormatId() ) >>= m_aHiddenControlModels;
}
updateFormats( );
}
//--------------------------------------------------------------------
static sal_Bool lcl_fillDataFlavorEx( SotFormatStringId nId, DataFlavorEx& _rFlavor )
{
_rFlavor.mnSotId = nId;
return SotExchange::GetFormatDataFlavor( _rFlavor.mnSotId, _rFlavor );
}
//--------------------------------------------------------------------
void OControlTransferData::updateFormats( )
{
m_aCurrentFormats.clear();
m_aCurrentFormats.reserve( 3 );
DataFlavorEx aFlavor;
if ( m_aHiddenControlModels.getLength() )
{
if ( lcl_fillDataFlavorEx( OControlExchange::getHiddenControlModelsFormatId(), aFlavor ) )
m_aCurrentFormats.push_back( aFlavor );
}
if ( m_xFormsRoot.is() && m_aControlPaths.getLength() )
{
if ( lcl_fillDataFlavorEx( OControlExchange::getControlPathFormatId(), aFlavor ) )
m_aCurrentFormats.push_back( aFlavor );
}
if ( !m_aSelectedEntries.empty() )
{
if ( lcl_fillDataFlavorEx( OControlExchange::getFieldExchangeFormatId(), aFlavor ) )
m_aCurrentFormats.push_back( aFlavor );
}
}
//--------------------------------------------------------------------
size_t OControlTransferData::onEntryRemoved( SvLBoxEntry* _pEntry )
{
m_aSelectedEntries.erase( _pEntry );
return m_aSelectedEntries.size();
}
//--------------------------------------------------------------------
void OControlTransferData::addSelectedEntry( SvLBoxEntry* _pEntry )
{
m_aSelectedEntries.insert( _pEntry );
}
//--------------------------------------------------------------------
void OControlTransferData::setFocusEntry( SvLBoxEntry* _pFocusEntry )
{
m_pFocusEntry = _pFocusEntry;
}
//------------------------------------------------------------------------
void OControlTransferData::addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces)
{
m_aHiddenControlModels = seqInterfaces;
}
//------------------------------------------------------------------------
void OControlTransferData::buildPathFormat(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
{
m_aControlPaths.realloc(0);
sal_Int32 nEntryCount = m_aSelectedEntries.size();
if (nEntryCount == 0)
return;
m_aControlPaths.realloc(nEntryCount);
::com::sun::star::uno::Sequence<sal_uInt32>* pAllPaths = m_aControlPaths.getArray();
for ( ListBoxEntrySet::const_iterator loop = m_aSelectedEntries.begin();
loop != m_aSelectedEntries.end();
++loop, ++pAllPaths
)
{
// erst mal sammeln wir den Pfad in einem Array ein
::std::vector< sal_uInt32 > aCurrentPath;
SvLBoxEntry* pCurrentEntry = *loop;
SvLBoxEntry* pLoop = pCurrentEntry;
while (pLoop != pRoot)
{
aCurrentPath.push_back(pLoop->GetChildListPos());
pLoop = pTreeBox->GetParent(pLoop);
DBG_ASSERT((pLoop != NULL) || (pRoot == 0), "OControlTransferData::buildPathFormat: invalid root or entry !");
// pLoop == NULL heisst, dass ich am oberen Ende angelangt bin, dann sollte das Ganze abbrechen, was nur bei pRoot == NULL der Fall sein wird
}
// dann koennen wir ihn in die ::com::sun::star::uno::Sequence uebertragen
Sequence<sal_uInt32>& rCurrentPath = *pAllPaths;
sal_Int32 nDepth = aCurrentPath.size();
rCurrentPath.realloc(nDepth);
sal_uInt32* pSeq = rCurrentPath.getArray();
sal_Int32 j,k;
for (j = nDepth - 1, k = 0; k<nDepth; --j, ++k)
pSeq[j] = aCurrentPath[k];
}
}
//------------------------------------------------------------------------
void OControlTransferData::buildListFromPath(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
{
ListBoxEntrySet aEmpty;
m_aSelectedEntries.swap( aEmpty );
sal_Int32 nControls = m_aControlPaths.getLength();
const ::com::sun::star::uno::Sequence<sal_uInt32>* pPaths = m_aControlPaths.getConstArray();
for (sal_Int32 i=0; i<nControls; ++i)
{
sal_Int32 nThisPatLength = pPaths[i].getLength();
const sal_uInt32* pThisPath = pPaths[i].getConstArray();
SvLBoxEntry* pSearch = pRoot;
for (sal_Int32 j=0; j<nThisPatLength; ++j)
pSearch = pTreeBox->GetEntry(pSearch, pThisPath[j]);
m_aSelectedEntries.insert( pSearch );
}
}
//====================================================================
//= OControlExchange
//====================================================================
//--------------------------------------------------------------------
OControlExchange::OControlExchange( )
{
}
//--------------------------------------------------------------------
sal_Bool OControlExchange::GetData( const DataFlavor& _rFlavor )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat( _rFlavor );
if ( getControlPathFormatId( ) == nFormatId )
{
// ugly. We have to pack all the info into one object
Sequence< Any > aCompleteInfo( 2 );
OSL_ENSURE( m_xFormsRoot.is(), "OLocalExchange::GetData: invalid forms root for this format!" );
aCompleteInfo.getArray()[ 0 ] <<= m_xFormsRoot;
aCompleteInfo.getArray()[ 1 ] <<= m_aControlPaths;
SetAny( makeAny( aCompleteInfo ), _rFlavor );
}
else if ( getHiddenControlModelsFormatId() == nFormatId )
{
// just need to transfer the models
SetAny( makeAny( m_aHiddenControlModels ), _rFlavor );
}
else
return OLocalExchange::GetData( _rFlavor );
return sal_True;
}
//--------------------------------------------------------------------
void OControlExchange::AddSupportedFormats()
{
if (m_pFocusEntry && !m_aSelectedEntries.empty())
AddFormat(getFieldExchangeFormatId());
if (m_aControlPaths.getLength())
AddFormat(getControlPathFormatId());
if (m_aHiddenControlModels.getLength())
AddFormat(getHiddenControlModelsFormatId());
}
//--------------------------------------------------------------------
sal_uInt32 OControlExchange::getControlPathFormatId()
{
static sal_uInt32 s_nFormat = (sal_uInt32)-1;
if ((sal_uInt32)-1 == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName(String::CreateFromAscii("application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\""));
DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getControlPathFormatId: bad exchange id!");
}
return s_nFormat;
}
//--------------------------------------------------------------------
sal_uInt32 OControlExchange::getHiddenControlModelsFormatId()
{
static sal_uInt32 s_nFormat = (sal_uInt32)-1;
if ((sal_uInt32)-1 == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName(String::CreateFromAscii("application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\""));
DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getHiddenControlModelsFormatId: bad exchange id!");
}
return s_nFormat;
}
//--------------------------------------------------------------------
sal_uInt32 OControlExchange::getFieldExchangeFormatId()
{
static sal_uInt32 s_nFormat = (sal_uInt32)-1;
if ((sal_uInt32)-1 == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName(String::CreateFromAscii("application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\""));
DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getFieldExchangeFormatId: bad exchange id!");
}
return s_nFormat;
}
//====================================================================
//= OControlExchangeHelper
//====================================================================
OLocalExchange* OControlExchangeHelper::createExchange() const
{
return new OControlExchange;
}
//====================================================================
//= OLocalExchangeHelper
//====================================================================
//--------------------------------------------------------------------
OLocalExchangeHelper::OLocalExchangeHelper(Window* _pDragSource)
:m_pDragSource(_pDragSource)
,m_pTransferable(NULL)
{
}
//--------------------------------------------------------------------
OLocalExchangeHelper::~OLocalExchangeHelper()
{
implReset();
}
//--------------------------------------------------------------------
void OLocalExchangeHelper::startDrag( sal_Int8 nDragSourceActions )
{
DBG_ASSERT(m_pTransferable, "OLocalExchangeHelper::startDrag: not prepared!");
m_pTransferable->startDrag( m_pDragSource, nDragSourceActions, OLocalExchange::GrantAccess() );
}
//--------------------------------------------------------------------
void OLocalExchangeHelper::copyToClipboard( ) const
{
DBG_ASSERT( m_pTransferable, "OLocalExchangeHelper::copyToClipboard: not prepared!" );
m_pTransferable->copyToClipboard( m_pDragSource, OLocalExchange::GrantAccess() );
}
//--------------------------------------------------------------------
void OLocalExchangeHelper::implReset()
{
if (m_pTransferable)
{
m_pTransferable->setClipboardListener( Link() );
m_pTransferable->release();
m_pTransferable = NULL;
}
}
//--------------------------------------------------------------------
void OLocalExchangeHelper::prepareDrag( )
{
DBG_ASSERT(!m_pTransferable || !m_pTransferable->isDragging(), "OLocalExchangeHelper::prepareDrag: recursive DnD?");
implReset();
m_pTransferable = createExchange();
m_pTransferable->acquire();
}
//........................................................................
}
//........................................................................
| 4,938 |
1,031 |
import doxygen_alias.*;
import java.util.HashMap;
public class doxygen_alias_runme {
static {
try {
System.loadLibrary("doxygen_alias");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
CommentParser.parse("doxygen_alias");
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_alias.doxygen_alias.make_something()",
" A function returning something.<br>\n" +
" <br>\n" +
" @return A new object which may be null.\n" +
"");
System.exit(CommentParser.check(wantedComments));
}
}
| 307 |
12,718 | <gh_stars>1000+
#ifndef _NET_ROUTE_H
#define _NET_ROUTE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
struct rtentry {
unsigned long int rt_pad1;
struct sockaddr rt_dst;
struct sockaddr rt_gateway;
struct sockaddr rt_genmask;
unsigned short int rt_flags;
short int rt_pad2;
unsigned long int rt_pad3;
unsigned char rt_tos;
unsigned char rt_class;
short int rt_pad4[sizeof(long)/2-1];
short int rt_metric;
char *rt_dev;
unsigned long int rt_mtu;
unsigned long int rt_window;
unsigned short int rt_irtt;
};
#define rt_mss rt_mtu
struct in6_rtmsg {
struct in6_addr rtmsg_dst;
struct in6_addr rtmsg_src;
struct in6_addr rtmsg_gateway;
uint32_t rtmsg_type;
uint16_t rtmsg_dst_len;
uint16_t rtmsg_src_len;
uint32_t rtmsg_metric;
unsigned long int rtmsg_info;
uint32_t rtmsg_flags;
int rtmsg_ifindex;
};
#define RTF_UP 0x0001
#define RTF_GATEWAY 0x0002
#define RTF_HOST 0x0004
#define RTF_REINSTATE 0x0008
#define RTF_DYNAMIC 0x0010
#define RTF_MODIFIED 0x0020
#define RTF_MTU 0x0040
#define RTF_MSS RTF_MTU
#define RTF_WINDOW 0x0080
#define RTF_IRTT 0x0100
#define RTF_REJECT 0x0200
#define RTF_STATIC 0x0400
#define RTF_XRESOLVE 0x0800
#define RTF_NOFORWARD 0x1000
#define RTF_THROW 0x2000
#define RTF_NOPMTUDISC 0x4000
#define RTF_DEFAULT 0x00010000
#define RTF_ALLONLINK 0x00020000
#define RTF_ADDRCONF 0x00040000
#define RTF_LINKRT 0x00100000
#define RTF_NONEXTHOP 0x00200000
#define RTF_CACHE 0x01000000
#define RTF_FLOW 0x02000000
#define RTF_POLICY 0x04000000
#define RTCF_VALVE 0x00200000
#define RTCF_MASQ 0x00400000
#define RTCF_NAT 0x00800000
#define RTCF_DOREDIRECT 0x01000000
#define RTCF_LOG 0x02000000
#define RTCF_DIRECTSRC 0x04000000
#define RTF_LOCAL 0x80000000
#define RTF_INTERFACE 0x40000000
#define RTF_MULTICAST 0x20000000
#define RTF_BROADCAST 0x10000000
#define RTF_NAT 0x08000000
#define RTF_ADDRCLASSMASK 0xF8000000
#define RT_ADDRCLASS(flags) ((uint32_t) flags >> 23)
#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK)
#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \
== (RTF_LOCAL|RTF_INTERFACE))
#define RT_CLASS_UNSPEC 0
#define RT_CLASS_DEFAULT 253
#define RT_CLASS_MAIN 254
#define RT_CLASS_LOCAL 255
#define RT_CLASS_MAX 255
#define RTMSG_ACK NLMSG_ACK
#define RTMSG_OVERRUN NLMSG_OVERRUN
#define RTMSG_NEWDEVICE 0x11
#define RTMSG_DELDEVICE 0x12
#define RTMSG_NEWROUTE 0x21
#define RTMSG_DELROUTE 0x22
#define RTMSG_NEWRULE 0x31
#define RTMSG_DELRULE 0x32
#define RTMSG_CONTROL 0x40
#define RTMSG_AR_FAILED 0x51
#ifdef __cplusplus
}
#endif
#endif
| 1,273 |
16,761 | /*
* Copyright 2013-2018 the original author or 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
*
* https://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.alibaba.cloud.dubbo.metadata;
import java.util.Objects;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* Service Rest Metadata.
*
* @author <a href="mailto:<EMAIL>">Mercy</a>
* @see RestMethodMetadata
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ServiceRestMetadata {
private String url;
private Set<RestMethodMetadata> meta;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Set<RestMethodMetadata> getMeta() {
return meta;
}
public void setMeta(Set<RestMethodMetadata> meta) {
this.meta = meta;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ServiceRestMetadata)) {
return false;
}
ServiceRestMetadata that = (ServiceRestMetadata) o;
return Objects.equals(url, that.url) && Objects.equals(meta, that.meta);
}
@Override
public int hashCode() {
return Objects.hash(url, meta);
}
}
| 532 |
118,175 | <reponame>bobzhang/react-native<gh_stars>1000+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <algorithm>
#include <memory>
#include <gtest/gtest.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/components/root/RootComponentDescriptor.h>
#include <react/renderer/components/scrollview/ScrollViewComponentDescriptor.h>
#include <react/renderer/components/view/ViewComponentDescriptor.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/element/ComponentBuilder.h>
#include <react/renderer/element/Element.h>
#include <react/renderer/element/testUtils.h>
namespace facebook {
namespace react {
class YogaDirtyFlagTest : public ::testing::Test {
protected:
ComponentBuilder builder_;
std::shared_ptr<RootShadowNode> rootShadowNode_;
std::shared_ptr<ViewShadowNode> innerShadowNode_;
std::shared_ptr<ScrollViewShadowNode> scrollViewShadowNode_;
YogaDirtyFlagTest() : builder_(simpleComponentBuilder()) {
// clang-format off
auto element =
Element<RootShadowNode>()
.reference(rootShadowNode_)
.tag(1)
.children({
Element<ViewShadowNode>()
.tag(2),
Element<ViewShadowNode>()
.tag(3)
.reference(innerShadowNode_)
.children({
Element<ViewShadowNode>()
.tag(4)
.props([] {
/*
* Some non-default props.
*/
auto mutableViewProps = std::make_shared<ViewProps>();
auto &props = *mutableViewProps;
props.nativeId = "native Id";
props.opacity = 0.5;
props.yogaStyle.alignContent() = YGAlignBaseline;
props.yogaStyle.flexDirection() = YGFlexDirectionRowReverse;
return mutableViewProps;
}),
Element<ViewShadowNode>()
.tag(5),
Element<ViewShadowNode>()
.tag(6),
Element<ScrollViewShadowNode>()
.reference(scrollViewShadowNode_)
.tag(7)
.children({
Element<ViewShadowNode>()
.tag(8)
})
})
});
// clang-format on
builder_.build(element);
/*
* Yoga nodes are dirty right after creation.
*/
EXPECT_TRUE(rootShadowNode_->layoutIfNeeded());
/*
* Yoga nodes are clean (not dirty) right after layout pass.
*/
EXPECT_FALSE(rootShadowNode_->layoutIfNeeded());
}
};
TEST_F(YogaDirtyFlagTest, cloningPropsWithoutChangingThem) {
ContextContainer contextContainer{};
PropsParserContext parserContext{-1, contextContainer};
/*
* Cloning props without changing them must *not* dirty a Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [&](ShadowNode const &oldShadowNode) {
auto &componentDescriptor = oldShadowNode.getComponentDescriptor();
auto props = componentDescriptor.cloneProps(
parserContext, oldShadowNode.getProps(), RawProps());
return oldShadowNode.clone(ShadowNodeFragment{props});
});
EXPECT_FALSE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, changingNonLayoutSubPropsMustNotDirtyYogaNode) {
/*
* Changing *non-layout* sub-props must *not* dirty a Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
auto viewProps = std::make_shared<ViewProps>();
auto &props = *viewProps;
props.nativeId = "some new native Id";
props.foregroundColor = whiteColor();
props.backgroundColor = blackColor();
props.opacity = props.opacity + 0.042;
props.zIndex = props.zIndex.value_or(0) + 42;
props.shouldRasterize = !props.shouldRasterize;
props.collapsable = !props.collapsable;
return oldShadowNode.clone(ShadowNodeFragment{viewProps});
});
EXPECT_FALSE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, changingLayoutSubPropsMustDirtyYogaNode) {
/*
* Changing *layout* sub-props *must* dirty a Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
auto viewProps = std::make_shared<ViewProps>();
auto &props = *viewProps;
props.yogaStyle.alignContent() = YGAlignBaseline;
props.yogaStyle.display() = YGDisplayNone;
return oldShadowNode.clone(ShadowNodeFragment{viewProps});
});
EXPECT_TRUE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, removingAllChildrenMustDirtyYogaNode) {
/*
* Removing all children *must* dirty a Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
return oldShadowNode.clone(
{ShadowNodeFragment::propsPlaceholder(),
ShadowNode::emptySharedShadowNodeSharedList()});
});
EXPECT_TRUE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, removingLastChildMustDirtyYogaNode) {
/*
* Removing the last child *must* dirty the Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
auto children = oldShadowNode.getChildren();
children.pop_back();
std::reverse(children.begin(), children.end());
return oldShadowNode.clone(
{ShadowNodeFragment::propsPlaceholder(),
std::make_shared<ShadowNode::ListOfShared const>(children)});
});
EXPECT_TRUE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, reversingListOfChildrenMustDirtyYogaNode) {
/*
* Reversing a list of children *must* dirty a Yoga node.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
innerShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
auto children = oldShadowNode.getChildren();
std::reverse(children.begin(), children.end());
return oldShadowNode.clone(
{ShadowNodeFragment::propsPlaceholder(),
std::make_shared<ShadowNode::ListOfShared const>(children)});
});
EXPECT_TRUE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
TEST_F(YogaDirtyFlagTest, updatingStateForScrollViewMistNotDirtyYogaNode) {
/*
* Updating a state for *some* (not all!) components must *not* dirty Yoga
* nodes.
*/
auto newRootShadowNode = rootShadowNode_->cloneTree(
scrollViewShadowNode_->getFamily(), [](ShadowNode const &oldShadowNode) {
auto state = ScrollViewState{};
state.contentOffset = Point{42, 9000};
auto &componentDescriptor = oldShadowNode.getComponentDescriptor();
auto newState = componentDescriptor.createState(
oldShadowNode.getFamily(),
std::make_shared<ScrollViewState>(state));
return oldShadowNode.clone(
{ShadowNodeFragment::propsPlaceholder(),
ShadowNodeFragment::childrenPlaceholder(),
newState});
});
EXPECT_FALSE(
static_cast<RootShadowNode &>(*newRootShadowNode).layoutIfNeeded());
}
} // namespace react
} // namespace facebook
| 3,264 |
399 | /*
* Copyright 2011 <NAME>. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED "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 <NAME> OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied.
*/
package ioio.lib.util.android;
import android.content.ContextWrapper;
import ioio.lib.util.IOIOBaseApplicationHelper;
import ioio.lib.util.IOIOConnectionRegistry;
import ioio.lib.util.IOIOLooper;
import ioio.lib.util.IOIOLooperProvider;
/**
* A helper class for creating different kinds of IOIO based applications on
* Android.
* <p>
* <i><b>Note</b>: Consider using {@link IOIOActivity} or {@link IOIOService}
* for easy creation of IOIO activities and services. This class is intended for
* more advanced use-cases not covered by them.</i>
* <p>
* This class implements a common life-cycle for Android applications
* interacting with IOIO devices. Usage is as follows:
* <ul>
* <li>Create an instance of {@link IOIOAndroidApplicationHelper}, passing a
* {@link IOIOLooperProvider} and a {@link ContextWrapper} to the constructor.</li>
* <li>Call {@link #create()}, {@link #destroy()}, {@link #start()},
* {@link #stop()} and {@link #restart()} from the respective Android life-cycle
* event methods.</li>
* <li>{@link #start()} will trigger callback of
* {@link IOIOLooperProvider#createIOIOLooper(String, Object)} for every
* possible IOIO connection and create a new thread for interacting with this
* IOIO, through the created {@link IOIOLooper}.</li>
* <li>{@link #stop()} will make sure proper cleanup and disconnection is done.</li>
* </ul>
*/
public class IOIOAndroidApplicationHelper extends IOIOBaseApplicationHelper {
static {
IOIOConnectionRegistry
.addBootstraps(new String[]{
"ioio.lib.impl.SocketIOIOConnectionBootstrap",
"ioio.lib.android.accessory.AccessoryConnectionBootstrap",
"ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap",
"ioio.lib.android.device.DeviceConnectionBootstrap"});
}
private final AndroidIOIOConnectionManager manager_;
public IOIOAndroidApplicationHelper(ContextWrapper wrapper, IOIOLooperProvider provider) {
super(provider);
manager_ = new AndroidIOIOConnectionManager(wrapper, this);
}
public void create() {
manager_.create();
}
public void destroy() {
manager_.destroy();
}
public void start() {
manager_.start();
}
public void stop() {
manager_.stop();
}
public void restart() {
manager_.restart();
}
}
| 1,282 |
5,823 | // Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
G_BEGIN_DECLS
/**
* fl_standard_message_codec_write_size:
* @codec: an #FlStandardMessageCodec.
* @buffer: buffer to write into.
* @size: size value to write.
*
* Writes a size field in Flutter Standard encoding.
*/
void fl_standard_message_codec_write_size(FlStandardMessageCodec* codec,
GByteArray* buffer,
uint32_t size);
/**
* fl_standard_message_codec_read_size:
* @codec: an #FlStandardMessageCodec.
* @buffer: buffer to read from.
* @offset: (inout): read position in @buffer.
* @value: location to read size.
* @error: (allow-none): #GError location to store the error occurring, or
* %NULL.
*
* Reads a size field in Flutter Standard encoding.
*
* Returns: %TRUE on success.
*/
gboolean fl_standard_message_codec_read_size(FlStandardMessageCodec* codec,
GBytes* buffer,
size_t* offset,
uint32_t* value,
GError** error);
/**
* fl_standard_message_codec_write_value:
* @codec: an #FlStandardMessageCodec.
* @buffer: buffer to write into.
* @value: (allow-none): value to write.
* @error: (allow-none): #GError location to store the error occurring, or
* %NULL.
*
* Writes an #FlValue in Flutter Standard encoding.
*
* Returns: %TRUE on success.
*/
gboolean fl_standard_message_codec_write_value(FlStandardMessageCodec* codec,
GByteArray* buffer,
FlValue* value,
GError** error);
/**
* fl_standard_message_codec_read_value:
* @codec: an #FlStandardMessageCodec.
* @buffer: buffer to read from.
* @offset: (inout): read position in @buffer.
* @value: location to read size.
* @error: (allow-none): #GError location to store the error occurring, or
* %NULL.
*
* Reads an #FlValue in Flutter Standard encoding.
*
* Returns: a new #FlValue or %NULL on error.
*/
FlValue* fl_standard_message_codec_read_value(FlStandardMessageCodec* codec,
GBytes* buffer,
size_t* offset,
GError** error);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
| 1,352 |
1,036 | <gh_stars>1000+
package com.mylhyl.circledialog.params;
import android.graphics.Typeface;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.Gravity;
import com.mylhyl.circledialog.res.values.CircleColor;
import com.mylhyl.circledialog.res.values.CircleDimen;
/**
* 文本内容参数
* Created by hupei on 2017/3/30.
*/
public class TextParams implements Parcelable {
public static final Creator<TextParams> CREATOR = new Creator<TextParams>() {
@Override
public TextParams createFromParcel(Parcel source) {
return new TextParams(source);
}
@Override
public TextParams[] newArray(int size) {
return new TextParams[size];
}
};
/**
* body文本内间距 [left, top, right, bottom]
*/
public int[] padding = CircleDimen.TEXT_PADDING;
/**
* 文本
*/
public String text = "";
/**
* 文本高度
*/
public int height = CircleDimen.TEXT_HEIGHT;
/**
* 文本背景颜色
*/
public int backgroundColor;
/**
* 文本字体颜色
*/
public int textColor = CircleColor.CONTENT;
/**
* 文本字体大小
*/
public int textSize = CircleDimen.CONTENT_TEXT_SIZE;
public int gravity = Gravity.CENTER;
/**
* 字样式
* {@linkplain Typeface#NORMAL NORMAL}
* {@linkplain Typeface#BOLD BOLD}
* {@linkplain Typeface#ITALIC ITALIC}
* {@linkplain Typeface#BOLD_ITALIC BOLD_ITALIC}
*/
public int styleText = Typeface.NORMAL;
public TextParams() {
}
protected TextParams(Parcel in) {
this.padding = in.createIntArray();
this.text = in.readString();
this.height = in.readInt();
this.backgroundColor = in.readInt();
this.textColor = in.readInt();
this.textSize = in.readInt();
this.gravity = in.readInt();
this.styleText = in.readInt();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeIntArray(this.padding);
dest.writeString(this.text);
dest.writeInt(this.height);
dest.writeInt(this.backgroundColor);
dest.writeInt(this.textColor);
dest.writeInt(this.textSize);
dest.writeInt(this.gravity);
dest.writeInt(this.styleText);
}
}
| 1,088 |
4,071 | <reponame>Ru-Xiang/x-deeplearning
/*
* \file in_order_gemm_gemm_test.cc
* \brief The in order gemm gemm test unit
*/
#include "gtest/gtest.h"
#include "blaze/graph/fusion_pattern.h"
#include "blaze/test/graph/pattern/pattern_test_common.h"
namespace blaze {
TEST(TestInOrder, All) {
// (w0) (w1)
CheckPatternOutput(
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion.blaze",
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion_expected.blaze");
// (w0, bias0) (w1)
CheckPatternOutput(
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion2.blaze",
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion2_expected.blaze");
// (w0), (w1, bias1)
CheckPatternOutput(
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion3.blaze",
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion3_expected.blaze");
// (w0, bias0), (w1, bias1)
CheckPatternOutput(
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion4.blaze",
"./utest_data/graph/pattern/in_order/in_order_gemm_gemm_fusion4_expected.blaze");
}
} // namespace blaze
| 517 |
3,469 | # Copyright The PyTorch Lightning team.
#
# 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.
from unittest import mock
import pytest
import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
import pytorch_lightning as pl
import tests.helpers.pipelines as tpipes
import tests.helpers.utils as tutils
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import EarlyStopping
from pytorch_lightning.utilities.exceptions import MisconfigurationException
from tests.helpers import BoringModel, RandomDataset
from tests.helpers.datamodules import ClassifDataModule
from tests.helpers.runif import RunIf
from tests.helpers.simple_models import ClassificationModel
class CustomClassificationModelDP(ClassificationModel):
def _step(self, batch, batch_idx):
x, y = batch
logits = self(x)
return {"logits": logits, "y": y}
def training_step(self, batch, batch_idx):
out = self._step(batch, batch_idx)
loss = F.cross_entropy(out["logits"], out["y"])
return loss
def validation_step(self, batch, batch_idx):
return self._step(batch, batch_idx)
def test_step(self, batch, batch_idx):
return self._step(batch, batch_idx)
def validation_step_end(self, outputs):
self.log("val_acc", self.valid_acc(outputs["logits"], outputs["y"]))
def test_step_end(self, outputs):
self.log("test_acc", self.test_acc(outputs["logits"], outputs["y"]))
@RunIf(min_cuda_gpus=2)
def test_multi_gpu_early_stop_dp(tmpdir):
"""Make sure DDP works.
with early stopping
"""
tutils.set_random_main_port()
dm = ClassifDataModule()
model = CustomClassificationModelDP()
trainer_options = dict(
default_root_dir=tmpdir,
callbacks=[EarlyStopping(monitor="val_acc")],
max_epochs=50,
limit_train_batches=10,
limit_val_batches=10,
accelerator="gpu",
devices=[0, 1],
strategy="dp",
)
tpipes.run_model_test(trainer_options, model, dm)
@RunIf(min_cuda_gpus=2)
def test_multi_gpu_model_dp(tmpdir):
tutils.set_random_main_port()
trainer_options = dict(
default_root_dir=tmpdir,
max_epochs=1,
limit_train_batches=10,
limit_val_batches=10,
accelerator="gpu",
devices=[0, 1],
strategy="dp",
enable_progress_bar=False,
)
model = BoringModel()
tpipes.run_model_test(trainer_options, model)
class ReductionTestModel(BoringModel):
def train_dataloader(self):
return DataLoader(RandomDataset(32, 64), batch_size=2)
def val_dataloader(self):
return DataLoader(RandomDataset(32, 64), batch_size=2)
def test_dataloader(self):
return DataLoader(RandomDataset(32, 64), batch_size=2)
def add_outputs(self, output, device):
output.update(
{
"reduce_int": torch.tensor(device.index, dtype=torch.int, device=device),
"reduce_float": torch.tensor(device.index, dtype=torch.float, device=device),
}
)
def training_step(self, batch, batch_idx):
output = super().training_step(batch, batch_idx)
self.add_outputs(output, batch.device)
return output
def validation_step(self, batch, batch_idx):
output = super().validation_step(batch, batch_idx)
self.add_outputs(output, batch.device)
return output
def test_step(self, batch, batch_idx):
output = super().test_step(batch, batch_idx)
self.add_outputs(output, batch.device)
return output
def training_epoch_end(self, outputs):
assert outputs[0]["loss"].shape == torch.Size([])
self._assert_extra_outputs(outputs)
def validation_epoch_end(self, outputs):
assert outputs[0]["x"].shape == torch.Size([2])
self._assert_extra_outputs(outputs)
def test_epoch_end(self, outputs):
assert outputs[0]["y"].shape == torch.Size([2])
self._assert_extra_outputs(outputs)
def _assert_extra_outputs(self, outputs):
out = outputs[0]["reduce_int"]
assert torch.eq(out, torch.tensor([0, 1], device="cuda:0")).all()
assert out.dtype is torch.int
out = outputs[0]["reduce_float"]
assert torch.eq(out, torch.tensor([0.0, 1.0], device="cuda:0")).all()
assert out.dtype is torch.float
@mock.patch("torch.cuda.device_count", return_value=2)
@mock.patch("torch.cuda.is_available", return_value=True)
def test_dp_raise_exception_with_batch_transfer_hooks(mock_is_available, mock_device_count, tmpdir):
"""Test that an exception is raised when overriding batch_transfer_hooks in DP model."""
class CustomModel(BoringModel):
def transfer_batch_to_device(self, batch, device, dataloader_idx):
batch = batch.to(device)
return batch
trainer_options = dict(default_root_dir=tmpdir, max_steps=7, accelerator="gpu", devices=[0, 1], strategy="dp")
trainer = Trainer(**trainer_options)
model = CustomModel()
with pytest.raises(MisconfigurationException, match=r"Overriding `transfer_batch_to_device` is not .* in DP"):
trainer.fit(model)
class CustomModel(BoringModel):
def on_before_batch_transfer(self, batch, dataloader_idx):
batch += 1
return batch
trainer = Trainer(**trainer_options)
model = CustomModel()
with pytest.raises(MisconfigurationException, match=r"Overriding `on_before_batch_transfer` is not .* in DP"):
trainer.fit(model)
class CustomModel(BoringModel):
def on_after_batch_transfer(self, batch, dataloader_idx):
batch += 1
return batch
trainer = Trainer(**trainer_options)
model = CustomModel()
with pytest.raises(MisconfigurationException, match=r"Overriding `on_after_batch_transfer` is not .* in DP"):
trainer.fit(model)
@RunIf(min_cuda_gpus=2)
def test_dp_training_step_dict(tmpdir):
"""This test verifies that dp properly reduces dictionaries."""
model = ReductionTestModel()
model.training_step_end = None
model.validation_step_end = None
model.test_step_end = None
trainer = pl.Trainer(
default_root_dir=tmpdir,
fast_dev_run=True,
accelerator="gpu",
devices=2,
strategy="dp",
)
trainer.fit(model)
trainer.test(model)
@RunIf(min_cuda_gpus=2)
def test_dp_batch_not_moved_to_device_explicitly(tmpdir):
"""Test that with DP, batch is not moved to the device explicitly."""
class CustomModel(BoringModel):
def on_train_batch_start(self, batch, *args, **kargs):
assert not batch.is_cuda
def training_step(self, batch, batch_idx):
assert batch.is_cuda
return super().training_step(batch, batch_idx)
trainer = pl.Trainer(
default_root_dir=tmpdir,
fast_dev_run=True,
accelerator="gpu",
devices=2,
strategy="dp",
)
trainer.fit(CustomModel())
| 3,049 |
367 | <reponame>rbavery/solaris<filename>tests/test_nets/test_transform.py
import numpy as np
from solaris.nets.transform import Rotate, RandomScale, build_pipeline
from albumentations.core.composition import Compose, OneOf
from albumentations.augmentations.transforms import HorizontalFlip, Normalize
class TestRotate(object):
"""Test the rotation transform."""
def test_rotate(self):
rot = Rotate()
arr = np.array([[3, 5, 3],
[5, 8, 10],
[1, 3, 8]])
rot_arr = rot.apply(arr, angle=45)
assert np.array_equal(rot_arr,
np.array([[5, 7, 5, 10],
[5, 6, 10, 7],
[5, 5, 4, 9],
[5, 2, 3, 3]]))
class TestRandomScale(object):
"""Test the random scale transform."""
def test_random_scale(self):
rs = RandomScale(scale_limit=0.2)
assert rs.scale_limit == (0.8, 1.2)
arr = np.array([[3, 5, 3],
[5, 8, 10],
[1, 3, 8]])
scaled_arr = rs.apply(arr, scale_x=2, scale_y=2)
assert np.array_equal(scaled_arr, np.array([[3, 3, 5, 5, 2, 2],
[3, 4, 5, 6, 4, 4],
[5, 6, 7, 8, 9, 9],
[4, 5, 6, 8, 10, 10],
[2, 2, 3, 5, 8, 9],
[1, 1, 2, 4, 7, 8]],
dtype='uint8'))
class TestBuildAugPipeline(object):
"""Test sol.nets.transform.build_pipeline()."""
def test_build_pipeline(self):
config = {'training_augmentation':
{'p': 0.75,
'augmentations':
{'oneof':
{'normalize': {},
'rotate':
{'border_mode': 'reflect',
'limit': 45}
},
'horizontalflip': {'p': 0.5}
}
},
'validation_augmentation':
{'augmentations':
{'horizontalflip': {'p': 0.5}
}
}
}
train_augs, val_augs = build_pipeline(config)
assert isinstance(train_augs.transforms[0], OneOf)
assert isinstance(train_augs.transforms[1], HorizontalFlip)
assert train_augs.p == 0.75
assert isinstance(train_augs.transforms[0].transforms[0], Normalize)
assert isinstance(train_augs.transforms[0].transforms[1], Rotate)
assert train_augs.transforms[0].p == 0.5
assert train_augs.transforms[0].transforms[0].p == 1
assert not train_augs.transforms[0].transforms[0].always_apply
assert train_augs.transforms[0].transforms[1].limit == (-45, 45)
assert train_augs.transforms[0].transforms[1].border_mode == 'reflect'
assert isinstance(val_augs, Compose)
assert isinstance(val_augs.transforms[0], HorizontalFlip)
# test running the pipeline
arr = np.array([[3, 5, 3],
[5, 8, 10],
[1, 3, 8]])
train_result = train_augs(image=arr)
# make sure this gave a 2D numpy array out in a dict with key 'image'
assert len(train_result['image'].shape) == 2
| 2,068 |
453 | <reponame>The0x539/wasp
/* Retrieve event.
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by <NAME> <<EMAIL>>, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stddef.h>
#include <string.h>
#include "thread_dbP.h"
td_err_e
td_thr_event_getmsg (const td_thrhandle_t *th, td_event_msg_t *msg)
{
td_eventbuf_t event;
LOG ("td_thr_event_getmsg");
/* Read the even structure from the target. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct, p_eventbuf)),
&event, sizeof (td_eventbuf_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Check whether an event occurred. */
if (event.eventnum == TD_EVENT_NONE)
/* Nothing. */
return TD_NOMSG;
/* Fill the user's data structure. */
msg->event = event.eventnum;
msg->th_p = th;
msg->msg.data = (uintptr_t) event.eventdata;
/* And clear the event message in the target. */
memset (&event, '\0', sizeof (td_eventbuf_t));
if (ps_pdwrite (th->th_ta_p->ph,
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct, p_eventbuf)),
&event, sizeof (td_eventbuf_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
}
| 702 |
410 | /* SPDX-License-Identifier: BSD-2-Clause */
/*******************************************************************************
* Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
* All rights reserved.
*******************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include "tss2_fapi.h"
#include "test-fapi.h"
#define LOGMODULE test
#include "util/log.h"
#include "util/aux_util.h"
#define OBJECT_PATH "HS/SRK/mySignKey"
#define USER_DATA "my user data"
#define DESCRIPTION "PolicyAuthorize"
/** Test the FAPI functions for PolicyAuthoirze with signing.
*
* Tested FAPI commands:
* - Fapi_Provision()
* - Fapi_SetBranchCB()
* - Fapi_Import()
* - Fapi_CreateKey()
* - Fapi_Sign()
* - Fapi_List()
* - Fapi_Delete()
*
* Tested Policies:
* - PolicyNameHash
* - PolicyAuthorize
* - PolicyCpHash (Not entered, only as alternative branch)
*
* @param[in,out] context The FAPI_CONTEXT.
* @retval EXIT_FAILURE
* @retval EXIT_SUCCESS
*/
int
test_fapi_key_create_policy_authorize_pem_sign(FAPI_CONTEXT *context)
{
TSS2_RC r;
char *policy_pcr = "/policy/pol_pcr";
#ifdef TEST_ECC
char *policy_file_pcr = TOP_SOURCEDIR "/test/data/fapi/policy/pol_pcr16_0_ecc_authorized.json";
char *policy_file_authorize = TOP_SOURCEDIR "/test/data/fapi/policy/pol_authorize_ecc_pem.json";
#else
char *policy_file_pcr = TOP_SOURCEDIR "/test/data/fapi/policy/pol_pcr16_0_rsa_authorized.json";
char *policy_file_authorize = TOP_SOURCEDIR "/test/data/fapi/policy/pol_authorize_rsa_pem.json";
#endif
char *policy_name_authorize = "/policy/pol_authorize";
// uint8_t policyRef[] = { 1, 2, 3, 4, 5 };
FILE *stream = NULL;
char *json_policy = NULL;
long policy_size;
uint8_t *signature = NULL;
char *publicKey = NULL;
char *pathList = NULL;
r = Fapi_Provision(context, NULL, NULL, NULL);
goto_if_error(r, "Error Fapi_Provision", error);
r = pcr_reset(context, 16);
goto_if_error(r, "Error pcr_reset", error);
/* Read in the first policy */
stream = fopen(policy_file_pcr, "r");
if (!stream) {
LOG_ERROR("File %s does not exist", policy_file_pcr);
goto error;
}
fseek(stream, 0L, SEEK_END);
policy_size = ftell(stream);
fclose(stream);
json_policy = malloc(policy_size + 1);
goto_if_null(json_policy,
"Could not allocate memory for the JSON policy",
TSS2_FAPI_RC_MEMORY, error);
stream = fopen(policy_file_pcr, "r");
ssize_t ret = read(fileno(stream), json_policy, policy_size);
if (ret != policy_size) {
LOG_ERROR("IO error %s.", policy_file_pcr);
goto error;
}
json_policy[policy_size] = '\0';
r = Fapi_Import(context, policy_pcr, json_policy);
SAFE_FREE(json_policy);
goto_if_error(r, "Error Fapi_List", error);
/* Read in the authorize policy */
stream = fopen(policy_file_authorize, "r");
if (!stream) {
LOG_ERROR("File %s does not exist", policy_file_authorize);
goto error;
}
fseek(stream, 0L, SEEK_END);
policy_size = ftell(stream);
fclose(stream);
json_policy = malloc(policy_size + 1);
goto_if_null(json_policy,
"Could not allocate memory for the JSON policy",
TSS2_FAPI_RC_MEMORY, error);
stream = fopen(policy_file_authorize, "r");
ret = read(fileno(stream), json_policy, policy_size);
if (ret != policy_size) {
LOG_ERROR("IO error %s.", policy_file_authorize);
goto error;
}
json_policy[policy_size] = '\0';
r = Fapi_Import(context, policy_name_authorize, json_policy);
SAFE_FREE(json_policy);
goto_if_error(r, "Error Fapi_Import", error);
/* Create key and use them to authorize the policy */
r = Fapi_CreateKey(context, "HS/SRK/myPolicySignKey", "sign,noDa",
"", NULL);
goto_if_error(r, "Error Fapi_CreateKey", error);
/* Create the actual key */
r = Fapi_CreateKey(context, OBJECT_PATH, "sign, noda",
policy_name_authorize, NULL);
goto_if_error(r, "Error Fapi_CreateKey", error);
/* Use the key */
size_t signatureSize = 0;
TPM2B_DIGEST digest = {
.size = 32,
.buffer = {
0x67, 0x68, 0x03, 0x3e, 0x21, 0x64, 0x68, 0x24, 0x7b, 0xd0,
0x31, 0xa0, 0xa2, 0xd9, 0x87, 0x6d, 0x79, 0x81, 0x8f, 0x8f,
0x31, 0xa0, 0xa2, 0xd9, 0x87, 0x6d, 0x79, 0x81, 0x8f, 0x8f,
0x41, 0x42
}
};
r = Fapi_Sign(context, OBJECT_PATH, NULL,
&digest.buffer[0], digest.size, &signature, &signatureSize,
&publicKey, NULL);
goto_if_error(r, "Error Fapi_Sign", error);
ASSERT(signature != NULL);
ASSERT(publicKey != NULL);
LOG_INFO("PublicKey: %s", publicKey);
ASSERT(strstr(publicKey, "BEGIN PUBLIC KEY"));
/* Cleanup */
r = Fapi_Delete(context, "/");
goto_if_error(r, "Error Fapi_Delete", error);
SAFE_FREE(signature);
SAFE_FREE(publicKey);
return EXIT_SUCCESS;
error:
Fapi_Delete(context, "/");
SAFE_FREE(json_policy);
SAFE_FREE(signature);
SAFE_FREE(publicKey);
SAFE_FREE(pathList);
Fapi_Delete(context, "/");
return EXIT_FAILURE;
}
int
test_invoke_fapi(FAPI_CONTEXT *fapi_context)
{
return test_fapi_key_create_policy_authorize_pem_sign(fapi_context);
}
| 2,431 |
1,750 | <reponame>0xflotus/Typhoon
////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Typhoon Framework Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
#import <Typhoon/Typhoon.h>
static NSString* const kTyphoonNibLoaderSpecifiedViewControllerIdentifier = @"TyphoonNibLoaderSpecifiedViewController";
static NSString* const kTyphoonNibLoaderUnspecifiedViewControllerIdentifier = @"TyphoonNibLoaderUnspecifiedViewController";
@interface TyphoonNibLoaderAssembly : TyphoonAssembly
- (id)specifiedViewController;
- (id)unspecifiedViewController;
@end
| 214 |
529 | <reponame>PervasiveDigital/netmf-interpreter<gh_stars>100-1000
/* crypto/engine/hw_ubsec.c */
/* Written by <NAME> (<EMAIL>) for the OpenSSL
* project 2000.
*
* Cloned shamelessly by <NAME>.
*/
/* ====================================================================
* Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* <EMAIL>.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED 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 OpenSSL PROJECT OR
* ITS 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 product includes cryptographic software written by <NAME>
* (<EMAIL>). This product includes software written by <NAME> (<EMAIL>).
*
*/
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/dso.h>
#include <openssl/engine.h>
#ifdef OPENSSL_SYS_WINDOWS
#include <stdio.h>
#include <string.h>
#endif
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
#include <openssl/bn.h>
#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_UBSEC
#ifdef FLAT_INC
#include "hw_ubsec.h"
#else
#include "vendor_defns/hw_ubsec.h"
#endif
#define UBSEC_LIB_NAME "ubsec engine"
#include "e_ubsec_err.cpp"
#define FAIL_TO_SOFTWARE -15
static int ubsec_destroy(ENGINE *e);
static int ubsec_init(ENGINE *e);
static int ubsec_finish(ENGINE *e);
static int ubsec_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
static int ubsec_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx);
#ifndef OPENSSL_NO_RSA
static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *q, const BIGNUM *dp,
const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx);
static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
#endif
#ifndef OPENSSL_NO_DSA
#ifdef NOT_USED
static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
BN_CTX *ctx, BN_MONT_CTX *in_mont);
static int ubsec_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx);
#endif
static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa);
#endif
#ifndef OPENSSL_NO_DH
static int ubsec_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx);
static int ubsec_dh_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
static int ubsec_dh_generate_key(DH *dh);
#endif
#ifdef NOT_USED
static int ubsec_rand_bytes(unsigned char *buf, int num);
static int ubsec_rand_status(void);
#endif
#define UBSEC_CMD_SO_PATH ENGINE_CMD_BASE
static const ENGINE_CMD_DEFN ubsec_cmd_defns[] = {
{UBSEC_CMD_SO_PATH,
"SO_PATH",
"Specifies the path to the 'ubsec' shared library",
ENGINE_CMD_FLAG_STRING},
{0, NULL, NULL, 0}
};
#ifndef OPENSSL_NO_RSA
/* Our internal RSA_METHOD that we provide pointers to */
static RSA_METHOD ubsec_rsa =
{
"UBSEC RSA method",
NULL,
NULL,
NULL,
NULL,
ubsec_rsa_mod_exp,
ubsec_mod_exp_mont,
NULL,
NULL,
0,
NULL,
NULL,
NULL,
NULL
};
#endif
#ifndef OPENSSL_NO_DSA
/* Our internal DSA_METHOD that we provide pointers to */
static DSA_METHOD ubsec_dsa =
{
"UBSEC DSA method",
ubsec_dsa_do_sign, /* dsa_do_sign */
NULL, /* dsa_sign_setup */
ubsec_dsa_verify, /* dsa_do_verify */
NULL, /* ubsec_dsa_mod_exp */ /* dsa_mod_exp */
NULL, /* ubsec_mod_exp_dsa */ /* bn_mod_exp */
NULL, /* init */
NULL, /* finish */
0, /* flags */
NULL, /* app_data */
NULL, /* dsa_paramgen */
NULL /* dsa_keygen */
};
#endif
#ifndef OPENSSL_NO_DH
/* Our internal DH_METHOD that we provide pointers to */
static DH_METHOD ubsec_dh =
{
"UBSEC DH method",
ubsec_dh_generate_key,
ubsec_dh_compute_key,
ubsec_mod_exp_dh,
NULL,
NULL,
0,
NULL,
NULL
};
#endif
/* Constants used when creating the ENGINE */
static const char *engine_ubsec_id = "ubsec";
static const char *engine_ubsec_name = "UBSEC hardware engine support";
/* This internal function is used by ENGINE_ubsec() and possibly by the
* "dynamic" ENGINE support too */
static int bind_helper(ENGINE *e)
{
#ifndef OPENSSL_NO_RSA
const RSA_METHOD *meth1;
#endif
#ifndef OPENSSL_NO_DH
#ifndef HAVE_UBSEC_DH
const DH_METHOD *meth3;
#endif /* HAVE_UBSEC_DH */
#endif
if(!ENGINE_set_id(e, engine_ubsec_id) ||
!ENGINE_set_name(e, engine_ubsec_name) ||
#ifndef OPENSSL_NO_RSA
!ENGINE_set_RSA(e, &ubsec_rsa) ||
#endif
#ifndef OPENSSL_NO_DSA
!ENGINE_set_DSA(e, &ubsec_dsa) ||
#endif
#ifndef OPENSSL_NO_DH
!ENGINE_set_DH(e, &ubsec_dh) ||
#endif
!ENGINE_set_destroy_function(e, ubsec_destroy) ||
!ENGINE_set_init_function(e, ubsec_init) ||
!ENGINE_set_finish_function(e, ubsec_finish) ||
!ENGINE_set_ctrl_function(e, (ENGINE_CTRL_FUNC_PTR)ubsec_ctrl) ||
!ENGINE_set_cmd_defns(e, ubsec_cmd_defns))
return 0;
#ifndef OPENSSL_NO_RSA
/* We know that the "PKCS1_SSLeay()" functions hook properly
* to the Broadcom-specific mod_exp and mod_exp_crt so we use
* those functions. NB: We don't use ENGINE_openssl() or
* anything "more generic" because something like the RSAref
* code may not hook properly, and if you own one of these
* cards then you have the right to do RSA operations on it
* anyway! */
meth1 = RSA_PKCS1_SSLeay();
ubsec_rsa.rsa_pub_enc = meth1->rsa_pub_enc;
ubsec_rsa.rsa_pub_dec = meth1->rsa_pub_dec;
ubsec_rsa.rsa_priv_enc = meth1->rsa_priv_enc;
ubsec_rsa.rsa_priv_dec = meth1->rsa_priv_dec;
#endif
#ifndef OPENSSL_NO_DH
#ifndef HAVE_UBSEC_DH
/* Much the same for Diffie-Hellman */
meth3 = DH_OpenSSL();
ubsec_dh.generate_key = meth3->generate_key;
ubsec_dh.compute_key = meth3->compute_key;
#endif /* HAVE_UBSEC_DH */
#endif
/* Ensure the ubsec error handling is set up */
ERR_load_UBSEC_strings();
return 1;
}
#ifdef OPENSSL_NO_DYNAMIC_ENGINE
static ENGINE *engine_ubsec(void)
{
ENGINE *ret = ENGINE_new();
if(!ret)
return NULL;
if(!bind_helper(ret))
{
ENGINE_free(ret);
return NULL;
}
return ret;
}
void ENGINE_load_ubsec(void)
{
/* Copied from eng_[openssl|dyn].c */
ENGINE *toadd = engine_ubsec();
if(!toadd) return;
ENGINE_add(toadd);
ENGINE_free(toadd);
ERR_clear_error();
}
#endif
/* This is a process-global DSO handle used for loading and unloading
* the UBSEC library. NB: This is only set (or unset) during an
* init() or finish() call (reference counts permitting) and they're
* operating with global locks, so this should be thread-safe
* implicitly. */
static DSO *ubsec_dso = NULL;
/* These are the function pointers that are (un)set when the library has
* successfully (un)loaded. */
static t_UBSEC_ubsec_bytes_to_bits *p_UBSEC_ubsec_bytes_to_bits = NULL;
static t_UBSEC_ubsec_bits_to_bytes *p_UBSEC_ubsec_bits_to_bytes = NULL;
static t_UBSEC_ubsec_open *p_UBSEC_ubsec_open = NULL;
static t_UBSEC_ubsec_close *p_UBSEC_ubsec_close = NULL;
#ifndef OPENSSL_NO_DH
static t_UBSEC_diffie_hellman_generate_ioctl
*p_UBSEC_diffie_hellman_generate_ioctl = NULL;
static t_UBSEC_diffie_hellman_agree_ioctl *p_UBSEC_diffie_hellman_agree_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_RSA
static t_UBSEC_rsa_mod_exp_ioctl *p_UBSEC_rsa_mod_exp_ioctl = NULL;
static t_UBSEC_rsa_mod_exp_crt_ioctl *p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_DSA
static t_UBSEC_dsa_sign_ioctl *p_UBSEC_dsa_sign_ioctl = NULL;
static t_UBSEC_dsa_verify_ioctl *p_UBSEC_dsa_verify_ioctl = NULL;
#endif
static t_UBSEC_math_accelerate_ioctl *p_UBSEC_math_accelerate_ioctl = NULL;
static t_UBSEC_rng_ioctl *p_UBSEC_rng_ioctl = NULL;
static t_UBSEC_max_key_len_ioctl *p_UBSEC_max_key_len_ioctl = NULL;
static int max_key_len = 1024; /* ??? */
/*
* These are the static string constants for the DSO file name and the function
* symbol names to bind to.
*/
static const char *UBSEC_LIBNAME = NULL;
static const char *get_UBSEC_LIBNAME(void)
{
if(UBSEC_LIBNAME)
return UBSEC_LIBNAME;
return "ubsec";
}
static void free_UBSEC_LIBNAME(void)
{
if(UBSEC_LIBNAME)
OPENSSL_free((void*)UBSEC_LIBNAME);
UBSEC_LIBNAME = NULL;
}
static long set_UBSEC_LIBNAME(const char *name)
{
free_UBSEC_LIBNAME();
return (((UBSEC_LIBNAME = BUF_strdup(name)) != NULL) ? 1 : 0);
}
static const char *UBSEC_F1 = "ubsec_bytes_to_bits";
static const char *UBSEC_F2 = "ubsec_bits_to_bytes";
static const char *UBSEC_F3 = "ubsec_open";
static const char *UBSEC_F4 = "ubsec_close";
#ifndef OPENSSL_NO_DH
static const char *UBSEC_F5 = "diffie_hellman_generate_ioctl";
static const char *UBSEC_F6 = "diffie_hellman_agree_ioctl";
#endif
/* #ifndef OPENSSL_NO_RSA */
static const char *UBSEC_F7 = "rsa_mod_exp_ioctl";
static const char *UBSEC_F8 = "rsa_mod_exp_crt_ioctl";
/* #endif */
#ifndef OPENSSL_NO_DSA
static const char *UBSEC_F9 = "dsa_sign_ioctl";
static const char *UBSEC_F10 = "dsa_verify_ioctl";
#endif
static const char *UBSEC_F11 = "math_accelerate_ioctl";
static const char *UBSEC_F12 = "rng_ioctl";
static const char *UBSEC_F13 = "ubsec_max_key_len_ioctl";
/* Destructor (complements the "ENGINE_ubsec()" constructor) */
static int ubsec_destroy(ENGINE *e)
{
free_UBSEC_LIBNAME();
ERR_unload_UBSEC_strings();
return 1;
}
/* (de)initialisation functions. */
static int ubsec_init(ENGINE *e)
{
t_UBSEC_ubsec_bytes_to_bits *p1;
t_UBSEC_ubsec_bits_to_bytes *p2;
t_UBSEC_ubsec_open *p3;
t_UBSEC_ubsec_close *p4;
#ifndef OPENSSL_NO_DH
t_UBSEC_diffie_hellman_generate_ioctl *p5;
t_UBSEC_diffie_hellman_agree_ioctl *p6;
#endif
/* #ifndef OPENSSL_NO_RSA */
t_UBSEC_rsa_mod_exp_ioctl *p7;
t_UBSEC_rsa_mod_exp_crt_ioctl *p8;
/* #endif */
#ifndef OPENSSL_NO_DSA
t_UBSEC_dsa_sign_ioctl *p9;
t_UBSEC_dsa_verify_ioctl *p10;
#endif
t_UBSEC_math_accelerate_ioctl *p11;
t_UBSEC_rng_ioctl *p12;
t_UBSEC_max_key_len_ioctl *p13;
int fd = 0;
if(ubsec_dso != NULL)
{
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_ALREADY_LOADED);
goto err;
}
/*
* Attempt to load libubsec.so/ubsec.dll/whatever.
*/
ubsec_dso = DSO_load(NULL, get_UBSEC_LIBNAME(), NULL, 0);
if(ubsec_dso == NULL)
{
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_DSO_FAILURE);
goto err;
}
if (
!(p1 = (t_UBSEC_ubsec_bytes_to_bits *) DSO_bind_func(ubsec_dso, UBSEC_F1)) ||
!(p2 = (t_UBSEC_ubsec_bits_to_bytes *) DSO_bind_func(ubsec_dso, UBSEC_F2)) ||
!(p3 = (t_UBSEC_ubsec_open *) DSO_bind_func(ubsec_dso, UBSEC_F3)) ||
!(p4 = (t_UBSEC_ubsec_close *) DSO_bind_func(ubsec_dso, UBSEC_F4)) ||
#ifndef OPENSSL_NO_DH
!(p5 = (t_UBSEC_diffie_hellman_generate_ioctl *)
DSO_bind_func(ubsec_dso, UBSEC_F5)) ||
!(p6 = (t_UBSEC_diffie_hellman_agree_ioctl *)
DSO_bind_func(ubsec_dso, UBSEC_F6)) ||
#endif
/* #ifndef OPENSSL_NO_RSA */
!(p7 = (t_UBSEC_rsa_mod_exp_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F7)) ||
!(p8 = (t_UBSEC_rsa_mod_exp_crt_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F8)) ||
/* #endif */
#ifndef OPENSSL_NO_DSA
!(p9 = (t_UBSEC_dsa_sign_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F9)) ||
!(p10 = (t_UBSEC_dsa_verify_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F10)) ||
#endif
!(p11 = (t_UBSEC_math_accelerate_ioctl *)
DSO_bind_func(ubsec_dso, UBSEC_F11)) ||
!(p12 = (t_UBSEC_rng_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F12)) ||
!(p13 = (t_UBSEC_max_key_len_ioctl *) DSO_bind_func(ubsec_dso, UBSEC_F13)))
{
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_DSO_FAILURE);
goto err;
}
/* Copy the pointers */
p_UBSEC_ubsec_bytes_to_bits = p1;
p_UBSEC_ubsec_bits_to_bytes = p2;
p_UBSEC_ubsec_open = p3;
p_UBSEC_ubsec_close = p4;
#ifndef OPENSSL_NO_DH
p_UBSEC_diffie_hellman_generate_ioctl = p5;
p_UBSEC_diffie_hellman_agree_ioctl = p6;
#endif
#ifndef OPENSSL_NO_RSA
p_UBSEC_rsa_mod_exp_ioctl = p7;
p_UBSEC_rsa_mod_exp_crt_ioctl = p8;
#endif
#ifndef OPENSSL_NO_DSA
p_UBSEC_dsa_sign_ioctl = p9;
p_UBSEC_dsa_verify_ioctl = p10;
#endif
p_UBSEC_math_accelerate_ioctl = p11;
p_UBSEC_rng_ioctl = p12;
p_UBSEC_max_key_len_ioctl = p13;
/* Perform an open to see if there's actually any unit running. */
if (((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) > 0) && (p_UBSEC_max_key_len_ioctl(fd, &max_key_len) == 0))
{
p_UBSEC_ubsec_close(fd);
return 1;
}
else
{
UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
}
err:
if(ubsec_dso)
DSO_free(ubsec_dso);
ubsec_dso = NULL;
p_UBSEC_ubsec_bytes_to_bits = NULL;
p_UBSEC_ubsec_bits_to_bytes = NULL;
p_UBSEC_ubsec_open = NULL;
p_UBSEC_ubsec_close = NULL;
#ifndef OPENSSL_NO_DH
p_UBSEC_diffie_hellman_generate_ioctl = NULL;
p_UBSEC_diffie_hellman_agree_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_RSA
p_UBSEC_rsa_mod_exp_ioctl = NULL;
p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_DSA
p_UBSEC_dsa_sign_ioctl = NULL;
p_UBSEC_dsa_verify_ioctl = NULL;
#endif
p_UBSEC_math_accelerate_ioctl = NULL;
p_UBSEC_rng_ioctl = NULL;
p_UBSEC_max_key_len_ioctl = NULL;
return 0;
}
static int ubsec_finish(ENGINE *e)
{
free_UBSEC_LIBNAME();
if(ubsec_dso == NULL)
{
UBSECerr(UBSEC_F_UBSEC_FINISH, UBSEC_R_NOT_LOADED);
return 0;
}
if(!DSO_free(ubsec_dso))
{
UBSECerr(UBSEC_F_UBSEC_FINISH, UBSEC_R_DSO_FAILURE);
return 0;
}
ubsec_dso = NULL;
p_UBSEC_ubsec_bytes_to_bits = NULL;
p_UBSEC_ubsec_bits_to_bytes = NULL;
p_UBSEC_ubsec_open = NULL;
p_UBSEC_ubsec_close = NULL;
#ifndef OPENSSL_NO_DH
p_UBSEC_diffie_hellman_generate_ioctl = NULL;
p_UBSEC_diffie_hellman_agree_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_RSA
p_UBSEC_rsa_mod_exp_ioctl = NULL;
p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
#endif
#ifndef OPENSSL_NO_DSA
p_UBSEC_dsa_sign_ioctl = NULL;
p_UBSEC_dsa_verify_ioctl = NULL;
#endif
p_UBSEC_math_accelerate_ioctl = NULL;
p_UBSEC_rng_ioctl = NULL;
p_UBSEC_max_key_len_ioctl = NULL;
return 1;
}
static int ubsec_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
{
int initialised = ((ubsec_dso == NULL) ? 0 : 1);
switch(cmd)
{
case UBSEC_CMD_SO_PATH:
if(p == NULL)
{
UBSECerr(UBSEC_F_UBSEC_CTRL,ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
if(initialised)
{
UBSECerr(UBSEC_F_UBSEC_CTRL,UBSEC_R_ALREADY_LOADED);
return 0;
}
return set_UBSEC_LIBNAME((const char *)p);
default:
break;
}
UBSECerr(UBSEC_F_UBSEC_CTRL,UBSEC_R_CTRL_COMMAND_NOT_IMPLEMENTED);
return 0;
}
static int ubsec_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx)
{
int y_len = 0;
int fd;
if(ubsec_dso == NULL)
{
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_NOT_LOADED);
return 0;
}
/* Check if hardware can't handle this argument. */
y_len = BN_num_bits(m);
if (y_len > max_key_len) {
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return BN_mod_exp(r, a, p, m, ctx);
}
if(!bn_wexpand(r, m->top))
{
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_BN_EXPAND_FAIL);
return 0;
}
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
fd = 0;
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_UNIT_FAILURE);
return BN_mod_exp(r, a, p, m, ctx);
}
if (p_UBSEC_rsa_mod_exp_ioctl(fd, (unsigned char *)a->d, BN_num_bits(a),
(unsigned char *)m->d, BN_num_bits(m), (unsigned char *)p->d,
BN_num_bits(p), (unsigned char *)r->d, &y_len) != 0)
{
UBSECerr(UBSEC_F_UBSEC_MOD_EXP, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
return BN_mod_exp(r, a, p, m, ctx);
}
p_UBSEC_ubsec_close(fd);
r->top = (BN_num_bits(m)+BN_BITS2-1)/BN_BITS2;
return 1;
}
#ifndef OPENSSL_NO_RSA
static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
{
int to_return = 0;
if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
{
UBSECerr(UBSEC_F_UBSEC_RSA_MOD_EXP, UBSEC_R_MISSING_KEY_COMPONENTS);
goto err;
}
to_return = ubsec_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1,
rsa->dmq1, rsa->iqmp, ctx);
if (to_return == FAIL_TO_SOFTWARE)
{
/*
* Do in software as hardware failed.
*/
const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
to_return = (*meth->rsa_mod_exp)(r0, I, rsa, ctx);
}
err:
return to_return;
}
static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *q, const BIGNUM *dp,
const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx)
{
int y_len,
fd;
y_len = BN_num_bits(p) + BN_num_bits(q);
/* Check if hardware can't handle this argument. */
if (y_len > max_key_len) {
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return FAIL_TO_SOFTWARE;
}
if (!bn_wexpand(r, p->top + q->top + 1)) {
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_BN_EXPAND_FAIL);
return 0;
}
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
fd = 0;
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_UNIT_FAILURE);
return FAIL_TO_SOFTWARE;
}
if (p_UBSEC_rsa_mod_exp_crt_ioctl(fd,
(unsigned char *)a->d, BN_num_bits(a),
(unsigned char *)qinv->d, BN_num_bits(qinv),
(unsigned char *)dp->d, BN_num_bits(dp),
(unsigned char *)p->d, BN_num_bits(p),
(unsigned char *)dq->d, BN_num_bits(dq),
(unsigned char *)q->d, BN_num_bits(q),
(unsigned char *)r->d, &y_len) != 0) {
UBSECerr(UBSEC_F_UBSEC_MOD_EXP_CRT, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
return FAIL_TO_SOFTWARE;
}
p_UBSEC_ubsec_close(fd);
r->top = (BN_num_bits(p) + BN_num_bits(q) + BN_BITS2 - 1)/BN_BITS2;
return 1;
}
#endif
#ifndef OPENSSL_NO_DSA
#ifdef NOT_USED
static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
BN_CTX *ctx, BN_MONT_CTX *in_mont)
{
BIGNUM t;
int to_return = 0;
BN_init(&t);
/* let rr = a1 ^ p1 mod m */
if (!ubsec_mod_exp(rr,a1,p1,m,ctx)) goto end;
/* let t = a2 ^ p2 mod m */
if (!ubsec_mod_exp(&t,a2,p2,m,ctx)) goto end;
/* let rr = rr * t mod m */
if (!BN_mod_mul(rr,rr,&t,m,ctx)) goto end;
to_return = 1;
end:
BN_free(&t);
return to_return;
}
static int ubsec_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx)
{
return ubsec_mod_exp(r, a, p, m, ctx);
}
#endif
#endif
#ifndef OPENSSL_NO_RSA
/*
* This function is aliased to mod_exp (with the mont stuff dropped).
*/
static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
{
int ret = 0;
/* Do in software if the key is too large for the hardware. */
if (BN_num_bits(m) > max_key_len)
{
const RSA_METHOD *meth = RSA_PKCS1_SSLeay();
ret = (*meth->bn_mod_exp)(r, a, p, m, ctx, m_ctx);
}
else
{
ret = ubsec_mod_exp(r, a, p, m, ctx);
}
return ret;
}
#endif
#ifndef OPENSSL_NO_DH
/* This function is aliased to mod_exp (with the dh and mont dropped). */
static int ubsec_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a,
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
BN_MONT_CTX *m_ctx)
{
return ubsec_mod_exp(r, a, p, m, ctx);
}
#endif
#ifndef OPENSSL_NO_DSA
static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
DSA_SIG *to_return = NULL;
int s_len = 160, r_len = 160, d_len, fd;
BIGNUM m, *r=NULL, *s=NULL;
BN_init(&m);
s = BN_new();
r = BN_new();
if ((s == NULL) || (r==NULL))
goto err;
d_len = p_UBSEC_ubsec_bytes_to_bits((unsigned char *)dgst, dlen);
if(!bn_wexpand(r, (160+BN_BITS2-1)/BN_BITS2) ||
(!bn_wexpand(s, (160+BN_BITS2-1)/BN_BITS2))) {
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
goto err;
}
if (BN_bin2bn(dgst,dlen,&m) == NULL) {
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
goto err;
}
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
const DSA_METHOD *meth;
fd = 0;
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_UNIT_FAILURE);
meth = DSA_OpenSSL();
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
goto err;
}
if (p_UBSEC_dsa_sign_ioctl(fd, 0, /* compute hash before signing */
(unsigned char *)dgst, d_len,
NULL, 0, /* compute random value */
(unsigned char *)dsa->p->d, BN_num_bits(dsa->p),
(unsigned char *)dsa->q->d, BN_num_bits(dsa->q),
(unsigned char *)dsa->g->d, BN_num_bits(dsa->g),
(unsigned char *)dsa->priv_key->d, BN_num_bits(dsa->priv_key),
(unsigned char *)r->d, &r_len,
(unsigned char *)s->d, &s_len ) != 0) {
const DSA_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
meth = DSA_OpenSSL();
to_return = meth->dsa_do_sign(dgst, dlen, dsa);
goto err;
}
p_UBSEC_ubsec_close(fd);
r->top = (160+BN_BITS2-1)/BN_BITS2;
s->top = (160+BN_BITS2-1)/BN_BITS2;
to_return = DSA_SIG_new();
if(to_return == NULL) {
UBSECerr(UBSEC_F_UBSEC_DSA_DO_SIGN, UBSEC_R_BN_EXPAND_FAIL);
goto err;
}
to_return->r = r;
to_return->s = s;
err:
if (!to_return) {
if (r) BN_free(r);
if (s) BN_free(s);
}
BN_clear_free(&m);
return to_return;
}
static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa)
{
int v_len, d_len;
int to_return = 0;
int fd;
BIGNUM v, *pv = &v;
BN_init(&v);
if(!bn_wexpand(pv, dsa->p->top)) {
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_BN_EXPAND_FAIL);
goto err;
}
v_len = BN_num_bits(dsa->p);
d_len = p_UBSEC_ubsec_bytes_to_bits((unsigned char *)dgst, dgst_len);
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {
const DSA_METHOD *meth;
fd = 0;
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_UNIT_FAILURE);
meth = DSA_OpenSSL();
to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
goto err;
}
if (p_UBSEC_dsa_verify_ioctl(fd, 0, /* compute hash before signing */
(unsigned char *)dgst, d_len,
(unsigned char *)dsa->p->d, BN_num_bits(dsa->p),
(unsigned char *)dsa->q->d, BN_num_bits(dsa->q),
(unsigned char *)dsa->g->d, BN_num_bits(dsa->g),
(unsigned char *)dsa->pub_key->d, BN_num_bits(dsa->pub_key),
(unsigned char *)sig->r->d, BN_num_bits(sig->r),
(unsigned char *)sig->s->d, BN_num_bits(sig->s),
(unsigned char *)v.d, &v_len) != 0) {
const DSA_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
meth = DSA_OpenSSL();
to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
goto err;
}
p_UBSEC_ubsec_close(fd);
to_return = 1;
err:
BN_clear_free(&v);
return to_return;
}
#endif
#ifndef OPENSSL_NO_DH
static int ubsec_dh_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh)
{
int ret = -1,
k_len,
fd;
k_len = BN_num_bits(dh->p);
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
{
const DH_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_UNIT_FAILURE);
meth = DH_OpenSSL();
ret = meth->compute_key(key, pub_key, dh);
goto err;
}
if (p_UBSEC_diffie_hellman_agree_ioctl(fd,
(unsigned char *)dh->priv_key->d, BN_num_bits(dh->priv_key),
(unsigned char *)pub_key->d, BN_num_bits(pub_key),
(unsigned char *)dh->p->d, BN_num_bits(dh->p),
key, &k_len) != 0)
{
/* Hardware's a no go, failover to software */
const DH_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
meth = DH_OpenSSL();
ret = meth->compute_key(key, pub_key, dh);
goto err;
}
p_UBSEC_ubsec_close(fd);
ret = p_UBSEC_ubsec_bits_to_bytes(k_len);
err:
return ret;
}
static int ubsec_dh_generate_key(DH *dh)
{
int ret = 0,
random_bits = 0,
pub_key_len = 0,
priv_key_len = 0,
fd;
BIGNUM *pub_key = NULL;
BIGNUM *priv_key = NULL;
/*
* How many bits should Random x be? dh_key.c
* sets the range from 0 to num_bits(modulus) ???
*/
if (dh->priv_key == NULL)
{
priv_key = BN_new();
if (priv_key == NULL) goto err;
priv_key_len = BN_num_bits(dh->p);
if(bn_wexpand(priv_key, dh->p->top) == NULL) goto err;
do
if (!BN_rand_range(priv_key, dh->p)) goto err;
while (BN_is_zero(priv_key));
random_bits = BN_num_bits(priv_key);
}
else
{
priv_key = dh->priv_key;
}
if (dh->pub_key == NULL)
{
pub_key = BN_new();
pub_key_len = BN_num_bits(dh->p);
if(bn_wexpand(pub_key, dh->p->top) == NULL) goto err;
if(pub_key == NULL) goto err;
}
else
{
pub_key = dh->pub_key;
}
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
{
const DH_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DH_GENERATE_KEY, UBSEC_R_UNIT_FAILURE);
meth = DH_OpenSSL();
ret = meth->generate_key(dh);
goto err;
}
if (p_UBSEC_diffie_hellman_generate_ioctl(fd,
(unsigned char *)priv_key->d, &priv_key_len,
(unsigned char *)pub_key->d, &pub_key_len,
(unsigned char *)dh->g->d, BN_num_bits(dh->g),
(unsigned char *)dh->p->d, BN_num_bits(dh->p),
0, 0, random_bits) != 0)
{
/* Hardware's a no go, failover to software */
const DH_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_DH_GENERATE_KEY, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
meth = DH_OpenSSL();
ret = meth->generate_key(dh);
goto err;
}
p_UBSEC_ubsec_close(fd);
dh->pub_key = pub_key;
dh->pub_key->top = (pub_key_len + BN_BITS2-1) / BN_BITS2;
dh->priv_key = priv_key;
dh->priv_key->top = (priv_key_len + BN_BITS2-1) / BN_BITS2;
ret = 1;
err:
return ret;
}
#endif
#ifdef NOT_USED
static int ubsec_rand_bytes(unsigned char * buf,
int num)
{
int ret = 0,
fd;
if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)
{
const RAND_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_RAND_BYTES, UBSEC_R_UNIT_FAILURE);
num = p_UBSEC_ubsec_bits_to_bytes(num);
meth = RAND_SSLeay();
meth->seed(buf, num);
ret = meth->bytes(buf, num);
goto err;
}
num *= 8; /* bytes to bits */
if (p_UBSEC_rng_ioctl(fd,
UBSEC_RNG_DIRECT,
buf,
&num) != 0)
{
/* Hardware's a no go, failover to software */
const RAND_METHOD *meth;
UBSECerr(UBSEC_F_UBSEC_RAND_BYTES, UBSEC_R_REQUEST_FAILED);
p_UBSEC_ubsec_close(fd);
num = p_UBSEC_ubsec_bits_to_bytes(num);
meth = RAND_SSLeay();
meth->seed(buf, num);
ret = meth->bytes(buf, num);
goto err;
}
p_UBSEC_ubsec_close(fd);
ret = 1;
err:
return(ret);
}
static int ubsec_rand_status(void)
{
return 0;
}
#endif
/* This stuff is needed if this ENGINE is being compiled into a self-contained
* shared-library. */
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
static int bind_fn(ENGINE *e, const char *id)
{
if(id && (TINYCLR_SSL_STRCMP(id, engine_ubsec_id) != 0))
return 0;
if(!bind_helper(e))
return 0;
return 1;
}
IMPLEMENT_DYNAMIC_CHECK_FN()
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
#endif /* !OPENSSL_NO_HW_UBSEC */
#endif /* !OPENSSL_NO_HW */
| 17,148 |
16,761 | /*
* Copyright 2013-2018 the original author or 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
*
* https://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.alibaba.cloud.sidecar;
/**
* @author <EMAIL>
*/
public interface SidecarDiscoveryClient {
/**
* register instance.
* @param applicationName applicationName
* @param ip ip
* @param port port
*/
void registerInstance(String applicationName, String ip, Integer port);
/**
* deregister instance.
* @param applicationName applicationName
* @param ip ip
* @param port port
*/
void deregisterInstance(String applicationName, String ip, Integer port);
}
| 301 |
369 | /*This file has been prepared for Doxygen automatic documentation generation.*/
/*! \file *********************************************************************
*
* \brief Power Manager driver.
*
*
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
* - Supported devices: All AVR32 devices.
* - AppNote:
*
* \author Atmel Corporation: http://www.atmel.com \n
* Support and FAQ: http://support.atmel.no/
*
*****************************************************************************/
/* Copyright (c) 2007, Atmel Corporation All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of ATMEL may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL ``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 EXPRESSLY AND
* SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _PM_H_
#define _PM_H_
#include <avr32/io.h>
#include "compiler.h"
#include "preprocessor.h"
/*! \brief Sets the MCU in the specified sleep mode.
*
* \param mode Sleep mode:
* \arg \c AVR32_PM_SMODE_IDLE: Idle;
* \arg \c AVR32_PM_SMODE_FROZEN: Frozen;
* \arg \c AVR32_PM_SMODE_STANDBY: Standby;
* \arg \c AVR32_PM_SMODE_STOP: Stop;
* \arg \c AVR32_PM_SMODE_SHUTDOWN: Shutdown (DeepStop);
* \arg \c AVR32_PM_SMODE_STATIC: Static.
*/
#define SLEEP(mode) {__asm__ __volatile__ ("sleep "STRINGZ(mode));}
/*! \brief Gets the MCU reset cause.
*
* \param pm Base address of the Power Manager instance (i.e. &AVR32_PM).
*
* \return The MCU reset cause which can be masked with the
* \c AVR32_PM_RCAUSE_x_MASK bit-masks to isolate specific causes.
*/
#if __GNUC__
__attribute__((__always_inline__))
#endif
extern __inline__ unsigned int pm_get_reset_cause(volatile avr32_pm_t *pm)
{
return pm->rcause;
}
/*!
* \brief This function will enable the external clock mode of the oscillator 0.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_enable_osc0_ext_clock(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the crystal mode of the oscillator 0.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param fosc0 Oscillator 0 crystal frequency (Hz)
*/
extern void pm_enable_osc0_crystal(volatile avr32_pm_t *pm, unsigned int fosc0);
/*!
* \brief This function will enable the oscillator 0 to be used with a startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 0 startup time. Time is expressed in term of RCOsc periods (3-bit value)
*/
extern void pm_enable_clk0(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will disable the oscillator 0.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_disable_clk0(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the oscillator 0 to be used with no startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 0 startup time. Time is expressed in term of RCOsc periods (3-bit value) but not checked.
*/
extern void pm_enable_clk0_no_wait(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will wait until the Osc0 clock is ready.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_wait_for_clk0_ready(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the external clock mode of the oscillator 1.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_enable_osc1_ext_clock(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the crystal mode of the oscillator 1.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param fosc1 Oscillator 1 crystal frequency (Hz)
*/
extern void pm_enable_osc1_crystal(volatile avr32_pm_t *pm, unsigned int fosc1);
/*!
* \brief This function will enable the oscillator 1 to be used with a startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 1 startup time. Time is expressed in term of RCOsc periods (3-bit value)
*/
extern void pm_enable_clk1(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will disable the oscillator 1.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_disable_clk1(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the oscillator 1 to be used with no startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 1 startup time. Time is expressed in term of RCOsc periods (3-bit value) but not checked.
*/
extern void pm_enable_clk1_no_wait(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will wait until the Osc1 clock is ready.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_wait_for_clk1_ready(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the external clock mode of the 32-kHz oscillator.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_enable_osc32_ext_clock(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the crystal mode of the 32-kHz oscillator.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_enable_osc32_crystal(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the oscillator 32 to be used with a startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 32 kHz startup time. Time is expressed in term of RCOsc periods (3-bit value)
*/
extern void pm_enable_clk32(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will disable the oscillator 32.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_disable_clk32(volatile avr32_pm_t *pm);
/*!
* \brief This function will enable the oscillator 32 to be used with no startup time.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param startup Clock 32 kHz startup time. Time is expressed in term of RCOsc periods (3-bit value) but not checked.
*/
extern void pm_enable_clk32_no_wait(volatile avr32_pm_t *pm, unsigned int startup);
/*!
* \brief This function will wait until the osc32 clock is ready.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_wait_for_clk32_ready(volatile avr32_pm_t *pm);
/*!
* \brief This function will select all the power manager clocks.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pbadiv Peripheral Bus A clock divisor enable
* \param pbasel Peripheral Bus A select
* \param pbbdiv Peripheral Bus B clock divisor enable
* \param pbbsel Peripheral Bus B select
* \param hsbdiv High Speed Bus clock divisor enable (CPU clock = HSB clock)
* \param hsbsel High Speed Bus select (CPU clock = HSB clock )
*/
extern void pm_cksel(volatile avr32_pm_t *pm, unsigned int pbadiv, unsigned int pbasel, unsigned int pbbdiv, unsigned int pbbsel, unsigned int hsbdiv, unsigned int hsbsel);
/*!
* \brief This function will setup a generic clock.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param gc generic clock number (0 for gc0...)
* \param osc_or_pll Use OSC (=0) or PLL (=1)
* \param pll_osc Select Osc0/PLL0 or Osc1/PLL1
* \param diven Generic clock divisor enable
* \param div Generic clock divisor
*/
extern void pm_gc_setup(volatile avr32_pm_t *pm, unsigned int gc, unsigned int osc_or_pll, unsigned int pll_osc, unsigned int diven, unsigned int div);
/*!
* \brief This function will enable a generic clock.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param gc generic clock number (0 for gc0...)
*/
extern void pm_gc_enable(volatile avr32_pm_t *pm, unsigned int gc);
/*!
* \brief This function will disable a generic clock.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param gc generic clock number (0 for gc0...)
*/
extern void pm_gc_disable(volatile avr32_pm_t *pm, unsigned int gc);
/*!
* \brief This function will setup a PLL.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pll PLL number(0 for PLL0, 1 for PLL1)
* \param mul PLL MUL in the PLL formula
* \param div PLL DIV in the PLL formula
* \param osc OSC number (0 for osc0, 1 for osc1)
* \param lockcount PLL lockount
*/
extern void pm_pll_setup(volatile avr32_pm_t *pm, unsigned int pll, unsigned int mul, unsigned int div, unsigned int osc, unsigned int lockcount);
/*!
* \brief This function will set a PLL option.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pll PLL number(0 for PLL0, 1 for PLL1)
* \param pll_freq Set to 1 for VCO frequency range 80-180MHz, set to 0 for VCO frequency range 160-240Mhz.
* \param pll_div2 Divide the PLL output frequency by 2 (this settings does not change the FVCO value)
* \param pll_wbwdisable 1 Disable the Wide-Bandith Mode (Wide-Bandwith mode allow a faster startup time and out-of-lock time). 0 to enable the Wide-Bandith Mode.
*/
extern void pm_pll_set_option(volatile avr32_pm_t *pm, unsigned int pll, unsigned int pll_freq, unsigned int pll_div2, unsigned int pll_wbwdisable);
/*!
* \brief This function will get a PLL option.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pll PLL number(0 for PLL0, 1 for PLL1)
* \return Option
*/
extern unsigned int pm_pll_get_option(volatile avr32_pm_t *pm, unsigned int pll);
/*!
* \brief This function will enable a PLL.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pll PLL number(0 for PLL0, 1 for PLL1)
*/
extern void pm_pll_enable(volatile avr32_pm_t *pm, unsigned int pll);
/*!
* \brief This function will disable a PLL.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param pll PLL number(0 for PLL0, 1 for PLL1)
*/
extern void pm_pll_disable(volatile avr32_pm_t *pm, unsigned int pll);
/*!
* \brief This function will wait for PLL0 locked
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_wait_for_pll0_locked(volatile avr32_pm_t *pm);
/*!
* \brief This function will wait for PLL1 locked
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
*/
extern void pm_wait_for_pll1_locked(volatile avr32_pm_t *pm);
/*!
* \brief This function will switch the power manager main clock.
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param clock Clock to be switched on. AVR32_PM_MCSEL_SLOW for RCOsc, AVR32_PM_MCSEL_OSC0 for Osc0, AVR32_PM_MCSEL_PLL0 for PLL0.
*/
extern void pm_switch_to_clock(volatile avr32_pm_t *pm, unsigned long clock);
/*!
* \brief Switch main clock to clock Osc0 (crystal mode)
* \param pm Base address of the Power Manager (i.e. &AVR32_PM)
* \param fosc0 Oscillator 0 crystal frequency (Hz)
* \param startup Crystal 0 startup time. Time is expressed in term of RCOsc periods (3-bit value)
*/
extern void pm_switch_to_osc0(volatile avr32_pm_t *pm, unsigned int fosc0, unsigned int startup);
#endif // _PM_H_
| 4,189 |
945 | /* blas/idamax.f -- translated by f2c (version 20050501).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the command line, as in
cc *.o -lf2c -lm
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
http://www.netlib.org/f2c/libf2c.zip
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "v3p_netlib.h"
/*< integer function idamax(n,dx,incx) >*/
integer idamax_(integer *n, doublereal *dx, integer *incx)
{
/* System generated locals */
integer ret_val, i__1;
doublereal d__1;
/* Local variables */
integer i__, ix;
doublereal dmax__;
/* finds the index of element having max. absolute value. */
/* j<NAME>, linpack, 3/11/78. */
/* modified 3/93 to return if incx .le. 0. */
/* modified 12/3/93, array(1) declarations changed to array(*) */
/*< double precision dx(*),dmax >*/
/*< integer i,incx,ix,n >*/
/*< idamax = 0 >*/
/* Parameter adjustments */
--dx;
/* Function Body */
ret_val = 0;
/*< if( n.lt.1 .or. incx.le.0 ) return >*/
if (*n < 1 || *incx <= 0) {
return ret_val;
}
/*< idamax = 1 >*/
ret_val = 1;
/*< if(n.eq.1)return >*/
if (*n == 1) {
return ret_val;
}
/*< if(incx.eq.1)go to 20 >*/
if (*incx == 1) {
goto L20;
}
/* code for increment not equal to 1 */
/*< ix = 1 >*/
ix = 1;
/*< dmax = dabs(dx(1)) >*/
dmax__ = abs(dx[1]);
/*< ix = ix + incx >*/
ix += *incx;
/*< do 10 i = 2,n >*/
i__1 = *n;
for (i__ = 2; i__ <= i__1; ++i__) {
/*< if(dabs(dx(ix)).le.dmax) go to 5 >*/
if ((d__1 = dx[ix], abs(d__1)) <= dmax__) {
goto L5;
}
/*< idamax = i >*/
ret_val = i__;
/*< dmax = dabs(dx(ix)) >*/
dmax__ = (d__1 = dx[ix], abs(d__1));
/*< 5 ix = ix + incx >*/
L5:
ix += *incx;
/*< 10 continue >*/
/* L10: */
}
/*< return >*/
return ret_val;
/* code for increment equal to 1 */
/*< 20 dmax = dabs(dx(1)) >*/
L20:
dmax__ = abs(dx[1]);
/*< do 30 i = 2,n >*/
i__1 = *n;
for (i__ = 2; i__ <= i__1; ++i__) {
/*< if(dabs(dx(i)).le.dmax) go to 30 >*/
if ((d__1 = dx[i__], abs(d__1)) <= dmax__) {
goto L30;
}
/*< idamax = i >*/
ret_val = i__;
/*< dmax = dabs(dx(i)) >*/
dmax__ = (d__1 = dx[i__], abs(d__1));
/*< 30 continue >*/
L30:
;
}
/*< return >*/
return ret_val;
/*< end >*/
} /* idamax_ */
#ifdef __cplusplus
}
#endif
| 1,532 |
934 | #include "includes/cef.h"
#include "includes/cef_handler.h"
#include "native_status_icon/native_status_icon.h"
extern CefRefPtr<ClientHandler> g_handler;
namespace appjs {
using namespace v8;
NativeStatusIcon::NativeStatusIcon(Settings* settings){
Init(settings);
}
NativeStatusIcon::~NativeStatusIcon(){
#ifdef __WIN__
Shell_NotifyIcon(NIM_DELETE, &statusIconHandle_);
#endif
}
void NativeStatusIcon::Emit(v8::Handle<Value>* args,int length){
node::MakeCallback(v8handle_, "emit", length, args);
}
void NativeStatusIcon::Emit(const char* event){
v8::Handle<Value> args[1] = { String::New(event) };
Emit(args,1);
}
void NativeStatusIcon::Emit(const char* event, v8::Handle<Value> arg){
v8::Handle<Value> args[2] = {
String::New(event),
arg
};
Emit(args,2);
}
} /* appjs */
| 306 |
456 | <gh_stars>100-1000
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020 <NAME>
// All rights reserved.
#include <djvGLTest/TextureAtlasTest.h>
#include <djvGL/TextureAtlas.h>
#include <djvImage/Data.h>
using namespace djv::Core;
using namespace djv::GL;
namespace djv
{
namespace GLTest
{
TextureAtlasTest::TextureAtlasTest(
const System::File::Path& tempPath,
const std::shared_ptr<System::Context>& context) :
ITest("djv::GLTest::TextureAtlasTest", tempPath, context)
{}
void TextureAtlasTest::run()
{
for (const auto count : { 1, 2, 0 })
{
//for (const auto type : Image::getTypeEnums())
const auto type = Image::Type::RGBA_U8;
{
{
std::stringstream ss;
ss << count;
std::stringstream ss2;
ss2 << type;
_print(ss.str() + "/" + _getText(ss2.str()));
}
TextureAtlas atlas(count, 64, type);
DJV_ASSERT(count == atlas.getTextureCount());
DJV_ASSERT(64 == atlas.getTextureSize());
DJV_ASSERT(type == atlas.getTextureType());
for (const auto i : atlas.getTextures())
{
{
std::stringstream ss;
ss << i;
_print(" ID: " + ss.str());
}
}
auto data = Image::Data::create(Image::Info(16, 16, type));
for (size_t i = 0; i < 100; ++i)
{
TextureAtlasItem item;
UID uid = atlas.addItem(data, item);
atlas.getItem(uid, item);
}
{
std::stringstream ss;
ss << std::fixed << atlas.getPercentageUsed();
_print(" Percentage used: " + ss.str());
}
}
}
}
} // namespace GLTest
} // namespace djv
| 1,376 |
1,543 | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2019-2020 CNRS
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# AUTHORS
# <NAME> - http://herve.niderb.fr
import os
import pathlib
import typing
import functools
import shutil
import zipfile
import torch
import yaml
from pyannote.audio.features import Pretrained as _Pretrained
from pyannote.pipeline import Pipeline as _Pipeline
dependencies = ['pyannote.audio', 'torch']
_HUB_REPO = 'https://github.com/pyannote/pyannote-audio-hub'
_ZIP_URL = f'{_HUB_REPO}/raw/master/{{kind}}s/{{name}}.zip'
_PRETRAINED_URL = f'{_HUB_REPO}/raw/master/pretrained.yml'
# path where pre-trained models and pipelines are downloaded and cached
_HUB_DIR = pathlib.Path(os.environ.get("PYANNOTE_AUDIO_HUB",
"~/.pyannote/hub")).expanduser().resolve()
# download pretrained.yml if needed
_PRETRAINED_YML = _HUB_DIR / 'pretrained.yml'
if not _PRETRAINED_YML.exists():
msg = (
f'Downloading list of pretrained models and pipelines '
f'to "{_PRETRAINED_YML}".'
)
print(msg)
from pyannote.audio.utils.path import mkdir_p
mkdir_p(_PRETRAINED_YML.parent)
torch.hub.download_url_to_file(_PRETRAINED_URL,
_PRETRAINED_YML,
progress=True)
def _generic(name: str,
duration: float = None,
step: float = 0.25,
batch_size: int = 32,
device: typing.Optional[typing.Union[typing.Text, torch.device]] = None,
pipeline: typing.Optional[bool] = None,
force_reload: bool = False) -> typing.Union[_Pretrained, _Pipeline]:
"""Load pretrained model or pipeline
Parameters
----------
name : str
Name of pretrained model or pipeline
duration : float, optional
Override audio chunks duration.
Defaults to the one used during training.
step : float, optional
Ratio of audio chunk duration used for the internal sliding window.
Defaults to 0.25 (i.e. 75% overlap between two consecutive windows).
Reducing this value might lead to better results (at the expense of
slower processing).
batch_size : int, optional
Batch size used for inference. Defaults to 32.
device : torch.device, optional
Device used for inference.
pipeline : bool, optional
Wrap pretrained model in a (not fully optimized) pipeline.
force_reload : bool
Whether to discard the existing cache and force a fresh download.
Defaults to use existing cache.
Returns
-------
pretrained: `Pretrained` or `Pipeline`
Usage
-----
>>> sad_pipeline = torch.hub.load('pyannote/pyannote-audio', 'sad_ami')
>>> scores = model({'audio': '/path/to/audio.wav'})
"""
model_exists = name in _MODELS
pipeline_exists = name in _PIPELINES
if model_exists and pipeline_exists:
if pipeline is None:
msg = (
f'Both a pretrained model and a pretrained pipeline called '
f'"{name}" are available. Use option "pipeline=True" to '
f'load the pipeline, and "pipeline=False" to load the model.')
raise ValueError(msg)
if pipeline:
kind = 'pipeline'
zip_url = _ZIP_URL.format(kind=kind, name=name)
sha256 = _PIPELINES[name]
return_pipeline = True
else:
kind = 'model'
zip_url = _ZIP_URL.format(kind=kind, name=name)
sha256 = _MODELS[name]
return_pipeline = False
elif pipeline_exists:
if pipeline is None:
pipeline = True
if not pipeline:
msg = (
f'Could not find any pretrained "{name}" model. '
f'A pretrained "{name}" pipeline does exist. '
f'Did you mean "pipeline=True"?'
)
raise ValueError(msg)
kind = 'pipeline'
zip_url = _ZIP_URL.format(kind=kind, name=name)
sha256 = _PIPELINES[name]
return_pipeline = True
elif model_exists:
if pipeline is None:
pipeline = False
kind = 'model'
zip_url = _ZIP_URL.format(kind=kind, name=name)
sha256 = _MODELS[name]
return_pipeline = pipeline
if name.startswith('emb_') and return_pipeline:
msg = (
f'Pretrained model "{name}" has no associated pipeline. Use '
f'"pipeline=False" or remove "pipeline" option altogether.'
)
raise ValueError(msg)
else:
msg = (
f'Could not find any pretrained model nor pipeline called "{name}".'
)
raise ValueError(msg)
if sha256 is None:
msg = (
f'Pretrained {kind} "{name}" is not available yet but will be '
f'released shortly. Stay tuned...'
)
raise NotImplementedError(msg)
pretrained_dir = _HUB_DIR / f'{kind}s'
pretrained_subdir = pretrained_dir / f'{name}'
pretrained_zip = pretrained_dir / f'{name}.zip'
if not pretrained_subdir.exists() or force_reload:
if pretrained_subdir.exists():
shutil.rmtree(pretrained_subdir)
from pyannote.audio.utils.path import mkdir_p
mkdir_p(pretrained_zip.parent)
try:
msg = (
f'Downloading pretrained {kind} "{name}" to "{pretrained_zip}".'
)
print(msg)
torch.hub.download_url_to_file(zip_url,
pretrained_zip,
hash_prefix=sha256,
progress=True)
except RuntimeError as e:
shutil.rmtree(pretrained_subdir)
msg = (
f'Failed to download pretrained {kind} "{name}".'
f'Please try again.')
raise RuntimeError(msg)
# unzip downloaded file
with zipfile.ZipFile(pretrained_zip) as z:
z.extractall(path=pretrained_dir)
if kind == 'model':
params_yml, = pretrained_subdir.glob('*/*/*/*/params.yml')
pretrained = _Pretrained(validate_dir=params_yml.parent,
duration=duration,
step=step,
batch_size=batch_size,
device=device)
if return_pipeline:
if name.startswith('sad_'):
from pyannote.audio.pipeline.speech_activity_detection import SpeechActivityDetection
pipeline = SpeechActivityDetection(scores=pretrained)
elif name.startswith('scd_'):
from pyannote.audio.pipeline.speaker_change_detection import SpeakerChangeDetection
pipeline = SpeakerChangeDetection(scores=pretrained)
elif name.startswith('ovl_'):
from pyannote.audio.pipeline.overlap_detection import OverlapDetection
pipeline = OverlapDetection(scores=pretrained)
else:
# this should never happen
msg = (
f'Pretrained model "{name}" has no associated pipeline. Use '
f'"pipeline=False" or remove "pipeline" option altogether.'
)
raise ValueError(msg)
return pipeline.load_params(params_yml)
return pretrained
elif kind == 'pipeline':
from pyannote.audio.pipeline.utils import load_pretrained_pipeline
params_yml, *_ = pretrained_subdir.glob('*/*/params.yml')
return load_pretrained_pipeline(params_yml.parent)
with open(_PRETRAINED_YML, 'r') as fp:
_pretrained = yaml.load(fp, Loader=yaml.SafeLoader)
_MODELS = _pretrained['models']
for name in _MODELS:
locals()[name] = functools.partial(_generic, name)
_PIPELINES = _pretrained['pipelines']
for name in _PIPELINES:
locals()[name] = functools.partial(_generic, name)
_SHORTCUTS = _pretrained['shortcuts']
for shortcut, name in _SHORTCUTS.items():
locals()[shortcut] = locals()[name]
| 4,137 |
1,695 | <reponame>volionamdp/NDK_OpenGLES_3_0<filename>app/src/main/cpp/sample/PBOSample.cpp
//
// Created by ByteFlow on 2019/12/26.
//
#include <GLUtils.h>
#include <gtc/matrix_transform.hpp>
#include <cstdlib>
#include <opencv2/opencv.hpp>
#include "PBOSample.h"
//#define PBO_UPLOAD
#define PBO_DOWNLOAD
#define VERTEX_POS_INDX 0
#define TEXTURE_POS_INDX 1
PBOSample::PBOSample()
{
m_ImageTextureId = GL_NONE;
m_FboTextureId = GL_NONE;
m_SamplerLoc = GL_NONE;
m_FboId = GL_NONE;
m_FboProgramObj = GL_NONE;
m_FboVertexShader = GL_NONE;
m_FboFragmentShader = GL_NONE;
m_FboSamplerLoc = GL_NONE;
m_MVPMatrixLoc = GL_NONE;
m_AngleX = 0;
m_AngleY = 0;
m_ScaleX = 1.0f;
m_ScaleY = 1.0f;
m_FrameIndex = 0;
}
PBOSample::~PBOSample()
{
NativeImageUtil::FreeNativeImage(&m_RenderImage);
}
void PBOSample::LoadImage(NativeImage *pImage)
{
LOGCATE("PBOSample::LoadImage pImage = %p", pImage->ppPlane[0]);
if (pImage)
{
m_RenderImage.width = pImage->width;
m_RenderImage.height = pImage->height;
m_RenderImage.format = pImage->format;
NativeImageUtil::CopyNativeImage(pImage, &m_RenderImage);
}
}
void PBOSample::Init()
{
if(m_ProgramObj)
return;
//顶点坐标
GLfloat vVertices[] = {
-1.0f, -1.0f, 0.0f,
1.0f, -1.0f, 0.0f,
-1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f,
};
//正常纹理坐标
GLfloat vTexCoors[] = {
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f,
};
//fbo 纹理坐标与正常纹理方向不同,原点位于左下角
GLfloat vFboTexCoors[] = {
0.0f, 0.0f,
1.0f, 0.0f,
0.0f, 1.0f,
1.0f, 1.0f,
};
GLushort indices[] = { 0, 1, 2, 1, 3, 2 };
char vShaderStr[] =
"#version 300 es \n"
"layout(location = 0) in vec4 a_position; \n"
"layout(location = 1) in vec2 a_texCoord; \n"
"uniform mat4 u_MVPMatrix; \n"
"out vec2 v_texCoord; \n"
"void main() \n"
"{ \n"
" gl_Position = u_MVPMatrix * a_position; \n"
" v_texCoord = a_texCoord; \n"
"} \n";
// 用于普通渲染的片段着色器脚本,简单纹理映射
char fShaderStr[] =
"#version 300 es\n"
"precision mediump float;\n"
"in vec2 v_texCoord;\n"
"layout(location = 0) out vec4 outColor;\n"
"uniform sampler2D s_TextureMap;\n"
"void main()\n"
"{\n"
" outColor = texture(s_TextureMap, v_texCoord);\n"
"}";
// 用于离屏渲染的顶点着色器脚本,不使用变换矩阵
char vFboShaderStr[] =
"#version 300 es \n"
"layout(location = 0) in vec4 a_position; \n"
"layout(location = 1) in vec2 a_texCoord; \n"
"out vec2 v_texCoord; \n"
"void main() \n"
"{ \n"
" gl_Position = a_position; \n"
" v_texCoord = a_texCoord; \n"
"} \n";
// 用于离屏渲染的片段着色器脚本,取每个像素的灰度值
char fFboShaderStr[] =
"#version 300 es\n"
"precision mediump float;\n"
"in vec2 v_texCoord;\n"
"layout(location = 0) out vec4 outColor;\n"
"uniform sampler2D s_TextureMap;\n"
"void main()\n"
"{\n"
" vec4 tempColor = texture(s_TextureMap, v_texCoord);\n"
" float luminance = tempColor.r * 0.299 + tempColor.g * 0.587 + tempColor.b * 0.114;\n"
" outColor = vec4(vec3(luminance), tempColor.a);\n"
"}"; // 输出灰度图
// 编译链接用于普通渲染的着色器程序
m_ProgramObj = GLUtils::CreateProgram(vShaderStr, fShaderStr, m_VertexShader, m_FragmentShader);
// 编译链接用于离屏渲染的着色器程序
m_FboProgramObj = GLUtils::CreateProgram(vFboShaderStr, fFboShaderStr, m_FboVertexShader, m_FboFragmentShader);
if (m_ProgramObj == GL_NONE || m_FboProgramObj == GL_NONE)
{
LOGCATE("PBOSample::Init m_ProgramObj == GL_NONE");
return;
}
m_SamplerLoc = glGetUniformLocation(m_ProgramObj, "s_TextureMap");
m_MVPMatrixLoc = glGetUniformLocation(m_ProgramObj, "u_MVPMatrix");
m_FboSamplerLoc = glGetUniformLocation(m_FboProgramObj, "s_TextureMap");
// 生成 VBO ,加载顶点数据和索引数据
// Generate VBO Ids and load the VBOs with data
glGenBuffers(4, m_VboIds);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(vVertices), vVertices, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[1]);
glBufferData(GL_ARRAY_BUFFER, sizeof(vTexCoors), vTexCoors, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[2]);
glBufferData(GL_ARRAY_BUFFER, sizeof(vFboTexCoors), vFboTexCoors, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_VboIds[3]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW);
GO_CHECK_GL_ERROR();
// 生成 2 个 VAO,一个用于普通渲染,另一个用于离屏渲染
// Generate VAO Ids
glGenVertexArrays(2, m_VaoIds);
// 初始化用于普通渲染的 VAO
// Normal rendering VAO
glBindVertexArray(m_VaoIds[0]);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[0]);
glEnableVertexAttribArray(VERTEX_POS_INDX);
glVertexAttribPointer(VERTEX_POS_INDX, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (const void *)0);
glBindBuffer(GL_ARRAY_BUFFER, GL_NONE);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[1]);
glEnableVertexAttribArray(TEXTURE_POS_INDX);
glVertexAttribPointer(TEXTURE_POS_INDX, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(GLfloat), (const void *)0);
glBindBuffer(GL_ARRAY_BUFFER, GL_NONE);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_VboIds[3]);
GO_CHECK_GL_ERROR();
glBindVertexArray(GL_NONE);
// 初始化用于离屏渲染的 VAO
// FBO off screen rendering VAO
glBindVertexArray(m_VaoIds[1]);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[0]);
glEnableVertexAttribArray(VERTEX_POS_INDX);
glVertexAttribPointer(VERTEX_POS_INDX, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (const void *)0);
glBindBuffer(GL_ARRAY_BUFFER, GL_NONE);
glBindBuffer(GL_ARRAY_BUFFER, m_VboIds[2]);
glEnableVertexAttribArray(TEXTURE_POS_INDX);
glVertexAttribPointer(TEXTURE_POS_INDX, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(GLfloat), (const void *)0);
glBindBuffer(GL_ARRAY_BUFFER, GL_NONE);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_VboIds[3]);
GO_CHECK_GL_ERROR();
glBindVertexArray(GL_NONE);
// 创建并初始化图像纹理
glGenTextures(1, &m_ImageTextureId);
glBindTexture(GL_TEXTURE_2D, m_ImageTextureId);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_RenderImage.width, m_RenderImage.height, 0, GL_RGBA, GL_UNSIGNED_BYTE,
m_RenderImage.ppPlane[0]);
glBindTexture(GL_TEXTURE_2D, GL_NONE);
GO_CHECK_GL_ERROR();
//初始化 FBO
glGenBuffers(2, m_UploadPboIds);
int imgByteSize = m_RenderImage.width * m_RenderImage.height * 4;//RGBA
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_UploadPboIds[0]);
glBufferData(GL_PIXEL_UNPACK_BUFFER, imgByteSize, 0, GL_STREAM_DRAW);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_UploadPboIds[1]);
glBufferData(GL_PIXEL_UNPACK_BUFFER, imgByteSize, 0, GL_STREAM_DRAW);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
glGenBuffers(2, m_DownloadPboIds);
glBindBuffer(GL_PIXEL_PACK_BUFFER, m_DownloadPboIds[0]);
glBufferData(GL_PIXEL_PACK_BUFFER, imgByteSize, 0, GL_STREAM_READ);
glBindBuffer(GL_PIXEL_PACK_BUFFER, m_DownloadPboIds[1]);
glBufferData(GL_PIXEL_PACK_BUFFER, imgByteSize, 0, GL_STREAM_READ);
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
if (!CreateFrameBufferObj())
{
LOGCATE("PBOSample::Init CreateFrameBufferObj fail");
return;
}
}
void PBOSample::Draw(int screenW, int screenH)
{
// 离屏渲染
//glPixelStorei(GL_UNPACK_ALIGNMENT,1);
glViewport(0, 0, m_RenderImage.width, m_RenderImage.height);
//Upload
UploadPixels();
GO_CHECK_GL_ERROR();
// Do FBO off screen rendering
glBindFramebuffer(GL_FRAMEBUFFER, m_FboId);
glUseProgram(m_FboProgramObj);
glBindVertexArray(m_VaoIds[1]);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_ImageTextureId);
glUniform1i(m_FboSamplerLoc, 0);
GO_CHECK_GL_ERROR();
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (const void *)0);
GO_CHECK_GL_ERROR();
glBindVertexArray(0);
glBindTexture(GL_TEXTURE_2D, 0);
//Download
DownloadPixels();
glBindFramebuffer(GL_FRAMEBUFFER, 0);
// 普通渲染
// Do normal rendering
glViewport(0, 0, screenW, screenH);
UpdateMVPMatrix(m_MVPMatrix, m_AngleX, m_AngleY, (float)screenW / screenH);
glUseProgram(m_ProgramObj);
GO_CHECK_GL_ERROR();
glBindVertexArray(m_VaoIds[0]);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_FboTextureId);
glUniformMatrix4fv(m_MVPMatrixLoc, 1, GL_FALSE, &m_MVPMatrix[0][0]);
glUniform1i(m_SamplerLoc, 0);
GO_CHECK_GL_ERROR();
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, (const void *)0);
GO_CHECK_GL_ERROR();
glBindTexture(GL_TEXTURE_2D, GL_NONE);
glBindVertexArray(GL_NONE);
m_FrameIndex++;
}
void PBOSample::Destroy()
{
if (m_ProgramObj)
{
glDeleteProgram(m_ProgramObj);
m_ProgramObj = GL_NONE;
}
if (m_FboProgramObj)
{
glDeleteProgram(m_FboProgramObj);
m_FboProgramObj = GL_NONE;
}
if (m_ImageTextureId)
{
glDeleteTextures(1, &m_ImageTextureId);
}
if (m_FboTextureId)
{
glDeleteTextures(1, &m_FboTextureId);
}
if (m_VboIds[0])
{
glDeleteBuffers(4, m_VboIds);
}
if (m_VaoIds[0])
{
glDeleteVertexArrays(2, m_VaoIds);
}
if (m_FboId)
{
glDeleteFramebuffers(1, &m_FboId);
}
if (m_DownloadPboIds[0]) {
glDeleteBuffers(2, m_DownloadPboIds);
}
if (m_UploadPboIds[0]) {
glDeleteBuffers(2, m_UploadPboIds);
}
}
bool PBOSample::CreateFrameBufferObj()
{
// 创建并初始化 FBO 纹理
glGenTextures(1, &m_FboTextureId);
glBindTexture(GL_TEXTURE_2D, m_FboTextureId);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, GL_NONE);
// 创建并初始化 FBO
glGenFramebuffers(1, &m_FboId);
glBindFramebuffer(GL_FRAMEBUFFER, m_FboId);
glBindTexture(GL_TEXTURE_2D, m_FboTextureId);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_FboTextureId, 0);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_RenderImage.width, m_RenderImage.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
if (glCheckFramebufferStatus(GL_FRAMEBUFFER)!= GL_FRAMEBUFFER_COMPLETE) {
LOGCATE("PBOSample::CreateFrameBufferObj glCheckFramebufferStatus status != GL_FRAMEBUFFER_COMPLETE");
return false;
}
glBindTexture(GL_TEXTURE_2D, GL_NONE);
glBindFramebuffer(GL_FRAMEBUFFER, GL_NONE);
return true;
}
void PBOSample::UpdateMVPMatrix(glm::mat4 &mvpMatrix, int angleX, int angleY, float ratio)
{
LOGCATE("PBOSample::UpdateMVPMatrix angleX = %d, angleY = %d, ratio = %f", angleX, angleY, ratio);
angleX = angleX % 360;
angleY = angleY % 360;
float radiansX = static_cast<float>(MATH_PI / 180.0f * angleX);
float radiansY = static_cast<float>(MATH_PI / 180.0f * angleY);
// Projection matrix
glm::mat4 Projection = glm::ortho(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f);
//glm::mat4 Projection = glm::frustum(-ratio, ratio, -1.0f, 1.0f, 1.0f, 100);
//glm::mat4 Projection = glm::perspective(45.0f,ratio, 0.1f,100.f);
// View matrix
glm::mat4 View = glm::lookAt(
glm::vec3(0, 0, 1), // Camera is at (0,0,1), in World Space
glm::vec3(0, 0, 0), // and looks at the origin
glm::vec3(0, 1, 0) // Head is up (set to 0,-1,0 to look upside-down)
);
// Model matrix
glm::mat4 Model = glm::mat4(1.0f);
Model = glm::scale(Model, glm::vec3(m_ScaleX, m_ScaleY, 1.0f));
Model = glm::rotate(Model, radiansX, glm::vec3(1.0f, 0.0f, 0.0f));
Model = glm::rotate(Model, radiansY, glm::vec3(0.0f, 1.0f, 0.0f));
Model = glm::translate(Model, glm::vec3(0.0f, 0.0f, 0.0f));
mvpMatrix = Projection * View * Model;
}
void PBOSample::UploadPixels() {
LOGCATE("PBOSample::UploadPixels");
int dataSize = m_RenderImage.width * m_RenderImage.height * 4;
#ifdef PBO_UPLOAD
int index = m_FrameIndex % 2;
int nextIndex = (index + 1) % 2;
BEGIN_TIME("PBOSample::UploadPixels Copy Pixels from PBO to Textrure Obj")
glBindTexture(GL_TEXTURE_2D, m_ImageTextureId);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_UploadPboIds[index]);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, m_RenderImage.width, m_RenderImage.height, GL_RGBA, GL_UNSIGNED_BYTE, 0);
END_TIME("PBOSample::UploadPixels Copy Pixels from PBO to Textrure Obj")
#else
BEGIN_TIME("PBOSample::UploadPixels Copy Pixels from System Mem to Textrure Obj")
glBindTexture(GL_TEXTURE_2D, m_ImageTextureId);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, m_RenderImage.width, m_RenderImage.height, GL_RGBA, GL_UNSIGNED_BYTE, m_RenderImage.ppPlane[0]);
END_TIME("PBOSample::UploadPixels Copy Pixels from System Mem to Textrure Obj")
#endif
#ifdef PBO_UPLOAD
BEGIN_TIME("PBOSample::UploadPixels Update Image data")
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_UploadPboIds[nextIndex]);
glBufferData(GL_PIXEL_UNPACK_BUFFER, dataSize, nullptr, GL_STREAM_DRAW);
GLubyte *bufPtr = (GLubyte *) glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0,
dataSize,
GL_MAP_WRITE_BIT |
GL_MAP_INVALIDATE_BUFFER_BIT);
GO_CHECK_GL_ERROR();
LOGCATE("PBOSample::UploadPixels bufPtr=%p",bufPtr);
if(bufPtr)
{
GO_CHECK_GL_ERROR();
memcpy(bufPtr, m_RenderImage.ppPlane[0], static_cast<size_t>(dataSize));
int randomRow = rand() % (m_RenderImage.height - 5);
memset(bufPtr + randomRow * m_RenderImage.width * 4, 188,
static_cast<size_t>(m_RenderImage.width * 4 * 5));
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
}
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
END_TIME("PBOSample::UploadPixels Update Image data")
#else
NativeImage nativeImage = m_RenderImage;
NativeImageUtil::AllocNativeImage(&nativeImage);
BEGIN_TIME("PBOSample::UploadPixels Update Image data")
//update image data
int randomRow = rand() % (m_RenderImage.height - 5);
memset(m_RenderImage.ppPlane[0] + randomRow * m_RenderImage.width * 4, 188,
static_cast<size_t>(m_RenderImage.width * 4 * 5));
NativeImageUtil::CopyNativeImage(&m_RenderImage, &nativeImage);
END_TIME("PBOSample::UploadPixels Update Image data")
NativeImageUtil::FreeNativeImage(&nativeImage);
#endif
}
void PBOSample::DownloadPixels() {
int dataSize = m_RenderImage.width * m_RenderImage.height * 4;
NativeImage nativeImage = m_RenderImage;
nativeImage.format = IMAGE_FORMAT_RGBA;
uint8_t *pBuffer = new uint8_t[dataSize];
nativeImage.ppPlane[0] = pBuffer;
BEGIN_TIME("DownloadPixels glReadPixels without PBO")
glReadPixels(0, 0, nativeImage.width, nativeImage.height, GL_RGBA, GL_UNSIGNED_BYTE, pBuffer);
//NativeImageUtil::DumpNativeImage(&nativeImage, "/sdcard/DCIM", "Normal");
END_TIME("DownloadPixels glReadPixels without PBO")
delete []pBuffer;
int index = m_FrameIndex % 2;
int nextIndex = (index + 1) % 2;
BEGIN_TIME("DownloadPixels glReadPixels with PBO")
glBindBuffer(GL_PIXEL_PACK_BUFFER, m_DownloadPboIds[index]);
glReadPixels(0, 0, m_RenderImage.width, m_RenderImage.height, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
END_TIME("DownloadPixels glReadPixels with PBO")
BEGIN_TIME("DownloadPixels PBO glMapBufferRange")
glBindBuffer(GL_PIXEL_PACK_BUFFER, m_DownloadPboIds[nextIndex]);
GLubyte *bufPtr = static_cast<GLubyte *>(glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0,
dataSize,
GL_MAP_READ_BIT));
if (bufPtr) {
nativeImage.ppPlane[0] = bufPtr;
//NativeImageUtil::DumpNativeImage(&nativeImage, "/sdcard/DCIM", "PBO");
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
}
END_TIME("DownloadPixels PBO glMapBufferRange")
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
}
| 8,157 |
2,728 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from ._configuration import LUISRuntimeClientConfiguration
from .operations import PredictionOperations
from . import models
class LUISRuntimeClient(SDKClient):
"""LUISRuntimeClient
:ivar config: Configuration for client.
:vartype config: LUISRuntimeClientConfiguration
:ivar prediction: Prediction operations
:vartype prediction: azure.cognitiveservices.language.luis.runtime.operations.PredictionOperations
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: https://westus.api.cognitive.microsoft.com).
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""
def __init__(
self, endpoint, credentials):
self.config = LUISRuntimeClientConfiguration(endpoint, credentials)
super(LUISRuntimeClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '3.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.prediction = PredictionOperations(
self._client, self.config, self._serialize, self._deserialize)
| 544 |
450 | <reponame>YangHao666666/hawq
/*
* 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.
*/
#include "GetApplicationsRequest.h"
namespace libyarn {
GetApplicationsRequest::GetApplicationsRequest() {
requestProto = GetApplicationsRequestProto::default_instance();
}
GetApplicationsRequest::GetApplicationsRequest(
const GetApplicationsRequestProto &proto) :
requestProto(proto) {
}
GetApplicationsRequest::~GetApplicationsRequest() {
}
GetApplicationsRequestProto& GetApplicationsRequest::getProto() {
return requestProto;
}
void GetApplicationsRequest::setApplicationTypes(
list<string> &applicationTypes) {
list<string>::iterator it = applicationTypes.begin();
for (; it != applicationTypes.end(); it++) {
requestProto.add_application_types(*it);
}
}
list<string> GetApplicationsRequest::getApplicationTypes() {
list<string> typsesList;
for (int i = 0; i < requestProto.application_types_size(); i++) {
typsesList.push_back(requestProto.application_types(i));
}
return typsesList;
}
void GetApplicationsRequest::setApplicationStates(
list<YarnApplicationState> &applicationStates) {
list<YarnApplicationState>::iterator it = applicationStates.begin();
for (; it != applicationStates.end(); it++) {
requestProto.add_application_states((YarnApplicationStateProto) *it);
}
}
list<YarnApplicationState> GetApplicationsRequest::getApplicationStates() {
list<YarnApplicationState> stateList;
for (int i = 0; i < requestProto.application_states_size(); i++) {
stateList.push_back(
(YarnApplicationState) requestProto.application_states(i));
}
return stateList;
}
} /* namespace libyarn */
| 687 |
375 | package io.lumify.mapping.xform;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
public abstract class AbstractValueTransformerTest<V> {
private final String input;
private final V expected;
private final ValueTransformer<V> xform;
protected AbstractValueTransformerTest(ValueTransformer<V> xform, String input, V expected) {
this.xform = xform;
this.input = input;
this.expected = expected;
}
@Test
public void testTransform() {
assertEquals(expected, xform.transform(input));
}
}
| 241 |
460 | package com.manning.gia.todo;
import com.manning.gia.todo.utils.CommandLineInput;
import com.manning.gia.todo.utils.CommandLineInputHandler;
import org.apache.commons.lang3.CharUtils;
public class ToDoApp {
public static final char DEFAULT_INPUT = '\u0000';
public static void main(String args[]) {
CommandLineInputHandler commandLineInputHandler = new CommandLineInputHandler();
char command = DEFAULT_INPUT;
while (CommandLineInput.EXIT.getShortCmd() != command) {
commandLineInputHandler.printOptions();
String input = commandLineInputHandler.readInput();
System.out.println("-----> " + CharUtils.toChar(input, DEFAULT_INPUT));
command = CharUtils.toChar(input, DEFAULT_INPUT);
CommandLineInput commandLineInput = CommandLineInput.getCommandLineInputForInput(command);
commandLineInputHandler.processInput(commandLineInput);
}
}
} | 356 |
875 | <filename>src/java/org/apache/sqoop/util/ExitSecurityException.java
/**
* 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.sqoop.util;
/**
* SecurityException suppressing a System.exit() call.
*
* Allows retrieval of the would-be exit status code.
*/
@SuppressWarnings("serial")
public class ExitSecurityException extends SecurityException {
private final int exitStatus;
public ExitSecurityException() {
super("ExitSecurityException");
this.exitStatus = 0;
}
public ExitSecurityException(final String message) {
super(message);
this.exitStatus = 0;
}
/**
* Register a System.exit() event being suppressed with a particular
* exit status code.
*/
public ExitSecurityException(int status) {
super("ExitSecurityException");
this.exitStatus = status;
}
@Override
public String toString() {
String msg = getMessage();
return (null == msg) ? ("exit with status " + exitStatus) : msg;
}
public int getExitStatus() {
return this.exitStatus;
}
}
| 494 |
1,251 | <reponame>palerdot/BlingFire
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
#ifndef _FA_ARRAYCA_H_
#define _FA_ARRAYCA_H_
#include "FAConfig.h"
namespace BlingFire
{
///
/// This is a common interface for packed read-only arrays.
///
class FAArrayCA {
public:
/// returns value by the index, 0..Count-1
virtual const int GetAt (const int Idx) const = 0;
/// returns number of elementes in the array
virtual const int GetCount () const = 0;
};
}
#endif
| 218 |
1,056 | <reponame>Antholoj/netbeans
/*
* 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.netbeans.modules.versioning.ui.diff;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.io.IOException;
import java.io.StringReader;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.Document;
import javax.swing.text.EditorKit;
import javax.swing.text.Element;
import javax.swing.text.JTextComponent;
import javax.swing.text.StyleContext;
import javax.swing.text.StyledDocument;
import javax.swing.text.StyledEditorKit;
import org.netbeans.api.diff.Difference;
import org.netbeans.editor.EditorUI;
import org.openide.text.CloneableEditorSupport;
/**
* @author <NAME>
*/
class DiffTooltipContentPanel extends JComponent {
private JEditorPane originalTextPane;
private final Color color;
private int maxWidth;
private final JScrollPane jsp;
public DiffTooltipContentPanel(final JTextComponent parentPane, final String mimeType, final Difference diff) {
originalTextPane = new JEditorPane();
EditorKit kit = CloneableEditorSupport.getEditorKit(mimeType);
originalTextPane.setEditorKit(kit);
Document xdoc = kit.createDefaultDocument();
if (!(xdoc instanceof StyledDocument)) {
xdoc = new DefaultStyledDocument(new StyleContext());
kit = new StyledEditorKit();
originalTextPane.setEditorKit(kit);
}
StyledDocument doc = (StyledDocument) xdoc;
try {
kit.read(new StringReader(diff.getFirstText()), doc, 0);
} catch (IOException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
originalTextPane.setDocument(doc);
originalTextPane.setEditable(false);
color = getBackgroundColor(diff.getType());
originalTextPane.setBackground(color);
EditorUI eui = org.netbeans.editor.Utilities.getEditorUI(originalTextPane);
Element rootElement = org.openide.text.NbDocument.findLineRootElement(doc);
int lineCount = rootElement.getElementCount();
int height = eui.getLineHeight() * lineCount;
maxWidth = 0;
for(int line = 0; line < lineCount; line++) {
Element lineElement = rootElement.getElement(line);
String text = null;
try {
text = doc.getText(lineElement.getStartOffset(), lineElement.getEndOffset() - lineElement.getStartOffset());
} catch (BadLocationException e) {
//
}
text = replaceTabs(mimeType, text);
int lineLength = parentPane.getFontMetrics(parentPane.getFont()).stringWidth(text);
if (lineLength > maxWidth) {
maxWidth = lineLength;
}
}
if (maxWidth < 50) maxWidth = 50; // too thin component causes repaint problems
else if (maxWidth < 150) maxWidth += 10;
maxWidth = Math.min(maxWidth * 7 / 6, parentPane.getVisibleRect().width);
originalTextPane.setPreferredSize(new Dimension(maxWidth, height));
if (!originalTextPane.isEditable()) {
originalTextPane.putClientProperty("HighlightsLayerExcludes", "^org\\.netbeans\\.modules\\.editor\\.lib2\\.highlighting\\.CaretRowHighlighting$"); //NOI18N
}
jsp = new JScrollPane(originalTextPane);
jsp.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLACK));
setLayout(new BorderLayout());
add(jsp);
}
void resize () {
if (originalTextPane == null) return;
originalTextPane.setBackground(color);
Element rootElement = org.openide.text.NbDocument.findLineRootElement((StyledDocument) originalTextPane.getDocument());
int lineCount = rootElement.getElementCount();
int height = 0;
assert lineCount > 0;
Element lineElement = rootElement.getElement(lineCount - 1);
Rectangle rec;
try {
rec = originalTextPane.modelToView(lineElement.getEndOffset() - 1);
height = rec.y + rec.height;
} catch (BadLocationException ex) {
}
if (height > 0) {
Dimension size = originalTextPane.getPreferredSize();
Dimension scrollpaneSize = jsp.getPreferredSize();
height += jsp.getHorizontalScrollBar().getPreferredSize().height;
jsp.setPreferredSize(new Dimension(maxWidth + Math.max(0, scrollpaneSize.width - size.width), height + Math.max(0, scrollpaneSize.height - size.height)));
SwingUtilities.getWindowAncestor(originalTextPane).pack();
}
originalTextPane = null;
}
private Color getBackgroundColor (int key) {
org.netbeans.modules.diff.DiffModuleConfig config = org.netbeans.modules.diff.DiffModuleConfig.getDefault();
return key == Difference.DELETE ? config.getSidebarDeletedColor() : config.getSidebarChangedColor();
}
private Integer spacesPerTab;
private String replaceTabs(String mimeType, String text) {
if (text.contains("\t")) { //NOI18N
if (spacesPerTab == null) {
spacesPerTab = org.netbeans.modules.diff.DiffModuleConfig.getDefault().getSpacesPerTabFor(mimeType);
}
text = text.replace("\t", strCharacters(' ', spacesPerTab)); //NOI18N
}
return text;
}
private static String strCharacters(char c, int num) {
StringBuffer s = new StringBuffer();
while(num-- > 0) {
s.append(c);
}
return s.toString();
}
}
| 2,614 |
1,602 | <filename>third-party/qthread/qthread-src/src/spr.c
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include "qthread/qthread.h"
#include "qthread/multinode.h"
#include "spr_innards.h"
#include "qthread/spr.h"
#include "qt_multinode_innards.h"
#include "spr_innards.h"
#include "qt_asserts.h"
#include "qt_debug.h"
#include "qt_atomics.h"
#include "net/net.h"
#include "qthread/barrier.h"
/******************************************************************************
* Internal SPR remote actions *
******************************************************************************/
static int initialized_flags = -1;
static int spr_initialized = 0;
static aligned_t spr_locale_barrier_op(void *arg_);
static qthread_f
spr_remote_functions[2] = {
spr_locale_barrier_op,
NULL};
// Locale barrier
static qt_barrier_t * locale_barrier = NULL;
static void call_fini(void)
{
spr_fini();
}
int spr_init(unsigned int flags,
qthread_f *regs)
{
qassert(setenv("QT_MULTINODE", "1", 1), 0);
// Validate flags
if (flags & ~(SPR_SPMD)) { return SPR_BADARGS; }
initialized_flags = flags;
// Initialize Qthreads on this locale
qthread_initialize();
// Register actions
spr_register_actions(spr_remote_functions, 0, spr_internals_base);
if (regs) {
spr_register_actions(regs, 0, spr_init_base);
}
if (0 == spr_locale_id()) {
// Create locale barrier
locale_barrier = qt_barrier_create(spr_num_locales(), REGION_BARRIER);
}
spr_initialized = 1;
atexit(call_fini);
if (flags & SPR_SPMD) {
qthread_multinode_multistart();
} else {
qthread_multinode_run();
}
return SPR_OK;
}
int spr_fini(void)
{
static int recursion_detection = 0;
if (initialized_flags == -1) { return SPR_NOINIT; }
if (recursion_detection) { return SPR_OK; }
recursion_detection = 1;
// Destroy locale barrier
if (NULL != locale_barrier) {
qt_barrier_destroy(locale_barrier);
}
if (initialized_flags & SPR_SPMD) {
qthread_multinode_multistop();
}
recursion_detection = 0;
initialized_flags = -1;
return SPR_OK;
}
int spr_register_actions(qthread_f *actions,
size_t count,
size_t base)
{
int rc = SPR_OK;
assert(actions);
if (count == 0) {
qthread_f *cur_f = actions;
size_t tag = 0;
while (*cur_f) {
qassert(qthread_multinode_register(tag + base, *cur_f), QTHREAD_SUCCESS);
++tag;
cur_f = actions + tag;
}
} else {
for (int i = 0; i < count; i++) {
qassert(qthread_multinode_register(i + base, actions[i]), QTHREAD_SUCCESS);
}
}
return rc;
}
int spr_unify(void)
{
if (initialized_flags == -1) { return SPR_NOINIT; }
if (initialized_flags & ~(SPR_SPMD)) { return SPR_IGN; }
if (0 != spr_locale_id()) {
spr_fini();
}
return SPR_OK;
}
int spr_num_locales(void)
{
if (initialized_flags == -1) { return SPR_NOINIT; }
return qthread_multinode_size();
}
int spr_locale_id(void)
{
if (initialized_flags == -1) { return SPR_NOINIT; }
return qthread_multinode_rank();
}
/******************************************************************************
* Data Movement: One-sided Get *
******************************************************************************/
/**
* Wait for the get operation to complete fully.
*
* This will cause the caller to block until acknowledgement is received
* that the entire memory segment is ready and available at the target locale.
*
* param hand The handle for the get operation.
*
* return int Returns SPR_OK on success.
*/
int spr_get_wait(spr_get_handle_t *const hand)
{
int const rc = SPR_OK;
struct spr_get_handle_s *h = (struct spr_get_handle_s *)hand;
qthread_readFF(&h->feb, &h->feb);
return rc;
}
/**
* Get the specified arbitrary-length remote memory segment.
* Note: this is a native implementation using SPR remote-spawning.
*
* This method blocks the calling task until the entire memory segment is
* available at the local destination.
*
* @param dest_addr The pointer to the local memory segment destination.
*
* @param src_loc The locale where the memory segment resides.
*
* @param src_addr The pointer to the memory segment on the specified locale.
*
* @param size The size of the memory segment.
*
* @return int Returns SPR_OK on success.
*/
int spr_get(void *restrict dest_addr,
int src_loc,
const void *restrict src_addr,
size_t size)
{
int rc = SPR_OK;
qthread_debug(MULTINODE_CALLS, "[%d] begin spr_get(%d, %p, %p, %d)\n", spr_locale_id(), src_loc, src_addr, dest_addr, size);
struct spr_get_handle_s hand;
spr_get_nb(dest_addr, src_loc, src_addr, size, (spr_get_handle_t *)&hand);
spr_get_wait((spr_get_handle_t *)&hand);
qthread_debug(MULTINODE_CALLS, "[%d] end spr_get(%d, %p, %p, %d)\n", spr_locale_id(), src_loc, src_addr, dest_addr, size);
return rc;
}
/**
* Get the specified arbitrary-length remote memory segment.
* Note: this is a native implementation using SPR remote-spawning.
*
* This method returns after the data transfer was initiated; the handle
* must be used to synchronize on the completion of the transfer.
*
* @param dest_addr The pointer to the local memory segment destination.
*
* @param src_loc The locale where the memory segment resides.
*
* @param src_addr The pointer to the memory segment on the specified locale.
*
* @param size The size of the memory segment.
*
* @param hand The pointer to the handle that must be used later to
* synchronize on the completion of the operation.
*
* @return int Returns SPR_OK on success.
*/
int spr_get_nb(void *restrict dest_addr,
int src_loc,
const void *restrict src_addr,
size_t size,
spr_get_handle_t *restrict hand)
{
int rc = SPR_OK;
int const here = spr_locale_id();
struct spr_get_handle_s *h = (struct spr_get_handle_s *)hand;
qthread_debug(MULTINODE_CALLS, "[%d] begin spr_get_nb(%d, %p, %p, %d, %p)\n", spr_locale_id(), src_loc, src_addr, dest_addr, size, h);
assert(src_loc < qthread_multinode_size());
assert(size > 0);
assert(dest_addr);
assert(src_addr);
assert(hand);
qthread_empty(&h->feb);
rc = qthread_internal_net_driver_get(dest_addr, src_loc, src_addr, size, &h->feb);
qthread_debug(MULTINODE_CALLS, "[%d] end spr_get_nb(%d, %p, %p, %d)\n", spr_locale_id(), src_loc, src_addr, dest_addr, size);
return rc;
}
/******************************************************************************
* Data Movement: One-sided Put *
******************************************************************************/
/**
* Wait until all data is available at the destination.
*
* This will cause the caller to block until acknowledgement is received
* that the entire memory segment is ready and available at the target locale.
*
* param hand The handle for the get operation.
*
* return int Returns SPR_OK on success.
*/
int spr_put_wait(spr_put_handle_t *const hand)
{
int const rc = SPR_OK;
struct spr_put_handle_s *h = (struct spr_put_handle_s *)hand;
qthread_readFF(&h->feb, &h->feb);
return rc;
}
/**
* Put a copy of the arbitrary-length local memory segment at the specified
* location on the remote locale.
*
* This method blocks the calling task until the entire memory segment is
* available at the remote locale.
*
* @param dest_loc The locale where the remote memory segment resides.
*
* @param dest_addr The pointer to the memory segment on the specified locale.
*
* @param src_add The pointer to the local memory segment.
*
* @param size The size of the memory segment.
*
* @return int Returns SPR_OK on success.
*/
int spr_put(int dest_loc,
void *restrict dest_addr,
const void *restrict src_addr,
size_t size)
{
int rc = SPR_OK;
qthread_debug(MULTINODE_CALLS, "[%d] begin spr_put(%d, %p, %p, %d)\n", spr_locale_id(), dest_loc, dest_addr, src_addr, size);
struct spr_put_handle_s hand;
spr_put_nb(dest_loc, dest_addr, src_addr, size, (spr_put_handle_t *)&hand);
spr_put_wait((spr_put_handle_t *)&hand);
qthread_debug(MULTINODE_CALLS, "[%d] end spr_put(%d, %p, %p, %d)\n", spr_locale_id(), dest_loc, dest_addr, src_addr, size);
return rc;
}
/**
* Put a copy of the arbitrary-length local memory segment at the specified
* location on the remote locale.
*
* This method returns after the data transfer was initiated; the handle
* must be used to synchronize on the completion of the transfer.
*
* @param dest_loc The locale where the remote memory segment resides.
*
* @param dest_addr The pointer to the memory segment on the specified locale.
*
* @param src_add The pointer to the local memory segment.
*
* @param size The size of the memory segment.
*
* @param hand The pointer to the handle that must be used later to
* synchronize on the completion of the operation.
*
* @return int Returns SPR_OK on success.
*/
int spr_put_nb(int dest_loc,
void *restrict dest_addr,
const void *restrict src_addr,
size_t size,
spr_put_handle_t *restrict hand)
{
int rc = SPR_OK;
int const here = spr_locale_id();
struct spr_put_handle_s *h = (struct spr_put_handle_s *)hand;
qthread_debug(MULTINODE_CALLS, "[%d] begin spr_put_nb(%d, %p, %p, %d)\n", spr_locale_id(), dest_loc, dest_addr, src_addr, size);
assert(dest_loc < qthread_multinode_size());
assert(size > 0);
assert(dest_addr);
assert(src_addr);
assert(hand);
qthread_empty(&h->feb);
rc = qthread_internal_net_driver_put(dest_loc, dest_addr, src_addr, size, &h->feb);
qthread_debug(MULTINODE_CALLS, "[%d] end spr_put_nb(%d, %p, %p, %d)\n", spr_locale_id(), dest_loc, dest_addr, src_addr, size);
return rc;
}
/******************************************************************************
* Locale-level Collectives: Barrier *
******************************************************************************/
aligned_t spr_locale_barrier_op(void *arg_)
{
aligned_t result = 0;
qthread_debug(MULTINODE_CALLS, "[%d] enter task-level barrier.\n", spr_locale_id());
assert(NULL != locale_barrier); // Must run on L0
qt_barrier_enter(locale_barrier);
qthread_debug(MULTINODE_CALLS, "[%d] exit task-level barrier.\n", spr_locale_id());
return result;
}
int spr_locale_barrier(void)
{
int rc = SPR_OK;
if (0 == spr_initialized) {
// Perform (thread-level) barrier using the network driver runtime
qthread_debug(MULTINODE_BEHAVIOR, "[%d] enter network driver runtime barrier.\n", spr_locale_id());
rc = qthread_internal_net_driver_barrier();
qthread_debug(MULTINODE_BEHAVIOR, "[%d] exit network driver runtime barrier.\n", spr_locale_id());
} else {
// Perform task-level barrier
qthread_debug(MULTINODE_BEHAVIOR, "[%d] enter task-level barrier.\n", spr_locale_id());
aligned_t ret;
qthread_fork_remote(spr_locale_barrier_op,
NULL, // arg
&ret,
0, // rank
0); // arg_len
qthread_readFF(&ret, &ret);
qthread_debug(MULTINODE_BEHAVIOR, "[%d] exit task-level barrier.\n", spr_locale_id());
}
return rc;
}
/* vim:set expandtab: */
| 5,041 |
755 | {
"author": "Microsoft",
"name": "Blank",
"description": "Esta é a página mais básica. Uma tela em branco para incluir o que você quiser.",
"identity": "wts.Page.Blank"
} | 76 |
1,813 | <filename>tfx/tools/cli/commands/pipeline.py
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Commands for pipeline group."""
import sys
from typing import Optional
import click
from tfx.tools.cli import labels
from tfx.tools.cli.cli_context import Context
from tfx.tools.cli.cli_context import pass_context
from tfx.tools.cli.handler import handler_factory
def _check_deprecated_image_build_flags(build_target_image=None,
skaffold_cmd=None,
pipeline_package_path=None):
"""Checks and exits if deprecated flags were used."""
if build_target_image is not None:
sys.exit(
'[Error] --build-target-image flag was DELETED. You should specify '
'the build target image at the `KubeflowDagRunnerConfig` class '
'instead, and use --build-image flag without argument to build a '
'container image when creating or updating a pipeline.')
if skaffold_cmd is not None:
sys.exit(
'[Error] --skaffold-cmd flag was DELETED. TFX doesn\'t use skaffold '
'any more. You can delete --skaffold-cmd flag and the auto-genrated '
'build.yaml file. You must specify --build-image to trigger an '
'image build when creating or updating a pipeline.')
if pipeline_package_path is not None:
sys.exit(
'[Error] --pipeline-package-path flag was DELETED. You can specify '
'the package location as `output_filename` and `output_dir` when '
'creating a `KubeflowDagRunner` instance. CLI will read the pacakge '
'path specified there.')
@click.group('pipeline')
def pipeline_group() -> None:
pass
# TODO(b/132286477): Add support for requirements file.
@pipeline_group.command('create', help='Create a pipeline')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='Orchestrator for pipelines')
@click.option(
'--pipeline_path',
'--pipeline-path',
required=True,
type=str,
help='Path to Python DSL.')
@click.option(
'--package_path',
'--package-path',
default=None,
type=str,
help='[DEPRECATED] Package path specified in a KubeflowDagRunner instace '
'will be used.')
@click.option(
'--build_target_image',
'--build-target-image',
default=None,
type=str,
help='[DEPRECATED] Please specify target image to the '
'KubeflowDagRunnerConfig class directly. `KUBEFLOW_TFX_IMAGE` environment '
'variable is not used any more.')
@click.option(
'--build_base_image',
'--build-base-image',
default=None,
type=str,
help='Container image path to be used as the base image. If not specified, '
'official TFX image with the same version will be used. You need to '
'specify --build-image flag to trigger an image build.')
@click.option(
'--skaffold_cmd',
'--skaffold-cmd',
default=None,
type=str,
help='[DEPRECATED] Skaffold is not used any more. Do not use this flag.')
@click.option(
'--endpoint',
default=None,
type=str,
help='Endpoint of the KFP API service to connect.')
@click.option(
'--iap_client_id',
'--iap-client-id',
default=None,
type=str,
help='Client ID for IAP protected endpoint.')
@click.option(
'-n',
'--namespace',
default='kubeflow',
type=str,
help='Kubernetes namespace to connect to the KFP API.')
@click.option(
'--build_image',
'--build-image',
is_flag=True,
default=False,
help='Build a container image for the pipeline using Dockerfile in the '
'current directory. If Dockerfile does not exist, a default Dockerfile '
'will be generated using --build-base-image.')
def create_pipeline(ctx: Context, engine: str, pipeline_path: str,
package_path: Optional[str],
build_target_image: Optional[str],
build_base_image: Optional[str],
skaffold_cmd: Optional[str], endpoint: Optional[str],
iap_client_id: Optional[str], namespace: str,
build_image: bool) -> None:
"""Command definition to create a pipeline."""
# TODO(b/179847638): Delete checks for deprecated flags.
_check_deprecated_image_build_flags(build_target_image, skaffold_cmd,
package_path)
if build_base_image is not None and not build_image:
sys.exit('--build-base-image used without --build-image. You have to use '
'--build-image flag to build a container image for the pipeline.')
# TODO(b/142358865): Add support for container building for Airflow and Beam
# runners when they support container executors.
click.echo('Creating pipeline')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.PIPELINE_DSL_PATH] = pipeline_path
ctx.flags_dict[labels.BASE_IMAGE] = build_base_image
ctx.flags_dict[labels.ENDPOINT] = endpoint
ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
ctx.flags_dict[labels.NAMESPACE] = namespace
ctx.flags_dict[labels.BUILD_IMAGE] = build_image
handler_factory.create_handler(ctx.flags_dict).create_pipeline()
@pipeline_group.command('update', help='Update an existing pipeline.')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='Orchestrator for pipelines')
@click.option(
'--pipeline_path',
'--pipeline-path',
required=True,
type=str,
help='Path to Python DSL file')
@click.option(
'--package_path',
'--package-path',
type=str,
default=None,
help='[DEPRECATED] Package path specified in a KubeflowDagRunner instace '
'will be used.')
@click.option(
'--skaffold_cmd',
'--skaffold-cmd',
default=None,
type=str,
help='[DEPRECATED] Skaffold is not used any more. Do not use this flag.')
@click.option(
'--endpoint',
default=None,
type=str,
help='Endpoint of the KFP API service to connect.')
@click.option(
'--iap_client_id',
'--iap-client-id',
default=None,
type=str,
help='Client ID for IAP protected endpoint.')
@click.option(
'-n',
'--namespace',
default='kubeflow',
type=str,
help='Kubernetes namespace to connect to the KFP API.')
@click.option(
'--build_image',
'--build-image',
is_flag=True,
default=False,
help='Build a container image for the pipeline using Dockerfile in the '
'current directory.')
def update_pipeline(ctx: Context, engine: str, pipeline_path: str,
package_path: Optional[str], skaffold_cmd: Optional[str],
endpoint: Optional[str], iap_client_id: Optional[str],
namespace: str, build_image: bool) -> None:
"""Command definition to update a pipeline."""
# TODO(b/179847638): Delete checks for deprecated flags.
_check_deprecated_image_build_flags(None, skaffold_cmd, package_path)
click.echo('Updating pipeline')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.PIPELINE_DSL_PATH] = pipeline_path
ctx.flags_dict[labels.ENDPOINT] = endpoint
ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
ctx.flags_dict[labels.NAMESPACE] = namespace
ctx.flags_dict[labels.BUILD_IMAGE] = build_image
handler_factory.create_handler(ctx.flags_dict).update_pipeline()
@pipeline_group.command('delete', help='Delete a pipeline')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='Orchestrator for pipelines')
@click.option(
'--pipeline_name',
'--pipeline-name',
required=True,
type=str,
help='Name of the pipeline')
@click.option(
'--endpoint',
default=None,
type=str,
help='Endpoint of the KFP API service to connect.')
@click.option(
'--iap_client_id',
'--iap-client-id',
default=None,
type=str,
help='Client ID for IAP protected endpoint.')
@click.option(
'-n',
'--namespace',
default='kubeflow',
type=str,
help='Kubernetes namespace to connect to the KFP API.')
def delete_pipeline(ctx: Context, engine: str, pipeline_name: str,
endpoint: str, iap_client_id: str, namespace: str) -> None:
"""Command definition to delete a pipeline."""
click.echo('Deleting pipeline')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.PIPELINE_NAME] = pipeline_name
ctx.flags_dict[labels.ENDPOINT] = endpoint
ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
ctx.flags_dict[labels.NAMESPACE] = namespace
handler_factory.create_handler(ctx.flags_dict).delete_pipeline()
@pipeline_group.command('list', help='List all the pipelines')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='orchestrator for pipelines')
@click.option(
'--endpoint',
default=None,
type=str,
help='Endpoint of the KFP API service to connect.')
@click.option(
'--iap_client_id',
'--iap-client-id',
default=None,
type=str,
help='Client ID for IAP protected endpoint.')
@click.option(
'-n',
'--namespace',
default='kubeflow',
type=str,
help='Kubernetes namespace to connect to the KFP API.')
def list_pipelines(ctx: Context, engine: str, endpoint: str, iap_client_id: str,
namespace: str) -> None:
"""Command definition to list pipelines."""
click.echo('Listing all pipelines')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.ENDPOINT] = endpoint
ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
ctx.flags_dict[labels.NAMESPACE] = namespace
handler_factory.create_handler(ctx.flags_dict).list_pipelines()
@pipeline_group.command('compile', help='Compile a pipeline')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='Orchestrator for pipelines')
@click.option(
'--pipeline_path',
'--pipeline-path',
required=True,
type=str,
help='Path to Python DSL.')
@click.option(
'--package_path',
'--package-path',
default=None,
type=str,
help='[DEPRECATED] Package path specified in a KubeflowDagRunner instace '
'will be used.')
def compile_pipeline(ctx: Context, engine: str, pipeline_path: str,
package_path: str) -> None:
"""Command definition to compile a pipeline."""
# TODO(b/179847638): Delete checks for deprecated flags.
_check_deprecated_image_build_flags(pipeline_package_path=package_path)
click.echo('Compiling pipeline')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.PIPELINE_DSL_PATH] = pipeline_path
handler_factory.create_handler(ctx.flags_dict).compile_pipeline()
@pipeline_group.command('schema', help='Obtain latest database schema.')
@pass_context
@click.option(
'--engine', default='auto', type=str, help='Orchestrator for pipelines')
@click.option(
'--pipeline_name',
'--pipeline-name',
required=True,
type=str,
help='Name of the pipeline')
def get_schema(ctx: Context, engine: str, pipeline_name: str) -> None:
"""Command definition to infer latest schema."""
click.echo('Getting latest schema.')
ctx.flags_dict[labels.ENGINE_FLAG] = engine
ctx.flags_dict[labels.PIPELINE_NAME] = pipeline_name
handler_factory.create_handler(ctx.flags_dict).get_schema()
| 4,523 |
2,564 | <gh_stars>1000+
//
// Created by CainHuang on 2020/1/12.
//
#include "MediaCodecVideoDecoder.h"
MediaCodecVideoDecoder::MediaCodecVideoDecoder(const std::shared_ptr<AVMediaDemuxer> &mediaDemuxer)
: AVMediaDecoder(mediaDemuxer) {
pCodecName = "h264_mediacodec";
}
void MediaCodecVideoDecoder::setDecoder(const char *name) {
// do nothing
}
int MediaCodecVideoDecoder::openDecoder(std::map<std::string, std::string> decodeOptions) {
int ret;
auto mediaDemuxer = mWeakDemuxer.lock();
if (!mediaDemuxer || !mediaDemuxer->getContext()) {
LOGE("Failed to find media demuxer");
return -1;
}
// 查找媒体流
ret = av_find_best_stream(mediaDemuxer->getContext(), getMediaType(), -1, -1, nullptr, 0);
if (ret < 0) {
LOGE("Failed to av_find_best_stream: %s", av_err2str(ret));
return ret;
}
// 获取媒体流
mStreamIndex = ret;
pStream = mediaDemuxer->getContext()->streams[mStreamIndex];
// 查找解码器
pCodec = avcodec_find_encoder_by_name(pCodecName);
if (!pCodec) {
LOGE("Failed to find codec: %s", pCodecName);
return AVERROR(ENOMEM);
}
pStream->codecpar->codec_id = pCodec->id;
// 创建解码上下文
pCodecCtx = avcodec_alloc_context3(pCodec);
if (!pCodecCtx) {
LOGE("Failed to alloc the %s codec context", av_get_media_type_string(getMediaType()));
return AVERROR(ENOMEM);
}
// 复制媒体流参数到解码上下文中
if ((ret = avcodec_parameters_to_context(pCodecCtx, pStream->codecpar)) < 0) {
LOGE("Failed to copy %s codec parameters to decoder context, result: %d",
av_get_media_type_string(getMediaType()), ret);
return ret;
}
// // TODO 需要将ffmpeg升级到4.0以上
// // 打开解码器之前,创建MediaCodec的硬解码上下文,用于绑定一个Java层传过来的Surface对象
// // 然后将硬解码上下文赋值给解码器上下文
// jobject surface = ...; // Java层的Surface对象
// AVBufferRef *device_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_MEDIACODEC);
// AVHWDeviceContext *ctx = (AVHWDeviceContext *)device_ref->data;
// AVMediaCodecDeviceContext *hwctx = ctx->hwctx;
// hwctx->surface = (void *)(intptr_t)surface;
// av_hwdevice_ctx_init(device_ref);
// pCodecCtx->hw_device_ctx = device_ref;
// 打开解码器
AVDictionary *options = nullptr;
auto it = decodeOptions.begin();
for (; it != decodeOptions.end(); it++) {
av_dict_set(&options, (*it).first.c_str(), (*it).second.c_str(), 0);
}
if ((ret = avcodec_open2(pCodecCtx, pCodec, &options)) < 0) {
LOGE("Failed to open %s codec, result: %d", av_get_media_type_string(getMediaType()), ret);
av_dict_free(&options);
return ret;
}
av_dict_free(&options);
// 初始化媒体数据
initMetadata();
return 0;
}
int MediaCodecVideoDecoder::decodePacket(AVPacket *packet, OnDecodeListener *listener,
int *gotFrame) {
return 0;
}
AVMediaType MediaCodecVideoDecoder::getMediaType() {
return AVMEDIA_TYPE_VIDEO;
}
void MediaCodecVideoDecoder::initMetadata() {
mWidth = pCodecCtx->width;
mHeight = pCodecCtx->height;
mPixelFormat = pCodecCtx->pix_fmt;
auto demuxer = mWeakDemuxer.lock().get();
if (demuxer) {
mFrameRate = (int) av_q2d(av_guess_frame_rate(demuxer->getContext(), pStream, nullptr));
pCodecCtx->time_base = av_inv_q(av_d2q(mFrameRate, 100000));
} else {
mFrameRate = 30;
pCodecCtx->time_base = av_inv_q(av_d2q(mFrameRate, 100000));
}
}
/**
* 直接把AVFrame的数据渲染到Surface中,需要ffmpeg4.0以上才能支持
* @param frame
*/
void MediaCodecVideoDecoder::renderFrame(AVFrame *frame) {
// TODO need to update ffmpeg 4.0
// if (frame->format == AV_PIX_FMT_MEDIACODEC) {
// AVMediaCodecBuffer *buffer = (AVMediaCodecBuffer *) frame->data[3];
// // 丢弃该帧
// av_mediacodec_release_buffer(buffer, 0);
// // 直接渲染到Surface上
// av_mediacodec_release_buffer(buffer, 1);
// // 在某个时间节点渲染到Surface上
// av_mediacodec_render_buffer_at_time(buffer, nanotime);
// }
} | 2,078 |
1,350 | <gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.billing.implementation;
import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Post;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.billing.fluent.ProductsClient;
import com.azure.resourcemanager.billing.fluent.models.ProductInner;
import com.azure.resourcemanager.billing.fluent.models.ValidateProductTransferEligibilityResultInner;
import com.azure.resourcemanager.billing.models.ProductsListResult;
import com.azure.resourcemanager.billing.models.ProductsMoveResponse;
import com.azure.resourcemanager.billing.models.TransferProductRequestProperties;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ProductsClient. */
public final class ProductsClientImpl implements ProductsClient {
private final ClientLogger logger = new ClientLogger(ProductsClientImpl.class);
/** The proxy service used to perform REST calls. */
private final ProductsService service;
/** The service client containing this operation class. */
private final BillingManagementClientImpl client;
/**
* Initializes an instance of ProductsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
ProductsClientImpl(BillingManagementClientImpl client) {
this.service = RestProxy.create(ProductsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
* The interface defining all the services for BillingManagementClientProducts to be used by the proxy service to
* perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "BillingManagementCli")
private interface ProductsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByCustomer(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("customerName") String customerName,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByBillingAccount(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@QueryParam("api-version") String apiVersion,
@QueryParam("$filter") String filter,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get(
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}"
+ "/products")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByBillingProfile(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("billingProfileName") String billingProfileName,
@QueryParam("api-version") String apiVersion,
@QueryParam("$filter") String filter,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get(
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}"
+ "/invoiceSections/{invoiceSectionName}/products")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByInvoiceSection(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("billingProfileName") String billingProfileName,
@PathParam("invoiceSectionName") String invoiceSectionName,
@QueryParam("api-version") String apiVersion,
@QueryParam("$filter") String filter,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductInner>> get(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("productName") String productName,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Patch("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductInner>> update(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("productName") String productName,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") ProductInner parameters,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Post("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/move")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<ProductsMoveResponse> move(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("productName") String productName,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") TransferProductRequestProperties parameters,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Post(
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}"
+ "/validateMoveEligibility")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ValidateProductTransferEligibilityResultInner>> validateMove(
@HostParam("$host") String endpoint,
@PathParam("billingAccountName") String billingAccountName,
@PathParam("productName") String productName,
@QueryParam("api-version") String apiVersion,
@BodyParam("application/json") TransferProductRequestProperties parameters,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByCustomerNext(
@PathParam(value = "nextLink", encoded = true) String nextLink,
@HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByBillingAccountNext(
@PathParam(value = "nextLink", encoded = true) String nextLink,
@HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByBillingProfileNext(
@PathParam(value = "nextLink", encoded = true) String nextLink,
@HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ProductsListResult>> listByInvoiceSectionNext(
@PathParam(value = "nextLink", encoded = true) String nextLink,
@HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByCustomerSinglePageAsync(
String billingAccountName, String customerName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (customerName == null) {
return Mono.error(new IllegalArgumentException("Parameter customerName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.listByCustomer(
this.client.getEndpoint(), billingAccountName, customerName, apiVersion, accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByCustomerSinglePageAsync(
String billingAccountName, String customerName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (customerName == null) {
return Mono.error(new IllegalArgumentException("Parameter customerName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByCustomer(this.client.getEndpoint(), billingAccountName, customerName, apiVersion, accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByCustomerAsync(String billingAccountName, String customerName) {
return new PagedFlux<>(
() -> listByCustomerSinglePageAsync(billingAccountName, customerName),
nextLink -> listByCustomerNextSinglePageAsync(nextLink));
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByCustomerAsync(
String billingAccountName, String customerName, Context context) {
return new PagedFlux<>(
() -> listByCustomerSinglePageAsync(billingAccountName, customerName, context),
nextLink -> listByCustomerNextSinglePageAsync(nextLink, context));
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByCustomer(String billingAccountName, String customerName) {
return new PagedIterable<>(listByCustomerAsync(billingAccountName, customerName));
}
/**
* Lists the products for a customer. These don't include products billed based on usage.The operation is supported
* only for billing accounts with agreement type Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByCustomer(String billingAccountName, String customerName, Context context) {
return new PagedIterable<>(listByCustomerAsync(billingAccountName, customerName, context));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingAccountSinglePageAsync(
String billingAccountName, String filter) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.listByBillingAccount(
this.client.getEndpoint(), billingAccountName, apiVersion, filter, accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingAccountSinglePageAsync(
String billingAccountName, String filter, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByBillingAccount(this.client.getEndpoint(), billingAccountName, apiVersion, filter, accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingAccountAsync(String billingAccountName, String filter) {
return new PagedFlux<>(
() -> listByBillingAccountSinglePageAsync(billingAccountName, filter),
nextLink -> listByBillingAccountNextSinglePageAsync(nextLink));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingAccountAsync(String billingAccountName) {
final String filter = null;
return new PagedFlux<>(
() -> listByBillingAccountSinglePageAsync(billingAccountName, filter),
nextLink -> listByBillingAccountNextSinglePageAsync(nextLink));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingAccountAsync(
String billingAccountName, String filter, Context context) {
return new PagedFlux<>(
() -> listByBillingAccountSinglePageAsync(billingAccountName, filter, context),
nextLink -> listByBillingAccountNextSinglePageAsync(nextLink, context));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByBillingAccount(String billingAccountName) {
final String filter = null;
return new PagedIterable<>(listByBillingAccountAsync(billingAccountName, filter));
}
/**
* Lists the products for a billing account. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByBillingAccount(String billingAccountName, String filter, Context context) {
return new PagedIterable<>(listByBillingAccountAsync(billingAccountName, filter, context));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingProfileSinglePageAsync(
String billingAccountName, String billingProfileName, String filter) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (billingProfileName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.listByBillingProfile(
this.client.getEndpoint(),
billingAccountName,
billingProfileName,
apiVersion,
filter,
accept,
context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingProfileSinglePageAsync(
String billingAccountName, String billingProfileName, String filter, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (billingProfileName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByBillingProfile(
this.client.getEndpoint(), billingAccountName, billingProfileName, apiVersion, filter, accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingProfileAsync(
String billingAccountName, String billingProfileName, String filter) {
return new PagedFlux<>(
() -> listByBillingProfileSinglePageAsync(billingAccountName, billingProfileName, filter),
nextLink -> listByBillingProfileNextSinglePageAsync(nextLink));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingProfileAsync(String billingAccountName, String billingProfileName) {
final String filter = null;
return new PagedFlux<>(
() -> listByBillingProfileSinglePageAsync(billingAccountName, billingProfileName, filter),
nextLink -> listByBillingProfileNextSinglePageAsync(nextLink));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByBillingProfileAsync(
String billingAccountName, String billingProfileName, String filter, Context context) {
return new PagedFlux<>(
() -> listByBillingProfileSinglePageAsync(billingAccountName, billingProfileName, filter, context),
nextLink -> listByBillingProfileNextSinglePageAsync(nextLink, context));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByBillingProfile(String billingAccountName, String billingProfileName) {
final String filter = null;
return new PagedIterable<>(listByBillingProfileAsync(billingAccountName, billingProfileName, filter));
}
/**
* Lists the products for a billing profile. These don't include products billed based on usage. The operation is
* supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByBillingProfile(
String billingAccountName, String billingProfileName, String filter, Context context) {
return new PagedIterable<>(listByBillingProfileAsync(billingAccountName, billingProfileName, filter, context));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByInvoiceSectionSinglePageAsync(
String billingAccountName, String billingProfileName, String invoiceSectionName, String filter) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (billingProfileName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
}
if (invoiceSectionName == null) {
return Mono
.error(new IllegalArgumentException("Parameter invoiceSectionName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.listByInvoiceSection(
this.client.getEndpoint(),
billingAccountName,
billingProfileName,
invoiceSectionName,
apiVersion,
filter,
accept,
context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByInvoiceSectionSinglePageAsync(
String billingAccountName,
String billingProfileName,
String invoiceSectionName,
String filter,
Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (billingProfileName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingProfileName is required and cannot be null."));
}
if (invoiceSectionName == null) {
return Mono
.error(new IllegalArgumentException("Parameter invoiceSectionName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByInvoiceSection(
this.client.getEndpoint(),
billingAccountName,
billingProfileName,
invoiceSectionName,
apiVersion,
filter,
accept,
context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByInvoiceSectionAsync(
String billingAccountName, String billingProfileName, String invoiceSectionName, String filter) {
return new PagedFlux<>(
() ->
listByInvoiceSectionSinglePageAsync(billingAccountName, billingProfileName, invoiceSectionName, filter),
nextLink -> listByInvoiceSectionNextSinglePageAsync(nextLink));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByInvoiceSectionAsync(
String billingAccountName, String billingProfileName, String invoiceSectionName) {
final String filter = null;
return new PagedFlux<>(
() ->
listByInvoiceSectionSinglePageAsync(billingAccountName, billingProfileName, invoiceSectionName, filter),
nextLink -> listByInvoiceSectionNextSinglePageAsync(nextLink));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ProductInner> listByInvoiceSectionAsync(
String billingAccountName,
String billingProfileName,
String invoiceSectionName,
String filter,
Context context) {
return new PagedFlux<>(
() ->
listByInvoiceSectionSinglePageAsync(
billingAccountName, billingProfileName, invoiceSectionName, filter, context),
nextLink -> listByInvoiceSectionNextSinglePageAsync(nextLink, context));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByInvoiceSection(
String billingAccountName, String billingProfileName, String invoiceSectionName) {
final String filter = null;
return new PagedIterable<>(
listByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, filter));
}
/**
* Lists the products for an invoice section. These don't include products billed based on usage. The operation is
* supported only for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param billingProfileName The ID that uniquely identifies a billing profile.
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
* @param filter May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'.
* It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value
* are separated by a colon (:).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ProductInner> listByInvoiceSection(
String billingAccountName,
String billingProfileName,
String invoiceSectionName,
String filter,
Context context) {
return new PagedIterable<>(
listByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, filter, context));
}
/**
* Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
* Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product by ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ProductInner>> getWithResponseAsync(String billingAccountName, String productName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.get(this.client.getEndpoint(), billingAccountName, productName, apiVersion, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
* Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product by ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ProductInner>> getWithResponseAsync(
String billingAccountName, String productName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service.get(this.client.getEndpoint(), billingAccountName, productName, apiVersion, accept, context);
}
/**
* Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
* Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product by ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ProductInner> getAsync(String billingAccountName, String productName) {
return getWithResponseAsync(billingAccountName, productName)
.flatMap(
(Response<ProductInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
* Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product by ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ProductInner get(String billingAccountName, String productName) {
return getAsync(billingAccountName, productName).block();
}
/**
* Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer
* Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product by ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ProductInner> getWithResponse(String billingAccountName, String productName, Context context) {
return getWithResponseAsync(billingAccountName, productName, context).block();
}
/**
* Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
* billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the update product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ProductInner>> updateWithResponseAsync(
String billingAccountName, String productName, ProductInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.update(
this.client.getEndpoint(),
billingAccountName,
productName,
apiVersion,
parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
* billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the update product operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ProductInner>> updateWithResponseAsync(
String billingAccountName, String productName, ProductInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.update(
this.client.getEndpoint(), billingAccountName, productName, apiVersion, parameters, accept, context);
}
/**
* Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
* billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the update product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ProductInner> updateAsync(String billingAccountName, String productName, ProductInner parameters) {
return updateWithResponseAsync(billingAccountName, productName, parameters)
.flatMap(
(Response<ProductInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
* billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the update product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ProductInner update(String billingAccountName, String productName, ProductInner parameters) {
return updateAsync(billingAccountName, productName, parameters).block();
}
/**
* Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for
* billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the update product operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ProductInner> updateWithResponse(
String billingAccountName, String productName, ProductInner parameters, Context context) {
return updateWithResponseAsync(billingAccountName, productName, parameters, context).block();
}
/**
* Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
* profile as the existing invoice section. This operation is supported only for products that are purchased with a
* recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the move product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ProductsMoveResponse> moveWithResponseAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.move(
this.client.getEndpoint(),
billingAccountName,
productName,
apiVersion,
parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
* profile as the existing invoice section. This operation is supported only for products that are purchased with a
* recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the move product operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ProductsMoveResponse> moveWithResponseAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.move(this.client.getEndpoint(), billingAccountName, productName, apiVersion, parameters, accept, context);
}
/**
* Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
* profile as the existing invoice section. This operation is supported only for products that are purchased with a
* recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the move product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ProductInner> moveAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
return moveWithResponseAsync(billingAccountName, productName, parameters)
.flatMap(
(ProductsMoveResponse res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
* profile as the existing invoice section. This operation is supported only for products that are purchased with a
* recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the move product operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ProductInner move(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
return moveAsync(billingAccountName, productName, parameters).block();
}
/**
* Moves a product's charges to a new invoice section. The new invoice section must belong to the same billing
* profile as the existing invoice section. This operation is supported only for products that are purchased with a
* recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the move product operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a product.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ProductsMoveResponse moveWithResponse(
String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) {
return moveWithResponseAsync(billingAccountName, productName, parameters, context).block();
}
/**
* Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
* products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
* Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the validate move eligibility operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the product transfer eligibility validation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ValidateProductTransferEligibilityResultInner>> validateMoveWithResponseAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
.validateMove(
this.client.getEndpoint(),
billingAccountName,
productName,
apiVersion,
parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
* products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
* Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the validate move eligibility operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the product transfer eligibility validation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ValidateProductTransferEligibilityResultInner>> validateMoveWithResponseAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (billingAccountName == null) {
return Mono
.error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
}
if (productName == null) {
return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.validateMove(
this.client.getEndpoint(), billingAccountName, productName, apiVersion, parameters, accept, context);
}
/**
* Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
* products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
* Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the validate move eligibility operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the product transfer eligibility validation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ValidateProductTransferEligibilityResultInner> validateMoveAsync(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
return validateMoveWithResponseAsync(billingAccountName, productName, parameters)
.flatMap(
(Response<ValidateProductTransferEligibilityResultInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
* products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
* Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the validate move eligibility operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the product transfer eligibility validation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ValidateProductTransferEligibilityResultInner validateMove(
String billingAccountName, String productName, TransferProductRequestProperties parameters) {
return validateMoveAsync(billingAccountName, productName, parameters).block();
}
/**
* Validates if a product's charges can be moved to a new invoice section. This operation is supported only for
* products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft
* Customer Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param productName The ID that uniquely identifies a product.
* @param parameters Request parameters that are provided to the validate move eligibility operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the product transfer eligibility validation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ValidateProductTransferEligibilityResultInner> validateMoveWithResponse(
String billingAccountName, String productName, TransferProductRequestProperties parameters, Context context) {
return validateMoveWithResponseAsync(billingAccountName, productName, parameters, context).block();
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByCustomerNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listByCustomerNext(nextLink, this.client.getEndpoint(), accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByCustomerNextSinglePageAsync(String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByCustomerNext(nextLink, this.client.getEndpoint(), accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingAccountNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.listByBillingAccountNext(nextLink, this.client.getEndpoint(), accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingAccountNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByBillingAccountNext(nextLink, this.client.getEndpoint(), accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingProfileNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.listByBillingProfileNext(nextLink, this.client.getEndpoint(), accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByBillingProfileNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByBillingProfileNext(nextLink, this.client.getEndpoint(), accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByInvoiceSectionNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
return FluxUtil
.withContext(
context -> service.listByInvoiceSectionNext(nextLink, this.client.getEndpoint(), accept, context))
.<PagedResponse<ProductInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of products.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ProductInner>> listByInvoiceSectionNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByInvoiceSectionNext(nextLink, this.client.getEndpoint(), accept, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
}
| 36,348 |
1,470 | <reponame>justinvanwinkle/glom<filename>glom/test/test_reduction.py
import operator
import pytest
from boltons.dictutils import OMD
from glom import glom, T, Sum, Fold, Flatten, Coalesce, flatten, FoldError, Glommer, Merge, merge
def test_sum_integers():
target = list(range(5))
assert glom(target, Sum()) == 10
assert glom(target, Sum(init=lambda: 2)) == 12
target = []
assert glom(target, Sum()) == 0
target = [{"num": 3}, {"num": 2}, {"num": -1}]
assert glom(target, Sum(['num'])) == 4
target = target + [{}] # add a non-compliant dict
assert glom(target, Sum([Coalesce('num', default=0)])) ==4
assert repr(Sum()) == 'Sum()'
assert repr(Sum(len, init=float)) == 'Sum(len, init=float)'
def test_sum_seqs():
target = [(x,) for x in range(4)]
assert glom(target, Sum(init=tuple)) == (0, 1, 2, 3)
# would not work with builtin sum(), gets:
# "TypeError: sum() can't sum strings [use ''.join(seq) instead]"
# Works here for now. If we're ok with that error, then we can
# switch to sum().
target = ['a', 'b', 'cd']
assert glom(target, Sum(init=str)) == 'abcd'
target = [['a'], ['b'], ['cde'], ['']]
assert glom(target, Sum(Sum(init=list), init=str)) == 'abcde'
def test_fold():
target = range(1, 5)
assert glom(target, Fold(T, int)) == 10
assert glom(target, Fold(T, init=lambda: 2)) == 12
assert glom(target, Fold(T, lambda: 1, op=lambda l, r: l * r)) == 24
assert repr(Fold(T, int)) == 'Fold(T, init=int)'
assert repr(Fold(T, int, op=operator.imul)).startswith('Fold(T, init=int, op=<')
# signature coverage
with pytest.raises(TypeError):
Fold(T, list, op=None) # noncallable op
with pytest.raises(TypeError):
Fold(T, init=None) # noncallable init
def test_fold_bad_iter():
glommer = Glommer(register_default_types=False)
def bad_iter(obj):
raise RuntimeError('oops')
glommer.register(list, iterate=bad_iter)
with pytest.raises(TypeError):
target = []
glommer.glom(target, Flatten())
def test_flatten():
target = [[1], [2], [3, 4]]
assert glom(target, Flatten()) == [1, 2, 3, 4]
target = [(1, 2), [3]]
assert glom(target, Flatten()) == [1, 2, 3]
gen = glom(target, Flatten(init='lazy'))
assert next(gen) == 1
assert list(gen) == [2, 3]
assert repr(Flatten()) == 'Flatten()'
assert repr(Flatten(init='lazy')) == "Flatten(init='lazy')"
assert repr(Flatten(init=tuple)) == "Flatten(init=tuple)"
def test_flatten_func():
target = [[1], [2], [3, 4]]
assert flatten(target) == [1, 2, 3, 4]
two_level_target = [[x] for x in target]
assert flatten(two_level_target, levels=2) == [1, 2, 3, 4]
assert flatten(two_level_target, levels=0) == two_level_target
unflattenable = 2
with pytest.raises(FoldError):
assert flatten(unflattenable)
# kind of an odd use, but it works for now
assert flatten(['a', 'b', 'cd'], init=str) == 'abcd'
# another odd case
subspec_target = {'items': {'numbers': [1, 2, 3]}}
assert (flatten(subspec_target, spec='items.numbers', init=int) == 6)
# basic signature tests
with pytest.raises(ValueError):
flatten([], levels=-1)
with pytest.raises(TypeError):
flatten([], nonexistentkwarg=False)
return
def test_merge():
target = [{'a': 'A'}, {'b': 'B'}]
assert glom(target, Merge()) == {'a': 'A', 'b': 'B'}
assert glom(target, Merge(op=dict.update)) == {'a': 'A', 'b': 'B'}
with pytest.raises(ValueError):
Merge(init=list) # has no .update()
with pytest.raises(ValueError):
Merge(op='update_extend') # doesn't work on base dict, the default init
def test_merge_omd():
target = [{'a': 'A'}, {'a': 'aleph'}]
assert glom(target, Merge(init=OMD)) == OMD({'a': 'aleph'})
assert glom(target, Merge(init=OMD, op='update_extend')) == OMD([('a', 'A'), ('a', 'aleph')])
def test_merge_func():
target = [{'a': 'A'}, {'b': 'B'}]
assert merge(target) == {'a': 'A', 'b': 'B'}
assert merge([]) == {}
# basic signature test
with pytest.raises(TypeError):
merge([], nonexistentkwarg=False)
| 1,770 |
9,724 | #include <stdio.h>
// Note the prefixing (a_, b_) on all functions from the two libraries.
extern void a_wasmbox_init(void);
extern void b_wasmbox_init(void);
extern int (*a_Z_twiceZ_ii)(int);
extern int (*b_Z_thriceZ_ii)(int);
int main() {
puts("Initializing sandboxed unsafe libraries");
a_wasmbox_init();
b_wasmbox_init();
printf("Calling twice on 21 returns %d\n", a_Z_twiceZ_ii(21));
printf("Calling thrice on 10 returns %d\n", b_Z_thriceZ_ii(10));
}
| 187 |
852 | <filename>CommonTools/TriggerUtils/test/genericTriggerEventFlagTest_cfg.py
import FWCore.ParameterSet.Config as cms
process = cms.Process( "TEST" )
## Logging
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.threshold = 'INFO'
process.MessageLogger.cerr.GenericTriggerEventFlag = cms.untracked.PSet( limit = cms.untracked.int32( -1 ) )
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool( True ) )
# Conditions
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag( process.GlobalTag, 'auto:com10' )
## Source
process.source = cms.Source( "PoolSource"
, fileNames = cms.untracked.vstring( '/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012D-v1/00000/005835E9-05E0-E211-BA7B-003048F1C7C0.root'
)
#, skipEvents = cms.untracked.uint32( 0 )
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32( 10 ) )
# Test modules
# GT
process.genericTriggerEventFlagGTPass = cms.EDFilter( "GenericTriggerEventFlagTest"
, andOr = cms.bool( False )
, verbosityLevel = cms.uint32( 2 )
, andOrGt = cms.bool( False )
, gtInputTag = cms.InputTag( 'gtDigis' )
, gtEvmInputTag = cms.InputTag( 'gtEvmDigis' )
, gtStatusBits = cms.vstring( 'PhysDecl'
)
, errorReplyGt = cms.bool( False )
)
process.genericTriggerEventFlagGTFail = process.genericTriggerEventFlagGTPass.clone( gtStatusBits = [ '900GeV' ] )
process.genericTriggerEventFlagGTTest = process.genericTriggerEventFlagGTPass.clone( gtStatusBits = [ '8TeV' ] )
process.genericTriggerEventFlagGTTestFail = process.genericTriggerEventFlagGTPass.clone( gtInputTag = 'whateverDigis' )
# L1
process.genericTriggerEventFlagL1Pass = cms.EDFilter( "GenericTriggerEventFlagTest"
, andOr = cms.bool( False )
, verbosityLevel = cms.uint32( 2 )
, andOrL1 = cms.bool( False )
, l1Algorithms = cms.vstring( 'L1_SingleMu12 OR L1_SingleMu14_Eta2p1'
)
, errorReplyL1 = cms.bool( False )
)
process.genericTriggerEventFlagL1Fail = process.genericTriggerEventFlagL1Pass.clone( l1Algorithms = [ 'L1_SingleMu12_' ] )
process.genericTriggerEventFlagL1Test = process.genericTriggerEventFlagL1Pass.clone( l1Algorithms = [ 'L1_SingleMu12* OR L1_SingleMu14*' ] )
process.genericTriggerEventFlagL1TestFail = process.genericTriggerEventFlagL1Pass.clone( l1Algorithms = [ 'L1_SingleMu12_v*' ] )
# HLT
process.genericTriggerEventFlagHLTPass = cms.EDFilter( "GenericTriggerEventFlagTest"
, andOr = cms.bool( False )
, verbosityLevel = cms.uint32( 2 )
, andOrHlt = cms.bool( False )
, hltInputTag = cms.InputTag( 'TriggerResults::HLT' )
, hltPaths = cms.vstring( 'HLT_IsoMu24_eta2p1_v13' # only in 2012B
)
, errorReplyHlt = cms.bool( False )
)
process.genericTriggerEventFlagHLTFail = process.genericTriggerEventFlagHLTPass.clone( hltPaths = [ 'HLT_IsoMu24_eta2p1' ] )
process.genericTriggerEventFlagHLTTestTight = process.genericTriggerEventFlagHLTPass.clone( hltPaths = [ 'HLT_IsoMu24_eta2p1_v*' ] )
process.genericTriggerEventFlagHLTTestLoose = process.genericTriggerEventFlagHLTPass.clone( hltPaths = [ 'HLT_IsoMu24_*' ] )
process.genericTriggerEventFlagHLTTestFail = process.genericTriggerEventFlagHLTPass.clone( hltPaths = [ 'HLT_IsoMu2*_v*' ] ) # does not fail, in fact :-)
# Paths
# GT
process.pGTPass = cms.Path(
process.genericTriggerEventFlagGTPass
)
process.pGTFail = cms.Path(
process.genericTriggerEventFlagGTFail
)
process.pGTTest = cms.Path(
process.genericTriggerEventFlagGTTest
)
process.pGTTestFail = cms.Path(
process.genericTriggerEventFlagGTTestFail
)
# L1
process.pL1Pass = cms.Path(
process.genericTriggerEventFlagL1Pass
)
process.pL1Fail = cms.Path(
process.genericTriggerEventFlagL1Fail
)
process.pL1Test = cms.Path(
process.genericTriggerEventFlagL1Test
)
process.pL1TestFail = cms.Path(
process.genericTriggerEventFlagL1TestFail
)
# HLT
process.pHLTPass = cms.Path(
process.genericTriggerEventFlagHLTPass
)
process.pHLTFail = cms.Path(
process.genericTriggerEventFlagHLTFail
)
process.pHLTTestTight = cms.Path(
process.genericTriggerEventFlagHLTTestTight
)
process.pHLTTestLoose = cms.Path(
process.genericTriggerEventFlagHLTTestLoose
)
process.pHLTTestFail = cms.Path(
process.genericTriggerEventFlagHLTTestFail
)
| 1,799 |
3,084 | /*++
Copyright (c) Microsoft Corporation. All rights reserved
Abstract:
Monitor Sample callout driver IOCTL header
Environment:
Kernel mode
--*/
#pragma once
#define MONITOR_DEVICE_NAME L"\\Device\\MonitorSample"
#define MONITOR_SYMBOLIC_NAME L"\\DosDevices\\Global\\MonitorSample"
#define MONITOR_DOS_NAME L"\\\\.\\MonitorSample"
typedef enum _MONITOR_OPERATION_MODE
{
invalidOperation = 0,
monitorTraffic = 1,
monitorOperationMax
} MONITOR_OPERATION_MODE;
typedef struct _MONITOR_SETTINGS
{
MONITOR_OPERATION_MODE monitorOperation;
UINT32 flags;
} MONITOR_SETTINGS;
#define MONITOR_IOCTL_ENABLE_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x1, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define MONITOR_IOCTL_DISABLE_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x2, METHOD_BUFFERED, FILE_ANY_ACCESS)
| 387 |
2,151 | /*
* This file is part of Wireless Display Software for Linux OS
*
* Copyright (C) 2014 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef LIBWDS_RTSP_CLIENTRTPPORTS_H_
#define LIBWDS_RTSP_CLIENTRTPPORTS_H_
#include "libwds/rtsp/property.h"
namespace wds {
namespace rtsp {
class ClientRtpPorts: public Property {
public:
ClientRtpPorts(unsigned short rtp_port_0, unsigned short rtp_port_1);
~ClientRtpPorts() override;
unsigned short rtp_port_0() const { return rtp_port_0_; }
unsigned short rtp_port_1() const { return rtp_port_1_; }
std::string ToString() const override;
private:
unsigned short rtp_port_0_;
unsigned short rtp_port_1_;
};
} // namespace rtsp
} // namespace wds
#endif // LIBWDS_RTSP_CLIENTRTPPORTS_H_
| 459 |
615 | /*
* 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.alipay.sofa.ark.loader.jar;
import com.alipay.sofa.ark.loader.data.RandomAccessData;
import com.alipay.sofa.ark.loader.data.RandomAccessData.ResourceAccess;
import java.io.IOException;
import java.io.InputStream;
/**
* Utilities for dealing with bytes from ZIP files.
*
* @author <NAME>
*/
final public class Bytes {
private static final byte[] EMPTY_BYTES = new byte[] {};
private Bytes() {
}
public static byte[] get(RandomAccessData data) throws IOException {
InputStream inputStream = data.getInputStream(ResourceAccess.ONCE);
try {
return get(inputStream, data.getSize());
} finally {
inputStream.close();
}
}
public static byte[] get(InputStream inputStream, long length) throws IOException {
if (length == 0) {
return EMPTY_BYTES;
}
byte[] bytes = new byte[(int) length];
if (!fill(inputStream, bytes)) {
throw new IOException("Unable to read bytes");
}
return bytes;
}
public static boolean fill(InputStream inputStream, byte[] bytes) throws IOException {
return fill(inputStream, bytes, 0, bytes.length);
}
private static boolean fill(InputStream inputStream, byte[] bytes, int offset, int length)
throws IOException {
while (length > 0) {
int read = inputStream.read(bytes, offset, length);
if (read == -1) {
return false;
}
offset += read;
length = -read;
}
return true;
}
public static long littleEndianValue(byte[] bytes, int offset, int length) {
long value = 0;
for (int i = length - 1; i >= 0; i--) {
value = ((value << 8) | (bytes[offset + i] & 0xFF));
}
return value;
}
}
| 1,055 |
45,293 | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: compiler/ir/serialization.common/src/KotlinIr.proto
package org.jetbrains.kotlin.backend.common.serialization.proto;
public interface IrErrorCallExpressionOrBuilder extends
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression)
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/**
* <code>required int32 description = 1;</code>
*/
boolean hasDescription();
/**
* <code>required int32 description = 1;</code>
*/
int getDescription();
/**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression receiver = 2;</code>
*/
boolean hasReceiver();
/**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression receiver = 2;</code>
*/
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getReceiver();
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value_argument = 3;</code>
*/
java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression>
getValueArgumentList();
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value_argument = 3;</code>
*/
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getValueArgument(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value_argument = 3;</code>
*/
int getValueArgumentCount();
} | 574 |
809 | /**
* @file
* @brief
*
* @date 28.10.13
* @author <NAME>
*/
#include <errno.h>
#include <stddef.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <string.h>
#include "family.h"
#include "net_sock.h"
#include <mem/misc/pool.h>
#include <net/inetdevice.h>
#include <net/l3/route.h>
#include <net/l3/ipv6.h>
#include <net/sock.h>
#include <net/socket/inet6_sock.h>
#include <framework/mod/options.h>
#define MODOPS_AMOUNT_INET_SOCK OPTION_GET(NUMBER, amount_inet6_sock)
static const struct sock_family_ops inet6_stream_ops;
static const struct sock_family_ops inet6_dgram_ops;
static const struct sock_family_ops inet6_raw_ops;
static const struct net_family_type inet6_types[] = {
{ SOCK_STREAM, &inet6_stream_ops },
{ SOCK_DGRAM, &inet6_dgram_ops },
{ SOCK_RAW, &inet6_raw_ops }
};
EMBOX_NET_FAMILY(AF_INET6, inet6_types, ip6_out_ops);
static int inet6_init(struct sock *sk) {
struct inet6_sock *in6_sk;
assert(sk);
in6_sk = to_inet6_sock(sk);
memset(&in6_sk->src_in6, 0, sizeof in6_sk->src_in6);
memset(&in6_sk->dst_in6, 0, sizeof in6_sk->dst_in6);
in6_sk->src_in6.sin6_family = in6_sk->dst_in6.sin6_family = AF_UNSPEC;
in6_sk->sk.src_addr = (const struct sockaddr *)&in6_sk->src_in6;
in6_sk->sk.dst_addr = (const struct sockaddr *)&in6_sk->dst_in6;
in6_sk->sk.addr_len = sizeof(struct sockaddr_in6);
return 0;
}
static int inet6_close(struct sock *sk) {
assert(sk);
assert(sk->p_ops != NULL);
if (sk->p_ops->close == NULL) {
sock_release(sk);
return 0;
}
return sk->p_ops->close(sk);
}
static void __inet6_bind(struct inet6_sock *in6_sk,
const struct sockaddr_in6 *addr_in6) {
assert(in6_sk != NULL);
assert(addr_in6 != NULL);
assert(addr_in6->sin6_family == AF_INET6);
memcpy(&in6_sk->src_in6, addr_in6, sizeof *addr_in6);
}
static int inet6_addr_tester(const struct sockaddr *lhs_sa,
const struct sockaddr *rhs_sa) {
const struct sockaddr_in6 *lhs_in6, *rhs_in6;
assert(lhs_sa != NULL);
assert(rhs_sa != NULL);
lhs_in6 = (const struct sockaddr_in6 *)lhs_sa;
rhs_in6 = (const struct sockaddr_in6 *)rhs_sa;
assert(lhs_in6->sin6_family == AF_INET6);
return (lhs_in6->sin6_family == rhs_in6->sin6_family)
&& ((0 == memcmp(&lhs_in6->sin6_addr, &rhs_in6->sin6_addr,
sizeof lhs_in6->sin6_addr))
|| (0 == memcmp(&lhs_in6->sin6_addr, &in6addr_any,
sizeof lhs_in6->sin6_addr))
|| (0 == memcmp(&rhs_in6->sin6_addr, &in6addr_any,
sizeof rhs_in6->sin6_addr)))
&& (lhs_in6->sin6_port == rhs_in6->sin6_port);
}
static int inet6_bind(struct sock *sk, const struct sockaddr *addr,
socklen_t addrlen) {
const struct sockaddr_in6 *addr_in6;
assert(sk);
assert(addr);
if (addrlen != sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (const struct sockaddr_in6 *)addr;
if (addr_in6->sin6_family != AF_INET6) {
return -EAFNOSUPPORT;
}
else if ((0 != memcmp(&addr_in6->sin6_addr, &in6addr_any,
sizeof addr_in6->sin6_addr))
&& (0 != memcmp(&addr_in6->sin6_addr,
&in6addr_loopback, sizeof addr_in6->sin6_addr))) {
/* FIXME */
return -EADDRNOTAVAIL;
}
else if (sock_addr_is_busy(sk->p_ops, inet6_addr_tester, addr,
addrlen)) {
return -EADDRINUSE;
}
__inet6_bind(to_inet6_sock(sk), addr_in6);
return 0;
}
static int inet6_bind_local(struct sock *sk) {
struct sockaddr_in6 addr_in6;
assert(sk);
addr_in6.sin6_family = AF_INET6;
memcpy(&addr_in6.sin6_addr, &in6addr_loopback,
sizeof addr_in6.sin6_addr);
if (!sock_addr_alloc_port(sk->p_ops, &addr_in6.sin6_port,
inet6_addr_tester, (const struct sockaddr *)&addr_in6,
sizeof addr_in6)) {
return -ENOMEM;
}
__inet6_bind(to_inet6_sock(sk), &addr_in6);
return 0;
}
static int __inet6_connect(struct inet6_sock *in6_sk,
const struct sockaddr_in6 *addr_in6) {
// int ret;
// in_addr_t src_ip;
assert(in6_sk != NULL);
assert(addr_in6 != NULL);
assert(addr_in6->sin6_family == AF_INET6);
#if 0
/* FIXME */
ret = rt_fib_source_ip(addr_in6->sin6_addr.s_addr, &src_ip);
if (ret != 0) {
return ret;
}
if ((in6_sk->src_in6.sin6_addr.s_addr != htonl(INADDR_ANY))
&& (in6_sk->src_in6.sin6_addr.s_addr != src_ip)) {
return -EINVAL;
}
in6_sk->src_in6.sin6_addr.s_addr = src_ip;
#endif
memcpy(&in6_sk->dst_in6, addr_in6, sizeof *addr_in6);
return 0;
}
static int inet6_stream_connect(struct sock *sk,
const struct sockaddr *addr, socklen_t addrlen,
int flags) {
int ret;
const struct sockaddr_in6 *addr_in6;
assert(sk);
assert(addr);
if (addrlen != sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (const struct sockaddr_in6 *)addr;
if (addr_in6->sin6_family != AF_INET6) {
return -EINVAL;
}
ret = __inet6_connect(to_inet6_sock(sk), addr_in6);
if (ret != 0) {
return ret;
}
assert(sk->p_ops != NULL);
if (sk->p_ops->connect == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->connect(sk, addr, addrlen, flags);
}
static int inet6_nonstream_connect(struct sock *sk,
const struct sockaddr *addr, socklen_t addrlen,
int flags) {
int ret;
const struct sockaddr_in6 *addr_in6;
assert(sk);
assert(addr);
if (addrlen != sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (const struct sockaddr_in6 *)addr;
if (addr_in6->sin6_family != AF_INET6) {
return -EINVAL;
}
ret = __inet6_connect(to_inet6_sock(sk), addr_in6);
if (ret != 0) {
return ret;
}
assert(sk->p_ops != NULL);
if (sk->p_ops->connect == NULL) {
return 0;
}
return sk->p_ops->connect(sk, addr, addrlen, flags);
}
static int inet6_listen(struct sock *sk, int backlog) {
assert(sk);
assert(backlog >= 0);
assert(sk->p_ops != NULL);
if (sk->p_ops->listen == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->listen(sk, backlog);
}
static int inet6_accept(struct sock *sk, struct sockaddr *addr,
socklen_t *addrlen, int flags, struct sock **out_sk) {
int ret;
struct sockaddr_in6 *addr_in6;
assert(sk);
assert(out_sk);
addr_in6 = (struct sockaddr_in6 *)addr;
if (((addr_in6 == NULL) && (addrlen != NULL))
|| ((addr_in6 != NULL) && (addrlen == NULL))
|| ((addrlen != NULL) && (*addrlen < sizeof *addr_in6))) {
return -EINVAL;
}
assert(sk->p_ops != NULL);
if (sk->p_ops->accept == NULL) {
return -EOPNOTSUPP;
}
ret = sk->p_ops->accept(sk, addr, addrlen, flags, out_sk);
if (ret != 0) {
return ret;
}
if (addr_in6 != NULL) {
memcpy(addr_in6, &to_inet6_sock(*out_sk)->dst_in6, sizeof *addr_in6);
assert(addr_in6->sin6_family == AF_INET6);
*addrlen = sizeof *addr_in6;
}
return 0;
}
static int inet6_sendmsg(struct sock *sk, struct msghdr *msg,
int flags) {
const struct sockaddr_in6 *addr_in6;
assert(sk);
assert(msg);
addr_in6 = (const struct sockaddr_in6 *)msg->msg_name;
if ((addr_in6 != NULL) &&
((msg->msg_namelen != sizeof *addr_in6)
|| (addr_in6->sin6_family != AF_INET6))) {
return -EINVAL;
}
assert(sk->p_ops != NULL);
if (sk->p_ops->sendmsg == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->sendmsg(sk, msg, flags);
}
static int inet6_recvmsg(struct sock *sk, struct msghdr *msg,
int flags) {
int ret;
struct sockaddr_in6 *addr_in6;
assert(sk);
assert(msg);
assert(sk->p_ops != NULL);
if (sk->p_ops->recvmsg == NULL) {
return -EOPNOTSUPP;
}
ret = sk->p_ops->recvmsg(sk, msg, flags);
if (ret != 0) {
return ret;
}
if (msg->msg_name != NULL) {
if (msg->msg_namelen < sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (struct sockaddr_in6 *)msg->msg_name;
memcpy(addr_in6, &to_inet6_sock(sk)->dst_in6, sizeof *addr_in6);
assert(addr_in6->sin6_family == AF_INET6);
msg->msg_namelen = sizeof *addr_in6;
}
return 0;
}
static int inet6_getsockname(struct sock *sk,
struct sockaddr *addr, socklen_t *addrlen) {
struct sockaddr_in6 *addr_in6;
assert(sk);
assert(addr);
assert(addrlen);
if (*addrlen < sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (struct sockaddr_in6 *)addr;
memcpy(addr_in6, &to_inet6_sock(sk)->src_in6, sizeof *addr_in6);
#if 0
assert((addr_in6->sin6_family == AF_UNSPEC)
|| (addr_in6->sin6_family == AF_INET6));
#else
addr_in6->sin6_family = AF_INET6;
#endif
*addrlen = sizeof *addr_in6;
return 0;
}
static int inet6_getpeername(struct sock *sk,
struct sockaddr *addr, socklen_t *addrlen) {
struct sockaddr_in6 *addr_in6;
assert(sk);
assert(addr);
assert(addrlen);
if (*addrlen < sizeof *addr_in6) {
return -EINVAL;
}
addr_in6 = (struct sockaddr_in6 *)addr;
memcpy(addr_in6, &to_inet6_sock(sk)->dst_in6, sizeof *addr_in6);
#if 0
assert((addr_in6->sin6_family == AF_UNSPEC)
|| (addr_in6->sin6_family == AF_INET6));
#else
addr_in6->sin6_family = AF_INET6;
#endif
*addrlen = sizeof *addr_in6;
return 0;
}
static int inet6_getsockopt(struct sock *sk, int level,
int optname, void *optval, socklen_t *optlen) {
assert(sk);
assert(optval);
assert(optlen);
assert(*optlen >= 0);
if (level != IPPROTO_IPV6) {
assert(sk->p_ops != NULL);
if (sk->p_ops->getsockopt == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->getsockopt(sk, level, optname, optval,
optlen);
}
switch (optname) {
default:
return -ENOPROTOOPT;
}
return 0;
}
static int inet6_setsockopt(struct sock *sk, int level,
int optname, const void *optval, socklen_t optlen) {
assert(sk);
assert(optval);
assert(optlen >= 0);
if (level != IPPROTO_IPV6) {
assert(sk->p_ops != NULL);
if (sk->p_ops->setsockopt == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->setsockopt(sk, level, optname, optval,
optlen);
}
switch (optname) {
default:
return -ENOPROTOOPT;
}
return 0;
}
static int inet6_shutdown(struct sock *sk, int how) {
assert(sk);
assert(sk->p_ops != NULL);
if (sk->p_ops->shutdown == NULL) {
return -EOPNOTSUPP;
}
return sk->p_ops->shutdown(sk, how);
}
POOL_DEF(inet6_sock_pool, struct inet6_sock, MODOPS_AMOUNT_INET_SOCK);
static const struct sock_family_ops inet6_stream_ops = {
.init = inet6_init,
.close = inet6_close,
.bind = inet6_bind,
.bind_local = inet6_bind_local,
.connect = inet6_stream_connect,
.listen = inet6_listen,
.accept = inet6_accept,
.sendmsg = inet6_sendmsg,
.recvmsg = inet6_recvmsg,
.getsockname = inet6_getsockname,
.getpeername = inet6_getpeername,
.getsockopt = inet6_getsockopt,
.setsockopt = inet6_setsockopt,
.shutdown = inet6_shutdown,
.sock_pool = &inet6_sock_pool
};
static const struct sock_family_ops inet6_dgram_ops = {
.init = inet6_init,
.close = inet6_close,
.bind = inet6_bind,
.bind_local = inet6_bind_local,
.connect = inet6_nonstream_connect,
.listen = inet6_listen,
.accept = inet6_accept,
.sendmsg = inet6_sendmsg,
.recvmsg = inet6_recvmsg,
.getsockname = inet6_getsockname,
.getpeername = inet6_getpeername,
.getsockopt = inet6_getsockopt,
.setsockopt = inet6_setsockopt,
.shutdown = inet6_shutdown,
.sock_pool = &inet6_sock_pool
};
static const struct sock_family_ops inet6_raw_ops = {
.init = inet6_init,
.close = inet6_close,
.bind = inet6_bind,
.bind_local = inet6_bind_local,
.connect = inet6_nonstream_connect,
.listen = inet6_listen,
.accept = inet6_accept,
.sendmsg = inet6_sendmsg,
.recvmsg = inet6_recvmsg,
.getsockname = inet6_getsockname,
.getpeername = inet6_getpeername,
.getsockopt = inet6_getsockopt,
.setsockopt = inet6_setsockopt,
.shutdown = inet6_shutdown,
.sock_pool = &inet6_sock_pool
};
| 5,298 |
14,668 | // Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.app;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import org.chromium.base.process_launcher.ChildProcessService;
import org.chromium.content_public.app.ChildProcessServiceFactory;
/**
* Service implementation which calls through to a ChildProcessService that uses the content
* specific delegate.
* The [Sandboxed|Privileged]ProcessService0, 1.. etc classes are the subclasses for sandboxed/non
* sandboxed child processes.
* The embedding application must declare these service instances in the application section
* of its AndroidManifest.xml, first with some meta-data describing the services:
* <meta-data android:name="org.chromium.content.browser.NUM_[SANDBOXED|PRIVILEGED]_SERVICES"
* android:value="N"/>
* <meta-data android:name="org.chromium.content.browser.[SANDBOXED|PRIVILEGED]_SERVICES_NAME"
* android:value="org.chromium.content.app.[Sandboxed|Privileged]ProcessService"/>
* and then N entries of the form:
* <service android:name="org.chromium.content.app.[Sandboxed|Privileged]ProcessServiceX"
* android:process=":[sandboxed|privileged]_processX" />
*/
public class ContentChildProcessService extends Service {
private ChildProcessService mService;
public ContentChildProcessService() {}
@Override
public void onCreate() {
super.onCreate();
mService = ChildProcessServiceFactory.create(this, getApplicationContext());
mService.onCreate();
}
@Override
public void onDestroy() {
super.onDestroy();
mService.onDestroy();
mService = null;
}
@Override
public IBinder onBind(Intent intent) {
return mService.onBind(intent);
}
}
| 633 |
372 | <reponame>umanwizard/rust-sasl
/*
* declarations missing from unix krb.h
*/
int xxx_krb_mk_priv(void *inp,
void *outp,
unsigned inplen,
des_key_schedule init_keysched,
des_cblock *session,
struct sockaddr_in *iplocal,
struct sockaddr_in *ipremote);
int xxx_krb_rd_priv(char *buf,
int inplen,
des_key_schedule init_keysched,
des_cblock *session,
struct sockaddr_in *iplocal,
struct sockaddr_in *ipremote,
MSG_DAT *data);
#ifdef RUBBISH
#include <kcglue_des.h>
#define des_key_sched kcglue_des_key_sched
#define des_ecb_encrypt kcglue_des_ecb_encrypt
#define des_pcbc_encrypt kcglue_des_pcbc_encrypt
#ifndef DES_ENCRYPT
#define DES_ENCRYPT 0
#endif
#ifndef DES_DECRYPT
#define DES_DECRYPT 1
#endif
#endif | 320 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.