max_stars_count
int64 301
224k
| text
stringlengths 6
1.05M
| token_count
int64 3
727k
|
---|---|---|
675 | /*
* Copyright 2018 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.base.ideinfo;
import com.google.common.collect.ImmutableList;
import com.google.devtools.intellij.ideinfo.IntellijIdeInfo;
import com.google.idea.blaze.base.model.primitives.Label;
import java.util.Objects;
/** Kotlin toolchain information. */
public final class KotlinToolchainIdeInfo
implements ProtoWrapper<IntellijIdeInfo.KotlinToolchainIdeInfo> {
private final String languageVersion;
private final ImmutableList<Label> sdkTargets;
/*
* default kotlinc flags to use in all compilations, as specified in
* third_party/bazel_rules/rules_kotlin/toolchains/kotlin_jvm/toolchain.bzl. Note that this cannot
* collect compiler flags that specific for individual target.
*/
private final ImmutableList<String> kotlinCompilerCommonFlags;
private KotlinToolchainIdeInfo(
String languageVersion,
ImmutableList<Label> sdkTargets,
ImmutableList<String> kotlinCompilerCommonFlags) {
this.languageVersion = languageVersion;
this.sdkTargets = sdkTargets;
this.kotlinCompilerCommonFlags = kotlinCompilerCommonFlags;
}
static KotlinToolchainIdeInfo fromProto(IntellijIdeInfo.KotlinToolchainIdeInfo proto) {
return new KotlinToolchainIdeInfo(
proto.getLanguageVersion(),
ProtoWrapper.map(proto.getSdkLibraryTargetsList(), Label::fromProto),
ProtoWrapper.internStrings(proto.getKotlinCompilerCommonFlagsList()));
}
@Override
public IntellijIdeInfo.KotlinToolchainIdeInfo toProto() {
return IntellijIdeInfo.KotlinToolchainIdeInfo.newBuilder()
.setLanguageVersion(languageVersion)
.addAllSdkLibraryTargets(ProtoWrapper.mapToProtos(sdkTargets))
.addAllKotlinCompilerCommonFlags(kotlinCompilerCommonFlags)
.build();
}
public String getLanguageVersion() {
return languageVersion;
}
public ImmutableList<Label> getSdkTargets() {
return sdkTargets;
}
public ImmutableList<String> getKotlinCompilerCommonFlags() {
return kotlinCompilerCommonFlags;
}
@Override
public String toString() {
return "KotlinToolchainIdeInfo{"
+ "\n"
+ " languageVersion="
+ getLanguageVersion()
+ "\n"
+ " sdkTargets="
+ getSdkTargets()
+ "\n"
+ " kotlinCompilerCommonFlags="
+ getKotlinCompilerCommonFlags()
+ "\n"
+ '}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KotlinToolchainIdeInfo that = (KotlinToolchainIdeInfo) o;
return Objects.equals(languageVersion, that.languageVersion)
&& Objects.equals(sdkTargets, that.sdkTargets)
&& Objects.equals(kotlinCompilerCommonFlags, that.kotlinCompilerCommonFlags);
}
@Override
public int hashCode() {
return Objects.hash(languageVersion, sdkTargets, kotlinCompilerCommonFlags);
}
public static KotlinToolchainIdeInfo.Builder builder() {
return new KotlinToolchainIdeInfo.Builder();
}
/** Builder for kotlin toolchain info */
public static class Builder {
String languageVersion;
ImmutableList<Label> sdkTargets;
ImmutableList<String> kotlinCompilerCommonFlags;
public KotlinToolchainIdeInfo.Builder setLanguageVersion(String languageVersion) {
this.languageVersion = languageVersion;
return this;
}
public KotlinToolchainIdeInfo.Builder setSdkTargets(ImmutableList<Label> sdkTargets) {
this.sdkTargets = sdkTargets;
return this;
}
public KotlinToolchainIdeInfo.Builder setKotlinCompilerCommonFlags(
ImmutableList<String> kotlinCompilerCommonFlags) {
this.kotlinCompilerCommonFlags = kotlinCompilerCommonFlags;
return this;
}
public KotlinToolchainIdeInfo build() {
return new KotlinToolchainIdeInfo(languageVersion, sdkTargets, kotlinCompilerCommonFlags);
}
}
}
| 1,621 |
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.machinelearningservices.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Settings for a personal compute instance. */
@Fluent
public final class PersonalComputeInstanceSettings {
@JsonIgnore private final ClientLogger logger = new ClientLogger(PersonalComputeInstanceSettings.class);
/*
* A user explicitly assigned to a personal compute instance.
*/
@JsonProperty(value = "assignedUser")
private AssignedUser assignedUser;
/**
* Get the assignedUser property: A user explicitly assigned to a personal compute instance.
*
* @return the assignedUser value.
*/
public AssignedUser assignedUser() {
return this.assignedUser;
}
/**
* Set the assignedUser property: A user explicitly assigned to a personal compute instance.
*
* @param assignedUser the assignedUser value to set.
* @return the PersonalComputeInstanceSettings object itself.
*/
public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUser) {
this.assignedUser = assignedUser;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (assignedUser() != null) {
assignedUser().validate();
}
}
}
| 555 |
631 | /**
* 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.metron.performance.load;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Test;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.util.EnumMap;
import java.util.List;
import java.util.Optional;
import static org.junit.jupiter.api.Assertions.*;
public class LoadOptionsTest {
@Test
public void testHappyPath() {
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[] { "-eps", "1000", "-ot","foo"});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
assertEquals(1000L, results.get(LoadOptions.EPS).get());
assertEquals("foo", results.get(LoadOptions.OUTPUT_TOPIC).get());
assertEquals(LoadGenerator.CONSUMER_GROUP, results.get(LoadOptions.CONSUMER_GROUP).get());
assertEquals(Runtime.getRuntime().availableProcessors(), results.get(LoadOptions.NUM_THREADS).get());
assertFalse(results.get(LoadOptions.BIASED_SAMPLE).isPresent());
assertFalse(results.get(LoadOptions.CSV).isPresent());
}
@Test
public void testCsvPresent() {
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[]{"-c", "/tmp/blah"});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
assertEquals(new File("/tmp/blah"), results.get(LoadOptions.CSV).get());
}
@Test
public void testCsvMissing() {
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[]{});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
assertFalse(results.get(LoadOptions.CSV).isPresent());
}
@Test
public void testThreadsByCores() {
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[]{"-p", "2C"});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
assertEquals(2 * Runtime.getRuntime().availableProcessors(), results.get(LoadOptions.NUM_THREADS).get());
}
@Test
public void testThreadsByNum() {
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[]{"-p", "5"});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
assertEquals(5, results.get(LoadOptions.NUM_THREADS).get());
}
@Test
public void testTemplatePresent() throws Exception {
File templateFile= new File("target/template");
String template = "test template1";
try(BufferedWriter w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(templateFile), StandardCharsets.UTF_8))) {
IOUtils.write(template, w );
}
templateFile.deleteOnExit();
CommandLine cli = LoadOptions.parse(new PosixParser(), new String[]{"-t", templateFile.getPath()});
EnumMap<LoadOptions, Optional<Object>> results = LoadOptions.createConfig(cli);
List<String> templates = (List<String>) results.get(LoadOptions.TEMPLATE).get();
assertEquals(1, templates.size());
assertEquals(template, templates.get(0));
}
@Test
public void testTemplateMissing() {
assertThrows(IllegalStateException.class, () -> LoadOptions.createConfig(LoadOptions.parse(new PosixParser(), new String[]{"-t", "target/template2"})));
}
}
| 1,332 |
791 | <gh_stars>100-1000
#include "zgl.h"
#include "msghandling.h"
void glopMaterial(GLContext *c,GLParam *p)
{
int mode=p[1].i;
int type=p[2].i;
float *v=&p[3].f;
int i;
GLMaterial *m;
if (mode == GL_FRONT_AND_BACK) {
p[1].i=GL_FRONT;
glopMaterial(c,p);
mode=GL_BACK;
}
if (mode == GL_FRONT) m=&c->materials[0];
else m=&c->materials[1];
switch(type) {
case GL_EMISSION:
for(i=0;i<4;i++)
m->emission.v[i]=v[i];
break;
case GL_AMBIENT:
for(i=0;i<4;i++)
m->ambient.v[i]=v[i];
break;
case GL_DIFFUSE:
for(i=0;i<4;i++)
m->diffuse.v[i]=v[i];
break;
case GL_SPECULAR:
for(i=0;i<4;i++)
m->specular.v[i]=v[i];
break;
case GL_SHININESS:
m->shininess=v[0];
m->shininess_i = (v[0]/128.0f)*SPECULAR_BUFFER_RESOLUTION;
break;
case GL_AMBIENT_AND_DIFFUSE:
for(i=0;i<4;i++)
m->diffuse.v[i]=v[i];
for(i=0;i<4;i++)
m->ambient.v[i]=v[i];
break;
default:
assert(0);
}
}
void glopColorMaterial(GLContext *c,GLParam *p)
{
int mode=p[1].i;
int type=p[2].i;
c->current_color_material_mode=mode;
c->current_color_material_type=type;
}
void glopLight(GLContext *c,GLParam *p)
{
int light=p[1].i;
int type=p[2].i;
V4 v;
GLLight *l;
int i;
assert(light >= GL_LIGHT0 && light < GL_LIGHT0+MAX_LIGHTS );
l=&c->lights[light-GL_LIGHT0];
for(i=0;i<4;i++) v.v[i]=p[3+i].f;
switch(type) {
case GL_AMBIENT:
l->ambient=v;
break;
case GL_DIFFUSE:
l->diffuse=v;
break;
case GL_SPECULAR:
l->specular=v;
break;
case GL_POSITION:
{
V4 pos;
gl_M4_MulV4(&pos,c->matrix_stack_ptr[0],&v);
l->position=pos;
if (l->position.v[3] == 0) {
l->norm_position.X=pos.X;
l->norm_position.Y=pos.Y;
l->norm_position.Z=pos.Z;
gl_V3_Norm(&l->norm_position);
}
}
break;
case GL_SPOT_DIRECTION:
for(i=0;i<3;i++) {
l->spot_direction.v[i]=v.v[i];
l->norm_spot_direction.v[i]=v.v[i];
}
gl_V3_Norm(&l->norm_spot_direction);
break;
case GL_SPOT_EXPONENT:
l->spot_exponent=v.v[0];
break;
case GL_SPOT_CUTOFF:
{
float a=v.v[0];
assert(a == 180 || (a>=0 && a<=90));
l->spot_cutoff=a;
if (a != 180) l->cos_spot_cutoff=cos(a * M_PI / 180.0);
}
break;
case GL_CONSTANT_ATTENUATION:
l->attenuation[0]=v.v[0];
break;
case GL_LINEAR_ATTENUATION:
l->attenuation[1]=v.v[0];
break;
case GL_QUADRATIC_ATTENUATION:
l->attenuation[2]=v.v[0];
break;
default:
assert(0);
}
}
void glopLightModel(GLContext *c,GLParam *p)
{
int pname=p[1].i;
float *v=&p[2].f;
int i;
switch(pname) {
case GL_LIGHT_MODEL_AMBIENT:
for(i=0;i<4;i++)
c->ambient_light_model.v[i]=v[i];
break;
case GL_LIGHT_MODEL_LOCAL_VIEWER:
c->local_light_model=(int)v[0];
break;
case GL_LIGHT_MODEL_TWO_SIDE:
c->light_model_two_side = (int)v[0];
break;
default:
tgl_warning("glopLightModel: illegal pname: 0x%x\n", pname);
//assert(0);
break;
}
}
static inline float clampf(float a,float min,float max)
{
if (a<min) return min;
else if (a>max) return max;
else return a;
}
void gl_enable_disable_light(GLContext *c,int light,int v)
{
GLLight *l=&c->lights[light];
if (v && !l->enabled) {
l->enabled=1;
l->next=c->first_light;
c->first_light=l;
l->prev=NULL;
} else if (!v && l->enabled) {
l->enabled=0;
if (l->prev == NULL) c->first_light=l->next;
else l->prev->next=l->next;
if (l->next != NULL) l->next->prev=l->prev;
}
}
/* non optimized lightening model */
void gl_shade_vertex(GLContext *c,GLVertex *v)
{
float R,G,B,A;
GLMaterial *m;
GLLight *l;
V3 n,s,d;
float dist,tmp,att,dot,dot_spot,dot_spec;
int twoside = c->light_model_two_side;
m=&c->materials[0];
n.X=v->normal.X;
n.Y=v->normal.Y;
n.Z=v->normal.Z;
R=m->emission.v[0]+m->ambient.v[0]*c->ambient_light_model.v[0];
G=m->emission.v[1]+m->ambient.v[1]*c->ambient_light_model.v[1];
B=m->emission.v[2]+m->ambient.v[2]*c->ambient_light_model.v[2];
A=clampf(m->diffuse.v[3],0,1);
for(l=c->first_light;l!=NULL;l=l->next) {
float lR,lB,lG;
/* ambient */
lR=l->ambient.v[0] * m->ambient.v[0];
lG=l->ambient.v[1] * m->ambient.v[1];
lB=l->ambient.v[2] * m->ambient.v[2];
if (l->position.v[3] == 0) {
/* light at infinity */
d.X=l->position.v[0];
d.Y=l->position.v[1];
d.Z=l->position.v[2];
att=1;
} else {
/* distance attenuation */
d.X=l->position.v[0]-v->ec.v[0];
d.Y=l->position.v[1]-v->ec.v[1];
d.Z=l->position.v[2]-v->ec.v[2];
dist=sqrt(d.X*d.X+d.Y*d.Y+d.Z*d.Z);
if (dist>1E-3) {
tmp=1/dist;
d.X*=tmp;
d.Y*=tmp;
d.Z*=tmp;
}
att=1.0f/(l->attenuation[0]+dist*(l->attenuation[1]+
dist*l->attenuation[2]));
}
dot=d.X*n.X+d.Y*n.Y+d.Z*n.Z;
if (twoside && dot < 0) dot = -dot;
if (dot>0) {
/* diffuse light */
lR+=dot * l->diffuse.v[0] * m->diffuse.v[0];
lG+=dot * l->diffuse.v[1] * m->diffuse.v[1];
lB+=dot * l->diffuse.v[2] * m->diffuse.v[2];
/* spot light */
if (l->spot_cutoff != 180) {
dot_spot=-(d.X*l->norm_spot_direction.v[0]+
d.Y*l->norm_spot_direction.v[1]+
d.Z*l->norm_spot_direction.v[2]);
if (twoside && dot_spot < 0) dot_spot = -dot_spot;
if (dot_spot < l->cos_spot_cutoff) {
/* no contribution */
continue;
} else {
/* TODO: optimize */
if (l->spot_exponent > 0) {
att=att*pow(dot_spot,l->spot_exponent);
}
}
}
/* specular light */
if (c->local_light_model) {
V3 vcoord;
vcoord.X=v->ec.X;
vcoord.Y=v->ec.Y;
vcoord.Z=v->ec.Z;
gl_V3_Norm(&vcoord);
s.X=d.X-vcoord.X;
s.Y=d.Y-vcoord.X;
s.Z=d.Z-vcoord.X;
} else {
s.X=d.X;
s.Y=d.Y;
s.Z=d.Z+1.0;
}
dot_spec=n.X*s.X+n.Y*s.Y+n.Z*s.Z;
if (twoside && dot_spec < 0) dot_spec = -dot_spec;
if (dot_spec>0) {
GLSpecBuf *specbuf;
int idx;
tmp=sqrt(s.X*s.X+s.Y*s.Y+s.Z*s.Z);
if (tmp > 1E-3) {
dot_spec=dot_spec / tmp;
}
/* TODO: optimize */
/* testing specular buffer code */
/* dot_spec= pow(dot_spec,m->shininess);*/
specbuf = specbuf_get_buffer(c, m->shininess_i, m->shininess);
idx = (int)(dot_spec*SPECULAR_BUFFER_SIZE);
if (idx > SPECULAR_BUFFER_SIZE) idx = SPECULAR_BUFFER_SIZE;
dot_spec = specbuf->buf[idx];
lR+=dot_spec * l->specular.v[0] * m->specular.v[0];
lG+=dot_spec * l->specular.v[1] * m->specular.v[1];
lB+=dot_spec * l->specular.v[2] * m->specular.v[2];
}
}
R+=att * lR;
G+=att * lG;
B+=att * lB;
}
v->color.v[0]=clampf(R,0,1);
v->color.v[1]=clampf(G,0,1);
v->color.v[2]=clampf(B,0,1);
v->color.v[3]=A;
}
| 4,001 |
1,652 | package com.ctrip.xpipe.redis.proxy.handler;
import com.ctrip.xpipe.redis.proxy.AbstractNettyTest;
import com.ctrip.xpipe.redis.proxy.session.DefaultBackendSession;
import com.ctrip.xpipe.redis.proxy.session.DefaultFrontendSession;
import com.ctrip.xpipe.redis.proxy.tunnel.DefaultTunnel;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedChannel;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import java.nio.charset.Charset;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
/**
* @author chen.zhu
* <p>
* May 29, 2018
*/
public class BackendSessionHandlerTest extends AbstractNettyTest {
@Mock
private DefaultTunnel tunnel;
@Mock
private DefaultBackendSession session;
@Mock
private DefaultFrontendSession frontendSession;
private BackendSessionHandler handler;
private EmbeddedChannel channel;
@Before
public void beforeFrontendSessionNettyHandlerTest() {
MockitoAnnotations.initMocks(this);
when(tunnel.backend()).thenReturn(session);
when(tunnel.frontend()).thenReturn(frontendSession);
handler = new BackendSessionHandler(tunnel);
channel = new EmbeddedChannel(handler);
}
@Test
public void channelRead() {
String expected = "HEllo world";
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
Object object = invocation.getArguments()[0];
Assert.assertTrue(object instanceof ByteBuf);
Assert.assertEquals(expected, ((ByteBuf)object).toString(Charset.defaultCharset()));
return null;
}
}).when(tunnel).forwardToFrontend(any());
channel.writeInbound(Unpooled.copiedBuffer(expected.getBytes()));
verify(tunnel).forwardToFrontend(any());
}
} | 819 |
575 | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/display/touch_calibrator_controller.h"
#include <algorithm>
#include <memory>
#include "ash/display/touch_calibrator_view.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/host/ash_window_tree_host.h"
#include "ash/shell.h"
#include "ash/touch/ash_touch_transform_controller.h"
#include "base/bind.h"
#include "base/threading/thread_task_runner_handle.h"
#include "ui/aura/window_tree_host.h"
#include "ui/display/manager/touch_device_manager.h"
#include "ui/display/screen.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/events/event.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/views/widget/widget.h"
namespace ash {
namespace {
void InitInternalTouchDeviceIds(std::set<int>& internal_touch_device_ids) {
internal_touch_device_ids.clear();
const std::vector<ui::TouchscreenDevice>& device_list =
ui::DeviceDataManager::GetInstance()->GetTouchscreenDevices();
for (const auto& touchscreen_device : device_list) {
if (touchscreen_device.type == ui::InputDeviceType::INPUT_DEVICE_INTERNAL)
internal_touch_device_ids.insert(touchscreen_device.id);
}
}
// Returns a transform to undo any transformations that are applied to events
// originating from the touch device identified with |touch_device_id|. This
// transform converts the event's location to the raw touch location.
gfx::Transform CalculateEventTransformer(int touch_device_id) {
const display::DisplayManager* display_manager =
Shell::Get()->display_manager();
const std::vector<ui::TouchscreenDevice>& device_list =
ui::DeviceDataManager::GetInstance()->GetTouchscreenDevices();
auto device_it = std::find_if(
device_list.begin(), device_list.end(),
[&](const auto& device) { return device.id == touch_device_id; });
DCHECK(device_it != device_list.end())
<< "Device id " << touch_device_id
<< " is invalid. No such device connected to system";
int64_t previous_display_id =
display_manager->touch_device_manager()->GetAssociatedDisplay(*device_it);
// If the touch device is not associated with any display. This may happen in
// tests when the test does not setup the |ui::TouchDeviceTransform| before
// generating a touch event.
if (previous_display_id == display::kInvalidDisplayId)
return gfx::Transform();
// Undo the event transformations that the previous display applied on the
// event location. We want to store the raw event location information.
gfx::Transform tm =
Shell::Get()
->window_tree_host_manager()
->GetAshWindowTreeHostForDisplayId(previous_display_id)
->AsWindowTreeHost()
->GetRootTransform();
return tm;
}
} // namespace
// Time interval after a touch event during which all other touch events are
// ignored during calibration.
const base::TimeDelta TouchCalibratorController::kTouchIntervalThreshold =
base::TimeDelta::FromMilliseconds(200);
TouchCalibratorController::TouchCalibratorController()
: last_touch_timestamp_(base::Time::Now()) {}
TouchCalibratorController::~TouchCalibratorController() {
touch_calibrator_widgets_.clear();
StopCalibrationAndResetParams();
}
void TouchCalibratorController::OnDisplayConfigurationChanged() {
touch_calibrator_widgets_.clear();
StopCalibrationAndResetParams();
}
void TouchCalibratorController::StartCalibration(
const display::Display& target_display,
bool is_custom_calibration,
TouchCalibrationCallback opt_callback) {
state_ = is_custom_calibration ? CalibrationState::kCustomCalibration
: CalibrationState::kNativeCalibration;
if (opt_callback)
opt_callback_ = std::move(opt_callback);
target_display_ = target_display;
// Clear all touch calibrator views used in any previous calibration.
touch_calibrator_widgets_.clear();
// Set the touch device id as invalid so it can be set during calibration.
touch_device_id_ = ui::InputDevice::kInvalidId;
// Populate |internal_touch_device_ids_| with the ids of touch devices that
// are currently associated with the internal display and are of type
// |ui::InputDeviceType::INPUT_DEVICE_INTERNAL|.
InitInternalTouchDeviceIds(internal_touch_device_ids_);
// If this is a native touch calibration, then initialize the UX for it.
if (state_ == CalibrationState::kNativeCalibration) {
Shell::Get()->window_tree_host_manager()->AddObserver(this);
// Reset the calibration data.
touch_point_quad_.fill(std::make_pair(gfx::Point(0, 0), gfx::Point(0, 0)));
std::vector<display::Display> displays =
display::Screen::GetScreen()->GetAllDisplays();
for (const display::Display& display : displays) {
bool is_primary_view = display.id() == target_display_.id();
touch_calibrator_widgets_[display.id()] =
TouchCalibratorView::Create(display, is_primary_view);
}
}
Shell::Get()->touch_transformer_controller()->SetForCalibration(true);
// Add self as an event handler target.
Shell::Get()->AddPreTargetHandler(this);
}
void TouchCalibratorController::StopCalibrationAndResetParams() {
if (!IsCalibrating())
return;
Shell::Get()->window_tree_host_manager()->RemoveObserver(this);
Shell::Get()->touch_transformer_controller()->SetForCalibration(false);
// Remove self as the event handler.
Shell::Get()->RemovePreTargetHandler(this);
// Transition all touch calibrator views to their final state for a graceful
// exit if this is touch calibration with native UX.
if (state_ == CalibrationState::kNativeCalibration) {
for (const auto& it : touch_calibrator_widgets_)
static_cast<TouchCalibratorView*>(it.second->GetContentsView())
->SkipToFinalState();
}
state_ = CalibrationState::kInactive;
if (opt_callback_) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(std::move(opt_callback_), false /* failure */));
opt_callback_.Reset();
}
}
void TouchCalibratorController::CompleteCalibration(
const CalibrationPointPairQuad& pairs,
const gfx::Size& display_size) {
bool did_find_touch_device = false;
const std::vector<ui::TouchscreenDevice>& device_list =
ui::DeviceDataManager::GetInstance()->GetTouchscreenDevices();
ui::TouchscreenDevice target_device;
for (const auto& device : device_list) {
if (device.id == touch_device_id_) {
target_device = device;
did_find_touch_device = true;
break;
}
}
if (!did_find_touch_device) {
VLOG(1) << "No touch device with id: " << touch_device_id_ << " found to "
<< "complete touch calibration for display with id: "
<< target_display_.id() << ". Storing it as a fallback";
}
if (opt_callback_) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(std::move(opt_callback_), true /* success */));
opt_callback_.Reset();
}
StopCalibrationAndResetParams();
Shell::Get()->display_manager()->SetTouchCalibrationData(
target_display_.id(), pairs, display_size, target_device);
}
bool TouchCalibratorController::IsCalibrating() const {
return state_ != CalibrationState::kInactive;
}
// ui::EventHandler:
void TouchCalibratorController::OnKeyEvent(ui::KeyEvent* key) {
if (state_ != CalibrationState::kNativeCalibration)
return;
// Detect ESC key press.
if (key->type() == ui::ET_KEY_PRESSED && key->key_code() == ui::VKEY_ESCAPE)
StopCalibrationAndResetParams();
key->StopPropagation();
}
void TouchCalibratorController::OnTouchEvent(ui::TouchEvent* touch) {
if (!IsCalibrating())
return;
if (touch->type() != ui::ET_TOUCH_RELEASED)
return;
if (base::Time::Now() - last_touch_timestamp_ < kTouchIntervalThreshold)
return;
last_touch_timestamp_ = base::Time::Now();
// If the touch event originated from a touch device that is associated with
// the internal display, then ignore it.
if (internal_touch_device_ids_.count(touch->source_device_id()))
return;
if (touch_device_id_ == ui::InputDevice::kInvalidId) {
touch_device_id_ = touch->source_device_id();
event_transformer_ = CalculateEventTransformer(touch_device_id_);
}
// If this is a custom touch calibration, then everything else is managed
// by the application responsible for the custom calibration UX.
if (state_ == CalibrationState::kCustomCalibration)
return;
touch->StopPropagation();
TouchCalibratorView* target_screen_calibration_view =
static_cast<TouchCalibratorView*>(
touch_calibrator_widgets_[target_display_.id()]->GetContentsView());
// If this is the final state, then store all calibration data and stop
// calibration.
if (target_screen_calibration_view->state() ==
TouchCalibratorView::CALIBRATION_COMPLETE) {
gfx::RectF calibration_bounds(
target_screen_calibration_view->GetLocalBounds());
Shell::Get()
->window_tree_host_manager()
->GetAshWindowTreeHostForDisplayId(target_display_.id())
->AsWindowTreeHost()
->GetRootTransform()
.TransformRect(&calibration_bounds);
CompleteCalibration(touch_point_quad_,
gfx::ToRoundedSize(calibration_bounds.size()));
return;
}
int state_index;
// Maps the state to an integer value. Assigns a non negative integral value
// for a state in which the user can interact with the the interface.
switch (target_screen_calibration_view->state()) {
case TouchCalibratorView::DISPLAY_POINT_1:
state_index = 0;
break;
case TouchCalibratorView::DISPLAY_POINT_2:
state_index = 1;
break;
case TouchCalibratorView::DISPLAY_POINT_3:
state_index = 2;
break;
case TouchCalibratorView::DISPLAY_POINT_4:
state_index = 3;
break;
default:
// Return early if the interface is in a state that does not allow user
// interaction.
return;
}
// Store touch point corresponding to its display point.
gfx::Point display_point;
if (target_screen_calibration_view->GetDisplayPointLocation(&display_point)) {
// If the screen has a root transform applied, the display point does not
// correctly map to the touch point. This is specially evident if the
// display is rotated or a device scale factor is applied. The display point
// needs to have the root transform applied as well to correctly pair it
// with the touch point.
Shell::Get()
->window_tree_host_manager()
->GetAshWindowTreeHostForDisplayId(target_display_.id())
->AsWindowTreeHost()
->GetRootTransform()
.TransformPoint(&display_point);
// Why do we need this? To understand this we need to know the life of an
// event location. The event location undergoes the following
// transformations along its path from the device to the event handler that
// is this class.
//
// Touch Device -> EventFactoryEvdev -> DrmWindowHost
// -> WindowEventDispatcher -> EventHandler(this)
//
// - The touch device dispatches the raw device event location. Lets assume
// this is (x, y).
// - The EventFactoryEvdev applies a touch transform that includes the
// calibration information as well as an offset of the native bounds
// of the display. This effectively converts the coordinates of the event
// from the raw device event location to the native screen coordinates.
// It gets the offset information from DrmWindowHost via the
// ManagedDisplayInfo class. If the offset of the PlatformWindow is (A,B)
// then the event location after this stage would be (x + A, y + B).
// - The DrmWindowHost removes the offset from the event location so that
// the location becomes relative to the platform window's origin. In
// Chrome OS it so happens that each display is its own platform window.
// So an offset equal to the display's origin in screen space is
// subtracted from the event location. This effectively undoes the
// previous step's transformation. Thus the event location after this
// step is (x, y) again.
// - WindowEventDispatcher applies an inverse root transform on the event
// location. This means that if the display is rotated or has a device
// scale factor, then those transformation are also applied to the event
// location. It effectively converts the coordinates from platform window
// coordinates to the aura's root window coordinates. The display in
// context here is the display that is associated with the touch device
// from which the event originated from.
//
// Up until the output of DrmWindowHost, everything is as expected. But
// WindowEventDispatcher applies an inverse root transform which modifies
// the raw event location that we wanted. Moreover, it modifies the raw
// event location using the root transform of the display that the touch
// device was previously associated with. To solve this, we need to undo the
// changes made to the event location by WindowEventDispatcher. This is what
// is achieved by |event_transformer_|.
gfx::PointF event_location_f(touch->location_f());
event_transformer_.TransformPoint(&event_location_f);
touch_point_quad_[state_index] =
std::make_pair(display_point, gfx::ToRoundedPoint(event_location_f));
} else {
// TODO(malaykeshav): Display some kind of error for the user.
NOTREACHED() << "Touch calibration failed. Could not retrieve location for"
" display point. Retry calibration.";
}
target_screen_calibration_view->AdvanceToNextState();
}
} // namespace ash
| 4,633 |
925 | #include "command.h"
#include <cstdio>
#include <cstring>
#include <sstream>
#include "argparse.h"
#include "client.h"
#include "completion.h"
#include "hlwmcommon.h"
#include "ipc-protocol.h"
#include "monitor.h"
#include "monitormanager.h"
#include "root.h"
#include "tag.h"
#include "utils.h"
using std::endl;
using std::function;
using std::shared_ptr;
using std::string;
using std::to_string;
using std::unique_ptr;
using std::vector;
// Implementation of CommandBinding
CommandBinding::CommandBinding(function<int(Output)> cmd)
: command([cmd](Input, Output output) { return cmd(output); })
, completion_([](Completion& c) { c.none(); })
{}
CommandBinding::CommandBinding(function<int()> cmd)
: command([cmd](Input, Output) { return cmd(); })
, completion_([](Completion& c) { c.none(); })
{}
/** Complete the given list of arguments
*/
void CommandBinding::complete(Completion& completion) const {
if ((bool) completion_) {
completion_(completion);
}
}
// Implementation of CommandTable
int CommandTable::callCommand(Input args, Output out) const {
if (args.command().empty()) {
// may happen if you call sprintf, but nothing afterwards
return HERBST_NEED_MORE_ARGS;
}
const auto cmd = map.find(args.command());
if (cmd == map.end()) {
out.error() << "error: Command \"" << args.command() << "\" not found" << endl;
return HERBST_COMMAND_NOT_FOUND;
}
// new channels object to have the command name updated
OutputChannels channels(args.command(), out.output(), out.error());
return cmd->second(args, channels);
}
namespace Commands {
shared_ptr<const CommandTable> command_table;
}
void Commands::initialize(unique_ptr<const CommandTable> commands) {
if (!command_table) {
command_table = move(commands);
}
// TODO What do we do in the 'already initialized' case?
}
int Commands::call(Input args, Output out) {
if (!command_table) {
return HERBST_COMMAND_NOT_FOUND;
}
return command_table->callCommand(args, out);
}
bool Commands::commandExists(const string& commandName)
{
if (!command_table) {
return false;
}
return command_table->find(commandName) != command_table->end();
}
shared_ptr<const CommandTable> Commands::get() {
if (!command_table) {
throw std::logic_error("CommandTable not initialized, but get() called.");
}
return command_table;
}
void Commands::complete(Completion& completion) {
auto commandTable = Commands::get();
if (completion == 0) {
for (const auto& cmd : *commandTable) {
completion.full(cmd.first);
}
} else {
auto it = commandTable->find(completion[0]);
if (it == commandTable->end()) {
completion.invalidArguments();
} else if (it->second.hasCompletion()) {
// get new completion context with command name omitted.
Completion shifted = completion.shifted(1);
it->second.complete(shifted);
completion.mergeResultsFrom(shifted);
}
}
}
int list_commands(Output output)
{
for (const auto& cmd : *Commands::get()) {
output << cmd.first << endl;
}
return 0;
}
int completeCommand(Input input, Output output)
{
int position = 0;
ArgParse ap = ArgParse().mandatory(position);
if (ap.parsingFails(input, output)) {
return ap.exitCode();
}
bool shellQuoting = false;
if (input.command() == "complete_shell") {
shellQuoting = true;
}
Completion completion(ArgList(input.begin(), input.end()), position, "", shellQuoting, output);
Commands::complete(completion);
if (completion.ifInvalidArguments()) {
return HERBST_INVALID_ARGUMENT;
}
if (completion.noParameterExpected()) {
return HERBST_NO_PARAMETER_EXPECTED;
}
return 0;
}
| 1,486 |
1,760 | <reponame>xzhan96/chromium.src<filename>net/quic/core/quic_flags.h
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_QUIC_QUIC_FLAGS_H_
#define NET_QUIC_QUIC_FLAGS_H_
#include <stdint.h>
#include "net/base/net_export.h"
#define QUIC_FLAG(type, flag, value) NET_EXPORT_PRIVATE extern type flag;
#include "net/quic/core/quic_flags_list.h"
#undef QUIC_FLAG
#endif // NET_QUIC_QUIC_FLAGS_H_
| 207 |
4,111 | /*
* 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.shiro.tools.hasher;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* @since 2.0
*/
public class HasherTest {
private final InputStream systemIn = System.in;
private ByteArrayInputStream testIn;
private final Logger hasherToolLogger = (Logger) LoggerFactory.getLogger("ROOT");
private final ListAppender<ILoggingEvent> listAppender = new ListAppender<>();
@BeforeEach
public void setUpOutput() {
hasherToolLogger.detachAndStopAllAppenders();
hasherToolLogger.addAppender(listAppender);
listAppender.start();
}
private void provideInput(String data) {
testIn = new ByteArrayInputStream(data.getBytes());
System.setIn(testIn);
}
@AfterEach
public void restoreSystemInputOutput() throws IOException {
System.setIn(systemIn);
testIn.close();
listAppender.stop();
}
@Test
public void testArgon2Hash() {
// given
String[] args = {"--debug", "--password", "--pnoconfirm"};
provideInput("secret#shiro,password;<PASSWORD>");
// when
Hasher.main(args);
List<ILoggingEvent> loggingEvents = listAppender.list;
// when
assertEquals(1, loggingEvents.size());
ILoggingEvent iLoggingEvent = loggingEvents.get(0);
assertTrue(iLoggingEvent.getMessage().contains("$shiro2$argon2id$v=19"));
}
@Test
public void testBCryptHash() {
// given
String[] args = {"--debug", "--password", "--pnoconfirm", "--algorithm", "2y"};
provideInput("secret#shiro,password;<PASSWORD>");
// when
Hasher.main(args);
List<ILoggingEvent> loggingEvents = listAppender.list;
// when
assertEquals(1, loggingEvents.size());
ILoggingEvent iLoggingEvent = loggingEvents.get(0);
assertTrue(iLoggingEvent.getMessage().contains("$shiro2$2y$10$"));
}
}
| 1,165 |
2,291 | {
"id" : 342,
"status" : "Invalid",
"summary" : "each pinch zoom image transition is out of line",
"labels" : [ "Type-Defect", "Priority-Medium" ],
"stars" : 0,
"commentCount" : 5,
"comments" : [ {
"id" : 0,
"commenterId" : 7700519907604124623,
"content" : "<b>What steps will reproduce the problem?</b>\n1. mapview image is rendered\r\n2. I pinched the screen in order to zoom \r\n3. after the zoom new image appears but unlike google maps , the transition is not set properly\r\n\r\n<b>What is the expected output? What do you see instead?</b>\n the expected output is a pinch zoom transition as smooth a google maps, ie when I zoom into a town the result is the town is at the same place and with a more precise render\r\ninstead I see the town move to the right, or left (it depends of how I pinch), but the town is not in the same place anymore in the screen\r\n\r\n<b>What version of the product are you using? On what operating system?</b>\nosmdroid 3.0.8 in android 2.3.4\r\n\r\n<b>Please provide any additional information below.</b>\nscreenshot example included",
"timestamp" : 1336426747,
"attachments" : [ {
"id" : 3420000000,
"fileName" : "google_maps_ok.jpg",
"fileSize" : 305388
}, {
"id" : 3420000001,
"fileName" : "osmdroid_pb.jpg",
"fileSize" : 382676
} ]
}, {
"id" : 1,
"commenterId" : 8937367184059112911,
"content" : "Are you trying to say that you'd like the new tiles to be downloaded and rendered instantly after releasing the zoom? Unfortunately the internet is slow, especially on a mobile device. Google Maps uses vector rendering which is a completely different process to tile rendering that osmdroid uses. If you wait a little bit then osmdroid will also show the same place with a more precise render.",
"timestamp" : 1336455087,
"attachments" : [ ]
}, {
"id" : 2,
"commenterId" : 7700519907604124623,
"content" : "hi, no not instantly, but the new image must fit the old one like google maps ok, \r\ncurrently the process is \r\n1 - before pinch image is small\r\n2 - before releasing pinch image is bigger\r\n3 - after releasing ping new image zoom is shown but bigger than the old one\r\n\r\nit will better if\r\n1 - before pinch image is small\r\n2 - before releasing pinch image is bigger\r\n3 - after releasing ping new image zoom is shown and it will fit 2 with more precise render\r\n\r\nthe solution here is find a way to show the new image in 3- that with precise zoom that will fit 2- like google maps. its really weird that releasing the pinch we've got more zoom. I think this is not correct. it's like we've got 2 level of zoom when we pinch instead of one .\r\n\r\nplease tell me what you think? :)\r\n",
"timestamp" : 1336485969,
"attachments" : [ ]
}, {
"id" : 3,
"commenterId" : 8937367184059112911,
"content" : "Again, vector maps are completely different to tile maps. Vector maps can have an arbitrary zoom. Tile maps have a finite number of zoom levels.",
"timestamp" : 1336490373,
"attachments" : [ ]
}, {
"id" : 4,
"commenterId" : 7700519907604124623,
"content" : "thanks for your quick answer. I understand now",
"timestamp" : 1336611949,
"attachments" : [ ]
} ]
} | 1,102 |
739 | {
"name": "<NAME>",
"img": "https://avatars.githubusercontent.com/u/48345668?v=4",
"email":"",
"links": {
"website": "http://sudamyasodya.me/",
"linkedin": "https://www.linkedin.com/in/sudam-yasodya/",
"github": "https://github.com/gdsghost"
},
"jobTitle": "Full Stack Developer",
"location": {
"city": "Moratuwa",
"state": "",
"country": "Sri Lanka"
}
}
| 176 |
988 | /*
* 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.project.libraries;
import org.netbeans.spi.project.libraries.WritableLibraryProvider;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.CharConversionException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.xml.parsers.ParserConfigurationException;
import org.netbeans.api.annotations.common.NonNull;
import org.netbeans.api.project.ProjectManager;
import org.netbeans.spi.project.libraries.LibraryImplementation;
import org.netbeans.spi.project.libraries.LibraryTypeProvider;
import org.openide.filesystems.FileChangeAdapter;
import org.openide.filesystems.FileEvent;
import org.openide.filesystems.FileLock;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileSystem;
import org.openide.filesystems.FileUtil;
import org.openide.util.Exceptions;
import org.openide.util.NbBundle;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.libraries.LibraryProvider.class)
public class LibrariesStorage extends FileChangeAdapter
implements WritableLibraryProvider<LibraryImplementation>, ChangeListener {
private static final String NB_HOME_PROPERTY = "netbeans.home"; //NOI18N
private static final String LIBRARIES_REPOSITORY = "org-netbeans-api-project-libraries/Libraries"; //NOI18N
private static final String TIME_STAMPS_FILE = "libraries-timestamps.properties"; //NOI18B
private static final String XML_EXT = "xml"; //NOI18N
static final Logger LOG = Logger.getLogger(LibrariesStorage.class.getName());
//Lock to prevent FileAlreadyLocked exception.
private static final Object TIMESTAMPS_LOCK = new Object ();
// persistent storage, it may be null for before first library is store into storage
private FileObject storage = null;
private Libs libs;
// Library declaraion public ID
// i18n bundle
private ResourceBundle bundle;
private PropertyChangeSupport support;
//Flag if the storage is initialized
//The storage needs to be lazy initialized, it is in lookup
//@GuardedBy("this")
private boolean initialized;
//@GuardedBy("this")
private boolean inchange;
private Properties timeStamps;
private final LibraryTypeRegistry ltRegistry;
/**
* Create libraries that need to be populated later.
*/
public LibrariesStorage() {
this.support = new PropertyChangeSupport(this);
this.ltRegistry = LibraryTypeRegistry.getDefault();
this.ltRegistry.addChangeListener(this);
}
/**
* Constructor for tests
*/
LibrariesStorage (FileObject storage) {
this ();
this.storage = storage;
}
/**
* Initialize the default storage.
* @return new storage or null on I/O error.
*/
private static final FileObject createStorage () {
try {
return FileUtil.createFolder(FileUtil.getConfigRoot(), LIBRARIES_REPOSITORY);
} catch (IOException e) {
Exceptions.printStackTrace(e);
return null;
}
}
// scans over storage and fetchs it ((fileset persistence files) into memory
// ... note that providers can read their data during getVolume call
private void loadFromStorage(
final Map<? super String, ? super LibraryImplementation> libraries,
final Map<? super String, ? super LibraryImplementation> librariesByFileNames) {
// configure parser
//We are in unit test with no storage
if (storage == null) {
return;
}
final LibraryDeclarationConvertorImpl convertor = new LibraryDeclarationConvertorImpl(); //Immutable
// parse
for (FileObject descriptorFile : storage.getChildren()) {
if (XML_EXT.equalsIgnoreCase(descriptorFile.getExt())) {
try {
final LibraryDeclarationHandlerImpl handler = new LibraryDeclarationHandlerImpl();
final LibraryDeclarationParser parser = new LibraryDeclarationParser(handler,convertor);
readLibrary (descriptorFile, parser);
LibraryImplementation impl = handler.getLibrary ();
if (impl != null) {
LibraryTypeProvider provider = ltRegistry.getLibraryTypeProvider (impl.getType());
if (provider == null) {
LOG.warning("LibrariesStorage: Can not invoke LibraryTypeProvider.libraryCreated(), the library type provider is unknown."); //NOI18N
}
else if (libraries.keySet().contains(impl.getName())) {
LOG.log(
Level.WARNING,
"LibrariesStorage: Library \"{0}\" is already defined, skeeping the definition from: {1}", //NOI18N
new Object[]{
impl.getName(),
FileUtil.getFileDisplayName(descriptorFile)
});
}
else {
if (!isUpToDate(descriptorFile)) {
provider.libraryCreated (impl);
updateTimeStamp(descriptorFile);
}
librariesByFileNames.put(descriptorFile.getPath(),impl);
libraries.put (impl.getName(),impl);
LibrariesModule.registerSource(impl, descriptorFile);
}
}
} catch (SAXException e) {
//The library is broken, probably edited by user
//just log
logBrokenLibraryDescripor(descriptorFile, e);
} catch (CharConversionException e) { {
//The library is broken, probably edited by user
//just log
logBrokenLibraryDescripor(descriptorFile, e);
}
} catch (ParserConfigurationException e) {
Exceptions.printStackTrace(e);
} catch (IOException e) {
Exceptions.printStackTrace(e);
} catch (RuntimeException e) {
// Other problem.
Exceptions.printStackTrace(e);
}
}
}
try {
saveTimeStamps();
} catch (IOException ioe) {
Exceptions.printStackTrace(ioe);
}
}
@NonNull
@SuppressWarnings("NestedAssignment")
private Libs initStorage (final boolean reset) {
synchronized (this) {
if (!initialized) {
if (this.storage == null) {
this.storage = createStorage();
}
if (storage != null) {
this.storage.addFileChangeListener (this);
}
initialized = true;
}
if (libs != null && !reset && !(inchange && ProjectManager.mutex().isWriteAccess())) {
return libs;
}
if (reset) {
inchange = true;
}
}
boolean success = false;
final Map<String,LibraryImplementation> libraries = new HashMap<>();
final Map<String,LibraryImplementation> librariesByFileNames = new HashMap<>();
Libs res;
try {
this.loadFromStorage(libraries, librariesByFileNames);
success = true;
} finally {
synchronized (this) {
if (reset) {
inchange = false;
}
if (success) {
res = this.libs = new Libs(libraries,librariesByFileNames);
} else {
res = new Libs(Collections.<String, LibraryImplementation>emptyMap(),Collections.<String, LibraryImplementation>emptyMap());
}
}
}
return res;
}
private static LibraryImplementation readLibrary (FileObject descriptorFile) throws SAXException, ParserConfigurationException, IOException{
return readLibrary (descriptorFile, (LibraryImplementation) null);
}
private static LibraryImplementation readLibrary (FileObject descriptorFile, LibraryImplementation impl) throws SAXException, ParserConfigurationException, IOException {
final LibraryDeclarationHandlerImpl handler = new LibraryDeclarationHandlerImpl();
final LibraryDeclarationConvertorImpl convertor = new LibraryDeclarationConvertorImpl();
final LibraryDeclarationParser parser = new LibraryDeclarationParser(handler,convertor);
handler.setLibrary (impl);
readLibrary (descriptorFile, parser);
LibrariesModule.registerSource(impl, descriptorFile);
return handler.getLibrary();
}
private static void readLibrary (
@NonNull final FileObject descriptorFile,
@NonNull final LibraryDeclarationParser parser) throws SAXException, ParserConfigurationException, IOException {
try {
FileLockManager.getDefault().readAction(
descriptorFile,
new Callable<Void>() {
@Override
public Void call() throws IOException, ParserConfigurationException, SAXException {
final URL baseURL = descriptorFile.toURL();
final InputSource input = new InputSource(baseURL.toExternalForm());
try (InputStream in = descriptorFile.getInputStream()) {
input.setByteStream(in); // #33554 workaround
parser.parse(input);
} catch (SAXException e) {
throw Exceptions.attachMessage(e, "From: " + baseURL); //NOI18N
} catch (IOException e) {
throw Exceptions.attachMessage(e, "From: " + baseURL); //NOI18N
}
return null;
}
});
} catch (IOException | ParserConfigurationException | SAXException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private void writeLibrary (final FileObject storage, final LibraryImplementation library) throws IOException {
storage.getFileSystem().runAtomicAction(
new FileSystem.AtomicAction() {
public void run() throws IOException {
String libraryType = library.getType ();
LibraryTypeProvider libraryTypeProvider = ltRegistry.getLibraryTypeProvider (libraryType);
if (libraryTypeProvider == null) {
LOG.warning("LibrariesStorage: Cannot store library, the library type is not recognized by any of installed LibraryTypeProviders."); //NOI18N
return;
}
final FileObject fo = FileUtil.createData(
storage,
String.format(
"%s.%s",
library.getName(),
"xml")); //NOI18N
LibraryDeclarationParser.writeLibraryDefinition (fo, library, libraryTypeProvider);
}
}
);
}
private void fireLibrariesChanged () {
this.support.firePropertyChange(PROP_LIBRARIES,null,null);
}
@Override
public final void addPropertyChangeListener (PropertyChangeListener listener) {
this.support.addPropertyChangeListener(listener);
}
@Override
public final void removePropertyChangeListener (PropertyChangeListener listener) {
this.support.removePropertyChangeListener(listener);
}
/**
* Return all libraries in memory.
*/
@Override
public final LibraryImplementation[] getLibraries() {
final Libs res = initStorage(false);
assert res != null;
return res.getImpls();
} // end getLibraries
@Override
public boolean addLibrary (LibraryImplementation library) throws IOException {
this.initStorage(false);
assert this.storage != null : "Storage is not initialized";
writeLibrary(this.storage,library);
return true;
}
@Override
public boolean removeLibrary (LibraryImplementation library) throws IOException {
final Libs data = this.initStorage(false);
assert this.storage != null : "Storage is not initialized";
final String path = data.findPath(library);
if (path != null) {
final FileObject fo = this.storage.getFileSystem().findResource (path);
if (fo != null) {
fo.delete();
}
return true;
}
return false;
}
@Override
public boolean updateLibrary(final LibraryImplementation oldLibrary, final LibraryImplementation newLibrary) throws IOException {
final Libs data = this.initStorage(false);
assert this.storage != null : "Storage is not initialized";
final String path = data.findPath(oldLibrary);
if (path != null) {
final FileObject fo = this.storage.getFileSystem().findResource(path);
if (fo != null) {
String libraryType = newLibrary.getType ();
final LibraryTypeProvider libraryTypeProvider = ltRegistry.getLibraryTypeProvider (libraryType);
if (libraryTypeProvider == null) {
LOG.warning("LibrariesStorageL Cannot store library, the library type is not recognized by any of installed LibraryTypeProviders."); //NOI18N
} else {
this.storage.getFileSystem().runAtomicAction(
new FileSystem.AtomicAction() {
public void run() throws IOException {
LibraryDeclarationParser.writeLibraryDefinition (fo, newLibrary, libraryTypeProvider);
}
}
);
}
return true;
}
}
return false;
}
public void fileDataCreated(FileEvent fe) {
FileObject fo = fe.getFile();
try {
final Libs data = this.initStorage(false);
final LibraryImplementation impl = readLibrary (fo);
if (impl != null) {
LibraryTypeProvider provider = ltRegistry.getLibraryTypeProvider (impl.getType());
if (provider == null) {
LOG.warning("LibrariesStorage: Can not invoke LibraryTypeProvider.libraryCreated(), the library type provider is unknown."); //NOI18N
}
else {
data.add (impl.getName(), fo.getPath(), impl);
//Has to be called outside the synchronized block,
// The code is provided by LibraryType implementator and can fire events -> may cause deadlocks
try {
provider.libraryCreated (impl);
updateTimeStamp(fo);
saveTimeStamps();
} catch (RuntimeException e) {
String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
Exceptions.printStackTrace(Exceptions.attachMessage(e,message));
}
this.fireLibrariesChanged();
}
}
} catch (SAXException e) {
//The library is broken, probably edited by user or unknown provider (FoD), log as warning
logBrokenLibraryDescripor(fo, e);
} catch (ParserConfigurationException e) {
Exceptions.printStackTrace(e);
} catch (IOException e) {
Exceptions.printStackTrace(e);
}
}
public void fileDeleted(FileEvent fe) {
String fileName = fe.getFile().getPath();
final Libs data = this.initStorage(false);
LibraryImplementation impl = data.remove(fileName);
if (impl != null) {
LibraryTypeProvider provider = ltRegistry.getLibraryTypeProvider (impl.getType());
if (provider == null) {
LOG.warning("LibrariesStorage: Cannot invoke LibraryTypeProvider.libraryDeleted(), the library type provider is unknown."); //NOI18N
}
else {
//Has to be called outside the synchronized block,
// The code is provided by LibraryType implementator and can fire events -> may cause deadlocks
try {
provider.libraryDeleted (impl);
} catch (RuntimeException e) {
String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryDeletedError");
Exceptions.printStackTrace(Exceptions.attachMessage(e,message));
}
}
this.fireLibrariesChanged();
}
}
public void fileChanged(FileEvent fe) {
FileObject definitionFile = fe.getFile();
String fileName = definitionFile.getPath();
final Libs data = this.initStorage(false);
final LibraryImplementation impl = data.get(fileName);
if (impl != null) {
try {
readLibrary (definitionFile, impl);
LibraryTypeProvider provider = ltRegistry.getLibraryTypeProvider (impl.getType());
if (provider == null) {
LOG.warning("LibrariesStorage: Can not invoke LibraryTypeProvider.libraryCreated(), the library type provider is unknown."); //NOI18N
}
try {
//TODO: LibraryTypeProvider should be extended by libraryUpdated method
provider.libraryCreated (impl);
updateTimeStamp(definitionFile);
saveTimeStamps();
} catch (RuntimeException e) {
String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
Exceptions.printStackTrace(Exceptions.attachMessage(e,message));
}
} catch (SAXException se) {
//The library is broken, probably edited by user, log as warning
logBrokenLibraryDescripor(definitionFile, se);
} catch (ParserConfigurationException pce) {
Exceptions.printStackTrace(pce);
} catch (IOException ioe) {
Exceptions.printStackTrace(ioe);
}
}
}
protected final ResourceBundle getBundle() {
if (bundle == null) {
bundle = NbBundle.getBundle(LibrariesStorage.class);
}
return bundle;
}
private boolean isUpToDate (FileObject libraryDefinition) {
Properties timeStamps = getTimeStamps();
String ts = (String) timeStamps.get (libraryDefinition.getNameExt());
return ts == null ? false : Long.parseLong(ts) >= libraryDefinition.lastModified().getTime();
}
private void updateTimeStamp (FileObject libraryDefinition) {
Properties timeStamps = getTimeStamps();
timeStamps.put(libraryDefinition.getNameExt(), Long.toString(libraryDefinition.lastModified().getTime()));
}
private void saveTimeStamps () throws IOException {
if (this.storage != null) {
synchronized (TIMESTAMPS_LOCK) {
Properties timeStamps = getTimeStamps();
if (timeStamps.get(NB_HOME_PROPERTY) == null) {
String currNbLoc = getNBRoots();
timeStamps.put(NB_HOME_PROPERTY,currNbLoc);
}
FileObject parent = storage.getParent();
FileObject timeStampFile = FileUtil.createData(parent,TIME_STAMPS_FILE);
FileLock lock = timeStampFile.lock();
try (final OutputStream out = timeStampFile.getOutputStream(lock)) {
timeStamps.store (out, null);
} finally {
lock.releaseLock();
}
}
}
}
private synchronized Properties getTimeStamps () {
if (this.timeStamps == null) {
this.timeStamps = new Properties();
if (this.storage != null) {
FileObject timeStampFile = storage.getParent().getFileObject(TIME_STAMPS_FILE);
if (timeStampFile != null) {
try {
InputStream in = timeStampFile.getInputStream();
try {
this.timeStamps.load (in);
} finally {
in.close();
}
String nbLoc = (String) this.timeStamps.get (NB_HOME_PROPERTY);
String currNbLoc = getNBRoots ();
if (nbLoc == null || !nbLoc.equals (currNbLoc)) {
this.timeStamps.clear();
}
} catch (IOException ioe) {
Exceptions.printStackTrace(ioe);
}
}
}
}
return this.timeStamps;
}
private static String getNBRoots () {
Set<String> result = new TreeSet<String>();
String currentNbLoc = System.getProperty ("netbeans.home"); //NOI18N
if (currentNbLoc != null) {
File f = FileUtil.normalizeFile(new File (currentNbLoc));
if (f.isDirectory()) {
result.add (f.getAbsolutePath());
}
}
currentNbLoc = System.getProperty ("netbeans.dirs"); //NOI18N
if (currentNbLoc != null) {
StringTokenizer tok = new StringTokenizer(currentNbLoc, File.pathSeparator);
while (tok.hasMoreTokens()) {
File f = FileUtil.normalizeFile(new File(tok.nextToken()));
result.add(f.getAbsolutePath());
}
}
StringBuffer sb = new StringBuffer ();
for (Iterator<String> it = result.iterator(); it.hasNext();) {
sb.append(it.next());
if (it.hasNext()) {
sb.append(":"); //NOI18N
}
}
return sb.toString();
}
@Override
public void stateChanged(ChangeEvent e) {
initStorage(true);
fireLibrariesChanged();
}
private void logBrokenLibraryDescripor(
@NonNull FileObject descriptorFile,
@NonNull Exception cause){
Level level = Level.WARNING;
if (cause instanceof LibraryDeclarationHandlerImpl.UnknownLibraryTypeException) {
if (((LibraryDeclarationHandlerImpl.UnknownLibraryTypeException) cause).type.equals("j2se")) {
// possibly in a unit test, be quiet
level = Level.FINE;
} else {
//log unknown library type as INFO common with FoD
level = Level.INFO;
}
}
LOG.log(
level,
"Cannot load library from file {0}, reason: {1}", //NOI18N
new Object[] {
FileUtil.getFileDisplayName(descriptorFile),
cause.getMessage()
});
}
private static final class Libs {
private final Map<String,LibraryImplementation> librariesByName;
private final Map<String,LibraryImplementation> librariesByPath;
Libs(final Map<String,LibraryImplementation> librariesByName, Map<String,LibraryImplementation> librariesByPath) {
assert librariesByName != null;
assert librariesByPath != null;
this.librariesByName = librariesByName;
this.librariesByPath = librariesByPath;
}
synchronized LibraryImplementation[] getImpls() {
return librariesByName.values().toArray(new LibraryImplementation[librariesByName.size()]);
}
synchronized String findPath(final LibraryImplementation library) {
for (Map.Entry<String, LibraryImplementation> entry : librariesByPath.entrySet()) {
String key = entry.getKey();
LibraryImplementation lib = entry.getValue();
if (library.equals (lib)) {
return key;
}
}
return null;
}
synchronized void add(final String name, final String path, final LibraryImplementation impl) {
assert name != null;
assert path != null;
assert impl != null;
this.librariesByName.put(name, impl);
this.librariesByPath.put(path, impl);
}
synchronized LibraryImplementation remove(final String path) {
assert path != null;
final LibraryImplementation impl = librariesByPath.remove(path);
if (impl != null) {
librariesByName.remove (impl.getName());
}
return impl;
}
synchronized LibraryImplementation get(final String path) {
assert path != null;
return librariesByPath.get(path);
}
}
}
| 12,140 |
605 | <gh_stars>100-1000
package com.sohu.tv.mq.cloud.service;
import java.util.Date;
import java.util.List;
import org.apache.rocketmq.common.MixAll;
import org.apache.rocketmq.common.protocol.body.BrokerStatsData;
import org.apache.rocketmq.common.protocol.route.BrokerData;
import org.apache.rocketmq.common.protocol.route.TopicRouteData;
import org.apache.rocketmq.tools.admin.MQAdminExt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.sohu.tv.mq.cloud.bo.Traffic;
import com.sohu.tv.mq.cloud.cache.LocalCache;
import com.sohu.tv.mq.cloud.util.Result;
/**
* 流量服务
*
* @Description:
* @author yongfeigao
* @date 2018年6月27日
*/
public abstract class TrafficService<T extends Traffic> {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
public static final String ERROR = "e";
@Autowired
private TopicService topicService;
@Autowired
private LocalCache<String> fetchLocalCache;
/**
* 抓取topic流量
*
* @param Topic
* @param mqAdmin
*/
protected void fetchTraffic(MQAdminExt mqAdmin, String topic, String statKey, T traffic) {
// 获取topic路由
TopicRouteData topicRouteData = null;
try {
topicRouteData = topicService.route(mqAdmin, topic);
} catch (Exception e) {
logger.warn("topic:{} route err", topic, e);
}
if (topicRouteData == null) {
return;
}
// 获取broker数据
List<BrokerData> brokerList = topicRouteData.getBrokerDatas();
for (BrokerData brokerData : brokerList) {
// 获取broker master
String masterAddr = brokerData.getBrokerAddrs().get(MixAll.MASTER_ID);
if (masterAddr == null) {
continue;
}
String key = masterAddr + "_" + statKey + "_" + getCountKey();
String value = fetchLocalCache.get(key);
if (value != null && ERROR.equals(value)) {
if (logger.isDebugEnabled()) {
logger.debug("key:{} add to blacklist, not fetch!", key);
}
continue;
}
if(getCountKey() != null) {
try {
// 获取次数统计
BrokerStatsData brokerPutStatsData = mqAdmin.viewBrokerStatsData(masterAddr, getCountKey(), statKey);
traffic.addCount(brokerPutStatsData);
} catch (Exception e) {
if(logger.isDebugEnabled()) {
logger.debug("fetch traffic, broker:{}, stat:{}, key:{}, err:{}", masterAddr, getCountKey(), statKey,
e.getMessage());
}
fetchLocalCache.put(key, ERROR);
continue;
}
}
if(getSizeKey() != null) {
try {
// 获取大小统计
BrokerStatsData brokerSizeStatsData = mqAdmin.viewBrokerStatsData(masterAddr, getSizeKey(), statKey);
traffic.addSize(brokerSizeStatsData);
} catch (Exception e) {
if(logger.isDebugEnabled()) {
logger.debug("fetch traffic, broker:{}, stat:{}, key:{}, err:{}", masterAddr, getSizeKey(),
statKey, e.getMessage());
}
}
}
// 处理流量
processBrokerTraffic(masterAddr, traffic);
}
}
/**
* 获取需要统计的次数key
*
* @return
*/
protected abstract String getCountKey();
/**
* 获取需要统计的大小key
*
* @return
*/
protected abstract String getSizeKey();
/**
* 删除数据
*
* @param date
* @return 删除的行数
*/
public abstract Result<Integer> delete(Date date);
/**
* 查询数据
*
* @param id
* @param date
* @return Result<List<T>>
*/
public abstract Result<List<T>> query(long id, String date);
/**
* 查询数据
*
* @param idList
* @param date
* @return Result<List<T>>
*/
public abstract Result<List<T>> query(List<Long> idList, String date);
/**
* 查询数据
*
* @param idList
* @param date
* @param time
* @return Result<List<T>>
*/
public abstract Result<List<T>> query(List<Long> idList, String date, String time);
/**
* 处理traffic数据
* @param ip: broker ip
* @param traffic: 流量
*/
protected void processBrokerTraffic(String ip, T traffic) {
//默认空实现,子类可覆盖
}
}
| 2,604 |
32,544 | package com.baeldung.spring.serverconfig;
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.embedded.netty.NettyServerCustomizer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;
import reactor.netty.http.server.HttpServer;
@Component
public class NettyWebServerFactoryPortCustomizer implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
@Override
public void customize(NettyReactiveWebServerFactory serverFactory) {
serverFactory.addServerCustomizers(new PortCustomizer(8443));
}
private static class PortCustomizer implements NettyServerCustomizer {
private final int port;
private PortCustomizer(int port) {
this.port = port;
}
@Override
public HttpServer apply(HttpServer httpServer) {
return httpServer.port(port);
}
}
}
| 334 |
737 | <gh_stars>100-1000
/** spinlock.h -*- C++ -*-
<NAME>, 13 December 2009. All rights reserved.
Implementation of a spinlock.
*/
#ifndef __jml__arch__spinlock_h__
#define __jml__arch__spinlock_h__
#include <sched.h>
namespace ML {
struct Spinlock {
Spinlock(bool yield = true)
: value(0), yield(yield)
{
}
void lock()
{
acquire();
}
void unlock()
{
release();
}
bool locked() const
{
return value;
}
int try_acquire()
{
if (__sync_bool_compare_and_swap(&value, 0, 1))
return 0;
return -1;
}
bool try_lock()
{
return try_acquire() == 0;
}
int acquire()
{
for (int tries = 0; true; ++tries) {
if (!__sync_lock_test_and_set(&value, 1))
return 0;
if (tries == 100 && yield) {
tries = 0;
sched_yield();
}
}
}
int release()
{
__sync_lock_release(&value);
return 0;
}
volatile int value;
bool yield;
};
} // namespace ML
#endif /* __jml__arch__spinlock_h__ */
| 654 |
416 | <gh_stars>100-1000
/*!
* @header MPSPolygonAccelerationStructure.h
* @framework MPSRayIntersector
* @description MPSRayIntersector polygon acceleration structure interface.
*
* @copyright Copyright (c) 2018 Apple Inc. All rights reserved.
*/
#ifndef MPSPolygonAccelerationStructure_h
#define MPSPolygonAccelerationStructure_h
#import <MPSRayIntersector/MPSAccelerationStructure.h>
#import <MPSRayIntersector/MPSPolygonBuffer.h>
typedef NS_ENUM(NSUInteger, MPSPolygonType) {
/**
* @brief Triangles with three vertices
*/
MPSPolygonTypeTriangle = 0,
/**
* @brief Quadrilaterals with four vertices
*/
MPSPolygonTypeQuadrilateral = 1,
} MPS_ENUM_AVAILABLE_STARTING(macos(10.15), ios(13.0), macCatalyst(13.0), tvos(13.0));
/**
* @brief An acceleration structure built over polygonal shapes
*
* @discussion See MPSAccelerationStructure for more information
*/
MPS_CLASS_AVAILABLE_STARTING(macos(10.15), ios(13.0), macCatalyst(13.0), tvos(13.0))
@interface MPSPolygonAccelerationStructure : MPSAccelerationStructure
/**
* @brief The type of polygon. Defaults to MPSPolygonTypeTriangle. Changes to this property require
* rebuilding the acceleration structure.
*/
@property (nonatomic) MPSPolygonType polygonType;
/**
* @brief Offset, in bytes, between consecutive vertices in the vertex buffer. Defaults to 0 bytes,
* indicating that the vertices are packed according to the natural alignment of the vector_float3
* type: 16 bytes.
*
* @discussion This can be used to skip past any additional per-vertex data which may be stored
* alongside the position such as the vertex normal and texture coordinates. Must be a multiple of
* 4 bytes, and must be at least 12 bytes. Changes to this property require rebuilding the
* acceleration structure.
*/
@property (nonatomic) NSUInteger vertexStride;
/**
* @brief Index type. Defaults to MPSDataTypeUInt32. Only MPSDataTypeUInt16 and MPSDataTypeUInt32
* are supported.
*/
@property (nonatomic) MPSDataType indexType;
/**
* @brief Vertex buffer containing vertex data encoded as three 32 bit floats per vertex. Note
* that by default each vertex is aligned to the alignment of the vector_float3 type: 16 bytes.
* This can be changed using the vertexStride property. A vertex buffer must be provided before
* the acceleration structure is built.
*
* When using triangle polygons, degenerate (zero or negative area) triangles are ignored
* during acceleration structure construction. This can be used to pad triangle indices if needed.
*
* Quadrilateral polygons are internally treated as two triangles. If the quadrilateral has
* vertices v0, v1, v2, and v3, the two triangles will have vertices v0, v1, v2 and v0, v2, v3.
* A quadrilateral may be used to represent a triangle by repeating the last vertex. If the first
* triangle is degenerate (zero or negative area), the entire quadrilateral will be ignored. This
* can be used to pad quadrilateral indices if needed. All four vertices of a quadrilateral must
* be coplanar and the quadrilateral must be convex.
*
* This is an alias for polygonBuffers[0].vertexBuffer. There must be exactly one polygon buffer
* to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic, retain) id <MTLBuffer> _Nullable vertexBuffer;
/**
* @brief Offset, in bytes, into the vertex buffer. Defaults to 0 bytes. Must be aligned to 4
* bytes.
*
* This is an alias for polygonBuffers[0].vertexBufferOffset. There must be exactly one polygon
* buffer to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic) NSUInteger vertexBufferOffset;
/**
* @brief Index buffer containing index data. Each index references a vertex in the vertex buffer.
* May be nil.
*
* This is an alias for polygonBuffers[0].indexBuffer. There must be exactly one polygon buffer
* to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic, retain) id <MTLBuffer> _Nullable indexBuffer;
/**
* @brief Offset, in bytes, into the index buffer. Defaults to 0 bytes. Must be aligned to a
* multiple of the index type. Changes to this property require rebuilding the acceleration
* structure.
*
* This is an alias for polygonBuffers[0].indexBufferOffset. There must be exactly one polygon
* buffer to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic) NSUInteger indexBufferOffset;
/**
* @brief Mask buffer containing one uint32_t mask per polygon. May be nil. Otherwise, the mask
* type must be specified on the MPSRayIntersector with which it is used.
*
* This is an alias for polygonBuffers[0].maskBuffer. There must be exactly one polygon buffer
* to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic, retain) id <MTLBuffer> _Nullable maskBuffer;
/**
* @brief Offset, in bytes, into the mask buffer. Defaults to 0 bytes. Must be aligned to 4 bytes.
*
* This is an alias for polygonBuffers[0].maskBufferOffset. There must be exactly one polygon
* buffer to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic) NSUInteger maskBufferOffset;
/**
* @brief Number of polygons. Changes to this property require rebuilding the acceleration
* structure.
*
* This is an alias for polygonBuffers[0].polygonCount. There must be exactly one polygon buffer
* to use this property, or the polygonBuffers property must be nil, in which case an
* MPSPolygonBuffer will be created automatically.
*/
@property (nonatomic) NSUInteger polygonCount;
/**
* @brief Array of polygon buffers. Each buffer contains a vertex buffer and optional index and
* mask buffer for an array of polygons. Changing the length of this array requires rebuilding the
* acceleration structure.
*
* Using more than one MPSPolygonBuffer will reduce performance. It is better to concatenate
* these buffers into a single vertex buffer, index buffer, and mask buffer and use a single
* MPSPolygonBuffer if possible. This also applies when using an MPSInstanceAccelerationStructure:
* each instance or subclass of MPSPolygonAccelerationStructure in an instance hierarchy should use
* the same vertex buffer, index buffer, and mask buffer, although each acceleration structure
* may use different offsets into these buffers. This allows for the vertex, index, and mask
* buffers to be bound directly instead of indirectly through an argument buffer.
*
* There must be at least one MPSPolygonBuffer. On argument buffer tier 1 devices, there must be
* be exactly one MPSPolygonBuffer. Use the argumentBuffersSupport property of the MTLDevice to
* check for support.
*/
@property (nonatomic, retain) NSArray <MPSPolygonBuffer *> * _Nullable polygonBuffers;
@end
#endif
| 1,988 |
362 | <reponame>ayberkgerey5/FrameGraphx
// Copyright (c) 2018-2020, <NAME>. For more information see 'LICENSE'
#pragma once
#include "stl/Math/Bytes.h"
#include "stl/Math/Vec.h"
#include "stl/Math/Color.h"
#include "framegraph/Public/BufferView.h"
#include "framegraph/Public/ResourceEnums.h"
namespace FG
{
//
// Image View
//
struct ImageView
{
// types
public:
using T = BufferView::value_type;
using value_type = T;
using Iterator = typename BufferView::Iterator;
using LoadRGBA32fFun_t = void (*) (ArrayView<T>, OUT RGBA32f &);
using LoadRGBA32uFun_t = void (*) (ArrayView<T>, OUT RGBA32u &);
using LoadRGBA32iFun_t = void (*) (ArrayView<T>, OUT RGBA32i &);
// variables
private:
BufferView _parts;
uint3 _dimension;
size_t _rowPitch = 0;
size_t _slicePitch = 0;
uint _bitsPerPixel = 0;
EPixelFormat _format = Default;
LoadRGBA32fFun_t _loadF4 = null;
LoadRGBA32uFun_t _loadU4 = null;
LoadRGBA32iFun_t _loadI4 = null;
// methods
public:
ImageView ()
{}
ImageView (ArrayView<ArrayView<T>> parts, const uint3 &dim, BytesU rowPitch, BytesU slicePitch, EPixelFormat format, EImageAspect aspect);
ND_ Iterator begin () const { return _parts.begin(); }
ND_ Iterator end () const { return _parts.end(); }
ND_ bool empty () const { return _parts.empty(); }
ND_ size_t size () const { return _parts.size(); }
ND_ T const * data () const { return _parts.data(); }
ND_ ArrayView<ArrayView<T>> Parts () const { return _parts.Parts(); }
ND_ uint3 const& Dimension () const { return _dimension; }
ND_ BytesU RowPitch () const { return BytesU(_rowPitch); }
ND_ BytesU SlicePitch () const { return BytesU(_slicePitch); }
ND_ uint BitsPerPixel () const { return _bitsPerPixel; }
ND_ BytesU RowSize () const { return BytesU(_dimension.x * _bitsPerPixel) / 8; }
ND_ BytesU SliseSize () const { return BytesU(_rowPitch * _dimension.y); }
ND_ EPixelFormat Format () const { return _format; }
// implementation garanties that single row completely placed to solid memory block.
ND_ ArrayView<T> GetRow (uint y, uint z = 0) const
{
ASSERT( y < _dimension.y and z < _dimension.z );
const size_t row_size = size_t(RowSize()) / sizeof(T);
const auto res = _parts.section( _slicePitch * z + _rowPitch * y, row_size );
ASSERT( res.size() == row_size );
return res;
}
// implementation doesn't garanties that single slice compilete placed to solid memory block,
// so check result size with 'SliseSize()'.
ND_ ArrayView<T> GetSlice (uint z) const
{
ASSERT( z < _dimension.z );
const size_t slice_size = size_t(SliseSize()) / sizeof(T);
return _parts.section( _slicePitch * z, slice_size );
}
ND_ ArrayView<T> GetPixel (const uint3 &point) const
{
ASSERT(All( point < _dimension ));
return GetRow( point.y, point.z ).section( (point.x * _bitsPerPixel) / 8, (_bitsPerPixel + 7) / 8 );
}
void Load (const uint3 &point, OUT RGBA32f &col) const
{
ASSERT( _loadF4 );
return _loadF4( GetPixel( point ), OUT col );
}
void Load (const uint3 &point, OUT RGBA32u &col) const
{
ASSERT( _loadU4 );
return _loadU4( GetPixel( point ), OUT col );
}
void Load (const uint3 &point, OUT RGBA32i &col) const
{
ASSERT( _loadI4 );
return _loadI4( GetPixel( point ), OUT col );
}
/*void Load (const uint3 &point, OUT RGBA32f &col) const
{
ASSERT( _isFloatFormat );
auto pixel = GetPixel( point );
if constexpr ( IsInteger<T> )
{
ASSERT( _isNormalized );
}
else
{
ASSERT( not _isNormalized );
}
}*/
/*
void Load (const uint3 &point, OUT RGBA32u &col) const
{
ASSERT( not _isFloatFormat );
//ASSERT( not _isNormalized ); // it is OK to read integer normalized as unnormalized value
const auto pixel = GetPixel( point );
const uint channel_size = (_bitsPerPixel + 7) / (_numChannels * 8);
for (uint i = 0, cnt = NumChannels(); i < cnt; ++i)
{
std::memcpy( col.data() + i, row.data() + i * channel_size, channel_size );
}
}
*/
/*void Load (const uint3 &point, OUT RGBA32i &col) const
{
ASSERT( not _isFloatFormat );
//ASSERT( not _isNormalized ); // it is OK to read integer normalized as unnormalized value
const auto pixel = GetPixel( point );
const uint channel_size = (_bitsPerPixel + 7) / (_numChannels * 8);
for (uint i = 0, cnt = NumChannels(); i < cnt; ++i)
{
std::memcpy( col.data() + i, row.data() + i * channel_size, channel_size );
}
}*/
};
} // FG
| 1,961 |
632 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.streaming.connectors.activemq;
import org.apache.flink.streaming.connectors.activemq.internal.AMQExceptionListener;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import javax.jms.JMSException;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
public class AMQExceptionListenerTest {
@Test
public void logMessageOnException() throws JMSException {
Logger logger = mock(Logger.class);
AMQExceptionListener listener = new AMQExceptionListener(logger, true);
JMSException exception = new JMSException("error");
listener.onException(exception);
listener.checkErroneous();
verify(logger).error("Received ActiveMQ exception", exception);
}
@Test
public void logMessageWrittenOnlyOnce() throws JMSException {
Logger logger = mock(Logger.class);
AMQExceptionListener listener = new AMQExceptionListener(logger, true);
JMSException exception = new JMSException("error");
listener.onException(exception);
listener.checkErroneous();
listener.checkErroneous();
verify(logger, times(1)).error("Received ActiveMQ exception", exception);
}
@Test
public void throwException() throws JMSException {
Logger logger = mock(Logger.class);
AMQExceptionListener listener = new AMQExceptionListener(logger, false);
listener.onException(new JMSException("error"));
Assertions.assertThrows(JMSException.class, () -> listener.checkErroneous(), "a exception is expected");
}
@Test
public void throwExceptionOnlyOnce() throws JMSException {
Logger logger = mock(Logger.class);
AMQExceptionListener listener = new AMQExceptionListener(logger, false);
listener.onException(new JMSException("error"));
try {
listener.checkErroneous();
} catch (JMSException ignore) {
// ignore
}
listener.checkErroneous();
}
@Test
public void logMessageNotWrittenIfNoException() throws JMSException {
Logger logger = mock(Logger.class);
AMQExceptionListener listener = new AMQExceptionListener(logger, false);
listener.checkErroneous();
verify(logger, times(0)).error(any(String.class), any(Throwable.class));
}
}
| 1,071 |
854 | __________________________________________________________________________________________________
2ms
class Solution {
public List<List<Integer>> combinationSum2(int[] candidates, int target) {
List<List<Integer>> ans = new ArrayList<>();
List<Integer> comb = new ArrayList<>();
Arrays.sort(candidates); // need sort to make this work.
combination(candidates, target, 0, comb, ans);
return ans;
}
private void combination(int[] candi, int target, int start,
List<Integer> comb, List<List<Integer>> ans) {
for (int i = start; i < candi.length; i++) {
if (i > start && candi[i] == candi[i - 1]) //remove duplicates.
continue;
if (candi[i] == target) {
//recursion exit.
List<Integer> newComb = new ArrayList<>(comb);
newComb.add(candi[i]);
ans.add(newComb);
} else if (candi[i] < target) {
//continue to look for the rest.
List<Integer> newComb = new ArrayList<>(comb);
newComb.add(candi[i]);
combination(candi, target - candi[i], i + 1, newComb, ans);
} else
break; //invalid path, return nothing.
}
}
}
__________________________________________________________________________________________________
3ms
class Solution {
public List<List<Integer>> combinationSum2(int[] nums, int target) {
Arrays.sort(nums);
List<List<Integer>> res = new ArrayList<>();
backtrack(nums, res, new ArrayList<Integer>(), target, 0);
return res;
}
public void backtrack(int[] nums, List<List<Integer>> res, List<Integer> list, int remain, int start){
if(remain<0) return;
if(remain==0){
res.add(new ArrayList<Integer>(list));
return;
}
for(int i = start;i<nums.length;i++){
if(i!=start && nums[i] == nums[i-1]) continue;
list.add(nums[i]);
backtrack(nums, res, list, remain-nums[i],i+1);
list.remove(list.size()-1);
}
}
}
__________________________________________________________________________________________________
4ms
class Solution {
public List<List<Integer>> result = new ArrayList<List<Integer>>();
public List<List<Integer>> combinationSum2(int[] candidates, int target) {
if(candidates == null || candidates.length == 0) return result;
Arrays.sort(candidates);
findCombination(candidates, 0, new ArrayList<Integer>(), target);
return result;
}
public void findCombination(int[] candidates, int index, List<Integer> solution, int left) {
if(index > candidates.length) return;
if(left == 0) {
result.add(new ArrayList<Integer>(solution));
return;
}
if(left < 0) return;
for(int i = index; i < candidates.length; i ++) {
solution.add(candidates[i]);
findCombination(candidates, i + 1, solution, left - candidates[i]);
solution.remove(solution.size() - 1);
while(i < candidates.length - 1 && candidates[i] == candidates[i + 1]) {
i ++;
}
}
}
}
__________________________________________________________________________________________________
35752 kb
class Solution {
public List<List<Integer>> combinationSum2(int[] candidates, int target) {
Arrays.sort(candidates);
List<List<Integer>> res = new ArrayList<>();
helper(res, new ArrayList<>(), 0, target, candidates);
return res;
}
public void helper(List<List<Integer>> res, List<Integer> prev, int idx, int target, int[] arr) {
for(int i = idx; i < arr.length; i++) {
if (i == idx || arr[i] != arr[i-1]) {
if (target < arr[i]) break;
prev.add(arr[i]);
if (target == arr[i]) {
res.add(new ArrayList(prev));
prev.remove(prev.size()-1);
break;
}
helper(res, prev, i+1, target - arr[i], arr);
prev.remove(prev.size()-1);
}
}
}
}
__________________________________________________________________________________________________
35824 kb
class Solution {
public void bt(List<List<Integer>> res, int[] candidates, List<Integer> cur, int target, int pos){
if (target == 0) {
res.add(new ArrayList(cur));
return;
}
for (int i = pos; i < candidates.length; i++) {
if (candidates[i] > target) break;
cur.add(candidates[i]);
bt(res, candidates, cur, target - candidates[i], i + 1);
while (i + 1 < candidates.length && candidates[i] == candidates[i + 1]) i++;
cur.remove(cur.size() - 1);
}
}
public List<List<Integer>> combinationSum2(int[] candidates, int target) {
Arrays.sort(candidates);
List<List<Integer>> res = new ArrayList<>();
bt(res, candidates, new ArrayList<>(), target, 0);
return res;
}
}
__________________________________________________________________________________________________ | 2,407 |
422 | <reponame>crypticspawn/BashSupport<gh_stars>100-1000
/*
* Copyright (c) <NAME>, <EMAIL>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ansorgit.plugins.bash.lang.psi.impl.vars;
import com.ansorgit.plugins.bash.lang.psi.api.BashReference;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.psi.impl.source.resolve.reference.impl.CachingReference;
import com.intellij.refactoring.rename.BindablePsiReference;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;
/**
* Abstract variable definition reference to allow implementations for smart and dumb mode.
*
* @author jansorg
*/
abstract class AbstractVarDefReference extends CachingReference implements BashReference, BindablePsiReference {
protected final BashVarDefImpl bashVarDef;
public AbstractVarDefReference(BashVarDefImpl bashVarDef) {
this.bashVarDef = bashVarDef;
}
@Override
public String getReferencedName() {
return bashVarDef.getReferenceName();
}
@Override
public PsiElement getElement() {
return bashVarDef;
}
@Override
public TextRange getRangeInElement() {
return bashVarDef.getAssignmentNameTextRange();
}
@NotNull
@Override
public String getCanonicalText() {
return bashVarDef.getReferenceName();
}
@Override
public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException {
bashVarDef.setName(newElementName);
return bashVarDef;
}
@Override
public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException {
if (isReferenceTo(element)) {
return bashVarDef;
}
//fixme right?
return handleElementRename(element.getText());
}
@NotNull
@Override
public Object[] getVariants() {
return EMPTY_ARRAY;
}
}
| 832 |
32,544 | package com.baeldung.jpa.enums;
enum Type {
INTERNAL, EXTERNAL;
}
| 34 |
3,167 | // Copyright 2019 DeepMind Technologies Ltd. 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.
#ifndef OPEN_SPIEL_ACTION_VIEW_
#define OPEN_SPIEL_ACTION_VIEW_
#include <vector>
#include "open_spiel/spiel.h"
// ActionView provides a number of iterators that are useful for dealing
// with simultaneous move nodes.
namespace open_spiel {
class FixedActionsIterator {
const int fixed_action_;
const int num_actions_;
const int prod_before_;
const int prod_after_;
int i_; // Outer loop
int j_; // Inner loop
public:
FixedActionsIterator(int fixed_action, int num_actions, int prod_before,
int prod_after, int i, int j);
FixedActionsIterator& operator++();
Action operator*() const;
bool operator==(const FixedActionsIterator& rhs) const;
bool operator!=(const FixedActionsIterator& rhs) const;
};
struct FixedActions {
const int fixed_action;
const int num_actions;
const int prod_before;
const int prod_after;
FixedActionsIterator begin() const;
FixedActionsIterator end() const;
};
class FlatJointActionsIterator {
int current_action_;
public:
FlatJointActionsIterator(int current_action);
FlatJointActionsIterator& operator++();
bool operator==(FlatJointActionsIterator other) const;
bool operator!=(FlatJointActionsIterator other) const;
Action operator*() const;
};
struct FlatJointActions {
const int num_flat_joint_actions;
FlatJointActionsIterator begin() const;
FlatJointActionsIterator end() const;
};
// Provides a number of iterators that are useful for dealing
// with simultaneous move nodes.
struct ActionView {
const Player current_player;
const std::vector<std::vector<Action>> legal_actions;
// Collects legal actions at the specified state.
explicit ActionView(const State& state);
// Construct a custom action view.
ActionView(const Player current_player,
const std::vector<std::vector<Action>> legal_actions);
int num_players() const { return legal_actions.size(); }
int num_actions(Player pl) const { return legal_actions.at(pl).size(); }
// Provides an iterator over all flattened joint actions.
//
// It computes the number of possible joint actions = \prod #actions(i)
// over all the players with any legal actions available.
// The possible joint actions are just numbered 0, 1, 2, .... and can be
// decomposed into the individual actions of the players.
//
// As this is an iterator, it does not allocate memory for the whole cartesian
// product of the actions.
FlatJointActions flat_joint_actions() const;
// Provides an iterator over flattened actions, while we fix one action
// for the specified player.
FixedActions fixed_action(Player player, int action_index) const;
};
} // namespace open_spiel
#endif // OPEN_SPIEL_ACTION_VIEW_
| 976 |
348 | {"nom":"Ouville-la-Rivière","circ":"6ème circonscription","dpt":"Seine-Maritime","inscrits":423,"abs":153,"votants":270,"blancs":7,"nuls":2,"exp":261,"res":[{"nuance":"REM","nom":"<NAME>","voix":100},{"nuance":"COM","nom":"<NAME>","voix":52},{"nuance":"UDI","nom":"M<NAME>","voix":50},{"nuance":"FN","nom":"<NAME>","voix":44},{"nuance":"SOC","nom":"Mme <NAME>","voix":11},{"nuance":"EXG","nom":"M. <NAME>","voix":3},{"nuance":"DIV","nom":"<NAME>","voix":1},{"nuance":"DVG","nom":"M. <NAME>","voix":0}]} | 205 |
2,329 | <reponame>alimate/spring-loaded
package differs;
public class DiffThreeY<T> {
}
| 30 |
854 | __________________________________________________________________________________________________
sample 71 ms submission
class Trie {
private boolean isKey;
private Trie[] next;
/**
* Initialize your data structure here.
*/
public Trie() {
isKey = false;
next = new Trie[26];
}
/**
* Inserts a word into the trie.
*/
public void insert(String word) {
char[] w = word.toCharArray();
Trie trie = this;
for (char c : w) {
if (trie.next[c - 'a'] == null) trie.next[c - 'a'] = new Trie();
trie = trie.next[c - 'a'];
}
trie.isKey = true;
}
/**
* Returns if the word is in the trie.
*/
public boolean search(String word) {
char[] w = word.toCharArray();
Trie trie = this;
for (char c : w) {
if (trie.next[c - 'a'] == null) return false;
trie = trie.next[c - 'a'];
}
return trie.isKey;
}
/**
* Returns if there is any word in the trie that starts with the given prefix.
*/
public boolean startsWith(String prefix) {
char[] w = prefix.toCharArray();
Trie trie = this;
for (char c : w) {
if (trie.next[c - 'a'] == null) return false;
trie = trie.next[c - 'a'];
}
return true;
}
}
/**
* Your Trie object will be instantiated and called as such:
* Trie obj = new Trie();
* obj.insert(word);
* boolean param_2 = obj.search(word);
* boolean param_3 = obj.startsWith(prefix);
*/
__________________________________________________________________________________________________
sample 48208 kb submission
class Trie {
/** Initialize your data structure here. */
TreeSet<String> set;
public Trie() {
set = new TreeSet<>();
}
/** Inserts a word into the trie. */
public void insert(String word) {
if(!set.contains(word))
set.add(word);
}
/** Returns if the word is in the trie. */
public boolean search(String word) {
return set.contains(word);
}
/** Returns if there is any word in the trie that starts with the given prefix. */
public boolean startsWith(String prefix) {
if(set.size()==0)
return false;
String s = set.ceiling(prefix);
if(s!=null)
return s.startsWith(prefix);
else
return false;
}
}
/**
* Your Trie object will be instantiated and called as such:
* Trie obj = new Trie();
* obj.insert(word);
* boolean param_2 = obj.search(word);
* boolean param_3 = obj.startsWith(prefix);
*/
__________________________________________________________________________________________________
| 1,127 |
850 | <gh_stars>100-1000
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/worker.proto
#ifndef PROTOBUF_tensorflow_2fcore_2fprotobuf_2fworker_2eproto__INCLUDED
#define PROTOBUF_tensorflow_2fcore_2fprotobuf_2fworker_2eproto__INCLUDED
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3001000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/any.pb.h>
#include "tensorflow/core/framework/cost_graph.pb.h"
#include "tensorflow/core/framework/step_stats.pb.h"
#include "tensorflow/core/framework/device_attributes.pb.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/tensor.pb.h"
#include "tensorflow/core/protobuf/config.pb.h"
#include "tensorflow/core/protobuf/debug.pb.h"
#include "tensorflow/core/protobuf/named_tensor.pb.h"
#include "tensorflow/core/protobuf/tensorflow_server.pb.h"
// @@protoc_insertion_point(includes)
namespace tensorflow {
// Internal implementation detail -- do not call these.
void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
class CleanupAllRequest;
class CleanupAllResponse;
class CleanupGraphRequest;
class CleanupGraphResponse;
class CreateWorkerSessionRequest;
class CreateWorkerSessionResponse;
class DeregisterGraphRequest;
class DeregisterGraphResponse;
class ExecutorOpts;
class GetStatusRequest;
class GetStatusResponse;
class LabeledStepStats;
class LoggingRequest;
class LoggingResponse;
class RecvTensorRequest;
class RecvTensorResponse;
class RegisterGraphRequest;
class RegisterGraphResponse;
class RunGraphRequest;
class RunGraphResponse;
class TraceOpts;
class TracingRequest;
class TracingResponse;
// ===================================================================
class GetStatusRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GetStatusRequest) */ {
public:
GetStatusRequest();
virtual ~GetStatusRequest();
GetStatusRequest(const GetStatusRequest& from);
inline GetStatusRequest& operator=(const GetStatusRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const GetStatusRequest& default_instance();
static const GetStatusRequest* internal_default_instance();
void UnsafeArenaSwap(GetStatusRequest* other);
void Swap(GetStatusRequest* other);
// implements Message ----------------------------------------------
inline GetStatusRequest* New() const { return New(NULL); }
GetStatusRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GetStatusRequest& from);
void MergeFrom(const GetStatusRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(GetStatusRequest* other);
void UnsafeMergeFrom(const GetStatusRequest& from);
protected:
explicit GetStatusRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.GetStatusRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<GetStatusRequest> GetStatusRequest_default_instance_;
// -------------------------------------------------------------------
class GetStatusResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GetStatusResponse) */ {
public:
GetStatusResponse();
virtual ~GetStatusResponse();
GetStatusResponse(const GetStatusResponse& from);
inline GetStatusResponse& operator=(const GetStatusResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const GetStatusResponse& default_instance();
static const GetStatusResponse* internal_default_instance();
void UnsafeArenaSwap(GetStatusResponse* other);
void Swap(GetStatusResponse* other);
// implements Message ----------------------------------------------
inline GetStatusResponse* New() const { return New(NULL); }
GetStatusResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const GetStatusResponse& from);
void MergeFrom(const GetStatusResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(GetStatusResponse* other);
void UnsafeMergeFrom(const GetStatusResponse& from);
protected:
explicit GetStatusResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated .tensorflow.DeviceAttributes device_attributes = 1;
int device_attributes_size() const;
void clear_device_attributes();
static const int kDeviceAttributesFieldNumber = 1;
const ::tensorflow::DeviceAttributes& device_attributes(int index) const;
::tensorflow::DeviceAttributes* mutable_device_attributes(int index);
::tensorflow::DeviceAttributes* add_device_attributes();
::google::protobuf::RepeatedPtrField< ::tensorflow::DeviceAttributes >*
mutable_device_attributes();
const ::google::protobuf::RepeatedPtrField< ::tensorflow::DeviceAttributes >&
device_attributes() const;
// @@protoc_insertion_point(class_scope:tensorflow.GetStatusResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedPtrField< ::tensorflow::DeviceAttributes > device_attributes_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<GetStatusResponse> GetStatusResponse_default_instance_;
// -------------------------------------------------------------------
class CreateWorkerSessionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CreateWorkerSessionRequest) */ {
public:
CreateWorkerSessionRequest();
virtual ~CreateWorkerSessionRequest();
CreateWorkerSessionRequest(const CreateWorkerSessionRequest& from);
inline CreateWorkerSessionRequest& operator=(const CreateWorkerSessionRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CreateWorkerSessionRequest& default_instance();
static const CreateWorkerSessionRequest* internal_default_instance();
void UnsafeArenaSwap(CreateWorkerSessionRequest* other);
void Swap(CreateWorkerSessionRequest* other);
// implements Message ----------------------------------------------
inline CreateWorkerSessionRequest* New() const { return New(NULL); }
CreateWorkerSessionRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CreateWorkerSessionRequest& from);
void MergeFrom(const CreateWorkerSessionRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CreateWorkerSessionRequest* other);
void UnsafeMergeFrom(const CreateWorkerSessionRequest& from);
protected:
explicit CreateWorkerSessionRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional string session_handle = 1;
void clear_session_handle();
static const int kSessionHandleFieldNumber = 1;
const ::std::string& session_handle() const;
void set_session_handle(const ::std::string& value);
void set_session_handle(const char* value);
void set_session_handle(const char* value, size_t size);
::std::string* mutable_session_handle();
::std::string* release_session_handle();
void set_allocated_session_handle(::std::string* session_handle);
::std::string* unsafe_arena_release_session_handle();
void unsafe_arena_set_allocated_session_handle(
::std::string* session_handle);
// optional .tensorflow.ServerDef server_def = 2;
bool has_server_def() const;
void clear_server_def();
static const int kServerDefFieldNumber = 2;
private:
void _slow_mutable_server_def();
void _slow_set_allocated_server_def(
::google::protobuf::Arena* message_arena, ::tensorflow::ServerDef** server_def);
::tensorflow::ServerDef* _slow_release_server_def();
public:
const ::tensorflow::ServerDef& server_def() const;
::tensorflow::ServerDef* mutable_server_def();
::tensorflow::ServerDef* release_server_def();
void set_allocated_server_def(::tensorflow::ServerDef* server_def);
::tensorflow::ServerDef* unsafe_arena_release_server_def();
void unsafe_arena_set_allocated_server_def(
::tensorflow::ServerDef* server_def);
// @@protoc_insertion_point(class_scope:tensorflow.CreateWorkerSessionRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::internal::ArenaStringPtr session_handle_;
::tensorflow::ServerDef* server_def_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CreateWorkerSessionRequest> CreateWorkerSessionRequest_default_instance_;
// -------------------------------------------------------------------
class CreateWorkerSessionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CreateWorkerSessionResponse) */ {
public:
CreateWorkerSessionResponse();
virtual ~CreateWorkerSessionResponse();
CreateWorkerSessionResponse(const CreateWorkerSessionResponse& from);
inline CreateWorkerSessionResponse& operator=(const CreateWorkerSessionResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CreateWorkerSessionResponse& default_instance();
static const CreateWorkerSessionResponse* internal_default_instance();
void UnsafeArenaSwap(CreateWorkerSessionResponse* other);
void Swap(CreateWorkerSessionResponse* other);
// implements Message ----------------------------------------------
inline CreateWorkerSessionResponse* New() const { return New(NULL); }
CreateWorkerSessionResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CreateWorkerSessionResponse& from);
void MergeFrom(const CreateWorkerSessionResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CreateWorkerSessionResponse* other);
void UnsafeMergeFrom(const CreateWorkerSessionResponse& from);
protected:
explicit CreateWorkerSessionResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.CreateWorkerSessionResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CreateWorkerSessionResponse> CreateWorkerSessionResponse_default_instance_;
// -------------------------------------------------------------------
class RegisterGraphRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RegisterGraphRequest) */ {
public:
RegisterGraphRequest();
virtual ~RegisterGraphRequest();
RegisterGraphRequest(const RegisterGraphRequest& from);
inline RegisterGraphRequest& operator=(const RegisterGraphRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RegisterGraphRequest& default_instance();
static const RegisterGraphRequest* internal_default_instance();
void UnsafeArenaSwap(RegisterGraphRequest* other);
void Swap(RegisterGraphRequest* other);
// implements Message ----------------------------------------------
inline RegisterGraphRequest* New() const { return New(NULL); }
RegisterGraphRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RegisterGraphRequest& from);
void MergeFrom(const RegisterGraphRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RegisterGraphRequest* other);
void UnsafeMergeFrom(const RegisterGraphRequest& from);
protected:
explicit RegisterGraphRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional string session_handle = 1;
void clear_session_handle();
static const int kSessionHandleFieldNumber = 1;
const ::std::string& session_handle() const;
void set_session_handle(const ::std::string& value);
void set_session_handle(const char* value);
void set_session_handle(const char* value, size_t size);
::std::string* mutable_session_handle();
::std::string* release_session_handle();
void set_allocated_session_handle(::std::string* session_handle);
::std::string* unsafe_arena_release_session_handle();
void unsafe_arena_set_allocated_session_handle(
::std::string* session_handle);
// optional .tensorflow.GraphDef graph_def = 2;
bool has_graph_def() const;
void clear_graph_def();
static const int kGraphDefFieldNumber = 2;
private:
void _slow_mutable_graph_def();
void _slow_set_allocated_graph_def(
::google::protobuf::Arena* message_arena, ::tensorflow::GraphDef** graph_def);
::tensorflow::GraphDef* _slow_release_graph_def();
public:
const ::tensorflow::GraphDef& graph_def() const;
::tensorflow::GraphDef* mutable_graph_def();
::tensorflow::GraphDef* release_graph_def();
void set_allocated_graph_def(::tensorflow::GraphDef* graph_def);
::tensorflow::GraphDef* unsafe_arena_release_graph_def();
void unsafe_arena_set_allocated_graph_def(
::tensorflow::GraphDef* graph_def);
// optional bool has_control_flow = 3 [deprecated = true];
GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_has_control_flow();
GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kHasControlFlowFieldNumber = 3;
GOOGLE_PROTOBUF_DEPRECATED_ATTR bool has_control_flow() const;
GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_has_control_flow(bool value);
// optional .tensorflow.GraphOptions graph_options = 4;
bool has_graph_options() const;
void clear_graph_options();
static const int kGraphOptionsFieldNumber = 4;
private:
void _slow_mutable_graph_options();
void _slow_set_allocated_graph_options(
::google::protobuf::Arena* message_arena, ::tensorflow::GraphOptions** graph_options);
::tensorflow::GraphOptions* _slow_release_graph_options();
public:
const ::tensorflow::GraphOptions& graph_options() const;
::tensorflow::GraphOptions* mutable_graph_options();
::tensorflow::GraphOptions* release_graph_options();
void set_allocated_graph_options(::tensorflow::GraphOptions* graph_options);
::tensorflow::GraphOptions* unsafe_arena_release_graph_options();
void unsafe_arena_set_allocated_graph_options(
::tensorflow::GraphOptions* graph_options);
// optional .tensorflow.DebugOptions debug_options = 5;
bool has_debug_options() const;
void clear_debug_options();
static const int kDebugOptionsFieldNumber = 5;
private:
void _slow_mutable_debug_options();
void _slow_set_allocated_debug_options(
::google::protobuf::Arena* message_arena, ::tensorflow::DebugOptions** debug_options);
::tensorflow::DebugOptions* _slow_release_debug_options();
public:
const ::tensorflow::DebugOptions& debug_options() const;
::tensorflow::DebugOptions* mutable_debug_options();
::tensorflow::DebugOptions* release_debug_options();
void set_allocated_debug_options(::tensorflow::DebugOptions* debug_options);
::tensorflow::DebugOptions* unsafe_arena_release_debug_options();
void unsafe_arena_set_allocated_debug_options(
::tensorflow::DebugOptions* debug_options);
// @@protoc_insertion_point(class_scope:tensorflow.RegisterGraphRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::internal::ArenaStringPtr session_handle_;
::tensorflow::GraphDef* graph_def_;
::tensorflow::GraphOptions* graph_options_;
::tensorflow::DebugOptions* debug_options_;
bool has_control_flow_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RegisterGraphRequest> RegisterGraphRequest_default_instance_;
// -------------------------------------------------------------------
class RegisterGraphResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RegisterGraphResponse) */ {
public:
RegisterGraphResponse();
virtual ~RegisterGraphResponse();
RegisterGraphResponse(const RegisterGraphResponse& from);
inline RegisterGraphResponse& operator=(const RegisterGraphResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RegisterGraphResponse& default_instance();
static const RegisterGraphResponse* internal_default_instance();
void UnsafeArenaSwap(RegisterGraphResponse* other);
void Swap(RegisterGraphResponse* other);
// implements Message ----------------------------------------------
inline RegisterGraphResponse* New() const { return New(NULL); }
RegisterGraphResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RegisterGraphResponse& from);
void MergeFrom(const RegisterGraphResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RegisterGraphResponse* other);
void UnsafeMergeFrom(const RegisterGraphResponse& from);
protected:
explicit RegisterGraphResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional string graph_handle = 1;
void clear_graph_handle();
static const int kGraphHandleFieldNumber = 1;
const ::std::string& graph_handle() const;
void set_graph_handle(const ::std::string& value);
void set_graph_handle(const char* value);
void set_graph_handle(const char* value, size_t size);
::std::string* mutable_graph_handle();
::std::string* release_graph_handle();
void set_allocated_graph_handle(::std::string* graph_handle);
::std::string* unsafe_arena_release_graph_handle();
void unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle);
// @@protoc_insertion_point(class_scope:tensorflow.RegisterGraphResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::internal::ArenaStringPtr graph_handle_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RegisterGraphResponse> RegisterGraphResponse_default_instance_;
// -------------------------------------------------------------------
class DeregisterGraphRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.DeregisterGraphRequest) */ {
public:
DeregisterGraphRequest();
virtual ~DeregisterGraphRequest();
DeregisterGraphRequest(const DeregisterGraphRequest& from);
inline DeregisterGraphRequest& operator=(const DeregisterGraphRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const DeregisterGraphRequest& default_instance();
static const DeregisterGraphRequest* internal_default_instance();
void UnsafeArenaSwap(DeregisterGraphRequest* other);
void Swap(DeregisterGraphRequest* other);
// implements Message ----------------------------------------------
inline DeregisterGraphRequest* New() const { return New(NULL); }
DeregisterGraphRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const DeregisterGraphRequest& from);
void MergeFrom(const DeregisterGraphRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(DeregisterGraphRequest* other);
void UnsafeMergeFrom(const DeregisterGraphRequest& from);
protected:
explicit DeregisterGraphRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional string session_handle = 2;
void clear_session_handle();
static const int kSessionHandleFieldNumber = 2;
const ::std::string& session_handle() const;
void set_session_handle(const ::std::string& value);
void set_session_handle(const char* value);
void set_session_handle(const char* value, size_t size);
::std::string* mutable_session_handle();
::std::string* release_session_handle();
void set_allocated_session_handle(::std::string* session_handle);
::std::string* unsafe_arena_release_session_handle();
void unsafe_arena_set_allocated_session_handle(
::std::string* session_handle);
// optional string graph_handle = 1;
void clear_graph_handle();
static const int kGraphHandleFieldNumber = 1;
const ::std::string& graph_handle() const;
void set_graph_handle(const ::std::string& value);
void set_graph_handle(const char* value);
void set_graph_handle(const char* value, size_t size);
::std::string* mutable_graph_handle();
::std::string* release_graph_handle();
void set_allocated_graph_handle(::std::string* graph_handle);
::std::string* unsafe_arena_release_graph_handle();
void unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle);
// @@protoc_insertion_point(class_scope:tensorflow.DeregisterGraphRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::internal::ArenaStringPtr session_handle_;
::google::protobuf::internal::ArenaStringPtr graph_handle_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<DeregisterGraphRequest> DeregisterGraphRequest_default_instance_;
// -------------------------------------------------------------------
class DeregisterGraphResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.DeregisterGraphResponse) */ {
public:
DeregisterGraphResponse();
virtual ~DeregisterGraphResponse();
DeregisterGraphResponse(const DeregisterGraphResponse& from);
inline DeregisterGraphResponse& operator=(const DeregisterGraphResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const DeregisterGraphResponse& default_instance();
static const DeregisterGraphResponse* internal_default_instance();
void UnsafeArenaSwap(DeregisterGraphResponse* other);
void Swap(DeregisterGraphResponse* other);
// implements Message ----------------------------------------------
inline DeregisterGraphResponse* New() const { return New(NULL); }
DeregisterGraphResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const DeregisterGraphResponse& from);
void MergeFrom(const DeregisterGraphResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(DeregisterGraphResponse* other);
void UnsafeMergeFrom(const DeregisterGraphResponse& from);
protected:
explicit DeregisterGraphResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.DeregisterGraphResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<DeregisterGraphResponse> DeregisterGraphResponse_default_instance_;
// -------------------------------------------------------------------
class CleanupAllRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupAllRequest) */ {
public:
CleanupAllRequest();
virtual ~CleanupAllRequest();
CleanupAllRequest(const CleanupAllRequest& from);
inline CleanupAllRequest& operator=(const CleanupAllRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CleanupAllRequest& default_instance();
static const CleanupAllRequest* internal_default_instance();
void UnsafeArenaSwap(CleanupAllRequest* other);
void Swap(CleanupAllRequest* other);
// implements Message ----------------------------------------------
inline CleanupAllRequest* New() const { return New(NULL); }
CleanupAllRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CleanupAllRequest& from);
void MergeFrom(const CleanupAllRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CleanupAllRequest* other);
void UnsafeMergeFrom(const CleanupAllRequest& from);
protected:
explicit CleanupAllRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated string container = 1;
int container_size() const;
void clear_container();
static const int kContainerFieldNumber = 1;
const ::std::string& container(int index) const;
::std::string* mutable_container(int index);
void set_container(int index, const ::std::string& value);
void set_container(int index, const char* value);
void set_container(int index, const char* value, size_t size);
::std::string* add_container();
void add_container(const ::std::string& value);
void add_container(const char* value);
void add_container(const char* value, size_t size);
const ::google::protobuf::RepeatedPtrField< ::std::string>& container() const;
::google::protobuf::RepeatedPtrField< ::std::string>* mutable_container();
// @@protoc_insertion_point(class_scope:tensorflow.CleanupAllRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedPtrField< ::std::string> container_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CleanupAllRequest> CleanupAllRequest_default_instance_;
// -------------------------------------------------------------------
class CleanupAllResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupAllResponse) */ {
public:
CleanupAllResponse();
virtual ~CleanupAllResponse();
CleanupAllResponse(const CleanupAllResponse& from);
inline CleanupAllResponse& operator=(const CleanupAllResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CleanupAllResponse& default_instance();
static const CleanupAllResponse* internal_default_instance();
void UnsafeArenaSwap(CleanupAllResponse* other);
void Swap(CleanupAllResponse* other);
// implements Message ----------------------------------------------
inline CleanupAllResponse* New() const { return New(NULL); }
CleanupAllResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CleanupAllResponse& from);
void MergeFrom(const CleanupAllResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CleanupAllResponse* other);
void UnsafeMergeFrom(const CleanupAllResponse& from);
protected:
explicit CleanupAllResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.CleanupAllResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CleanupAllResponse> CleanupAllResponse_default_instance_;
// -------------------------------------------------------------------
class ExecutorOpts : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.ExecutorOpts) */ {
public:
ExecutorOpts();
virtual ~ExecutorOpts();
ExecutorOpts(const ExecutorOpts& from);
inline ExecutorOpts& operator=(const ExecutorOpts& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const ExecutorOpts& default_instance();
static const ExecutorOpts* internal_default_instance();
void UnsafeArenaSwap(ExecutorOpts* other);
void Swap(ExecutorOpts* other);
// implements Message ----------------------------------------------
inline ExecutorOpts* New() const { return New(NULL); }
ExecutorOpts* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const ExecutorOpts& from);
void MergeFrom(const ExecutorOpts& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ExecutorOpts* other);
void UnsafeMergeFrom(const ExecutorOpts& from);
protected:
explicit ExecutorOpts(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional bool record_costs = 1;
void clear_record_costs();
static const int kRecordCostsFieldNumber = 1;
bool record_costs() const;
void set_record_costs(bool value);
// optional bool record_timeline = 3;
void clear_record_timeline();
static const int kRecordTimelineFieldNumber = 3;
bool record_timeline() const;
void set_record_timeline(bool value);
// optional bool record_partition_graphs = 4;
void clear_record_partition_graphs();
static const int kRecordPartitionGraphsFieldNumber = 4;
bool record_partition_graphs() const;
void set_record_partition_graphs(bool value);
// @@protoc_insertion_point(class_scope:tensorflow.ExecutorOpts)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
bool record_costs_;
bool record_timeline_;
bool record_partition_graphs_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<ExecutorOpts> ExecutorOpts_default_instance_;
// -------------------------------------------------------------------
class RunGraphRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunGraphRequest) */ {
public:
RunGraphRequest();
virtual ~RunGraphRequest();
RunGraphRequest(const RunGraphRequest& from);
inline RunGraphRequest& operator=(const RunGraphRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RunGraphRequest& default_instance();
static const RunGraphRequest* internal_default_instance();
void UnsafeArenaSwap(RunGraphRequest* other);
void Swap(RunGraphRequest* other);
// implements Message ----------------------------------------------
inline RunGraphRequest* New() const { return New(NULL); }
RunGraphRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RunGraphRequest& from);
void MergeFrom(const RunGraphRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RunGraphRequest* other);
void UnsafeMergeFrom(const RunGraphRequest& from);
protected:
explicit RunGraphRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional string session_handle = 8;
void clear_session_handle();
static const int kSessionHandleFieldNumber = 8;
const ::std::string& session_handle() const;
void set_session_handle(const ::std::string& value);
void set_session_handle(const char* value);
void set_session_handle(const char* value, size_t size);
::std::string* mutable_session_handle();
::std::string* release_session_handle();
void set_allocated_session_handle(::std::string* session_handle);
::std::string* unsafe_arena_release_session_handle();
void unsafe_arena_set_allocated_session_handle(
::std::string* session_handle);
// optional string graph_handle = 1;
void clear_graph_handle();
static const int kGraphHandleFieldNumber = 1;
const ::std::string& graph_handle() const;
void set_graph_handle(const ::std::string& value);
void set_graph_handle(const char* value);
void set_graph_handle(const char* value, size_t size);
::std::string* mutable_graph_handle();
::std::string* release_graph_handle();
void set_allocated_graph_handle(::std::string* graph_handle);
::std::string* unsafe_arena_release_graph_handle();
void unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle);
// optional int64 step_id = 2;
void clear_step_id();
static const int kStepIdFieldNumber = 2;
::google::protobuf::int64 step_id() const;
void set_step_id(::google::protobuf::int64 value);
// optional .tensorflow.ExecutorOpts exec_opts = 5;
bool has_exec_opts() const;
void clear_exec_opts();
static const int kExecOptsFieldNumber = 5;
private:
void _slow_mutable_exec_opts();
void _slow_set_allocated_exec_opts(
::google::protobuf::Arena* message_arena, ::tensorflow::ExecutorOpts** exec_opts);
::tensorflow::ExecutorOpts* _slow_release_exec_opts();
public:
const ::tensorflow::ExecutorOpts& exec_opts() const;
::tensorflow::ExecutorOpts* mutable_exec_opts();
::tensorflow::ExecutorOpts* release_exec_opts();
void set_allocated_exec_opts(::tensorflow::ExecutorOpts* exec_opts);
::tensorflow::ExecutorOpts* unsafe_arena_release_exec_opts();
void unsafe_arena_set_allocated_exec_opts(
::tensorflow::ExecutorOpts* exec_opts);
// repeated .tensorflow.NamedTensorProto send = 3;
int send_size() const;
void clear_send();
static const int kSendFieldNumber = 3;
const ::tensorflow::NamedTensorProto& send(int index) const;
::tensorflow::NamedTensorProto* mutable_send(int index);
::tensorflow::NamedTensorProto* add_send();
::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >*
mutable_send();
const ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >&
send() const;
// repeated string recv_key = 4;
int recv_key_size() const;
void clear_recv_key();
static const int kRecvKeyFieldNumber = 4;
const ::std::string& recv_key(int index) const;
::std::string* mutable_recv_key(int index);
void set_recv_key(int index, const ::std::string& value);
void set_recv_key(int index, const char* value);
void set_recv_key(int index, const char* value, size_t size);
::std::string* add_recv_key();
void add_recv_key(const ::std::string& value);
void add_recv_key(const char* value);
void add_recv_key(const char* value, size_t size);
const ::google::protobuf::RepeatedPtrField< ::std::string>& recv_key() const;
::google::protobuf::RepeatedPtrField< ::std::string>* mutable_recv_key();
// optional bool is_partial = 6;
void clear_is_partial();
static const int kIsPartialFieldNumber = 6;
bool is_partial() const;
void set_is_partial(bool value);
// optional bool is_last_partial_run = 7;
void clear_is_last_partial_run();
static const int kIsLastPartialRunFieldNumber = 7;
bool is_last_partial_run() const;
void set_is_last_partial_run(bool value);
// @@protoc_insertion_point(class_scope:tensorflow.RunGraphRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto > send_;
::google::protobuf::RepeatedPtrField< ::std::string> recv_key_;
::google::protobuf::internal::ArenaStringPtr session_handle_;
::google::protobuf::internal::ArenaStringPtr graph_handle_;
::tensorflow::ExecutorOpts* exec_opts_;
::google::protobuf::int64 step_id_;
bool is_partial_;
bool is_last_partial_run_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RunGraphRequest> RunGraphRequest_default_instance_;
// -------------------------------------------------------------------
class RunGraphResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RunGraphResponse) */ {
public:
RunGraphResponse();
virtual ~RunGraphResponse();
RunGraphResponse(const RunGraphResponse& from);
inline RunGraphResponse& operator=(const RunGraphResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RunGraphResponse& default_instance();
static const RunGraphResponse* internal_default_instance();
void UnsafeArenaSwap(RunGraphResponse* other);
void Swap(RunGraphResponse* other);
// implements Message ----------------------------------------------
inline RunGraphResponse* New() const { return New(NULL); }
RunGraphResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RunGraphResponse& from);
void MergeFrom(const RunGraphResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RunGraphResponse* other);
void UnsafeMergeFrom(const RunGraphResponse& from);
protected:
explicit RunGraphResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated .tensorflow.NamedTensorProto recv = 1;
int recv_size() const;
void clear_recv();
static const int kRecvFieldNumber = 1;
const ::tensorflow::NamedTensorProto& recv(int index) const;
::tensorflow::NamedTensorProto* mutable_recv(int index);
::tensorflow::NamedTensorProto* add_recv();
::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >*
mutable_recv();
const ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >&
recv() const;
// optional .tensorflow.StepStats step_stats = 2;
bool has_step_stats() const;
void clear_step_stats();
static const int kStepStatsFieldNumber = 2;
private:
void _slow_mutable_step_stats();
void _slow_set_allocated_step_stats(
::google::protobuf::Arena* message_arena, ::tensorflow::StepStats** step_stats);
::tensorflow::StepStats* _slow_release_step_stats();
public:
const ::tensorflow::StepStats& step_stats() const;
::tensorflow::StepStats* mutable_step_stats();
::tensorflow::StepStats* release_step_stats();
void set_allocated_step_stats(::tensorflow::StepStats* step_stats);
::tensorflow::StepStats* unsafe_arena_release_step_stats();
void unsafe_arena_set_allocated_step_stats(
::tensorflow::StepStats* step_stats);
// optional .tensorflow.CostGraphDef cost_graph = 3;
bool has_cost_graph() const;
void clear_cost_graph();
static const int kCostGraphFieldNumber = 3;
private:
void _slow_mutable_cost_graph();
void _slow_set_allocated_cost_graph(
::google::protobuf::Arena* message_arena, ::tensorflow::CostGraphDef** cost_graph);
::tensorflow::CostGraphDef* _slow_release_cost_graph();
public:
const ::tensorflow::CostGraphDef& cost_graph() const;
::tensorflow::CostGraphDef* mutable_cost_graph();
::tensorflow::CostGraphDef* release_cost_graph();
void set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph);
::tensorflow::CostGraphDef* unsafe_arena_release_cost_graph();
void unsafe_arena_set_allocated_cost_graph(
::tensorflow::CostGraphDef* cost_graph);
// repeated .tensorflow.GraphDef partition_graph = 4;
int partition_graph_size() const;
void clear_partition_graph();
static const int kPartitionGraphFieldNumber = 4;
const ::tensorflow::GraphDef& partition_graph(int index) const;
::tensorflow::GraphDef* mutable_partition_graph(int index);
::tensorflow::GraphDef* add_partition_graph();
::google::protobuf::RepeatedPtrField< ::tensorflow::GraphDef >*
mutable_partition_graph();
const ::google::protobuf::RepeatedPtrField< ::tensorflow::GraphDef >&
partition_graph() const;
// @@protoc_insertion_point(class_scope:tensorflow.RunGraphResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto > recv_;
::google::protobuf::RepeatedPtrField< ::tensorflow::GraphDef > partition_graph_;
::tensorflow::StepStats* step_stats_;
::tensorflow::CostGraphDef* cost_graph_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RunGraphResponse> RunGraphResponse_default_instance_;
// -------------------------------------------------------------------
class CleanupGraphRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupGraphRequest) */ {
public:
CleanupGraphRequest();
virtual ~CleanupGraphRequest();
CleanupGraphRequest(const CleanupGraphRequest& from);
inline CleanupGraphRequest& operator=(const CleanupGraphRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CleanupGraphRequest& default_instance();
static const CleanupGraphRequest* internal_default_instance();
void UnsafeArenaSwap(CleanupGraphRequest* other);
void Swap(CleanupGraphRequest* other);
// implements Message ----------------------------------------------
inline CleanupGraphRequest* New() const { return New(NULL); }
CleanupGraphRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CleanupGraphRequest& from);
void MergeFrom(const CleanupGraphRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CleanupGraphRequest* other);
void UnsafeMergeFrom(const CleanupGraphRequest& from);
protected:
explicit CleanupGraphRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional int64 step_id = 1;
void clear_step_id();
static const int kStepIdFieldNumber = 1;
::google::protobuf::int64 step_id() const;
void set_step_id(::google::protobuf::int64 value);
// @@protoc_insertion_point(class_scope:tensorflow.CleanupGraphRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::int64 step_id_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CleanupGraphRequest> CleanupGraphRequest_default_instance_;
// -------------------------------------------------------------------
class CleanupGraphResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.CleanupGraphResponse) */ {
public:
CleanupGraphResponse();
virtual ~CleanupGraphResponse();
CleanupGraphResponse(const CleanupGraphResponse& from);
inline CleanupGraphResponse& operator=(const CleanupGraphResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const CleanupGraphResponse& default_instance();
static const CleanupGraphResponse* internal_default_instance();
void UnsafeArenaSwap(CleanupGraphResponse* other);
void Swap(CleanupGraphResponse* other);
// implements Message ----------------------------------------------
inline CleanupGraphResponse* New() const { return New(NULL); }
CleanupGraphResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const CleanupGraphResponse& from);
void MergeFrom(const CleanupGraphResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(CleanupGraphResponse* other);
void UnsafeMergeFrom(const CleanupGraphResponse& from);
protected:
explicit CleanupGraphResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.CleanupGraphResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<CleanupGraphResponse> CleanupGraphResponse_default_instance_;
// -------------------------------------------------------------------
class RecvTensorRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvTensorRequest) */ {
public:
RecvTensorRequest();
virtual ~RecvTensorRequest();
RecvTensorRequest(const RecvTensorRequest& from);
inline RecvTensorRequest& operator=(const RecvTensorRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RecvTensorRequest& default_instance();
static const RecvTensorRequest* internal_default_instance();
void UnsafeArenaSwap(RecvTensorRequest* other);
void Swap(RecvTensorRequest* other);
// implements Message ----------------------------------------------
inline RecvTensorRequest* New() const { return New(NULL); }
RecvTensorRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RecvTensorRequest& from);
void MergeFrom(const RecvTensorRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RecvTensorRequest* other);
void UnsafeMergeFrom(const RecvTensorRequest& from);
protected:
explicit RecvTensorRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional int64 step_id = 1;
void clear_step_id();
static const int kStepIdFieldNumber = 1;
::google::protobuf::int64 step_id() const;
void set_step_id(::google::protobuf::int64 value);
// optional string rendezvous_key = 2;
void clear_rendezvous_key();
static const int kRendezvousKeyFieldNumber = 2;
const ::std::string& rendezvous_key() const;
void set_rendezvous_key(const ::std::string& value);
void set_rendezvous_key(const char* value);
void set_rendezvous_key(const char* value, size_t size);
::std::string* mutable_rendezvous_key();
::std::string* release_rendezvous_key();
void set_allocated_rendezvous_key(::std::string* rendezvous_key);
::std::string* unsafe_arena_release_rendezvous_key();
void unsafe_arena_set_allocated_rendezvous_key(
::std::string* rendezvous_key);
// optional bool dma_ok = 3;
void clear_dma_ok();
static const int kDmaOkFieldNumber = 3;
bool dma_ok() const;
void set_dma_ok(bool value);
// optional .tensorflow.DeviceLocality client_locality = 4;
bool has_client_locality() const;
void clear_client_locality();
static const int kClientLocalityFieldNumber = 4;
private:
void _slow_mutable_client_locality();
void _slow_set_allocated_client_locality(
::google::protobuf::Arena* message_arena, ::tensorflow::DeviceLocality** client_locality);
::tensorflow::DeviceLocality* _slow_release_client_locality();
public:
const ::tensorflow::DeviceLocality& client_locality() const;
::tensorflow::DeviceLocality* mutable_client_locality();
::tensorflow::DeviceLocality* release_client_locality();
void set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality);
::tensorflow::DeviceLocality* unsafe_arena_release_client_locality();
void unsafe_arena_set_allocated_client_locality(
::tensorflow::DeviceLocality* client_locality);
// optional .tensorflow.DeviceLocality server_locality = 5;
bool has_server_locality() const;
void clear_server_locality();
static const int kServerLocalityFieldNumber = 5;
private:
void _slow_mutable_server_locality();
void _slow_set_allocated_server_locality(
::google::protobuf::Arena* message_arena, ::tensorflow::DeviceLocality** server_locality);
::tensorflow::DeviceLocality* _slow_release_server_locality();
public:
const ::tensorflow::DeviceLocality& server_locality() const;
::tensorflow::DeviceLocality* mutable_server_locality();
::tensorflow::DeviceLocality* release_server_locality();
void set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality);
::tensorflow::DeviceLocality* unsafe_arena_release_server_locality();
void unsafe_arena_set_allocated_server_locality(
::tensorflow::DeviceLocality* server_locality);
// optional .google.protobuf.Any transport_options = 6;
bool has_transport_options() const;
void clear_transport_options();
static const int kTransportOptionsFieldNumber = 6;
private:
void _slow_mutable_transport_options();
::google::protobuf::Any* _slow_release_transport_options();
public:
const ::google::protobuf::Any& transport_options() const;
::google::protobuf::Any* mutable_transport_options();
::google::protobuf::Any* release_transport_options();
void set_allocated_transport_options(::google::protobuf::Any* transport_options);
::google::protobuf::Any* unsafe_arena_release_transport_options();
void unsafe_arena_set_allocated_transport_options(
::google::protobuf::Any* transport_options);
// @@protoc_insertion_point(class_scope:tensorflow.RecvTensorRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::internal::ArenaStringPtr rendezvous_key_;
::tensorflow::DeviceLocality* client_locality_;
::tensorflow::DeviceLocality* server_locality_;
::google::protobuf::Any* transport_options_;
::google::protobuf::int64 step_id_;
bool dma_ok_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RecvTensorRequest> RecvTensorRequest_default_instance_;
// -------------------------------------------------------------------
class RecvTensorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.RecvTensorResponse) */ {
public:
RecvTensorResponse();
virtual ~RecvTensorResponse();
RecvTensorResponse(const RecvTensorResponse& from);
inline RecvTensorResponse& operator=(const RecvTensorResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const RecvTensorResponse& default_instance();
static const RecvTensorResponse* internal_default_instance();
void UnsafeArenaSwap(RecvTensorResponse* other);
void Swap(RecvTensorResponse* other);
// implements Message ----------------------------------------------
inline RecvTensorResponse* New() const { return New(NULL); }
RecvTensorResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const RecvTensorResponse& from);
void MergeFrom(const RecvTensorResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(RecvTensorResponse* other);
void UnsafeMergeFrom(const RecvTensorResponse& from);
protected:
explicit RecvTensorResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional .tensorflow.TensorProto tensor = 1;
bool has_tensor() const;
void clear_tensor();
static const int kTensorFieldNumber = 1;
private:
void _slow_mutable_tensor();
void _slow_set_allocated_tensor(
::google::protobuf::Arena* message_arena, ::tensorflow::TensorProto** tensor);
::tensorflow::TensorProto* _slow_release_tensor();
public:
const ::tensorflow::TensorProto& tensor() const;
::tensorflow::TensorProto* mutable_tensor();
::tensorflow::TensorProto* release_tensor();
void set_allocated_tensor(::tensorflow::TensorProto* tensor);
::tensorflow::TensorProto* unsafe_arena_release_tensor();
void unsafe_arena_set_allocated_tensor(
::tensorflow::TensorProto* tensor);
// optional bool is_dead = 2;
void clear_is_dead();
static const int kIsDeadFieldNumber = 2;
bool is_dead() const;
void set_is_dead(bool value);
// optional int64 send_start_micros = 3;
void clear_send_start_micros();
static const int kSendStartMicrosFieldNumber = 3;
::google::protobuf::int64 send_start_micros() const;
void set_send_start_micros(::google::protobuf::int64 value);
// optional .google.protobuf.Any transport_options = 4;
bool has_transport_options() const;
void clear_transport_options();
static const int kTransportOptionsFieldNumber = 4;
private:
void _slow_mutable_transport_options();
::google::protobuf::Any* _slow_release_transport_options();
public:
const ::google::protobuf::Any& transport_options() const;
::google::protobuf::Any* mutable_transport_options();
::google::protobuf::Any* release_transport_options();
void set_allocated_transport_options(::google::protobuf::Any* transport_options);
::google::protobuf::Any* unsafe_arena_release_transport_options();
void unsafe_arena_set_allocated_transport_options(
::google::protobuf::Any* transport_options);
// @@protoc_insertion_point(class_scope:tensorflow.RecvTensorResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::tensorflow::TensorProto* tensor_;
::google::protobuf::Any* transport_options_;
::google::protobuf::int64 send_start_micros_;
bool is_dead_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<RecvTensorResponse> RecvTensorResponse_default_instance_;
// -------------------------------------------------------------------
class LoggingRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.LoggingRequest) */ {
public:
LoggingRequest();
virtual ~LoggingRequest();
LoggingRequest(const LoggingRequest& from);
inline LoggingRequest& operator=(const LoggingRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const LoggingRequest& default_instance();
static const LoggingRequest* internal_default_instance();
void UnsafeArenaSwap(LoggingRequest* other);
void Swap(LoggingRequest* other);
// implements Message ----------------------------------------------
inline LoggingRequest* New() const { return New(NULL); }
LoggingRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const LoggingRequest& from);
void MergeFrom(const LoggingRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(LoggingRequest* other);
void UnsafeMergeFrom(const LoggingRequest& from);
protected:
explicit LoggingRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional bool rpc_logging = 1;
void clear_rpc_logging();
static const int kRpcLoggingFieldNumber = 1;
bool rpc_logging() const;
void set_rpc_logging(bool value);
// optional bool clear = 2;
void clear_clear();
static const int kClearFieldNumber = 2;
bool clear() const;
void set_clear(bool value);
// repeated int64 fetch_step_id = 3;
int fetch_step_id_size() const;
void clear_fetch_step_id();
static const int kFetchStepIdFieldNumber = 3;
::google::protobuf::int64 fetch_step_id(int index) const;
void set_fetch_step_id(int index, ::google::protobuf::int64 value);
void add_fetch_step_id(::google::protobuf::int64 value);
const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
fetch_step_id() const;
::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
mutable_fetch_step_id();
// @@protoc_insertion_point(class_scope:tensorflow.LoggingRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedField< ::google::protobuf::int64 > fetch_step_id_;
mutable int _fetch_step_id_cached_byte_size_;
bool rpc_logging_;
bool clear_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<LoggingRequest> LoggingRequest_default_instance_;
// -------------------------------------------------------------------
class LabeledStepStats : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.LabeledStepStats) */ {
public:
LabeledStepStats();
virtual ~LabeledStepStats();
LabeledStepStats(const LabeledStepStats& from);
inline LabeledStepStats& operator=(const LabeledStepStats& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const LabeledStepStats& default_instance();
static const LabeledStepStats* internal_default_instance();
void UnsafeArenaSwap(LabeledStepStats* other);
void Swap(LabeledStepStats* other);
// implements Message ----------------------------------------------
inline LabeledStepStats* New() const { return New(NULL); }
LabeledStepStats* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const LabeledStepStats& from);
void MergeFrom(const LabeledStepStats& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(LabeledStepStats* other);
void UnsafeMergeFrom(const LabeledStepStats& from);
protected:
explicit LabeledStepStats(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional int64 step_id = 1;
void clear_step_id();
static const int kStepIdFieldNumber = 1;
::google::protobuf::int64 step_id() const;
void set_step_id(::google::protobuf::int64 value);
// optional .tensorflow.StepStats step_stats = 2;
bool has_step_stats() const;
void clear_step_stats();
static const int kStepStatsFieldNumber = 2;
private:
void _slow_mutable_step_stats();
void _slow_set_allocated_step_stats(
::google::protobuf::Arena* message_arena, ::tensorflow::StepStats** step_stats);
::tensorflow::StepStats* _slow_release_step_stats();
public:
const ::tensorflow::StepStats& step_stats() const;
::tensorflow::StepStats* mutable_step_stats();
::tensorflow::StepStats* release_step_stats();
void set_allocated_step_stats(::tensorflow::StepStats* step_stats);
::tensorflow::StepStats* unsafe_arena_release_step_stats();
void unsafe_arena_set_allocated_step_stats(
::tensorflow::StepStats* step_stats);
// @@protoc_insertion_point(class_scope:tensorflow.LabeledStepStats)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::tensorflow::StepStats* step_stats_;
::google::protobuf::int64 step_id_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<LabeledStepStats> LabeledStepStats_default_instance_;
// -------------------------------------------------------------------
class LoggingResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.LoggingResponse) */ {
public:
LoggingResponse();
virtual ~LoggingResponse();
LoggingResponse(const LoggingResponse& from);
inline LoggingResponse& operator=(const LoggingResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const LoggingResponse& default_instance();
static const LoggingResponse* internal_default_instance();
void UnsafeArenaSwap(LoggingResponse* other);
void Swap(LoggingResponse* other);
// implements Message ----------------------------------------------
inline LoggingResponse* New() const { return New(NULL); }
LoggingResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const LoggingResponse& from);
void MergeFrom(const LoggingResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(LoggingResponse* other);
void UnsafeMergeFrom(const LoggingResponse& from);
protected:
explicit LoggingResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated .tensorflow.LabeledStepStats step = 1;
int step_size() const;
void clear_step();
static const int kStepFieldNumber = 1;
const ::tensorflow::LabeledStepStats& step(int index) const;
::tensorflow::LabeledStepStats* mutable_step(int index);
::tensorflow::LabeledStepStats* add_step();
::google::protobuf::RepeatedPtrField< ::tensorflow::LabeledStepStats >*
mutable_step();
const ::google::protobuf::RepeatedPtrField< ::tensorflow::LabeledStepStats >&
step() const;
// @@protoc_insertion_point(class_scope:tensorflow.LoggingResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::google::protobuf::RepeatedPtrField< ::tensorflow::LabeledStepStats > step_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<LoggingResponse> LoggingResponse_default_instance_;
// -------------------------------------------------------------------
class TraceOpts : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TraceOpts) */ {
public:
TraceOpts();
virtual ~TraceOpts();
TraceOpts(const TraceOpts& from);
inline TraceOpts& operator=(const TraceOpts& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const TraceOpts& default_instance();
static const TraceOpts* internal_default_instance();
void UnsafeArenaSwap(TraceOpts* other);
void Swap(TraceOpts* other);
// implements Message ----------------------------------------------
inline TraceOpts* New() const { return New(NULL); }
TraceOpts* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const TraceOpts& from);
void MergeFrom(const TraceOpts& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(TraceOpts* other);
void UnsafeMergeFrom(const TraceOpts& from);
protected:
explicit TraceOpts(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional double duration = 1;
void clear_duration();
static const int kDurationFieldNumber = 1;
double duration() const;
void set_duration(double value);
// optional bool use_step_profiler = 2;
void clear_use_step_profiler();
static const int kUseStepProfilerFieldNumber = 2;
bool use_step_profiler() const;
void set_use_step_profiler(bool value);
// optional bool use_kernel_profiler = 3;
void clear_use_kernel_profiler();
static const int kUseKernelProfilerFieldNumber = 3;
bool use_kernel_profiler() const;
void set_use_kernel_profiler(bool value);
// optional bool use_extended_profiler = 4;
void clear_use_extended_profiler();
static const int kUseExtendedProfilerFieldNumber = 4;
bool use_extended_profiler() const;
void set_use_extended_profiler(bool value);
// optional bool use_gpu_profiler = 5;
void clear_use_gpu_profiler();
static const int kUseGpuProfilerFieldNumber = 5;
bool use_gpu_profiler() const;
void set_use_gpu_profiler(bool value);
// optional bool use_sample_profiler = 6;
void clear_use_sample_profiler();
static const int kUseSampleProfilerFieldNumber = 6;
bool use_sample_profiler() const;
void set_use_sample_profiler(bool value);
// @@protoc_insertion_point(class_scope:tensorflow.TraceOpts)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
double duration_;
bool use_step_profiler_;
bool use_kernel_profiler_;
bool use_extended_profiler_;
bool use_gpu_profiler_;
bool use_sample_profiler_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<TraceOpts> TraceOpts_default_instance_;
// -------------------------------------------------------------------
class TracingRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TracingRequest) */ {
public:
TracingRequest();
virtual ~TracingRequest();
TracingRequest(const TracingRequest& from);
inline TracingRequest& operator=(const TracingRequest& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const TracingRequest& default_instance();
static const TracingRequest* internal_default_instance();
void UnsafeArenaSwap(TracingRequest* other);
void Swap(TracingRequest* other);
// implements Message ----------------------------------------------
inline TracingRequest* New() const { return New(NULL); }
TracingRequest* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const TracingRequest& from);
void MergeFrom(const TracingRequest& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(TracingRequest* other);
void UnsafeMergeFrom(const TracingRequest& from);
protected:
explicit TracingRequest(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// optional .tensorflow.TraceOpts options = 1;
bool has_options() const;
void clear_options();
static const int kOptionsFieldNumber = 1;
private:
void _slow_mutable_options();
void _slow_set_allocated_options(
::google::protobuf::Arena* message_arena, ::tensorflow::TraceOpts** options);
::tensorflow::TraceOpts* _slow_release_options();
public:
const ::tensorflow::TraceOpts& options() const;
::tensorflow::TraceOpts* mutable_options();
::tensorflow::TraceOpts* release_options();
void set_allocated_options(::tensorflow::TraceOpts* options);
::tensorflow::TraceOpts* unsafe_arena_release_options();
void unsafe_arena_set_allocated_options(
::tensorflow::TraceOpts* options);
// @@protoc_insertion_point(class_scope:tensorflow.TracingRequest)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::tensorflow::TraceOpts* options_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<TracingRequest> TracingRequest_default_instance_;
// -------------------------------------------------------------------
class TracingResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TracingResponse) */ {
public:
TracingResponse();
virtual ~TracingResponse();
TracingResponse(const TracingResponse& from);
inline TracingResponse& operator=(const TracingResponse& from) {
CopyFrom(from);
return *this;
}
inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); }
inline void* GetMaybeArenaPointer() const {
return MaybeArenaPtr();
}
static const ::google::protobuf::Descriptor* descriptor();
static const TracingResponse& default_instance();
static const TracingResponse* internal_default_instance();
void UnsafeArenaSwap(TracingResponse* other);
void Swap(TracingResponse* other);
// implements Message ----------------------------------------------
inline TracingResponse* New() const { return New(NULL); }
TracingResponse* New(::google::protobuf::Arena* arena) const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const TracingResponse& from);
void MergeFrom(const TracingResponse& from);
void Clear();
bool IsInitialized() const;
size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* output) const;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
return InternalSerializeWithCachedSizesToArray(false, output);
}
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(TracingResponse* other);
void UnsafeMergeFrom(const TracingResponse& from);
protected:
explicit TracingResponse(::google::protobuf::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
}
inline void* MaybeArenaPtr() const {
return _internal_metadata_.raw_arena_ptr();
}
public:
::google::protobuf::Metadata GetMetadata() const;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// @@protoc_insertion_point(class_scope:tensorflow.TracingResponse)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
friend class ::google::protobuf::Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
mutable int _cached_size_;
friend void protobuf_InitDefaults_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AddDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto_impl();
friend void protobuf_AssignDesc_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
friend void protobuf_ShutdownFile_tensorflow_2fcore_2fprotobuf_2fworker_2eproto();
void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<TracingResponse> TracingResponse_default_instance_;
// ===================================================================
// ===================================================================
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
// GetStatusRequest
inline const GetStatusRequest* GetStatusRequest::internal_default_instance() {
return &GetStatusRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// GetStatusResponse
// repeated .tensorflow.DeviceAttributes device_attributes = 1;
inline int GetStatusResponse::device_attributes_size() const {
return device_attributes_.size();
}
inline void GetStatusResponse::clear_device_attributes() {
device_attributes_.Clear();
}
inline const ::tensorflow::DeviceAttributes& GetStatusResponse::device_attributes(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.GetStatusResponse.device_attributes)
return device_attributes_.Get(index);
}
inline ::tensorflow::DeviceAttributes* GetStatusResponse::mutable_device_attributes(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.GetStatusResponse.device_attributes)
return device_attributes_.Mutable(index);
}
inline ::tensorflow::DeviceAttributes* GetStatusResponse::add_device_attributes() {
// @@protoc_insertion_point(field_add:tensorflow.GetStatusResponse.device_attributes)
return device_attributes_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::tensorflow::DeviceAttributes >*
GetStatusResponse::mutable_device_attributes() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.GetStatusResponse.device_attributes)
return &device_attributes_;
}
inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::DeviceAttributes >&
GetStatusResponse::device_attributes() const {
// @@protoc_insertion_point(field_list:tensorflow.GetStatusResponse.device_attributes)
return device_attributes_;
}
inline const GetStatusResponse* GetStatusResponse::internal_default_instance() {
return &GetStatusResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// CreateWorkerSessionRequest
// optional string session_handle = 1;
inline void CreateWorkerSessionRequest::clear_session_handle() {
session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& CreateWorkerSessionRequest::session_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.session_handle)
return session_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void CreateWorkerSessionRequest::set_session_handle(const ::std::string& value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.CreateWorkerSessionRequest.session_handle)
}
inline void CreateWorkerSessionRequest::set_session_handle(const char* value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.CreateWorkerSessionRequest.session_handle)
}
inline void CreateWorkerSessionRequest::set_session_handle(const char* value,
size_t size) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.CreateWorkerSessionRequest.session_handle)
}
inline ::std::string* CreateWorkerSessionRequest::mutable_session_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.session_handle)
return session_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* CreateWorkerSessionRequest::release_session_handle() {
// @@protoc_insertion_point(field_release:tensorflow.CreateWorkerSessionRequest.session_handle)
return session_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* CreateWorkerSessionRequest::unsafe_arena_release_session_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.CreateWorkerSessionRequest.session_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return session_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void CreateWorkerSessionRequest::set_allocated_session_handle(::std::string* session_handle) {
if (session_handle != NULL) {
} else {
}
session_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), session_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.CreateWorkerSessionRequest.session_handle)
}
inline void CreateWorkerSessionRequest::unsafe_arena_set_allocated_session_handle(
::std::string* session_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (session_handle != NULL) {
} else {
}
session_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
session_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateWorkerSessionRequest.session_handle)
}
// optional .tensorflow.ServerDef server_def = 2;
inline bool CreateWorkerSessionRequest::has_server_def() const {
return this != internal_default_instance() && server_def_ != NULL;
}
inline void CreateWorkerSessionRequest::clear_server_def() {
if (GetArenaNoVirtual() == NULL && server_def_ != NULL) delete server_def_;
server_def_ = NULL;
}
inline const ::tensorflow::ServerDef& CreateWorkerSessionRequest::server_def() const {
// @@protoc_insertion_point(field_get:tensorflow.CreateWorkerSessionRequest.server_def)
return server_def_ != NULL ? *server_def_
: *::tensorflow::ServerDef::internal_default_instance();
}
inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::mutable_server_def() {
if (server_def_ == NULL) {
_slow_mutable_server_def();
}
// @@protoc_insertion_point(field_mutable:tensorflow.CreateWorkerSessionRequest.server_def)
return server_def_;
}
inline ::tensorflow::ServerDef* CreateWorkerSessionRequest::release_server_def() {
// @@protoc_insertion_point(field_release:tensorflow.CreateWorkerSessionRequest.server_def)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_server_def();
} else {
::tensorflow::ServerDef* temp = server_def_;
server_def_ = NULL;
return temp;
}
}
inline void CreateWorkerSessionRequest::set_allocated_server_def(::tensorflow::ServerDef* server_def) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete server_def_;
}
if (server_def != NULL) {
_slow_set_allocated_server_def(message_arena, &server_def);
}
server_def_ = server_def;
if (server_def) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.CreateWorkerSessionRequest.server_def)
}
inline const CreateWorkerSessionRequest* CreateWorkerSessionRequest::internal_default_instance() {
return &CreateWorkerSessionRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// CreateWorkerSessionResponse
inline const CreateWorkerSessionResponse* CreateWorkerSessionResponse::internal_default_instance() {
return &CreateWorkerSessionResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// RegisterGraphRequest
// optional string session_handle = 1;
inline void RegisterGraphRequest::clear_session_handle() {
session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& RegisterGraphRequest::session_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.session_handle)
return session_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void RegisterGraphRequest::set_session_handle(const ::std::string& value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.session_handle)
}
inline void RegisterGraphRequest::set_session_handle(const char* value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.RegisterGraphRequest.session_handle)
}
inline void RegisterGraphRequest::set_session_handle(const char* value,
size_t size) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.RegisterGraphRequest.session_handle)
}
inline ::std::string* RegisterGraphRequest::mutable_session_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.session_handle)
return session_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RegisterGraphRequest::release_session_handle() {
// @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.session_handle)
return session_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RegisterGraphRequest::unsafe_arena_release_session_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.RegisterGraphRequest.session_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return session_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void RegisterGraphRequest::set_allocated_session_handle(::std::string* session_handle) {
if (session_handle != NULL) {
} else {
}
session_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), session_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.session_handle)
}
inline void RegisterGraphRequest::unsafe_arena_set_allocated_session_handle(
::std::string* session_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (session_handle != NULL) {
} else {
}
session_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
session_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphRequest.session_handle)
}
// optional .tensorflow.GraphDef graph_def = 2;
inline bool RegisterGraphRequest::has_graph_def() const {
return this != internal_default_instance() && graph_def_ != NULL;
}
inline void RegisterGraphRequest::clear_graph_def() {
if (GetArenaNoVirtual() == NULL && graph_def_ != NULL) delete graph_def_;
graph_def_ = NULL;
}
inline const ::tensorflow::GraphDef& RegisterGraphRequest::graph_def() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.graph_def)
return graph_def_ != NULL ? *graph_def_
: *::tensorflow::GraphDef::internal_default_instance();
}
inline ::tensorflow::GraphDef* RegisterGraphRequest::mutable_graph_def() {
if (graph_def_ == NULL) {
_slow_mutable_graph_def();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.graph_def)
return graph_def_;
}
inline ::tensorflow::GraphDef* RegisterGraphRequest::release_graph_def() {
// @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.graph_def)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_graph_def();
} else {
::tensorflow::GraphDef* temp = graph_def_;
graph_def_ = NULL;
return temp;
}
}
inline void RegisterGraphRequest::set_allocated_graph_def(::tensorflow::GraphDef* graph_def) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete graph_def_;
}
if (graph_def != NULL) {
_slow_set_allocated_graph_def(message_arena, &graph_def);
}
graph_def_ = graph_def;
if (graph_def) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.graph_def)
}
// optional bool has_control_flow = 3 [deprecated = true];
inline void RegisterGraphRequest::clear_has_control_flow() {
has_control_flow_ = false;
}
inline bool RegisterGraphRequest::has_control_flow() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.has_control_flow)
return has_control_flow_;
}
inline void RegisterGraphRequest::set_has_control_flow(bool value) {
has_control_flow_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RegisterGraphRequest.has_control_flow)
}
// optional .tensorflow.GraphOptions graph_options = 4;
inline bool RegisterGraphRequest::has_graph_options() const {
return this != internal_default_instance() && graph_options_ != NULL;
}
inline void RegisterGraphRequest::clear_graph_options() {
if (GetArenaNoVirtual() == NULL && graph_options_ != NULL) delete graph_options_;
graph_options_ = NULL;
}
inline const ::tensorflow::GraphOptions& RegisterGraphRequest::graph_options() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.graph_options)
return graph_options_ != NULL ? *graph_options_
: *::tensorflow::GraphOptions::internal_default_instance();
}
inline ::tensorflow::GraphOptions* RegisterGraphRequest::mutable_graph_options() {
if (graph_options_ == NULL) {
_slow_mutable_graph_options();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.graph_options)
return graph_options_;
}
inline ::tensorflow::GraphOptions* RegisterGraphRequest::release_graph_options() {
// @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.graph_options)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_graph_options();
} else {
::tensorflow::GraphOptions* temp = graph_options_;
graph_options_ = NULL;
return temp;
}
}
inline void RegisterGraphRequest::set_allocated_graph_options(::tensorflow::GraphOptions* graph_options) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete graph_options_;
}
if (graph_options != NULL) {
_slow_set_allocated_graph_options(message_arena, &graph_options);
}
graph_options_ = graph_options;
if (graph_options) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.graph_options)
}
// optional .tensorflow.DebugOptions debug_options = 5;
inline bool RegisterGraphRequest::has_debug_options() const {
return this != internal_default_instance() && debug_options_ != NULL;
}
inline void RegisterGraphRequest::clear_debug_options() {
if (GetArenaNoVirtual() == NULL && debug_options_ != NULL) delete debug_options_;
debug_options_ = NULL;
}
inline const ::tensorflow::DebugOptions& RegisterGraphRequest::debug_options() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphRequest.debug_options)
return debug_options_ != NULL ? *debug_options_
: *::tensorflow::DebugOptions::internal_default_instance();
}
inline ::tensorflow::DebugOptions* RegisterGraphRequest::mutable_debug_options() {
if (debug_options_ == NULL) {
_slow_mutable_debug_options();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphRequest.debug_options)
return debug_options_;
}
inline ::tensorflow::DebugOptions* RegisterGraphRequest::release_debug_options() {
// @@protoc_insertion_point(field_release:tensorflow.RegisterGraphRequest.debug_options)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_debug_options();
} else {
::tensorflow::DebugOptions* temp = debug_options_;
debug_options_ = NULL;
return temp;
}
}
inline void RegisterGraphRequest::set_allocated_debug_options(::tensorflow::DebugOptions* debug_options) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete debug_options_;
}
if (debug_options != NULL) {
_slow_set_allocated_debug_options(message_arena, &debug_options);
}
debug_options_ = debug_options;
if (debug_options) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphRequest.debug_options)
}
inline const RegisterGraphRequest* RegisterGraphRequest::internal_default_instance() {
return &RegisterGraphRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// RegisterGraphResponse
// optional string graph_handle = 1;
inline void RegisterGraphResponse::clear_graph_handle() {
graph_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& RegisterGraphResponse::graph_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.RegisterGraphResponse.graph_handle)
return graph_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void RegisterGraphResponse::set_graph_handle(const ::std::string& value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.RegisterGraphResponse.graph_handle)
}
inline void RegisterGraphResponse::set_graph_handle(const char* value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.RegisterGraphResponse.graph_handle)
}
inline void RegisterGraphResponse::set_graph_handle(const char* value,
size_t size) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.RegisterGraphResponse.graph_handle)
}
inline ::std::string* RegisterGraphResponse::mutable_graph_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.RegisterGraphResponse.graph_handle)
return graph_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RegisterGraphResponse::release_graph_handle() {
// @@protoc_insertion_point(field_release:tensorflow.RegisterGraphResponse.graph_handle)
return graph_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RegisterGraphResponse::unsafe_arena_release_graph_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.RegisterGraphResponse.graph_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return graph_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void RegisterGraphResponse::set_allocated_graph_handle(::std::string* graph_handle) {
if (graph_handle != NULL) {
} else {
}
graph_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), graph_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.RegisterGraphResponse.graph_handle)
}
inline void RegisterGraphResponse::unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (graph_handle != NULL) {
} else {
}
graph_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
graph_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RegisterGraphResponse.graph_handle)
}
inline const RegisterGraphResponse* RegisterGraphResponse::internal_default_instance() {
return &RegisterGraphResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// DeregisterGraphRequest
// optional string session_handle = 2;
inline void DeregisterGraphRequest::clear_session_handle() {
session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& DeregisterGraphRequest::session_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.DeregisterGraphRequest.session_handle)
return session_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DeregisterGraphRequest::set_session_handle(const ::std::string& value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.DeregisterGraphRequest.session_handle)
}
inline void DeregisterGraphRequest::set_session_handle(const char* value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.DeregisterGraphRequest.session_handle)
}
inline void DeregisterGraphRequest::set_session_handle(const char* value,
size_t size) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.DeregisterGraphRequest.session_handle)
}
inline ::std::string* DeregisterGraphRequest::mutable_session_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.DeregisterGraphRequest.session_handle)
return session_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* DeregisterGraphRequest::release_session_handle() {
// @@protoc_insertion_point(field_release:tensorflow.DeregisterGraphRequest.session_handle)
return session_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* DeregisterGraphRequest::unsafe_arena_release_session_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DeregisterGraphRequest.session_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return session_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void DeregisterGraphRequest::set_allocated_session_handle(::std::string* session_handle) {
if (session_handle != NULL) {
} else {
}
session_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), session_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.DeregisterGraphRequest.session_handle)
}
inline void DeregisterGraphRequest::unsafe_arena_set_allocated_session_handle(
::std::string* session_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (session_handle != NULL) {
} else {
}
session_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
session_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DeregisterGraphRequest.session_handle)
}
// optional string graph_handle = 1;
inline void DeregisterGraphRequest::clear_graph_handle() {
graph_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& DeregisterGraphRequest::graph_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.DeregisterGraphRequest.graph_handle)
return graph_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DeregisterGraphRequest::set_graph_handle(const ::std::string& value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.DeregisterGraphRequest.graph_handle)
}
inline void DeregisterGraphRequest::set_graph_handle(const char* value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.DeregisterGraphRequest.graph_handle)
}
inline void DeregisterGraphRequest::set_graph_handle(const char* value,
size_t size) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.DeregisterGraphRequest.graph_handle)
}
inline ::std::string* DeregisterGraphRequest::mutable_graph_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.DeregisterGraphRequest.graph_handle)
return graph_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* DeregisterGraphRequest::release_graph_handle() {
// @@protoc_insertion_point(field_release:tensorflow.DeregisterGraphRequest.graph_handle)
return graph_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* DeregisterGraphRequest::unsafe_arena_release_graph_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.DeregisterGraphRequest.graph_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return graph_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void DeregisterGraphRequest::set_allocated_graph_handle(::std::string* graph_handle) {
if (graph_handle != NULL) {
} else {
}
graph_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), graph_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.DeregisterGraphRequest.graph_handle)
}
inline void DeregisterGraphRequest::unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (graph_handle != NULL) {
} else {
}
graph_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
graph_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.DeregisterGraphRequest.graph_handle)
}
inline const DeregisterGraphRequest* DeregisterGraphRequest::internal_default_instance() {
return &DeregisterGraphRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// DeregisterGraphResponse
inline const DeregisterGraphResponse* DeregisterGraphResponse::internal_default_instance() {
return &DeregisterGraphResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// CleanupAllRequest
// repeated string container = 1;
inline int CleanupAllRequest::container_size() const {
return container_.size();
}
inline void CleanupAllRequest::clear_container() {
container_.Clear();
}
inline const ::std::string& CleanupAllRequest::container(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.CleanupAllRequest.container)
return container_.Get(index);
}
inline ::std::string* CleanupAllRequest::mutable_container(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.CleanupAllRequest.container)
return container_.Mutable(index);
}
inline void CleanupAllRequest::set_container(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:tensorflow.CleanupAllRequest.container)
container_.Mutable(index)->assign(value);
}
inline void CleanupAllRequest::set_container(int index, const char* value) {
container_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:tensorflow.CleanupAllRequest.container)
}
inline void CleanupAllRequest::set_container(int index, const char* value, size_t size) {
container_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:tensorflow.CleanupAllRequest.container)
}
inline ::std::string* CleanupAllRequest::add_container() {
// @@protoc_insertion_point(field_add_mutable:tensorflow.CleanupAllRequest.container)
return container_.Add();
}
inline void CleanupAllRequest::add_container(const ::std::string& value) {
container_.Add()->assign(value);
// @@protoc_insertion_point(field_add:tensorflow.CleanupAllRequest.container)
}
inline void CleanupAllRequest::add_container(const char* value) {
container_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:tensorflow.CleanupAllRequest.container)
}
inline void CleanupAllRequest::add_container(const char* value, size_t size) {
container_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:tensorflow.CleanupAllRequest.container)
}
inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
CleanupAllRequest::container() const {
// @@protoc_insertion_point(field_list:tensorflow.CleanupAllRequest.container)
return container_;
}
inline ::google::protobuf::RepeatedPtrField< ::std::string>*
CleanupAllRequest::mutable_container() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.CleanupAllRequest.container)
return &container_;
}
inline const CleanupAllRequest* CleanupAllRequest::internal_default_instance() {
return &CleanupAllRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// CleanupAllResponse
inline const CleanupAllResponse* CleanupAllResponse::internal_default_instance() {
return &CleanupAllResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// ExecutorOpts
// optional bool record_costs = 1;
inline void ExecutorOpts::clear_record_costs() {
record_costs_ = false;
}
inline bool ExecutorOpts::record_costs() const {
// @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_costs)
return record_costs_;
}
inline void ExecutorOpts::set_record_costs(bool value) {
record_costs_ = value;
// @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_costs)
}
// optional bool record_timeline = 3;
inline void ExecutorOpts::clear_record_timeline() {
record_timeline_ = false;
}
inline bool ExecutorOpts::record_timeline() const {
// @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_timeline)
return record_timeline_;
}
inline void ExecutorOpts::set_record_timeline(bool value) {
record_timeline_ = value;
// @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_timeline)
}
// optional bool record_partition_graphs = 4;
inline void ExecutorOpts::clear_record_partition_graphs() {
record_partition_graphs_ = false;
}
inline bool ExecutorOpts::record_partition_graphs() const {
// @@protoc_insertion_point(field_get:tensorflow.ExecutorOpts.record_partition_graphs)
return record_partition_graphs_;
}
inline void ExecutorOpts::set_record_partition_graphs(bool value) {
record_partition_graphs_ = value;
// @@protoc_insertion_point(field_set:tensorflow.ExecutorOpts.record_partition_graphs)
}
inline const ExecutorOpts* ExecutorOpts::internal_default_instance() {
return &ExecutorOpts_default_instance_.get();
}
// -------------------------------------------------------------------
// RunGraphRequest
// optional string session_handle = 8;
inline void RunGraphRequest::clear_session_handle() {
session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& RunGraphRequest::session_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.session_handle)
return session_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void RunGraphRequest::set_session_handle(const ::std::string& value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.session_handle)
}
inline void RunGraphRequest::set_session_handle(const char* value) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.RunGraphRequest.session_handle)
}
inline void RunGraphRequest::set_session_handle(const char* value,
size_t size) {
session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.RunGraphRequest.session_handle)
}
inline ::std::string* RunGraphRequest::mutable_session_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.session_handle)
return session_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RunGraphRequest::release_session_handle() {
// @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.session_handle)
return session_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RunGraphRequest::unsafe_arena_release_session_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.RunGraphRequest.session_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return session_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void RunGraphRequest::set_allocated_session_handle(::std::string* session_handle) {
if (session_handle != NULL) {
} else {
}
session_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), session_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.session_handle)
}
inline void RunGraphRequest::unsafe_arena_set_allocated_session_handle(
::std::string* session_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (session_handle != NULL) {
} else {
}
session_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
session_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunGraphRequest.session_handle)
}
// optional string graph_handle = 1;
inline void RunGraphRequest::clear_graph_handle() {
graph_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& RunGraphRequest::graph_handle() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.graph_handle)
return graph_handle_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void RunGraphRequest::set_graph_handle(const ::std::string& value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.graph_handle)
}
inline void RunGraphRequest::set_graph_handle(const char* value) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.RunGraphRequest.graph_handle)
}
inline void RunGraphRequest::set_graph_handle(const char* value,
size_t size) {
graph_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.RunGraphRequest.graph_handle)
}
inline ::std::string* RunGraphRequest::mutable_graph_handle() {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.graph_handle)
return graph_handle_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RunGraphRequest::release_graph_handle() {
// @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.graph_handle)
return graph_handle_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RunGraphRequest::unsafe_arena_release_graph_handle() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.RunGraphRequest.graph_handle)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return graph_handle_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void RunGraphRequest::set_allocated_graph_handle(::std::string* graph_handle) {
if (graph_handle != NULL) {
} else {
}
graph_handle_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), graph_handle,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.graph_handle)
}
inline void RunGraphRequest::unsafe_arena_set_allocated_graph_handle(
::std::string* graph_handle) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (graph_handle != NULL) {
} else {
}
graph_handle_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
graph_handle, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunGraphRequest.graph_handle)
}
// optional int64 step_id = 2;
inline void RunGraphRequest::clear_step_id() {
step_id_ = GOOGLE_LONGLONG(0);
}
inline ::google::protobuf::int64 RunGraphRequest::step_id() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.step_id)
return step_id_;
}
inline void RunGraphRequest::set_step_id(::google::protobuf::int64 value) {
step_id_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.step_id)
}
// optional .tensorflow.ExecutorOpts exec_opts = 5;
inline bool RunGraphRequest::has_exec_opts() const {
return this != internal_default_instance() && exec_opts_ != NULL;
}
inline void RunGraphRequest::clear_exec_opts() {
if (GetArenaNoVirtual() == NULL && exec_opts_ != NULL) delete exec_opts_;
exec_opts_ = NULL;
}
inline const ::tensorflow::ExecutorOpts& RunGraphRequest::exec_opts() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.exec_opts)
return exec_opts_ != NULL ? *exec_opts_
: *::tensorflow::ExecutorOpts::internal_default_instance();
}
inline ::tensorflow::ExecutorOpts* RunGraphRequest::mutable_exec_opts() {
if (exec_opts_ == NULL) {
_slow_mutable_exec_opts();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.exec_opts)
return exec_opts_;
}
inline ::tensorflow::ExecutorOpts* RunGraphRequest::release_exec_opts() {
// @@protoc_insertion_point(field_release:tensorflow.RunGraphRequest.exec_opts)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_exec_opts();
} else {
::tensorflow::ExecutorOpts* temp = exec_opts_;
exec_opts_ = NULL;
return temp;
}
}
inline void RunGraphRequest::set_allocated_exec_opts(::tensorflow::ExecutorOpts* exec_opts) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete exec_opts_;
}
if (exec_opts != NULL) {
_slow_set_allocated_exec_opts(message_arena, &exec_opts);
}
exec_opts_ = exec_opts;
if (exec_opts) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphRequest.exec_opts)
}
// repeated .tensorflow.NamedTensorProto send = 3;
inline int RunGraphRequest::send_size() const {
return send_.size();
}
inline void RunGraphRequest::clear_send() {
send_.Clear();
}
inline const ::tensorflow::NamedTensorProto& RunGraphRequest::send(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.send)
return send_.Get(index);
}
inline ::tensorflow::NamedTensorProto* RunGraphRequest::mutable_send(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.send)
return send_.Mutable(index);
}
inline ::tensorflow::NamedTensorProto* RunGraphRequest::add_send() {
// @@protoc_insertion_point(field_add:tensorflow.RunGraphRequest.send)
return send_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >*
RunGraphRequest::mutable_send() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphRequest.send)
return &send_;
}
inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >&
RunGraphRequest::send() const {
// @@protoc_insertion_point(field_list:tensorflow.RunGraphRequest.send)
return send_;
}
// repeated string recv_key = 4;
inline int RunGraphRequest::recv_key_size() const {
return recv_key_.size();
}
inline void RunGraphRequest::clear_recv_key() {
recv_key_.Clear();
}
inline const ::std::string& RunGraphRequest::recv_key(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.recv_key)
return recv_key_.Get(index);
}
inline ::std::string* RunGraphRequest::mutable_recv_key(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphRequest.recv_key)
return recv_key_.Mutable(index);
}
inline void RunGraphRequest::set_recv_key(int index, const ::std::string& value) {
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.recv_key)
recv_key_.Mutable(index)->assign(value);
}
inline void RunGraphRequest::set_recv_key(int index, const char* value) {
recv_key_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:tensorflow.RunGraphRequest.recv_key)
}
inline void RunGraphRequest::set_recv_key(int index, const char* value, size_t size) {
recv_key_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:tensorflow.RunGraphRequest.recv_key)
}
inline ::std::string* RunGraphRequest::add_recv_key() {
// @@protoc_insertion_point(field_add_mutable:tensorflow.RunGraphRequest.recv_key)
return recv_key_.Add();
}
inline void RunGraphRequest::add_recv_key(const ::std::string& value) {
recv_key_.Add()->assign(value);
// @@protoc_insertion_point(field_add:tensorflow.RunGraphRequest.recv_key)
}
inline void RunGraphRequest::add_recv_key(const char* value) {
recv_key_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:tensorflow.RunGraphRequest.recv_key)
}
inline void RunGraphRequest::add_recv_key(const char* value, size_t size) {
recv_key_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:tensorflow.RunGraphRequest.recv_key)
}
inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
RunGraphRequest::recv_key() const {
// @@protoc_insertion_point(field_list:tensorflow.RunGraphRequest.recv_key)
return recv_key_;
}
inline ::google::protobuf::RepeatedPtrField< ::std::string>*
RunGraphRequest::mutable_recv_key() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphRequest.recv_key)
return &recv_key_;
}
// optional bool is_partial = 6;
inline void RunGraphRequest::clear_is_partial() {
is_partial_ = false;
}
inline bool RunGraphRequest::is_partial() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.is_partial)
return is_partial_;
}
inline void RunGraphRequest::set_is_partial(bool value) {
is_partial_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.is_partial)
}
// optional bool is_last_partial_run = 7;
inline void RunGraphRequest::clear_is_last_partial_run() {
is_last_partial_run_ = false;
}
inline bool RunGraphRequest::is_last_partial_run() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphRequest.is_last_partial_run)
return is_last_partial_run_;
}
inline void RunGraphRequest::set_is_last_partial_run(bool value) {
is_last_partial_run_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RunGraphRequest.is_last_partial_run)
}
inline const RunGraphRequest* RunGraphRequest::internal_default_instance() {
return &RunGraphRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// RunGraphResponse
// repeated .tensorflow.NamedTensorProto recv = 1;
inline int RunGraphResponse::recv_size() const {
return recv_.size();
}
inline void RunGraphResponse::clear_recv() {
recv_.Clear();
}
inline const ::tensorflow::NamedTensorProto& RunGraphResponse::recv(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.recv)
return recv_.Get(index);
}
inline ::tensorflow::NamedTensorProto* RunGraphResponse::mutable_recv(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.recv)
return recv_.Mutable(index);
}
inline ::tensorflow::NamedTensorProto* RunGraphResponse::add_recv() {
// @@protoc_insertion_point(field_add:tensorflow.RunGraphResponse.recv)
return recv_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >*
RunGraphResponse::mutable_recv() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphResponse.recv)
return &recv_;
}
inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::NamedTensorProto >&
RunGraphResponse::recv() const {
// @@protoc_insertion_point(field_list:tensorflow.RunGraphResponse.recv)
return recv_;
}
// optional .tensorflow.StepStats step_stats = 2;
inline bool RunGraphResponse::has_step_stats() const {
return this != internal_default_instance() && step_stats_ != NULL;
}
inline void RunGraphResponse::clear_step_stats() {
if (GetArenaNoVirtual() == NULL && step_stats_ != NULL) delete step_stats_;
step_stats_ = NULL;
}
inline const ::tensorflow::StepStats& RunGraphResponse::step_stats() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.step_stats)
return step_stats_ != NULL ? *step_stats_
: *::tensorflow::StepStats::internal_default_instance();
}
inline ::tensorflow::StepStats* RunGraphResponse::mutable_step_stats() {
if (step_stats_ == NULL) {
_slow_mutable_step_stats();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.step_stats)
return step_stats_;
}
inline ::tensorflow::StepStats* RunGraphResponse::release_step_stats() {
// @@protoc_insertion_point(field_release:tensorflow.RunGraphResponse.step_stats)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_step_stats();
} else {
::tensorflow::StepStats* temp = step_stats_;
step_stats_ = NULL;
return temp;
}
}
inline void RunGraphResponse::set_allocated_step_stats(::tensorflow::StepStats* step_stats) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete step_stats_;
}
if (step_stats != NULL) {
_slow_set_allocated_step_stats(message_arena, &step_stats);
}
step_stats_ = step_stats;
if (step_stats) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphResponse.step_stats)
}
// optional .tensorflow.CostGraphDef cost_graph = 3;
inline bool RunGraphResponse::has_cost_graph() const {
return this != internal_default_instance() && cost_graph_ != NULL;
}
inline void RunGraphResponse::clear_cost_graph() {
if (GetArenaNoVirtual() == NULL && cost_graph_ != NULL) delete cost_graph_;
cost_graph_ = NULL;
}
inline const ::tensorflow::CostGraphDef& RunGraphResponse::cost_graph() const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.cost_graph)
return cost_graph_ != NULL ? *cost_graph_
: *::tensorflow::CostGraphDef::internal_default_instance();
}
inline ::tensorflow::CostGraphDef* RunGraphResponse::mutable_cost_graph() {
if (cost_graph_ == NULL) {
_slow_mutable_cost_graph();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.cost_graph)
return cost_graph_;
}
inline ::tensorflow::CostGraphDef* RunGraphResponse::release_cost_graph() {
// @@protoc_insertion_point(field_release:tensorflow.RunGraphResponse.cost_graph)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_cost_graph();
} else {
::tensorflow::CostGraphDef* temp = cost_graph_;
cost_graph_ = NULL;
return temp;
}
}
inline void RunGraphResponse::set_allocated_cost_graph(::tensorflow::CostGraphDef* cost_graph) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete cost_graph_;
}
if (cost_graph != NULL) {
_slow_set_allocated_cost_graph(message_arena, &cost_graph);
}
cost_graph_ = cost_graph;
if (cost_graph) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RunGraphResponse.cost_graph)
}
// repeated .tensorflow.GraphDef partition_graph = 4;
inline int RunGraphResponse::partition_graph_size() const {
return partition_graph_.size();
}
inline void RunGraphResponse::clear_partition_graph() {
partition_graph_.Clear();
}
inline const ::tensorflow::GraphDef& RunGraphResponse::partition_graph(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.RunGraphResponse.partition_graph)
return partition_graph_.Get(index);
}
inline ::tensorflow::GraphDef* RunGraphResponse::mutable_partition_graph(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.RunGraphResponse.partition_graph)
return partition_graph_.Mutable(index);
}
inline ::tensorflow::GraphDef* RunGraphResponse::add_partition_graph() {
// @@protoc_insertion_point(field_add:tensorflow.RunGraphResponse.partition_graph)
return partition_graph_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::tensorflow::GraphDef >*
RunGraphResponse::mutable_partition_graph() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.RunGraphResponse.partition_graph)
return &partition_graph_;
}
inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::GraphDef >&
RunGraphResponse::partition_graph() const {
// @@protoc_insertion_point(field_list:tensorflow.RunGraphResponse.partition_graph)
return partition_graph_;
}
inline const RunGraphResponse* RunGraphResponse::internal_default_instance() {
return &RunGraphResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// CleanupGraphRequest
// optional int64 step_id = 1;
inline void CleanupGraphRequest::clear_step_id() {
step_id_ = GOOGLE_LONGLONG(0);
}
inline ::google::protobuf::int64 CleanupGraphRequest::step_id() const {
// @@protoc_insertion_point(field_get:tensorflow.CleanupGraphRequest.step_id)
return step_id_;
}
inline void CleanupGraphRequest::set_step_id(::google::protobuf::int64 value) {
step_id_ = value;
// @@protoc_insertion_point(field_set:tensorflow.CleanupGraphRequest.step_id)
}
inline const CleanupGraphRequest* CleanupGraphRequest::internal_default_instance() {
return &CleanupGraphRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// CleanupGraphResponse
inline const CleanupGraphResponse* CleanupGraphResponse::internal_default_instance() {
return &CleanupGraphResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// RecvTensorRequest
// optional int64 step_id = 1;
inline void RecvTensorRequest::clear_step_id() {
step_id_ = GOOGLE_LONGLONG(0);
}
inline ::google::protobuf::int64 RecvTensorRequest::step_id() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.step_id)
return step_id_;
}
inline void RecvTensorRequest::set_step_id(::google::protobuf::int64 value) {
step_id_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.step_id)
}
// optional string rendezvous_key = 2;
inline void RecvTensorRequest::clear_rendezvous_key() {
rendezvous_key_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& RecvTensorRequest::rendezvous_key() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.rendezvous_key)
return rendezvous_key_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void RecvTensorRequest::set_rendezvous_key(const ::std::string& value) {
rendezvous_key_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
// @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.rendezvous_key)
}
inline void RecvTensorRequest::set_rendezvous_key(const char* value) {
rendezvous_key_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_char:tensorflow.RecvTensorRequest.rendezvous_key)
}
inline void RecvTensorRequest::set_rendezvous_key(const char* value,
size_t size) {
rendezvous_key_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_pointer:tensorflow.RecvTensorRequest.rendezvous_key)
}
inline ::std::string* RecvTensorRequest::mutable_rendezvous_key() {
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.rendezvous_key)
return rendezvous_key_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RecvTensorRequest::release_rendezvous_key() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.rendezvous_key)
return rendezvous_key_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* RecvTensorRequest::unsafe_arena_release_rendezvous_key() {
// @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.RecvTensorRequest.rendezvous_key)
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
return rendezvous_key_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
inline void RecvTensorRequest::set_allocated_rendezvous_key(::std::string* rendezvous_key) {
if (rendezvous_key != NULL) {
} else {
}
rendezvous_key_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), rendezvous_key,
GetArenaNoVirtual());
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.rendezvous_key)
}
inline void RecvTensorRequest::unsafe_arena_set_allocated_rendezvous_key(
::std::string* rendezvous_key) {
GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
if (rendezvous_key != NULL) {
} else {
}
rendezvous_key_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
rendezvous_key, GetArenaNoVirtual());
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RecvTensorRequest.rendezvous_key)
}
// optional bool dma_ok = 3;
inline void RecvTensorRequest::clear_dma_ok() {
dma_ok_ = false;
}
inline bool RecvTensorRequest::dma_ok() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.dma_ok)
return dma_ok_;
}
inline void RecvTensorRequest::set_dma_ok(bool value) {
dma_ok_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RecvTensorRequest.dma_ok)
}
// optional .tensorflow.DeviceLocality client_locality = 4;
inline bool RecvTensorRequest::has_client_locality() const {
return this != internal_default_instance() && client_locality_ != NULL;
}
inline void RecvTensorRequest::clear_client_locality() {
if (GetArenaNoVirtual() == NULL && client_locality_ != NULL) delete client_locality_;
client_locality_ = NULL;
}
inline const ::tensorflow::DeviceLocality& RecvTensorRequest::client_locality() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.client_locality)
return client_locality_ != NULL ? *client_locality_
: *::tensorflow::DeviceLocality::internal_default_instance();
}
inline ::tensorflow::DeviceLocality* RecvTensorRequest::mutable_client_locality() {
if (client_locality_ == NULL) {
_slow_mutable_client_locality();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.client_locality)
return client_locality_;
}
inline ::tensorflow::DeviceLocality* RecvTensorRequest::release_client_locality() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.client_locality)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_client_locality();
} else {
::tensorflow::DeviceLocality* temp = client_locality_;
client_locality_ = NULL;
return temp;
}
}
inline void RecvTensorRequest::set_allocated_client_locality(::tensorflow::DeviceLocality* client_locality) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete client_locality_;
}
if (client_locality != NULL) {
_slow_set_allocated_client_locality(message_arena, &client_locality);
}
client_locality_ = client_locality;
if (client_locality) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.client_locality)
}
// optional .tensorflow.DeviceLocality server_locality = 5;
inline bool RecvTensorRequest::has_server_locality() const {
return this != internal_default_instance() && server_locality_ != NULL;
}
inline void RecvTensorRequest::clear_server_locality() {
if (GetArenaNoVirtual() == NULL && server_locality_ != NULL) delete server_locality_;
server_locality_ = NULL;
}
inline const ::tensorflow::DeviceLocality& RecvTensorRequest::server_locality() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.server_locality)
return server_locality_ != NULL ? *server_locality_
: *::tensorflow::DeviceLocality::internal_default_instance();
}
inline ::tensorflow::DeviceLocality* RecvTensorRequest::mutable_server_locality() {
if (server_locality_ == NULL) {
_slow_mutable_server_locality();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.server_locality)
return server_locality_;
}
inline ::tensorflow::DeviceLocality* RecvTensorRequest::release_server_locality() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.server_locality)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_server_locality();
} else {
::tensorflow::DeviceLocality* temp = server_locality_;
server_locality_ = NULL;
return temp;
}
}
inline void RecvTensorRequest::set_allocated_server_locality(::tensorflow::DeviceLocality* server_locality) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete server_locality_;
}
if (server_locality != NULL) {
_slow_set_allocated_server_locality(message_arena, &server_locality);
}
server_locality_ = server_locality;
if (server_locality) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.server_locality)
}
// optional .google.protobuf.Any transport_options = 6;
inline bool RecvTensorRequest::has_transport_options() const {
return this != internal_default_instance() && transport_options_ != NULL;
}
inline void RecvTensorRequest::clear_transport_options() {
if (GetArenaNoVirtual() == NULL && transport_options_ != NULL) delete transport_options_;
transport_options_ = NULL;
}
inline const ::google::protobuf::Any& RecvTensorRequest::transport_options() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorRequest.transport_options)
return transport_options_ != NULL ? *transport_options_
: *::google::protobuf::Any::internal_default_instance();
}
inline ::google::protobuf::Any* RecvTensorRequest::mutable_transport_options() {
if (transport_options_ == NULL) {
_slow_mutable_transport_options();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorRequest.transport_options)
return transport_options_;
}
inline ::google::protobuf::Any* RecvTensorRequest::release_transport_options() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorRequest.transport_options)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_transport_options();
} else {
::google::protobuf::Any* temp = transport_options_;
transport_options_ = NULL;
return temp;
}
}
inline void RecvTensorRequest::set_allocated_transport_options(::google::protobuf::Any* transport_options) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete transport_options_;
}
if (transport_options != NULL) {
if (message_arena != NULL) {
message_arena->Own(transport_options);
}
}
transport_options_ = transport_options;
if (transport_options) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorRequest.transport_options)
}
inline const RecvTensorRequest* RecvTensorRequest::internal_default_instance() {
return &RecvTensorRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// RecvTensorResponse
// optional .tensorflow.TensorProto tensor = 1;
inline bool RecvTensorResponse::has_tensor() const {
return this != internal_default_instance() && tensor_ != NULL;
}
inline void RecvTensorResponse::clear_tensor() {
if (GetArenaNoVirtual() == NULL && tensor_ != NULL) delete tensor_;
tensor_ = NULL;
}
inline const ::tensorflow::TensorProto& RecvTensorResponse::tensor() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.tensor)
return tensor_ != NULL ? *tensor_
: *::tensorflow::TensorProto::internal_default_instance();
}
inline ::tensorflow::TensorProto* RecvTensorResponse::mutable_tensor() {
if (tensor_ == NULL) {
_slow_mutable_tensor();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorResponse.tensor)
return tensor_;
}
inline ::tensorflow::TensorProto* RecvTensorResponse::release_tensor() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorResponse.tensor)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_tensor();
} else {
::tensorflow::TensorProto* temp = tensor_;
tensor_ = NULL;
return temp;
}
}
inline void RecvTensorResponse::set_allocated_tensor(::tensorflow::TensorProto* tensor) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete tensor_;
}
if (tensor != NULL) {
_slow_set_allocated_tensor(message_arena, &tensor);
}
tensor_ = tensor;
if (tensor) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorResponse.tensor)
}
// optional bool is_dead = 2;
inline void RecvTensorResponse::clear_is_dead() {
is_dead_ = false;
}
inline bool RecvTensorResponse::is_dead() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.is_dead)
return is_dead_;
}
inline void RecvTensorResponse::set_is_dead(bool value) {
is_dead_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RecvTensorResponse.is_dead)
}
// optional int64 send_start_micros = 3;
inline void RecvTensorResponse::clear_send_start_micros() {
send_start_micros_ = GOOGLE_LONGLONG(0);
}
inline ::google::protobuf::int64 RecvTensorResponse::send_start_micros() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.send_start_micros)
return send_start_micros_;
}
inline void RecvTensorResponse::set_send_start_micros(::google::protobuf::int64 value) {
send_start_micros_ = value;
// @@protoc_insertion_point(field_set:tensorflow.RecvTensorResponse.send_start_micros)
}
// optional .google.protobuf.Any transport_options = 4;
inline bool RecvTensorResponse::has_transport_options() const {
return this != internal_default_instance() && transport_options_ != NULL;
}
inline void RecvTensorResponse::clear_transport_options() {
if (GetArenaNoVirtual() == NULL && transport_options_ != NULL) delete transport_options_;
transport_options_ = NULL;
}
inline const ::google::protobuf::Any& RecvTensorResponse::transport_options() const {
// @@protoc_insertion_point(field_get:tensorflow.RecvTensorResponse.transport_options)
return transport_options_ != NULL ? *transport_options_
: *::google::protobuf::Any::internal_default_instance();
}
inline ::google::protobuf::Any* RecvTensorResponse::mutable_transport_options() {
if (transport_options_ == NULL) {
_slow_mutable_transport_options();
}
// @@protoc_insertion_point(field_mutable:tensorflow.RecvTensorResponse.transport_options)
return transport_options_;
}
inline ::google::protobuf::Any* RecvTensorResponse::release_transport_options() {
// @@protoc_insertion_point(field_release:tensorflow.RecvTensorResponse.transport_options)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_transport_options();
} else {
::google::protobuf::Any* temp = transport_options_;
transport_options_ = NULL;
return temp;
}
}
inline void RecvTensorResponse::set_allocated_transport_options(::google::protobuf::Any* transport_options) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete transport_options_;
}
if (transport_options != NULL) {
if (message_arena != NULL) {
message_arena->Own(transport_options);
}
}
transport_options_ = transport_options;
if (transport_options) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.RecvTensorResponse.transport_options)
}
inline const RecvTensorResponse* RecvTensorResponse::internal_default_instance() {
return &RecvTensorResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// LoggingRequest
// optional bool rpc_logging = 1;
inline void LoggingRequest::clear_rpc_logging() {
rpc_logging_ = false;
}
inline bool LoggingRequest::rpc_logging() const {
// @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.rpc_logging)
return rpc_logging_;
}
inline void LoggingRequest::set_rpc_logging(bool value) {
rpc_logging_ = value;
// @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.rpc_logging)
}
// optional bool clear = 2;
inline void LoggingRequest::clear_clear() {
clear_ = false;
}
inline bool LoggingRequest::clear() const {
// @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.clear)
return clear_;
}
inline void LoggingRequest::set_clear(bool value) {
clear_ = value;
// @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.clear)
}
// repeated int64 fetch_step_id = 3;
inline int LoggingRequest::fetch_step_id_size() const {
return fetch_step_id_.size();
}
inline void LoggingRequest::clear_fetch_step_id() {
fetch_step_id_.Clear();
}
inline ::google::protobuf::int64 LoggingRequest::fetch_step_id(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.LoggingRequest.fetch_step_id)
return fetch_step_id_.Get(index);
}
inline void LoggingRequest::set_fetch_step_id(int index, ::google::protobuf::int64 value) {
fetch_step_id_.Set(index, value);
// @@protoc_insertion_point(field_set:tensorflow.LoggingRequest.fetch_step_id)
}
inline void LoggingRequest::add_fetch_step_id(::google::protobuf::int64 value) {
fetch_step_id_.Add(value);
// @@protoc_insertion_point(field_add:tensorflow.LoggingRequest.fetch_step_id)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
LoggingRequest::fetch_step_id() const {
// @@protoc_insertion_point(field_list:tensorflow.LoggingRequest.fetch_step_id)
return fetch_step_id_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
LoggingRequest::mutable_fetch_step_id() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.LoggingRequest.fetch_step_id)
return &fetch_step_id_;
}
inline const LoggingRequest* LoggingRequest::internal_default_instance() {
return &LoggingRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// LabeledStepStats
// optional int64 step_id = 1;
inline void LabeledStepStats::clear_step_id() {
step_id_ = GOOGLE_LONGLONG(0);
}
inline ::google::protobuf::int64 LabeledStepStats::step_id() const {
// @@protoc_insertion_point(field_get:tensorflow.LabeledStepStats.step_id)
return step_id_;
}
inline void LabeledStepStats::set_step_id(::google::protobuf::int64 value) {
step_id_ = value;
// @@protoc_insertion_point(field_set:tensorflow.LabeledStepStats.step_id)
}
// optional .tensorflow.StepStats step_stats = 2;
inline bool LabeledStepStats::has_step_stats() const {
return this != internal_default_instance() && step_stats_ != NULL;
}
inline void LabeledStepStats::clear_step_stats() {
if (GetArenaNoVirtual() == NULL && step_stats_ != NULL) delete step_stats_;
step_stats_ = NULL;
}
inline const ::tensorflow::StepStats& LabeledStepStats::step_stats() const {
// @@protoc_insertion_point(field_get:tensorflow.LabeledStepStats.step_stats)
return step_stats_ != NULL ? *step_stats_
: *::tensorflow::StepStats::internal_default_instance();
}
inline ::tensorflow::StepStats* LabeledStepStats::mutable_step_stats() {
if (step_stats_ == NULL) {
_slow_mutable_step_stats();
}
// @@protoc_insertion_point(field_mutable:tensorflow.LabeledStepStats.step_stats)
return step_stats_;
}
inline ::tensorflow::StepStats* LabeledStepStats::release_step_stats() {
// @@protoc_insertion_point(field_release:tensorflow.LabeledStepStats.step_stats)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_step_stats();
} else {
::tensorflow::StepStats* temp = step_stats_;
step_stats_ = NULL;
return temp;
}
}
inline void LabeledStepStats::set_allocated_step_stats(::tensorflow::StepStats* step_stats) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete step_stats_;
}
if (step_stats != NULL) {
_slow_set_allocated_step_stats(message_arena, &step_stats);
}
step_stats_ = step_stats;
if (step_stats) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.LabeledStepStats.step_stats)
}
inline const LabeledStepStats* LabeledStepStats::internal_default_instance() {
return &LabeledStepStats_default_instance_.get();
}
// -------------------------------------------------------------------
// LoggingResponse
// repeated .tensorflow.LabeledStepStats step = 1;
inline int LoggingResponse::step_size() const {
return step_.size();
}
inline void LoggingResponse::clear_step() {
step_.Clear();
}
inline const ::tensorflow::LabeledStepStats& LoggingResponse::step(int index) const {
// @@protoc_insertion_point(field_get:tensorflow.LoggingResponse.step)
return step_.Get(index);
}
inline ::tensorflow::LabeledStepStats* LoggingResponse::mutable_step(int index) {
// @@protoc_insertion_point(field_mutable:tensorflow.LoggingResponse.step)
return step_.Mutable(index);
}
inline ::tensorflow::LabeledStepStats* LoggingResponse::add_step() {
// @@protoc_insertion_point(field_add:tensorflow.LoggingResponse.step)
return step_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::tensorflow::LabeledStepStats >*
LoggingResponse::mutable_step() {
// @@protoc_insertion_point(field_mutable_list:tensorflow.LoggingResponse.step)
return &step_;
}
inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::LabeledStepStats >&
LoggingResponse::step() const {
// @@protoc_insertion_point(field_list:tensorflow.LoggingResponse.step)
return step_;
}
inline const LoggingResponse* LoggingResponse::internal_default_instance() {
return &LoggingResponse_default_instance_.get();
}
// -------------------------------------------------------------------
// TraceOpts
// optional double duration = 1;
inline void TraceOpts::clear_duration() {
duration_ = 0;
}
inline double TraceOpts::duration() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.duration)
return duration_;
}
inline void TraceOpts::set_duration(double value) {
duration_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.duration)
}
// optional bool use_step_profiler = 2;
inline void TraceOpts::clear_use_step_profiler() {
use_step_profiler_ = false;
}
inline bool TraceOpts::use_step_profiler() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_step_profiler)
return use_step_profiler_;
}
inline void TraceOpts::set_use_step_profiler(bool value) {
use_step_profiler_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_step_profiler)
}
// optional bool use_kernel_profiler = 3;
inline void TraceOpts::clear_use_kernel_profiler() {
use_kernel_profiler_ = false;
}
inline bool TraceOpts::use_kernel_profiler() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_kernel_profiler)
return use_kernel_profiler_;
}
inline void TraceOpts::set_use_kernel_profiler(bool value) {
use_kernel_profiler_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_kernel_profiler)
}
// optional bool use_extended_profiler = 4;
inline void TraceOpts::clear_use_extended_profiler() {
use_extended_profiler_ = false;
}
inline bool TraceOpts::use_extended_profiler() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_extended_profiler)
return use_extended_profiler_;
}
inline void TraceOpts::set_use_extended_profiler(bool value) {
use_extended_profiler_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_extended_profiler)
}
// optional bool use_gpu_profiler = 5;
inline void TraceOpts::clear_use_gpu_profiler() {
use_gpu_profiler_ = false;
}
inline bool TraceOpts::use_gpu_profiler() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_gpu_profiler)
return use_gpu_profiler_;
}
inline void TraceOpts::set_use_gpu_profiler(bool value) {
use_gpu_profiler_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_gpu_profiler)
}
// optional bool use_sample_profiler = 6;
inline void TraceOpts::clear_use_sample_profiler() {
use_sample_profiler_ = false;
}
inline bool TraceOpts::use_sample_profiler() const {
// @@protoc_insertion_point(field_get:tensorflow.TraceOpts.use_sample_profiler)
return use_sample_profiler_;
}
inline void TraceOpts::set_use_sample_profiler(bool value) {
use_sample_profiler_ = value;
// @@protoc_insertion_point(field_set:tensorflow.TraceOpts.use_sample_profiler)
}
inline const TraceOpts* TraceOpts::internal_default_instance() {
return &TraceOpts_default_instance_.get();
}
// -------------------------------------------------------------------
// TracingRequest
// optional .tensorflow.TraceOpts options = 1;
inline bool TracingRequest::has_options() const {
return this != internal_default_instance() && options_ != NULL;
}
inline void TracingRequest::clear_options() {
if (GetArenaNoVirtual() == NULL && options_ != NULL) delete options_;
options_ = NULL;
}
inline const ::tensorflow::TraceOpts& TracingRequest::options() const {
// @@protoc_insertion_point(field_get:tensorflow.TracingRequest.options)
return options_ != NULL ? *options_
: *::tensorflow::TraceOpts::internal_default_instance();
}
inline ::tensorflow::TraceOpts* TracingRequest::mutable_options() {
if (options_ == NULL) {
_slow_mutable_options();
}
// @@protoc_insertion_point(field_mutable:tensorflow.TracingRequest.options)
return options_;
}
inline ::tensorflow::TraceOpts* TracingRequest::release_options() {
// @@protoc_insertion_point(field_release:tensorflow.TracingRequest.options)
if (GetArenaNoVirtual() != NULL) {
return _slow_release_options();
} else {
::tensorflow::TraceOpts* temp = options_;
options_ = NULL;
return temp;
}
}
inline void TracingRequest::set_allocated_options(::tensorflow::TraceOpts* options) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == NULL) {
delete options_;
}
if (options != NULL) {
_slow_set_allocated_options(message_arena, &options);
}
options_ = options;
if (options) {
} else {
}
// @@protoc_insertion_point(field_set_allocated:tensorflow.TracingRequest.options)
}
inline const TracingRequest* TracingRequest::internal_default_instance() {
return &TracingRequest_default_instance_.get();
}
// -------------------------------------------------------------------
// TracingResponse
inline const TracingResponse* TracingResponse::internal_default_instance() {
return &TracingResponse_default_instance_.get();
}
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace tensorflow
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_tensorflow_2fcore_2fprotobuf_2fworker_2eproto__INCLUDED
| 61,881 |
1,248 | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 <NAME> and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation in version 3 of the License.
#
# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
# this file, see <https://pretix.eu/about/en/license>.
#
# 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 Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
import pytest
from django.conf import settings
from django.template import Context, Template, TemplateSyntaxError
from django.urls import NoReverseMatch
from django.utils.timezone import now
from pretix.base.models import Event, Organizer
from pretix.multidomain.models import KnownDomain
@pytest.fixture
def env():
o = Organizer.objects.create(name='MRMCD', slug='mrmcd')
event = Event.objects.create(
organizer=o, name='MRMCD2015', slug='2015',
date_from=now()
)
settings.SITE_URL = 'http://example.com'
event.get_cache().clear()
return o, event
TEMPLATE_FRONT_PAGE = Template("{% load eventurl %} {% eventurl event 'presale:event.index' %}")
TEMPLATE_KWARGS = Template("{% load eventurl %} {% eventurl event 'presale:event.checkout' step='payment' %}")
@pytest.mark.django_db
def test_event_main_domain_front_page(env):
rendered = TEMPLATE_FRONT_PAGE.render(Context({
'event': env[1]
})).strip()
assert rendered == '/mrmcd/2015/'
@pytest.mark.django_db
def test_event_custom_domain_front_page(env):
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
rendered = TEMPLATE_FRONT_PAGE.render(Context({
'event': env[1]
})).strip()
assert rendered == 'http://foobar/2015/'
@pytest.mark.django_db
def test_event_main_domain_kwargs(env):
rendered = TEMPLATE_KWARGS.render(Context({
'event': env[1]
})).strip()
assert rendered == '/mrmcd/2015/checkout/payment/'
@pytest.mark.django_db
def test_event_custom_domain_kwargs(env):
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
rendered = TEMPLATE_KWARGS.render(Context({
'event': env[1]
})).strip()
assert rendered == 'http://foobar/2015/checkout/payment/'
@pytest.mark.django_db
def test_only_kwargs(env):
with pytest.raises(TemplateSyntaxError):
Template("{% load eventurl %} {% eventurl event 'presale:event.checkout' step %}")
@pytest.mark.django_db
def test_invalid_url(env):
tpl = Template("{% load eventurl %} {% eventurl event 'presale:event.foo' %}")
with pytest.raises(NoReverseMatch):
tpl.render(Context({
'event': env[1]
})).strip()
@pytest.mark.django_db
def test_without_event(env):
with pytest.raises(TemplateSyntaxError):
Template("{% load eventurl %} {% eventurl 'presale:event.index' %}")
@pytest.mark.django_db
def test_save_as(env):
tpl = Template("{% load eventurl %} {% eventurl event 'presale:event.index' as u %}{{ u }}")
rendered = tpl.render(Context({
'event': env[1]
})).strip()
assert rendered == '/mrmcd/2015/'
| 1,357 |
2,151 | # Copyright 2018 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.
import sys
def IsNewer(old_version, new_version):
return (old_version and new_version and
(old_version.major < new_version.major or
(old_version.major == new_version.major and
old_version.minor < new_version.minor)))
def CheckVersionAndAssetParity(input_api, output_api):
"""Checks that
- the version was upraded if assets files were changed,
- the version was not downgraded,
- both the google_chrome and the chromium assets have the same files.
"""
sys.path.append(input_api.PresubmitLocalPath())
import parse_version
old_version = None
new_version = None
changed_assets = False
changed_version = False
changed_component_list = False
changed_asset_files = {'google_chrome': [], 'chromium': []}
for file in input_api.AffectedFiles():
basename = input_api.os_path.basename(file.LocalPath())
extension = input_api.os_path.splitext(basename)[1][1:].strip().lower()
basename_without_extension = input_api.os_path.splitext(basename)[
0].strip().lower()
if extension == 'sha1':
basename_without_extension = input_api.os_path.splitext(
basename_without_extension)[0]
dirname = input_api.os_path.basename(
input_api.os_path.dirname(file.LocalPath()))
action = file.Action()
if (dirname in changed_asset_files and
extension in {'sha1', 'png', 'wav'} and action in {'A', 'D'}):
changed_asset_files[dirname].append((action, basename_without_extension))
if (extension == 'sha1' or basename == 'vr_assets_component_files.json'):
changed_assets = True
if basename == 'vr_assets_component_files.json':
changed_component_list = True
if basename == 'VERSION':
changed_version = True
old_version = parse_version.ParseVersion(file.OldContents())
new_version = parse_version.ParseVersion(file.NewContents())
local_version_filename = input_api.os_path.join(
input_api.os_path.dirname(input_api.AffectedFiles()[0].LocalPath()),
'VERSION')
local_component_list_filename = input_api.os_path.join(
input_api.os_path.dirname(input_api.AffectedFiles()[0].LocalPath()),
'vr_assets_component_files.json')
if changed_asset_files['google_chrome'] != changed_asset_files['chromium']:
return [
output_api.PresubmitError(
'Must have same asset files for %s in \'%s\'.' %
(changed_asset_files.keys(),
input_api.os_path.dirname(
input_api.AffectedFiles()[0].LocalPath())))
]
if changed_asset_files['google_chrome'] and not changed_component_list:
return [
output_api.PresubmitError(
'Must update \'%s\' if adding/removing assets.' %
local_component_list_filename)
]
if changed_version and (not old_version or not new_version):
return [
output_api.PresubmitError(
'Cannot parse version in \'%s\'.' % local_version_filename)
]
version_upgraded = IsNewer(old_version, new_version)
if changed_assets and not version_upgraded:
return [
output_api.PresubmitError(
'Must increment version in \'%s\' when '
'updating VR assets.' % local_version_filename)
]
if changed_version and not version_upgraded:
return [
output_api.PresubmitError(
'Must not downgrade version in \'%s\'.' % local_version_filename)
]
return []
def CheckChangeOnUpload(input_api, output_api):
return CheckVersionAndAssetParity(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return CheckVersionAndAssetParity(input_api, output_api)
| 1,451 |
1,056 | <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.lib.editor.codetemplates.spi;
/**
* Fills in default values of the code template's parameters and may react
* to user's typing modifications of the parameters.
* <br>
* Each processor is associated with {@link CodeTemplateInsertRequest}
* which was given to it during construction by {@link CodeTemplateProcessorFactory}.
* @see CodeTemplateProcessorFactory
*
* @author <NAME>
*/
public interface CodeTemplateProcessor {
/**
* Update the values of the parameters in the parsed code template
* before the code template gets physically inserted into the document.
* <br/>
* The processor may call {@link CodeTemplateInsertRequest#getMasterParameters()}
* to find the master parameters.
* <br/>
* On each parameter {@link CodeTemplateParameter#setValue(String)}
* can be called. The value will be propagated to all slave parameters
* automatically.
*/
void updateDefaultValues();
/**
* Notification that a master parameter's value has been modified
* by the user and the processor may need to react to it.
* <br/>
* This notification is only done after the code template was physically
* inserted into the document i.e. {@link CodeTemplateInsertRequest#isInserted()}
* returns true.
*
* <br/>
* Typically the processor either does nothing or it may change other
* parameter(s)' values. The change may occur in the same thread
* or it may post the parameter's new value recomputation and changing
* into another thread.
*
* <p>
* The processor is only allowed to change master parameters.
* </p>
*
* <p>
* Slave parameter's changes are not notified at all.
* </p>
*
* @param masterParameter master parameter that was changed.
* @param typingChange allows to react to user's typing immediately
* or only react once the active parameter gets changed e.g. by <i>TAB</i>.
* <br/>
* <code>true</code> is passed if the parameter value was modified
* by user's typing. Some processors may want such immediate reaction.
* <br/>
* Others will only react when this parameter
* is <code>false</code> which happens when
* at least one typing change occurred in the current active parameter
* and the active parameter is being changed by <i>TAB</i>
* or <i>Shift-TAB</i> or <i>Enter</i>.
*/
void parameterValueChanged(CodeTemplateParameter masterParameter, boolean typingChange);
/**
* Notify the processor that the insert request which it services
* was already completed and there is no more work to do.
* <br/>
* The processor can free possible resources related to the insert
* request processing.
*
* @see CodeTemplateInsertRequest#isReleased()
*/
void release();
}
| 1,110 |
521 | <gh_stars>100-1000
/*
Copyright (C) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
Portions Copyright 2007-2010 Sun Microsystems, Inc. All rights reserved.
Portions Copyright 2009-2018 SN Systems Ltd. All rights reserved.
Portions Copyright 2008-2018 <NAME>. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it would be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Further, this software is distributed without any warranty that it is
free of the rightful claim of any third person regarding infringement
or the like. Any license provided herein, whether implied or
otherwise, applies only to this software file. Patent licenses, if
any, provided herein do not apply to combinations of this program with
other software, or any other product whatsoever.
You should have received a copy of the GNU General Public License along
with this program; if not, write the Free Software Foundation, Inc., 51
Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
*/
#include "globals.h"
#include "naming.h"
#include "macrocheck.h"
#include "esb.h"
#include "esb_using_functions.h"
#include "sanitized.h"
#include "print_sections.h"
#include "print_frames.h"
#define TRUE 1
#define FALSE 0
struct macro_counts_s {
long mc_start_file;
long mc_end_file;
long mc_define;
long mc_undef;
long mc_extension;
long mc_code_zero;
long mc_unknown;
};
static void
print_one_macro_entry_detail(long i,
char *type,
struct Dwarf_Macro_Details_s *mdp)
{
/* "DW_MACINFO_*: section-offset file-index [line] string\n" */
if (glflags.gf_do_print_dwarf) {
if (mdp->dmd_macro) {
printf("%3ld %s: %6" DW_PR_DUu " %2" DW_PR_DSd " [%4"
DW_PR_DSd "] \"%s\" \n",
i,
type,
(Dwarf_Unsigned)mdp->dmd_offset,
mdp->dmd_fileindex, mdp->dmd_lineno,
sanitized(mdp->dmd_macro));
} else {
printf("%3ld %s: %6" DW_PR_DUu " %2" DW_PR_DSd " [%4"
DW_PR_DSd "] 0\n",
i,
type,
(Dwarf_Unsigned)mdp->dmd_offset,
mdp->dmd_fileindex, mdp->dmd_lineno);
}
}
}
static void
print_one_macro_entry(long i,
struct Dwarf_Macro_Details_s *mdp,
struct macro_counts_s *counts)
{
switch (mdp->dmd_type) {
case 0:
counts->mc_code_zero++;
print_one_macro_entry_detail(i, "DW_MACINFO_type-code-0", mdp);
break;
case DW_MACINFO_start_file:
counts->mc_start_file++;
print_one_macro_entry_detail(i, "DW_MACINFO_start_file", mdp);
break;
case DW_MACINFO_end_file:
counts->mc_end_file++;
print_one_macro_entry_detail(i, "DW_MACINFO_end_file ", mdp);
break;
case DW_MACINFO_vendor_ext:
counts->mc_extension++;
print_one_macro_entry_detail(i, "DW_MACINFO_vendor_ext", mdp);
break;
case DW_MACINFO_define:
counts->mc_define++;
print_one_macro_entry_detail(i, "DW_MACINFO_define ", mdp);
break;
case DW_MACINFO_undef:
counts->mc_undef++;
print_one_macro_entry_detail(i, "DW_MACINFO_undef ", mdp);
break;
default:
{
struct esb_s typeb;
esb_constructor(&typeb);
counts->mc_unknown++;
esb_append_printf(&typeb,
"DW_MACINFO_0x%x", mdp->dmd_type);
print_one_macro_entry_detail(i,
esb_get_string(&typeb), mdp);
esb_destructor(&typeb);
}
break;
}
}
/* print data in .debug_macinfo */
/*ARGSUSED*/ extern void
print_macinfo_by_offset(Dwarf_Debug dbg,Dwarf_Unsigned offset)
{
Dwarf_Unsigned max = 0;
Dwarf_Signed count = 0;
Dwarf_Macro_Details *maclist = NULL;
int lres = 0;
long i = 0;
struct macro_counts_s counts;
Dwarf_Unsigned totallen = 0;
Dwarf_Bool is_primary = TRUE;
Dwarf_Error error = 0;
glflags.current_section_id = DEBUG_MACINFO;
/* No real need to get the real section name, this
section not used much in modern compilers
as this definition of macro data (V2-V4)
is obsolete as it takes too much space to be
much used. */
lres = dwarf_get_macro_details(dbg, offset,
max, &count, &maclist, &error);
if (lres == DW_DLV_ERROR) {
print_error(dbg, "dwarf_get_macro_details", lres, error);
} else if (lres == DW_DLV_NO_ENTRY) {
return;
}
memset(&counts, 0, sizeof(counts));
if (glflags.gf_do_print_dwarf) {
struct esb_s truename;
char buf[DWARF_SECNAME_BUFFER_SIZE];
esb_constructor_fixed(&truename,buf,sizeof(buf));
get_true_section_name(dbg,".debug_macinfo",
&truename,TRUE);
printf("\n%s\n",sanitized(esb_get_string(&truename)));
esb_destructor(&truename);
printf("\n");
printf("compilation-unit .debug_macinfo offset "
"0x%" DW_PR_XZEROS DW_PR_DUx "\n",offset);
printf("num name section-offset file-index [line] \"string\"\n");
}
for (i = 0; i < count; i++) {
struct Dwarf_Macro_Details_s *mdp = &maclist[i];
print_one_macro_entry(i, mdp, &counts);
}
if (counts.mc_start_file == 0) {
printf("DW_MACINFO file count of zero is invalid DWARF2/3/4\n");
}
if (counts.mc_start_file != counts.mc_end_file) {
printf("Counts of DW_MACINFO file (%ld) end_file (%ld) "
"do not match!.\n",
counts.mc_start_file, counts.mc_end_file);
}
if (counts.mc_code_zero < 1) {
printf("Count of zeros in macro group should be non-zero "
"(1 preferred), count is %ld\n",
counts.mc_code_zero);
}
/* next byte is maclist[count - 1].dmd_offset + 1; */
totallen = (maclist[count - 1].dmd_offset + 1) - offset;
add_macro_import(&macinfo_check_tree,is_primary, offset);
add_macro_area_len(&macinfo_check_tree,offset,totallen);
if (glflags.gf_do_print_dwarf) {
printf("Macro counts: start file %ld, "
"end file %ld, "
"define %ld, "
"undef %ld, "
"ext %ld, "
"code-zero %ld, "
"unknown %ld\n",
counts.mc_start_file,
counts.mc_end_file,
counts.mc_define,
counts.mc_undef,
counts.mc_extension,
counts.mc_code_zero, counts.mc_unknown);
}
/* int type= maclist[count - 1].dmd_type; */
/* ASSERT: type is zero */
dwarf_dealloc(dbg, maclist, DW_DLA_STRING);
return;
}
| 3,211 |
5,964 | <filename>gen/blink/bindings/modules/v8/V8EntrySync.cpp
// Copyright 2014 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.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "config.h"
#include "V8EntrySync.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8HiddenValue.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/modules/v8/V8DOMFileSystemSync.h"
#include "bindings/modules/v8/V8DirectoryEntrySync.h"
#include "bindings/modules/v8/V8EntrySync.h"
#include "bindings/modules/v8/V8Metadata.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
namespace blink {
// Suppress warning: global constructors, because struct WrapperTypeInfo is trivial
// and does not depend on another global objects.
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif
const WrapperTypeInfo V8EntrySync::wrapperTypeInfo = { gin::kEmbedderBlink, V8EntrySync::domTemplate, V8EntrySync::refObject, V8EntrySync::derefObject, V8EntrySync::trace, 0, 0, V8EntrySync::preparePrototypeObject, V8EntrySync::installConditionallyEnabledProperties, "EntrySync", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::GarbageCollectedObject };
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
#pragma clang diagnostic pop
#endif
// This static member must be declared by DEFINE_WRAPPERTYPEINFO in EntrySync.h.
// For details, see the comment of DEFINE_WRAPPERTYPEINFO in
// bindings/core/v8/ScriptWrappable.h.
const WrapperTypeInfo& EntrySync::s_wrapperTypeInfo = V8EntrySync::wrapperTypeInfo;
namespace EntrySyncV8Internal {
static void isFileAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
EntrySync* impl = V8EntrySync::toImpl(holder);
v8SetReturnValueBool(info, impl->isFile());
}
static void isFileAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
EntrySyncV8Internal::isFileAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void isDirectoryAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
EntrySync* impl = V8EntrySync::toImpl(holder);
v8SetReturnValueBool(info, impl->isDirectory());
}
static void isDirectoryAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
EntrySyncV8Internal::isDirectoryAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void nameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
EntrySync* impl = V8EntrySync::toImpl(holder);
v8SetReturnValueString(info, impl->name(), info.GetIsolate());
}
static void nameAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
EntrySyncV8Internal::nameAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void fullPathAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
EntrySync* impl = V8EntrySync::toImpl(holder);
v8SetReturnValueString(info, impl->fullPath(), info.GetIsolate());
}
static void fullPathAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
EntrySyncV8Internal::fullPathAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void filesystemAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
EntrySync* impl = V8EntrySync::toImpl(holder);
RawPtr<DOMFileSystemSync> cppValue(impl->filesystem());
if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue.get()))
return;
v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate()));
if (!v8Value.IsEmpty()) {
V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "filesystem"), v8Value);
v8SetReturnValue(info, v8Value);
}
}
static void filesystemAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
EntrySyncV8Internal::filesystemAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void getMetadataMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getMetadata", "EntrySync", info.Holder(), info.GetIsolate());
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
RawPtr<Metadata> result = impl->getMetadata(exceptionState);
if (exceptionState.hadException()) {
exceptionState.throwIfNeeded();
return;
}
v8SetReturnValue(info, result.release());
}
static void getMetadataMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::getMetadataMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void moveToMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "moveTo", "EntrySync", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
setMinimumArityTypeError(exceptionState, 2, info.Length());
exceptionState.throwIfNeeded();
return;
}
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
DirectoryEntrySync* parent;
V8StringResource<TreatNullAndUndefinedAsNullString> name;
{
parent = V8DirectoryEntrySync::toImplWithTypeCheck(info.GetIsolate(), info[0]);
name = info[1];
if (!name.prepare())
return;
}
RawPtr<EntrySync> result = impl->moveTo(parent, name, exceptionState);
if (exceptionState.hadException()) {
exceptionState.throwIfNeeded();
return;
}
v8SetReturnValue(info, result.release());
}
static void moveToMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::moveToMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void copyToMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "copyTo", "EntrySync", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
setMinimumArityTypeError(exceptionState, 2, info.Length());
exceptionState.throwIfNeeded();
return;
}
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
DirectoryEntrySync* parent;
V8StringResource<TreatNullAndUndefinedAsNullString> name;
{
parent = V8DirectoryEntrySync::toImplWithTypeCheck(info.GetIsolate(), info[0]);
name = info[1];
if (!name.prepare())
return;
}
RawPtr<EntrySync> result = impl->copyTo(parent, name, exceptionState);
if (exceptionState.hadException()) {
exceptionState.throwIfNeeded();
return;
}
v8SetReturnValue(info, result.release());
}
static void copyToMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::copyToMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void toURLMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
v8SetReturnValueString(info, impl->toURL(), info.GetIsolate());
}
static void toURLMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::toURLMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void removeMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "remove", "EntrySync", info.Holder(), info.GetIsolate());
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
impl->remove(exceptionState);
if (exceptionState.hadException()) {
exceptionState.throwIfNeeded();
return;
}
}
static void removeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::removeMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
static void getParentMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
EntrySync* impl = V8EntrySync::toImpl(info.Holder());
v8SetReturnValue(info, impl->getParent());
}
static void getParentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
EntrySyncV8Internal::getParentMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
} // namespace EntrySyncV8Internal
static const V8DOMConfiguration::AccessorConfiguration V8EntrySyncAccessors[] = {
{"isFile", EntrySyncV8Internal::isFileAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
{"isDirectory", EntrySyncV8Internal::isDirectoryAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
{"name", EntrySyncV8Internal::nameAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
{"fullPath", EntrySyncV8Internal::fullPathAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
{"filesystem", EntrySyncV8Internal::filesystemAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
};
static const V8DOMConfiguration::MethodConfiguration V8EntrySyncMethods[] = {
{"getMetadata", EntrySyncV8Internal::getMetadataMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"moveTo", EntrySyncV8Internal::moveToMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
{"copyTo", EntrySyncV8Internal::copyToMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
{"toURL", EntrySyncV8Internal::toURLMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"remove", EntrySyncV8Internal::removeMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"getParent", EntrySyncV8Internal::getParentMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
};
static void installV8EntrySyncTemplate(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
{
functionTemplate->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "EntrySync", v8::Local<v8::FunctionTemplate>(), V8EntrySync::internalFieldCount,
0, 0,
V8EntrySyncAccessors, WTF_ARRAY_LENGTH(V8EntrySyncAccessors),
V8EntrySyncMethods, WTF_ARRAY_LENGTH(V8EntrySyncMethods));
v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate();
ALLOW_UNUSED_LOCAL(instanceTemplate);
v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate();
ALLOW_UNUSED_LOCAL(prototypeTemplate);
// Custom toString template
functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
}
v8::Local<v8::FunctionTemplate> V8EntrySync::domTemplate(v8::Isolate* isolate)
{
return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8EntrySyncTemplate);
}
bool V8EntrySync::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
}
v8::Local<v8::Object> V8EntrySync::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
{
return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
}
EntrySync* V8EntrySync::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
{
return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : 0;
}
void V8EntrySync::refObject(ScriptWrappable* scriptWrappable)
{
}
void V8EntrySync::derefObject(ScriptWrappable* scriptWrappable)
{
}
} // namespace blink
| 5,282 |
709 | #include "defselement.h"
using namespace lunasvg;
DefsElement::DefsElement()
: GraphicsElement(ElementId::Defs)
{
}
std::unique_ptr<Node> DefsElement::clone() const
{
return cloneElement<DefsElement>();
}
| 80 |
335 | <gh_stars>100-1000
{
"word": "Unseat",
"definitions": [
"Cause (someone) to fall from a horse or bicycle.",
"Remove (a government or person in authority) from power."
],
"parts-of-speech": "Verb"
} | 94 |
413 | {
"$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",
"id": "438e1c92-f33f-4952-aa36-add7530b6937",
"alias": "SocialPhotoStream",
"componentType": "WebPart",
"version": "1.0.0",
"manifestVersion": 2,
"preconfiguredEntries": [{
"groupId": "8be34b8b-4fe8-4adb-b4b6-cc88a51f8646",
"group": { "default": "Social Tools" },
"title": { "default": "Social Photo Stream" },
"description": { "default": "A web part to insert a list of photo from populars photos sharing plateforms as Instagram, Pinterest, Flickr, Deviantart, Dribbble, Picasa, Youtube & Newsfeed." },
"officeFabricIconFontName": "Photo2",
"properties": {
"network": "pinterest",
"userName": "microsoft",
"accessKey": "",
"limit": 20,
"overlay": true,
"dimension": {
"width": "100px",
"height": "100px"
},
"spacing": 5
}
}]
}
| 405 |
14,668 | <reponame>chromium/chromium<filename>ash/components/arc/session/arc_service_manager.h
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_COMPONENTS_ARC_SESSION_ARC_SERVICE_MANAGER_H_
#define ASH_COMPONENTS_ARC_SESSION_ARC_SERVICE_MANAGER_H_
#include <memory>
#include "base/threading/thread_checker.h"
#include "components/account_id/account_id.h"
namespace content {
class BrowserContext;
} // namespace content
namespace arc {
class ArcBridgeService;
// Holds ARC related global information. Specifically, it owns ArcBridgeService
// instance.
// TODO(hidehiko): Consider to migrate into another global ARC class, such as
// ArcSessionManager or ArcServiceLauncher.
class ArcServiceManager {
public:
ArcServiceManager();
ArcServiceManager(const ArcServiceManager&) = delete;
ArcServiceManager& operator=(const ArcServiceManager&) = delete;
~ArcServiceManager();
// Returns the current BrowserContext which ARC is allowed.
// This is workaround to split the dependency from chrome/.
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc.
content::BrowserContext* browser_context() { return browser_context_; }
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc. See browser_context() for details.
void set_browser_context(content::BrowserContext* browser_context) {
browser_context_ = browser_context;
}
// Returns the current AccountID which ARC is allowed.
// This is workaround to split the dependency from chrome/.
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc.
const AccountId& account_id() const { return account_id_; }
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc.
void set_account_id(const AccountId& account_id) { account_id_ = account_id; }
// |arc_bridge_service| can only be accessed on the thread that this
// class was created on.
ArcBridgeService* arc_bridge_service();
// Gets the global instance of the ARC Service Manager. This can only be
// called on the thread that this class was created on.
static ArcServiceManager* Get();
private:
THREAD_CHECKER(thread_checker_);
std::unique_ptr<ArcBridgeService> arc_bridge_service_;
// This holds the pointer to the BrowserContext (practically Profile)
// which is allowed to use ARC.
// This is set just before BrowserContextKeyedService classes are
// instantiated.
// So, in BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(),
// given BrowserContext pointer can be compared to this to check if it is
// allowed to use ARC.
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc. See browser_context() for details.
content::BrowserContext* browser_context_ = nullptr;
// This holds the AccountId corresponding to the |browser_context_|.
// TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to
// components/arc. See browser_context() for details.
AccountId account_id_;
};
} // namespace arc
#endif // ASH_COMPONENTS_ARC_SESSION_ARC_SERVICE_MANAGER_H_
| 948 |
302 | from .baseContext import BaseContext
class DummyContext(BaseContext):
pass
| 22 |
660 | package com.yan.refreshloadlayouttest.testactivity;
import android.content.Context;
import androidx.core.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.recyclerview.widget.RecyclerView;
import com.yan.refreshloadlayouttest.R;
import java.util.List;
/**
* Created by yan on 2017/8/10.
*/
public class SimpleAdapter extends RecyclerView.Adapter<SimpleViewHolder> {
/**
* Item 点击事件监听的回调
*/
public interface OnItemClickListener {
void onItemClick(View view, int position);
void onItemLongClick(View view, int position);
}
private OnItemClickListener mOnItemClickListener;
public void setOnItemClickLitener(OnItemClickListener mOnItemClickListener) {
this.mOnItemClickListener = mOnItemClickListener;
}
private Context context;
private List<SimpleItem> datas;
public SimpleAdapter(Context context, List<SimpleItem> datas) {
this.context = context.getApplicationContext();
this.datas = datas;
}
@Override
public SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
SimpleViewHolder holder = new SimpleViewHolder(LayoutInflater.from(context)
.inflate(R.layout.simple_item, parent, false));
return holder;
}
@Override
public void onBindViewHolder(final SimpleViewHolder holder, final int position) {
holder.tv.setText(datas.get(position).title);
holder.iv.setImageDrawable(ContextCompat.getDrawable(context, datas.get(position).resId));
if (mOnItemClickListener != null) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int pos = holder.getLayoutPosition();
mOnItemClickListener.onItemClick(holder.itemView, pos);
}
});
holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
int pos = holder.getLayoutPosition();
mOnItemClickListener.onItemLongClick(holder.itemView, pos);
Toast.makeText(v.getContext(), "setOnLongClickListener -- " + pos, Toast.LENGTH_LONG)
.show();
return false;
}
});
}
}
@Override
public int getItemCount() {
return datas.size();
}
}
| 857 |
852 |
import FWCore.ParameterSet.Config as cms
l1tStage2InputPatternWriter = cms.EDAnalyzer('L1TStage2InputPatternWriter',
towerToken = cms.InputTag("simCaloStage2Layer1Digis"),
filename = cms.untracked.string("pattern.txt"),
nChanPerQuad = cms.untracked.uint32(4),
nQuads = cms.untracked.uint32(18),
nHeaderFrames = cms.untracked.uint32(1),
nPayloadFrames = cms.untracked.uint32(40),
nClearFrames = cms.untracked.uint32(13)
)
| 210 |
679 | /**************************************************************
*
* 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 ifc.script;
import lib.MultiMethodTest;
import lib.StatusException;
import com.sun.star.io.XInputStream;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.script.XInvocation;
import com.sun.star.script.XInvocationAdapterFactory;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
/**
* Testing <code>com.sun.star.script.XInvocationAdapterFactory</code>
* interface methods :
* <ul>
* <li><code> createAdapter()</code></li>
* </ul> <p>
* Test is <b> NOT </b> multithread compilant. <p>
* @see com.sun.star.script.XInvocationAdapterFactory
*/
public class _XInvocationAdapterFactory extends MultiMethodTest {
/**
* oObj filled by MultiMethodTest
*/
public XInvocationAdapterFactory oObj = null;
/**
* First an invocation object of <code>com.sun.star.io.Pipe</code>
* instance is created using <code>com.sun.star.script.Invocation
* </code> service. Then trying to create an adapter of this
* invocation for <code>com.sun.star.io.XInputStream</code>
* interface. <p>
* Has <b>OK</b> status if the adapter returned is successfully
* queried for <code>com.sun.star.io.XInputStream</code>
* interface.
* @see com.sun.star.script.Invocation
* @see com.sun.star.script.XInvocation
* @see com.sun.star.io.Pipe
*/
public void _createAdapter() {
XInvocation xInv = null ;
XMultiServiceFactory xMSF = null;
try {
xMSF = (XMultiServiceFactory)tParam.getMSF();
Object[] args = {xMSF.createInstance
("com.sun.star.io.Pipe")};
Object oInvFac = xMSF.createInstance
("com.sun.star.script.Invocation") ;
XSingleServiceFactory xInvFac = (XSingleServiceFactory) UnoRuntime.
queryInterface(XSingleServiceFactory.class, oInvFac) ;
Object oInv = xInvFac.createInstanceWithArguments(args) ;
xInv = (XInvocation) UnoRuntime.queryInterface
(XInvocation.class, oInv) ;
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log) ;
throw new StatusException("Cann't create invocation for object", e) ;
}
XInterface xInStr = null ;
Object adp = oObj.createAdapter(xInv,
new Type(XInputStream.class)) ;
xInStr = (XInterface) UnoRuntime.queryInterface
(XInputStream.class, adp) ;
if (xInStr != null)
tRes.tested("createAdapter()", true) ;
else {
log.println("Adapter created doesn't implement required interface") ;
tRes.tested("createAdapter()", false) ;
}
}
}
| 1,356 |
9,782 | <filename>presto-main/src/main/java/com/facebook/presto/server/thrift/ThriftServerInfoClient.java
/*
* 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.facebook.presto.server.thrift;
import com.facebook.drift.annotations.ThriftMethod;
import com.facebook.drift.annotations.ThriftService;
import com.google.common.util.concurrent.ListenableFuture;
@ThriftService("ThriftServerInfoService")
public interface ThriftServerInfoClient
{
/**
* Use integers to represent the ordinal of the enum.
* Use NodeState::valueOf to recover the enum from an integer
*/
@ThriftMethod
ListenableFuture<Integer> getServerState();
}
| 339 |
11,356 | <reponame>shreyasvj25/turicreate
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// test_enable_shared_from_this.cpp
// (C) Copyright 2002 <NAME> - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// This demonstrates a problem with boost::serialization and boost::enable_shared_from_this.
// (boost version 1.53)
// See boost TRAC ticket #9567
//
// Given the following class structure:
// Base is a simple class
// Derived inherits from Base
// Derived also inherits from boost::enable_shared_from_this<Derived>
// Base and Derived implement boost::serialization
//
// When deserializing an instance of Derived into a vector of boost::shared_ptr<Derived>:
// Base and Derived members are reconstructed correctly.
// Derived::shared_from_this() works as expected.
//
// But when deserializing an instance of Derived into a vector of boost::shared_ptr<Base>:
// Base and Derived members are still reconstructed correctly.
// Derived::shared_from_this() throws a bad_weak_ptr exception.
// This is because enable_shared_from_this::weak_ptr is NOT reconstructed - It is zero.
#include <sstream>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/split_free.hpp>
#include "test_tools.hpp"
#include <set>
namespace boost {
namespace serialization {
struct enable_shared_from_this_helper {
std::set<shared_ptr<void> > m_esfth;
void record(boost::shared_ptr<void> sp){
m_esfth.insert(sp);
}
};
template<class Archive, class T>
void serialize(
Archive & ar,
boost::enable_shared_from_this<T> & t,
const unsigned int file_version
){
enable_shared_from_this_helper & h =
ar.template get_helper<
enable_shared_from_this_helper
>();
shared_ptr<T> sp = t.shared_from_this();
h.record(sp);
}
} // serialization
} // boost
class Base {
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & BOOST_SERIALIZATION_NVP(m_base);
}
protected:
Base() {}
virtual ~Base() {} // "virtual" forces RTTI, to enable serialization of Derived from Base pointer
public:
int m_base;
};
class Derived : public Base, public boost::enable_shared_from_this<Derived> {
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
boost::enable_shared_from_this<Derived>
);
ar & BOOST_SERIALIZATION_NVP(m_derived);
}
public:
boost::shared_ptr<Derived> SharedPtr() { return shared_from_this(); }
int m_derived;
Derived() {}
~Derived() {}
};
// The following is required to enable serialization from Base pointer
BOOST_CLASS_EXPORT(Derived)
// This test passes
void test_passes(){
std::stringstream ss;
{
boost::shared_ptr<Derived> d(new Derived());
d->m_base = 1;
d->m_derived = 2;
// Get a raw pointer to Derived
Derived* raw_d = d.get();
// Verify base and derived members
BOOST_CHECK(raw_d->m_base==1);
BOOST_CHECK(raw_d->m_derived==2);
// verify shared_from_this
BOOST_CHECK(d == raw_d->SharedPtr());
boost::archive::text_oarchive oa(ss);
oa & BOOST_SERIALIZATION_NVP(d);
}
{
// Deserialize it back into a vector of shared_ptr<Derived>
boost::shared_ptr<Derived> d;
ss.seekg(0);
boost::archive::text_iarchive ia(ss);
ia & BOOST_SERIALIZATION_NVP(d);
// Get a raw pointer to Derived
Derived* raw_d = d.get();
// Verify base and derived members
BOOST_CHECK(raw_d->m_base==1);
BOOST_CHECK(raw_d->m_derived==2);
// verify shared_from_this
BOOST_CHECK(d == raw_d->SharedPtr());
}
}
// This test fails
void test_fails(){
std::stringstream ss;
{
boost::shared_ptr<Base> b(new Derived());
Derived* raw_d1 = static_cast<Derived*>(b.get());
raw_d1->m_base = 1;
raw_d1->m_derived = 2;
// Get a raw pointer to Derived via shared_ptr<Base>
Derived* raw_d = static_cast<Derived*>(b.get());
// Verify base and derived members
BOOST_CHECK(raw_d->m_base==1);
BOOST_CHECK(raw_d->m_derived==2);
// verify shared_from_this
boost::shared_ptr<Derived> d = raw_d->SharedPtr();
BOOST_CHECK(d == b);
// Serialize the vector
boost::archive::text_oarchive oa(ss);
oa & BOOST_SERIALIZATION_NVP(b);
}
{
// Deserialize it back into a vector of shared_ptr<Base>
ss.seekg(0);
boost::archive::text_iarchive ia(ss);
boost::shared_ptr<Base> b;
ia & BOOST_SERIALIZATION_NVP(b);
// Get a raw pointer to Derived via shared_ptr<Base>
Derived* raw_d = static_cast<Derived*>(b.get());
// Verify base and derived members
BOOST_CHECK(raw_d->m_base==1);
BOOST_CHECK(raw_d->m_derived==2);
// verify shared_from_this
// FAIL: The following line throws bad_weak_ptr exception
boost::shared_ptr<Derived> d = raw_d->SharedPtr();
BOOST_CHECK(d == b);
}
}
int test_main(int /*argc*/, char * /*argv */[]){
test_fails();
test_passes();
return EXIT_SUCCESS;
}
// EOF
| 2,079 |
1,511 | /*
* Header file for iptables xt_AUDIT target
*
* (C) 2010-2011 <NAME> <<EMAIL>>
* (C) 2010-2011 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify | 64 |
1,006 | <reponame>eenurkka/incubator-nuttx
/****************************************************************************
* boards/z80/z8/z8f64200100kit/include/board.h
*
* 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.
*
****************************************************************************/
#ifndef __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H
#define __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H
/****************************************************************************
* Included Files
****************************************************************************/
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* LED pattern definitions */
#define LED_STARTED 0
#define LED_HEAPALLOCATE 1
#define LED_IRQSENABLED 2
#define LED_STACKCREATED 3
#define LED_IDLE 4
#define LED_INIRQ 5
#define LED_ASSERTION 6
#define LED_SIGNAL 6
#define LED_PANIC 7
/****************************************************************************
* Public Functions Definitions
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __BOARDS_Z80_Z8_Z8F64200100KIT_INCLUDE_BOARD_H */
| 688 |
5,196 | <reponame>laotie/cartographer
/*
* Copyright 2018 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "cartographer/io/internal/in_memory_proto_stream.h"
#include "glog/logging.h"
namespace cartographer {
namespace io {
void ForwardingProtoStreamWriter::WriteProto(
const google::protobuf::Message& proto) {
CHECK(writer_callback_(&proto));
}
bool ForwardingProtoStreamWriter::Close() { return writer_callback_(nullptr); }
bool InMemoryProtoStreamReader::ReadProto(google::protobuf::Message* proto) {
if (eof()) return false;
proto->CopyFrom(*state_chunks_.front());
state_chunks_.pop();
return true;
}
} // namespace io
} // namespace cartographer
| 361 |
348 | {"nom":"Aunay-les-Bois","circ":"1ère circonscription","dpt":"Orne","inscrits":121,"abs":64,"votants":57,"blancs":4,"nuls":1,"exp":52,"res":[{"nuance":"DVD","nom":"<NAME>","voix":27},{"nuance":"SOC","nom":"M. <NAME>","voix":25}]} | 95 |
363 | # -*- coding: utf-8 -*-
"""
:codeauthor: <NAME> <<EMAIL>>
"""
import hubblestack.loader
import hubblestack.matchers.compound_match as compound_match
import hubblestack.matchers.grain_match as grain_match
import hubblestack.matchers.list_match as list_match
import hubblestack.matchers.pcre_match as pcre_match
import hubblestack.modules.match as match
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase
MATCHERS_DICT = {
"compound_match.match": compound_match.match,
"list_match.match": list_match.match,
"pcre_match.match": pcre_match.match,
"grain_match.match": grain_match.match
}
# the name of the minion to be used for tests
MINION_ID = "bar03"
@patch("hubblestack.loader.matchers", MagicMock(return_value=MATCHERS_DICT))
class MatchTestCase(TestCase, LoaderModuleMockMixin):
"""
This class contains a set of functions that test hubblestack.modules.match.
"""
def setup_loader_modules(self):
return {
match: {"__opts__": {"extension_modules": "", "id": MINION_ID}},
compound_match: {"__opts__": {"id": MINION_ID}},
list_match: {"__opts__": {"id": MINION_ID}},
grain_match: {"__opts__": {"id": MINION_ID}}
}
def test_compound_with_minion_id(self):
"""
Make sure that when a minion_id IS past, that it is contained in opts
"""
mock_compound_match = MagicMock()
target = "bar04"
new_minion_id = "new_minion_id"
with patch.object(
hubblestack.loader,
"matchers",
return_value={"compound_match.match": mock_compound_match},
) as matchers:
match.compound(target, minion_id=new_minion_id)
# The matcher should get called with MINION_ID
matchers.assert_called_once()
matchers_opts = matchers.call_args[0][0]
self.assertEqual(matchers_opts.get("id"), new_minion_id)
# The compound matcher should not get MINION_ID, no opts should be passed
mock_compound_match.assert_called_once_with(target)
def test_compound(self):
"""
Test issue #55149
"""
mock_compound_match = MagicMock()
target = "bar04"
with patch.object(
hubblestack.loader,
"matchers",
return_value={"compound_match.match": mock_compound_match},
) as matchers:
match.compound(target)
# The matcher should get called with MINION_ID
matchers.assert_called_once()
self.assertEqual(len(matchers.call_args[0]), 1)
self.assertEqual(matchers.call_args[0][0].get("id"), MINION_ID)
# The compound matcher should not get MINION_ID, no opts should be passed
mock_compound_match.assert_called_once_with(target)
def test_watch_for_opts_mismatch_list_match(self):
"""
Tests for situations where the list matcher might reference __opts__ directly
instead of the local opts variable
When metaproxies/proxy minions are in use, matchers get called with a different `opts`
dictionary. Inside the matchers we check to see if `opts` was passed
and use it instead of `__opts__`. If sometime in the future we update the matchers
and use `__opts__` directly this breaks proxy matching.
"""
self.assertTrue(list_match.match("bar03"))
self.assertTrue(list_match.match("rest03", {"id": "rest03"}))
self.assertFalse(list_match.match("rest03"))
def test_watch_for_opts_mismatch_compound_match(self):
"""
Tests for situations where the compound matcher might reference __opts__ directly
instead of the local opts variable
When metaproxies/proxy minions are in use, matchers get called with a different `opts`
dictionary. Inside the matchers we check to see if `opts` was passed
and use it instead of `__opts__`. If sometime in the future we update the matchers
and use `__opts__` directly this breaks proxy matching.
"""
self.assertTrue(compound_match.match("L@bar03"))
self.assertTrue(compound_match.match("L@rest03", {"id": "rest03"}))
self.assertFalse(compound_match.match("L@rest03"))
self.assertFalse(compound_match.match("G@bar03"))
| 1,849 |
988 | /*
* Copyright 2018-2020 Redis Labs Ltd. and Contributors
*
* This file is available under the Redis Labs Source Available License Agreement
*/
#pragma once
#include "../graph/graphcontext.h"
#include "../graph/entities/qg_node.h"
#include "../graph/entities/qg_edge.h"
#include "../arithmetic/arithmetic_expression.h"
#include "ast.h"
struct AR_ExpNode;
/* Updates to this enum require parallel updates to the
* OpName array in arithmetic_expression_construct.c */
typedef enum {
OP_UNKNOWN = 0,
OP_NULL = 1,
OP_OR = 2,
OP_XOR = 3,
OP_AND = 4,
OP_NOT = 5,
OP_EQUAL = 6,
OP_NEQUAL = 7,
OP_LT = 8,
OP_GT = 9,
OP_LE = 10,
OP_GE = 11,
OP_PLUS = 12,
OP_MINUS = 13,
OP_MULT = 14,
OP_DIV = 15,
OP_MOD = 16,
OP_POW = 17,
OP_CONTAINS = 18,
OP_STARTSWITH = 19,
OP_ENDSWITH = 20,
OP_IN = 21,
OP_IS_NULL = 22,
OP_IS_NOT_NULL = 23,
OP_XNOR = 24
} AST_Operator;
typedef struct {
Attribute_ID *keys;
struct AR_ExpNode **values;
int property_count;
} PropertyMap;
// Enum describing how a SET directive should treat pre-existing properties
typedef enum {
UPDATE_UNSET = 0, // default, should not be encountered
UPDATE_MERGE = 1, // merge new properties into existing property map
UPDATE_REPLACE = 2, // replace existing property map with new properties
} UPDATE_MODE;
// Key-value pair of an attribute ID and the value to be associated with it
// TODO Consider replacing contents of PropertyMap (for ops like Create) with this
typedef struct {
Attribute_ID id;
struct AR_ExpNode *exp;
} PropertySetCtx;
// Context describing an update expression.
typedef struct {
PropertySetCtx *properties; // properties to set
int record_idx; // record offset this entity is stored at
UPDATE_MODE mode; // Whether the entity's property map should be updated or replaced
const char *alias; // Access-safe alias of the entity being updated
} EntityUpdateEvalCtx;
// Context describing a node in a CREATE or MERGE clause
typedef struct {
int src_idx; // source node record index
int dest_idx; // destination node record index
int edge_idx; // edge record index
int reltypeId; // edge relationship type id
const char *src; // source node alias
const char *dest; // destination node alias
const char *alias; // edge alias
const char *relation; // edge relationship type
PropertyMap *properties; // edge properties set
} EdgeCreateCtx;
// Context describing a relationship in a CREATE or MERGE clause
typedef struct {
int node_idx; // node record index
int *labelsId; // array of node labels id
const char *alias; // node alias
const char **labels; // node labels
PropertyMap *properties; // node properties set
} NodeCreateCtx;
AST_Operator AST_ConvertOperatorNode(const cypher_operator_t *op);
// Convert a map of properties from the AST into a set of attribute ID keys and AR_ExpNode values.
PropertyMap *PropertyMap_New(GraphContext *gc, const cypher_astnode_t *props);
// Clone NodeCreateCtx.
NodeCreateCtx NodeCreateCtx_Clone(NodeCreateCtx ctx);
// Free NodeCreateCtx.
void NodeCreateCtx_Free(NodeCreateCtx ctx);
// Clone EdgeCreateCtx.
EdgeCreateCtx EdgeCreateCtx_Clone(EdgeCreateCtx ctx);
void PropertyMap_Free(PropertyMap *map);
EntityUpdateEvalCtx *UpdateCtx_New(UPDATE_MODE mode, uint prop_count, const char *alias);
EntityUpdateEvalCtx *UpdateCtx_Clone(const EntityUpdateEvalCtx *ctx);
void UpdateCtx_SetMode(EntityUpdateEvalCtx *ctx, UPDATE_MODE mode);
void UpdateCtx_Clear(EntityUpdateEvalCtx *ctx);
void UpdateCtx_Free(EntityUpdateEvalCtx *ctx);
| 1,341 |
360 | <reponame>wotchin/openGauss-server
/* Processed by ecpg (regression mode) */
/* These include files are added by the preprocessor */
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
#define ECPGdebug(X, Y) ECPGdebug((X) + 100, (Y))
#line 1 "dyntest.pgc"
/* dynamic SQL test program
*/
#include <stdio.h>
#include <stdlib.h>
#line 1 "sql3types.h"
#ifndef _ECPG_SQL3TYPES_H
#define _ECPG_SQL3TYPES_H
/* SQL3 dynamic type codes */
/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
enum {
SQL3_CHARACTER = 1,
SQL3_NUMERIC,
SQL3_DECIMAL,
SQL3_INTEGER,
SQL3_SMALLINT,
SQL3_FLOAT,
SQL3_REAL,
SQL3_DOUBLE_PRECISION,
SQL3_DATE_TIME_TIMESTAMP,
SQL3_INTERVAL, /* 10 */
SQL3_CHARACTER_VARYING = 12,
SQL3_ENUMERATED,
SQL3_BIT,
SQL3_BIT_VARYING,
SQL3_BOOLEAN,
SQL3_abstract
/* the rest is xLOB stuff */
};
/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */
enum {
SQL3_DDT_DATE = 1,
SQL3_DDT_TIME,
SQL3_DDT_TIMESTAMP,
SQL3_DDT_TIME_WITH_TIME_ZONE,
SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE,
SQL3_DDT_ILLEGAL /* not a datetime data type (not part of
* standard) */
};
#endif /* !_ECPG_SQL3TYPES_H */
#line 7 "dyntest.pgc"
#line 1 "sqlca.h"
#ifndef POSTGRES_SQLCA_H
#define POSTGRES_SQLCA_H
#ifndef PGDLLIMPORT
#if defined(WIN32) || defined(__CYGWIN__)
#define PGDLLIMPORT __declspec(dllimport)
#else
#define PGDLLIMPORT
#endif /* __CYGWIN__ */
#endif /* PGDLLIMPORT */
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C" {
#endif
struct sqlca_t {
char sqlcaid[8];
long sqlabc;
long sqlcode;
struct {
int sqlerrml;
char sqlerrmc[SQLERRMC_LEN];
} sqlerrm;
char sqlerrp[8];
long sqlerrd[6];
/* Element 0: empty */
/* 1: OID of processed tuple if applicable */
/* 2: number of rows processed */
/* after an INSERT, UPDATE or */
/* DELETE statement */
/* 3: empty */
/* 4: empty */
/* 5: empty */
char sqlwarn[8];
/* Element 0: set to 'W' if at least one other is 'W' */
/* 1: if 'W' at least one character string */
/* value was truncated when it was */
/* stored into a host variable. */
/*
* 2: if 'W' a (hopefully) non-fatal notice occurred
*/ /* 3: empty */
/* 4: empty */
/* 5: empty */
/* 6: empty */
/* 7: empty */
char sqlstate[5];
};
struct sqlca_t* ECPGget_sqlca(void);
#ifndef POSTGRES_ECPG_INTERNAL
#define sqlca (*ECPGget_sqlca())
#endif
#ifdef __cplusplus
}
#endif
#endif
#line 8 "dyntest.pgc"
#line 1 "regression.h"
#line 9 "dyntest.pgc"
static void error(void)
{
printf("\n#%ld:%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
exit(1);
}
int main()
{
/* exec sql begin declare section */
#line 22 "dyntest.pgc"
int COUNT;
#line 23 "dyntest.pgc"
int INTVAR;
#line 24 "dyntest.pgc"
int INDEX;
#line 25 "dyntest.pgc"
int INDICATOR;
#line 26 "dyntest.pgc"
int TYPE, LENGTH, OCTET_LENGTH, PRECISION, SCALE, RETURNED_OCTET_LENGTH;
#line 27 "dyntest.pgc"
int DATETIME_INTERVAL_CODE;
#line 28 "dyntest.pgc"
char NAME[120], BOOLVAR;
#line 29 "dyntest.pgc"
char STRINGVAR[1024];
#line 30 "dyntest.pgc"
double DOUBLEVAR;
#line 31 "dyntest.pgc"
char* QUERY = NULL;
/* exec sql end declare section */
#line 32 "dyntest.pgc"
int done = 0;
/* exec sql var BOOLVAR is bool */
#line 35 "dyntest.pgc"
ECPGdebug(1, stderr);
QUERY = "select * from dyntest";
/* exec sql whenever sqlerror do error ( ) ; */
#line 43 "dyntest.pgc"
ECPGallocate_desc(__LINE__, "MYDESC");
#line 45 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
#line 45 "dyntest.pgc"
{
ECPGconnect(__LINE__, 0, "regress1", NULL, NULL, NULL, 0);
#line 47 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 47 "dyntest.pgc"
{
ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to german", ECPGt_EOIT, ECPGt_EORT);
#line 49 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 49 "dyntest.pgc"
{
ECPGdo(__LINE__,
0,
1,
NULL,
0,
ECPGst_normal,
"create table dyntest ( name char ( 14 ) , d float8 , i int , bignumber int8 , b boolean , comment text , "
"day date )",
ECPGt_EOIT,
ECPGt_EORT);
#line 53 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 53 "dyntest.pgc"
{
ECPGdo(__LINE__,
0,
1,
NULL,
0,
ECPGst_normal,
"insert into dyntest values ( 'first entry' , 14.7 , 14 , 123045607890 , true , 'The world''s most "
"advanced open source database.' , '1987-07-14' )",
ECPGt_EOIT,
ECPGt_EORT);
#line 54 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 54 "dyntest.pgc"
{
ECPGdo(__LINE__,
0,
1,
NULL,
0,
ECPGst_normal,
"insert into dyntest values ( 'second entry' , 1407.87 , 1407 , 987065403210 , false , 'The elephant never "
"forgets.' , '1999-11-5' )",
ECPGt_EOIT,
ECPGt_EORT);
#line 55 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 55 "dyntest.pgc"
{
ECPGprepare(__LINE__, NULL, 0, "myquery", QUERY);
#line 57 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 57 "dyntest.pgc"
/* declare MYCURS cursor for $1 */
#line 58 "dyntest.pgc"
{
ECPGdo(__LINE__,
0,
1,
NULL,
0,
ECPGst_normal,
"declare MYCURS cursor for $1",
ECPGt_char_variable,
(ECPGprepared_statement(NULL, "myquery", __LINE__)),
(long)1,
(long)1,
(1) * sizeof(char),
ECPGt_NO_INDICATOR,
NULL,
0L,
0L,
0L,
ECPGt_EOIT,
ECPGt_EORT);
#line 60 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 60 "dyntest.pgc"
while (1) {
{
ECPGdo(__LINE__,
0,
1,
NULL,
0,
ECPGst_normal,
"fetch in MYCURS",
ECPGt_EOIT,
ECPGt_descriptor,
"MYDESC",
0L,
0L,
0L,
ECPGt_NO_INDICATOR,
NULL,
0L,
0L,
0L,
ECPGt_EORT);
#line 64 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 64 "dyntest.pgc"
if (sqlca.sqlcode)
break;
{
ECPGget_desc_header(__LINE__, "MYDESC", &(COUNT));
#line 69 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 69 "dyntest.pgc"
if (!done) {
printf("Found %d columns\n", COUNT);
done = 1;
}
for (INDEX = 1; INDEX <= COUNT; ++INDEX) {
{
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_indicator,
ECPGt_int,
&(INDICATOR),
(long)1,
(long)1,
sizeof(int),
ECPGd_name,
ECPGt_char,
(NAME),
(long)120,
(long)1,
(120) * sizeof(char),
ECPGd_scale,
ECPGt_int,
&(SCALE),
(long)1,
(long)1,
sizeof(int),
ECPGd_precision,
ECPGt_int,
&(PRECISION),
(long)1,
(long)1,
sizeof(int),
ECPGd_ret_octet,
ECPGt_int,
&(RETURNED_OCTET_LENGTH),
(long)1,
(long)1,
sizeof(int),
ECPGd_octet,
ECPGt_int,
&(OCTET_LENGTH),
(long)1,
(long)1,
sizeof(int),
ECPGd_length,
ECPGt_int,
&(LENGTH),
(long)1,
(long)1,
sizeof(int),
ECPGd_type,
ECPGt_int,
&(TYPE),
(long)1,
(long)1,
sizeof(int),
ECPGd_EODT);
#line 86 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 86 "dyntest.pgc"
printf(
"%2d\t%s (type: %d length: %d precision: %d scale: %d = ", INDEX, NAME, TYPE, LENGTH, PRECISION, SCALE);
switch (TYPE) {
case SQL3_BOOLEAN:
printf("bool");
break;
case SQL3_NUMERIC:
printf("numeric(%d,%d)", PRECISION, SCALE);
break;
case SQL3_DECIMAL:
printf("decimal(%d,%d)", PRECISION, SCALE);
break;
case SQL3_INTEGER:
printf("integer");
break;
case SQL3_SMALLINT:
printf("smallint");
break;
case SQL3_FLOAT:
printf("float(%d,%d)", PRECISION, SCALE);
break;
case SQL3_REAL:
printf("real");
break;
case SQL3_DOUBLE_PRECISION:
printf("double precision");
break;
case SQL3_DATE_TIME_TIMESTAMP: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_di_code,
ECPGt_int,
&(DATETIME_INTERVAL_CODE),
(long)1,
(long)1,
sizeof(int),
ECPGd_EODT);
#line 116 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 116 "dyntest.pgc"
switch (DATETIME_INTERVAL_CODE) {
case SQL3_DDT_DATE:
printf("date");
break;
case SQL3_DDT_TIME:
printf("time");
break;
case SQL3_DDT_TIMESTAMP:
printf("timestamp");
break;
case SQL3_DDT_TIME_WITH_TIME_ZONE:
printf("time with time zone");
break;
case SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE:
printf("timestamp with time zone");
break;
}
break;
case SQL3_INTERVAL:
printf("interval");
break;
case SQL3_CHARACTER:
if (LENGTH > 0)
printf("char(%d)", LENGTH);
else
printf("text");
break;
case SQL3_CHARACTER_VARYING:
if (LENGTH > 0)
printf("varchar(%d)", LENGTH);
else
printf("varchar()");
break;
default:
printf("<SQL3 %d>", TYPE);
break;
}
printf(")\n\toctet_length: %d returned_octet_length: %d)\n\t= ", OCTET_LENGTH, RETURNED_OCTET_LENGTH);
if (INDICATOR == -1)
printf("NULL\n");
else
switch (TYPE) {
case SQL3_BOOLEAN: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_bool,
&(BOOLVAR),
(long)1,
(long)1,
sizeof(bool),
ECPGd_EODT);
#line 163 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 163 "dyntest.pgc"
printf("%s\n", BOOLVAR ? "true" : "false");
break;
case SQL3_INTEGER:
case SQL3_SMALLINT: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_int,
&(INTVAR),
(long)1,
(long)1,
sizeof(int),
ECPGd_EODT);
#line 168 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 168 "dyntest.pgc"
printf("%d\n", INTVAR);
break;
case SQL3_DOUBLE_PRECISION: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_double,
&(DOUBLEVAR),
(long)1,
(long)1,
sizeof(double),
ECPGd_EODT);
#line 172 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 172 "dyntest.pgc"
printf("%.*f\n", PRECISION, DOUBLEVAR);
break;
case SQL3_DATE_TIME_TIMESTAMP: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_char,
(STRINGVAR),
(long)1024,
(long)1,
(1024) * sizeof(char),
ECPGd_di_code,
ECPGt_int,
&(DATETIME_INTERVAL_CODE),
(long)1,
(long)1,
sizeof(int),
ECPGd_EODT);
#line 178 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 178 "dyntest.pgc"
printf("%d \"%s\"\n", DATETIME_INTERVAL_CODE, STRINGVAR);
break;
case SQL3_CHARACTER:
case SQL3_CHARACTER_VARYING: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_char,
(STRINGVAR),
(long)1024,
(long)1,
(1024) * sizeof(char),
ECPGd_EODT);
#line 183 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 183 "dyntest.pgc"
printf("\"%s\"\n", STRINGVAR);
break;
default: {
ECPGget_desc(__LINE__,
"MYDESC",
INDEX,
ECPGd_data,
ECPGt_char,
(STRINGVAR),
(long)1024,
(long)1,
(1024) * sizeof(char),
ECPGd_EODT);
#line 187 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 187 "dyntest.pgc"
printf("<\"%s\">\n", STRINGVAR);
break;
}
}
}
{
ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close MYCURS", ECPGt_EOIT, ECPGt_EORT);
#line 194 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
}
#line 194 "dyntest.pgc"
ECPGdeallocate_desc(__LINE__, "MYDESC");
#line 196 "dyntest.pgc"
if (sqlca.sqlcode < 0)
error();
#line 196 "dyntest.pgc"
return 0;
}
| 11,577 |
14,668 | <filename>ash/fast_ink/laser/laser_segment_utils.h
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_FAST_INK_LASER_LASER_SEGMENT_UTILS_H_
#define ASH_FAST_INK_LASER_LASER_SEGMENT_UTILS_H_
#include "ash/ash_export.h"
namespace gfx {
class PointF;
class Vector2dF;
} // namespace gfx
namespace ash {
// Compute the angle in radians of |point|, with |origin| as the origin and
// |direction| as the x-axis. In other words, computes the angle in radians
// between |direction| and |point| - |origin|.
float ASH_EXPORT AngleOfPointInNewCoordinates(const gfx::PointF& origin,
const gfx::Vector2dF& direction,
const gfx::PointF& point);
// Compute the variables for the equation of the lines normal to the line
// segment formed by |start_point| and |end_point|, and which run through the
// endpoints of that line segment. The outputs will be returned as NaN if the
// line segment is parallel to the x-axis (undefined normal lines).
void ASH_EXPORT ComputeNormalLineVariables(const gfx::PointF& start_point,
const gfx::PointF& end_point,
float* normal_slope,
float* start_y_intercept,
float* end_y_intercept);
// Compute the two the projections of |point| along the line defined by
// |line_slope| and |line_y_intercept|. The distance of each projection is
// |projection_distance| from |point|.
void ASH_EXPORT ComputeProjectedPoints(const gfx::PointF& point,
float line_slope,
float line_y_intercept,
float projection_distance,
gfx::PointF* first_projection,
gfx::PointF* second_projection);
// Checks if the angle of |first_point| is smaller than the angle of
// |second_point|. These angles are computed relative to the coordinate system
// defined by the midpoint of |start_point| and |end_point|, with the x-axis
// as |end_point| - |start_point|.
bool ASH_EXPORT IsFirstPointSmallerAngle(const gfx::PointF& start_point,
const gfx::PointF& end_point,
const gfx::PointF& first_point,
const gfx::PointF& second_point);
} // namespace ash
#endif // ASH_FAST_INK_LASER_LASER_SEGMENT_UTILS_H_
| 1,281 |
933 | <filename>package.json
{
"name": "raft",
"version": "0.2.0",
"repo": "willemt/raft",
"description": "C implementation of the Raft Consensus protocol, BSD licensed",
"keywords": ["raft", "consensus", "protocol"],
"src": [
"include/raft.h",
"include/raft_log.h",
"include/raft_private.h",
"src/raft_log.c",
"src/raft_node.c",
"src/raft_server.c",
"src/raft_server_properties.c"
]
}
| 181 |
355 | /*
* JBoss, Home of Professional Open Source
* Copyright 2009-10 Red Hat and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 software 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 software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*
* @authors <NAME>
*/
package org.jboss.byteman.agent.adapter.cfg;
import org.jboss.byteman.agent.adapter.OpcodesHelper;
/**
* Class used to hold a sequence of instructions within a basic block
*/
public class InstructionSequence
{
/**
* since instructions are encoded with their operands we need an offsets array to identify
* where each instruction strats, allowing instructions and their operand to be searched
* forwards and backwards
*/
private int[] instructionOffsets;
/**
* the number of valid offsets to instructions in array instructionOffsets
*/
private int numInstructions;
/**
* data array storing instructions and their operands encoded as ints.
*
* integer operands are embedded as is
* operands which are strings (type, const, field etc) must be translated via the names array in
* the associated cfg.
* operands which are jump labels must be translated by calling getNthOut() on the associated
* basic block.
*/
private int[] encodedInstructions;
/**
* the number of valid entries in array encodedInstructions
*/
private int numEncoded;
/**
* expand the offsets array if necessary to allow room for 1 more instructions with count more arguments
*/
private void ensureSpace(int count)
{
int length = instructionOffsets.length;
if (numInstructions == length) {
int[] newOffsets = new int[length * 2];
for (int i = 0; i < numInstructions; i++) {
newOffsets[i] = instructionOffsets[i];
}
instructionOffsets = newOffsets;
}
// we need room for the instruction and count args
length = encodedInstructions.length;
if (numEncoded + count + 1 >= length) {
int[] newEncoded = new int[length * 2];
for (int i = 0; i < numEncoded; i++) {
newEncoded[i] = encodedInstructions[i];
}
encodedInstructions = newEncoded;
}
}
public InstructionSequence()
{
instructionOffsets = new int[3];
encodedInstructions = new int[6];
}
/**
* return the number of instructions in the sequence
*
* @return the the number of instructions in the sequence
*/
public int size()
{
return numInstructions;
}
/**
* return the instruction at the supplied offset
*
* @param i the offset
* @return the ith instruction in the sequuence
*/
public int get(int i)
{
int offset = instructionOffsets[i];
return encodedInstructions[offset];
}
/**
* return the type of a given instruction
*
* @param i the instruction index
* @return the ith instruction in the sequuence
*/
public int getType(int i)
{
int offset = instructionOffsets[i];
int insn = encodedInstructions[offset];
return OpcodesHelper.insnType(insn);
}
/**
* return the number of encoded arguments of a given instruction
* @param i the offset of the instruction
*
* @return the number of encoded arguments of the ith instruction in the sequuence
*/
public int getArgCount(int i)
{
int offset = instructionOffsets[i];
int nextOffset;
if (offset == numInstructions - 1) {
nextOffset = numEncoded;
} else {
nextOffset = instructionOffsets[i + 1];
}
return (nextOffset - (offset + 1));
}
/**
* return a specific encoded argument of a given instruction
* @param i the offset of the instruction
* @param j the index of the arguument attached to the instruction
*
* @return the jth encoded argument of the ith instruction in the sequuence
*/
public int getArg(int i, int j)
{
int offset = instructionOffsets[i];
return encodedInstructions[offset + j + 1];
}
/**
* add an instruction to the sequence
* @param insn the instruction
* @return the index of the newly added instruction
*/
public int add(int insn)
{
int result = numInstructions;
ensureSpace(0);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
return result;
}
/**
* add an instruction with one encoded argument to the sequence
* @param insn the instruction
* @param arg1 the argument index
* @return the index of the newly added instruction
*/
public int add(int insn, int arg1)
{
int result = numInstructions;
ensureSpace(1);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
encodedInstructions[numEncoded++] = arg1;
return result;
}
/**
* add an instruction with two encoded arguments to the sequence
* @param insn the instruction
* @param arg1 the first argument index
* @param arg2 the second argument index
* @return the index of the newly added instruction
*/
public int add(int insn, int arg1, int arg2)
{
int result = numInstructions;
ensureSpace(2);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
encodedInstructions[numEncoded++] = arg1;
encodedInstructions[numEncoded++] = arg2;
return result;
}
/**
* add an instruction with three encoded arguments to the sequence
* @param insn the instruction
* @param arg1 the first argument index
* @param arg2 the second argument index
* @param arg3 the third argument index
* @return the index of the newly added instruction
*/
public int add(int insn, int arg1, int arg2, int arg3)
{
int result = numInstructions;
ensureSpace(3);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
encodedInstructions[numEncoded++] = arg1;
encodedInstructions[numEncoded++] = arg2;
encodedInstructions[numEncoded++] = arg3;
return result;
}
/**
* add an instruction with four encoded arguments to the sequence
* @param insn the instruction
* @param arg1 the first argument index
* @param arg2 the second argument index
* @param arg3 the third argument index
* @param arg4 the third argument index
* @return the index of the newly added instruction
*/
public int add(int insn, int arg1, int arg2, int arg3, int arg4)
{
int result = numInstructions;
ensureSpace(4);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
encodedInstructions[numEncoded++] = arg1;
encodedInstructions[numEncoded++] = arg2;
encodedInstructions[numEncoded++] = arg3;
encodedInstructions[numEncoded++] = arg4;
return result;
}
/**
* add an instruction with an arbitrary number of encoded arguments to the sequence
* @param insn the instruction
* @param args the arguments
* @return the index of the newly added instruction
*/
public int add(int insn, int[] args)
{
int result = numInstructions;
ensureSpace(args.length);
instructionOffsets[numInstructions++] = numEncoded;
encodedInstructions[numEncoded++] = insn;
for (int i = 0; i < args.length; i++) {
encodedInstructions[numEncoded++] = args[i];
}
return result;
}
}
| 3,168 |
1,253 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the sttribute container store interface."""
import unittest
from plaso.containers import events
from plaso.storage import interface
from tests.storage import test_lib
class BaseStoreTest(test_lib.StorageTestCase):
"""Tests for the attribute container store interface."""
# pylint: disable=protected-access
def testGetAttributeContainerNextSequenceNumber(self):
"""Tests the _GetAttributeContainerNextSequenceNumber function."""
event_data_stream = events.EventDataStream()
test_store = interface.BaseStore()
sequence_number = test_store._GetAttributeContainerNextSequenceNumber(
event_data_stream.CONTAINER_TYPE)
self.assertEqual(sequence_number, 1)
sequence_number = test_store._GetAttributeContainerNextSequenceNumber(
event_data_stream.CONTAINER_TYPE)
self.assertEqual(sequence_number, 2)
# TODO: add tests for _SetAttributeContainerNextSequenceNumber
if __name__ == '__main__':
unittest.main()
| 325 |
933 | <reponame>proton-vayu/android_external_perfetto
/*
* 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.
*/
#ifndef INCLUDE_PERFETTO_EXT_BASE_UNIX_TASK_RUNNER_H_
#define INCLUDE_PERFETTO_EXT_BASE_UNIX_TASK_RUNNER_H_
#include "perfetto/base/build_config.h"
#include "perfetto/base/task_runner.h"
#include "perfetto/base/thread_utils.h"
#include "perfetto/base/time.h"
#include "perfetto/ext/base/event_fd.h"
#include "perfetto/ext/base/scoped_file.h"
#include "perfetto/ext/base/thread_checker.h"
#include <chrono>
#include <deque>
#include <map>
#include <mutex>
#include <vector>
#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
#include <poll.h>
#endif
namespace perfetto {
namespace base {
// Runs a task runner on the current thread.
//
// Implementation note: we currently assume (and enforce in debug builds) that
// Run() is called from the thread that constructed the UnixTaskRunner. This is
// not strictly necessary, and we could instead track the thread that invokes
// Run(). However, a related property that *might* be important to enforce is
// that the destructor runs on the task-running thread. Otherwise, if there are
// still-pending tasks at the time of destruction, we would destroy those
// outside of the task thread (which might be unexpected to the caller). On the
// other hand, the std::function task interface discourages use of any
// resource-owning tasks (as the callable needs to be copyable), so this might
// not be important in practice.
//
// TODO(rsavitski): consider adding a thread-check in the destructor, after
// auditing existing usages.
// TODO(primiano): rename this to TaskRunnerImpl. The "Unix" part is misleading
// now as it supports also Windows.
class UnixTaskRunner : public TaskRunner {
public:
UnixTaskRunner();
~UnixTaskRunner() override;
// Start executing tasks. Doesn't return until Quit() is called. Run() may be
// called multiple times on the same task runner.
void Run();
void Quit();
// Checks whether there are any pending immediate tasks to run. Note that
// delayed tasks don't count even if they are due to run.
bool IsIdleForTesting();
// TaskRunner implementation:
void PostTask(std::function<void()>) override;
void PostDelayedTask(std::function<void()>, uint32_t delay_ms) override;
void AddFileDescriptorWatch(PlatformHandle, std::function<void()>) override;
void RemoveFileDescriptorWatch(PlatformHandle) override;
bool RunsTasksOnCurrentThread() const override;
// Returns true if the task runner is quitting, or has quit and hasn't been
// restarted since. Exposed primarily for ThreadTaskRunner, not necessary for
// normal use of this class.
bool QuitCalled();
private:
void WakeUp();
void UpdateWatchTasksLocked();
int GetDelayMsToNextTaskLocked() const;
void RunImmediateAndDelayedTask();
void PostFileDescriptorWatches(uint64_t windows_wait_result);
void RunFileDescriptorWatch(PlatformHandle);
ThreadChecker thread_checker_;
PlatformThreadId created_thread_id_ = GetThreadId();
EventFd event_;
// The array of fds/handles passed to poll(2) / WaitForMultipleObjects().
#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
std::vector<PlatformHandle> poll_fds_;
#else
std::vector<struct pollfd> poll_fds_;
#endif
// --- Begin lock-protected members ---
std::mutex lock_;
std::deque<std::function<void()>> immediate_tasks_;
std::multimap<TimeMillis, std::function<void()>> delayed_tasks_;
bool quit_ = false;
struct WatchTask {
std::function<void()> callback;
#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
// On UNIX systems we make the FD number negative in |poll_fds_| to avoid
// polling it again until the queued task runs. On Windows we can't do that.
// Instead we keep track of its state here.
bool pending = false;
#else
size_t poll_fd_index; // Index into |poll_fds_|.
#endif
};
std::map<PlatformHandle, WatchTask> watch_tasks_;
bool watch_tasks_changed_ = false;
// --- End lock-protected members ---
};
} // namespace base
} // namespace perfetto
#endif // INCLUDE_PERFETTO_EXT_BASE_UNIX_TASK_RUNNER_H_
| 1,454 |
322 | import numpy as np
light_code = []
fl_param_dict = np.load('/is/cluster/work/pghosh/gif1.0/DECA_inferred/deca_flame_params_camera_corrected.npy',
allow_pickle=True).item()
for i, key in enumerate(fl_param_dict):
flame_param = fl_param_dict[key]
light_code.append(flame_param['lit'].flatten())
light_code = np.array(light_code)
mean = np.mean(light_code, axis=0)
std = np.std(light_code, axis=0)
print(f'mean : {mean} \n std: {std}')
print(f'most variation in cmp {np.argmax(std)}')
| 228 |
809 | /*
* LensKit, an open-source toolkit for recommender systems.
* Copyright 2014-2017 LensKit contributors (see CONTRIBUTORS.md)
* Copyright 2010-2014 Regents of the University of Minnesota
*
* 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.
*/
package org.lenskit.data.entities;
import org.apache.commons.lang3.SerializationUtils;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.Assert.*;
public class EntityTypeTest {
@Test
public void testCreate() {
EntityType wombat = EntityType.forName("wombat");
EntityType wombat2 = EntityType.forName("wombat");
EntityType woozle = EntityType.forName("woozle");
assertThat(wombat.getName(), equalTo("wombat"));
assertThat(woozle.getName(), equalTo("woozle"));
assertThat(wombat, equalTo(wombat2));
assertThat(wombat, sameInstance(wombat2));
assertThat(wombat, not(equalTo(woozle)));
}
@Test
public void testSerialize() {
EntityType wombat = EntityType.forName("wombat");
EntityType cloned = SerializationUtils.clone(wombat);
assertThat(cloned, sameInstance(wombat));
}
@Test
public void testCaseNorm() {
EntityType wombat = EntityType.forName("Wombat");
assertThat(wombat.getName(), equalTo("wombat"));
assertThat(EntityType.forName("wombaT"), sameInstance(wombat));
}
}
| 825 |
573 | // Copyright 2015, VIXL authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of ARM Limited nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---------------------------------------------------------------------
// This file is auto generated using tools/generate_simulator_traces.py.
//
// PLEASE DO NOT EDIT.
// ---------------------------------------------------------------------
#ifndef VIXL_SIM_SUB_16B_TRACE_AARCH64_H_
#define VIXL_SIM_SUB_16B_TRACE_AARCH64_H_
const uint8_t kExpected_NEON_sub_16B[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff,
0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe,
0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8,
0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd,
0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab,
0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83,
0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82,
0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81,
0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80,
0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f,
0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e,
0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d,
0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56,
0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34,
0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08,
0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03,
0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02,
0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01,
0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff,
0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9,
0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce,
0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac,
0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84,
0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83,
0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82,
0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81,
0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80,
0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e,
0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57,
0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35,
0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09,
0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04,
0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03,
0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02,
0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02,
0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa,
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf,
0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad,
0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85,
0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84,
0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83,
0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82,
0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81,
0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58,
0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36,
0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a,
0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05,
0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04,
0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03,
0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08,
0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5,
0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3,
0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b,
0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a,
0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89,
0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88,
0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87,
0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85,
0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e,
0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c,
0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10,
0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b,
0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a,
0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09,
0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33,
0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32,
0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31,
0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde,
0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6,
0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5,
0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4,
0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3,
0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2,
0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1,
0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0,
0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89,
0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67,
0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b,
0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36,
0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35,
0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34,
0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55,
0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54,
0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53,
0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d,
0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8,
0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7,
0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6,
0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5,
0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4,
0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3,
0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2,
0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab,
0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89,
0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d,
0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58,
0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57,
0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56,
0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d,
0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c,
0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b,
0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75,
0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a,
0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff,
0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe,
0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd,
0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc,
0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb,
0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa,
0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3,
0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1,
0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85,
0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80,
0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f,
0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e,
0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e,
0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d,
0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c,
0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76,
0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b,
0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29,
0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff,
0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe,
0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd,
0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc,
0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb,
0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4,
0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2,
0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86,
0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81,
0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80,
0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f,
0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f,
0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e,
0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d,
0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77,
0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c,
0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a,
0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02,
0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff,
0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe,
0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd,
0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc,
0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5,
0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3,
0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87,
0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82,
0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81,
0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80,
0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80,
0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f,
0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e,
0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78,
0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d,
0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b,
0x29, 0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03,
0x28, 0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02,
0x27, 0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff,
0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe,
0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd,
0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6,
0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4,
0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88,
0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83,
0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82,
0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81,
0x99, 0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81,
0x77, 0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80,
0x4f, 0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
0x4e, 0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79,
0x4d, 0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e,
0x4c, 0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c,
0x4b, 0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04,
0x4a, 0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03,
0x49, 0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02,
0x22, 0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd4, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff,
0xcf, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xce, 0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7,
0xcd, 0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5,
0xcc, 0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89,
0xcb, 0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84,
0xca, 0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83,
0xc4, 0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82,
0xc5, 0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82,
0xa3, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81,
0x7b, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x7a, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a,
0x79, 0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f,
0x78, 0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d,
0x77, 0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05,
0x76, 0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04,
0x75, 0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03,
0x4e, 0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02,
0x2c, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8,
0xf9, 0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6,
0xf8, 0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a,
0xf7, 0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85,
0xf6, 0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84,
0xf0, 0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83,
0xca, 0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83,
0xa8, 0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b,
0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50,
0x7d, 0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e,
0x7c, 0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06,
0x7b, 0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05,
0x7a, 0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04,
0x53, 0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03,
0x31, 0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02,
0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9,
0xfe, 0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7,
0xfd, 0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b,
0xfc, 0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86,
0xfb, 0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85,
0xf5, 0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84,
0xcb, 0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa,
0xa9, 0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9,
0x81, 0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8,
0x80, 0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2,
0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77,
0x7e, 0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55,
0x7d, 0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d,
0x7c, 0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c,
0x7b, 0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b,
0x54, 0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a,
0x32, 0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29,
0x06, 0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28,
0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde,
0xfe, 0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2,
0xfd, 0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad,
0xfc, 0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac,
0xf6, 0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab,
0xcc, 0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc,
0xaa, 0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb,
0x82, 0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca,
0x81, 0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4,
0x80, 0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99,
0x7f, 0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77,
0x7e, 0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f,
0x7d, 0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e,
0x7c, 0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d,
0x55, 0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c,
0x33, 0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b,
0x07, 0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a,
0x02, 0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49,
0x01, 0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4,
0xfe, 0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf,
0xfd, 0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce,
0xf7, 0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd,
0xcd, 0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8,
0xab, 0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7,
0x83, 0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6,
0x82, 0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0,
0x81, 0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5,
0x80, 0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3,
0x7f, 0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b,
0x7e, 0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a,
0x7d, 0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79,
0x56, 0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78,
0x34, 0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77,
0x08, 0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76,
0x03, 0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75,
0x02, 0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e,
0x01, 0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb,
0xfe, 0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa,
0xf8, 0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9,
0xce, 0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd,
0xac, 0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc,
0x84, 0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb,
0x83, 0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5,
0x82, 0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca,
0x81, 0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8,
0x80, 0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80,
0x7f, 0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f,
0x7e, 0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e,
0x57, 0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d,
0x35, 0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c,
0x09, 0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b,
0x04, 0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a,
0x03, 0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53,
0x02, 0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31,
0x01, 0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff,
0xf9, 0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe,
0xcf, 0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe,
0xad, 0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd,
0x85, 0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc,
0x84, 0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6,
0x83, 0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb,
0x82, 0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9,
0x81, 0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81,
0x80, 0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80,
0x7f, 0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f,
0x58, 0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e,
0x36, 0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d,
0x0a, 0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c,
0x05, 0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b,
0x04, 0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54,
0x03, 0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32,
0x02, 0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06,
0x01, 0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfa, 0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff,
0xd5, 0xde, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xde, 0xd4, 0xfb, 0xff, 0xff, 0xff,
0xb3, 0xb6, 0xd7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd8, 0xb7, 0xb2, 0xcf, 0xfa, 0xfe, 0xfe, 0xfe,
0x8b, 0xb5, 0xd6, 0xfd, 0xfd, 0xfd, 0xfd, 0xd7, 0xb6, 0x8b, 0xad, 0xce, 0xf9, 0xfd, 0xfd, 0xfd,
0x8a, 0xb4, 0xd5, 0xfc, 0xfc, 0xfc, 0xd6, 0xb5, 0x8a, 0x86, 0xac, 0xcd, 0xf8, 0xfc, 0xfc, 0xf7,
0x89, 0xb3, 0xd4, 0xfb, 0xfb, 0xd5, 0xb4, 0x89, 0x85, 0x85, 0xab, 0xcc, 0xf7, 0xfb, 0xf6, 0xcc,
0x88, 0xb2, 0xd3, 0xfa, 0xd4, 0xb3, 0x88, 0x84, 0x84, 0x84, 0xaa, 0xcb, 0xf6, 0xf5, 0xcb, 0xaa,
0x87, 0xb1, 0xd2, 0xd3, 0xb2, 0x87, 0x83, 0x83, 0x83, 0x83, 0xa9, 0xca, 0xf0, 0xca, 0xa9, 0x82,
0x86, 0xb0, 0xab, 0xb1, 0x86, 0x82, 0x82, 0x82, 0x82, 0x82, 0xa8, 0xc4, 0xc5, 0xa8, 0x81, 0x81,
0x85, 0x89, 0x89, 0x85, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xa2, 0x99, 0xa3, 0x80, 0x80, 0x80,
0x5e, 0x67, 0x5d, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x7b, 0x77, 0x77, 0x7b, 0x7f, 0x7f, 0x7f,
0x3c, 0x3b, 0x58, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7a, 0x50, 0x55, 0x4f, 0x7a, 0x7e, 0x7e, 0x7e,
0x10, 0x36, 0x57, 0x7e, 0x7e, 0x7e, 0x7e, 0x79, 0x4f, 0x2e, 0x2d, 0x4e, 0x79, 0x7d, 0x7d, 0x7d,
0x0b, 0x35, 0x56, 0x7d, 0x7d, 0x7d, 0x78, 0x4e, 0x2d, 0x06, 0x2c, 0x4d, 0x78, 0x7c, 0x7c, 0x7c,
0x0a, 0x34, 0x55, 0x7c, 0x7c, 0x77, 0x4d, 0x2c, 0x05, 0x05, 0x2b, 0x4c, 0x77, 0x7b, 0x7b, 0x55,
0x09, 0x33, 0x54, 0x7b, 0x76, 0x4c, 0x2b, 0x04, 0x04, 0x04, 0x2a, 0x4b, 0x76, 0x7a, 0x54, 0x33,
0x08, 0x32, 0x53, 0x75, 0x4b, 0x2a, 0x03, 0x03, 0x03, 0x03, 0x29, 0x4a, 0x75, 0x53, 0x32, 0x07,
0x07, 0x31, 0x4d, 0x4a, 0x29, 0x02, 0x02, 0x02, 0x02, 0x02, 0x28, 0x49, 0x4e, 0x31, 0x06, 0x02,
0x06, 0x2b, 0x22, 0x28, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x22, 0x2c, 0x05, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned kExpectedCount_NEON_sub_16B = 361;
#endif // VIXL_SIM_SUB_16B_TRACE_AARCH64_H_
| 25,456 |
1,203 | package com.philliphsu.bottomsheetpickers.time.numberpad;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
/**
* Interface through which a {@link NumberPadTimePicker} contained in
* {@link BottomSheetNumberPadTimePickerDialog} can have its colors
* and other attributes customized.
*/
class BottomSheetNumberPadTimePickerDialogThemer extends NumberPadTimePickerDialogThemer
implements BottomSheetNumberPadTimePickerThemer {
private final NumberPadTimePickerBottomSheetComponent mTimePickerComponent;
BottomSheetNumberPadTimePickerDialogThemer(@NonNull NumberPadTimePickerBottomSheetComponent timePickerComponent) {
super(timePickerComponent);
mTimePickerComponent = timePickerComponent;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setFabBackgroundColor(ColorStateList colors) {
mTimePickerComponent.setFabBackgroundColor(colors);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setFabRippleColor(@ColorInt int color) {
mTimePickerComponent.setFabRippleColor(color);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setFabIconTint(ColorStateList tint) {
mTimePickerComponent.setFabIconTint(tint);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setAnimateFabBackgroundColor(boolean animate) {
mTimePickerComponent.setAnimateFabBackgroundColor(animate);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setShowFabPolicy(@ShowFabPolicy int policy) {
mTimePickerComponent.setShowFabPolicy(policy);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setAnimateFabIn(boolean animateIn) {
mTimePickerComponent.setAnimateFabIn(animateIn);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setBackspaceLocation(@BackspaceLocation int location) {
mTimePickerComponent.setBackspaceLocation(location);
return this;
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setInputTimeTextColor(@ColorInt int color) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setInputTimeTextColor(color);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setInputAmPmTextColor(@ColorInt int color) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setInputAmPmTextColor(color);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setBackspaceTint(ColorStateList colors) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setBackspaceTint(colors);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setNumberKeysTextColor(ColorStateList colors) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setNumberKeysTextColor(colors);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setAltKeysTextColor(ColorStateList colors) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setAltKeysTextColor(colors);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setHeaderBackground(Drawable background) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setHeaderBackground(background);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setNumberPadBackground(Drawable background) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setNumberPadBackground(background);
}
@Override
public BottomSheetNumberPadTimePickerDialogThemer setDivider(Drawable divider) {
return (BottomSheetNumberPadTimePickerDialogThemer) super.setDivider(divider);
}
}
| 1,321 |
2,151 | // Copyright 2014 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 "chrome/browser/sync_file_system/drive_backend/callback_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace sync_file_system {
namespace drive_backend {
namespace {
void Receiver(bool* called) {
DCHECK(called);
EXPECT_FALSE(*called);
*called = true;
}
} // namespace
TEST(CallbackTrackerTest, AbortAll) {
CallbackTracker tracker;
bool aborted = false;
bool invoked = false;
base::Closure callback = tracker.Register(base::Bind(&Receiver, &aborted),
base::Bind(&Receiver, &invoked));
tracker.AbortAll();
EXPECT_TRUE(aborted);
EXPECT_FALSE(invoked);
callback.Run();
EXPECT_TRUE(aborted);
EXPECT_FALSE(invoked);
}
TEST(CallbackTrackerTest, Invoke) {
CallbackTracker tracker;
bool aborted = false;
bool invoked = false;
base::Closure callback = tracker.Register(base::Bind(&Receiver, &aborted),
base::Bind(&Receiver, &invoked));
callback.Run();
EXPECT_FALSE(aborted);
EXPECT_TRUE(invoked);
// Second call should not do anything.
invoked = false;
callback.Run();
EXPECT_FALSE(invoked);
tracker.AbortAll();
EXPECT_FALSE(aborted);
}
} // namespace drive_backend
} // namespace sync_file_system
| 538 |
841 | <gh_stars>100-1000
package cgeo.geocaching.filters.gui;
import cgeo.geocaching.R;
import cgeo.geocaching.filters.core.IGeocacheFilter;
import cgeo.geocaching.models.Geocache;
import cgeo.geocaching.ui.ImageParam;
import cgeo.geocaching.ui.TextParam;
import cgeo.geocaching.ui.ViewUtils;
import cgeo.geocaching.ui.dialog.SimpleDialog;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.Space;
import androidx.annotation.NonNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.jetbrains.annotations.Nullable;
public class CheckboxFilterViewHolder<T, F extends IGeocacheFilter> extends BaseFilterViewHolder<F> {
private final ValueGroupFilterAccessor<T, F> filterAccessor;
private final Set<T> visibleValues = new HashSet<>();
private final Map<T, ImmutablePair<View, CheckBox>> valueCheckboxes = new HashMap<>();
private ImmutablePair<View, CheckBox> selectAllNoneCheckbox;
private boolean selectAllNoneBroadcast = true;
private Button addItemsButton;
private Button addAllItemsButton;
private final int columnCount;
private Set<T> alwaysVisibleItems = null;
private List<LinearLayout> columns;
private Map<T, Integer> statistics;
private boolean statsAreComplete = false;
public CheckboxFilterViewHolder(final ValueGroupFilterAccessor<T, F> filterAccessor) {
this(filterAccessor, 1, null);
}
public CheckboxFilterViewHolder(final ValueGroupFilterAccessor<T, F> filterAccessor, final int colCount, final Set<T> alwaysVisibleItems) {
this.filterAccessor = filterAccessor;
this.columnCount = colCount;
if (alwaysVisibleItems != null) {
this.alwaysVisibleItems = new HashSet<>();
this.alwaysVisibleItems.addAll(alwaysVisibleItems);
}
}
public View createView() {
this.statistics = calculateStatistics();
this.statsAreComplete = statistics == null || FilterViewHolderCreator.isListInfoComplete();
final LinearLayout ll = new LinearLayout(getActivity());
ll.setOrientation(LinearLayout.VERTICAL);
//selectall/none
ll.addView(ViewUtils.createColumnView(getActivity(), null, columnCount, false, i -> {
if (i < columnCount - 1) {
return null;
}
return createSelectAllNoneView(ll);
}));
this.columns = ViewUtils.createAndAddStandardColumnView(getActivity(), null, ll, columnCount, true);
this.visibleValues.clear();
this.visibleValues.addAll(filterAccessor.getSelectableValues());
if (this.alwaysVisibleItems != null) {
this.visibleValues.retainAll(this.alwaysVisibleItems);
}
//addItems / addallItems
final LinearLayout llButtons = new LinearLayout(getActivity());
llButtons.setOrientation(LinearLayout.HORIZONTAL);
llButtons.addView(createAddItemButton(ll));
final Space space = new Space(getActivity());
space.setMinimumWidth(ViewUtils.dpToPixel(20));
llButtons.addView(space);
llButtons.addView(createAddAllItemsButton(ll));
ll.addView(llButtons);
relayout();
return ll;
}
private View createSelectAllNoneView(final ViewGroup ctx) {
selectAllNoneCheckbox = ViewUtils.createCheckboxItem(getActivity(), ctx, TextParam.id(R.string.cache_filter_checkboxlist_selectallnone), ImageParam.id(R.drawable.ic_menu_selectall), null);
selectAllNoneCheckbox.right.setOnCheckedChangeListener((v, c) -> {
if (!selectAllNoneBroadcast) {
return;
}
for (final T value : visibleValues) {
getValueCheckbox(value).right.setChecked(c);
}
});
return selectAllNoneCheckbox.left;
}
private View createAddItemButton(final ViewGroup vg) {
this.addItemsButton = ViewUtils.createButton(getActivity(), vg, TextParam.id(R.string.cache_filter_checkboxlist_add_items));
this.addItemsButton.setOnClickListener(v -> {
final List<T> items = new ArrayList<>(filterAccessor.getSelectableValues());
items.removeAll(visibleValues);
SimpleDialog.of(getActivity()).setTitle(TextParam.id(R.string.cache_filter_checkboxlist_add_items_dialog_title)).selectMultiple(items, (s, i) -> TextParam.text(filterAccessor.getDisplayText(s)), null, s -> {
visibleValues.addAll(s);
for (T value : s) {
getValueCheckbox(value).right.setChecked(true);
}
relayout();
});
});
return this.addItemsButton;
}
private View createAddAllItemsButton(final ViewGroup vg) {
this.addAllItemsButton = ViewUtils.createButton(getActivity(), vg, TextParam.id(R.string.cache_filter_checkboxlist_add_all_items));
this.addAllItemsButton.setOnClickListener(v -> {
visibleValues.addAll(filterAccessor.getSelectableValues());
relayout();
});
return this.addAllItemsButton;
}
private void relayout() {
for (ViewGroup column : this.columns) {
column.removeAllViews();
}
int idx = 0;
for (T value : filterAccessor.getSelectableValuesAsArray()) {
if (!this.visibleValues.contains(value)) {
continue;
}
final ImmutablePair<View, CheckBox> cb = getValueCheckbox(value);
columns.get(idx % columns.size()).addView(cb.left);
idx++;
}
selectAllNoneCheckbox.left.setVisibility(this.visibleValues.size() > 1 ? View.VISIBLE : View.GONE);
addItemsButton.setVisibility(this.visibleValues.size() < filterAccessor.getSelectableValues().size() ? View.VISIBLE : View.GONE);
addAllItemsButton.setVisibility(this.visibleValues.size() < filterAccessor.getSelectableValues().size() ? View.VISIBLE : View.GONE);
checkAndSetAllNoneValue();
}
@NonNull
private ImmutablePair<View, CheckBox> getValueCheckbox(final T value) {
ImmutablePair<View, CheckBox> cb = this.valueCheckboxes.get(value);
if (cb == null) {
final String vText = this.filterAccessor.getDisplayText(value) +
(statistics != null ? " (" + (statistics.containsKey(value) ? "" + statistics.get(value) : "0") + (statsAreComplete ? "" : "+") + ")" : "");
cb = ViewUtils.createCheckboxItem(getActivity(), columns.get(0), TextParam.text(vText), this.filterAccessor.getIconFor(value), null);
cb.right.setChecked(this.alwaysVisibleItems == null);
this.valueCheckboxes.put(value, cb);
cb.right.setOnCheckedChangeListener((v, c) -> checkAndSetAllNoneValue());
}
return cb;
}
@Nullable
private Map<T, Integer> calculateStatistics() {
Map<T, Integer> stats = null;
if (FilterViewHolderCreator.isListInfoFilled() && filterAccessor.hasCacheValueGetter()) {
stats = new HashMap<>();
final F filter = createFilter();
for (Geocache cache : FilterViewHolderCreator.getListInfoFilteredList()) {
final Set<T> cValues = filterAccessor.getCacheValues(filter, cache);
for (T cValue : cValues) {
if (stats.containsKey(cValue)) {
final Integer cnt = stats.get(cValue);
stats.put(cValue, cnt == null ? 1 : cnt + 1);
} else {
stats.put(cValue, 1);
}
}
}
}
return stats;
}
private void checkAndSetAllNoneValue() {
if (selectAllNoneCheckbox == null) {
return;
}
boolean allChecked = true;
for (final T value : visibleValues) {
final ImmutablePair<View, CheckBox> cb = getValueCheckbox(value);
if (!cb.right.isChecked()) {
allChecked = false;
break;
}
}
//avoid that setting all/none-checkbox leads to setting other checkbox values here
selectAllNoneBroadcast = false;
selectAllNoneCheckbox.right.setChecked(allChecked);
selectAllNoneBroadcast = true;
}
@Override
public void setViewFromFilter(final F filter) {
this.visibleValues.clear();
final Collection<T> set = filterAccessor.getValues(filter);
final boolean setCheckedAll = set.isEmpty() && this.alwaysVisibleItems == null;
for (T value : filterAccessor.getSelectableValuesAsArray()) {
if (set.contains(value) || this.alwaysVisibleItems == null || this.alwaysVisibleItems.contains(value)) {
this.visibleValues.add(value);
}
final ImmutablePair<View, CheckBox> cb = getValueCheckbox(value);
cb.right.setChecked(setCheckedAll || set.contains(value));
}
relayout();
}
@Override
public F createFilterFromView() {
final F filter = createFilter();
final Set<T> set = new HashSet<>();
if (getAllNoneSelected() == null) {
for (T value : filterAccessor.getSelectableValuesAsArray()) {
if (this.visibleValues.contains(value) && getValueCheckbox(value).right.isChecked()) {
set.add(value);
}
}
}
filterAccessor.setValues(filter, set);
return filter;
}
private Boolean getAllNoneSelected() {
boolean foundNonSelected = false;
boolean foundSelected = false;
for (T value : filterAccessor.getSelectableValuesAsArray()) {
final boolean selected = this.visibleValues.contains(value) && getValueCheckbox(value).right.isChecked();
foundNonSelected |= !selected;
foundSelected |= selected;
}
if (foundNonSelected && !foundSelected) {
return false;
}
if (!foundNonSelected && foundSelected) {
return true;
}
return null;
}
}
| 4,409 |
2,661 | <gh_stars>1000+
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "JSDisplayBundle.h"
#include "gstLayer.h"
#include <qstringlist.h>
void JSDisplayBundle::EnsureContext(gstLayer *layer) {
if (!cx) {
QStringList contextScripts = layer->GetExternalContextScripts();
if (!layer->GetConfig().layerContextScript.isEmpty()) {
contextScripts.append(layer->GetConfig().layerContextScript);
}
cx = gstRecordJSContextImpl::Create(layer->GetSourceAttr(),contextScripts);
}
}
| 312 |
5,169 | {
"name": "SGExtensionsUtilities",
"version": "0.0.1",
"summary": "Extensions & Utilities",
"description": "Library to provide swift extensions & utilites",
"homepage": "https://github.com/sanjeevworkstation/SGExtensionsUtilities",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"<NAME>": "<EMAIL>"
},
"platforms": {
"ios": "9.0"
},
"swift_versions": "4.2",
"source": {
"git": "https://github.com/sanjeevworkstation/SGExtensionsUtilities.git",
"tag": "0.0.1"
},
"source_files": "SGExtensionsUtilities/SGExtensionsUtilities/**/*.{swift}",
"swift_version": "4.2"
}
| 262 |
682 | <filename>abc/src/map/if/ifMatch2.c<gh_stars>100-1000
/**CFile****************************************************************
FileName [ifMatch2.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [FPGA mapping based on priority cuts.]
Synopsis [Specialized matching.]
Author [<NAME>]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - September 1, 2009.]
Revision [$Id: ifMatch2.c,v 1.00 2009/09/01 00:00:00 alanmi Exp $]
***********************************************************************/
#include "if.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Bat_ManFuncSetupTable()
{
}
void Bat_ManFuncSetdownTable()
{
}
int Bat_ManCellFuncLookup( void * pMan, unsigned * pTruth, int nVars, int nLeaves, char * pStr )
{
return 1;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
| 542 |
1,838 | /*
* Copyright 2005-2019 Dozer 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.github.dozermapper.protobuf.util;
import com.github.dozermapper.core.MappingException;
import com.github.dozermapper.core.config.BeanContainer;
import com.github.dozermapper.protobuf.vo.proto.FakeMessage;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Message;
import org.hamcrest.core.IsInstanceOf;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
public class ProtoUtilsTest {
@Rule
public ExpectedException handlesIncorrectMessageExpectedException = ExpectedException.none();
@Test
public void canGetBuilder() {
Message.Builder result = ProtoUtils.getBuilder(ProtoTestObjects.ProtobufFieldNaming.class);
assertNotNull(result);
}
@Test
public void handlesIncorrectMessage() {
handlesIncorrectMessageExpectedException.expect(MappingException.class);
handlesIncorrectMessageExpectedException.expectMessage("Failed to create Message.Builder for com.github.dozermapper.protobuf.vo.proto.FakeMessage");
handlesIncorrectMessageExpectedException.expectCause(IsInstanceOf.instanceOf(NoSuchMethodException.class));
ProtoUtils.getBuilder(FakeMessage.class);
}
@Test
public void getJavaGenericClassForCollectionHandlesNonCollections() {
Descriptors.FieldDescriptor fieldDescriptor = ProtoUtils.getFieldDescriptor(ProtoTestObjects.SimpleProtoTestObjectWithoutRequired.class, "one");
assertNull(ProtoUtils.getJavaGenericClassForCollection(fieldDescriptor, new BeanContainer()));
}
}
| 735 |
515 | # Copyright (c) 2019-2021 <NAME>
# License: MIT License
from pathlib import Path
import ezdxf
from ezdxf.tools.standards import styles
DIR = Path("~/Desktop/Outbox").expanduser()
doc = ezdxf.new("R12", setup=True)
msp = doc.modelspace()
y = 0
height = 0.5
line_height = 1.5
for style, font in styles():
msp.add_text(style, {"style": style, "height": height}).set_pos((0, y))
y += height * line_height
doc.saveas(DIR / "using_all_text_styles.dxf")
| 179 |
892 | <gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-cvwm-vf9r-8r57",
"modified": "2022-05-13T01:45:58Z",
"published": "2022-05-13T01:45:58Z",
"aliases": [
"CVE-2017-4921"
],
"details": "VMware vCenter Server (6.5 prior to 6.5 U1) contains an insecure library loading issue that occurs due to the use of LD_LIBRARY_PATH variable in an unsafe manner. Successful exploitation of this issue may allow unprivileged host users to load a shared library that may lead to privilege escalation.",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-4921"
},
{
"type": "WEB",
"url": "https://www.vmware.com/security/advisories/VMSA-2017-0013.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/100006"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1039013"
}
],
"database_specific": {
"cwe_ids": [
],
"severity": "HIGH",
"github_reviewed": false
}
} | 548 |
4,879 | #import "MWMMyPositionMode.h"
#include "platform/localization.hpp"
#include "platform/location.hpp"
#include "platform/measurement_utils.hpp"
#include "platform/settings.hpp"
#include "geometry/mercator.hpp"
namespace location_helpers
{
static inline NSString * formattedDistance(double const & meters) {
if (meters < 0.)
return nil;
auto const localizedUnits = platform::GetLocalizedDistanceUnits();
return @(measurement_utils::FormatDistanceWithLocalization(meters, localizedUnits.m_high, localizedUnits.m_low).c_str());
}
static inline BOOL isMyPositionPendingOrNoPosition()
{
location::EMyPositionMode mode;
if (!settings::Get(settings::kLocationStateMode, mode))
return true;
return mode == location::EMyPositionMode::PendingPosition ||
mode == location::EMyPositionMode::NotFollowNoPosition;
}
static inline ms::LatLon ToLatLon(m2::PointD const & p) { return mercator::ToLatLon(p); }
static inline m2::PointD ToMercator(CLLocationCoordinate2D const & l)
{
return mercator::FromLatLon(l.latitude, l.longitude);
}
static inline m2::PointD ToMercator(ms::LatLon const & l) { return mercator::FromLatLon(l); }
static inline MWMMyPositionMode mwmMyPositionMode(location::EMyPositionMode mode)
{
switch (mode)
{
case location::EMyPositionMode::PendingPosition: return MWMMyPositionModePendingPosition;
case location::EMyPositionMode::NotFollowNoPosition: return MWMMyPositionModeNotFollowNoPosition;
case location::EMyPositionMode::NotFollow: return MWMMyPositionModeNotFollow;
case location::EMyPositionMode::Follow: return MWMMyPositionModeFollow;
case location::EMyPositionMode::FollowAndRotate: return MWMMyPositionModeFollowAndRotate;
}
}
} // namespace MWMLocationHelpers
| 556 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-6r88-384v-fg82",
"modified": "2022-05-13T01:23:27Z",
"published": "2022-05-13T01:23:27Z",
"aliases": [
"CVE-2014-1498"
],
"details": "The crypto.generateCRMFRequest method in Mozilla Firefox before 28.0 and SeaMonkey before 2.25 does not properly validate a certain key type, which allows remote attackers to cause a denial of service (application crash) via vectors that trigger generation of a key that supports the Elliptic Curve ec-dual-use algorithm.",
"severity": [
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-1498"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=935618"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201504-01"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2014-03/msg00016.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2014-03/msg00017.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2014-03/msg00022.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2014-04/msg00016.html"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2014/mfsa2014-18.html"
},
{
"type": "WEB",
"url": "http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html"
}
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"severity": "MODERATE",
"github_reviewed": false
}
} | 790 |
1,353 | <filename>servlet/src/main/java/com/twelvemonkeys/servlet/cache/ServletResponseResolver.java<gh_stars>1000+
/*
* Copyright (c) 2008, <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:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * 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.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.twelvemonkeys.servlet.cache;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
/**
* ServletResponseResolver
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
* @author last modified by $Author: haku $
* @version $Id: ServletResponseResolver.java#2 $
*/
@Deprecated
final class ServletResponseResolver implements ResponseResolver {
final private ServletCacheRequest request;
final private ServletCacheResponse response;
final private FilterChain chain;
ServletResponseResolver(final ServletCacheRequest pRequest, final ServletCacheResponse pResponse, final FilterChain pChain) {
request = pRequest;
response = pResponse;
chain = pChain;
}
public void resolve(final CacheRequest pRequest, final CacheResponse pResponse) throws IOException, CacheException {
// Need only wrap if pResponse is not response...
HttpServletResponse response = pResponse == this.response ? this.response.getResponse() : new SerlvetCacheResponseWrapper(this.response.getResponse(), pResponse);
try {
chain.doFilter(request.getRequest(), response);
}
catch (ServletException e) {
throw new CacheException(e);
}
finally {
response.flushBuffer();
}
}
}
| 951 |
47,880 | <reponame>ksodhi2/guava<filename>guava-tests/test/com/google/common/collect/TablesTest.java
/*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.collect.Table.Cell;
import com.google.common.testing.CollectorTester;
import com.google.common.testing.EqualsTester;
import com.google.common.testing.SerializableTester;
import java.util.stream.Collector;
import junit.framework.TestCase;
/**
* Tests for {@link Tables}.
*
* @author <NAME>
*/
@GwtCompatible(emulated = true)
public class TablesTest extends TestCase {
// The bulk of the toTable tests can be found in TableCollectorsTest.
// This gives minimal coverage to the forwarding functions
public void testToTableSanityTest() {
Collector<Cell<String, String, Integer>, ?, Table<String, String, Integer>> collector =
Tables.toTable(Cell::getRowKey, Cell::getColumnKey, Cell::getValue, HashBasedTable::create);
HashBasedTable<String, String, Integer> expected = HashBasedTable.create();
expected.put("one", "uno", 1);
CollectorTester.of(collector)
.expectCollects(HashBasedTable.create())
.expectCollects(expected, Tables.immutableCell("one", "uno", 1));
}
public void testToTableMergingSanityTest() {
Collector<Cell<String, String, Integer>, ?, Table<String, String, Integer>> collector =
Tables.toTable(
Cell::getRowKey,
Cell::getColumnKey,
Cell::getValue,
Integer::sum,
HashBasedTable::create);
HashBasedTable<String, String, Integer> expected = HashBasedTable.create();
expected.put("one", "uno", 3);
CollectorTester.of(collector)
.expectCollects(HashBasedTable.create())
.expectCollects(
expected, Tables.immutableCell("one", "uno", 1), Tables.immutableCell("one", "uno", 2));
}
@GwtIncompatible // SerializableTester
public void testImmutableEntrySerialization() {
Cell<String, Integer, Character> entry = Tables.immutableCell("foo", 1, 'a');
SerializableTester.reserializeAndAssert(entry);
}
public void testImmutableEntryToString() {
Cell<String, Integer, Character> entry = Tables.immutableCell("foo", 1, 'a');
assertEquals("(foo,1)=a", entry.toString());
Cell<String, Integer, Character> nullEntry = Tables.immutableCell(null, null, null);
assertEquals("(null,null)=null", nullEntry.toString());
}
public void testEntryEquals() {
Cell<String, Integer, Character> entry = Tables.immutableCell("foo", 1, 'a');
new EqualsTester()
.addEqualityGroup(entry, Tables.immutableCell("foo", 1, 'a'))
.addEqualityGroup(Tables.immutableCell("bar", 1, 'a'))
.addEqualityGroup(Tables.immutableCell("foo", 2, 'a'))
.addEqualityGroup(Tables.immutableCell("foo", 1, 'b'))
.addEqualityGroup(Tables.immutableCell(null, null, null))
.testEquals();
}
public void testEntryEqualsNull() {
Cell<String, Integer, Character> entry = Tables.immutableCell(null, null, null);
new EqualsTester()
.addEqualityGroup(entry, Tables.immutableCell(null, null, null))
.addEqualityGroup(Tables.immutableCell("bar", null, null))
.addEqualityGroup(Tables.immutableCell(null, 2, null))
.addEqualityGroup(Tables.immutableCell(null, null, 'b'))
.addEqualityGroup(Tables.immutableCell("foo", 1, 'a'))
.testEquals();
}
}
| 1,424 |
947 | <filename>include/tuple/slot.h
/*-------------------------------------------------------------------------
*
* slot.h
* Declarations for orioledb tuple slot implementation
*
* Copyright (c) 2021-2022, Oriole DB Inc.
*
* IDENTIFICATION
* contrib/orioledb/include/tuple/slot.h
*
*-------------------------------------------------------------------------
*/
#ifndef __TUPLE_SLOT_H__
#define __TUPLE_SLOT_H__
#include "postgres.h"
#include "executor/tuptable.h"
#include "tableam/key_range.h"
#include "tuple/format.h"
typedef struct OTableSlot
{
TupleTableSlot base;
char *data; /* data for materialized slots */
bool *to_toast;
bool *vfree;
Datum *detoasted;
OTuple tuple;
OTableDescr *descr;
bytea *rowid;
CommitSeqNo csn;
int ixnum;
uint32 version;
bool table_order;
OTupleReaderState state;
BTreeLocationHint hint;
} OTableSlot;
extern PGDLLIMPORT const TupleTableSlotOps TTSOpsOrioleDB;
extern void tts_orioledb_detoast(TupleTableSlot *slot);
extern void tts_orioledb_store_tuple(TupleTableSlot *slot, OTuple tuple,
OTableDescr *descr, CommitSeqNo csn,
int ixnum, bool shouldfree,
BTreeLocationHint *hint);
extern OTuple tts_orioledb_make_secondary_tuple(TupleTableSlot *slot,
OIndexDescr *idx,
bool leaf);
extern void tts_orioledb_fill_key_bound(TupleTableSlot *slot, OIndexDescr *idx,
OBTreeKeyBound *bound);
extern char *tss_orioledb_print_idx_key(TupleTableSlot *slot, OIndexDescr *id);
extern char *orioledb_print_idx_key(HeapTuple tuple, OIndexDescr *id);
extern void tts_orioledb_toast(TupleTableSlot *slot, OTableDescr *descr);
extern OTuple tts_orioledb_form_tuple(TupleTableSlot *slot,
OTableDescr *descr);
extern OTuple tts_orioledb_form_orphan_tuple(TupleTableSlot *slot,
OTableDescr *descr);
extern bool tts_orioledb_insert_toast_values(TupleTableSlot *slot,
OTableDescr *descr,
OXid oxid, CommitSeqNo csn);
extern void tts_orioledb_toast_sort_add(TupleTableSlot *slot,
OTableDescr *descr,
Tuplesortstate *sortstate);
extern bool tts_orioledb_remove_toast_values(TupleTableSlot *slot,
OTableDescr *descr,
OXid oxid, CommitSeqNo csn);
extern bool tts_orioledb_update_toast_values(TupleTableSlot *oldSlot,
TupleTableSlot *newSlot,
OTableDescr *descr,
OXid oxid, CommitSeqNo csn);
#endif /* __TUPLE_SLOT_H__ */
| 1,085 |
936 | /*
* Copyright 2015, Yahoo Inc.
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root for terms.
*/
package example;
import com.yahoo.elide.annotation.Include;
import java.util.Set;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
/**
* Embedded test bean.
*/
@Include
@Entity
public class Embedded extends BaseId {
private Set<Long> segmentIds;
@ElementCollection
public Set<Long> getSegmentIds() {
return segmentIds;
}
public void setSegmentIds(Set<Long> segmentIds) {
this.segmentIds = segmentIds;
}
public void addSegmentId(long segmentId) {
segmentIds.add(segmentId);
}
}
| 256 |
365 | /*
* 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 02110-1301, USA.
*
* The Original Code is Copyright (C) 2016 Blender Foundation.
* All rights reserved.
*/
/** \file
* \ingroup spclip
*/
#include "MEM_guardedalloc.h"
#include "DNA_constraint_types.h"
#include "DNA_object_types.h" /* SELECT */
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_layer.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_tracking.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_clip.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "clip_intern.h"
/********************** set origin operator *********************/
static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
{
Object *camera = scene->camera;
if (camera != NULL && BKE_object_movieclip_get(scene, camera, false) == clip) {
return camera;
}
FOREACH_SCENE_OBJECT_BEGIN (scene, ob) {
if (ob->type == OB_CAMERA) {
if (BKE_object_movieclip_get(scene, ob, false) == clip) {
camera = ob;
break;
}
}
}
FOREACH_SCENE_OBJECT_END;
return camera;
}
static Object *get_orientation_object(bContext *C)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
Object *object = NULL;
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
object = get_camera_with_movieclip(scene, clip);
}
else {
object = OBACT(view_layer);
}
if (object != NULL && object->parent != NULL) {
object = object->parent;
}
return object;
}
static bool set_orientation_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
ViewLayer *view_layer = CTX_data_view_layer(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (clip != NULL) {
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
return true;
}
return OBACT(view_layer) != NULL;
}
}
return false;
}
static int count_selected_bundles(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
ListBase *tracksbase = BKE_tracking_get_active_tracks(&clip->tracking);
int tot = 0;
for (MovieTrackingTrack *track = tracksbase->first; track != NULL; track = track->next) {
if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE)) {
tot++;
}
}
return tot;
}
static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat[4][4])
{
bool found = false;
for (bConstraint *con = ob->constraints.first; con != NULL; con = con->next) {
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (cti == NULL) {
continue;
}
if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data = (bObjectSolverConstraint *)con->data;
if (!found) {
Object *cam = data->camera ? data->camera : scene->camera;
BKE_object_where_is_calc_mat4(cam, invmat);
}
mul_m4_m4m4(invmat, invmat, data->invmat);
found = true;
}
}
if (found) {
invert_m4(invmat);
}
else {
unit_m4(invmat);
}
}
static Object *object_solver_camera(Scene *scene, Object *ob)
{
for (bConstraint *con = ob->constraints.first; con != NULL; con = con->next) {
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (cti == NULL) {
continue;
}
if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data = (bObjectSolverConstraint *)con->data;
return (data->camera != NULL) ? data->camera : scene->camera;
}
}
return NULL;
}
static int set_origin_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
Scene *scene = CTX_data_scene(C);
Object *camera = get_camera_with_movieclip(scene, clip);
int selected_count = count_selected_bundles(C);
if (selected_count == 0) {
BKE_report(op->reports,
RPT_ERROR,
"At least one track with bundle should be selected to "
"define origin position");
return OPERATOR_CANCELLED;
}
Object *object = get_orientation_object(C);
if (object == NULL) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
}
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
float median[3] = {0.0f, 0.0f, 0.0f};
zero_v3(median);
for (MovieTrackingTrack *track = tracksbase->first; track != NULL; track = track->next) {
if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE)) {
add_v3_v3(median, track->bundle_pos);
}
}
mul_v3_fl(median, 1.0f / selected_count);
float mat[4][4], vec[3];
BKE_tracking_get_camera_object_matrix(camera, mat);
mul_v3_m4v3(vec, mat, median);
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
sub_v3_v3(object->loc, vec);
}
else {
object_solver_inverted_matrix(scene, object, mat);
mul_v3_m4v3(vec, mat, vec);
copy_v3_v3(object->loc, vec);
}
DEG_id_tag_update(&clip->id, 0);
DEG_id_tag_update(&object->id, ID_RECALC_TRANSFORM);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
void CLIP_OT_set_origin(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Origin";
ot->description =
"Set active marker as origin by moving camera (or its parent if present) in 3D space";
ot->idname = "CLIP_OT_set_origin";
/* api callbacks */
ot->exec = set_origin_exec;
ot->poll = set_orientation_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_boolean(
ot->srna, "use_median", 0, "Use Median", "Set origin to median point of selected bundles");
}
/********************** set floor operator *********************/
static void set_axis(Scene *scene,
Object *ob,
MovieClip *clip,
MovieTrackingObject *tracking_object,
MovieTrackingTrack *track,
char axis)
{
Object *camera = get_camera_with_movieclip(scene, clip);
const bool is_camera = (tracking_object->flag & TRACKING_OBJECT_CAMERA) != 0;
bool flip = false;
float mat[4][4], vec[3], obmat[4][4], dvec[3];
BKE_object_to_mat4(ob, obmat);
BKE_tracking_get_camera_object_matrix(camera, mat);
mul_v3_m4v3(vec, mat, track->bundle_pos);
copy_v3_v3(dvec, vec);
if (!is_camera) {
float imat[4][4];
object_solver_inverted_matrix(scene, ob, imat);
mul_v3_m4v3(vec, imat, vec);
invert_m4_m4(imat, obmat);
mul_v3_m4v3(dvec, imat, vec);
sub_v3_v3(vec, obmat[3]);
}
if (len_squared_v2(vec) < (1e-3f * 1e-3f)) {
return;
}
unit_m4(mat);
if (axis == 'X') {
if (fabsf(dvec[1]) < 1e-3f) {
flip = true;
mat[0][0] = -1.0f;
mat[0][1] = 0.0f;
mat[0][2] = 0.0f;
mat[1][0] = 0.0f;
mat[1][1] = -1.0f;
mat[1][2] = 0.0f;
mat[2][0] = 0.0f;
mat[2][1] = 0.0f;
mat[2][2] = 1.0f;
}
else {
copy_v3_v3(mat[0], vec);
if (is_camera || fabsf(vec[2]) < 1e-3f) {
mat[0][2] = 0.0f;
mat[2][0] = 0.0f;
mat[2][1] = 0.0f;
mat[2][2] = 1.0f;
cross_v3_v3v3(mat[1], mat[2], mat[0]);
}
else {
vec[2] = 0.0f;
cross_v3_v3v3(mat[1], mat[0], vec);
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
}
}
else {
if (fabsf(dvec[0]) < 1e-3f) {
flip = true;
mat[0][0] = -1.0f;
mat[0][1] = 0.0f;
mat[0][2] = 0.0f;
mat[1][0] = 0.0f;
mat[1][1] = -1.0f;
mat[1][2] = 0.0f;
mat[2][0] = 0.0f;
mat[2][1] = 0.0f;
mat[2][2] = 1.0f;
}
else {
copy_v3_v3(mat[1], vec);
if (is_camera || fabsf(vec[2]) < 1e-3f) {
mat[1][2] = 0.0f;
mat[2][0] = 0.0f;
mat[2][1] = 0.0f;
mat[2][2] = 1.0f;
cross_v3_v3v3(mat[0], mat[1], mat[2]);
}
else {
vec[2] = 0.0f;
cross_v3_v3v3(mat[0], vec, mat[1]);
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
}
}
normalize_v3(mat[0]);
normalize_v3(mat[1]);
normalize_v3(mat[2]);
if (is_camera) {
invert_m4(mat);
mul_m4_m4m4(mat, mat, obmat);
}
else {
if (!flip) {
float lmat[4][4], ilmat[4][4], rmat[3][3];
BKE_object_rot_to_mat3(ob, rmat, true);
invert_m3(rmat);
mul_m4_m4m3(mat, mat, rmat);
unit_m4(lmat);
copy_v3_v3(lmat[3], obmat[3]);
invert_m4_m4(ilmat, lmat);
mul_m4_series(mat, lmat, mat, ilmat, obmat);
}
else {
mul_m4_m4m4(mat, obmat, mat);
}
}
BKE_object_apply_mat4(ob, mat, 0, 0);
}
static int set_plane_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
Scene *scene = CTX_data_scene(C);
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object;
MovieTrackingTrack *track, *axis_track = NULL, *act_track;
ListBase *tracksbase;
Object *object;
Object *camera = get_camera_with_movieclip(scene, clip);
int tot = 0;
float vec[3][3], mat[4][4], obmat[4][4], newmat[4][4], orig[3] = {0.0f, 0.0f, 0.0f};
int plane = RNA_enum_get(op->ptr, "plane");
float rot[4][4] = {
{0.0f, 0.0f, -1.0f, 0.0f},
{0.0f, 1.0f, 0.0f, 0.0f},
{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f, 1.0f},
}; /* 90 degrees Y-axis rotation matrix */
if (count_selected_bundles(C) != 3) {
BKE_report(op->reports, RPT_ERROR, "Three tracks with bundles are needed to orient the floor");
return OPERATOR_CANCELLED;
}
tracking_object = BKE_tracking_object_get_active(tracking);
tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
act_track = BKE_tracking_track_get_active(tracking);
object = get_orientation_object(C);
if (object == NULL) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
}
BKE_tracking_get_camera_object_matrix(camera, mat);
/* Get 3 bundles to use as reference. */
track = tracksbase->first;
while (track && tot < 3) {
if (track->flag & TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) {
mul_v3_m4v3(vec[tot], mat, track->bundle_pos);
if (tot == 0 || track == act_track) {
copy_v3_v3(orig, vec[tot]);
}
else {
axis_track = track;
}
tot++;
}
track = track->next;
}
sub_v3_v3(vec[1], vec[0]);
sub_v3_v3(vec[2], vec[0]);
/* Construct ortho-normal basis. */
unit_m4(mat);
if (plane == 0) { /* floor */
cross_v3_v3v3(mat[0], vec[1], vec[2]);
copy_v3_v3(mat[1], vec[1]);
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
else if (plane == 1) { /* wall */
cross_v3_v3v3(mat[2], vec[1], vec[2]);
copy_v3_v3(mat[1], vec[1]);
cross_v3_v3v3(mat[0], mat[1], mat[2]);
}
normalize_v3(mat[0]);
normalize_v3(mat[1]);
normalize_v3(mat[2]);
/* Move to origin point. */
mat[3][0] = orig[0];
mat[3][1] = orig[1];
mat[3][2] = orig[2];
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
invert_m4(mat);
BKE_object_to_mat4(object, obmat);
mul_m4_m4m4(mat, mat, obmat);
mul_m4_m4m4(newmat, rot, mat);
BKE_object_apply_mat4(object, newmat, 0, 0);
/* Make camera have positive z-coordinate. */
if (object->loc[2] < 0) {
invert_m4(rot);
mul_m4_m4m4(newmat, rot, mat);
BKE_object_apply_mat4(object, newmat, 0, 0);
}
}
else {
BKE_object_apply_mat4(object, mat, 0, 0);
}
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
Object *object_eval = DEG_get_evaluated_object(depsgraph, object);
BKE_object_transform_copy(object_eval, object);
BKE_object_where_is_calc(depsgraph, scene_eval, object_eval);
BKE_object_transform_copy(object, object_eval);
set_axis(scene, object, clip, tracking_object, axis_track, 'X');
DEG_id_tag_update(&clip->id, 0);
DEG_id_tag_update(&object->id, ID_RECALC_TRANSFORM);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
void CLIP_OT_set_plane(wmOperatorType *ot)
{
static const EnumPropertyItem plane_items[] = {
{0, "FLOOR", 0, "Floor", "Set floor plane"},
{1, "WALL", 0, "Wall", "Set wall plane"},
{0, NULL, 0, NULL, NULL},
};
/* identifiers */
ot->name = "Set Plane";
ot->description =
"Set plane based on 3 selected bundles by moving camera "
"(or its parent if present) in 3D space";
ot->idname = "CLIP_OT_set_plane";
/* api callbacks */
ot->exec = set_plane_exec;
ot->poll = set_orientation_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "plane", plane_items, 0, "Plane", "Plane to be used for orientation");
}
/********************** set axis operator *********************/
static int set_axis_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
Scene *scene = CTX_data_scene(C);
Object *object;
int axis = RNA_enum_get(op->ptr, "axis");
if (count_selected_bundles(C) != 1) {
BKE_report(
op->reports, RPT_ERROR, "Single track with bundle should be selected to define axis");
return OPERATOR_CANCELLED;
}
object = get_orientation_object(C);
if (object == NULL) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
}
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
MovieTrackingTrack *track = tracksbase->first;
while (track) {
if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE)) {
break;
}
track = track->next;
}
set_axis(scene, object, clip, tracking_object, track, axis == 0 ? 'X' : 'Y');
DEG_id_tag_update(&clip->id, 0);
DEG_id_tag_update(&object->id, ID_RECALC_TRANSFORM);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
void CLIP_OT_set_axis(wmOperatorType *ot)
{
static const EnumPropertyItem axis_actions[] = {
{0, "X", 0, "X", "Align bundle align X axis"},
{1, "Y", 0, "Y", "Align bundle align Y axis"},
{0, NULL, 0, NULL, NULL},
};
/* identifiers */
ot->name = "Set Axis";
ot->description =
"Set direction of scene axis rotating camera "
"(or its parent if present) and assume selected track "
"lies on real axis, joining it with the origin";
ot->idname = "CLIP_OT_set_axis";
/* api callbacks */
ot->exec = set_axis_exec;
ot->poll = set_orientation_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "axis", axis_actions, 0, "Axis", "Axis to use to align bundle along");
}
/********************** set scale operator *********************/
static int do_set_scale(bContext *C, wmOperator *op, bool scale_solution, bool apply_scale)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
MovieTrackingTrack *track;
Scene *scene = CTX_data_scene(C);
Object *object = NULL;
Object *camera = get_camera_with_movieclip(scene, clip);
ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
int tot = 0;
float vec[2][3], mat[4][4], scale;
float dist = RNA_float_get(op->ptr, "distance");
if (count_selected_bundles(C) != 2) {
BKE_report(op->reports, RPT_ERROR, "Two tracks with bundles should be selected to set scale");
return OPERATOR_CANCELLED;
}
if (!scale_solution && !apply_scale) {
object = get_orientation_object(C);
if (object == NULL) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
}
}
BKE_tracking_get_camera_object_matrix(camera, mat);
track = tracksbase->first;
while (track) {
if (TRACK_VIEW_SELECTED(sc, track)) {
mul_v3_m4v3(vec[tot], mat, track->bundle_pos);
tot++;
}
track = track->next;
}
sub_v3_v3(vec[0], vec[1]);
if (len_v3(vec[0]) > 1e-5f) {
scale = dist / len_v3(vec[0]);
if (apply_scale) {
/* Apply scale on reconstructed scene itself. */
MovieTrackingReconstruction *reconstruction = BKE_tracking_get_active_reconstruction(
tracking);
MovieReconstructedCamera *reconstructed_cameras;
int i;
for (track = tracksbase->first; track; track = track->next) {
mul_v3_fl(track->bundle_pos, scale);
}
reconstructed_cameras = reconstruction->cameras;
for (i = 0; i < reconstruction->camnr; i++) {
mul_v3_fl(reconstructed_cameras[i].mat[3], scale);
}
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
}
else {
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
mul_v3_fl(object->scale, scale);
mul_v3_fl(object->loc, scale);
}
else if (!scale_solution) {
Object *solver_camera = object_solver_camera(scene, object);
object->scale[0] = object->scale[1] = object->scale[2] = 1.0f / scale;
if (solver_camera) {
object->scale[0] /= solver_camera->scale[0];
object->scale[1] /= solver_camera->scale[1];
object->scale[2] /= solver_camera->scale[2];
}
}
else {
tracking_object->scale = scale;
}
DEG_id_tag_update(&clip->id, 0);
if (object) {
DEG_id_tag_update(&object->id, ID_RECALC_TRANSFORM);
}
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
}
}
return OPERATOR_FINISHED;
}
static int set_scale_exec(bContext *C, wmOperator *op)
{
return do_set_scale(C, op, false, false);
}
static int set_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
}
return set_scale_exec(C, op);
}
void CLIP_OT_set_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Scale";
ot->description = "Set scale of scene by scaling camera (or its parent if present)";
ot->idname = "CLIP_OT_set_scale";
/* api callbacks */
ot->exec = set_scale_exec;
ot->invoke = set_scale_invoke;
ot->poll = set_orientation_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna,
"distance",
0.0f,
-FLT_MAX,
FLT_MAX,
"Distance",
"Distance between selected tracks",
-100.0f,
100.0f);
}
/********************** set solution scale operator *********************/
static bool set_solution_scale_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
MovieClip *clip = ED_space_clip_get_clip(sc);
if (clip != NULL) {
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
return (tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0;
}
}
return false;
}
static int set_solution_scale_exec(bContext *C, wmOperator *op)
{
return do_set_scale(C, op, true, false);
}
static int set_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.object_distance);
}
return set_solution_scale_exec(C, op);
}
void CLIP_OT_set_solution_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Set Solution Scale";
ot->description =
"Set object solution scale using distance between "
"two selected tracks";
ot->idname = "CLIP_OT_set_solution_scale";
/* api callbacks */
ot->exec = set_solution_scale_exec;
ot->invoke = set_solution_scale_invoke;
ot->poll = set_solution_scale_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna,
"distance",
0.0f,
-FLT_MAX,
FLT_MAX,
"Distance",
"Distance between selected tracks",
-100.0f,
100.0f);
}
/********************** apply solution scale operator *********************/
static bool apply_solution_scale_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
MovieClip *clip = ED_space_clip_get_clip(sc);
if (clip != NULL) {
MovieTracking *tracking = &clip->tracking;
MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking);
return (tracking_object->flag & TRACKING_OBJECT_CAMERA) != 0;
}
}
return 0;
}
static int apply_solution_scale_exec(bContext *C, wmOperator *op)
{
return do_set_scale(C, op, false, true);
}
static int apply_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
if (!RNA_struct_property_is_set(op->ptr, "distance")) {
RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
}
return apply_solution_scale_exec(C, op);
}
void CLIP_OT_apply_solution_scale(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Solution Scale";
ot->description =
"Apply scale on solution itself to make distance between "
"selected tracks equals to desired";
ot->idname = "CLIP_OT_apply_solution_scale";
/* api callbacks */
ot->exec = apply_solution_scale_exec;
ot->invoke = apply_solution_scale_invoke;
ot->poll = apply_solution_scale_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna,
"distance",
0.0f,
-FLT_MAX,
FLT_MAX,
"Distance",
"Distance between selected tracks",
-100.0f,
100.0f);
}
| 10,589 |
1,338 | /*
** Copyright 2004, <NAME>, <EMAIL>. All rights reserved.
** Distributed under the terms of the MIT License.
*/
#ifndef LINK_H
#define LINK_H
#include <boot/vfs.h>
#include "File.h"
namespace BFS {
class Link : public File {
public:
Link(Volume &volume, block_run run);
Link(Volume &volume, off_t id);
Link(const Stream &stream);
status_t InitCheck();
virtual status_t ReadLink(char *buffer, size_t bufferSize);
virtual ssize_t ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize);
virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize);
virtual int32 Type() const;
};
} // namespace BFS
#endif /* FILE_H */
| 244 |
2,542 | <reponame>gridgentoo/ServiceFabricAzure
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using Common::ComUtility;
using namespace Common;
using namespace Api;
using namespace ServiceModel;
using namespace std;
using namespace Management::FaultAnalysisService;
ComFabricMovePrimaryResult::ComFabricMovePrimaryResult(
IMovePrimaryResultPtr const& impl)
: impl_(impl)
, heap_()
{
}
FABRIC_MOVE_PRIMARY_RESULT * STDMETHODCALLTYPE ComFabricMovePrimaryResult::get_Result()
{
auto result = impl_->GetMovePrimaryResult();
auto movePrimaryResultPtr = heap_.AddItem<FABRIC_MOVE_PRIMARY_RESULT>();
result->ToPublicApi(heap_, *movePrimaryResultPtr);
return movePrimaryResultPtr.GetRawPointer();
}
| 283 |
930 | package vip.mate.core.rabbitmq.config;
import org.springframework.context.annotation.Configuration;
/**
* RabbitMQ配置
*
* @author pangu
*/
@Configuration
public class RabbitMQConfiguration {
}
| 66 |
5,250 | /* 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.flowable.engine.impl.webservice;
import java.net.URL;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.xml.namespace.QName;
import org.apache.cxf.endpoint.Server;
import org.flowable.engine.impl.test.AbstractFlowableTestCase;
import org.flowable.engine.impl.test.PluggableFlowableExtension;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* An abstract class for unit test of web-service task
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
* @author <NAME>
*/
@Tag("webservice")
@Tag("pluggable")
@ExtendWith(MockWebServiceExtension.class)
@ExtendWith(PluggableFlowableExtension.class)
public abstract class AbstractWebServiceTaskTest extends AbstractFlowableTestCase {
public static final String WEBSERVICE_MOCK_ADDRESS = "http://localhost:63081/webservicemock";
protected WebServiceMock webServiceMock;
protected Server server;
protected ConcurrentMap<QName, URL> originalOverriddenEndpointAddresses;
@BeforeEach
protected void setUp(WebServiceMock webServiceMock, Server server) {
this.webServiceMock = webServiceMock;
this.server = server;
originalOverriddenEndpointAddresses = new ConcurrentHashMap<>(processEngineConfiguration.getWsOverridenEndpointAddresses());
}
@AfterEach
void tearDown() {
processEngineConfiguration.getWsOverridenEndpointAddresses().clear();
processEngineConfiguration.setWsOverridenEndpointAddresses(originalOverriddenEndpointAddresses);
}
}
| 700 |
3,436 | /// \file
// Range v3 library
//
// Copyright <NAME> 2014-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3
//
#ifndef RANGES_V3_VIEW_EMPTY_HPP
#define RANGES_V3_VIEW_EMPTY_HPP
#include <range/v3/range_fwd.hpp>
#include <range/v3/view/interface.hpp>
#include <range/v3/detail/prologue.hpp>
namespace ranges
{
/// \addtogroup group-views
/// @{
template<typename T>
struct empty_view : view_interface<empty_view<T>, (cardinality)0>
{
static_assert(std::is_object<T>::value,
"The template parameter to empty_view must be an object type.");
empty_view() = default;
static constexpr T * begin() noexcept
{
return nullptr;
}
static constexpr T * end() noexcept
{
return nullptr;
}
static constexpr std::size_t size() noexcept
{
return 0u;
}
static constexpr T * data() noexcept
{
return nullptr;
}
RANGES_DEPRECATED(
"Replace views::empty<T>() with views::empty<T>. "
"It is now a variable template.")
empty_view operator()() const
{
return *this;
}
};
template<typename T>
RANGES_INLINE_VAR constexpr bool enable_borrowed_range<empty_view<T>> = true;
namespace views
{
template<typename T>
RANGES_INLINE_VAR constexpr empty_view<T> empty{};
}
namespace cpp20
{
namespace views
{
using ranges::views::empty;
}
template(typename T)(
/// \pre
requires std::is_object<T>::value) //
using empty_view = ranges::empty_view<T>;
} // namespace cpp20
/// @}
} // namespace ranges
#include <range/v3/detail/epilogue.hpp>
#include <range/v3/detail/satisfy_boost_range.hpp>
RANGES_SATISFY_BOOST_RANGE(::ranges::empty_view)
#endif
| 1,008 |
4,310 | <reponame>Mu-L/thumbnailator
/*
* Thumbnailator - a thumbnail generation library
*
* Copyright (c) 2008-2020 <NAME>
*
* 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.
*/
package net.coobird.thumbnailator.util.exif;
/**
* Representation for the Orientation (Tag 274) in the Exif metadata, as
* defined in Section 4.6.4 of the Exif Specification version 2.3.
*
* @author coobird
*
*/
public enum Orientation
{
/**
* Orientation 1.
* <ul>
* <li>First row: visual top of the image</li>
* <li>First column: visual left-hand side of the image</li>
* </ul>
*/
TOP_LEFT(1),
/**
* Orientation 2.
* <ul>
* <li>First row: visual top of the image</li>
* <li>First column: visual right-hand side of the image</li>
* </ul>
*/
TOP_RIGHT(2),
/**
* Orientation 3.
* <ul>
* <li>First row: visual bottom of the image</li>
* <li>First column: visual right-hand side of the image</li>
* </ul>
*/
BOTTOM_RIGHT(3),
/**
* Orientation 4.
* <ul>
* <li>First row: visual bottom of the image</li>
* <li>First column: visual left-hand side of the image</li>
* </ul>
*/
BOTTOM_LEFT(4),
/**
* Orientation 5.
* <ul>
* <li>First row: visual left-hand side of the image</li>
* <li>First column: visual top of the image</li>
* </ul>
*/
LEFT_TOP(5),
/**
* Orientation 6.
* <ul>
* <li>First row: visual right-hand side of the image</li>
* <li>First column: visual top of the image</li>
* </ul>
*/
RIGHT_TOP(6),
/**
* Orientation 7.
* <ul>
* <li>First row: visual right-hand side of the image</li>
* <li>First column: visual bottom of the image</li>
* </ul>
*/
RIGHT_BOTTOM(7),
/**
* Orientation 8.
* <ul>
* <li>First row: visual left-hand side of the image</li>
* <li>First column: visual bottom of the image</li>
* </ul>
*/
LEFT_BOTTOM(8),
;
private int value;
private Orientation(int value)
{
this.value = value;
}
/**
* Returns the {@link Orientation} corresponding to the given orientation
* value.
*
* @param value The orientation value.
* @return {@link Orientation} corresponding to the orientation
* value. Return {@code null} if the given value does not
* correspond to a valid {@link Orientation}.
*/
public static Orientation typeOf(int value)
{
for (Orientation orientation : Orientation.values())
{
if (orientation.value == value)
{
return orientation;
}
}
return null;
}
/**
* Returns a textual {@link String} reprensentation of this enum.
* @return A textual representation of this enum.
*/
@Override
public String toString()
{
return "Orientation [type=" + value + "]";
}
}
| 1,289 |
4,047 | #!/usr/bin/env python3
print('ext/noext')
| 19 |
1,444 |
package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
/**
*
* @author jeffwadsworth
*/
public final class WaywardServant extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie");
static {
filter.add(SubType.ZOMBIE.getPredicate());
filter.add(AnotherPredicate.instance);
}
private static final String rule = "Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life.";
public WaywardServant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Whenever another Zombie enters the battlefield under your control, each opponent loses 1 life and you gain 1 life.
Effect effect = new LoseLifeOpponentsEffect(1);
Effect effect2 = new GainLifeEffect(1);
Ability ability = new EntersBattlefieldAllTriggeredAbility(effect, filter, rule);
ability.addEffect(effect2);
this.addAbility(ability);
}
private WaywardServant(final WaywardServant card) {
super(card);
}
@Override
public WaywardServant copy() {
return new WaywardServant(this);
}
}
| 628 |
748 | <filename>app/src/main/java/com/malmstein/yahnac/analytics/FirebaseAnalytics.java
package com.malmstein.yahnac.analytics;
import com.google.firebase.crash.FirebaseCrash;
public class FirebaseAnalytics implements CrashAnalytics {
@Override
public void logSomethingWentWrong(String errorMessage) {
FirebaseCrash.log(errorMessage);
}
@Override
public void logSomethingWentWrong(String errorMessage, Throwable throwable) {
FirebaseCrash.report(throwable);
}
}
| 175 |
892 | <reponame>westonsteimel/advisory-database-github
{
"schema_version": "1.2.0",
"id": "GHSA-8fr9-h4c8-rfgv",
"modified": "2022-05-01T07:10:51Z",
"published": "2022-05-01T07:10:51Z",
"aliases": [
"CVE-2006-3610"
],
"details": "index.php in Orbitcoders OrbitMATRIX 1.0 allows remote attackers to obtain sensitive information (partial database schema) via a modified page_name parameter, which reflects portions of an SQL query in the result. NOTE: it is not clear whether the information is target-specific. If not, then this issue is not an exposure.",
"severity": [
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-3610"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/439970/100/0/threaded"
}
],
"database_specific": {
"cwe_ids": [
],
"severity": "MODERATE",
"github_reviewed": false
}
} | 390 |
990 | /*
* Copyright (c) [2010-2019] <EMAIL> rights reserved.
*
* AntiSpy 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.
*/
#pragma once
#include "afxwin.h"
#include "FileFunc.h"
#include "afxcmn.h"
#include "Function.h"
#include "ConnectDriver.h"
// CMbrDlg dialog
class CMbrDlg : public CDialog
{
DECLARE_EASYSIZE
DECLARE_DYNAMIC(CMbrDlg)
public:
CMbrDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CMbrDlg();
// Dialog Data
enum { IDD = IDD_MBR_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual BOOL OnInitDialog();
void InitPhysicDrives();
PVOID ReadMBR();
CComboBox m_Drivers;
CFileFunc m_FileFunc;
CommonFunctions m_Functions;
CConnectDriver m_Driver;
CListCtrl m_list;
CString m_szStatus;
afx_msg void OnBnClickedBtnReadMbr();
afx_msg void OnBnClickedBtnSaveMbr();
afx_msg void OnBnClickedBtnRestoreMbr();
afx_msg void OnBnClickedBtnRestoreDefaultMbr();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnSize(UINT nType, int cx, int cy);
void RestoreMbrFormBackupFile(CString szPath);
HANDLE GetDiskHandle();
PVOID GetDefaultMBR(DWORD* dwSize);
BOOL CheckMBR();
BOOL WriteMBR(PVOID pBuffer, ULONG nWriteBytes);
afx_msg void OnDisemblyExportText();
afx_msg void OnDisemblyExportExcel();
afx_msg void OnNMRclickList(NMHDR *pNMHDR, LRESULT *pResult);
};
| 838 |
2,742 | <reponame>mshrutm/javamelody<gh_stars>1000+
package net.bull.javamelody;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
/**
* Jpa Entity pour test.
* @author <NAME>
*/
@Entity
@NamedQuery(name = "Person.findByName", query = "select p from Person p where p.name = :name")
public class Person {
@Id
@GeneratedValue
private long id;
private String name;
/**
* @return id
*/
public long getId() {
return id;
}
/**
* @return String
*/
public String getName() {
return name;
}
/**
* @param name String
*/
public void setName(String name) {
this.name = name;
}
}
| 258 |
2,151 | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_UTIL_H_
#define CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_UTIL_H_
#include <stdint.h>
#include <string>
#include <vector>
namespace arc {
namespace mojom {
class AccessibilityNodeInfoData;
enum class AccessibilityBooleanProperty;
enum class AccessibilityIntProperty;
enum class AccessibilityStringProperty;
enum class AccessibilityIntListProperty;
enum class AccessibilityStringListProperty;
} // namespace mojom
bool GetProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityBooleanProperty prop);
bool GetProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityIntProperty prop,
int32_t* out_value);
bool HasProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityStringProperty prop);
bool GetProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityStringProperty prop,
std::string* out_value);
bool GetProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityIntListProperty prop,
std::vector<int32_t>* out_value);
bool GetProperty(mojom::AccessibilityNodeInfoData* node,
mojom::AccessibilityStringListProperty prop,
std::vector<std::string>* out_value);
} // namespace arc
#endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_UTIL_H_
| 628 |
431 | <gh_stars>100-1000
/*
* Prime generation.
*/
#include <assert.h>
#include "ssh.h"
/*
* This prime generation algorithm is pretty much cribbed from
* OpenSSL. The algorithm is:
*
* - invent a B-bit random number and ensure the top and bottom
* bits are set (so it's definitely B-bit, and it's definitely
* odd)
*
* - see if it's coprime to all primes below 2^16; increment it by
* two until it is (this shouldn't take long in general)
*
* - perform the Miller-Rabin primality test enough times to
* ensure the probability of it being composite is 2^-80 or
* less
*
* - go back to square one if any M-R test fails.
*/
/*
* The Miller-Rabin primality test is an extension to the Fermat
* test. The Fermat test just checks that a^(p-1) == 1 mod p; this
* is vulnerable to Carmichael numbers. Miller-Rabin considers how
* that 1 is derived as well.
*
* Lemma: if a^2 == 1 (mod p), and p is prime, then either a == 1
* or a == -1 (mod p).
*
* Proof: p divides a^2-1, i.e. p divides (a+1)(a-1). Hence,
* since p is prime, either p divides (a+1) or p divides (a-1).
* But this is the same as saying that either a is congruent to
* -1 mod p or a is congruent to +1 mod p. []
*
* Comment: This fails when p is not prime. Consider p=mn, so
* that mn divides (a+1)(a-1). Now we could have m dividing (a+1)
* and n dividing (a-1), without the whole of mn dividing either.
* For example, consider a=10 and p=99. 99 = 9 * 11; 9 divides
* 10-1 and 11 divides 10+1, so a^2 is congruent to 1 mod p
* without a having to be congruent to either 1 or -1.
*
* So the Miller-Rabin test, as well as considering a^(p-1),
* considers a^((p-1)/2), a^((p-1)/4), and so on as far as it can
* go. In other words. we write p-1 as q * 2^k, with k as large as
* possible (i.e. q must be odd), and we consider the powers
*
* a^(q*2^0) a^(q*2^1) ... a^(q*2^(k-1)) a^(q*2^k)
* i.e. a^((n-1)/2^k) a^((n-1)/2^(k-1)) ... a^((n-1)/2) a^(n-1)
*
* If p is to be prime, the last of these must be 1. Therefore, by
* the above lemma, the one before it must be either 1 or -1. And
* _if_ it's 1, then the one before that must be either 1 or -1,
* and so on ... In other words, we expect to see a trailing chain
* of 1s preceded by a -1. (If we're unlucky, our trailing chain of
* 1s will be as long as the list so we'll never get to see what
* lies before it. This doesn't count as a test failure because it
* hasn't _proved_ that p is not prime.)
*
* For example, consider a=2 and p=1729. 1729 is a Carmichael
* number: although it's not prime, it satisfies a^(p-1) == 1 mod p
* for any a coprime to it. So the Fermat test wouldn't have a
* problem with it at all, unless we happened to stumble on an a
* which had a common factor.
*
* So. 1729 - 1 equals 27 * 2^6. So we look at
*
* 2^27 mod 1729 == 645
* 2^108 mod 1729 == 1065
* 2^216 mod 1729 == 1
* 2^432 mod 1729 == 1
* 2^864 mod 1729 == 1
* 2^1728 mod 1729 == 1
*
* We do have a trailing string of 1s, so the Fermat test would
* have been happy. But this trailing string of 1s is preceded by
* 1065; whereas if 1729 were prime, we'd expect to see it preceded
* by -1 (i.e. 1728.). Guards! Seize this impostor.
*
* (If we were unlucky, we might have tried a=16 instead of a=2;
* now 16^27 mod 1729 == 1, so we would have seen a long string of
* 1s and wouldn't have seen the thing _before_ the 1s. So, just
* like the Fermat test, for a given p there may well exist values
* of a which fail to show up its compositeness. So we try several,
* just like the Fermat test. The difference is that Miller-Rabin
* is not _in general_ fooled by Carmichael numbers.)
*
* Put simply, then, the Miller-Rabin test requires us to:
*
* 1. write p-1 as q * 2^k, with q odd
* 2. compute z = (a^q) mod p.
* 3. report success if z == 1 or z == -1.
* 4. square z at most k-1 times, and report success if it becomes
* -1 at any point.
* 5. report failure otherwise.
*
* (We expect z to become -1 after at most k-1 squarings, because
* if it became -1 after k squarings then a^(p-1) would fail to be
* 1. And we don't need to investigate what happens after we see a
* -1, because we _know_ that -1 squared is 1 modulo anything at
* all, so after we've seen a -1 we can be sure of seeing nothing
* but 1s.)
*/
/*
* The first few odd primes.
*
* import sys
* def sieve(n):
* z = []
* list = []
* for i in range(n): z.append(1)
* for i in range(2,n):
* if z[i]:
* list.append(i)
* for j in range(i,n,i): z[j] = 0
* return list
* list = sieve(65535)
* for i in list[1:]: sys.stdout.write("%d," % i)
*/
static const unsigned short primes[] = {
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,
41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83,
89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139,
149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331,
337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397,
401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461,
463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607,
613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673,
677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751,
757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827,
829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907,
911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983,
991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051,
1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123,
1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217,
1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291,
1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381,
1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459,
1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543,
1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609,
1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697,
1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783,
1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873,
1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973,
1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039,
2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129,
2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221,
2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297,
2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381,
2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459,
2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557,
2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663,
2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719,
2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801,
2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897,
2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999,
3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083,
3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191,
3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299,
3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361,
3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463,
3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541,
3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623,
3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709,
3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803,
3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907,
3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001,
4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079,
4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159,
4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259,
4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357,
4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457,
4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549,
4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649,
4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733,
4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831,
4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943,
4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011,
5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107,
5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227,
5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323,
5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419,
5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503,
5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591,
5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689,
5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791,
5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861,
5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981,
5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079,
6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173,
6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269,
6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343,
6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449,
6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563,
6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661,
6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761,
6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841,
6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949,
6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019,
7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129,
7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237,
7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349,
7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481,
7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549,
7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639,
7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723,
7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841,
7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933,
7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059,
8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161,
8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243,
8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353,
8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447,
8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573,
8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669,
8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741,
8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837,
8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941,
8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041,
9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151,
9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239,
9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341,
9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431,
9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511,
9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629,
9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733,
9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817,
9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907,
9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039,
10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139,
10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243,
10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321,
10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433,
10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531,
10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651,
10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739,
10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, 10861,
10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, 10973,
10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, 11083,
11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173,
11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287,
11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, 11399,
11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, 11497,
11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621,
11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743,
11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833,
11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939,
11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, 12041,
12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, 12143,
12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, 12251,
12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, 12347,
12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, 12451,
12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, 12539,
12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619,
12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721,
12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829,
12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, 12941,
12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, 13033,
13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, 13147,
13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, 13241,
13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, 13339,
13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, 13463,
13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, 13591,
13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691,
13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763,
13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879,
13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, 13997,
13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, 14087,
14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, 14243,
14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369,
14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, 14449,
14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, 14557,
14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, 14657,
14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753,
14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843,
14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947,
14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, 15077,
15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, 15173,
15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, 15271,
15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, 15359,
15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, 15451,
15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, 15569,
15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, 15661,
15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761,
15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877,
15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971,
15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, 16073,
16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, 16189,
16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, 16319,
16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, 16427,
16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, 16547,
16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, 16651,
16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, 16759,
16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889,
16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987,
16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093,
17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, 17203,
17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, 17327,
17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, 17393, 17401, 17417,
17419, 17431, 17443, 17449, 17467, 17471, 17477, 17483, 17489, 17491, 17497,
17509, 17519, 17539, 17551, 17569, 17573, 17579, 17581, 17597, 17599, 17609,
17623, 17627, 17657, 17659, 17669, 17681, 17683, 17707, 17713, 17729, 17737,
17747, 17749, 17761, 17783, 17789, 17791, 17807, 17827, 17837, 17839, 17851,
17863, 17881, 17891, 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957,
17959, 17971, 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049,
18059, 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143,
18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, 18251,
18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, 18329, 18341,
18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, 18433, 18439, 18443,
18451, 18457, 18461, 18481, 18493, 18503, 18517, 18521, 18523, 18539, 18541,
18553, 18583, 18587, 18593, 18617, 18637, 18661, 18671, 18679, 18691, 18701,
18713, 18719, 18731, 18743, 18749, 18757, 18773, 18787, 18793, 18797, 18803,
18839, 18859, 18869, 18899, 18911, 18913, 18917, 18919, 18947, 18959, 18973,
18979, 19001, 19009, 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081,
19087, 19121, 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213,
19219, 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319,
19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, 19427,
19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, 19483, 19489,
19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, 19577, 19583, 19597,
19603, 19609, 19661, 19681, 19687, 19697, 19699, 19709, 19717, 19727, 19739,
19751, 19753, 19759, 19763, 19777, 19793, 19801, 19813, 19819, 19841, 19843,
19853, 19861, 19867, 19889, 19891, 19913, 19919, 19927, 19937, 19949, 19961,
19963, 19973, 19979, 19991, 19993, 19997, 20011, 20021, 20023, 20029, 20047,
20051, 20063, 20071, 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143,
20147, 20149, 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249,
20261, 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357,
20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, 20477,
20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, 20563, 20593,
20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, 20707, 20717, 20719,
20731, 20743, 20747, 20749, 20753, 20759, 20771, 20773, 20789, 20807, 20809,
20849, 20857, 20873, 20879, 20887, 20897, 20899, 20903, 20921, 20929, 20939,
20947, 20959, 20963, 20981, 20983, 21001, 21011, 21013, 21017, 21019, 21023,
21031, 21059, 21061, 21067, 21089, 21101, 21107, 21121, 21139, 21143, 21149,
21157, 21163, 21169, 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247,
21269, 21277, 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379,
21383, 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491,
21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, 21569,
21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, 21649, 21661,
21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, 21757, 21767, 21773,
21787, 21799, 21803, 21817, 21821, 21839, 21841, 21851, 21859, 21863, 21871,
21881, 21893, 21911, 21929, 21937, 21943, 21961, 21977, 21991, 21997, 22003,
22013, 22027, 22031, 22037, 22039, 22051, 22063, 22067, 22073, 22079, 22091,
22093, 22109, 22111, 22123, 22129, 22133, 22147, 22153, 22157, 22159, 22171,
22189, 22193, 22229, 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291,
22303, 22307, 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433,
22441, 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543,
22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, 22651,
22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, 22739, 22741,
22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, 22853, 22859, 22861,
22871, 22877, 22901, 22907, 22921, 22937, 22943, 22961, 22963, 22973, 22993,
23003, 23011, 23017, 23021, 23027, 23029, 23039, 23041, 23053, 23057, 23059,
23063, 23071, 23081, 23087, 23099, 23117, 23131, 23143, 23159, 23167, 23173,
23189, 23197, 23201, 23203, 23209, 23227, 23251, 23269, 23279, 23291, 23293,
23297, 23311, 23321, 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417,
23431, 23447, 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557,
23561, 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629,
23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, 23747,
23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, 23831, 23833,
23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, 23911, 23917, 23929,
23957, 23971, 23977, 23981, 23993, 24001, 24007, 24019, 24023, 24029, 24043,
24049, 24061, 24071, 24077, 24083, 24091, 24097, 24103, 24107, 24109, 24113,
24121, 24133, 24137, 24151, 24169, 24179, 24181, 24197, 24203, 24223, 24229,
24239, 24247, 24251, 24281, 24317, 24329, 24337, 24359, 24371, 24373, 24379,
24391, 24407, 24413, 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499,
24509, 24517, 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631,
24659, 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767,
24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, 24889,
24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, 24979, 24989,
25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, 25111, 25117, 25121,
25127, 25147, 25153, 25163, 25169, 25171, 25183, 25189, 25219, 25229, 25237,
25243, 25247, 25253, 25261, 25301, 25303, 25307, 25309, 25321, 25339, 25343,
25349, 25357, 25367, 25373, 25391, 25409, 25411, 25423, 25439, 25447, 25453,
25457, 25463, 25469, 25471, 25523, 25537, 25541, 25561, 25577, 25579, 25583,
25589, 25601, 25603, 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673,
25679, 25693, 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793,
25799, 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913,
25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, 26003,
26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, 26113, 26119,
26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, 26209, 26227, 26237,
26249, 26251, 26261, 26263, 26267, 26293, 26297, 26309, 26317, 26321, 26339,
26347, 26357, 26371, 26387, 26393, 26399, 26407, 26417, 26423, 26431, 26437,
26449, 26459, 26479, 26489, 26497, 26501, 26513, 26539, 26557, 26561, 26573,
26591, 26597, 26627, 26633, 26641, 26647, 26669, 26681, 26683, 26687, 26693,
26699, 26701, 26711, 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777,
26783, 26801, 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881,
26891, 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987,
26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, 27091,
27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, 27239, 27241,
27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, 27337, 27361, 27367,
27397, 27407, 27409, 27427, 27431, 27437, 27449, 27457, 27479, 27481, 27487,
27509, 27527, 27529, 27539, 27541, 27551, 27581, 27583, 27611, 27617, 27631,
27647, 27653, 27673, 27689, 27691, 27697, 27701, 27733, 27737, 27739, 27743,
27749, 27751, 27763, 27767, 27773, 27779, 27791, 27793, 27799, 27803, 27809,
27817, 27823, 27827, 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941,
27943, 27947, 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031,
28051, 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151,
28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, 28289,
28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, 28409, 28411,
28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, 28513, 28517, 28537,
28541, 28547, 28549, 28559, 28571, 28573, 28579, 28591, 28597, 28603, 28607,
28619, 28621, 28627, 28631, 28643, 28649, 28657, 28661, 28663, 28669, 28687,
28697, 28703, 28711, 28723, 28729, 28751, 28753, 28759, 28771, 28789, 28793,
28807, 28813, 28817, 28837, 28843, 28859, 28867, 28871, 28879, 28901, 28909,
28921, 28927, 28933, 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027,
29033, 29059, 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153,
29167, 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251,
29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, 29383,
29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, 29453, 29473,
29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, 29581, 29587, 29599,
29611, 29629, 29633, 29641, 29663, 29669, 29671, 29683, 29717, 29723, 29741,
29753, 29759, 29761, 29789, 29803, 29819, 29833, 29837, 29851, 29863, 29867,
29873, 29879, 29881, 29917, 29921, 29927, 29947, 29959, 29983, 29989, 30011,
30013, 30029, 30047, 30059, 30071, 30089, 30091, 30097, 30103, 30109, 30113,
30119, 30133, 30137, 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211,
30223, 30241, 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323,
30341, 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469,
30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, 30577,
30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, 30697, 30703,
30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, 30809, 30817, 30829,
30839, 30841, 30851, 30853, 30859, 30869, 30871, 30881, 30893, 30911, 30931,
30937, 30941, 30949, 30971, 30977, 30983, 31013, 31019, 31033, 31039, 31051,
31063, 31069, 31079, 31081, 31091, 31121, 31123, 31139, 31147, 31151, 31153,
31159, 31177, 31181, 31183, 31189, 31193, 31219, 31223, 31231, 31237, 31247,
31249, 31253, 31259, 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333,
31337, 31357, 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489,
31511, 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601,
31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, 31723,
31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, 31847, 31849,
31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, 31981, 31991, 32003,
32009, 32027, 32029, 32051, 32057, 32059, 32063, 32069, 32077, 32083, 32089,
32099, 32117, 32119, 32141, 32143, 32159, 32173, 32183, 32189, 32191, 32203,
32213, 32233, 32237, 32251, 32257, 32261, 32297, 32299, 32303, 32309, 32321,
32323, 32327, 32341, 32353, 32359, 32363, 32369, 32371, 32377, 32381, 32401,
32411, 32413, 32423, 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503,
32507, 32531, 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603,
32609, 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717,
32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, 32833,
32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, 32941, 32957,
32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, 33029, 33037, 33049,
33053, 33071, 33073, 33083, 33091, 33107, 33113, 33119, 33149, 33151, 33161,
33179, 33181, 33191, 33199, 33203, 33211, 33223, 33247, 33287, 33289, 33301,
33311, 33317, 33329, 33331, 33343, 33347, 33349, 33353, 33359, 33377, 33391,
33403, 33409, 33413, 33427, 33457, 33461, 33469, 33479, 33487, 33493, 33503,
33521, 33529, 33533, 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599,
33601, 33613, 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703,
33713, 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797,
33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, 33911,
33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, 34033, 34039,
34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, 34159, 34171, 34183,
34211, 34213, 34217, 34231, 34253, 34259, 34261, 34267, 34273, 34283, 34297,
34301, 34303, 34313, 34319, 34327, 34337, 34351, 34361, 34367, 34369, 34381,
34403, 34421, 34429, 34439, 34457, 34469, 34471, 34483, 34487, 34499, 34501,
34511, 34513, 34519, 34537, 34543, 34549, 34583, 34589, 34591, 34603, 34607,
34613, 34631, 34649, 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721,
34729, 34739, 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843,
34847, 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961,
34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, 35089,
35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, 35171, 35201,
35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, 35311, 35317, 35323,
35327, 35339, 35353, 35363, 35381, 35393, 35401, 35407, 35419, 35423, 35437,
35447, 35449, 35461, 35491, 35507, 35509, 35521, 35527, 35531, 35533, 35537,
35543, 35569, 35573, 35591, 35593, 35597, 35603, 35617, 35671, 35677, 35729,
35731, 35747, 35753, 35759, 35771, 35797, 35801, 35803, 35809, 35831, 35837,
35839, 35851, 35863, 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951,
35963, 35969, 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037,
36061, 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161,
36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, 36293,
36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, 36389, 36433,
36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, 36523, 36527, 36529,
36541, 36551, 36559, 36563, 36571, 36583, 36587, 36599, 36607, 36629, 36637,
36643, 36653, 36671, 36677, 36683, 36691, 36697, 36709, 36713, 36721, 36739,
36749, 36761, 36767, 36779, 36781, 36787, 36791, 36793, 36809, 36821, 36833,
36847, 36857, 36871, 36877, 36887, 36899, 36901, 36913, 36919, 36923, 36929,
36931, 36943, 36947, 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039,
37049, 37057, 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181,
37189, 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309,
37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, 37409,
37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, 37511, 37517,
37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, 37579, 37589, 37591,
37607, 37619, 37633, 37643, 37649, 37657, 37663, 37691, 37693, 37699, 37717,
37747, 37781, 37783, 37799, 37811, 37813, 37831, 37847, 37853, 37861, 37871,
37879, 37889, 37897, 37907, 37951, 37957, 37963, 37967, 37987, 37991, 37993,
37997, 38011, 38039, 38047, 38053, 38069, 38083, 38113, 38119, 38149, 38153,
38167, 38177, 38183, 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261,
38273, 38281, 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351,
38371, 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543,
38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, 38651,
38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, 38723, 38729,
38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, 38833, 38839, 38851,
38861, 38867, 38873, 38891, 38903, 38917, 38921, 38923, 38933, 38953, 38959,
38971, 38977, 38993, 39019, 39023, 39041, 39043, 39047, 39079, 39089, 39097,
39103, 39107, 39113, 39119, 39133, 39139, 39157, 39161, 39163, 39181, 39191,
39199, 39209, 39217, 39227, 39229, 39233, 39239, 39241, 39251, 39293, 39301,
39313, 39317, 39323, 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397,
39409, 39419, 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521,
39541, 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667,
39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, 39779,
39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, 39863, 39869,
39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, 39979, 39983, 39989,
40009, 40013, 40031, 40037, 40039, 40063, 40087, 40093, 40099, 40111, 40123,
40127, 40129, 40151, 40153, 40163, 40169, 40177, 40189, 40193, 40213, 40231,
40237, 40241, 40253, 40277, 40283, 40289, 40343, 40351, 40357, 40361, 40387,
40423, 40427, 40429, 40433, 40459, 40471, 40483, 40487, 40493, 40499, 40507,
40519, 40529, 40531, 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627,
40637, 40639, 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771,
40787, 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867,
40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, 40993,
41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, 41113, 41117,
41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, 41189, 41201, 41203,
41213, 41221, 41227, 41231, 41233, 41243, 41257, 41263, 41269, 41281, 41299,
41333, 41341, 41351, 41357, 41381, 41387, 41389, 41399, 41411, 41413, 41443,
41453, 41467, 41479, 41491, 41507, 41513, 41519, 41521, 41539, 41543, 41549,
41579, 41593, 41597, 41603, 41609, 41611, 41617, 41621, 41627, 41641, 41647,
41651, 41659, 41669, 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771,
41777, 41801, 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893,
41897, 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981,
41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, 42083,
42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, 42193, 42197,
42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, 42293, 42299, 42307,
42323, 42331, 42337, 42349, 42359, 42373, 42379, 42391, 42397, 42403, 42407,
42409, 42433, 42437, 42443, 42451, 42457, 42461, 42463, 42467, 42473, 42487,
42491, 42499, 42509, 42533, 42557, 42569, 42571, 42577, 42589, 42611, 42641,
42643, 42649, 42667, 42677, 42683, 42689, 42697, 42701, 42703, 42709, 42719,
42727, 42737, 42743, 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829,
42839, 42841, 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943,
42953, 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051,
43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, 43201,
43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, 43321, 43331,
43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, 43457, 43481, 43487,
43499, 43517, 43541, 43543, 43573, 43577, 43579, 43591, 43597, 43607, 43609,
43613, 43627, 43633, 43649, 43651, 43661, 43669, 43691, 43711, 43717, 43721,
43753, 43759, 43777, 43781, 43783, 43787, 43789, 43793, 43801, 43853, 43867,
43889, 43891, 43913, 43933, 43943, 43951, 43961, 43963, 43969, 43973, 43987,
43991, 43997, 44017, 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087,
44089, 44101, 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189,
44201, 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279,
44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, 44453,
44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, 44543, 44549,
44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, 44647, 44651, 44657,
44683, 44687, 44699, 44701, 44711, 44729, 44741, 44753, 44771, 44773, 44777,
44789, 44797, 44809, 44819, 44839, 44843, 44851, 44867, 44879, 44887, 44893,
44909, 44917, 44927, 44939, 44953, 44959, 44963, 44971, 44983, 44987, 45007,
45013, 45053, 45061, 45077, 45083, 45119, 45121, 45127, 45131, 45137, 45139,
45161, 45179, 45181, 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289,
45293, 45307, 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389,
45403, 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533,
45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, 45659,
45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, 45763, 45767,
45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, 45863, 45869, 45887,
45893, 45943, 45949, 45953, 45959, 45971, 45979, 45989, 46021, 46027, 46049,
46051, 46061, 46073, 46091, 46093, 46099, 46103, 46133, 46141, 46147, 46153,
46171, 46181, 46183, 46187, 46199, 46219, 46229, 46237, 46261, 46271, 46273,
46279, 46301, 46307, 46309, 46327, 46337, 46349, 46351, 46381, 46399, 46411,
46439, 46441, 46447, 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511,
46523, 46549, 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639,
46643, 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747,
46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, 46853,
46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, 46997, 47017,
47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, 47123, 47129, 47137,
47143, 47147, 47149, 47161, 47189, 47207, 47221, 47237, 47251, 47269, 47279,
47287, 47293, 47297, 47303, 47309, 47317, 47339, 47351, 47353, 47363, 47381,
47387, 47389, 47407, 47417, 47419, 47431, 47441, 47459, 47491, 47497, 47501,
47507, 47513, 47521, 47527, 47533, 47543, 47563, 47569, 47581, 47591, 47599,
47609, 47623, 47629, 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711,
47713, 47717, 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809,
47819, 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939,
47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, 48073,
48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, 48187, 48193,
48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, 48311, 48313, 48337,
48341, 48353, 48371, 48383, 48397, 48407, 48409, 48413, 48437, 48449, 48463,
48473, 48479, 48481, 48487, 48491, 48497, 48523, 48527, 48533, 48539, 48541,
48563, 48571, 48589, 48593, 48611, 48619, 48623, 48647, 48649, 48661, 48673,
48677, 48679, 48731, 48733, 48751, 48757, 48761, 48767, 48779, 48781, 48787,
48799, 48809, 48817, 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883,
48889, 48907, 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031,
49033, 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123,
49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, 49223,
49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, 49363, 49367,
49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, 49451, 49459, 49463,
49477, 49481, 49499, 49523, 49529, 49531, 49537, 49547, 49549, 49559, 49597,
49603, 49613, 49627, 49633, 49639, 49663, 49667, 49669, 49681, 49697, 49711,
49727, 49739, 49741, 49747, 49757, 49783, 49787, 49789, 49801, 49807, 49811,
49823, 49831, 49843, 49853, 49871, 49877, 49891, 49919, 49921, 49927, 49937,
49939, 49943, 49957, 49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051,
50053, 50069, 50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131,
50147, 50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273,
50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, 50383,
50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, 50513, 50527,
50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, 50599, 50627, 50647,
50651, 50671, 50683, 50707, 50723, 50741, 50753, 50767, 50773, 50777, 50789,
50821, 50833, 50839, 50849, 50857, 50867, 50873, 50891, 50893, 50909, 50923,
50929, 50951, 50957, 50969, 50971, 50989, 50993, 51001, 51031, 51043, 51047,
51059, 51061, 51071, 51109, 51131, 51133, 51137, 51151, 51157, 51169, 51193,
51197, 51199, 51203, 51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287,
51307, 51329, 51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419,
51421, 51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487,
51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, 51599,
51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, 51691, 51713,
51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, 51817, 51827, 51829,
51839, 51853, 51859, 51869, 51871, 51893, 51899, 51907, 51913, 51929, 51941,
51949, 51971, 51973, 51977, 51991, 52009, 52021, 52027, 52051, 52057, 52067,
52069, 52081, 52103, 52121, 52127, 52147, 52153, 52163, 52177, 52181, 52183,
52189, 52201, 52223, 52237, 52249, 52253, 52259, 52267, 52289, 52291, 52301,
52313, 52321, 52361, 52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457,
52489, 52501, 52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571,
52579, 52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709,
52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, 52817,
52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, 52937, 52951,
52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, 53047, 53051, 53069,
53077, 53087, 53089, 53093, 53101, 53113, 53117, 53129, 53147, 53149, 53161,
53171, 53173, 53189, 53197, 53201, 53231, 53233, 53239, 53267, 53269, 53279,
53281, 53299, 53309, 53323, 53327, 53353, 53359, 53377, 53381, 53401, 53407,
53411, 53419, 53437, 53441, 53453, 53479, 53503, 53507, 53527, 53549, 53551,
53569, 53591, 53593, 53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639,
53653, 53657, 53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777,
53783, 53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891,
53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, 54001,
54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, 54133, 54139,
54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, 54277, 54287, 54293,
54311, 54319, 54323, 54331, 54347, 54361, 54367, 54371, 54377, 54401, 54403,
54409, 54413, 54419, 54421, 54437, 54443, 54449, 54469, 54493, 54497, 54499,
54503, 54517, 54521, 54539, 54541, 54547, 54559, 54563, 54577, 54581, 54583,
54601, 54617, 54623, 54629, 54631, 54647, 54667, 54673, 54679, 54709, 54713,
54721, 54727, 54751, 54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851,
54869, 54877, 54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979,
54983, 55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103,
55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, 55219,
55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, 55339, 55343,
55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, 55469, 55487, 55501,
55511, 55529, 55541, 55547, 55579, 55589, 55603, 55609, 55619, 55621, 55631,
55633, 55639, 55661, 55663, 55667, 55673, 55681, 55691, 55697, 55711, 55717,
55721, 55733, 55763, 55787, 55793, 55799, 55807, 55813, 55817, 55819, 55823,
55829, 55837, 55843, 55849, 55871, 55889, 55897, 55901, 55903, 55921, 55927,
55931, 55933, 55949, 55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053,
56081, 56087, 56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171,
56179, 56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299,
56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, 56437,
56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, 56509, 56519,
56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, 56611, 56629, 56633,
56659, 56663, 56671, 56681, 56687, 56701, 56711, 56713, 56731, 56737, 56747,
56767, 56773, 56779, 56783, 56807, 56809, 56813, 56821, 56827, 56843, 56857,
56873, 56891, 56893, 56897, 56909, 56911, 56921, 56923, 56929, 56941, 56951,
56957, 56963, 56983, 56989, 56993, 56999, 57037, 57041, 57047, 57059, 57073,
57077, 57089, 57097, 57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173,
57179, 57191, 57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271,
57283, 57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389,
57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, 57557,
57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, 57667, 57679,
57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, 57751, 57773, 57781,
57787, 57791, 57793, 57803, 57809, 57829, 57839, 57847, 57853, 57859, 57881,
57899, 57901, 57917, 57923, 57943, 57947, 57973, 57977, 57991, 58013, 58027,
58031, 58043, 58049, 58057, 58061, 58067, 58073, 58099, 58109, 58111, 58129,
58147, 58151, 58153, 58169, 58171, 58189, 58193, 58199, 58207, 58211, 58217,
58229, 58231, 58237, 58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367,
58369, 58379, 58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451,
58453, 58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601,
58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, 58727,
58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, 58897, 58901,
58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, 58979, 58991, 58997,
59009, 59011, 59021, 59023, 59029, 59051, 59053, 59063, 59069, 59077, 59083,
59093, 59107, 59113, 59119, 59123, 59141, 59149, 59159, 59167, 59183, 59197,
59207, 59209, 59219, 59221, 59233, 59239, 59243, 59263, 59273, 59281, 59333,
59341, 59351, 59357, 59359, 59369, 59377, 59387, 59393, 59399, 59407, 59417,
59419, 59441, 59443, 59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513,
59539, 59557, 59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651,
59659, 59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747,
59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, 59921,
59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, 60037, 60041,
60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, 60133, 60139, 60149,
60161, 60167, 60169, 60209, 60217, 60223, 60251, 60257, 60259, 60271, 60289,
60293, 60317, 60331, 60337, 60343, 60353, 60373, 60383, 60397, 60413, 60427,
60443, 60449, 60457, 60493, 60497, 60509, 60521, 60527, 60539, 60589, 60601,
60607, 60611, 60617, 60623, 60631, 60637, 60647, 60649, 60659, 60661, 60679,
60689, 60703, 60719, 60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779,
60793, 60811, 60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917,
60919, 60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043,
61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, 61211,
61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, 61339, 61343,
61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, 61463, 61469, 61471,
61483, 61487, 61493, 61507, 61511, 61519, 61543, 61547, 61553, 61559, 61561,
61583, 61603, 61609, 61613, 61627, 61631, 61637, 61643, 61651, 61657, 61667,
61673, 61681, 61687, 61703, 61717, 61723, 61729, 61751, 61757, 61781, 61813,
61819, 61837, 61843, 61861, 61871, 61879, 61909, 61927, 61933, 61949, 61961,
61967, 61979, 61981, 61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053,
62057, 62071, 62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171,
62189, 62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303,
62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, 62467,
62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, 62563, 62581,
62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, 62659, 62683, 62687,
62701, 62723, 62731, 62743, 62753, 62761, 62773, 62791, 62801, 62819, 62827,
62851, 62861, 62869, 62873, 62897, 62903, 62921, 62927, 62929, 62939, 62969,
62971, 62981, 62983, 62987, 62989, 63029, 63031, 63059, 63067, 63073, 63079,
63097, 63103, 63113, 63127, 63131, 63149, 63179, 63197, 63199, 63211, 63241,
63247, 63277, 63281, 63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353,
63361, 63367, 63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443,
63463, 63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559,
63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, 63649,
63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, 63727, 63737,
63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, 63823, 63839, 63841,
63853, 63857, 63863, 63901, 63907, 63913, 63929, 63949, 63977, 63997, 64007,
64013, 64019, 64033, 64037, 64063, 64067, 64081, 64091, 64109, 64123, 64151,
64153, 64157, 64171, 64187, 64189, 64217, 64223, 64231, 64237, 64271, 64279,
64283, 64301, 64303, 64319, 64327, 64333, 64373, 64381, 64399, 64403, 64433,
64439, 64451, 64453, 64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579,
64591, 64601, 64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679,
64693, 64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849,
64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, 64951,
64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, 65071, 65089,
65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173,
65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309,
65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423,
65437, 65447, 65449, 65479, 65497, 65519, 65521,
};
#define NPRIMES (sizeof(primes) / sizeof(*primes))
/*
* Generate a prime. We can deal with various extra properties of
* the prime:
*
* - to speed up use in RSA, we can arrange to select a prime with
* the property (prime % modulus) != residue.
*
* - for use in DSA, we can arrange to select a prime which is one
* more than a multiple of a dirty great bignum. In this case
* `bits' gives the size of the factor by which we _multiply_
* that bignum, rather than the size of the whole number.
*
* - for the basically cosmetic purposes of generating keys of the
* length actually specified rather than off by one bit, we permit
* the caller to provide an unsigned integer 'firstbits' which will
* match the top few bits of the returned prime. (That is, there
* will exist some n such that (returnvalue >> n) == firstbits.) If
* 'firstbits' is not needed, specifying it to either 0 or 1 is
* an adequate no-op.
*/
Bignum primegen(int bits,
int modulus,
int residue,
Bignum factor,
int phase,
progfn_t pfn,
void *pfnparam,
unsigned firstbits)
{
int i, k, v, byte, bitsleft, check, checks, fbsize;
unsigned long delta;
unsigned long moduli[NPRIMES + 1];
unsigned long residues[NPRIMES + 1];
unsigned long multipliers[NPRIMES + 1];
Bignum p, pm1, q, wqp, wqp2;
int progress = 0;
byte = 0;
bitsleft = 0;
fbsize = 0;
while (firstbits >> fbsize) /* work out how to align this */
fbsize++;
STARTOVER:
pfn(pfnparam, PROGFN_PROGRESS, phase, ++progress);
/*
* Generate a k-bit random number with top and bottom bits set.
* Alternatively, if `factor' is nonzero, generate a k-bit
* random number with the top bit set and the bottom bit clear,
* multiply it by `factor', and add one.
*/
p = bn_power_2(bits - 1);
for (i = 0; i < bits; i++) {
if (i == 0 || i == bits - 1) {
v = (i != 0 || !factor) ? 1 : 0;
} else if (i >= bits - fbsize) {
v = (firstbits >> (i - (bits - fbsize))) & 1;
} else {
if (bitsleft <= 0)
bitsleft = 8, byte = random_byte();
v = byte & 1;
byte >>= 1;
bitsleft--;
}
bignum_set_bit(p, i, v);
}
if (factor) {
Bignum tmp = p;
p = bigmul(tmp, factor);
freebn(tmp);
assert(bignum_bit(p, 0) == 0);
bignum_set_bit(p, 0, 1);
}
/*
* Ensure this random number is coprime to the first few
* primes, by repeatedly adding either 2 or 2*factor to it
* until it is.
*/
for (i = 0; i < NPRIMES; i++) {
moduli[i] = primes[i];
residues[i] = bignum_mod_short(p, primes[i]);
if (factor)
multipliers[i] = bignum_mod_short(factor, primes[i]);
else
multipliers[i] = 1;
}
moduli[NPRIMES] = modulus;
residues[NPRIMES] =
(bignum_mod_short(p, (unsigned short)modulus) + modulus - residue);
if (factor)
multipliers[NPRIMES] = bignum_mod_short(factor, modulus);
else
multipliers[NPRIMES] = 1;
delta = 0;
while (1) {
for (i = 0; i < (sizeof(moduli) / sizeof(*moduli)); i++)
if (!((residues[i] + delta * multipliers[i]) % moduli[i]))
break;
if (i < (sizeof(moduli) / sizeof(*moduli))) { /* we broke */
delta += 2;
if (delta > 65536) {
freebn(p);
goto STARTOVER;
}
continue;
}
break;
}
q = p;
if (factor) {
Bignum tmp;
tmp = bignum_from_long(delta);
p = bigmuladd(tmp, factor, q);
freebn(tmp);
} else {
p = bignum_add_long(q, delta);
}
freebn(q);
/*
* Now apply the Miller-Rabin primality test a few times. First
* work out how many checks are needed.
*/
checks = 27;
if (bits >= 150)
checks = 18;
if (bits >= 200)
checks = 15;
if (bits >= 250)
checks = 12;
if (bits >= 300)
checks = 9;
if (bits >= 350)
checks = 8;
if (bits >= 400)
checks = 7;
if (bits >= 450)
checks = 6;
if (bits >= 550)
checks = 5;
if (bits >= 650)
checks = 4;
if (bits >= 850)
checks = 3;
if (bits >= 1300)
checks = 2;
/*
* Next, write p-1 as q*2^k.
*/
for (k = 0; bignum_bit(p, k) == !k; k++)
continue; /* find first 1 bit in p-1 */
q = bignum_rshift(p, k);
/* And store p-1 itself, which we'll need. */
pm1 = copybn(p);
decbn(pm1);
/*
* Now, for each check ...
*/
for (check = 0; check < checks; check++) {
Bignum w;
/*
* Invent a random number between 1 and p-1 inclusive.
*/
while (1) {
w = bn_power_2(bits - 1);
for (i = 0; i < bits; i++) {
if (bitsleft <= 0)
bitsleft = 8, byte = random_byte();
v = byte & 1;
byte >>= 1;
bitsleft--;
bignum_set_bit(w, i, v);
}
bn_restore_invariant(w);
if (bignum_cmp(w, p) >= 0 || bignum_cmp(w, Zero) == 0) {
freebn(w);
continue;
}
break;
}
pfn(pfnparam, PROGFN_PROGRESS, phase, ++progress);
/*
* Compute w^q mod p.
*/
wqp = modpow(w, q, p);
freebn(w);
/*
* See if this is 1, or if it is -1, or if it becomes -1
* when squared at most k-1 times.
*/
if (bignum_cmp(wqp, One) == 0 || bignum_cmp(wqp, pm1) == 0) {
freebn(wqp);
continue;
}
for (i = 0; i < k - 1; i++) {
wqp2 = modmul(wqp, wqp, p);
freebn(wqp);
wqp = wqp2;
if (bignum_cmp(wqp, pm1) == 0)
break;
}
if (i < k - 1) {
freebn(wqp);
continue;
}
/*
* It didn't. Therefore, w is a witness for the
* compositeness of p.
*/
freebn(wqp);
freebn(p);
freebn(pm1);
freebn(q);
goto STARTOVER;
}
/*
* We have a prime!
*/
freebn(q);
freebn(pm1);
return p;
}
/*
* Invent a pair of values suitable for use as 'firstbits' in the
* above function, such that their product is at least 2.
*
* This is used for generating both RSA and DSA keys which have
* exactly the specified number of bits rather than one fewer - if you
* generate an a-bit and a b-bit number completely at random and
* multiply them together, you could end up with either an (ab-1)-bit
* number or an (ab)-bit number. The former happens log(2)*2-1 of the
* time (about 39%) and, though actually harmless, every time it
* occurs it has a non-zero probability of sparking a user email along
* the lines of 'Hey, I asked PuTTYgen for a 2048-bit key and I only
* got 2047 bits! Bug!'
*/
void invent_firstbits(unsigned *one, unsigned *two)
{
/*
* Our criterion is that any number in the range [one,one+1)
* multiplied by any number in the range [two,two+1) should have
* the highest bit set. It should be clear that we can trivially
* test this by multiplying the smallest values in each interval,
* i.e. the ones we actually invented.
*/
do {
*one = 0x100 | random_byte();
*two = 0x100 | random_byte();
} while (*one * *two < 0x20000);
}
| 28,958 |
360 | from collections import defaultdict
import numpy as np
import pybullet as p
from igibson.metrics.metric_base import MetricBase
class GazeVizMarker(object):
"""
Spherical visual marker that can be used to visualize gaze.
Does not load into PyBullet, so shouldn't affect determinism.
"""
def __init__(self, s, radius, color=[1, 0, 0]):
self.s = s
self.radius = radius
self.color = color
self.marker_instance = self.s.load_visual_sphere(self.radius, color=self.color)
def set_pos(self, pos):
self.marker_instance.set_position(pos)
class GazeMetric(MetricBase):
def __init__(self):
self.target_obj = -1
self.disallowed_categories = ["walls", "floors", "ceilings"]
self.gaze_max_distance = 100.0
self.object_gaze_time_map = defaultdict(int)
self.task_obj_info = None
self.obj_info_map = None
self.gaze_marker = None
def start_callback(self, igbhvr_act_inst, _):
self.name_to_category = {
obj.name: obj.category for obj in igbhvr_act_inst.simulator.scene.objects_by_name.values()
}
self.task_obj_info = {obj.name: obj.category for obj in igbhvr_act_inst.object_scope.values()}
self.gaze_marker = GazeVizMarker(igbhvr_act_inst.simulator, 0.02)
def step_callback(self, igbhvr_act_inst, log_reader):
s = igbhvr_act_inst.simulator
eye_data = log_reader.get_vr_data().query("eye_data")
if eye_data[0]:
if self.target_obj in s.scene.objects_by_id:
s.scene.objects_by_id[self.target_obj].unhighlight()
origin = eye_data[1]
direction = eye_data[2]
intersection = p.rayTest(origin, np.array(origin) + (np.array(direction) * self.gaze_max_distance))
self.target_obj = intersection[0][0]
if self.target_obj in s.scene.objects_by_id:
obj = s.scene.objects_by_id[self.target_obj]
if obj.category not in self.disallowed_categories:
obj.highlight()
self.gaze_marker.set_pos(intersection[0][3])
self.object_gaze_time_map[obj.name] += 1
def gather_results(self):
return {
"object_gaze_time_map": self.object_gaze_time_map,
"task_obj_info": self.task_obj_info,
"object_info_map": self.obj_info_map,
"name_to_category": self.name_to_category,
}
| 1,158 |
784 | <gh_stars>100-1000
#include "devices.h"
#include "processor.h"
#define RBR 0
#define THR 0
#define IER 1
#define IIR 2
#define FCR 2
#define LCR 3
#define MCR 4
#define LSR 5
#define MSR 6
#define SCR 7
#define DLL 0
#define DLM 1
#define THRE 5 // transmit holding register empty
#define TEMT 6 // transmit holding register empty
uart_t::uart_t()
{
dll = 0;
dlm = 0;
ier = 0;
lcr = 0;
mcr = 0;
lsr = 0;
msr = 0;
scr = 0;
}
// set {char} 0x10000004 = 0x00
// set {char} 0x1000000C = 0x80
// set {char} 0x10000000 = 0x1B
// set {char} 0x10000004 = 0x00
// set {char} 0x1000000C = 0x03
// set {char} 0x10000008 = 0xC7
bool uart_t::load(reg_t addr, size_t len, uint8_t* bytes)
{
// we do not support unaligned stores
if ((addr & 0x3) != 0) {
return false;
}
switch ((addr >> 0x2) & 0x7) {
case THR:
// access DLL
if (lcr & 0x80) {
bytes[0] = dll;
} else {
// TODO(zarubaf)
// printf("%c", bytes[0]);
bytes[0] = 0;
}
break;
case IER:
// access DLM
if (lcr & 0x80) {
bytes[0] = dlm;
} else {
bytes[0] = ier;
}
break;
case IIR:
if (fifo_enabled) {
bytes[0] = 0xC0;
} else {
bytes[0] = 0x00;
}
break;
case LCR:
bytes[0] = lcr;
break;
case MCR:
bytes[0] = mcr;
break;
case LSR:
bytes[0] = lsr | (1 << THRE) | (1 << TEMT);
break;
case MSR:
bytes[0] = msr;
break;
case SCR:
bytes[0] = scr;
break;
}
return true;
}
bool uart_t::store(reg_t addr, size_t len, const uint8_t* bytes)
{
// we do not support unaligned stores
if ((addr & 0x3) != 0) {
return false;
}
switch ((addr >> 0x2) & 0x7) {
case THR:
// access DLL
if (lcr & 0x80) {
dll = bytes[0];
} else {
printf("%c", bytes[0]);
}
break;
case IER:
// access DLM
if (lcr & 0x80) {
dlm = bytes[0];
} else {
ier = bytes[0] & 0xF;
}
break;
case FCR:
if (bytes[0] & 0x1) {
fifo_enabled = true;
} else {
fifo_enabled = false;
}
break;
case LCR:
lcr = bytes[0];
break;
case MCR:
mcr = bytes[0] & 0x1F;
break;
case LSR:
lsr = bytes[0];
break;
case MSR:
msr = bytes[0];
break;
case SCR:
scr = bytes[0];
break;
}
return true;
}
| 1,850 |
651 | <gh_stars>100-1000
package org.lwjglb.engine.loaders.assimp;
import org.joml.Matrix4f;
public class Bone {
private final int boneId;
private final String boneName;
private Matrix4f offsetMatrix;
public Bone(int boneId, String boneName, Matrix4f offsetMatrix) {
this.boneId = boneId;
this.boneName = boneName;
this.offsetMatrix = offsetMatrix;
}
public int getBoneId() {
return boneId;
}
public String getBoneName() {
return boneName;
}
public Matrix4f getOffsetMatrix() {
return offsetMatrix;
}
}
| 241 |
1,450 | /*
* 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.
*/
#ifndef GUAC_WOL_CONSTANTS_H
#define GUAC_WOL_CONSTANTS_H
/**
* Header file that provides constants and defaults related to libguac
* Wake-on-LAN support.
*
* @file wol-constants.h
*/
/**
* The value for the local IPv4 broadcast address.
*/
#define GUAC_WOL_LOCAL_IPV4_BROADCAST "255.255.255.255"
/**
* The size of the magic Wake-on-LAN packet to send to wake a remote host. This
* consists of 6 bytes of 0xFF, and then the MAC address repeated 16 times.
* https://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
*/
#define GUAC_WOL_PACKET_SIZE 102
/**
* The port number that the magic packet should contain as the destination. In
* reality this doesn't matter all that much, since the packet is not usually
* processed by a full IP stack, but defining one is considered a standard
* practice.
*/
#define GUAC_WOL_PORT 9
#endif /* GUAC_WOL_CONSTANTS_H */
| 490 |
3,457 | <filename>src/Eigen-3.3/failtest/eigensolver_int.cpp
#include "../Eigen/Eigenvalues"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main()
{
EigenSolver<Matrix<SCALAR,Dynamic,Dynamic> > eig(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));
}
| 129 |
648 | {"resourceType":"CodeSystem","id":"encounter-special-arrangements","meta":{"lastUpdated":"2019-11-01T09:29:23.356+11:00","profile":["http://hl7.org/fhir/StructureDefinition/shareablecodesystem"]},"text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <h2>Special arrangements</h2>\n <div>\n <p>This value set defines a set of codes that can be used to indicate the kinds of special arrangements in place for a patients visit.</p>\n\n </div>\n <p>This code system http://terminology.hl7.org/CodeSystem/encounter-special-arrangements defines the following codes:</p>\n <table class=\"codes\">\n <tr>\n <td style=\"white-space:nowrap\">\n <b>Code</b>\n </td>\n <td>\n <b>Display</b>\n </td>\n <td>\n <b>Definition</b>\n </td>\n </tr>\n <tr>\n <td style=\"white-space:nowrap\">wheel\n <a name=\"encounter-special-arrangements-wheel\"> </a>\n </td>\n <td>Wheelchair</td>\n <td>The patient requires a wheelchair to be made available for the encounter.</td>\n </tr>\n <tr>\n <td style=\"white-space:nowrap\">add-bed\n <a name=\"encounter-special-arrangements-add-bed\"> </a>\n </td>\n <td>Additional bedding</td>\n <td>An additional bed made available for a person accompanying the patient, for example a parent accompanying a child.</td>\n </tr>\n <tr>\n <td style=\"white-space:nowrap\">int\n <a name=\"encounter-special-arrangements-int\"> </a>\n </td>\n <td>Interpreter</td>\n <td>The patient is not fluent in the local language and requires an interpreter to be available. Refer to the Patient.Language property for the type of interpreter required.</td>\n </tr>\n <tr>\n <td style=\"white-space:nowrap\">att\n <a name=\"encounter-special-arrangements-att\"> </a>\n </td>\n <td>Attendant</td>\n <td>A person who accompanies a patient to provide assistive services necessary for the patient's care during the encounter.</td>\n </tr>\n <tr>\n <td style=\"white-space:nowrap\">dog\n <a name=\"encounter-special-arrangements-dog\"> </a>\n </td>\n <td>Guide dog</td>\n <td>The patient has a guide dog and the location used for the encounter should be able to support the presence of the service animal.</td>\n </tr>\n </table>\n </div>"},"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-wg","valueCode":"pa"}],"url":"http://terminology.hl7.org/CodeSystem/encounter-special-arrangements","identifier":[{"system":"urn:ietf:rfc:3986","value":"urn:oid:2.16.840.1.113883.4.642.4.1090"}],"version":"4.0.1","name":"SpecialArrangements","title":"Special arrangements","status":"draft","experimental":false,"publisher":"FHIR Project team","contact":[{"telecom":[{"system":"url","value":"http://hl7.org/fhir"}]}],"description":"This value set defines a set of codes that can be used to indicate the kinds of special arrangements in place for a patients visit.","caseSensitive":true,"valueSet":"http://hl7.org/fhir/ValueSet/encounter-special-arrangements","content":"complete","concept":[{"code":"wheel","display":"Wheelchair","definition":"The patient requires a wheelchair to be made available for the encounter."},{"code":"add-bed","display":"Additional bedding","definition":"An additional bed made available for a person accompanying the patient, for example a parent accompanying a child."},{"code":"int","display":"Interpreter","definition":"The patient is not fluent in the local language and requires an interpreter to be available. Refer to the Patient.Language property for the type of interpreter required."},{"code":"att","display":"Attendant","definition":"A person who accompanies a patient to provide assistive services necessary for the patient's care during the encounter."},{"code":"dog","display":"Guide dog","definition":"The patient has a guide dog and the location used for the encounter should be able to support the presence of the service animal."}]} | 1,897 |
1,109 | <reponame>qiquanzhijia/gryphon<gh_stars>1000+
# -*- coding: utf-8 -*-
from datetime import datetime
import uuid
from sqlalchemy import Column, Unicode, UnicodeText, DateTime, Integer, Numeric
from sqlalchemy.orm import relationship, backref
from gryphon.lib.models.base import Base
from gryphon.lib.money import Money
metadata = Base.metadata
class Result(Base):
__tablename__ = 'result'
result_id = Column(Integer, primary_key=True)
ticks = Column(Integer, nullable=False)
unique_id = Column(Unicode(64), nullable=False)
algorithm = Column(Unicode(64), nullable=False)
batch = Column(Unicode(64), nullable=False)
_trading_volume = Column('trading_volume', Numeric(precision=20, scale=10))
_usd = Column('usd', Numeric(precision=20, scale=10))
_btc = Column('btc', Numeric(precision=20, scale=10))
time_created = Column(DateTime, nullable=False)
trades = relationship('ResultTrade', cascade="all,delete-orphan", backref='result')
def __init__(self, usd, btc, trading_volume, algorithm, batch, ticks):
self.unique_id = unicode(uuid.uuid4().hex)
self.time_created = datetime.utcnow()
self.algorithm = algorithm
self.batch = batch
self.usd = usd
self.btc = btc
self.ticks = ticks
self.trading_volume = trading_volume
@property
def trading_volume(self):
return Money(self._trading_volume, 'BTC')
@trading_volume.setter
def trading_volume(self, value):
self._trading_volume = value.amount
@property
def btc(self):
return Money(self._btc, 'BTC')
@btc.setter
def btc(self, value):
self._btc = value.amount
@property
def usd(self):
return Money(self._usd, 'USD')
@usd.setter
def usd(self, value):
self._usd = value.amount
| 765 |
678 | /**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
*/
#import <ManagedConfiguration/MCPayload.h>
#import <ManagedConfiguration/XXUnknownSuperclass.h>
@class NSArray, MCProfile, NSString;
@interface MCPayload : XXUnknownSuperclass {
MCProfile *_profile; // 4 = 0x4
NSString *_type; // 8 = 0x8
NSString *_payloadDescription; // 12 = 0xc
NSString *_displayName; // 16 = 0x10
NSString *_identifier; // 20 = 0x14
NSString *_organization; // 24 = 0x18
NSString *_UUID; // 28 = 0x1c
int _version; // 32 = 0x20
NSString *_persistentResourceID; // 36 = 0x24
}
@property(readonly, assign) MCProfile *profile; // G=0x1844d; @synthesize=_profile
@property(readonly, assign) NSString *type; // G=0x1843d; @synthesize=_type
@property(readonly, assign) NSString *payloadDescription; // G=0x1842d; @synthesize=_payloadDescription
@property(retain) NSString *displayName; // G=0x18995; S=0x18971; @synthesize=_displayName
@property(readonly, assign) NSString *identifier; // G=0x1841d; @synthesize=_identifier
@property(readonly, assign) NSString *organization; // G=0x1840d; @synthesize=_organization
@property(readonly, assign) NSString *UUID; // G=0x183fd; @synthesize=_UUID
@property(readonly, assign) int version; // G=0x183ed; @synthesize=_version
@property(retain) NSString *persistentResourceID; // G=0x189d1; S=0x189ad; @synthesize=_persistentResourceID
@property(readonly, assign) NSArray *installationWarnings; // G=0x183d9;
@property(readonly, assign) NSString *friendlyName; // G=0x189e9;
+ (id)typeStrings; // 0x183d5
+ (id)localizedDescriptionForPayloadCount:(unsigned)payloadCount; // 0x18911
- (void)dealloc; // 0x18815
// declared property getter: - (id)friendlyName; // 0x189e9
- (id)description; // 0x1845d
// declared property getter: - (id)installationWarnings; // 0x183d9
- (id)title; // 0x185f1
- (id)subtitle1Label; // 0x183dd
- (id)subtitle1Description; // 0x183e1
- (id)subtitle2Label; // 0x183e5
- (id)subtitle2Description; // 0x183e9
// declared property getter: - (id)persistentResourceID; // 0x189d1
// declared property setter: - (void)setPersistentResourceID:(id)anId; // 0x189ad
// declared property getter: - (int)version; // 0x183ed
// declared property getter: - (id)UUID; // 0x183fd
// declared property getter: - (id)organization; // 0x1840d
// declared property getter: - (id)identifier; // 0x1841d
// declared property getter: - (id)displayName; // 0x18995
// declared property setter: - (void)setDisplayName:(id)name; // 0x18971
// declared property getter: - (id)payloadDescription; // 0x1842d
// declared property getter: - (id)type; // 0x1843d
// declared property getter: - (id)profile; // 0x1844d
@end
@interface MCPayload (Private)
+ (id)payloadsFromArray:(id)array profile:(id)profile outError:(id *)error; // 0x192d1
+ (id)payloadFromDictionary:(id)dictionary profile:(id)profile outError:(id *)error; // 0x196b5
+ (id)badFieldTypeErrorWithField:(id)field; // 0x18b5d
+ (id)badFieldValueErrorWithField:(id)field; // 0x18bbd
+ (id)wrapperPayloadDictionary; // 0x187b1
- (id)initWithDictionary:(id)dictionary profile:(id)profile outError:(id *)error; // 0x18c1d
- (void)setPersistentResourceID:(id)anId; // 0x18601
- (id)malformedPayloadErrorWithError:(id)error; // 0x18ab5
- (id)stubDictionary; // 0x18649
@end
| 1,290 |
3,083 | // Copyright 2011-2016 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.
package com.google.security.zynamics.binnavi.Gui.FilterPanel.FilterExpressions.Wrappers;
import com.google.security.zynamics.binnavi.disassembly.INaviAddressSpace;
/**
* Wraps an address space object for filtering.
*/
public final class CAddressSpaceWrapper implements IFilterWrapper<INaviAddressSpace>, INamedElement {
/**
* The wrapped address space.
*/
private final INaviAddressSpace m_addressSpace;
/**
* Creates a new wrapper object.
*
* @param addressSpace The address space to wrap.
*/
public CAddressSpaceWrapper(final INaviAddressSpace addressSpace) {
m_addressSpace = addressSpace;
}
@Override
public String getDescription() {
return m_addressSpace.getConfiguration().getDescription();
}
@Override
public String getName() {
return m_addressSpace.getConfiguration().getName();
}
@Override
public INaviAddressSpace unwrap() {
return m_addressSpace;
}
}
| 432 |
5,169 | {
"name": "FSCalendar+Persian",
"version": "2.9.3",
"summary": "RTL (Persian and Arabic) version of FSCalendar. https://husseinhj.github.io/FSCalendar/",
"homepage": "https://github.com/Husseinhj/FSCalendar",
"screenshots": [
"https://github.com/Husseinhj/FSCalendar/raw/master/docs/Screenshots/English/DIY-Example-en.png",
"https://raw.githubusercontent.com/Husseinhj/FSCalendar/master/docs/Screenshots/Persian/DIY-Example-fa.png",
"https://github.com/Husseinhj/FSCalendar/raw/master/docs/Screenshots/Arabic/DIY-Example-ar.png"
],
"license": "MIT",
"authors": {
"<NAME>": "<EMAIL>"
},
"source": {
"git": "https://github.com/Husseinhj/FSCalendar.git",
"tag": "2.9.3"
},
"platforms": {
"ios": "7.0"
},
"requires_arc": true,
"frameworks": [
"UIKit",
"QuartzCore"
],
"source_files": "FSCalendar/*.{h,m}"
}
| 387 |
2,542 | <reponame>AnthonyM/service-fabric
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace ServiceModel
{
class PackageSharingPolicyList
: public Serialization::FabricSerializable
, public Common::IFabricJsonSerializable
{
DEFAULT_COPY_CONSTRUCTOR(PackageSharingPolicyList)
public:
PackageSharingPolicyList();
PackageSharingPolicyList(
std::vector<PackageSharingPolicyQueryObject> const &);
PackageSharingPolicyList(PackageSharingPolicyList && other);
void WriteTo(Common::TextWriter&, Common::FormatOptions const &) const;
__declspec(property(get=get_PackageSharingPolicy)) std::vector<PackageSharingPolicyQueryObject> const & PackageSharingPolicy;
std::vector<PackageSharingPolicyQueryObject> const& get_PackageSharingPolicy() const { return packageSharingPolicies_; }
PackageSharingPolicyList const & operator= (PackageSharingPolicyList && other);
FABRIC_FIELDS_01(packageSharingPolicies_)
BEGIN_JSON_SERIALIZABLE_PROPERTIES()
SERIALIZABLE_PROPERTY(ServiceModel::Constants::PackageSharingPolicy, packageSharingPolicies_)
END_JSON_SERIALIZABLE_PROPERTIES()
private:
std::vector<PackageSharingPolicyQueryObject> packageSharingPolicies_;
};
}
| 524 |
482 | <reponame>jmrapp1/TerraLegion<gh_stars>100-1000
package com.jmrapp.terralegion.game.views.ui;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.jmrapp.terralegion.engine.views.drawables.ResourceManager;
import com.jmrapp.terralegion.engine.views.drawables.ui.Button;
import com.jmrapp.terralegion.game.item.ItemStack;
/**
* Created by Jon on 10/5/15.
*/
public class InventoryBox extends Button {
public static final Texture bg = ResourceManager.getInstance().getTexture("inventoryBox");
public static final Texture selectedBg = ResourceManager.getInstance().getTexture("selectedInventoryBox");
private static final BitmapFont font = ResourceManager.getInstance().getFont("smallFont");
private ItemStack itemStack;
private boolean selected;
public InventoryBox(ItemStack itemStack, float x, float y) {
super(x, y, bg.getWidth(), bg.getHeight());
this.itemStack = itemStack;
}
public void render(SpriteBatch sb) {
if (selected)
sb.draw(selectedBg, x, y);
else
sb.draw(bg, x, y);
if (itemStack != null) {
itemStack.getItem().getIcon().render(sb, x + (bg.getWidth() / 2) - (itemStack.getItem().getIcon().getWidth() / 2), y + (bg.getHeight() / 2) - (itemStack.getItem().getIcon().getHeight() / 2));
font.draw(sb, String.valueOf(itemStack.getStack()), x + 5, y + bg.getHeight() - 10);
}
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean b) {
selected = b;
}
public ItemStack getItemStack() {
return itemStack;
}
public void setItemStack(ItemStack itemStack) {
this.itemStack = itemStack;
}
}
| 732 |
526 | /* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.dataengine.model;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Collections;
import java.util.Date;
import java.util.Map;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@ToString
public class DataStore extends Asset {
/**
* The fully qualified physical location of the data store
* -- GETTER --
* Return the fully qualified physical location of the data store. This should be suitable for the
* network address of the Endpoint.
* @return string name
* -- SETTER --
* Set up the fully qualified physical location of the data store. This should be suitable for the
* network address of the Endpoint.
* @param pathName string name
*/
private String pathName;
/**
* The time that the data store was created
* -- GETTER --
* Return the time that the data store was created.
* @return create time
* -- SETTER --
* Set up the time that the data store was created.
* @param createTime date
*/
private Date createTime;
/**
* The last known time the data store was modified
* -- GETTER --
* Return the last known time the data store was modified.
* @return modified time
* -- SETTER --
* Setup the last known time the data store was modified.
* @param modifiedTime date
*/
private Date modifiedTime;
/**
* The name of the encoding style used in the data store
* -- GETTER --
* Return the name of the encoding style used in the data store.
* @return the encoding style used in the data store
* -- SETTER --
* Set up the name of the encoding style used in the data store.
* @param encodingType string name
*/
private String encodingType;
/**
* The name of the natural language used for text strings within the data store
* -- GETTER --
* Return the name of the natural language used for text strings within the data store.
* @return encodingLanguage string language name
* -- SETTER --
* Set up the name of the natural language used for text strings within the data store.
* @param encodingLanguage string language name
*/
private String encodingLanguage;
/**
* The description of the encoding used in the data store
* -- GETTER --
* Return the description of the encoding used in the data store.
* @return encodingDescription string text
* -- SETTER --
* Set up the description of the encoding used in the data store.
* @param encodingDescription string text
*/
private String encodingDescription;
/**
* The additional properties associated with the encoding process
* -- GETTER --
* Return the additional properties associated with the encoding process
* @return additional properties associated with the encoding process
* -- SETTER --
* Set up the additional properties associated with the encoding process.
* @param encodingProperties map of name-value pairs
*/
private Map<String, String> encodingProperties;
/**
* Return the additional properties associated with the encoding process.
* @return map of name-value pairs
*/
public Map<String, String> getEncodingProperties() {
if (encodingProperties == null || encodingProperties.isEmpty()) {
return Collections.emptyMap();
}
return encodingProperties;
}
}
| 1,331 |
777 | <filename>chrome/browser/ui/views/frame/browser_command_handler_linux.cc
// Copyright 2014 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 "chrome/browser/ui/views/frame/browser_command_handler_linux.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
BrowserCommandHandlerLinux::BrowserCommandHandlerLinux(
BrowserView* browser_view)
: browser_view_(browser_view) {
aura::Window* window = browser_view_->frame()->GetNativeWindow();
DCHECK(window);
if (window)
window->AddPreTargetHandler(this);
}
BrowserCommandHandlerLinux::~BrowserCommandHandlerLinux() {
aura::Window* window = browser_view_->frame()->GetNativeWindow();
if (window)
window->RemovePreTargetHandler(this);
}
void BrowserCommandHandlerLinux::OnMouseEvent(ui::MouseEvent* event) {
// Handle standard Linux mouse buttons for going back and forward.
if (event->type() != ui::ET_MOUSE_PRESSED)
return;
bool back_button_pressed =
(event->changed_button_flags() == ui::EF_BACK_MOUSE_BUTTON);
bool forward_button_pressed =
(event->changed_button_flags() == ui::EF_FORWARD_MOUSE_BUTTON);
if (!back_button_pressed && !forward_button_pressed)
return;
content::WebContents* contents =
browser_view_->browser()->tab_strip_model()->GetActiveWebContents();
if (!contents)
return;
content::NavigationController& controller = contents->GetController();
if (back_button_pressed && controller.CanGoBack())
controller.GoBack();
else if (forward_button_pressed && controller.CanGoForward())
controller.GoForward();
// Always consume the event, whether a navigation was successful or not.
event->SetHandled();
}
| 646 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.