repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
stonexx/utils | src/slick-ext/src/main/scala/com/github/stonexx/slick/ext/exceptions/TooManyRowsAffectedException.scala | <reponame>stonexx/utils
package com.github.stonexx.slick.ext.exceptions
import slick.SlickException
class TooManyRowsAffectedException(val affectedRowCount: Int, val expectedRowCount: Int)
extends SlickException(s"Expected $expectedRowCount row(s) affected, got $affectedRowCount instead")
|
envomp/Lone-Player | core/src/ee/taltech/iti0202/gui/game/desktop/entities/EndPoint.java | <reponame>envomp/Lone-Player<filename>core/src/ee/taltech/iti0202/gui/game/desktop/entities/EndPoint.java
package ee.taltech.iti0202.gui.game.desktop.entities;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.physics.box2d.Body;
import ee.taltech.iti0202.gui.game.Game;
public class EndPoint extends B2DSprite {
public EndPoint(Body body) {
super(body);
Texture tex = Game.res.getTexture("Checkpoint");
TextureRegion[] sprites = TextureRegion.split(tex, 32, 64)[0];
setAnimation(sprites, 1 / 12f);
}
}
|
353swe/Marvin-353 | src/components/custom/ModalForm.js | import React from 'react';
import PropTypes from 'prop-types';
import Button from 'react-bootstrap/lib/Button';
import Modal from 'react-bootstrap/lib/Modal';
class ModalForm extends React.Component {
constructor(props) {
super(props);
this.handle = this.handle.bind(this);
this.close = this.close.bind(this);
this.state = { showing: this.props.show };
}
componentWillReceiveProps(newProps) {
this.setState({ showing: newProps.show });
}
handle() {
this.setState({
showing: false,
});
this.props.yesFunction(this.props.keyForModal);
}
close() {
this.setState({
showing: false,
});
}
render() {
return (
<div>
<Modal show={this.state.showing}>
<Modal.Header>
<b>{this.props.title}</b>
</Modal.Header>
<Modal.Body>
{this.props.children}
</Modal.Body>
<Modal.Footer>
{this.props.yesFunction !== undefined &&
<Button bsStyle="primary" onClick={this.handle}>Yes</Button>}
{this.props.noFunction !== undefined &&
<Button onClick={this.props.noFunction}>Close</Button>}
{this.props.noFunction === undefined &&
<Button onClick={this.close}>Close</Button>}
</Modal.Footer>
</Modal>
</div>
);
}
}
ModalForm.propTypes = {
title: PropTypes.string.isRequired,
show: PropTypes.bool,
children: PropTypes.node,
yesFunction: PropTypes.func,
noFunction: PropTypes.func,
// eslint-disable-next-line react/forbid-prop-types
keyForModal: PropTypes.object,
};
ModalForm.defaultProps = {
show: false,
children: null,
yesFunction: undefined,
noFunction: undefined,
keyForModal: {},
};
export default ModalForm;
|
pps-lab/zeph-artifact | zeph-benchmarks/zeph-client-demo/src/main/java/ch/ethz/infk/pps/zeph/clientdemo/drivers/RandomProducerDriver.java | <filename>zeph-benchmarks/zeph-client-demo/src/main/java/ch/ethz/infk/pps/zeph/clientdemo/drivers/RandomProducerDriver.java
package ch.ethz.infk.pps.zeph.clientdemo.drivers;
import java.util.ArrayList;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import org.apache.commons.math3.distribution.ExponentialDistribution;
import org.apache.commons.math3.distribution.UniformRealDistribution;
import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.RandomGeneratorFactory;
import ch.ethz.infk.pps.shared.avro.ApplicationAdapter;
import ch.ethz.infk.pps.shared.avro.Input;
import ch.ethz.infk.pps.shared.avro.Universe;
import ch.ethz.infk.pps.zeph.client.LocalTransformation;
import ch.ethz.infk.pps.zeph.client.facade.ILocalTransformationFacade;
import ch.ethz.infk.pps.zeph.client.facade.LocalTransformationFacade;
import ch.ethz.infk.pps.zeph.client.util.ClientConfig;
import ch.ethz.infk.pps.zeph.clientdemo.config.ProducerDefinition;
import ch.ethz.infk.pps.zeph.clientdemo.config.UniverseDefinition;
public class RandomProducerDriver extends Driver {
private CountDownLatch completionLatch;
private final LocalTransformation transformation;
private final UniverseDefinition uDef;
private final ProducerDefinition pDef;
private final ExponentialDistribution exponentialDistribution;
private final UniformRealDistribution uniformDistribution;
public RandomProducerDriver(String profileId, long runId, UniverseDefinition uDef,
ProducerDefinition pDef, CountDownLatch completionLatch, String kafkaBootstrapServers) {
this.completionLatch = completionLatch;
long producerId = pDef.getProducerId();
long universeId = uDef.getUniverseId();
this.uDef = uDef;
this.pDef = pDef;
RandomGenerator rng = RandomGeneratorFactory.createRandomGenerator(new Random());
final double mean = 1.0 / pDef.getRandomDataExponentialDelayLambda();
this.exponentialDistribution = new ExponentialDistribution(rng, mean);
this.uniformDistribution = new UniformRealDistribution(rng, 0.0, 1.0);
Universe universe = new Universe(universeId, uDef.getFirstWindow(), new ArrayList<>(uDef.getUnrolledMembers()),
uDef.getMemberThreshold(), uDef.getAlpha(), uDef.getDelta());
ClientConfig config = new ClientConfig();
config.setProducerId(producerId);
config.setUniverseId(universeId);
config.setHeacKey(pDef.getProducerInfo().getHeacKey());
ILocalTransformationFacade facade = new LocalTransformationFacade(kafkaBootstrapServers);
this.transformation = new LocalTransformation(config, universe, facade);
this.transformation.init();
}
@Override
protected void drive() {
boolean hasSendDelay = true;
boolean hasSilentTime = true;
final double silentProb = pDef.getSilentProb();
final long silentTime = pDef.getSilentTimeSec() * 1000;
final long end = uDef.getFirstWindow().getStart() + pDef.getTestTimeSec() * 1000;
try {
long timestamp = System.currentTimeMillis();
Thread.sleep(Math.max(0, uDef.getFirstWindow().getStart() - timestamp));
while (timestamp < end) {
if (isShutdownRequested()) {
break;
}
if (hasSendDelay) {
long sendDelayMillis = (long) (exponentialDistribution.sample() * 1000);
Thread.sleep(sendDelayMillis);
}
Input input = ApplicationAdapter.random();
long prevTimestamp = timestamp;
timestamp = System.currentTimeMillis();
if (timestamp <= prevTimestamp) {
timestamp = prevTimestamp + 1;
}
transformation.submit(input, timestamp);
if (hasSilentTime && uniformDistribution.sample() < silentProb) {
Thread.sleep(silentTime);
timestamp = System.currentTimeMillis();
}
}
transformation.submitHeartbeat(timestamp + 10);
transformation.close();
} catch (InterruptedException e) {
log.error(M, "Producer interrupted.");
} finally {
log.debug(M, "Producer closed");
completionLatch.countDown();
}
}
}
|
pmkenned/c | subprojects/bmp/bmp.c | /* TODO
* - use dynamic allocation instead of a static buffer
* - debug
*/
/* ==== includes ==== */
#include "bmp.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <stdint.h>
/* ==== macros ==== */
#define KB(n) ((n) * (1<<10))
#define MB(n) ((n) * (1<<20))
/* ==== types ==== */
struct bmp_t {
int width;
int height;
pixel_t * px_data;
/* TODO: color depth */
};
enum {
FILE_HEADER_SIZE = 14,
DIB_HEADER_SIZE = 40,
BITS_PER_PIXEL = 24
};
enum { BUFFER_SIZE = MB(1) };
/* ==== data ==== */
static struct {
struct {
uint16_t signature;
uint32_t size;
uint32_t px_offset;
} file_header;
struct {
uint32_t header_size;
uint32_t width;
uint32_t height;
uint16_t bits_per_px;
} dib_header;
uint8_t * px_array;
} bmp_file = {0};
static uint8_t buffer[BUFFER_SIZE];
/* TODO: consider moving this to interface */
static pixel_t default_px = PX_RGB(0, 0, 0);
/* ==== functions ==== */
/* private functions */
static uint32_t unpack_uint16_little_endian(const uint8_t * p) {
uint32_t x = 0;
size_t i;
for (i=0; i<2; i++)
x += (p[i] << 8*i);
return x;
}
static uint32_t unpack_uint24_little_endian(const uint8_t * p) {
uint32_t x = 0;
size_t i;
for (i=0; i<3; i++)
x += (p[i] << 8*i);
return x;
}
static void pack_uint24_little_endian(uint8_t * p, uint32_t x) {
size_t i;
for (i=0; i<3; i++)
p[i] = (x >> 8*i) & 0xff;
}
static uint32_t unpack_uint32_little_endian(const uint8_t * p) {
uint32_t x = 0;
size_t i;
for (i=0; i<4; i++)
x += (p[i] << 8*i);
return x;
}
#if 0
static void print_bytes(const void * p, size_t n) {
size_t i;
for (i=0; i<n; i++) {
printf("%02hhx ", ((uint8_t *) p)[i]);
if ((i+1) % 16 == 0)
printf("\n");
}
printf("\n");
}
#endif
static int get_row_size(int bits_per_px, int width) {
return 4*((bits_per_px * width + 31)/32);
}
static void bmp_px_data_to_px_array(const bmp_t * bmp) {
size_t r, c;
size_t num_rows = bmp->height;
size_t num_cols = bmp->width;
size_t row_size = get_row_size(BITS_PER_PIXEL, bmp->width);
bmp_file.px_array = buffer; /* TODO: think about this */
for (r=0; r<num_rows; r++) {
for (c=0; c<num_cols; c++) {
pixel_t px = bmp_get_px(bmp, r, c);
pack_uint24_little_endian(bmp_file.px_array + (num_rows-r-1)*row_size + 3*c, px);
}
}
}
static void px_array_to_bmp_px_data(bmp_t * bmp) {
size_t r, c;
size_t num_rows = bmp_file.dib_header.height;
size_t num_cols = bmp_file.dib_header.width;
size_t row_size = get_row_size(BITS_PER_PIXEL, num_cols);
for (r=0; r<num_rows; r++) {
for (c=0; c<num_cols; c++) {
pixel_t px = unpack_uint24_little_endian(bmp_file.px_array + (num_rows-r-1)*row_size + 3*c);
bmp_set_px(bmp, r, c, px);
}
}
}
/* public interface */
bmp_t * bmp_create() {
return calloc(1, sizeof(bmp_t));
}
bmp_t * bmp_create_w_h(int w, int h) {
bmp_t * bmp_new = calloc(1, sizeof(*bmp_new));
bmp_new->width = w;
bmp_new->height = h;
bmp_new->px_data = calloc(w*h, sizeof(*bmp_new->px_data));
return bmp_new;
}
bmp_t * bmp_create_copy(bmp_t * bmp)
{
bmp_t * bmp_new = calloc(1, sizeof(*bmp_new));
int w = bmp->width;
int h = bmp->height;
bmp_new->width = w;
bmp_new->height = h;
bmp_new->px_data = calloc(w*h, sizeof(*bmp_new->px_data));
memcpy(bmp_new->px_data, bmp->px_data, w*h*sizeof(*bmp_new->px_data));
return bmp_new;
}
void bmp_destroy(bmp_t * bmp) {
free(bmp->px_data);
free(bmp);
}
pixel_t bmp_get_px(const bmp_t * bmp, int r, int c) {
#if 0
assert(c < bmp->width);
assert(r < bmp->height);
#endif
if ((c < 0) || (c >= bmp->width) || (r < 0) || (r >= bmp->height))
return default_px;
return bmp->px_data[r*bmp->width + c];
}
int bmp_get_w(const bmp_t * bmp) {
return bmp->width;
}
int bmp_get_h(const bmp_t * bmp) {
return bmp->height;
}
void bmp_set_px(bmp_t * bmp, int r, int c, pixel_t px) {
#if 0
assert(c >= 0);
assert(r >= 0);
assert(c < bmp->width);
assert(r < bmp->height);
#endif
if ((c < 0) || (c >= bmp->width) || (r < 0) || (r >= bmp->height))
return;
bmp->px_data[r*bmp->width + c] = px;
}
void bmp_set_w_h(bmp_t * bmp, int w, int h) {
assert(w*h > 0);
bmp->width = w;
bmp->height = h;
bmp->px_data = realloc(bmp->px_data, sizeof(bmp->px_data)*bmp->width*bmp->height);
}
void bmp_set_w(bmp_t * bmp, int w) {
assert(w > 0);
bmp->width = w;
bmp->px_data = realloc(bmp->px_data, sizeof(bmp->px_data)*bmp->width*bmp->height);
}
void bmp_set_h(bmp_t * bmp, int h) {
assert(h > 0);
bmp->height = h;
bmp->px_data = realloc(bmp->px_data, sizeof(bmp->px_data)*bmp->width*bmp->height);
}
void bmp_read_file(bmp_t * bmp, FILE * fp) {
size_t n = fread(buffer, 1, sizeof(buffer), fp);
assert(n < sizeof(buffer));
assert(memcmp(buffer, "BM", 2) == 0);
bmp_file.file_header.signature = unpack_uint16_little_endian(buffer+0);
bmp_file.file_header.size = unpack_uint32_little_endian(buffer+2);
bmp_file.file_header.px_offset = unpack_uint32_little_endian(buffer+10);
bmp_file.dib_header.header_size = unpack_uint32_little_endian(buffer+14);
assert(bmp_file.dib_header.header_size == DIB_HEADER_SIZE);
bmp_file.dib_header.width = unpack_uint32_little_endian(buffer+18);
bmp_file.dib_header.height = unpack_uint32_little_endian(buffer+22);
bmp_file.dib_header.bits_per_px = unpack_uint16_little_endian(buffer+28);
assert(bmp_file.dib_header.bits_per_px == BITS_PER_PIXEL);
bmp_file.px_array = buffer+bmp_file.file_header.px_offset;
bmp_set_w_h(bmp, bmp_file.dib_header.width, bmp_file.dib_header.height);
px_array_to_bmp_px_data(bmp);
}
void bmp_write_file(const bmp_t * bmp, FILE * fp) {
/* TODO: confirm expected number of bytes written to file */
char signature[2] = "BM";
uint16_t RESERVED_16 = 0;
uint32_t fsize = 0; /* TODO */
uint32_t px_offset = FILE_HEADER_SIZE + DIB_HEADER_SIZE;
uint32_t dib_size = DIB_HEADER_SIZE;
uint32_t width = bmp->width;
uint32_t height = bmp->height;
uint16_t color_planes = 1;
uint16_t bits_per_px = BITS_PER_PIXEL;
uint32_t compression = 0;
uint32_t img_size = 0; /* TODO (optional) */
int32_t hor_px_per_m = 0; /* TODO? */
int32_t ver_px_per_m = 0; /* TODO? */
uint32_t num_colors = 0;
uint32_t important = 0;
size_t row_size = get_row_size(bits_per_px, bmp->width);
size_t num_rows = bmp->height;
/* file header */
fwrite(&signature, 1, sizeof(signature), fp);
fwrite(&fsize, 1, sizeof(fsize), fp);
fwrite(&RESERVED_16, 1, sizeof(RESERVED_16), fp);
fwrite(&RESERVED_16, 1, sizeof(RESERVED_16), fp);
fwrite(&px_offset, 1, sizeof(px_offset), fp);
/* dib header */
fwrite(&dib_size, 1, sizeof(dib_size), fp);
fwrite(&width, 1, sizeof(width), fp);
fwrite(&height, 1, sizeof(height), fp);
fwrite(&color_planes, 1, sizeof(color_planes), fp);
fwrite(&bits_per_px, 1, sizeof(bits_per_px), fp);
fwrite(&compression, 1, sizeof(compression), fp);
fwrite(&img_size, 1, sizeof(img_size), fp);
fwrite(&hor_px_per_m, 1, sizeof(hor_px_per_m), fp);
fwrite(&ver_px_per_m, 1, sizeof(ver_px_per_m), fp);
fwrite(&num_colors, 1, sizeof(num_colors), fp);
fwrite(&important, 1, sizeof(important), fp);
/* px array */
bmp_px_data_to_px_array(bmp);
fwrite(bmp_file.px_array, 1, row_size*num_rows, fp);
}
|
MysticMods/MysticalWorld | src/main/java/mysticmods/mysticalworld/recipe/BlazeRocketRecipe.java | <reponame>MysticMods/MysticalWorld<gh_stars>10-100
package mysticmods.mysticalworld.recipe;
import mysticmods.mysticalworld.init.ModRecipes;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.SpecialRecipe;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class BlazeRocketRecipe extends SpecialRecipe {
private static final Ingredient INGREDIENT_PAPER = Ingredient.of(Items.PAPER);
private static final Ingredient INGREDIENT_BLAZE_POWDER = Ingredient.of(Items.BLAZE_POWDER);
private static final Ingredient INGREDIENT_FIREWORK_STAR = Ingredient.of(Items.FIREWORK_STAR);
public BlazeRocketRecipe(ResourceLocation idIn) {
super(idIn);
}
@Override
public boolean matches(CraftingInventory inv, World worldIn) {
boolean flag = false;
int i = 0;
for (int j = 0; j < inv.getContainerSize(); ++j) {
ItemStack itemstack = inv.getItem(j);
if (!itemstack.isEmpty()) {
if (INGREDIENT_PAPER.test(itemstack)) {
if (flag) {
return false;
}
flag = true;
} else if (INGREDIENT_BLAZE_POWDER.test(itemstack)) {
++i;
if (i > 3) {
return false;
}
} else if (!INGREDIENT_FIREWORK_STAR.test(itemstack)) {
return false;
}
}
}
return flag && i >= 1;
}
@Override
public ItemStack assemble(CraftingInventory inv) {
ItemStack itemstack = new ItemStack(Items.FIREWORK_ROCKET, 5);
CompoundNBT compoundnbt = itemstack.getOrCreateTagElement("Fireworks");
ListNBT listnbt = new ListNBT();
int i = 0;
for (int j = 0; j < inv.getContainerSize(); ++j) {
ItemStack itemstack1 = inv.getItem(j);
if (!itemstack1.isEmpty()) {
if (INGREDIENT_BLAZE_POWDER.test(itemstack1)) {
++i;
} else if (INGREDIENT_FIREWORK_STAR.test(itemstack1)) {
CompoundNBT compoundnbt1 = itemstack1.getTagElement("Explosion");
if (compoundnbt1 != null) {
listnbt.add(compoundnbt1);
}
}
}
}
compoundnbt.putByte("Flight", (byte) (i * 2));
if (!listnbt.isEmpty()) {
compoundnbt.put("Explosions", listnbt);
}
return itemstack;
}
/**
* Used to determine if this recipe can fit in a grid of the given width/height
*/
@Override
public boolean canCraftInDimensions(int width, int height) {
return width * height >= 2;
}
/**
* Get the result of this recipe, usually for display purposes (e.g. recipe book). If your recipe has more than one
* possible result (e.g. it's dynamic and depends on its inputs), then return an empty stack.
*/
@Override
public ItemStack getResultItem() {
return new ItemStack(Items.FIREWORK_ROCKET);
}
@Override
public IRecipeSerializer<?> getSerializer() {
return ModRecipes.BLAZE_SERIALIZER.get();
}
}
|
gvgreat/hrillekha | crown/retail/crown-model/src/main/java/com/techlords/infra/config/package-info.java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.12.02 at 11:06:30 PM IST
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.techlords.com/crown-flow", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.techlords.infra.config;
|
playpasshq/vaulty | lib/vaulty/output/banner.rb | module Vaulty
module Output
class Banner
attr_reader :msg, :prompt, :color
def initialize(msg, color: :blue, prompt:)
@msg = msg
@color = "on_#{color}".to_sym
@prompt = prompt
end
def render
now = Time.new.strftime('%H:%M:%S')
formatted = msg.ljust(72, ' ')
prompt.say("[#{now}] #{formatted}", color: %I(bold white #{color}))
puts
end
def self.render(*args)
new(*args).render
end
end
end
end
|
nistefan/cmssw | SimTracker/TrackTriggerAssociation/interface/TTStubAssociationMap.h | /*! \class TTStubAssociationMap
* \brief Class to store the MC truth of L1 Track Trigger stubs
* \details After moving from SimDataFormats to DataFormats,
* the template structure of the class was maintained
* in order to accomodate any types other than PixelDigis
* in case there is such a need in the future.
*
* \author <NAME>
* \date 2013, Jul 19
*
*/
#ifndef L1_TRACK_TRIGGER_STUB_ASSOCIATION_FORMAT_H
#define L1_TRACK_TRIGGER_STUB_ASSOCIATION_FORMAT_H
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/Common/interface/RefProd.h"
#include "DataFormats/Common/interface/Ptr.h"
#include "DataFormats/Common/interface/DetSet.h"
#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h"
//#include "DataFormats/SiPixelDigi/interface/PixelDigi.h"
#include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h" /// NOTE: this is needed even if it seems not
#include "DataFormats/L1TrackTrigger/interface/TTStub.h"
#include "SimDataFormats/TrackerDigiSimLink/interface/PixelDigiSimLink.h"
#include "SimDataFormats/Track/interface/SimTrack.h"
#include "SimDataFormats/Track/interface/SimTrackContainer.h"
#include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
#include "SimTracker/TrackTriggerAssociation/interface/TTClusterAssociationMap.h"
template< typename T >
class TTStubAssociationMap
{
public:
/// Constructors
TTStubAssociationMap();
/// Destructor
~TTStubAssociationMap();
/// Data members: getABC( ... )
/// Helper methods: findABC( ... )
/// Maps
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > getTTStubToTrackingParticleMap() const
{ return stubToTrackingParticleMap; }
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > getTrackingParticleToTTStubsMap() const
{ return trackingParticleToStubVectorMap; }
void setTTStubToTrackingParticleMap( std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > aMap )
{ stubToTrackingParticleMap = aMap; }
void setTrackingParticleToTTStubsMap( std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > aMap )
{ trackingParticleToStubVectorMap = aMap; }
void setTTClusterAssociationMap( edm::RefProd< TTClusterAssociationMap< T > > aCluAssoMap )
{ theClusterAssociationMap = aCluAssoMap; }
/// Operations
edm::Ptr< TrackingParticle > findTrackingParticlePtr( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const;
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > findTTStubRefs( edm::Ptr< TrackingParticle > aTrackingParticle ) const;
/// MC Truth methods
bool isGenuine( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const;
bool isCombinatoric( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const;
bool isUnknown( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const;
private:
/// Data members
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap;
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap;
edm::RefProd< TTClusterAssociationMap< T > > theClusterAssociationMap;
}; /// Close class
/*! \brief Implementation of methods
* \details Here, in the header file, the methods which do not depend
* on the specific type <T> that can fit the template.
* Other methods, with type-specific features, are implemented
* in the source file.
*/
/// Default Constructor
/// NOTE: to be used with setSomething(...) methods
template< typename T >
TTStubAssociationMap< T >::TTStubAssociationMap()
{
/// Set default data members
stubToTrackingParticleMap.clear();
trackingParticleToStubVectorMap.clear();
edm::RefProd< TTClusterAssociationMap< T > >* aRefProd = new edm::RefProd< TTClusterAssociationMap< T > >();
theClusterAssociationMap = *aRefProd;
}
/// Destructor
template< typename T >
TTStubAssociationMap< T >::~TTStubAssociationMap(){}
/// Operations
template< typename T >
edm::Ptr< TrackingParticle > TTStubAssociationMap< T >::findTrackingParticlePtr( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const
{
if ( stubToTrackingParticleMap.find( aStub ) != stubToTrackingParticleMap.end() )
{
return stubToTrackingParticleMap.find( aStub )->second;
}
/// Default: return NULL
edm::Ptr< TrackingParticle >* temp = new edm::Ptr< TrackingParticle >();
return *temp;
}
template< typename T >
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > TTStubAssociationMap< T >::findTTStubRefs( edm::Ptr< TrackingParticle > aTrackingParticle ) const
{
if ( trackingParticleToStubVectorMap.find( aTrackingParticle ) != trackingParticleToStubVectorMap.end() )
{
return trackingParticleToStubVectorMap.find( aTrackingParticle )->second;
}
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > tempVector;
tempVector.clear();
return tempVector;
}
/// MC truth
template< typename T >
bool TTStubAssociationMap< T >::isGenuine( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const
{
/// Check if there is a SimTrack
if ( (this->findTrackingParticlePtr( aStub )).isNull() )
return false;
return true;
}
template< typename T >
bool TTStubAssociationMap< T >::isCombinatoric( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const
{
/// Defined by exclusion
if ( this->isGenuine( aStub ) )
return false;
if ( this->isUnknown( aStub ) )
return false;
return true;
}
template< typename T >
bool TTStubAssociationMap< T >::isUnknown( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub ) const
{
/// UNKNOWN means that both clusters are unknown
//std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > theseClusters = aStub->getClusterRefs();
/// Sanity check
if ( theClusterAssociationMap.isNull() )
{
return true;
}
if ( theClusterAssociationMap->isUnknown( aStub->getClusterRef(0) ) &&
theClusterAssociationMap->isUnknown( aStub->getClusterRef(1) ) )
return true;
return false;
}
#endif
|
jedhsu/text | text/_elisp/type/primitive.py | class Type(Integer):
pass
|
mindspore-ai/models | research/cv/EfficientDet_d0/eval.py | <reponame>mindspore-ai/models<filename>research/cv/EfficientDet_d0/eval.py
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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.
# ============================================================================
"""eval"""
import argparse
import os
import json
import numpy as np
from tqdm import tqdm
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
from src.backbone import EfficientDetBackbone
from src.utils import preprocess, invert_affine, postprocess, boolean_string
from src.config import config
from mindspore import load_checkpoint, load_param_into_net
import mindspore
from mindspore import context
ap = argparse.ArgumentParser()
ap.add_argument('-p', '--project', type=str, default='coco', help='project file that contains parameters')
ap.add_argument('-c', '--compound_coef', type=int, default=0, help='coefficients of efficientdet')
ap.add_argument('--nms_threshold', type=float, default=0.5,
help='nms threshold, don\'t change it if not for testing purposes')
ap.add_argument('--override', type=boolean_string, default=True, help='override previous bbox results file if exists')
ap.add_argument("--checkpoint_path", type=str, default="/data/efficientdet_ch/efdet.ckpt", help="") # ckpt path.
ap.add_argument("--data_url", type=str, default="", help="dataset path on modelarts.")
ap.add_argument("--train_url", type=str, default="", help="necessary for modelarts")
ap.add_argument("--is_modelarts", type=str, default="False", help="")
args = ap.parse_args()
compound_coef = args.compound_coef
nms_threshold = args.nms_threshold
override_prev_results = args.override
project_name = args.project
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", enable_reduce_precision=True)
device_id = int(os.getenv("DEVICE_ID"))
context.set_context(device_id=device_id)
input_sizes = [512, 640, 768, 896, 1024, 1280, 1280, 1536, 1536]
obj_list = config.coco_classes
def evaluate_coco(img_path, set_name, img_ids, coco, net, threshold=0.05):
""" eval on coco dataset """
results = []
for image_id in tqdm(img_ids):
image_info = coco.loadImgs(image_id)[0]
image_path = img_path + '/' + image_info['file_name']
_, framed_imgs, framed_metas = preprocess(image_path, max_size=input_sizes[compound_coef],
mean=config.mean, std=config.std)
x = framed_imgs[0].astype(np.float32)
x = np.expand_dims(x, axis=0)
x = np.transpose(x, axes=(0, 3, 1, 2))
x = mindspore.Tensor(x)
_, regression, classification, anchors = net(x)
preds = postprocess(x=x, anchors=anchors, regression=regression, classification=classification,
threshold=threshold, iou_threshold=nms_threshold)
if not preds:
continue
preds = invert_affine(framed_metas, preds)[0]
scores = preds['scores']
class_ids = preds['class_ids']
rois = preds['rois']
if rois.shape[0] > 0:
# x1,y1,x2,y2 -> x1,y1,w,h
rois[:, 2] -= rois[:, 0]
rois[:, 3] -= rois[:, 1]
bbox_score = scores
for roi_id in range(rois.shape[0]):
score = float(bbox_score[roi_id])
label = int(class_ids[roi_id])
box = rois[roi_id, :]
image_result = {
'image_id': image_id,
'category_id': label + 1,
'score': float(score),
'bbox': box.tolist(),
}
results.append(image_result)
print("results len :{}".format(len(results)))
# write output
filepath = f'{set_name}_bbox_results.json'
if os.path.exists(filepath):
os.remove(filepath)
json.dump(results, open(filepath, 'w'), indent=4)
print("save json success.")
def _eval(gt, img_ids, pred_json_path):
""" call coco api to eval output json"""
# load results in COCO evaluation tool
coco_pred = gt.loadRes(pred_json_path)
# run COCO evaluation
coco_eval = COCOeval(gt, coco_pred, 'bbox')
coco_eval.params.imgIds = img_ids
coco_eval.evaluate()
coco_eval.accumulate()
coco_eval.summarize()
if __name__ == '__main__':
if args.is_modelarts == "True":
import moxing as mox
local_data_url = "/cache/data/"
mox.file.make_dirs(local_data_url)
mox.file.copy_parallel(args.data_url, local_data_url)
checkpoint_path = "/cache/ckpt"
mox.file.make_dirs(checkpoint_path)
checkpoint_path = os.path.join(checkpoint_path, "efdet.ckpt")
mox.file.copy(args.checkpoint_path, checkpoint_path)
else:
local_data_url = config.coco_root
checkpoint_path = args.checkpoint_path
coco_root = local_data_url
data_type = config.val_data_type
VAL_GT = os.path.join(coco_root, config.instances_set.format(data_type))
SET_NAME = config.val_data_type
VAL_IMGS = os.path.join(coco_root, SET_NAME)
MAX_IMAGES = 10000
coco_gt = COCO(VAL_GT)
image_ids = coco_gt.getImgIds()[:MAX_IMAGES]
if override_prev_results or not os.path.exists(f'{SET_NAME}_bbox_results.json'):
model = EfficientDetBackbone(config.num_classes, 0, False, False)
print("Load Checkpoint!")
param_dict = load_checkpoint(checkpoint_path)
model.init_parameters_data()
load_param_into_net(model, param_dict)
model.set_train(False)
evaluate_coco(VAL_IMGS, SET_NAME, image_ids, coco_gt, model)
print("go into eval json")
_eval(coco_gt, image_ids, f'{SET_NAME}_bbox_results.json') # call coco api to eval output json
|
raytheonbbn/tc-ta3-api-bindings-cpp | src/serialization/avro_generic_serializer_impl.h | <filename>src/serialization/avro_generic_serializer_impl.h
// Copyright (c) 2020 <NAME>.
// See LICENSE.txt for details.
#ifndef TC_SERIALIZATION_AVRO_GENERIC_SERIALIZER_IMPL_H_
#define TC_SERIALIZATION_AVRO_GENERIC_SERIALIZER_IMPL_H_
#include "serialization/avro_generic_serializer.h"
#include "records/cdm_record_parser.h"
#include "serialization/avro_recursion_exception.h"
#include "serialization/utils.h"
namespace tc_serialization {
template<class T>
AvroGenericSerializer<T>::AvroGenericSerializer(avro::ValidSchema writerSchema,
bool isSpecific):
writerSchema(writerSchema), isSpecific(isSpecific),
binaryOut(avro::memoryOutputStream()),
jsonOut(avro::memoryOutputStream()),
binaryEncoder(avro::validatingEncoder(this->writerSchema,
avro::binaryEncoder())),
jsonEncoder(avro::jsonEncoder(this->writerSchema)) {
this->binaryEncoder->init(*binaryOut);
this->jsonEncoder->init(*jsonOut);
}
template<class T>
AvroGenericSerializer<T>::AvroGenericSerializer(
avro::ValidSchema writerSchema):
AvroGenericSerializer(writerSchema, false) {}
template<class T>
AvroGenericSerializer<T>::AvroGenericSerializer(
std::string writerSchemaFilename):
AvroGenericSerializer(writerSchemaFilename, false) {}
template<class T>
AvroGenericSerializer<T>::AvroGenericSerializer(
std::string writerSchemaFilename, bool isSpecific):
AvroGenericSerializer(utils::loadSchema(writerSchemaFilename),
isSpecific) {}
template<class T>
bool AvroGenericSerializer<T>::getIsSpecific() {
return this->isSpecific;
}
template<class T>
void AvroGenericSerializer<T>::setIsSpecific(bool isSpecific) {
this->isSpecific = isSpecific;
}
template<class T>
avro::ValidSchema AvroGenericSerializer<T>::getWriterSchema() {
return this->writerSchema;
}
template<class T>
std::vector<uint8_t>
AvroGenericSerializer<T>::serializeToBytes(const T& record) {
// Serialize the record to our output buffer.
avro::encode(*this->binaryEncoder, record);
this->binaryEncoder->flush();
// Read the data into a result vector.
size_t len = this->binaryOut->byteCount();
std::unique_ptr<avro::InputStream> in =
avro::memoryInputStream(*this->binaryOut);
avro::StreamReader reader(*in);
std::vector<uint8_t> result;
result.reserve(len);
while (reader.hasMore())
result.push_back(reader.read());
// TODO: see if there is a more efficient way.
// Reset the output stream.
this->binaryOut.reset();
this->binaryOut = avro::memoryOutputStream();
this->binaryEncoder->init(*binaryOut);
return result;
}
template<class T>
std::string
AvroGenericSerializer<T>::serializeToJson(const T& record) {
// Work around the known Avro exception with recursive data types (see #15)
tc_records::CDMRecordParser parser;
// We know that TCCDMDatum objects can be recursive, so we should check them.
// Currently, Events and RegistryKeyObjects can contain Value types, which
// are optionally recursive; however, we have not observed errors thrown at
// this time by those types, so we don't proactively throw this exception
// based on record type for now. If we observe the bad_weak_ptr exception,
// we will proactively check for the error again. Do this instead of catching
// a bad_weak_ptr exception, which could be legitimate depending on the
// provided record.
// Serialize the record to our output buffer.
avro::encode(*this->jsonEncoder, record);
this->jsonEncoder->flush();
// Read the data into a result vector.
size_t len = this->jsonOut->byteCount();
std::unique_ptr<avro::InputStream> in =
avro::memoryInputStream(*this->jsonOut);
avro::StreamReader reader(*in);
std::vector<uint8_t> result;
result.reserve(len);
while (reader.hasMore())
result.push_back(reader.read());
// TODO: see if there is a more efficient way.
// Reset the output stream.
this->jsonOut.reset();
this->jsonOut = avro::memoryOutputStream();
this->jsonEncoder->init(*jsonOut);
std::string jsonStringPtr(result.begin(), result.end());
return jsonStringPtr;
}
} // namespace tc_serialization
#endif // TC_SERIALIZATION_AVRO_GENERIC_SERIALIZER_IMPL_H_
|
abadger/Bento | bento/commands/build_yaku.py | import sys
import os
import shutil
from bento.installed_package_description \
import \
InstalledSection
from bento.commands.errors \
import \
CommandExecutionFailure
from bento.core.utils \
import \
cpu_count
import bento.core.errors
import yaku.task_manager
import yaku.context
import yaku.scheduler
import yaku.errors
def build_extension(bld, extension, env=None):
builder = bld.builders["pyext"]
try:
if env is None:
env = {"PYEXT_CPPPATH": extension.include_dirs}
else:
val = env.get("PYEXT_CPPPATH", [])
val.extend(extension.include_dirs)
tasks = builder.extension(extension.name, extension.sources, env)
if len(tasks) > 1:
outputs = tasks[0].gen.outputs
else:
outputs = []
return [n.bldpath() for n in outputs]
except RuntimeError, e:
msg = "Building extension %s failed: %s" % \
(extension.name, str(e))
raise CommandExecutionFailure(msg)
def build_compiled_library(bld, clib, env=None):
builder = bld.builders["ctasks"]
try:
for p in clib.include_dirs:
builder.env["CPPPATH"].insert(0, p)
outputs = builder.static_library(clib.name, clib.sources, env)
return [n.bldpath() for n in outputs]
except RuntimeError, e:
msg = "Building library %s failed: %s" % (clib.name, str(e))
raise CommandExecutionFailure(msg)
|
cvigoe/DRL4MAAS | rlkit/setup.py | from distutils.core import setup
from setuptools import find_packages
setup(
name='rlkit2',
version='0.2.1dev',
packages=find_packages(),
license='MIT License',
long_description=open('README.md').read(),
)
|
process-project/iee | config/routes.rb | <reponame>process-project/iee<filename>config/routes.rb
# frozen_string_literal: true
# rubocop:disable BlockLength
Rails.application.routes.draw do
get 'access_policies/create'
get 'resources/index'
root to: redirect(path: '/projects')
devise_for :users,
controllers: {
omniauth_callbacks: 'users/omniauth_callbacks',
registrations: 'users/registrations',
sessions: 'users/sessions'
}
## User profile section routes
resource :profile, only: [:show, :update] do
scope module: :profiles do
resource :account, only: [:show, :update]
resource :password, only: [:show, :update]
resource :plgrid, only: [:show, :destroy]
resources :compute_site_proxy
end
end
resources :projects, except: [:edit, :update], constraints: { id: /.+/ } do
scope module: :projects do
resources :pipelines do
scope module: :pipelines do
resources :computations, only: [:show, :update]
end
end
end
end
namespace :api do
resources :pdp, only: :index
resources :sessions, only: :create
resources :policies, only: [:create, :index]
delete 'policies', to: 'policies#destroy'
resources :policy_entities, only: :index
# LOBCDER API webhook
post 'staging' => 'staging#notify'
resources :projects, only: :index do
scope module: :projects do
resources :pipelines, only: :index do
scope module: :pipelines do
resources :computations, only: [:index, :show, :create]
end
end
end
end
end
resources :services do
scope module: :services do
resources :local_policies
resources :global_policies
end
end
resources :groups do
scope module: :groups do
resources :user_groups, only: [:create, :destroy]
end
end
resources :resources, only: :index do
scope module: :resources do
resources :access_policies, only: [:create, :destroy]
resources :resource_managers, only: [:create, :destroy]
end
end
resources :cloud_resources, only: :index
# Help
get 'help' => 'help#index'
get 'help/:category/:file' => 'help#show',
as: :help_page,
constraints: { category: /.*/, file: %r{[^/\.]+} }
# File Store
get 'file_store' => 'file_store#index'
namespace :admin do
resources :users
end
# Sidekiq monitoring
authenticate :user, ->(u) { u.admin? } do
require 'sidekiq/web'
mount Sidekiq::Web => '/sidekiq'
namespace :admin do
resource :job, only: :show
end
end
match '/404', to: 'errors#not_found', via: :all
match '/422', to: 'errors#unprocessable', via: :all
match '/500', to: 'errors#internal_server_error', via: :all
end
# rubocop:enable BlockLength
|
ddugue/garden-rake | test/mkdir.rb |
require 'rake/garden/commands/mkdir'
require 'rake/garden/commands/sh'
require_relative 'fake_manager'
RSpec.describe Garden::MakeDirCommand, "processing" do
context "only workdir" do
it "should set the right workdir on manager" do
%x( rm -fr /tmp/testmakedir )
manager = FakeManager.new
cmd = Garden::MakeDirCommand.new manager, "/tmp/testmakedir"
manager.append(cmd)
cmd.start
cmd.result
expect(File.directory? "/tmp/testmakedir").to be(true)
expect(cmd.succeeded?).to be(true)
end
end
end
|
alinous-core/codable-cash | src_smartcontract_db/scan_select/scan_condition/params/AbstractScanConditionParameter.cpp | <filename>src_smartcontract_db/scan_select/scan_condition/params/AbstractScanConditionParameter.cpp
/*
* AbstractScanConditionElement.cpp
*
* Created on: 2020/07/20
* Author: iizuka
*/
#include "scan_select/scan_condition/params/AbstractScanConditionParameter.h"
namespace codablecash {
AbstractScanConditionParameter::AbstractScanConditionParameter() {
}
AbstractScanConditionParameter::~AbstractScanConditionParameter() {
}
bool AbstractScanConditionParameter::isFilterable(VirtualMachine* vm, SelectScanPlanner* planner,
FilterConditionDitector* detector) const noexcept {
return true;
}
} /* namespace codablecash */
|
yunxiange/veui | packages/veui-theme-dls-icons/icons/sliders-square.js | <reponame>yunxiange/veui
import Icon from 'veui/components/Icon'
import { IconSlidersSquare } from 'dls-icons-vue'
Icon.register('sliders-square', IconSlidersSquare)
|
beyondnetPeru/BeyondNet.Sample.Js | BeyondNet.JsPlatform/testing/jest/testingsample2/__tests__/utils/response.js | export default class Response {
status(status) {
this.status = status
return this
}
json(data) {
return data
}
}
|
litheblas/blapp | blapp/utils/testing/browser.py | import attr
@attr.dataclass(frozen=True)
class ExternalWebserver:
url: str
|
shrutigupta23/rkafkajars | java/scala/collection/immutable/StringLike.scala | /* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
package scala.collection
package immutable
import generic._
import mutable.Builder
import scala.util.matching.Regex
import scala.math.ScalaNumber
/** A companion object for the `StringLike` containing some constants.
* @since 2.8
*/
object StringLike {
// just statics for companion class.
private final val LF: Char = 0x0A
private final val FF: Char = 0x0C
private final val CR: Char = 0x0D
private final val SU: Char = 0x1A
}
import StringLike._
/** A trait describing stringlike collections.
*
* @tparam Repr The type of the actual collection inheriting `StringLike`.
*
* @since 2.8
* @define Coll String
* @define coll string
* @define orderDependent
* @define orderDependentFold
* @define mayNotTerminateInf
* @define willNotTerminateInf
*/
trait StringLike[+Repr] extends IndexedSeqOptimized[Char, Repr] with Ordered[String] {
self =>
/** Creates a string builder buffer as builder for this class */
protected[this] def newBuilder: Builder[Char, Repr]
/** Return element at index `n`
* @throws IndexOutofBoundsException if the index is not valid
*/
def apply(n: Int): Char = toString charAt n
def length: Int = toString.length
override def mkString = toString
/** Return the current string concatenated `n` times.
*/
def * (n: Int): String = {
val buf = new StringBuilder
for (i <- 0 until n) buf append toString
buf.toString
}
override def compare(other: String) = toString compareTo other
private def isLineBreak(c: Char) = c == LF || c == FF
/**
* Strip trailing line end character from this string if it has one.
*
* A line end character is one of
* <ul style="list-style-type: none;">
* <li>LF - line feed (0x0A hex)</li>
* <li>FF - form feed (0x0C hex)</li>
* </ul>
* If a line feed character LF is preceded by a carriage return CR
* (0x0D hex), the CR character is also stripped (Windows convention).
*/
def stripLineEnd: String = {
val len = toString.length
if (len == 0) toString
else {
val last = apply(len - 1)
if (isLineBreak(last))
toString.substring(0, if (last == LF && len >= 2 && apply(len - 2) == CR) len - 2 else len - 1)
else
toString
}
}
/**
* Return all lines in this string in an iterator, including trailing
* line end characters.
*
* The number of strings returned is one greater than the number of line
* end characters in this string. For an empty string, a single empty
* line is returned. A line end character is one of
*
* <ul style="list-style-type: none;">
* <li>LF - line feed (0x0A hex)</li>
* <li>FF - form feed (0x0C hex)</li>
* </ul>
*/
def linesWithSeparators: Iterator[String] = new Iterator[String] {
val str = self.toString
private val len = str.length
private var index = 0
def hasNext: Boolean = index < len
def next(): String = {
if (index >= len) throw new NoSuchElementException("next on empty iterator")
val start = index
while (index < len && !isLineBreak(apply(index))) index += 1
index += 1
str.substring(start, index min len)
}
}
/** Return all lines in this string in an iterator, excluding trailing line
* end characters, i.e. apply `.stripLineEnd` to all lines
* returned by `linesWithSeparators`.
*/
def lines: Iterator[String] =
linesWithSeparators map (line => new WrappedString(line).stripLineEnd)
/** Return all lines in this string in an iterator, excluding trailing line
* end characters, i.e. apply `.stripLineEnd` to all lines
* returned by `linesWithSeparators`.
*/
def linesIterator: Iterator[String] =
linesWithSeparators map (line => new WrappedString(line).stripLineEnd)
/** Returns this string with first character converted to upper case */
def capitalize: String =
if (toString == null) null
else if (toString.length == 0) ""
else {
val chars = toString.toCharArray
chars(0) = chars(0).toUpper
new String(chars)
}
/** Returns this string with the given `prefix` stripped. */
def stripPrefix(prefix: String) =
if (toString.startsWith(prefix)) toString.substring(prefix.length)
else toString
/** Returns this string with the given `suffix` stripped. */
def stripSuffix(suffix: String) =
if (toString.endsWith(suffix)) toString.substring(0, toString.length() - suffix.length)
else toString
/**
* For every line in this string:
*
* <blockquote>
* Strip a leading prefix consisting of blanks or control characters
* followed by `marginChar` from the line.
* </blockquote>
*/
def stripMargin(marginChar: Char): String = {
val buf = new StringBuilder
for (line <- linesWithSeparators) {
val len = line.length
var index = 0
while (index < len && line.charAt(index) <= ' ') index += 1
buf append
(if (index < len && line.charAt(index) == marginChar) line.substring(index + 1) else line)
}
buf.toString
}
/**
* For every line in this string:
*
* <blockquote>
* Strip a leading prefix consisting of blanks or control characters
* followed by `|` from the line.
* </blockquote>
*/
def stripMargin: String = stripMargin('|')
private def escape(ch: Char): String = "\\Q" + ch + "\\E"
@throws(classOf[java.util.regex.PatternSyntaxException])
def split(separator: Char): Array[String] = toString.split(escape(separator))
@throws(classOf[java.util.regex.PatternSyntaxException])
def split(separators: Array[Char]): Array[String] = {
val re = separators.foldLeft("[")(_+escape(_)) + "]"
toString.split(re)
}
/** You can follow a string with `.r', turning
* it into a Regex. E.g.
*
* """A\w*""".r is the regular expression for identifiers starting with `A'.
*/
def r: Regex = new Regex(toString)
def toBoolean: Boolean = parseBoolean(toString)
def toByte: Byte = java.lang.Byte.parseByte(toString)
def toShort: Short = java.lang.Short.parseShort(toString)
def toInt: Int = java.lang.Integer.parseInt(toString)
def toLong: Long = java.lang.Long.parseLong(toString)
def toFloat: Float = java.lang.Float.parseFloat(toString)
def toDouble: Double = java.lang.Double.parseDouble(toString)
private def parseBoolean(s: String): Boolean =
if (s != null) s.toLowerCase match {
case "true" => true
case "false" => false
case _ => throw new NumberFormatException("For input string: \""+s+"\"")
}
else
throw new NumberFormatException("For input string: \"null\"")
/* !!! causes crash?
def toArray: Array[Char] = {
val result = new Array[Char](length)
toString.getChars(0, length, result, 0)
result
}
*/
private def unwrapArg(arg: Any): AnyRef = arg match {
case x: ScalaNumber => x.underlying
case x => x.asInstanceOf[AnyRef]
}
/**
* Uses the underlying string as a pattern (in a fashion similar to
* printf in C), and uses the supplied arguments to fill in the
* holes.
*
* The interpretation of the formatting patterns is described in
* <a href="" target="contentFrame" class="java/util/Formatter">
* `java.util.Formatter`</a>, with the addition that
* classes deriving from `ScalaNumber` (such as `scala.BigInt` and
* `scala.BigDecimal`) are unwrapped to pass a type which `Formatter`
* understands.
*
*
* @param args the arguments used to instantiating the pattern.
* @throws java.lang.IllegalArgumentException
*/
def format(args : Any*): String =
java.lang.String.format(toString, args map unwrapArg: _*)
/**
* Like `format(args*)` but takes an initial `Locale` parameter
* which influences formatting as in `java.lang.String`'s format.
*
*
* The interpretation of the formatting patterns is described in
* <a href="" target="contentFrame" class="java/util/Formatter">
* `java.util.Formatter`</a>, with the addition that
* classes deriving from `ScalaNumber` (such as `scala.BigInt` and
* `scala.BigDecimal`) are unwrapped to pass a type which `Formatter`
* understands.
*
*
* @param locale an instance of `java.util.Locale`
* @param args the arguments used to instantiating the pattern.
* @throws java.lang.IllegalArgumentException
*/
def formatLocal(l: java.util.Locale, args: Any*): String =
java.lang.String.format(l, toString, args map unwrapArg: _*)
}
|
KoizumiSinya/DemoProject | RecyclerView/RefreshRecyclerViewDemo/src/main/java/jp/sinya/refresh/recyclerview/demo/FirstFragment.java | package jp.sinya.refresh.recyclerview.demo;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import jp.sinya.refresh.recyclerview.demo.refresh.PullLoadMoreRecyclerView;
public class FirstFragment extends Fragment implements PullLoadMoreRecyclerView.PullLoadMoreListener {
private PullLoadMoreRecyclerView mPullLoadMoreRecyclerView;
private int mCount = 1;
private RecyclerViewAdapter mRecyclerViewAdapter;
private RecyclerView mRecyclerView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_first, container, false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mPullLoadMoreRecyclerView = view.findViewById(R.id.pullLoadMoreRecyclerView);
//获取mRecyclerView对象
mRecyclerView = mPullLoadMoreRecyclerView.getRecyclerView();
//代码设置scrollbar无效?未解决!
mRecyclerView.setVerticalScrollBarEnabled(true);
//设置下拉刷新是否可见
//mPullLoadMoreRecyclerView.setRefreshing(true);
//设置是否可以下拉刷新
//mPullLoadMoreRecyclerView.setPullRefreshEnable(true);
//设置是否可以上拉刷新
//mPullLoadMoreRecyclerView.setPushRefreshEnable(false);
//显示下拉刷新
mPullLoadMoreRecyclerView.setRefreshing(true);
//设置上拉刷新文字
mPullLoadMoreRecyclerView.setFooterViewText("loading");
//设置上拉刷新文字颜色
//mPullLoadMoreRecyclerView.setFooterViewTextColor(R.color.white);
//设置加载更多背景色
//mPullLoadMoreRecyclerView.setFooterViewBackgroundColor(R.color.colorBackground);
mPullLoadMoreRecyclerView.setLinearLayout();
mPullLoadMoreRecyclerView.setOnPullLoadMoreListener(this);
mRecyclerViewAdapter = new RecyclerViewAdapter(getActivity());
mPullLoadMoreRecyclerView.setAdapter(mRecyclerViewAdapter);
getData();
}
private void getData() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mRecyclerViewAdapter.addAllData(setList());
mPullLoadMoreRecyclerView.setPullLoadMoreCompleted();
}
});
}
}, 1000);
}
public void clearData() {
mRecyclerViewAdapter.clearData();
mRecyclerViewAdapter.notifyDataSetChanged();
}
private List<String> setList() {
List<String> dataList = new ArrayList<>();
int start = 20 * (mCount - 1);
for (int i = start; i < 20 * mCount; i++) {
dataList.add("First" + i);
}
return dataList;
}
@Override
public void onRefresh() {
Log.e("wxl", "onRefresh");
setRefresh();
getData();
}
@Override
public void onLoadMore() {
Log.e("wxl", "onLoadMore");
mCount = mCount + 1;
getData();
}
private void setRefresh() {
mRecyclerViewAdapter.clearData();
mCount = 1;
}
} |
uvbs/FullSource | Source/Source/Tools/KingSoft 3DMax Export Plug/KG3DSK.h | #pragma once
#include "kg3dblacklist.h"
class KG3DSK
{
public:
KG3DSK(void);
~KG3DSK(void);
BOOL CheckSKValidation(BOOL bWriteLog);
HRESULT GetStandardSkeletonFromFile(const TCHAR* strFileName);
int FindBone(const TCHAR* strBoneName);
void OutputToFile(const TCHAR* strFileName);
private:
void DeleteBoneNameArray(TCHAR** ppArray);
TCHAR** GetChildBoneNameArray();
int GetBoneInfoFromString(const TCHAR* strInput, BoneInfoData& Data, TCHAR** ppChildBones);
void FillChildInfo(TCHAR** ppInput, BoneInfoData& Data);
void EliminateBlackBone();
void ClearUnusedBones();
void RelinkChildToParent(int nIndex);
std::vector<BoneInfoData> m_SK;
std::vector<int> m_BlackListBones;
KG3DBlackList m_BlackList;
};
|
IrineuAlmeidaJr/sistemaDoacao | site/frontend/src/components/ComboBoxLocalDoacao.js | <filename>site/frontend/src/components/ComboBoxLocalDoacao.js<gh_stars>0
import {FormSelect} from 'react-bootstrap'
import React from 'react';
const ComboBoxLocalDoacao = (props)=>{
return(
<>
{
props.locais.map(Local => (
// <option value={Local.id}>{Local.nomeRua}, {Local.numero}, {Local.cidade}/{Local.estado}</option>
<label for={Local.id}>
<input type="checkbox" name={Local.id} id={Local.id}/>
{Local.nomeRua}, {Local.numero}, {Local.cidade}/{Local.estado}
</label>
))
}
</>
)
}
export default ComboBoxLocalDoacao |
guailing2022/ntu-alumni-applet | miniprogram/biz/passport_biz.js | /**
* Notes: 注册登录模块业务逻辑
* Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
* Date: 2020-11-14 07:48:00
*/
const BaseBiz = require('./base_biz.js');
const cacheHelper = require('../helper/cache_helper.js');
const cloudHelper = require('../helper/cloud_helper.js');
const setting = require('../helper/setting.js');
const helper = require('../helper/helper.js');
const comm = require('../helper/comm.js');
const pageHelper = require('../helper/page_helper.js');
const bizHelper = require('../helper/biz_helper.js');
const CACHE_SETUP = 'SYS_SETUP';
class PassportBiz extends BaseBiz {
/**
* 获取系统配置
*/
static async setSetup(that) {
let setup = {
SETUP_TITLE : '',
}
setup.ver = setting.VER;
that.setData({
setup,
skin:'skin1'
});
}
// 清除参数
static async clearSetup() {
cacheHelper.remove(CACHE_SETUP);
}
/**
* 页面初始化
* @param {*} that
*/
static initPage(that) {
}
static initApp() {
}
/**
* 聊天室是否有小圆点
*/
static async isChatReadRedDot() {
let opt = {
hint: false
};
return await cloudHelper.callCloudSumbit('chat/is_read', {}, opt).then(result => {
return result.data.count;
}).catch(err => {
console.log(err);
})
}
/**
* 必须登陆 只能注册(窗口形式)
*/
static async loginMustAdminWin(that) {
that.setData({
isAdmin: true
});
return true;
}
/**
* 必须登陆 只能取消(窗口形式)
*/
static async loginMustCancelWin(that) {
return await PassportBiz.loginCheck(true, 2, true, '', that);
}
/**
* 必须登陆 只能返回(窗口形式)
*/
static async loginMustReturnWin(that) {
return await PassportBiz.loginCheck(true, 1, true, '', that);
}
/**
* 必须登陆 只能注册(窗口形式)
*/
static async loginMustRegWin(that) {
return await PassportBiz.loginCheck(true, 0, true, '', that);
}
/**
* 必须登陆 只能返回(跳转形式)
*/
static async loginMustReturnPage(that) {
return await PassportBiz.loginCheck(true, 1, false, '', that);
}
/**
* 必须登陆 只能注册(跳转形式)
*/
static async loginMustRegPage(that) {
return await PassportBiz.loginCheck(true, 0, false, '', that);
}
/**
* 静默登录
*/
static async loginSilence(that) {
return await PassportBiz.loginCheck(false, 0, false, 'bar', that);
}
/**
* 是否登录
*/
static isLogin() {
let id = PassportBiz.getUserId();
return (id.length > 0) ? true : false;
}
static getType() {
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
return token.type || '';
}
/**
* 是否注册
*/
static async isRegister(that) {
PassportBiz.clearToken();
// 判断用户是否注册
await PassportBiz.loginCheck(false, 0, false, '校验中', that);
if (await PassportBiz.isLogin()) {
wx.reLaunch({
url: '/pages/my/index/my_index',
});
return true;
}
return false;
}
/**
* 获取user id
*/
static getUserId() {
if (setting.TEST_MODE) return setting.TEST_USER_ID;
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
return token.id || '';
}
/**
* 获取user name
*/
static getUserName() {
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
return token.name || '';
}
/**
* 获取user 头像
*/
static getUserPic() {
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
return token.pic || '';
}
/**
* 获取user KEY
*/
static getUserKey() {
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
return token.key || '';
}
/**
* 设置user 头像
*/
static setUserPic(pic) {
if (!pic) return;
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (!token) return '';
token.pic = pic;
cacheHelper.set(comm.CACHE_TOKEN, token, setting.PASSPORT_TOKEN_EXPIRE);
}
/**
* 获取token
*/
static getToken() {
if (setting.TEST_MODE) return setting.TEST_TOKEN;
let token = cacheHelper.get(comm.CACHE_TOKEN);
return token || null;
}
/**
* 清除登录缓存
*/
static clearToken() {
cacheHelper.remove(comm.CACHE_TOKEN);
}
/**
* 登录判断及处理
* @param {*} mustLogin
* @param {*} returnMethod 返回方式 0=无条件注册 1=返回 2=可取消
* @param {*} isWin 是否窗口提示
* @param {*} title 是否提示登录中
* @param {*} that 当前页面实例,如果存在设置登录标志isLogin=true/false
*/
static async loginCheck(mustLogin = false, returnMethod = 0, isWin = true, title = '', that = null) {
let token = cacheHelper.get(comm.CACHE_TOKEN);
if (token) {
if (that)
that.setData({
isLogin: true
});
return true;
} else {
if (that) that.setData({
isLogin: false
});
}
let opt = {
title: title || '登录中',
};
let res = await cloudHelper.callCloudSumbit('passport/login', {}, opt).then(result => {
if (result && helper.isDefined(result.data.token) && result.data.token)
{
// 正常用户
cacheHelper.set(comm.CACHE_TOKEN, result.data.token, setting.PASSPORT_TOKEN_EXPIRE);
if (that) that.setData({
isLogin: true
});
return true;
} else if (mustLogin && isWin) {
// 需要登录,且窗口提示 返回方式 0=无条件注册 1=返回 2=可取消
wx.redirectTo({
url: '/pages/about/hint?type=0',
});
return false;
} else if (mustLogin && !isWin) {
// 需要登录, 返回方式 0=无条件注册 1=返回 2=可取消
if (returnMethod == 0) {
let callback = function () {
wx.redirectTo({
url: '/pages/reg/reg_step1',
})
}
pageHelper.showNoneToast('需要注册后使用', 1500, callback);
} else {
let callback = function () {
wx.navigateBack({
delta: 0,
});
}
pageHelper.showNoneToast('需要注册后使用', 1500, callback);
}
return false;
}
}).catch(err => {
PassportBiz.clearToken();
let isReg = false;
if (that) {
let route = that.route;
if (route == 'pages/reg/reg_step1' ||
route == 'pages/reg/reg_step2' ||
route == 'pages/reg/reg_step3')
isReg = true;
}
console.log(err);
// 状态异常,无法登录,跳到错误页面
if (err.code == cloudHelper.CODE.USER_EXCEPTION && (mustLogin || isReg)) {
wx.redirectTo({
url: '/pages/about/hint?type=1',
})
}
// 待审核用户
if (err.code == cloudHelper.CODE.USER_CHECK && (mustLogin || isReg)) {
if (isWin || isReg) {
// 需要登录,且窗口提示 返回方式 0=无条件注册 1=返回 2=可取消
if (isReg) {
pageHelper.hint('用户正在审核,无须重复注册');
}
else {
wx.redirectTo({
url: '/pages/about/hint?type=2',
});
}
} else {
// 需要登录, 返回方式 0=无条件注册 1=返回 2=可取消
if (returnMethod == 0) {
let callback = function () {
wx.switchTab({
url: '/pages/my/index/my_index',
});
}
pageHelper.showNoneToast('正在用户审核,暂无法使用本功能', 1500, callback);
} else {
let callback = function () {
wx.navigateBack({
delta: 0,
});
}
pageHelper.showNoneToast('正在用户审核,暂无法使用本功能', 1500, callback);
}
}
}
return false;
});
return res;
}
}
module.exports = PassportBiz; |
eikeschumann971/kspp | include/kspp/connect/postgres/postgres_producer.h | #include <chrono>
#include <memory>
#include <kspp/internal/queue.h>
#include <kspp/connect/postgres/postgres_connection.h>
#include <kspp/topology.h>
#include <kspp/connect/generic_producer.h>
#pragma once
namespace kspp {
class postgres_producer : public generic_producer<kspp::generic_avro, kspp::generic_avro>
{
public:
enum { MAX_ERROR_BEFORE_BAD=200 };
postgres_producer(std::string table,
const kspp::connect::connection_params& cp,
std::vector<std::string> keys,
std::string client_encoding,
size_t max_items_in_insert,
bool skip_delete=false);
~postgres_producer();
void register_metrics(kspp::processor* parent) override;
void close() override;
bool good() const {
return (_current_error_streak < MAX_ERROR_BEFORE_BAD);
}
bool eof() const override {
return (_incomming_msg.empty() && _done.empty());
}
std::string topic() const override {
return _table;
}
void stop();
bool is_connected() const { return _connected; }
void insert(std::shared_ptr<kevent<kspp::generic_avro, kspp::generic_avro>> p) override {
_incomming_msg.push_back(p);
}
void poll() override;
size_t queue_size() const override {
auto sz0 =_incomming_msg.size();
auto sz1 =_done.size();
return sz0 + sz1;
}
private:
bool initialize();
bool check_table_exists();
void _thread();
bool _exit;
bool _start_running;
bool _closed;
bool _connected; // ??
std::thread _bg;
std::unique_ptr<kspp_postgres::connection> _connection;
const std::string _table;
const kspp::connect::connection_params cp_;
const std::vector<std::string> _id_columns;
const std::string _client_encoding;
event_queue<kspp::generic_avro, kspp::generic_avro> _incomming_msg;
event_queue<kspp::generic_avro, kspp::generic_avro> _done; // waiting to be deleted in poll();
size_t _max_items_in_insert;
bool _table_checked;
bool _table_exists;
bool _skip_delete2;
size_t _current_error_streak;
metric_counter _connection_errors;
metric_counter _insert_errors;
metric_counter _msg_cnt;
metric_counter _msg_bytes;
metric_summary _request_time;
};
}
|
theodi/rummager | test/unit/elasticsearch/bulk_index_worker_test.rb | require "test_helper"
require "elasticsearch/base_worker"
require "elasticsearch/bulk_index_worker"
require "elasticsearch/index"
class BulkIndexWorkerTest < MiniTest::Unit::TestCase
def sample_document_hashes
%w(foo bar baz).map do |slug|
{:link => "/#{slug}", :title => slug.capitalize}
end
end
def test_indexes_documents
mock_index = mock("index")
mock_index.expects(:bulk_index).with(sample_document_hashes)
Elasticsearch::SearchServer.any_instance.expects(:index)
.with("test-index")
.returns(mock_index)
worker = Elasticsearch::BulkIndexWorker.new
worker.perform("test-index", sample_document_hashes)
end
def test_retries_when_index_locked
lock_delay = Elasticsearch::BulkIndexWorker::LOCK_DELAY
mock_index = mock("index")
mock_index.expects(:bulk_index).raises(Elasticsearch::IndexLocked)
Elasticsearch::SearchServer.any_instance.expects(:index)
.with("test-index")
.returns(mock_index)
Elasticsearch::BulkIndexWorker.expects(:perform_in)
.with(lock_delay, "test-index", sample_document_hashes)
worker = Elasticsearch::BulkIndexWorker.new
worker.perform("test-index", sample_document_hashes)
end
def test_forwards_to_failure_queue
stub_message = {}
Airbrake.expects(:notify_or_ignore).with(Elasticsearch::BaseWorker::FailedJobException.new(stub_message))
fail_block = Elasticsearch::BulkIndexWorker.sidekiq_retries_exhausted_block
fail_block.call(stub_message)
end
end
|
NCIEVS/nci-meme5 | admin/mojo/src/main/java/com/wci/umls/server/mojo/SourceDataRemoverMojo.java | /**
* Copyright 2016 West Coast Informatics, LLC
*/
package com.wci.umls.server.mojo;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import com.wci.umls.server.helpers.ConfigUtility;
/**
* Goal which removes a terminology and corresponding source data from a
* database.
*
* See admin/pom.xml for sample usage
*/
@Mojo(name = "remove-sd-terminology", defaultPhase = LifecyclePhase.PACKAGE)
public class SourceDataRemoverMojo extends SourceDataMojo {
/**
* Name of terminology to be removed.
*/
@Parameter
private String terminology;
/**
* Version to remove.
*/
@Parameter
private String version;
/**
* Whether to run this mojo against an active server
*/
@Parameter
private boolean server = false;
/**
* Instantiates a {@link SourceDataRemoverMojo} from the specified parameters.
*
*/
public SourceDataRemoverMojo() {
// do nothing
}
/* see superclass */
@Override
public void execute() throws MojoFailureException {
getLog().info("Starting removing terminology and source data");
getLog().info(" terminology = " + terminology);
getLog().info(" version = " + version);
try {
// Properties properties = ConfigUtility.getConfigProperties();
boolean serverRunning = ConfigUtility.isServerActive();
getLog()
.info("Server status detected: " + (!serverRunning ? "DOWN" : "UP"));
if (serverRunning && !server) {
throw new MojoFailureException(
"Mojo expects server to be down, but server is running");
}
if (!serverRunning && server) {
throw new MojoFailureException(
"Mojo expects server to be running, but server is down");
}
// authenticate
// SecurityService service = new SecurityServiceJpa();
// String authToken =
// service.authenticate(properties.getProperty("admin.user"),
// properties.getProperty("admin.password")).getAuthToken();
if (!serverRunning) {
getLog().info("Running directly");
/*
* final RemoveSourceDataAlgorithm algo = new
* RemoveSourceDataAlgorithm(); final SourceDataService sdService = new
* SourceDataServiceJpa(); try {
*
* SourceData sourceData = null; List<SourceData> data = sdService
* .findSourceDatas( "nameSort:\"" + getName(terminology, version) +
* "\"", null) .getObjects(); if (data.size() == 1) { sourceData =
* data.get(0); } else if (data.size() == 0) { // no source data,
* proceed } else { throw new Exception(
* "Unexpected number of results searching for source data: " +
* data.size()); } algo.setTerminology(terminology);
* algo.setVersion(version); algo.setSourceData(sourceData);
* algo.compute(); } catch (Exception e) { throw e; } finally {
* sdService.close(); algo.close(); }
*/
} else {
getLog().info("Running against server");
throw new Exception(
"Running against the server is not supported at this time.");
}
// service.close();
getLog().info("done ...");
System.exit(0);
} catch (
Exception e)
{
e.printStackTrace();
throw new MojoFailureException("Unexpected exception:", e);
}
}
}
|
aditya30394/Interview-Questions | C++/Arrays and matrix/LC17PhoneBackTrack.cpp | <gh_stars>1-10
/*
17. Letter Combinations of a Phone Number
Medium
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.
Example:
Input: "23"
Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
Note:
Although the above answer is in lexicographical order, your answer could be in any order you want.
*/
class Solution {
public:
vector<string> letterCombinations(string digits) {
unordered_map<char, vector<char>> map = {
{'2',{'a','b','c'}},
{'3',{'d','e','f'}},
{'4',{'g','h','i'}},
{'5',{'j','k','l'}},
{'6',{'m','n','o'}},
{'7',{'p','q','r','s'}},
{'8',{'t','u','v'}},
{'9',{'w','x','y','z'}}
};
vector<string> res;
if(digits.length()==0)
return res;
string comb("");
backtrack(digits,0,res,comb,map);
return res;
}
void backtrack(string& digits, int start,vector<string>& res,string comb,unordered_map<char, vector<char>>& map)
{
if(start==digits.length())
{
res.push_back(comb);
return;
}
for(auto it=map[digits[start]].begin(); it!=map[digits[start]].end(); ++it)
{
backtrack(digits,start+1,res,comb + *it,map);
}
}
}; |
prashanthashok/java-and-eggs | common/boot-utils/src/main/java/com/github/prashanthashok/spring/common/bootutils/BaseKafkaException.java | <reponame>prashanthashok/java-and-eggs
package com.github.prashanthashok.spring.common.bootutils;
public class BaseKafkaException extends RuntimeException {
protected BaseKafkaException(String message) {super(message);}
protected BaseKafkaException(String message, Throwable cause) {super(message, cause);}
protected BaseKafkaException(Throwable cause) {super(cause);}
}
|
CoderMMK/RSPS | Server/src/server/model/players/combat/melee/MeleeExtras.java | <gh_stars>0
package server.model.players.combat.melee;
import server.event.CycleEvent;
import server.event.CycleEventContainer;
import server.event.CycleEventHandler;
import server.model.npcs.NPCHandler;
import server.model.players.Client;
import server.model.players.Player;
import server.model.players.PlayerHandler;
import server.util.Misc;
public class MeleeExtras {
public static void applySmite(Client c, int index, int damage) {
if (!c.prayerActive[23])
return;
if (damage <= 0)
return;
if (PlayerHandler.players[index] != null) {
Client c2 = (Client)PlayerHandler.players[index];
c2.playerLevel[5] -= (int)(damage/4);
if (c2.playerLevel[5] <= 0) {
c2.playerLevel[5] = 0;
c2.getCombat().resetPrayers();
}
c2.getPA().refreshSkill(5);
}
}
public static void handleDragonFireShield(final Client c) {
if(PlayerHandler.players[c.playerIndex].playerLevel[3] <= 0) {
return;
}
if (c.playerIndex > 0 && PlayerHandler.players[c.playerIndex] != null) {
if(c.dfsCount < 40) {
c.sendMessage("My shield hasn't finished charging.");
return;
}
final int pX = c.getX();
final int pY = c.getY();
final int oX = PlayerHandler.players[c.playerIndex].getX();
final int oY = PlayerHandler.players[c.playerIndex].getY();
final int offX = (pY - oY)* -1;
final int offY = (pX - oX)* -1;
final int damage = Misc.random(25) + 5;
c.dfsCount = 0;
c.startAnimation(6696);
c.gfx0(1165);
c.attackTimer += 3;
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
@Override
public void execute(CycleEventContainer container) {
c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50, 10, 1166, 25, 27, c.playerIndex - 1, 0);
container.stop();
}
@Override
public void stop() {
}
}, 3);
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
@Override
public void execute(CycleEventContainer container) {
PlayerHandler.players[c.playerIndex].gfx100(1167);
PlayerHandler.players[c.playerIndex].playerLevel[3] -= damage;
if (!c.getHitUpdateRequired()) {
c.setHitDiff(damage);
c.setHitUpdateRequired(true);
} else if (!c.getHitUpdateRequired2()) {
c.setHitDiff2(damage);
c.setHitUpdateRequired2(true);
}
PlayerHandler.players[c.playerIndex].updateRequired = true;
container.stop();
}
@Override
public void stop() {
}
}, 3);
}
}
public static void handleDragonFireShieldNPC(final Client c) {
if(NPCHandler.npcs[c.npcIndex].HP <= 0) {
return;
}
if (c.npcIndex > 0 && NPCHandler.npcs[c.npcIndex] != null) {
if(c.dfsCount < 40) {
c.sendMessage("My shield hasn't finished charging.");
return;
}
if(NPCHandler.npcs[c.npcIndex].HP <= 1) {
return;
}
final int pX = c.getX();
final int pY = c.getY();
final int nX = NPCHandler.npcs[c.npcIndex].getX();
final int nY = NPCHandler.npcs[c.npcIndex].getY();
final int offX = (pY - nY)* -1;
final int offY = (pX - nX)* -1;
final int damage = Misc.random(25) + 5;
c.dfsCount = 0;
c.startAnimation(6696);
c.gfx0(1165);
c.attackTimer += 3;
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
@Override
public void execute(CycleEventContainer container) {
c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50, 10, 1166, 25, 27, c.npcIndex + 1, 0);
container.stop();
}
@Override
public void stop() {
}
}, 3);
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
@Override
public void execute(CycleEventContainer container) {
NPCHandler.npcs[c.npcIndex].gfx100(1167);
NPCHandler.npcs[c.npcIndex].handleHitMask(damage);
NPCHandler.npcs[c.npcIndex].HP -= damage;
container.stop();
}
@Override
public void stop() {
}
}, 3);
}
}
public static void addCharge(Client c) {
if(c.playerEquipment[c.playerShield] != 11283) {
return;
}
c.dfsCount++;
if(c.dfsCount >= 40) {
c.dfsCount = 40;
}
if(c.dfsCount == 39) {
c.sendMessage("Your dragon fireshield has finished charging!");
}
}
public static void appendVengeanceNPC(Client c, int otherPlayer, int damage) {
if (damage <= 0)
return;
if (c.npcIndex > 0 && NPCHandler.npcs[c.npcIndex] != null) {
c.forcedText = "Taste vengeance!";
c.forcedChatUpdateRequired = true;
c.updateRequired = true;
c.vengOn = false;
if ((NPCHandler.npcs[c.npcIndex].HP - damage) > 0) {
damage = (int)(damage * 0.75);
if (damage > NPCHandler.npcs[c.npcIndex].HP) {
damage = NPCHandler.npcs[c.npcIndex].HP;
}
NPCHandler.npcs[c.npcIndex].HP -= damage;
NPCHandler.npcs[c.npcIndex].handleHitMask(damage);
}
}
c.updateRequired = true;
}
public static void appendVengeance(Client c, int otherPlayer, int damage) {
if (damage <= 0)
return;
Player o = PlayerHandler.players[otherPlayer];
o.forcedText = "Taste vengeance!";
o.forcedChatUpdateRequired = true;
o.updateRequired = true;
o.vengOn = false;
if ((o.playerLevel[3] - damage) > 0) {
damage = (int)(damage * 0.75);
if (damage > c.playerLevel[3]) {
damage = c.playerLevel[3];
}
if (!c.getHitUpdateRequired()) {
c.setHitDiff(damage);
c.setHitUpdateRequired(true);
} else if (!c.getHitUpdateRequired2()) {
c.setHitDiff2(damage);
c.setHitUpdateRequired2(true);
}
c.playerLevel[3] -= damage;
c.getPA().refreshSkill(3);
}
c.updateRequired = true;
}
public static void applyRecoilNPC(Client c, int damage, int i) {
if (damage > 0 && c.playerEquipment[c.playerRing] == 2550) {
int recDamage = damage/10 + 1;
NPCHandler.npcs[c.npcIndex].HP -= recDamage;
NPCHandler.npcs[c.npcIndex].handleHitMask(recDamage);
removeRecoil(c);
c.recoilHits += damage;
}
}
public static void applyRecoil(Client c, int damage, int i) {
if (damage > 0 && PlayerHandler.players[i].playerEquipment[c.playerRing] == 2550) {
int recDamage = damage/10 + 1;
if (!c.getHitUpdateRequired()) {
c.setHitDiff(recDamage);
c.setHitUpdateRequired(true);
} else if (!c.getHitUpdateRequired2()) {
c.setHitDiff2(recDamage);
c.setHitUpdateRequired2(true);
}
c.dealDamage(recDamage);
c.updateRequired = true;
removeRecoil(c);
c.recoilHits += damage;
}
}
public static void removeRecoil(Client c) {
if(c.recoilHits >= 400) {
c.getItems().removeItem(2550, c.playerRing);
c.getItems().deleteItem(2550, c.getItems().getItemSlot(2550), 1);
c.sendMessage("Your ring of recoil shaters!");
c.recoilHits = 0;
} else {
c.recoilHits++;
}
}
public static void graniteMaulSpecial(Client c) {
if (c.playerIndex > 0) {
Client o = (Client)PlayerHandler.players[c.playerIndex];
if (c.goodDistance(c.getX(), c.getY(), o.getX(), o.getY(), c.getCombat().getRequiredDistance())) {
if (c.getCombat().checkReqs()) {
if (c.getCombat().checkSpecAmount(4153)) {
boolean hit = Misc.random(c.getCombat().calculateMeleeAttack()) > Misc.random(o.getCombat().calculateMeleeDefence());
int damage = 0;
if (hit)
damage = Misc.random(c.getCombat().calculateMeleeMaxHit());
if (o.prayerActive[18] && System.currentTimeMillis() - o.protMeleeDelay > 1500)
damage *= .6;
if(o.playerLevel[3] - damage <= 0) {
damage = o.playerLevel[3];
}
if(o.playerLevel[3] > 0) {
o.handleHitMask(damage);
c.startAnimation(1667);
o.gfx100(337);
o.dealDamage(damage);
}
}
}
}
} else if(c.npcIndex > 0) {
int x = NPCHandler.npcs[c.npcIndex].absX;
int y = NPCHandler.npcs[c.npcIndex].absY;
if (c.goodDistance(c.getX(), c.getY(), x, y, 2)) {
if (c.getCombat().checkReqs()) {
if (c.getCombat().checkSpecAmount(4153)) {
int damage = Misc.random(c.getCombat().calculateMeleeMaxHit());
if(NPCHandler.npcs[c.npcIndex].HP - damage < 0) {
damage = NPCHandler.npcs[c.npcIndex].HP;
}
if(NPCHandler.npcs[c.npcIndex].HP > 0) {
NPCHandler.npcs[c.npcIndex].HP -= damage;
NPCHandler.npcs[c.npcIndex].handleHitMask(damage);
c.startAnimation(1667);
c.gfx100(337);
}
}
}
}
}
}
} |
Xiaoxiong-Liu/gluon-ts | test/nursery/test_autogluon_tabular.py | <filename>test/nursery/test_autogluon_tabular.py
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
from typing import List, Optional
import pytest
import numpy as np
import pandas as pd
import tempfile
from pathlib import Path
from gluonts.dataset.common import ListDataset
from gluonts.dataset.util import to_pandas
from gluonts.nursery.autogluon_tabular.predictor import get_features_dataframe
from gluonts.nursery.autogluon_tabular import (
TabularEstimator,
)
from gluonts.model.predictor import Predictor
from gluonts.time_feature import TimeFeature, HourOfDay, DayOfWeek, MonthOfYear
@pytest.mark.parametrize(
"series, time_features, lag_indices, past_data, expected_df",
[
(
pd.Series(
list(range(5)),
index=pd.date_range(
"2020-12-31 22:00:00", freq="H", periods=5
),
),
[MonthOfYear(), DayOfWeek(), HourOfDay()],
[1, 2, 5],
None,
pd.DataFrame(
{
"MonthOfYear": [0.5, 0.5, -0.5, -0.5, -0.5],
"DayOfWeek": [
0.0,
0.0,
4.0 / 6 - 0.5,
4.0 / 6 - 0.5,
4.0 / 6 - 0.5,
],
"HourOfDay": [
22.0 / 23 - 0.5,
0.5,
-0.5,
1.0 / 23 - 0.5,
2.0 / 23 - 0.5,
],
"lag_1": [np.nan, 0, 1, 2, 3],
"lag_2": [np.nan, np.nan, 0, 1, 2],
"lag_5": [np.nan, np.nan, np.nan, np.nan, np.nan],
"target": list(range(5)),
},
index=pd.date_range(
"2020-12-31 22:00:00", freq="H", periods=5
),
),
),
(
pd.Series(
list(range(5)),
index=pd.date_range(
"2020-12-31 22:00:00", freq="H", periods=5
),
),
[MonthOfYear(), DayOfWeek(), HourOfDay()],
[1, 2, 5],
pd.Series(
list(range(5)),
index=pd.date_range(
"2020-12-31 16:00:00", freq="H", periods=5
),
),
pd.DataFrame(
{
"MonthOfYear": [0.5, 0.5, -0.5, -0.5, -0.5],
"DayOfWeek": [
0.0,
0.0,
4.0 / 6 - 0.5,
4.0 / 6 - 0.5,
4.0 / 6 - 0.5,
],
"HourOfDay": [
22.0 / 23 - 0.5,
0.5,
-0.5,
1.0 / 23 - 0.5,
2.0 / 23 - 0.5,
],
"lag_1": [np.nan, 0, 1, 2, 3],
"lag_2": [4, np.nan, 0, 1, 2],
"lag_5": [1, 2, 3, 4, np.nan],
"target": list(range(5)),
},
index=pd.date_range(
"2020-12-31 22:00:00", freq="H", periods=5
),
),
),
],
)
def test_get_features_dataframe(
series: pd.Series,
time_features: List[TimeFeature],
lag_indices: List[int],
past_data: Optional[pd.Series],
expected_df: pd.DataFrame,
):
got_df = get_features_dataframe(
series,
time_features=time_features,
lag_indices=lag_indices,
past_data=past_data,
)
pd.testing.assert_frame_equal(expected_df, got_df)
@pytest.mark.parametrize(
"dataset, freq, prediction_length",
[
(
ListDataset(
[
{
"start": pd.Timestamp(
"1750-01-07 00:00:00", freq="W-TUE"
),
"target": np.array(
[
1089.2,
1078.91,
1099.88,
35790.55,
34096.95,
34906.95,
],
),
},
{
"start": pd.Timestamp(
"1750-01-07 00:00:00", freq="W-TUE"
),
"target": np.array(
[
1099.2,
1098.91,
1069.88,
35990.55,
34076.95,
34766.95,
],
),
},
],
freq="W-TUE",
),
"W-TUE",
2,
)
],
)
@pytest.mark.parametrize("lag_indices", [[], [1, 2, 5]])
@pytest.mark.parametrize("disable_auto_regression", [False, True])
@pytest.mark.parametrize(
"validation_data",
[
None,
ListDataset(
[
{
"start": pd.Timestamp("1750-01-07 00:00:00", freq="W-TUE"),
"target": np.array(
[
1089.2,
1078.91,
1099.88,
35790.55,
34096.95,
34906.95,
],
),
},
{
"start": pd.Timestamp("1750-01-07 00:00:00", freq="W-TUE"),
"target": np.array(
[
1099.2,
1098.91,
1069.88,
35990.55,
34076.95,
34766.95,
],
),
},
],
freq="W-TUE",
),
],
)
@pytest.mark.parametrize("last_k_for_val", [None, 2])
def test_tabular_estimator(
dataset,
freq,
prediction_length: int,
lag_indices: List[int],
disable_auto_regression: bool,
last_k_for_val: int,
validation_data: ListDataset,
):
estimator = TabularEstimator(
freq=freq,
prediction_length=prediction_length,
lag_indices=lag_indices,
time_limit=10,
disable_auto_regression=disable_auto_regression,
last_k_for_val=last_k_for_val,
)
def check_consistency(entry, f1, f2):
ts = to_pandas(entry)
start_timestamp = ts.index[-1] + pd.tseries.frequencies.to_offset(freq)
assert f1.samples.shape == (1, prediction_length)
assert f1.start_date == start_timestamp
assert f2.samples.shape == (1, prediction_length)
assert f2.start_date == start_timestamp
assert np.allclose(f1.samples, f2.samples)
with tempfile.TemporaryDirectory() as path:
predictor = estimator.train(dataset, validation_data=validation_data)
predictor.serialize(Path(path))
predictor = None
predictor = Predictor.deserialize(Path(path))
assert not predictor.auto_regression or any(
l < prediction_length for l in predictor.lag_indices
)
assert predictor.batch_size > 1
forecasts_serial = list(predictor._predict_serial(dataset))
forecasts_batch = list(predictor.predict(dataset))
for entry, f1, f2 in zip(dataset, forecasts_serial, forecasts_batch):
check_consistency(entry, f1, f2)
if not predictor.auto_regression:
forecasts_batch_autoreg = list(
predictor._predict_batch_autoreg(dataset)
)
for entry, f1, f2 in zip(
dataset, forecasts_serial, forecasts_batch_autoreg
):
check_consistency(entry, f1, f2)
|
kamal1316/competitive-programming | kattis/sylvester.cc | <reponame>kamal1316/competitive-programming<filename>kattis/sylvester.cc
// https://open.kattis.com/problems/sylvester
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(0), ios::sync_with_stdio(0);
ll t, n, x, y, w, h;
cin >> t;
while (t--) {
cin >> n >> x >> y >> w >> h;
for (ll i = y; i < y + h; i++)
for (ll j = x; j < x + w; j++) {
ll s = 1, r = i, c = j;
for (ll k = n; k > 1; k /= 2) {
if (r >= k / 2 && c >= k / 2) s *= -1;
if (r >= k / 2) r -= k / 2;
if (c >= k / 2) c -= k / 2;
}
cout << s << " \n"[j == x + w - 1];
}
if (t) cout << '\n';
}
}
|
Kisensum/dnp3 | java/bindings/src/main/java/com/automatak/dnp3/Database.java | <reponame>Kisensum/dnp3<filename>java/bindings/src/main/java/com/automatak/dnp3/Database.java<gh_stars>1-10
/**
* Copyright 2013-2016 Automatak, LLC
*
* Licensed to Automatak, LLC (www.automatak.com) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. Automatak, LLC
* 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.html
*
* 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.automatak.dnp3;
import com.automatak.dnp3.enums.EventMode;
/**
* Interface used to load measurement changes into an outstation
*/
public interface Database
{
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(BinaryInput value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(DoubleBitBinaryInput value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(AnalogInput value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(Counter value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(FrozenCounter value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(BinaryOutputStatus value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
*/
void update(AnalogOutputStatus value, int index);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(BinaryInput value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(DoubleBitBinaryInput value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(AnalogInput value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(Counter value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(FrozenCounter value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(BinaryOutputStatus value, int index, EventMode mode);
/**
* Update a value in the database
* @param value measurement to update
* @param index index of measurement
* @param mode EventMode to use
*/
void update(AnalogOutputStatus value, int index, EventMode mode);
}
|
PecadoGames/pecadogames-client | src/views/design/InputField.js | import styled from "styled-components";
export const InputField = styled.input`
&::placeholder {
color: ${props => props.placeholderColor || "#9e9e9e"};
text-align: justify;
}
height: ${props => props.height || "35px"};
padding-left: 15px;
padding-top: ${props => props.paddingTop};
border: ${props => props.border || "none"};
border-bottom: ${props => props.borderBottom || "1px solid white"};
border-radius: 0px;
margin-top: ${props => props.marginTop || "0px"};
margin-bottom: ${props => props.marginBottom || "12px"};
margin-left: ${props => props.marginLeft || "12px"};
background: none;
color: ${props => props.color || "white"};
width: ${props => props.width || "75%"};
value ${props => props.value || null}
`; |
funyoo/Hqx | src/main/java/com/funyoo/hqxApp/util/cachePool/CachePool.java | <reponame>funyoo/Hqx
package com.funyoo.hqxApp.util.cachePool;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Component
public class CachePool implements CachePoolInterface<String, String> {
public static final CachePool instance = new CachePool();
private Map<String, String> cache;
// 时间戳
private long timeStamp;
// 清理时间间隔
private long timeClean;
private CachePool() {
cache = new ConcurrentHashMap<>();
timeStamp = System.currentTimeMillis();
timeClean = 6 * 60 * 60 * 1000;
}
@Override
public String get(String s) {
if (System.currentTimeMillis() - timeStamp > timeClean) {
clear();
}
return cache.get(s);
}
@Override
public void put(String key, String value) {
if (cache.size() > 1 << 20) {
cache.clear();
}
cache.put(key, value);
}
@Override
public String remove(String key) {
return cache.remove(key);
}
@Override
public void clear() {
cache.clear();
}
public void setTimeClean(Long clean) {
timeClean = clean;
}
}
|
nathanawmk/fboss | fboss/lib/firmware_storage/FbossFwStorage.h | <filename>fboss/lib/firmware_storage/FbossFwStorage.h
// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include <fcntl.h>
#include <folly/FileUtil.h>
#include <folly/init/Init.h>
#include <folly/io/Cursor.h>
#include <folly/logging/xlog.h>
#include <gflags/gflags.h>
#include <yaml-cpp/yaml.h>
#include <vector>
#include "fboss/lib/firmware_storage/FbossFirmware.h"
// Reference to default firmware manifest file
DECLARE_string(default_firmware_manifest);
namespace facebook::fboss {
/*
* FbossFwStorage
*
* A class representing the firmware storage in the FBOSS platform. It parses
* the yaml file containing descrption of product/modules and their supported
* firmware information. This class allows user to create FbossFirmware objects
* for a given module and firmware version.
*
* In a typical usage, the caller calls the static function initStorage() with
* the firmware manifest file (a yaml file with all module/product description).
* This returns FbossFwStorage object to caller. Then caller can use
* getFwVersionList() to get the list of all the firmware version records for a
* product/module name. Based on that the user can call getFirmware() with
* product name and firmware version string to get the FbossFirmware object.
* Later the FbossFirmware object can be used to extract firmware information
* like properties, firmware image payload etc.
*/
class FbossFwStorage {
public:
// Record of firmware for a given product. This contains product/module name,
// its description and map of version id to version record
struct FwIdentifier {
std::string prodName;
std::string description;
std::unordered_map<std::string, struct FbossFirmware::FwAttributes>
versionRecord;
};
// Parses yaml file and creates FbossFwStorage object
static FbossFwStorage initStorage(
std::string fwConfigFile = FLAGS_default_firmware_manifest);
// Provides the list of firmware versions for a module/product
const struct FwIdentifier& getFwVersionList(const std::string& name) const;
// Returns the FbossFirmware object for a given module and f/w version
std::unique_ptr<FbossFirmware> getFirmware(
const std::string& name,
const std::string& version);
protected:
// Contructor: needs the YAML::Node the root node of Yaml file parsing
// This needs to be protected because exposed functon getFirmwareVersionList
// is supposed to create the FbossFwStorage object
explicit FbossFwStorage(const YAML::Node& fwInfoRoot, std::string fwDir);
// Directory for firmware files
std::string firmwareDir_;
// We parse YAML file and store the map of product/module name to firmware
// record localy in this object.
std::unordered_map<std::string, struct FwIdentifier> firmwareRecord_;
};
} // namespace facebook::fboss
|
sergiorr/yastack | ev/external/googleapis/home/ubuntu/saaras-io/falcon/build/external/googleapis/google/spanner/admin/database/v1/spanner_database_admin.pb.cc | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/spanner/admin/database/v1/spanner_database_admin.proto
#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace google {
namespace spanner {
namespace admin {
namespace database {
namespace v1 {
class DatabaseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Database>
_instance;
} _Database_default_instance_;
class ListDatabasesRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ListDatabasesRequest>
_instance;
} _ListDatabasesRequest_default_instance_;
class ListDatabasesResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ListDatabasesResponse>
_instance;
} _ListDatabasesResponse_default_instance_;
class CreateDatabaseRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CreateDatabaseRequest>
_instance;
} _CreateDatabaseRequest_default_instance_;
class CreateDatabaseMetadataDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<CreateDatabaseMetadata>
_instance;
} _CreateDatabaseMetadata_default_instance_;
class GetDatabaseRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GetDatabaseRequest>
_instance;
} _GetDatabaseRequest_default_instance_;
class UpdateDatabaseDdlRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UpdateDatabaseDdlRequest>
_instance;
} _UpdateDatabaseDdlRequest_default_instance_;
class UpdateDatabaseDdlMetadataDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<UpdateDatabaseDdlMetadata>
_instance;
} _UpdateDatabaseDdlMetadata_default_instance_;
class DropDatabaseRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<DropDatabaseRequest>
_instance;
} _DropDatabaseRequest_default_instance_;
class GetDatabaseDdlRequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GetDatabaseDdlRequest>
_instance;
} _GetDatabaseDdlRequest_default_instance_;
class GetDatabaseDdlResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GetDatabaseDdlResponse>
_instance;
} _GetDatabaseDdlResponse_default_instance_;
} // namespace v1
} // namespace database
} // namespace admin
} // namespace spanner
} // namespace google
namespace protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto {
void InitDefaultsDatabaseImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_Database_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::Database();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::Database::InitAsDefaultInstance();
}
void InitDefaultsDatabase() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDatabaseImpl);
}
void InitDefaultsListDatabasesRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_ListDatabasesRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::ListDatabasesRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::ListDatabasesRequest::InitAsDefaultInstance();
}
void InitDefaultsListDatabasesRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDatabasesRequestImpl);
}
void InitDefaultsListDatabasesResponseImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsDatabase();
{
void* ptr = &::google::spanner::admin::database::v1::_ListDatabasesResponse_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::ListDatabasesResponse();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::ListDatabasesResponse::InitAsDefaultInstance();
}
void InitDefaultsListDatabasesResponse() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDatabasesResponseImpl);
}
void InitDefaultsCreateDatabaseRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_CreateDatabaseRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::CreateDatabaseRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::CreateDatabaseRequest::InitAsDefaultInstance();
}
void InitDefaultsCreateDatabaseRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCreateDatabaseRequestImpl);
}
void InitDefaultsCreateDatabaseMetadataImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_CreateDatabaseMetadata_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::CreateDatabaseMetadata();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::CreateDatabaseMetadata::InitAsDefaultInstance();
}
void InitDefaultsCreateDatabaseMetadata() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCreateDatabaseMetadataImpl);
}
void InitDefaultsGetDatabaseRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_GetDatabaseRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::GetDatabaseRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::GetDatabaseRequest::InitAsDefaultInstance();
}
void InitDefaultsGetDatabaseRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGetDatabaseRequestImpl);
}
void InitDefaultsUpdateDatabaseDdlRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_UpdateDatabaseDdlRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest::InitAsDefaultInstance();
}
void InitDefaultsUpdateDatabaseDdlRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUpdateDatabaseDdlRequestImpl);
}
void InitDefaultsUpdateDatabaseDdlMetadataImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
{
void* ptr = &::google::spanner::admin::database::v1::_UpdateDatabaseDdlMetadata_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata::InitAsDefaultInstance();
}
void InitDefaultsUpdateDatabaseDdlMetadata() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUpdateDatabaseDdlMetadataImpl);
}
void InitDefaultsDropDatabaseRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_DropDatabaseRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::DropDatabaseRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::DropDatabaseRequest::InitAsDefaultInstance();
}
void InitDefaultsDropDatabaseRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDropDatabaseRequestImpl);
}
void InitDefaultsGetDatabaseDdlRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_GetDatabaseDdlRequest_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::GetDatabaseDdlRequest();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::GetDatabaseDdlRequest::InitAsDefaultInstance();
}
void InitDefaultsGetDatabaseDdlRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGetDatabaseDdlRequestImpl);
}
void InitDefaultsGetDatabaseDdlResponseImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::google::spanner::admin::database::v1::_GetDatabaseDdlResponse_default_instance_;
new (ptr) ::google::spanner::admin::database::v1::GetDatabaseDdlResponse();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::google::spanner::admin::database::v1::GetDatabaseDdlResponse::InitAsDefaultInstance();
}
void InitDefaultsGetDatabaseDdlResponse() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGetDatabaseDdlResponseImpl);
}
::google::protobuf::Metadata file_level_metadata[11];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::Database, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::Database, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::Database, state_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesRequest, parent_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesRequest, page_size_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesRequest, page_token_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesResponse, databases_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::ListDatabasesResponse, next_page_token_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseRequest, parent_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseRequest, create_statement_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseRequest, extra_statements_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseMetadata, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::CreateDatabaseMetadata, database_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseRequest, name_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest, database_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest, statements_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest, operation_id_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata, database_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata, statements_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata, commit_timestamps_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::DropDatabaseRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::DropDatabaseRequest, database_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseDdlRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseDdlRequest, database_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseDdlResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::spanner::admin::database::v1::GetDatabaseDdlResponse, statements_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::google::spanner::admin::database::v1::Database)},
{ 7, -1, sizeof(::google::spanner::admin::database::v1::ListDatabasesRequest)},
{ 15, -1, sizeof(::google::spanner::admin::database::v1::ListDatabasesResponse)},
{ 22, -1, sizeof(::google::spanner::admin::database::v1::CreateDatabaseRequest)},
{ 30, -1, sizeof(::google::spanner::admin::database::v1::CreateDatabaseMetadata)},
{ 36, -1, sizeof(::google::spanner::admin::database::v1::GetDatabaseRequest)},
{ 42, -1, sizeof(::google::spanner::admin::database::v1::UpdateDatabaseDdlRequest)},
{ 50, -1, sizeof(::google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata)},
{ 58, -1, sizeof(::google::spanner::admin::database::v1::DropDatabaseRequest)},
{ 64, -1, sizeof(::google::spanner::admin::database::v1::GetDatabaseDdlRequest)},
{ 70, -1, sizeof(::google::spanner::admin::database::v1::GetDatabaseDdlResponse)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_Database_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_ListDatabasesRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_ListDatabasesResponse_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_CreateDatabaseRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_CreateDatabaseMetadata_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_GetDatabaseRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_UpdateDatabaseDdlRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_UpdateDatabaseDdlMetadata_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_DropDatabaseRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_GetDatabaseDdlRequest_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::google::spanner::admin::database::v1::_GetDatabaseDdlResponse_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"google/spanner/admin/database/v1/spanner_database_admin.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, file_level_enum_descriptors, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 11);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n=google/spanner/admin/database/v1/spann"
"er_database_admin.proto\022 google.spanner."
"admin.database.v1\032\034google/api/annotation"
"s.proto\032\025google/api/auth.proto\032\036google/i"
"am/v1/iam_policy.proto\032\032google/iam/v1/po"
"licy.proto\032#google/longrunning/operation"
"s.proto\032\033google/protobuf/empty.proto\032\037go"
"ogle/protobuf/timestamp.proto\"\222\001\n\010Databa"
"se\022\014\n\004name\030\001 \001(\t\022\?\n\005state\030\002 \001(\01620.google"
".spanner.admin.database.v1.Database.Stat"
"e\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE"
"ATING\020\001\022\t\n\005READY\020\002\"M\n\024ListDatabasesReque"
"st\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n"
"\npage_token\030\004 \001(\t\"o\n\025ListDatabasesRespon"
"se\022=\n\tdatabases\030\001 \003(\0132*.google.spanner.a"
"dmin.database.v1.Database\022\027\n\017next_page_t"
"oken\030\002 \001(\t\"[\n\025CreateDatabaseRequest\022\016\n\006p"
"arent\030\001 \001(\t\022\030\n\020create_statement\030\002 \001(\t\022\030\n"
"\020extra_statements\030\003 \003(\t\"*\n\026CreateDatabas"
"eMetadata\022\020\n\010database\030\001 \001(\t\"\"\n\022GetDataba"
"seRequest\022\014\n\004name\030\001 \001(\t\"V\n\030UpdateDatabas"
"eDdlRequest\022\020\n\010database\030\001 \001(\t\022\022\n\nstateme"
"nts\030\002 \003(\t\022\024\n\014operation_id\030\003 \001(\t\"x\n\031Updat"
"eDatabaseDdlMetadata\022\020\n\010database\030\001 \001(\t\022\022"
"\n\nstatements\030\002 \003(\t\0225\n\021commit_timestamps\030"
"\003 \003(\0132\032.google.protobuf.Timestamp\"\'\n\023Dro"
"pDatabaseRequest\022\020\n\010database\030\001 \001(\t\")\n\025Ge"
"tDatabaseDdlRequest\022\020\n\010database\030\001 \001(\t\",\n"
"\026GetDatabaseDdlResponse\022\022\n\nstatements\030\001 "
"\003(\t2\225\014\n\rDatabaseAdmin\022\267\001\n\rListDatabases\022"
"6.google.spanner.admin.database.v1.ListD"
"atabasesRequest\0327.google.spanner.admin.d"
"atabase.v1.ListDatabasesResponse\"5\202\323\344\223\002/"
"\022-/v1/{parent=projects/*/instances/*}/da"
"tabases\022\242\001\n\016CreateDatabase\0227.google.span"
"ner.admin.database.v1.CreateDatabaseRequ"
"est\032\035.google.longrunning.Operation\"8\202\323\344\223"
"\0022\"-/v1/{parent=projects/*/instances/*}/"
"databases:\001*\022\246\001\n\013GetDatabase\0224.google.sp"
"anner.admin.database.v1.GetDatabaseReque"
"st\032*.google.spanner.admin.database.v1.Da"
"tabase\"5\202\323\344\223\002/\022-/v1/{name=projects/*/ins"
"tances/*/databases/*}\022\260\001\n\021UpdateDatabase"
"Ddl\022:.google.spanner.admin.database.v1.U"
"pdateDatabaseDdlRequest\032\035.google.longrun"
"ning.Operation\"@\202\323\344\223\002:25/v1/{database=pr"
"ojects/*/instances/*/databases/*}/ddl:\001*"
"\022\230\001\n\014DropDatabase\0225.google.spanner.admin"
".database.v1.DropDatabaseRequest\032\026.googl"
"e.protobuf.Empty\"9\202\323\344\223\0023*1/v1/{database="
"projects/*/instances/*/databases/*}\022\302\001\n\016"
"GetDatabaseDdl\0227.google.spanner.admin.da"
"tabase.v1.GetDatabaseDdlRequest\0328.google"
".spanner.admin.database.v1.GetDatabaseDd"
"lResponse\"=\202\323\344\223\0027\0225/v1/{database=project"
"s/*/instances/*/databases/*}/ddl\022\224\001\n\014Set"
"IamPolicy\022\".google.iam.v1.SetIamPolicyRe"
"quest\032\025.google.iam.v1.Policy\"I\202\323\344\223\002C\">/v"
"1/{resource=projects/*/instances/*/datab"
"ases/*}:setIamPolicy:\001*\022\224\001\n\014GetIamPolicy"
"\022\".google.iam.v1.GetIamPolicyRequest\032\025.g"
"oogle.iam.v1.Policy\"I\202\323\344\223\002C\">/v1/{resour"
"ce=projects/*/instances/*/databases/*}:g"
"etIamPolicy:\001*\022\272\001\n\022TestIamPermissions\022(."
"google.iam.v1.TestIamPermissionsRequest\032"
").google.iam.v1.TestIamPermissionsRespon"
"se\"O\202\323\344\223\002I\"D/v1/{resource=projects/*/ins"
"tances/*/databases/*}:testIamPermissions"
":\001*B\266\001\n$com.google.spanner.admin.databas"
"e.v1B\031SpannerDatabaseAdminProtoP\001ZHgoogl"
"e.golang.org/genproto/googleapis/spanner"
"/admin/database/v1;database\252\002&Google.Clo"
"ud.Spanner.Admin.Database.V1b\006proto3"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 2916);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/spanner/admin/database/v1/spanner_database_admin.proto", &protobuf_RegisterTypes);
::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
::protobuf_google_2fapi_2fauth_2eproto::AddDescriptors();
::protobuf_google_2fiam_2fv1_2fiam_5fpolicy_2eproto::AddDescriptors();
::protobuf_google_2fiam_2fv1_2fpolicy_2eproto::AddDescriptors();
::protobuf_google_2flongrunning_2foperations_2eproto::AddDescriptors();
::protobuf_google_2fprotobuf_2fempty_2eproto::AddDescriptors();
::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto
namespace google {
namespace spanner {
namespace admin {
namespace database {
namespace v1 {
const ::google::protobuf::EnumDescriptor* Database_State_descriptor() {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_enum_descriptors[0];
}
bool Database_State_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Database_State Database::STATE_UNSPECIFIED;
const Database_State Database::CREATING;
const Database_State Database::READY;
const Database_State Database::State_MIN;
const Database_State Database::State_MAX;
const int Database::State_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
// ===================================================================
void Database::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Database::kNameFieldNumber;
const int Database::kStateFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Database::Database()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsDatabase();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.Database)
}
Database::Database(const Database& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.name().size() > 0) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
state_ = from.state_;
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.Database)
}
void Database::SharedCtor() {
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
state_ = 0;
_cached_size_ = 0;
}
Database::~Database() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.Database)
SharedDtor();
}
void Database::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Database::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Database::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Database& Database::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsDatabase();
return *internal_default_instance();
}
Database* Database::New(::google::protobuf::Arena* arena) const {
Database* n = new Database;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Database::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.Database)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
state_ = 0;
_internal_metadata_.Clear();
}
bool Database::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.Database)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.Database.name"));
} else {
goto handle_unusual;
}
break;
}
// .google.spanner.admin.database.v1.Database.State state = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
set_state(static_cast< ::google::spanner::admin::database::v1::Database_State >(value));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.Database)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.Database)
return false;
#undef DO_
}
void Database::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.Database)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (this->name().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.Database.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// .google.spanner.admin.database.v1.Database.State state = 2;
if (this->state() != 0) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->state(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.Database)
}
::google::protobuf::uint8* Database::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.Database)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (this->name().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.Database.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// .google.spanner.admin.database.v1.Database.State state = 2;
if (this->state() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->state(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.Database)
return target;
}
size_t Database::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.Database)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string name = 1;
if (this->name().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// .google.spanner.admin.database.v1.Database.State state = 2;
if (this->state() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Database::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.Database)
GOOGLE_DCHECK_NE(&from, this);
const Database* source =
::google::protobuf::internal::DynamicCastToGenerated<const Database>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.Database)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.Database)
MergeFrom(*source);
}
}
void Database::MergeFrom(const Database& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.Database)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.name().size() > 0) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (from.state() != 0) {
set_state(from.state());
}
}
void Database::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.Database)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Database::CopyFrom(const Database& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.Database)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Database::IsInitialized() const {
return true;
}
void Database::Swap(Database* other) {
if (other == this) return;
InternalSwap(other);
}
void Database::InternalSwap(Database* other) {
using std::swap;
name_.Swap(&other->name_);
swap(state_, other->state_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Database::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void ListDatabasesRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListDatabasesRequest::kParentFieldNumber;
const int ListDatabasesRequest::kPageSizeFieldNumber;
const int ListDatabasesRequest::kPageTokenFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ListDatabasesRequest::ListDatabasesRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsListDatabasesRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.ListDatabasesRequest)
}
ListDatabasesRequest::ListDatabasesRequest(const ListDatabasesRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.parent().size() > 0) {
parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
}
page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.page_token().size() > 0) {
page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
}
page_size_ = from.page_size_;
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.ListDatabasesRequest)
}
void ListDatabasesRequest::SharedCtor() {
parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_size_ = 0;
_cached_size_ = 0;
}
ListDatabasesRequest::~ListDatabasesRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.ListDatabasesRequest)
SharedDtor();
}
void ListDatabasesRequest::SharedDtor() {
parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ListDatabasesRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListDatabasesRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const ListDatabasesRequest& ListDatabasesRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsListDatabasesRequest();
return *internal_default_instance();
}
ListDatabasesRequest* ListDatabasesRequest::New(::google::protobuf::Arena* arena) const {
ListDatabasesRequest* n = new ListDatabasesRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void ListDatabasesRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.ListDatabasesRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
page_size_ = 0;
_internal_metadata_.Clear();
}
bool ListDatabasesRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.ListDatabasesRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string parent = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_parent()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.ListDatabasesRequest.parent"));
} else {
goto handle_unusual;
}
break;
}
// int32 page_size = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &page_size_)));
} else {
goto handle_unusual;
}
break;
}
// string page_token = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_page_token()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_token().data(), static_cast<int>(this->page_token().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.ListDatabasesRequest.page_token"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.ListDatabasesRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.ListDatabasesRequest)
return false;
#undef DO_
}
void ListDatabasesRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.ListDatabasesRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string parent = 1;
if (this->parent().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesRequest.parent");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->parent(), output);
}
// int32 page_size = 3;
if (this->page_size() != 0) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->page_size(), output);
}
// string page_token = 4;
if (this->page_token().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_token().data(), static_cast<int>(this->page_token().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesRequest.page_token");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->page_token(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.ListDatabasesRequest)
}
::google::protobuf::uint8* ListDatabasesRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.ListDatabasesRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string parent = 1;
if (this->parent().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesRequest.parent");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->parent(), target);
}
// int32 page_size = 3;
if (this->page_size() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->page_size(), target);
}
// string page_token = 4;
if (this->page_token().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->page_token().data(), static_cast<int>(this->page_token().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesRequest.page_token");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->page_token(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.ListDatabasesRequest)
return target;
}
size_t ListDatabasesRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.ListDatabasesRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string parent = 1;
if (this->parent().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->parent());
}
// string page_token = 4;
if (this->page_token().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->page_token());
}
// int32 page_size = 3;
if (this->page_size() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->page_size());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ListDatabasesRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.ListDatabasesRequest)
GOOGLE_DCHECK_NE(&from, this);
const ListDatabasesRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const ListDatabasesRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.ListDatabasesRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.ListDatabasesRequest)
MergeFrom(*source);
}
}
void ListDatabasesRequest::MergeFrom(const ListDatabasesRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.ListDatabasesRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.parent().size() > 0) {
parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
}
if (from.page_token().size() > 0) {
page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
}
if (from.page_size() != 0) {
set_page_size(from.page_size());
}
}
void ListDatabasesRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.ListDatabasesRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ListDatabasesRequest::CopyFrom(const ListDatabasesRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.ListDatabasesRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ListDatabasesRequest::IsInitialized() const {
return true;
}
void ListDatabasesRequest::Swap(ListDatabasesRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void ListDatabasesRequest::InternalSwap(ListDatabasesRequest* other) {
using std::swap;
parent_.Swap(&other->parent_);
page_token_.Swap(&other->page_token_);
swap(page_size_, other->page_size_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata ListDatabasesRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void ListDatabasesResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListDatabasesResponse::kDatabasesFieldNumber;
const int ListDatabasesResponse::kNextPageTokenFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ListDatabasesResponse::ListDatabasesResponse()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsListDatabasesResponse();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.ListDatabasesResponse)
}
ListDatabasesResponse::ListDatabasesResponse(const ListDatabasesResponse& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
databases_(from.databases_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.next_page_token().size() > 0) {
next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.ListDatabasesResponse)
}
void ListDatabasesResponse::SharedCtor() {
next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
ListDatabasesResponse::~ListDatabasesResponse() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.ListDatabasesResponse)
SharedDtor();
}
void ListDatabasesResponse::SharedDtor() {
next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ListDatabasesResponse::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListDatabasesResponse::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const ListDatabasesResponse& ListDatabasesResponse::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsListDatabasesResponse();
return *internal_default_instance();
}
ListDatabasesResponse* ListDatabasesResponse::New(::google::protobuf::Arena* arena) const {
ListDatabasesResponse* n = new ListDatabasesResponse;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void ListDatabasesResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.ListDatabasesResponse)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
databases_.Clear();
next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool ListDatabasesResponse::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.ListDatabasesResponse)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .google.spanner.admin.database.v1.Database databases = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_databases()));
} else {
goto handle_unusual;
}
break;
}
// string next_page_token = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_next_page_token()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.ListDatabasesResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.ListDatabasesResponse)
return false;
#undef DO_
}
void ListDatabasesResponse::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.ListDatabasesResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.spanner.admin.database.v1.Database databases = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->databases_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->databases(static_cast<int>(i)), output);
}
// string next_page_token = 2;
if (this->next_page_token().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->next_page_token(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.ListDatabasesResponse)
}
::google::protobuf::uint8* ListDatabasesResponse::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.ListDatabasesResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .google.spanner.admin.database.v1.Database databases = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->databases_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->databases(static_cast<int>(i)), deterministic, target);
}
// string next_page_token = 2;
if (this->next_page_token().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->next_page_token(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.ListDatabasesResponse)
return target;
}
size_t ListDatabasesResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.ListDatabasesResponse)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated .google.spanner.admin.database.v1.Database databases = 1;
{
unsigned int count = static_cast<unsigned int>(this->databases_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->databases(static_cast<int>(i)));
}
}
// string next_page_token = 2;
if (this->next_page_token().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->next_page_token());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ListDatabasesResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.ListDatabasesResponse)
GOOGLE_DCHECK_NE(&from, this);
const ListDatabasesResponse* source =
::google::protobuf::internal::DynamicCastToGenerated<const ListDatabasesResponse>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.ListDatabasesResponse)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.ListDatabasesResponse)
MergeFrom(*source);
}
}
void ListDatabasesResponse::MergeFrom(const ListDatabasesResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.ListDatabasesResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
databases_.MergeFrom(from.databases_);
if (from.next_page_token().size() > 0) {
next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
}
}
void ListDatabasesResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.ListDatabasesResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ListDatabasesResponse::CopyFrom(const ListDatabasesResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.ListDatabasesResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ListDatabasesResponse::IsInitialized() const {
return true;
}
void ListDatabasesResponse::Swap(ListDatabasesResponse* other) {
if (other == this) return;
InternalSwap(other);
}
void ListDatabasesResponse::InternalSwap(ListDatabasesResponse* other) {
using std::swap;
databases_.InternalSwap(&other->databases_);
next_page_token_.Swap(&other->next_page_token_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata ListDatabasesResponse::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void CreateDatabaseRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CreateDatabaseRequest::kParentFieldNumber;
const int CreateDatabaseRequest::kCreateStatementFieldNumber;
const int CreateDatabaseRequest::kExtraStatementsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
CreateDatabaseRequest::CreateDatabaseRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsCreateDatabaseRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.CreateDatabaseRequest)
}
CreateDatabaseRequest::CreateDatabaseRequest(const CreateDatabaseRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
extra_statements_(from.extra_statements_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.parent().size() > 0) {
parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
}
create_statement_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.create_statement().size() > 0) {
create_statement_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.create_statement_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.CreateDatabaseRequest)
}
void CreateDatabaseRequest::SharedCtor() {
parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
create_statement_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
CreateDatabaseRequest::~CreateDatabaseRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.CreateDatabaseRequest)
SharedDtor();
}
void CreateDatabaseRequest::SharedDtor() {
parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
create_statement_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void CreateDatabaseRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CreateDatabaseRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const CreateDatabaseRequest& CreateDatabaseRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsCreateDatabaseRequest();
return *internal_default_instance();
}
CreateDatabaseRequest* CreateDatabaseRequest::New(::google::protobuf::Arena* arena) const {
CreateDatabaseRequest* n = new CreateDatabaseRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void CreateDatabaseRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
extra_statements_.Clear();
parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
create_statement_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool CreateDatabaseRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string parent = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_parent()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.parent"));
} else {
goto handle_unusual;
}
break;
}
// string create_statement = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_create_statement()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->create_statement().data(), static_cast<int>(this->create_statement().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.create_statement"));
} else {
goto handle_unusual;
}
break;
}
// repeated string extra_statements = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_extra_statements()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->extra_statements(this->extra_statements_size() - 1).data(),
static_cast<int>(this->extra_statements(this->extra_statements_size() - 1).length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.extra_statements"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.CreateDatabaseRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.CreateDatabaseRequest)
return false;
#undef DO_
}
void CreateDatabaseRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string parent = 1;
if (this->parent().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.parent");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->parent(), output);
}
// string create_statement = 2;
if (this->create_statement().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->create_statement().data(), static_cast<int>(this->create_statement().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.create_statement");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->create_statement(), output);
}
// repeated string extra_statements = 3;
for (int i = 0, n = this->extra_statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->extra_statements(i).data(), static_cast<int>(this->extra_statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.extra_statements");
::google::protobuf::internal::WireFormatLite::WriteString(
3, this->extra_statements(i), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.CreateDatabaseRequest)
}
::google::protobuf::uint8* CreateDatabaseRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string parent = 1;
if (this->parent().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->parent().data(), static_cast<int>(this->parent().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.parent");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->parent(), target);
}
// string create_statement = 2;
if (this->create_statement().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->create_statement().data(), static_cast<int>(this->create_statement().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.create_statement");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->create_statement(), target);
}
// repeated string extra_statements = 3;
for (int i = 0, n = this->extra_statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->extra_statements(i).data(), static_cast<int>(this->extra_statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseRequest.extra_statements");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(3, this->extra_statements(i), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.CreateDatabaseRequest)
return target;
}
size_t CreateDatabaseRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated string extra_statements = 3;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->extra_statements_size());
for (int i = 0, n = this->extra_statements_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->extra_statements(i));
}
// string parent = 1;
if (this->parent().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->parent());
}
// string create_statement = 2;
if (this->create_statement().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->create_statement());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CreateDatabaseRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
const CreateDatabaseRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const CreateDatabaseRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.CreateDatabaseRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.CreateDatabaseRequest)
MergeFrom(*source);
}
}
void CreateDatabaseRequest::MergeFrom(const CreateDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
extra_statements_.MergeFrom(from.extra_statements_);
if (from.parent().size() > 0) {
parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
}
if (from.create_statement().size() > 0) {
create_statement_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.create_statement_);
}
}
void CreateDatabaseRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CreateDatabaseRequest::CopyFrom(const CreateDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.CreateDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CreateDatabaseRequest::IsInitialized() const {
return true;
}
void CreateDatabaseRequest::Swap(CreateDatabaseRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void CreateDatabaseRequest::InternalSwap(CreateDatabaseRequest* other) {
using std::swap;
extra_statements_.InternalSwap(&other->extra_statements_);
parent_.Swap(&other->parent_);
create_statement_.Swap(&other->create_statement_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata CreateDatabaseRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void CreateDatabaseMetadata::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CreateDatabaseMetadata::kDatabaseFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
CreateDatabaseMetadata::CreateDatabaseMetadata()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsCreateDatabaseMetadata();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.CreateDatabaseMetadata)
}
CreateDatabaseMetadata::CreateDatabaseMetadata(const CreateDatabaseMetadata& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.CreateDatabaseMetadata)
}
void CreateDatabaseMetadata::SharedCtor() {
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
CreateDatabaseMetadata::~CreateDatabaseMetadata() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.CreateDatabaseMetadata)
SharedDtor();
}
void CreateDatabaseMetadata::SharedDtor() {
database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void CreateDatabaseMetadata::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CreateDatabaseMetadata::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const CreateDatabaseMetadata& CreateDatabaseMetadata::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsCreateDatabaseMetadata();
return *internal_default_instance();
}
CreateDatabaseMetadata* CreateDatabaseMetadata::New(::google::protobuf::Arena* arena) const {
CreateDatabaseMetadata* n = new CreateDatabaseMetadata;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void CreateDatabaseMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool CreateDatabaseMetadata::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string database = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_database()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.CreateDatabaseMetadata.database"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.CreateDatabaseMetadata)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.CreateDatabaseMetadata)
return false;
#undef DO_
}
void CreateDatabaseMetadata::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseMetadata.database");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->database(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.CreateDatabaseMetadata)
}
::google::protobuf::uint8* CreateDatabaseMetadata::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.CreateDatabaseMetadata.database");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->database(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.CreateDatabaseMetadata)
return target;
}
size_t CreateDatabaseMetadata::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string database = 1;
if (this->database().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->database());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CreateDatabaseMetadata::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
GOOGLE_DCHECK_NE(&from, this);
const CreateDatabaseMetadata* source =
::google::protobuf::internal::DynamicCastToGenerated<const CreateDatabaseMetadata>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.CreateDatabaseMetadata)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.CreateDatabaseMetadata)
MergeFrom(*source);
}
}
void CreateDatabaseMetadata::MergeFrom(const CreateDatabaseMetadata& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
}
void CreateDatabaseMetadata::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void CreateDatabaseMetadata::CopyFrom(const CreateDatabaseMetadata& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.CreateDatabaseMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CreateDatabaseMetadata::IsInitialized() const {
return true;
}
void CreateDatabaseMetadata::Swap(CreateDatabaseMetadata* other) {
if (other == this) return;
InternalSwap(other);
}
void CreateDatabaseMetadata::InternalSwap(CreateDatabaseMetadata* other) {
using std::swap;
database_.Swap(&other->database_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata CreateDatabaseMetadata::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void GetDatabaseRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GetDatabaseRequest::kNameFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
GetDatabaseRequest::GetDatabaseRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.GetDatabaseRequest)
}
GetDatabaseRequest::GetDatabaseRequest(const GetDatabaseRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.name().size() > 0) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.GetDatabaseRequest)
}
void GetDatabaseRequest::SharedCtor() {
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
GetDatabaseRequest::~GetDatabaseRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.GetDatabaseRequest)
SharedDtor();
}
void GetDatabaseRequest::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void GetDatabaseRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetDatabaseRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const GetDatabaseRequest& GetDatabaseRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseRequest();
return *internal_default_instance();
}
GetDatabaseRequest* GetDatabaseRequest::New(::google::protobuf::Arena* arena) const {
GetDatabaseRequest* n = new GetDatabaseRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void GetDatabaseRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.GetDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool GetDatabaseRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.GetDatabaseRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.GetDatabaseRequest.name"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.GetDatabaseRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.GetDatabaseRequest)
return false;
#undef DO_
}
void GetDatabaseRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.GetDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (this->name().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseRequest.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.GetDatabaseRequest)
}
::google::protobuf::uint8* GetDatabaseRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.GetDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (this->name().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseRequest.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.GetDatabaseRequest)
return target;
}
size_t GetDatabaseRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.GetDatabaseRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string name = 1;
if (this->name().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void GetDatabaseRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.GetDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
const GetDatabaseRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const GetDatabaseRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.GetDatabaseRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.GetDatabaseRequest)
MergeFrom(*source);
}
}
void GetDatabaseRequest::MergeFrom(const GetDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.GetDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.name().size() > 0) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
}
void GetDatabaseRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.GetDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void GetDatabaseRequest::CopyFrom(const GetDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.GetDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GetDatabaseRequest::IsInitialized() const {
return true;
}
void GetDatabaseRequest::Swap(GetDatabaseRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void GetDatabaseRequest::InternalSwap(GetDatabaseRequest* other) {
using std::swap;
name_.Swap(&other->name_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata GetDatabaseRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void UpdateDatabaseDdlRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int UpdateDatabaseDdlRequest::kDatabaseFieldNumber;
const int UpdateDatabaseDdlRequest::kStatementsFieldNumber;
const int UpdateDatabaseDdlRequest::kOperationIdFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
UpdateDatabaseDdlRequest::UpdateDatabaseDdlRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsUpdateDatabaseDdlRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
}
UpdateDatabaseDdlRequest::UpdateDatabaseDdlRequest(const UpdateDatabaseDdlRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
statements_(from.statements_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.operation_id().size() > 0) {
operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
}
void UpdateDatabaseDdlRequest::SharedCtor() {
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
UpdateDatabaseDdlRequest::~UpdateDatabaseDdlRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
SharedDtor();
}
void UpdateDatabaseDdlRequest::SharedDtor() {
database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
operation_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void UpdateDatabaseDdlRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* UpdateDatabaseDdlRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const UpdateDatabaseDdlRequest& UpdateDatabaseDdlRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsUpdateDatabaseDdlRequest();
return *internal_default_instance();
}
UpdateDatabaseDdlRequest* UpdateDatabaseDdlRequest::New(::google::protobuf::Arena* arena) const {
UpdateDatabaseDdlRequest* n = new UpdateDatabaseDdlRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void UpdateDatabaseDdlRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
statements_.Clear();
database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
operation_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool UpdateDatabaseDdlRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string database = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_database()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database"));
} else {
goto handle_unusual;
}
break;
}
// repeated string statements = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_statements()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(this->statements_size() - 1).data(),
static_cast<int>(this->statements(this->statements_size() - 1).length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.statements"));
} else {
goto handle_unusual;
}
break;
}
// string operation_id = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_operation_id()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->operation_id().data(), static_cast<int>(this->operation_id().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
return false;
#undef DO_
}
void UpdateDatabaseDdlRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->database(), output);
}
// repeated string statements = 2;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.statements");
::google::protobuf::internal::WireFormatLite::WriteString(
2, this->statements(i), output);
}
// string operation_id = 3;
if (this->operation_id().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->operation_id().data(), static_cast<int>(this->operation_id().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->operation_id(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
}
::google::protobuf::uint8* UpdateDatabaseDdlRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->database(), target);
}
// repeated string statements = 2;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.statements");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(2, this->statements(i), target);
}
// string operation_id = 3;
if (this->operation_id().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->operation_id().data(), static_cast<int>(this->operation_id().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->operation_id(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
return target;
}
size_t UpdateDatabaseDdlRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated string statements = 2;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->statements_size());
for (int i = 0, n = this->statements_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->statements(i));
}
// string database = 1;
if (this->database().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->database());
}
// string operation_id = 3;
if (this->operation_id().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->operation_id());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void UpdateDatabaseDdlRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
GOOGLE_DCHECK_NE(&from, this);
const UpdateDatabaseDdlRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const UpdateDatabaseDdlRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
MergeFrom(*source);
}
}
void UpdateDatabaseDdlRequest::MergeFrom(const UpdateDatabaseDdlRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
statements_.MergeFrom(from.statements_);
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
if (from.operation_id().size() > 0) {
operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_);
}
}
void UpdateDatabaseDdlRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void UpdateDatabaseDdlRequest::CopyFrom(const UpdateDatabaseDdlRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool UpdateDatabaseDdlRequest::IsInitialized() const {
return true;
}
void UpdateDatabaseDdlRequest::Swap(UpdateDatabaseDdlRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void UpdateDatabaseDdlRequest::InternalSwap(UpdateDatabaseDdlRequest* other) {
using std::swap;
statements_.InternalSwap(&other->statements_);
database_.Swap(&other->database_);
operation_id_.Swap(&other->operation_id_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata UpdateDatabaseDdlRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void UpdateDatabaseDdlMetadata::InitAsDefaultInstance() {
}
void UpdateDatabaseDdlMetadata::clear_commit_timestamps() {
commit_timestamps_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int UpdateDatabaseDdlMetadata::kDatabaseFieldNumber;
const int UpdateDatabaseDdlMetadata::kStatementsFieldNumber;
const int UpdateDatabaseDdlMetadata::kCommitTimestampsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
UpdateDatabaseDdlMetadata::UpdateDatabaseDdlMetadata()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsUpdateDatabaseDdlMetadata();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
}
UpdateDatabaseDdlMetadata::UpdateDatabaseDdlMetadata(const UpdateDatabaseDdlMetadata& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
statements_(from.statements_),
commit_timestamps_(from.commit_timestamps_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
}
void UpdateDatabaseDdlMetadata::SharedCtor() {
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
UpdateDatabaseDdlMetadata::~UpdateDatabaseDdlMetadata() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
SharedDtor();
}
void UpdateDatabaseDdlMetadata::SharedDtor() {
database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void UpdateDatabaseDdlMetadata::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* UpdateDatabaseDdlMetadata::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const UpdateDatabaseDdlMetadata& UpdateDatabaseDdlMetadata::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsUpdateDatabaseDdlMetadata();
return *internal_default_instance();
}
UpdateDatabaseDdlMetadata* UpdateDatabaseDdlMetadata::New(::google::protobuf::Arena* arena) const {
UpdateDatabaseDdlMetadata* n = new UpdateDatabaseDdlMetadata;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void UpdateDatabaseDdlMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
statements_.Clear();
commit_timestamps_.Clear();
database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool UpdateDatabaseDdlMetadata::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string database = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_database()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.database"));
} else {
goto handle_unusual;
}
break;
}
// repeated string statements = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_statements()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(this->statements_size() - 1).data(),
static_cast<int>(this->statements(this->statements_size() - 1).length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.statements"));
} else {
goto handle_unusual;
}
break;
}
// repeated .google.protobuf.Timestamp commit_timestamps = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_commit_timestamps()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
return false;
#undef DO_
}
void UpdateDatabaseDdlMetadata::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.database");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->database(), output);
}
// repeated string statements = 2;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.statements");
::google::protobuf::internal::WireFormatLite::WriteString(
2, this->statements(i), output);
}
// repeated .google.protobuf.Timestamp commit_timestamps = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->commit_timestamps_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, this->commit_timestamps(static_cast<int>(i)), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
}
::google::protobuf::uint8* UpdateDatabaseDdlMetadata::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.database");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->database(), target);
}
// repeated string statements = 2;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.statements");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(2, this->statements(i), target);
}
// repeated .google.protobuf.Timestamp commit_timestamps = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->commit_timestamps_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
3, this->commit_timestamps(static_cast<int>(i)), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
return target;
}
size_t UpdateDatabaseDdlMetadata::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated string statements = 2;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->statements_size());
for (int i = 0, n = this->statements_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->statements(i));
}
// repeated .google.protobuf.Timestamp commit_timestamps = 3;
{
unsigned int count = static_cast<unsigned int>(this->commit_timestamps_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->commit_timestamps(static_cast<int>(i)));
}
}
// string database = 1;
if (this->database().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->database());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void UpdateDatabaseDdlMetadata::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
GOOGLE_DCHECK_NE(&from, this);
const UpdateDatabaseDdlMetadata* source =
::google::protobuf::internal::DynamicCastToGenerated<const UpdateDatabaseDdlMetadata>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
MergeFrom(*source);
}
}
void UpdateDatabaseDdlMetadata::MergeFrom(const UpdateDatabaseDdlMetadata& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
statements_.MergeFrom(from.statements_);
commit_timestamps_.MergeFrom(from.commit_timestamps_);
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
}
void UpdateDatabaseDdlMetadata::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void UpdateDatabaseDdlMetadata::CopyFrom(const UpdateDatabaseDdlMetadata& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool UpdateDatabaseDdlMetadata::IsInitialized() const {
return true;
}
void UpdateDatabaseDdlMetadata::Swap(UpdateDatabaseDdlMetadata* other) {
if (other == this) return;
InternalSwap(other);
}
void UpdateDatabaseDdlMetadata::InternalSwap(UpdateDatabaseDdlMetadata* other) {
using std::swap;
statements_.InternalSwap(&other->statements_);
commit_timestamps_.InternalSwap(&other->commit_timestamps_);
database_.Swap(&other->database_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata UpdateDatabaseDdlMetadata::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void DropDatabaseRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DropDatabaseRequest::kDatabaseFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
DropDatabaseRequest::DropDatabaseRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsDropDatabaseRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.DropDatabaseRequest)
}
DropDatabaseRequest::DropDatabaseRequest(const DropDatabaseRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.DropDatabaseRequest)
}
void DropDatabaseRequest::SharedCtor() {
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
DropDatabaseRequest::~DropDatabaseRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.DropDatabaseRequest)
SharedDtor();
}
void DropDatabaseRequest::SharedDtor() {
database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DropDatabaseRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DropDatabaseRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const DropDatabaseRequest& DropDatabaseRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsDropDatabaseRequest();
return *internal_default_instance();
}
DropDatabaseRequest* DropDatabaseRequest::New(::google::protobuf::Arena* arena) const {
DropDatabaseRequest* n = new DropDatabaseRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void DropDatabaseRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.DropDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool DropDatabaseRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.DropDatabaseRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string database = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_database()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.DropDatabaseRequest.database"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.DropDatabaseRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.DropDatabaseRequest)
return false;
#undef DO_
}
void DropDatabaseRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.DropDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.DropDatabaseRequest.database");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->database(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.DropDatabaseRequest)
}
::google::protobuf::uint8* DropDatabaseRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.DropDatabaseRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.DropDatabaseRequest.database");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->database(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.DropDatabaseRequest)
return target;
}
size_t DropDatabaseRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.DropDatabaseRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string database = 1;
if (this->database().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->database());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DropDatabaseRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.DropDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
const DropDatabaseRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const DropDatabaseRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.DropDatabaseRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.DropDatabaseRequest)
MergeFrom(*source);
}
}
void DropDatabaseRequest::MergeFrom(const DropDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.DropDatabaseRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
}
void DropDatabaseRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.DropDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DropDatabaseRequest::CopyFrom(const DropDatabaseRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.DropDatabaseRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DropDatabaseRequest::IsInitialized() const {
return true;
}
void DropDatabaseRequest::Swap(DropDatabaseRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void DropDatabaseRequest::InternalSwap(DropDatabaseRequest* other) {
using std::swap;
database_.Swap(&other->database_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata DropDatabaseRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void GetDatabaseDdlRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GetDatabaseDdlRequest::kDatabaseFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
GetDatabaseDdlRequest::GetDatabaseDdlRequest()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseDdlRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
}
GetDatabaseDdlRequest::GetDatabaseDdlRequest(const GetDatabaseDdlRequest& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
}
void GetDatabaseDdlRequest::SharedCtor() {
database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_cached_size_ = 0;
}
GetDatabaseDdlRequest::~GetDatabaseDdlRequest() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
SharedDtor();
}
void GetDatabaseDdlRequest::SharedDtor() {
database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void GetDatabaseDdlRequest::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetDatabaseDdlRequest::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const GetDatabaseDdlRequest& GetDatabaseDdlRequest::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseDdlRequest();
return *internal_default_instance();
}
GetDatabaseDdlRequest* GetDatabaseDdlRequest::New(::google::protobuf::Arena* arena) const {
GetDatabaseDdlRequest* n = new GetDatabaseDdlRequest;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void GetDatabaseDdlRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
bool GetDatabaseDdlRequest::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string database = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_database()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.GetDatabaseDdlRequest.database"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
return false;
#undef DO_
}
void GetDatabaseDdlRequest::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseDdlRequest.database");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->database(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
}
::google::protobuf::uint8* GetDatabaseDdlRequest::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string database = 1;
if (this->database().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->database().data(), static_cast<int>(this->database().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseDdlRequest.database");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->database(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
return target;
}
size_t GetDatabaseDdlRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// string database = 1;
if (this->database().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->database());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void GetDatabaseDdlRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
GOOGLE_DCHECK_NE(&from, this);
const GetDatabaseDdlRequest* source =
::google::protobuf::internal::DynamicCastToGenerated<const GetDatabaseDdlRequest>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
MergeFrom(*source);
}
}
void GetDatabaseDdlRequest::MergeFrom(const GetDatabaseDdlRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.database().size() > 0) {
database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
}
}
void GetDatabaseDdlRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void GetDatabaseDdlRequest::CopyFrom(const GetDatabaseDdlRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.GetDatabaseDdlRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GetDatabaseDdlRequest::IsInitialized() const {
return true;
}
void GetDatabaseDdlRequest::Swap(GetDatabaseDdlRequest* other) {
if (other == this) return;
InternalSwap(other);
}
void GetDatabaseDdlRequest::InternalSwap(GetDatabaseDdlRequest* other) {
using std::swap;
database_.Swap(&other->database_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata GetDatabaseDdlRequest::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void GetDatabaseDdlResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GetDatabaseDdlResponse::kStatementsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
GetDatabaseDdlResponse::GetDatabaseDdlResponse()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseDdlResponse();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
}
GetDatabaseDdlResponse::GetDatabaseDdlResponse(const GetDatabaseDdlResponse& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
statements_(from.statements_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
}
void GetDatabaseDdlResponse::SharedCtor() {
_cached_size_ = 0;
}
GetDatabaseDdlResponse::~GetDatabaseDdlResponse() {
// @@protoc_insertion_point(destructor:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
SharedDtor();
}
void GetDatabaseDdlResponse::SharedDtor() {
}
void GetDatabaseDdlResponse::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetDatabaseDdlResponse::descriptor() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const GetDatabaseDdlResponse& GetDatabaseDdlResponse::default_instance() {
::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::InitDefaultsGetDatabaseDdlResponse();
return *internal_default_instance();
}
GetDatabaseDdlResponse* GetDatabaseDdlResponse::New(::google::protobuf::Arena* arena) const {
GetDatabaseDdlResponse* n = new GetDatabaseDdlResponse;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void GetDatabaseDdlResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
statements_.Clear();
_internal_metadata_.Clear();
}
bool GetDatabaseDdlResponse::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated string statements = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_statements()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(this->statements_size() - 1).data(),
static_cast<int>(this->statements(this->statements_size() - 1).length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.spanner.admin.database.v1.GetDatabaseDdlResponse.statements"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
return false;
#undef DO_
}
void GetDatabaseDdlResponse::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated string statements = 1;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseDdlResponse.statements");
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->statements(i), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
}
::google::protobuf::uint8* GetDatabaseDdlResponse::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated string statements = 1;
for (int i = 0, n = this->statements_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->statements(i).data(), static_cast<int>(this->statements(i).length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.spanner.admin.database.v1.GetDatabaseDdlResponse.statements");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(1, this->statements(i), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
return target;
}
size_t GetDatabaseDdlResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated string statements = 1;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->statements_size());
for (int i = 0, n = this->statements_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->statements(i));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void GetDatabaseDdlResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
GOOGLE_DCHECK_NE(&from, this);
const GetDatabaseDdlResponse* source =
::google::protobuf::internal::DynamicCastToGenerated<const GetDatabaseDdlResponse>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
MergeFrom(*source);
}
}
void GetDatabaseDdlResponse::MergeFrom(const GetDatabaseDdlResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
statements_.MergeFrom(from.statements_);
}
void GetDatabaseDdlResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void GetDatabaseDdlResponse::CopyFrom(const GetDatabaseDdlResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.spanner.admin.database.v1.GetDatabaseDdlResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GetDatabaseDdlResponse::IsInitialized() const {
return true;
}
void GetDatabaseDdlResponse::Swap(GetDatabaseDdlResponse* other) {
if (other == this) return;
InternalSwap(other);
}
void GetDatabaseDdlResponse::InternalSwap(GetDatabaseDdlResponse* other) {
using std::swap;
statements_.InternalSwap(&other->statements_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata GetDatabaseDdlResponse::GetMetadata() const {
protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_google_2fspanner_2fadmin_2fdatabase_2fv1_2fspanner_5fdatabase_5fadmin_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace v1
} // namespace database
} // namespace admin
} // namespace spanner
} // namespace google
// @@protoc_insertion_point(global_scope)
|
phatblat/macOSPrivateFrameworks | PrivateFrameworks/PassKitCore/PKTransitAppletState.h | <reponame>phatblat/macOSPrivateFrameworks
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "NSObject.h"
#import "NSCopying.h"
#import "NSSecureCoding.h"
@class NSArray, NSDate, NSDecimalNumber, NSNumber, NSString, PKFelicaTransitAppletState;
@interface PKTransitAppletState : NSObject <NSCopying, NSSecureCoding>
{
_Bool _blacklisted;
_Bool _needsStationProcessing;
NSNumber *_historySequenceNumber;
NSDecimalNumber *_balance;
NSNumber *_loyaltyBalance;
NSString *_currency;
NSDate *_expirationDate;
NSArray *_enrouteTransitTypes;
}
+ (BOOL)supportsSecureCoding;
@property(nonatomic) _Bool needsStationProcessing; // @synthesize needsStationProcessing=_needsStationProcessing;
@property(copy, nonatomic) NSArray *enrouteTransitTypes; // @synthesize enrouteTransitTypes=_enrouteTransitTypes;
@property(copy, nonatomic) NSDate *expirationDate; // @synthesize expirationDate=_expirationDate;
@property(copy, nonatomic) NSString *currency; // @synthesize currency=_currency;
@property(copy, nonatomic) NSNumber *loyaltyBalance; // @synthesize loyaltyBalance=_loyaltyBalance;
@property(copy, nonatomic) NSDecimalNumber *balance; // @synthesize balance=_balance;
@property(copy, nonatomic) NSNumber *historySequenceNumber; // @synthesize historySequenceNumber=_historySequenceNumber;
@property(nonatomic, getter=isBlacklisted) _Bool blacklisted; // @synthesize blacklisted=_blacklisted;
- (void).cxx_destruct;
- (void)addEnrouteTransitType:(id)arg1;
- (id)transitPassPropertiesWithPaymentApplication:(id)arg1;
- (void)_resolveTransactionsFromState:(id)arg1 toState:(id)arg2 withHistoryRecords:(id)arg3 concreteTransactions:(id *)arg4 ephemeralTransaction:(id *)arg5;
- (id)updatedEnrouteTransitTypesFromExistingTypes:(id)arg1 newTypes:(id)arg2;
- (id)processUpdateWithAppletHistory:(id)arg1 concreteTransactions:(id *)arg2 ephemeralTransaction:(id *)arg3;
- (id)processUpdateWithAppletHistory:(id)arg1 concreteTransactions:(id *)arg2 ephemeralTransactions:(id *)arg3;
- (unsigned long long)hash;
- (BOOL)isEqual:(id)arg1;
@property(readonly, nonatomic, getter=isInStation) _Bool inStation; // @dynamic inStation;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (void)encodeWithCoder:(id)arg1;
- (id)initWithCoder:(id)arg1;
@property(readonly, nonatomic) PKFelicaTransitAppletState *felicaState;
@end
|
mergian/matog | matog/runtime/intern/exec/Mode.h | // Copyright (c) 2015 <NAME> / GCC / TU-Darmstadt. All rights reserved.
// Use of this source code is governed by the BSD 3-Clause license that can be
// found in the LICENSE file.
#ifndef __MATOG_RUNTIME_INTERN_EXEC_MODE
#define __MATOG_RUNTIME_INTERN_EXEC_MODE
namespace matog {
namespace runtime {
namespace intern {
namespace exec {
//-------------------------------------------------------------------
enum class Mode {
Baseline_SOA, ///< default mode
Optimized, ///< optimized execution mode
Profiling, ///< profiling mode
Baseline_AOS, ///< only AOS
Baseline_AOSOA ///< only AOSOA + SOA (for sub)
};
//-------------------------------------------------------------------
}
}
}
}
#endif |
karim7262/cloudbreak | cloud-api/src/main/java/com/sequenceiq/cloudbreak/cloud/model/Image.java | package com.sequenceiq.cloudbreak.cloud.model;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import com.sequenceiq.cloudbreak.api.model.InstanceGroupType;
@JsonAutoDetect(fieldVisibility = ANY, getterVisibility = NONE, setterVisibility = NONE)
@JsonIgnoreProperties(ignoreUnknown = true)
public class Image {
private final String imageName;
private final Map<InstanceGroupType, String> userdata;
public Image(@JsonProperty("imageName") String imageName,
@JsonProperty("userdata") Map<InstanceGroupType, String> userdata) {
this.imageName = imageName;
this.userdata = ImmutableMap.copyOf(userdata);
}
public String getImageName() {
return imageName;
}
public String getUserData(InstanceGroupType key) {
return userdata.get(key);
}
public Map<InstanceGroupType, String> getUserdata() {
return userdata;
}
}
|
fluke777/gooddata-ruby | lib/gooddata/models/user_filters/variable_user_filter.rb | <reponame>fluke777/gooddata-ruby<gh_stars>0
# encoding: UTF-8
require_relative 'user_filter'
module GoodData
class VariableUserFilter < UserFilter
# Creates or updates the variable user filter on the server
#
# @return [String]
def save
res = client.post(uri, :variable => @json)
@json['uri'] = res['uri']
self
end
end
end
|
nonlocalmodels/nonlocalmodels.github.io | documentation/search/all_a.js | <gh_stars>0
var searchData=
[
['k_5fmodulus_5ftensor_587',['K_modulus_tensor',['../classmaterial_1_1pd_1_1ElasticState.html#a13b09d3b3448edc610e03fa9faffc9ad',1,'material::pd::ElasticState']]],
['k_5fshape_5ftensor_588',['K_shape_tensor',['../classmaterial_1_1pd_1_1ElasticState.html#a6ebf2dcb8acc4eb9966993f62428550c',1,'material::pd::ElasticState']]]
];
|
workwyz/shinema-app | src/main/java/cn/shinema/app/port/adapter/resources/indexAgent.java | package cn.shinema.app.port.adapter.resources;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.shinema.core.restful.Response;
@RestController
public class indexAgent {
private static final Logger LOGGER = LoggerFactory.getLogger(indexAgent.class);
@RequestMapping(value = "/index", method = { RequestMethod.GET }, produces = "application/json;charset=utf-8")
public ResponseEntity<Response<String>> index() {
LOGGER.info("index");
Response<String> result = Response.success("index");
return new ResponseEntity<Response<String>>(result, HttpStatus.OK);
}
@RequestMapping(value = "/home", method = { RequestMethod.GET }, produces = "application/json;charset=utf-8")
public ResponseEntity<Response<String>> home() {
LOGGER.info("home");
Response<String> result = Response.success("home");
return new ResponseEntity<Response<String>>(result, HttpStatus.OK);
}
}
|
scommons/scommons-admin | client/src/test/scala/scommons/admin/client/system/user/SystemUserPanelSpec.scala | <gh_stars>1-10
package scommons.admin.client.system.user
import org.joda.time.DateTime
import org.scalatest._
import scommons.admin.client.AdminImagesCss
import scommons.admin.client.api.system.user._
import scommons.admin.client.system.user.SystemUserActions._
import scommons.admin.client.system.user.SystemUserPanel._
import scommons.client.ui.tab._
import scommons.nodejs.test.AsyncTestSpec
import scommons.react.ReactElement
import scommons.react.redux.Dispatch
import scommons.react.redux.task.FutureTask
import scommons.react.test._
import scala.concurrent.Future
class SystemUserPanelSpec extends AsyncTestSpec with BaseTestSpec with TestRendererUtils {
SystemUserPanel.systemUserTablePanel = mockUiComponent("SystemUserTablePanel")
SystemUserPanel.tabPanelComp = mockUiComponent("TabPanel")
SystemUserPanel.systemUserRolePanel = mockUiComponent("SystemUserRolePanel")
it should "dispatch actions when select user" in {
//given
val dispatch = mockFunction[Any, Any]
val actions = mock[SystemUserActions]
var selectedParams: Option[SystemUserParams] = None
val onChangeParams = { params: SystemUserParams =>
selectedParams = Some(params)
}
val props = getSystemUserPanelProps(dispatch, actions = actions, onChangeParams = onChangeParams)
val systemId = props.selectedParams.systemId.get
val comp = createTestRenderer(<(SystemUserPanel())(^.wrapped := props)()).root
val tablePanelProps = findComponentProps(comp, systemUserTablePanel)
val userId = 22
val params = props.selectedParams.copy(userId = Some(userId))
val respData = mock[SystemUserRoleRespData]
val action = SystemUserRoleFetchAction(
FutureTask("Fetching Roles", Future.successful(SystemUserRoleResp(respData)))
)
(actions.systemUserRolesFetch _).expects(dispatch, systemId, userId).returning(action)
dispatch.expects(action)
//when
tablePanelProps.onChangeSelect(userId)
//then
eventually {
selectedParams shouldBe Some(params)
}
}
it should "dispatch actions when load data" in {
//given
val dispatch = mockFunction[Any, Any]
val actions = mock[SystemUserActions]
val onChangeParams = mockFunction[SystemUserParams, Unit]
val props = getSystemUserPanelProps(dispatch, actions = actions, onChangeParams = onChangeParams)
val systemId = props.selectedParams.systemId.get
val comp = createTestRenderer(<(SystemUserPanel())(^.wrapped := props)()).root
val tablePanelProps = findComponentProps(comp, systemUserTablePanel)
val params = props.selectedParams.copy(userId = None)
val offset = Some(10)
val symbols = Some("test")
val action = SystemUserListFetchAction(
FutureTask("Fetching SystemUsers", Future.successful(SystemUserListResp(Nil, None))), offset
)
(actions.systemUserListFetch _).expects(dispatch, systemId, offset, symbols).returning(action)
//then
dispatch.expects(action)
onChangeParams.expects(params)
//when
tablePanelProps.onLoadData(offset, symbols)
Succeeded
}
it should "dispatch actions if diff params when mount" in {
//given
val dispatch = mockFunction[Any, Any]
val actions = mock[SystemUserActions]
val onChangeParams = mockFunction[SystemUserParams, Unit]
val systemId = 123
val userId = 12345
val props = {
val props = getSystemUserPanelProps(dispatch, actions = actions, onChangeParams = onChangeParams)
props.copy(selectedParams = props.selectedParams.copy(systemId = Some(systemId), userId = Some(userId)))
}
val listFetchAction = SystemUserListFetchAction(
FutureTask("Fetching SystemUsers", Future.successful(SystemUserListResp(Nil, None))), None
)
val respData = mock[SystemUserRoleRespData]
val rolesFetchAction = SystemUserRoleFetchAction(
FutureTask("Fetching Roles", Future.successful(SystemUserRoleResp(respData)))
)
(actions.systemUserListFetch _).expects(dispatch, systemId, None, None).returning(listFetchAction)
(actions.systemUserRolesFetch _).expects(dispatch, systemId, userId).returning(rolesFetchAction)
//then
dispatch.expects(listFetchAction)
dispatch.expects(rolesFetchAction)
onChangeParams.expects(props.selectedParams)
//when
val renderer = createTestRenderer(<(SystemUserPanel())(^.wrapped := props)())
//cleanup
renderer.unmount()
Succeeded
}
it should "not dispatch actions if same params when mount" in {
//given
val dispatch = mockFunction[Any, Any]
val onChangeParams = mockFunction[SystemUserParams, Unit]
val props = getSystemUserPanelProps(dispatch, onChangeParams = onChangeParams)
//then
dispatch.expects(*).never()
onChangeParams.expects(*).never()
//when
val renderer = createTestRenderer(<(SystemUserPanel())(^.wrapped := props)())
//cleanup
renderer.unmount()
Succeeded
}
it should "dispatch actions if diff params when update" in {
//given
val dispatch = mockFunction[Any, Any]
val actions = mock[SystemUserActions]
val onChangeParams = mockFunction[SystemUserParams, Unit]
val prevProps = getSystemUserPanelProps(dispatch, actions = actions, onChangeParams = onChangeParams)
val renderer = createTestRenderer(<(SystemUserPanel())(^.wrapped := prevProps)())
val newSystemId = 123
val newUserId = 12345
val props = prevProps.copy(
selectedParams = prevProps.selectedParams.copy(systemId = Some(newSystemId), userId = Some(newUserId))
)
val listFetchAction = SystemUserListFetchAction(
FutureTask("Fetching SystemUsers", Future.successful(SystemUserListResp(Nil, None))), None
)
val respData = mock[SystemUserRoleRespData]
val rolesFetchAction = SystemUserRoleFetchAction(
FutureTask("Fetching Roles", Future.successful(SystemUserRoleResp(respData)))
)
(actions.systemUserListFetch _).expects(dispatch, newSystemId, None, None).returning(listFetchAction)
(actions.systemUserRolesFetch _).expects(dispatch, newSystemId, newUserId).returning(rolesFetchAction)
//then
dispatch.expects(listFetchAction)
dispatch.expects(rolesFetchAction)
onChangeParams.expects(props.selectedParams)
//when
renderer.update(<(SystemUserPanel())(^.wrapped := props)())
//cleanup
renderer.unmount()
Succeeded
}
it should "not dispatch actions if same params when update" in {
//given
val dispatch = mockFunction[Any, Any]
val onChangeParams = mockFunction[SystemUserParams, Unit]
val prevProps = getSystemUserPanelProps(dispatch, onChangeParams = onChangeParams)
val renderer = createTestRenderer(<(SystemUserPanel())(^.wrapped := prevProps)())
val props = prevProps.copy(
data = prevProps.data.copy(
dataList = Nil
)
)
//then
dispatch.expects(*).never()
onChangeParams.expects(*).never()
//when
renderer.update(<(SystemUserPanel())(^.wrapped := props)())
//cleanup
renderer.unmount()
Succeeded
}
it should "render component" in {
//given
val props = getSystemUserPanelProps()
val component = <(SystemUserPanel())(^.wrapped := props)()
//when
val result = createTestRenderer(component).root
//then
assertSystemUserPanel(result, props)
}
it should "render component with selected user" in {
//given
val props = {
val props = getSystemUserPanelProps()
val su = props.data.dataList.head
props.copy(
data = props.data.copy(
params = props.data.params.copy(userId = Some(su.userId)),
selectedUser = Some(su)
),
selectedParams = props.selectedParams.copy(userId = Some(su.userId))
)
}
val component = <(SystemUserPanel())(^.wrapped := props)()
//when
val result = createTestRenderer(component).root
//then
assertSystemUserPanel(result, props)
}
private def getSystemUserPanelProps(dispatch: Dispatch = mockFunction[Any, Any],
actions: SystemUserActions = mock[SystemUserActions],
data: SystemUserState = SystemUserState(
params = SystemUserParams(Some(11), Some(12)),
dataList = List(SystemUserData(
userId = 1,
login = "test_login_1",
lastLoginDate = Some(DateTime("2018-12-04T15:29:01.234Z")),
updatedAt = DateTime("2018-12-03T10:29:01.234Z"),
createdAt = DateTime("2018-12-03T11:29:01.234Z"),
version = 123
))
),
selectedParams: SystemUserParams = SystemUserParams(Some(11), Some(12)),
onChangeParams: SystemUserParams => Unit = _ => ()): SystemUserPanelProps = {
SystemUserPanelProps(
dispatch = dispatch,
actions = actions,
data = data,
selectedParams = selectedParams,
onChangeParams = onChangeParams
)
}
private def assertSystemUserPanel(result: TestInstance, props: SystemUserPanelProps): Assertion = {
val systemId = props.selectedParams.systemId.get
def assertSystemUserRolePanel(component: ReactElement): Assertion = {
assertTestComponent(createTestRenderer(component).root, systemUserRolePanel) {
case SystemUserRolePanelProps(dispatch, actions, data, resSystemId) =>
dispatch shouldBe props.dispatch
actions shouldBe props.actions
data shouldBe props.data
resSystemId shouldBe systemId
}
}
def assertComponents(tablePanel: TestInstance,
rolePanel: Option[TestInstance]): Assertion = {
assertTestComponent(tablePanel, systemUserTablePanel) {
case SystemUserTablePanelProps(data, selectedUserId, _, _) =>
data shouldBe props.data
selectedUserId shouldBe props.selectedParams.userId
}
rolePanel.size shouldBe props.data.selectedUser.size
props.data.selectedUser.foreach { _ =>
assertTestComponent(rolePanel.get, tabPanelComp) {
case TabPanelProps(items, selectedIndex, _, direction) =>
items.size shouldBe 1
selectedIndex shouldBe 0
direction shouldBe TabDirection.Top
inside(items.head) {
case TabItemData(title, image, component, render) =>
title shouldBe "Permissions"
image shouldBe Some(AdminImagesCss.key)
component shouldBe None
render should not be None
assertSystemUserRolePanel(render.get.apply(null))
}
}
}
Succeeded
}
inside(result.children.toList) {
case List(tb) => assertComponents(tb, None)
case List(tb, rolePanel) => assertComponents(tb, Some(rolePanel))
}
}
}
|
rvkhaustov/rkhaustov | chapter_011/src/main/java/ru/rkhaustov/tests/FileSearchWordIn.java | package ru.rkhaustov.tests;
import java.io.IOException;
import java.io.File;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* Created by rvkha_000 on 18.06.2017.
*/
public class FileSearchWordIn {
/**
* threads.
*/
private List<Thread> threads = new ArrayList<>();
/**
* interrupt.
*/
private Boolean interrupt = true;
/**
* interruptFind.
*/
private static Boolean interruptFind = false;
/**
* searchWord.
*/
private static String searchWord;
/**
* @param folder folder
*/
public void fillThread(File folder) {
// File[] folderEntries = folder.listFiles();
// for (File entry : folderEntries) {
// if (entry.isDirectory()) {
// fillThread(entry);
// continue;
// }
// this.threads.add(new Thread(new Runnable() {
// @Override
// public void run() {
// try (BufferedReader reader = new BufferedReader(
// new InputStreamReader(
// new FileInputStream(entry), StandardCharsets.UTF_8))) {
// String line = reader.readLine();
// while (line != null && interrupt) {
//// System.out.println(searchWord);
// if (line.contains(searchWord) && interrupt) {
// output(String.format("File:%s Serach word: %s", entry, line));
//// System.out.println("1");
// }
// line = reader.readLine();
//
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }));
// }
}
/**
* @param text text
*/
public synchronized void output(String text) {
if (interrupt) {
System.out.println(text);
}
this.interrupt = this.interruptFind ? false : true;
}
/**
* @param args args
* @throws IOException IOException
*/
public static void main(String[] args) throws IOException {
if (args.length < 2) {
throw new IllegalArgumentException("Error, please, enter: pathDirectory searchText -f (-f found text in the first file, else found text in the all files). Repeet pl");
}
File path = new File(args[0]);
if (!path.isDirectory() || !path.exists()) {
throw new IllegalArgumentException("Path do not exist");
}
searchWord = args[1];
if (args.length >= 3 && "-f".equals(args[2])) {
interruptFind = true;
}
FileSearchWordIn searchWordInFile = new FileSearchWordIn();
searchWordInFile.fillThread(path);
System.out.println(searchWordInFile.threads.size());
for (Thread t : searchWordInFile.threads) {
t.start();
System.out.println(t.getName());
try {
t.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.out.println("Finish search.");
System.out.println(Runtime.getRuntime().availableProcessors());
}
} |
Async0x42/timeline | src/webapp/api/nls/pl/days.js | <filename>src/webapp/api/nls/pl/days.js
define({
"0": "Niedziela",
"1": "Poniedziałek",
"2": "Wtorek",
"3": "Środa",
"4": "Czwartek",
"5": "Piątek",
"6": "Sobota"
});
|
serprex/azure-sdk-for-go | sdk/resourcemanager/servicefabric/armservicefabric/zz_generated_constants.go | <reponame>serprex/azure-sdk-for-go<filename>sdk/resourcemanager/servicefabric/armservicefabric/zz_generated_constants.go
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package armservicefabric
const (
module = "armservicefabric"
version = "v0.1.1"
)
// AddOnFeatures - Available cluster add-on features
type AddOnFeatures string
const (
AddOnFeaturesBackupRestoreService AddOnFeatures = "BackupRestoreService"
AddOnFeaturesDNSService AddOnFeatures = "DnsService"
AddOnFeaturesRepairManager AddOnFeatures = "RepairManager"
AddOnFeaturesResourceMonitorService AddOnFeatures = "ResourceMonitorService"
)
// PossibleAddOnFeaturesValues returns the possible values for the AddOnFeatures const type.
func PossibleAddOnFeaturesValues() []AddOnFeatures {
return []AddOnFeatures{
AddOnFeaturesBackupRestoreService,
AddOnFeaturesDNSService,
AddOnFeaturesRepairManager,
AddOnFeaturesResourceMonitorService,
}
}
// ToPtr returns a *AddOnFeatures pointing to the current value.
func (c AddOnFeatures) ToPtr() *AddOnFeatures {
return &c
}
// ArmServicePackageActivationMode - The activation Mode of the service package
type ArmServicePackageActivationMode string
const (
// ArmServicePackageActivationModeExclusiveProcess - Indicates the application package activation mode will use exclusive process.
ArmServicePackageActivationModeExclusiveProcess ArmServicePackageActivationMode = "ExclusiveProcess"
// ArmServicePackageActivationModeSharedProcess - Indicates the application package activation mode will use shared process.
ArmServicePackageActivationModeSharedProcess ArmServicePackageActivationMode = "SharedProcess"
)
// PossibleArmServicePackageActivationModeValues returns the possible values for the ArmServicePackageActivationMode const type.
func PossibleArmServicePackageActivationModeValues() []ArmServicePackageActivationMode {
return []ArmServicePackageActivationMode{
ArmServicePackageActivationModeExclusiveProcess,
ArmServicePackageActivationModeSharedProcess,
}
}
// ToPtr returns a *ArmServicePackageActivationMode pointing to the current value.
func (c ArmServicePackageActivationMode) ToPtr() *ArmServicePackageActivationMode {
return &c
}
// ArmUpgradeFailureAction - The activation Mode of the service package
type ArmUpgradeFailureAction string
const (
// ArmUpgradeFailureActionManual - Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will
// not proceed to the next upgrade domain automatically.
ArmUpgradeFailureActionManual ArmUpgradeFailureAction = "Manual"
// ArmUpgradeFailureActionRollback - Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.
ArmUpgradeFailureActionRollback ArmUpgradeFailureAction = "Rollback"
)
// PossibleArmUpgradeFailureActionValues returns the possible values for the ArmUpgradeFailureAction const type.
func PossibleArmUpgradeFailureActionValues() []ArmUpgradeFailureAction {
return []ArmUpgradeFailureAction{
ArmUpgradeFailureActionManual,
ArmUpgradeFailureActionRollback,
}
}
// ToPtr returns a *ArmUpgradeFailureAction pointing to the current value.
func (c ArmUpgradeFailureAction) ToPtr() *ArmUpgradeFailureAction {
return &c
}
// ClusterEnvironment - Cluster operating system, the default will be Windows
type ClusterEnvironment string
const (
ClusterEnvironmentLinux ClusterEnvironment = "Linux"
ClusterEnvironmentWindows ClusterEnvironment = "Windows"
)
// PossibleClusterEnvironmentValues returns the possible values for the ClusterEnvironment const type.
func PossibleClusterEnvironmentValues() []ClusterEnvironment {
return []ClusterEnvironment{
ClusterEnvironmentLinux,
ClusterEnvironmentWindows,
}
}
// ToPtr returns a *ClusterEnvironment pointing to the current value.
func (c ClusterEnvironment) ToPtr() *ClusterEnvironment {
return &c
}
// ClusterState - The current state of the cluster.
// * WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and
// report to it.
// * Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots
// up and system services are up.
// * BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster
// boots up for the first time.
// * UpdatingUserConfiguration - Indicates that the cluster is being upgraded with the user provided configuration.
// * UpdatingUserCertificate - Indicates that the cluster is being upgraded with the user provided certificate.
// * UpdatingInfrastructure - Indicates that the cluster is being upgraded with the latest Service Fabric runtime version. This happens only when the upgradeMode
// is set to 'Automatic'.
// * EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the cluster is being upgraded to the expected version.
// * UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource Provider. Clusters in this state cannot
// be managed by the Resource Provider.
// * AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted.
// * Ready - Indicates that the cluster is in a stable state.
type ClusterState string
const (
ClusterStateAutoScale ClusterState = "AutoScale"
ClusterStateBaselineUpgrade ClusterState = "BaselineUpgrade"
ClusterStateDeploying ClusterState = "Deploying"
ClusterStateEnforcingClusterVersion ClusterState = "EnforcingClusterVersion"
ClusterStateReady ClusterState = "Ready"
ClusterStateUpdatingInfrastructure ClusterState = "UpdatingInfrastructure"
ClusterStateUpdatingUserCertificate ClusterState = "UpdatingUserCertificate"
ClusterStateUpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration"
ClusterStateUpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable"
ClusterStateWaitingForNodes ClusterState = "WaitingForNodes"
)
// PossibleClusterStateValues returns the possible values for the ClusterState const type.
func PossibleClusterStateValues() []ClusterState {
return []ClusterState{
ClusterStateAutoScale,
ClusterStateBaselineUpgrade,
ClusterStateDeploying,
ClusterStateEnforcingClusterVersion,
ClusterStateReady,
ClusterStateUpdatingInfrastructure,
ClusterStateUpdatingUserCertificate,
ClusterStateUpdatingUserConfiguration,
ClusterStateUpgradeServiceUnreachable,
ClusterStateWaitingForNodes,
}
}
// ToPtr returns a *ClusterState pointing to the current value.
func (c ClusterState) ToPtr() *ClusterState {
return &c
}
// ClusterUpgradeCadence - Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0.
type ClusterUpgradeCadence string
const (
// ClusterUpgradeCadenceWave0 - Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters.
ClusterUpgradeCadenceWave0 ClusterUpgradeCadence = "Wave0"
// ClusterUpgradeCadenceWave1 - Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters.
ClusterUpgradeCadenceWave1 ClusterUpgradeCadence = "Wave1"
// ClusterUpgradeCadenceWave2 - Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters.
ClusterUpgradeCadenceWave2 ClusterUpgradeCadence = "Wave2"
)
// PossibleClusterUpgradeCadenceValues returns the possible values for the ClusterUpgradeCadence const type.
func PossibleClusterUpgradeCadenceValues() []ClusterUpgradeCadence {
return []ClusterUpgradeCadence{
ClusterUpgradeCadenceWave0,
ClusterUpgradeCadenceWave1,
ClusterUpgradeCadenceWave2,
}
}
// ToPtr returns a *ClusterUpgradeCadence pointing to the current value.
func (c ClusterUpgradeCadence) ToPtr() *ClusterUpgradeCadence {
return &c
}
// DurabilityLevel - The durability level of the node type. Learn about DurabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity].
// * Bronze - No privileges. This is the default.
// * Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD.
// * Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM skus like D15_V2,
// G5 etc.
type DurabilityLevel string
const (
DurabilityLevelBronze DurabilityLevel = "Bronze"
DurabilityLevelGold DurabilityLevel = "Gold"
DurabilityLevelSilver DurabilityLevel = "Silver"
)
// PossibleDurabilityLevelValues returns the possible values for the DurabilityLevel const type.
func PossibleDurabilityLevelValues() []DurabilityLevel {
return []DurabilityLevel{
DurabilityLevelBronze,
DurabilityLevelGold,
DurabilityLevelSilver,
}
}
// ToPtr returns a *DurabilityLevel pointing to the current value.
func (c DurabilityLevel) ToPtr() *DurabilityLevel {
return &c
}
type Enum14 string
const (
Enum14Linux Enum14 = "Linux"
Enum14Windows Enum14 = "Windows"
)
// PossibleEnum14Values returns the possible values for the Enum14 const type.
func PossibleEnum14Values() []Enum14 {
return []Enum14{
Enum14Linux,
Enum14Windows,
}
}
// ToPtr returns a *Enum14 pointing to the current value.
func (c Enum14) ToPtr() *Enum14 {
return &c
}
// ManagedIdentityType - The type of managed identity for the resource.
type ManagedIdentityType string
const (
// ManagedIdentityTypeSystemAssigned - Indicates that system assigned identity is associated with the resource.
ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned"
// ManagedIdentityTypeUserAssigned - Indicates that user assigned identity is associated with the resource.
ManagedIdentityTypeUserAssigned ManagedIdentityType = "UserAssigned"
// ManagedIdentityTypeSystemAssignedUserAssigned - Indicates that both system assigned and user assigned identity are associated with the resource.
ManagedIdentityTypeSystemAssignedUserAssigned ManagedIdentityType = "SystemAssigned, UserAssigned"
// ManagedIdentityTypeNone - Indicates that no identity is associated with the resource.
ManagedIdentityTypeNone ManagedIdentityType = "None"
)
// PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type.
func PossibleManagedIdentityTypeValues() []ManagedIdentityType {
return []ManagedIdentityType{
ManagedIdentityTypeSystemAssigned,
ManagedIdentityTypeUserAssigned,
ManagedIdentityTypeSystemAssignedUserAssigned,
ManagedIdentityTypeNone,
}
}
// ToPtr returns a *ManagedIdentityType pointing to the current value.
func (c ManagedIdentityType) ToPtr() *ManagedIdentityType {
return &c
}
// MoveCost - Specifies the move cost for the service.
type MoveCost string
const (
// MoveCostHigh - Specifies the move cost of the service as High. The value is 3.
MoveCostHigh MoveCost = "High"
// MoveCostLow - Specifies the move cost of the service as Low. The value is 1.
MoveCostLow MoveCost = "Low"
// MoveCostMedium - Specifies the move cost of the service as Medium. The value is 2.
MoveCostMedium MoveCost = "Medium"
// MoveCostZero - Zero move cost. This value is zero.
MoveCostZero MoveCost = "Zero"
)
// PossibleMoveCostValues returns the possible values for the MoveCost const type.
func PossibleMoveCostValues() []MoveCost {
return []MoveCost{
MoveCostHigh,
MoveCostLow,
MoveCostMedium,
MoveCostZero,
}
}
// ToPtr returns a *MoveCost pointing to the current value.
func (c MoveCost) ToPtr() *MoveCost {
return &c
}
// NotificationCategory - The category of notification.
type NotificationCategory string
const (
// NotificationCategoryWaveProgress - Notification will be regarding wave progress.
NotificationCategoryWaveProgress NotificationCategory = "WaveProgress"
)
// PossibleNotificationCategoryValues returns the possible values for the NotificationCategory const type.
func PossibleNotificationCategoryValues() []NotificationCategory {
return []NotificationCategory{
NotificationCategoryWaveProgress,
}
}
// ToPtr returns a *NotificationCategory pointing to the current value.
func (c NotificationCategory) ToPtr() *NotificationCategory {
return &c
}
// NotificationChannel - The notification channel indicates the type of receivers subscribed to the notification, either user or subscription.
type NotificationChannel string
const (
// NotificationChannelEmailSubscription - For subscription receivers. In this case, the parameter receivers should be a list of roles of the subscription
// for the cluster (eg. Owner, AccountAdmin, etc) that will receive the notifications.
NotificationChannelEmailSubscription NotificationChannel = "EmailSubscription"
// NotificationChannelEmailUser - For email user receivers. In this case, the parameter receivers should be a list of email addresses that will receive
// the notifications.
NotificationChannelEmailUser NotificationChannel = "EmailUser"
)
// PossibleNotificationChannelValues returns the possible values for the NotificationChannel const type.
func PossibleNotificationChannelValues() []NotificationChannel {
return []NotificationChannel{
NotificationChannelEmailSubscription,
NotificationChannelEmailUser,
}
}
// ToPtr returns a *NotificationChannel pointing to the current value.
func (c NotificationChannel) ToPtr() *NotificationChannel {
return &c
}
// NotificationLevel - The level of notification.
type NotificationLevel string
const (
// NotificationLevelAll - Receive all notifications.
NotificationLevelAll NotificationLevel = "All"
// NotificationLevelCritical - Receive only critical notifications.
NotificationLevelCritical NotificationLevel = "Critical"
)
// PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type.
func PossibleNotificationLevelValues() []NotificationLevel {
return []NotificationLevel{
NotificationLevelAll,
NotificationLevelCritical,
}
}
// ToPtr returns a *NotificationLevel pointing to the current value.
func (c NotificationLevel) ToPtr() *NotificationLevel {
return &c
}
// PartitionScheme - Enumerates the ways that a service can be partitioned.
type PartitionScheme string
const (
// PartitionSchemeInvalid - Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
PartitionSchemeInvalid PartitionScheme = "Invalid"
// PartitionSchemeNamed - Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription object. The value is 3
PartitionSchemeNamed PartitionScheme = "Named"
// PartitionSchemeSingleton - Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription object, The value is 1.
PartitionSchemeSingleton PartitionScheme = "Singleton"
// PartitionSchemeUniformInt64Range - Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription object.
// The value is 2.
PartitionSchemeUniformInt64Range PartitionScheme = "UniformInt64Range"
)
// PossiblePartitionSchemeValues returns the possible values for the PartitionScheme const type.
func PossiblePartitionSchemeValues() []PartitionScheme {
return []PartitionScheme{
PartitionSchemeInvalid,
PartitionSchemeNamed,
PartitionSchemeSingleton,
PartitionSchemeUniformInt64Range,
}
}
// ToPtr returns a *PartitionScheme pointing to the current value.
func (c PartitionScheme) ToPtr() *PartitionScheme {
return &c
}
// ProvisioningState - The provisioning state of the cluster resource.
type ProvisioningState string
const (
ProvisioningStateCanceled ProvisioningState = "Canceled"
ProvisioningStateFailed ProvisioningState = "Failed"
ProvisioningStateSucceeded ProvisioningState = "Succeeded"
ProvisioningStateUpdating ProvisioningState = "Updating"
)
// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
func PossibleProvisioningStateValues() []ProvisioningState {
return []ProvisioningState{
ProvisioningStateCanceled,
ProvisioningStateFailed,
ProvisioningStateSucceeded,
ProvisioningStateUpdating,
}
}
// ToPtr returns a *ProvisioningState pointing to the current value.
func (c ProvisioningState) ToPtr() *ProvisioningState {
return &c
}
// ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about ReliabilityLevel [https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity].
// * None - Run the System services with a target replica set count of 1. This should only be used for test clusters.
// * Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters.
// * Silver - Run the System services with a target replica set count of 5.
// * Gold - Run the System services with a target replica set count of 7.
// * Platinum - Run the System services with a target replica set count of 9.
type ReliabilityLevel string
const (
ReliabilityLevelBronze ReliabilityLevel = "Bronze"
ReliabilityLevelGold ReliabilityLevel = "Gold"
ReliabilityLevelNone ReliabilityLevel = "None"
ReliabilityLevelPlatinum ReliabilityLevel = "Platinum"
ReliabilityLevelSilver ReliabilityLevel = "Silver"
)
// PossibleReliabilityLevelValues returns the possible values for the ReliabilityLevel const type.
func PossibleReliabilityLevelValues() []ReliabilityLevel {
return []ReliabilityLevel{
ReliabilityLevelBronze,
ReliabilityLevelGold,
ReliabilityLevelNone,
ReliabilityLevelPlatinum,
ReliabilityLevelSilver,
}
}
// ToPtr returns a *ReliabilityLevel pointing to the current value.
func (c ReliabilityLevel) ToPtr() *ReliabilityLevel {
return &c
}
// RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.
type RollingUpgradeMode string
const (
// RollingUpgradeModeInvalid - Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
RollingUpgradeModeInvalid RollingUpgradeMode = "Invalid"
// RollingUpgradeModeMonitored - The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value
// is 3
RollingUpgradeModeMonitored RollingUpgradeMode = "Monitored"
// RollingUpgradeModeUnmonitoredAuto - The upgrade will proceed automatically without performing any health monitoring. The value is 1
RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = "UnmonitoredAuto"
// RollingUpgradeModeUnmonitoredManual - The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before
// proceeding. The value is 2
RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = "UnmonitoredManual"
)
// PossibleRollingUpgradeModeValues returns the possible values for the RollingUpgradeMode const type.
func PossibleRollingUpgradeModeValues() []RollingUpgradeMode {
return []RollingUpgradeMode{
RollingUpgradeModeInvalid,
RollingUpgradeModeMonitored,
RollingUpgradeModeUnmonitoredAuto,
RollingUpgradeModeUnmonitoredManual,
}
}
// ToPtr returns a *RollingUpgradeMode pointing to the current value.
func (c RollingUpgradeMode) ToPtr() *RollingUpgradeMode {
return &c
}
// ServiceCorrelationScheme - The service correlation scheme.
type ServiceCorrelationScheme string
const (
// ServiceCorrelationSchemeAffinity - Indicates that this service has an affinity relationship with another service. Provided for backwards compatibility,
// consider preferring the Aligned or NonAlignedAffinity options. The value is 1.
ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = "Affinity"
// ServiceCorrelationSchemeAlignedAffinity - Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on
// the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 2.
ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = "AlignedAffinity"
// ServiceCorrelationSchemeInvalid - An invalid correlation scheme. Cannot be used. The value is zero.
ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = "Invalid"
// ServiceCorrelationSchemeNonAlignedAffinity - Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike
// Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 3.
ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity"
)
// PossibleServiceCorrelationSchemeValues returns the possible values for the ServiceCorrelationScheme const type.
func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme {
return []ServiceCorrelationScheme{
ServiceCorrelationSchemeAffinity,
ServiceCorrelationSchemeAlignedAffinity,
ServiceCorrelationSchemeInvalid,
ServiceCorrelationSchemeNonAlignedAffinity,
}
}
// ToPtr returns a *ServiceCorrelationScheme pointing to the current value.
func (c ServiceCorrelationScheme) ToPtr() *ServiceCorrelationScheme {
return &c
}
// ServiceKind - The kind of service (Stateless or Stateful).
type ServiceKind string
const (
// ServiceKindInvalid - Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
ServiceKindInvalid ServiceKind = "Invalid"
// ServiceKindStateful - Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2.
ServiceKindStateful ServiceKind = "Stateful"
// ServiceKindStateless - Does not use Service Fabric to make its state highly available or reliable. The value is 1.
ServiceKindStateless ServiceKind = "Stateless"
)
// PossibleServiceKindValues returns the possible values for the ServiceKind const type.
func PossibleServiceKindValues() []ServiceKind {
return []ServiceKind{
ServiceKindInvalid,
ServiceKindStateful,
ServiceKindStateless,
}
}
// ToPtr returns a *ServiceKind pointing to the current value.
func (c ServiceKind) ToPtr() *ServiceKind {
return &c
}
// ServiceLoadMetricWeight - Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics
// end up in conflict, the Cluster Resource Manager prefers the metric with
// the higher weight.
type ServiceLoadMetricWeight string
const (
// ServiceLoadMetricWeightHigh - Specifies the metric weight of the service load as High. The value is 3.
ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = "High"
// ServiceLoadMetricWeightLow - Specifies the metric weight of the service load as Low. The value is 1.
ServiceLoadMetricWeightLow ServiceLoadMetricWeight = "Low"
// ServiceLoadMetricWeightMedium - Specifies the metric weight of the service load as Medium. The value is 2.
ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium"
// ServiceLoadMetricWeightZero - Disables resource balancing for this metric. This value is zero.
ServiceLoadMetricWeightZero ServiceLoadMetricWeight = "Zero"
)
// PossibleServiceLoadMetricWeightValues returns the possible values for the ServiceLoadMetricWeight const type.
func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight {
return []ServiceLoadMetricWeight{
ServiceLoadMetricWeightHigh,
ServiceLoadMetricWeightLow,
ServiceLoadMetricWeightMedium,
ServiceLoadMetricWeightZero,
}
}
// ToPtr returns a *ServiceLoadMetricWeight pointing to the current value.
func (c ServiceLoadMetricWeight) ToPtr() *ServiceLoadMetricWeight {
return &c
}
// ServicePlacementPolicyType - The type of placement policy for a service fabric service. Following are the possible values.
type ServicePlacementPolicyType string
const (
// ServicePlacementPolicyTypeInvalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The
// value is zero.
ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = "Invalid"
// ServicePlacementPolicyTypeInvalidDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription,
// which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1.
ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = "InvalidDomain"
// ServicePlacementPolicyTypeNonPartiallyPlaceService - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription,
// which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5.
ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = "NonPartiallyPlaceService"
// ServicePlacementPolicyTypePreferredPrimaryDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription,
// which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The
// value is 3.
ServicePlacementPolicyTypePreferredPrimaryDomain ServicePlacementPolicyType = "PreferredPrimaryDomain"
// ServicePlacementPolicyTypeRequiredDomain - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription
// indicating that the replicas of the service must be placed in a specific domain. The value is 2.
ServicePlacementPolicyTypeRequiredDomain ServicePlacementPolicyType = "RequiredDomain"
// ServicePlacementPolicyTypeRequiredDomainDistribution - Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription,
// indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4.
ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = "RequiredDomainDistribution"
)
// PossibleServicePlacementPolicyTypeValues returns the possible values for the ServicePlacementPolicyType const type.
func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType {
return []ServicePlacementPolicyType{
ServicePlacementPolicyTypeInvalid,
ServicePlacementPolicyTypeInvalidDomain,
ServicePlacementPolicyTypeNonPartiallyPlaceService,
ServicePlacementPolicyTypePreferredPrimaryDomain,
ServicePlacementPolicyTypeRequiredDomain,
ServicePlacementPolicyTypeRequiredDomainDistribution,
}
}
// ToPtr returns a *ServicePlacementPolicyType pointing to the current value.
func (c ServicePlacementPolicyType) ToPtr() *ServicePlacementPolicyType {
return &c
}
// SfZonalUpgradeMode - This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if a node type with
// multiple Availability Zones is already present in the cluster.
type SfZonalUpgradeMode string
const (
// SfZonalUpgradeModeHierarchical - If this value is omitted or set to Hierarchical, VMs are grouped to reflect the zonal distribution in up to 15 UDs.
// Each of the three zones has five UDs. This ensures that the zones are updated one at a time, moving to next zone only after completing five UDs within
// the first zone. This update process is safer for the cluster and the user application.
SfZonalUpgradeModeHierarchical SfZonalUpgradeMode = "Hierarchical"
// SfZonalUpgradeModeParallel - VMs under the node type are grouped into UDs and ignore the zone info in five UDs. This setting causes UDs across all zones
// to be upgraded at the same time. This deployment mode is faster for upgrades, we don't recommend it because it goes against the SDP guidelines, which
// state that the updates should be applied to one zone at a time.
SfZonalUpgradeModeParallel SfZonalUpgradeMode = "Parallel"
)
// PossibleSfZonalUpgradeModeValues returns the possible values for the SfZonalUpgradeMode const type.
func PossibleSfZonalUpgradeModeValues() []SfZonalUpgradeMode {
return []SfZonalUpgradeMode{
SfZonalUpgradeModeHierarchical,
SfZonalUpgradeModeParallel,
}
}
// ToPtr returns a *SfZonalUpgradeMode pointing to the current value.
func (c SfZonalUpgradeMode) ToPtr() *SfZonalUpgradeMode {
return &c
}
// StoreName - The local certificate store location.
type StoreName string
const (
StoreNameAddressBook StoreName = "AddressBook"
StoreNameAuthRoot StoreName = "AuthRoot"
StoreNameCertificateAuthority StoreName = "CertificateAuthority"
StoreNameDisallowed StoreName = "Disallowed"
StoreNameMy StoreName = "My"
StoreNameRoot StoreName = "Root"
StoreNameTrustedPeople StoreName = "TrustedPeople"
StoreNameTrustedPublisher StoreName = "TrustedPublisher"
)
// PossibleStoreNameValues returns the possible values for the StoreName const type.
func PossibleStoreNameValues() []StoreName {
return []StoreName{
StoreNameAddressBook,
StoreNameAuthRoot,
StoreNameCertificateAuthority,
StoreNameDisallowed,
StoreNameMy,
StoreNameRoot,
StoreNameTrustedPeople,
StoreNameTrustedPublisher,
}
}
// ToPtr returns a *StoreName pointing to the current value.
func (c StoreName) ToPtr() *StoreName {
return &c
}
// UpgradeMode - The upgrade mode of the cluster when new Service Fabric runtime version is available.
type UpgradeMode string
const (
// UpgradeModeAutomatic - The cluster will be automatically upgraded to the latest Service Fabric runtime version, **upgradeWave** will determine when the
// upgrade starts after the new version becomes available.
UpgradeModeAutomatic UpgradeMode = "Automatic"
// UpgradeModeManual - The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the
// **clusterCodeVersion** property in the cluster resource.
UpgradeModeManual UpgradeMode = "Manual"
)
// PossibleUpgradeModeValues returns the possible values for the UpgradeMode const type.
func PossibleUpgradeModeValues() []UpgradeMode {
return []UpgradeMode{
UpgradeModeAutomatic,
UpgradeModeManual,
}
}
// ToPtr returns a *UpgradeMode pointing to the current value.
func (c UpgradeMode) ToPtr() *UpgradeMode {
return &c
}
// VmssZonalUpgradeMode - This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with multiple Availability
// Zones is added.
type VmssZonalUpgradeMode string
const (
// VmssZonalUpgradeModeHierarchical - VMs are grouped to reflect the zonal distribution in up to 15 UDs. Each of the three zones has five UDs. This ensures
// that the zones are updated one at a time, moving to next zone only after completing five UDs within the first zone.
VmssZonalUpgradeModeHierarchical VmssZonalUpgradeMode = "Hierarchical"
// VmssZonalUpgradeModeParallel - Updates will happen in all Availability Zones at once for the virtual machine scale sets.
VmssZonalUpgradeModeParallel VmssZonalUpgradeMode = "Parallel"
)
// PossibleVmssZonalUpgradeModeValues returns the possible values for the VmssZonalUpgradeMode const type.
func PossibleVmssZonalUpgradeModeValues() []VmssZonalUpgradeMode {
return []VmssZonalUpgradeMode{
VmssZonalUpgradeModeHierarchical,
VmssZonalUpgradeModeParallel,
}
}
// ToPtr returns a *VmssZonalUpgradeMode pointing to the current value.
func (c VmssZonalUpgradeMode) ToPtr() *VmssZonalUpgradeMode {
return &c
}
|
TeamSPoon/CYC_JRTL_with_CommonLisp_OLD | platform/main/server-4q/com/cyc/cycjava/cycl/cycl.java | <gh_stars>1-10
/**
* Copyright (c) 1995 - 2019 Cycorp, Inc. All rights reserved.
*/
package com.cyc.cycjava.cycl;
import static com.cyc.tool.subl.util.SubLFiles.INEXACT;
import com.cyc.tool.subl.jrtl.nativeCode.subLisp.Loader;
import com.cyc.tool.subl.jrtl.nativeCode.subLisp.SubLMain;
import com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject;
import com.cyc.tool.subl.jrtl.nativeCode.type.symbol.SubLNil;
import com.cyc.tool.subl.jrtl.nativeCode.type.symbol.SubLT;
import com.cyc.tool.subl.util.SubLFile;
import com.cyc.tool.subl.util.SubLFiles;
public class cycl implements SubLFile {
private static int rl;
// // Constructors
/**
* Creates a new instance of cycl.
*/
public cycl() {
}
public static final SubLFile me = new cycl();
// // Initializers
@Override
public void declareFunctions() {
}
@Override
public void initializeVariables() {
}
@Override
public void runTopLevelForms() {
setup_cycl_file();
}
static public SubLObject setup_cycl_file() {
SubLObject r = SubLT.T;
for (int i = 2; i < 10; i++) {
r = setup_cycl_file_alt(i);
if (r == SubLT.T)
return r;
}
return r;
}
static public void initialize(int at, String here) {
if (rl >= at)
initialize(here);
}
static public void initialize(String here) {
SubLFiles.initialize(here.replace("cycjava", "cycjava_2"));
}
static public SubLObject setup_cycl_file_alt(int useRl) {
rl = useRl;
INEXACT = true;
Loader.suffix = "";
Loader.else_do = false;
if (rl < 6) {
Loader.skippedClasses.add(".*\\.inference.*");
} else {
Loader.skippedClasses.clear();
}
initialize("com.cyc.cycjava.cycl.cyc_cvs_id");
initialize("com.cyc.cycjava.cycl.meta_macros");
initialize("com.cyc.cycjava.cycl.access_macros");
initialize("com.cyc.cycjava.cycl.subl_macro_promotions");
initialize("com.cyc.cycjava.cycl.subl_promotions");
initialize("com.cyc.cycjava.cycl.subl_macros");
initialize("com.cyc.cycjava.cycl.format_nil");
initialize("com.cyc.cycjava.cycl.modules");
initialize("com.cyc.cycjava.cycl.cyc_revision_extraction");
initialize("com.cyc.cycjava.cycl.system_parameters");
initialize("com.cyc.cycjava.cycl.system_version");
initialize("com.cyc.cycjava.cycl.system_info");
initialize("com.cyc.cycjava.cycl.utilities_macros");
initialize("com.cyc.cycjava.cycl.timing");
initialize("com.cyc.cycjava.cycl.cyc_file_dependencies");
initialize("com.cyc.cycjava.cycl.html_macros");
initialize("com.cyc.cycjava.cycl.dhtml_macros");
initialize("com.cyc.cycjava.cycl.cycml_macros");
initialize("com.cyc.cycjava.cycl.control_vars");
initialize("com.cyc.cycjava.cycl.subl_extensions");
initialize("com.cyc.cycjava.cycl.enumerations");
initialize("com.cyc.cycjava.cycl.ranges");
initialize("com.cyc.cycjava.cycl.classes_utilities");
initialize("com.cyc.cycjava.cycl.subloop_structures");
initialize("com.cyc.cycjava.cycl.subloop_class_properties");
initialize("com.cyc.cycjava.cycl.slots");
initialize("com.cyc.cycjava.cycl.classes");
initialize("com.cyc.cycjava.cycl.interfaces");
initialize("com.cyc.cycjava.cycl.instances");
initialize("com.cyc.cycjava.cycl.methods");
initialize("com.cyc.cycjava.cycl.slot_listeners");
initialize("com.cyc.cycjava.cycl.method_listeners");
initialize("com.cyc.cycjava.cycl.object");
initialize("com.cyc.cycjava.cycl.object_monitor");
initialize("com.cyc.cycjava.cycl.subloop_macros");
initialize("com.cyc.cycjava.cycl.subloop_markable");
initialize("com.cyc.cycjava.cycl.subloop_collections");
initialize("com.cyc.cycjava.cycl.subloop_queues");
initialize("com.cyc.cycjava.cycl.subloop_sequences");
initialize("com.cyc.cycjava.cycl.subloop_processes");
initialize("com.cyc.cycjava.cycl.subloop_writer");
initialize("com.cyc.cycjava.cycl.subloop_tcp_client");
initialize("com.cyc.cycjava.cycl.sunit_macros");
initialize("com.cyc.cycjava.cycl.sunit_classes");
initialize("com.cyc.cycjava.cycl.sunit_external");
initialize("com.cyc.cycjava.cycl.sunit_utilities");
// initialize("com.cyc.cycjava.cycl.cfasl");
initialize("com.cyc.cycjava.cycl.sxhash_external");
initialize("com.cyc.cycjava.cycl.regex_interface");
initialize("com.cyc.cycjava.cycl.regular_expressions");
initialize("com.cyc.cycjava.cycl.red_implementation");
initialize("com.cyc.cycjava.cycl.red_api");
initialize("com.cyc.cycjava.cycl.cyc_testing.cyc_testing_initialization");
initialize("com.cyc.cycjava.cycl.cyc_testing.cyc_testing");
initialize("com.cyc.cycjava.cycl.cyc_testing.generic_testing");
initialize("com.cyc.cycjava.cycl.hash_table_utilities");
// initialize("com.cyc.cycjava.cycl.keyhash");
initialize("com.cyc.cycjava.cycl.set_contents");
initialize("com.cyc.cycjava.cycl.reader_writer_locks");
initialize("com.cyc.cycjava.cycl.memoization_state");
initialize("com.cyc.cycjava.cycl.list_utilities");
initialize("com.cyc.cycjava.cycl.transform_list_utilities");
initialize("com.cyc.cycjava.cycl.vector_utilities");
initialize("com.cyc.cycjava.cycl.string_utilities");
initialize("com.cyc.cycjava.cycl.unicode_strings");
initialize("com.cyc.cycjava.cycl.unicode_subsets");
initialize("com.cyc.cycjava.cycl.unicode_support");
initialize("com.cyc.cycjava.cycl.unicode_streams");
initialize("com.cyc.cycjava.cycl.defstruct_sequence");
initialize("com.cyc.cycjava.cycl.visitation_utilities");
initialize("com.cyc.cycjava.cycl.regular_expression_utilities");
initialize("com.cyc.cycjava.cycl.mail_utilities");
initialize("com.cyc.cycjava.cycl.mail_message");
initialize("com.cyc.cycjava.cycl.number_utilities");
initialize("com.cyc.cycjava.cycl.fraction_utilities");
initialize("com.cyc.cycjava.cycl.matrix_utilities");
initialize("com.cyc.cycjava.cycl.numeric_date_utilities");
initialize("com.cyc.cycjava.cycl.iteration");
initialize("com.cyc.cycjava.cycl.binary_tree");
initialize("com.cyc.cycjava.cycl.stacks");
initialize("com.cyc.cycjava.cycl.queues");
initialize("com.cyc.cycjava.cycl.deck");
initialize("com.cyc.cycjava.cycl.integer_sequence_generator");
initialize("com.cyc.cycjava.cycl.semaphores");
initialize("com.cyc.cycjava.cycl.process_utilities");
initialize("com.cyc.cycjava.cycl.os_process_utilities");
initialize("com.cyc.cycjava.cycl.tcp_server_utilities");
initialize("com.cyc.cycjava.cycl.pattern_match");
initialize("com.cyc.cycjava.cycl.tries");
initialize("com.cyc.cycjava.cycl.shelfs");
//initialize("com.cyc.cycjava.cycl.id_index");
//initialize("com.cyc.cycjava.cycl.dictionary_contents");
//initialize("com.cyc.cycjava.cycl.dictionary");
//initialize("com.cyc.cycjava.cycl.cfasl_compression");
//initialize("com.cyc.cycjava.cycl.cfasl_utilities");
initialize("com.cyc.cycjava.cycl.bijection");
initialize("com.cyc.cycjava.cycl.glob");
/*initialize("com.cyc.cycjava.cycl.keyhash_utilities");
initialize("com.cyc.cycjava.cycl.set");
initialize("com.cyc.cycjava.cycl.set_utilities");*/
//initialize("com.cyc.cycjava.cycl.dictionary_utilities");
initialize("com.cyc.cycjava.cycl.map_utilities");
initialize("com.cyc.cycjava.cycl.bag");
initialize("com.cyc.cycjava.cycl.accumulation");
initialize("com.cyc.cycjava.cycl.red_infrastructure");
initialize("com.cyc.cycjava.cycl.red_infrastructure_macros");
initialize("com.cyc.cycjava.cycl.red_utilities");
initialize("com.cyc.cycjava.cycl.file_utilities");
initialize("com.cyc.cycjava.cycl.stream_buffer");
initialize("com.cyc.cycjava.cycl.hierarchical_visitor");
initialize("com.cyc.cycjava.cycl.strie");
initialize("com.cyc.cycjava.cycl.finite_state_transducer");
initialize("com.cyc.cycjava.cycl.cache");
initialize("com.cyc.cycjava.cycl.cache_utilities");
initialize("com.cyc.cycjava.cycl.special_variable_state");
initialize("com.cyc.cycjava.cycl.simple_lru_cache_strategy");
initialize("com.cyc.cycjava.cycl.file_hash_table");
initialize("com.cyc.cycjava.cycl.file_hash_table_utilities");
initialize("com.cyc.cycjava.cycl.super_file_hash_table");
initialize("com.cyc.cycjava.cycl.file_vector");
initialize("com.cyc.cycjava.cycl.file_vector_utilities");
initialize("com.cyc.cycjava.cycl.generic_table_utilities");
initialize("com.cyc.cycjava.cycl.sdbc_macros");
initialize("com.cyc.cycjava.cycl.sdbc");
initialize("com.cyc.cycjava.cycl.graph_utilities");
initialize("com.cyc.cycjava.cycl.sparse_vector");
initialize("com.cyc.cycjava.cycl.sparse_matrix");
// initialize("com.cyc.cycjava.cycl.remote_image");
initialize("com.cyc.cycjava.cycl.cyc_testing.cyc_testing_utilities");
initialize("com.cyc.cycjava.cycl.heap");
initialize("com.cyc.cycjava.cycl.decision_tree");
initialize("com.cyc.cycjava.cycl.misc_utilities");
initialize("com.cyc.cycjava.cycl.web_utilities");
initialize("com.cyc.cycjava.cycl.cycorp_utilities");
initialize("com.cyc.cycjava.cycl.timing_by_category");
initialize("com.cyc.cycjava.cycl.api_control_vars");
initialize("com.cyc.cycjava.cycl.eval_in_api");
initialize("com.cyc.cycjava.cycl.eval_in_api_registrations");
initialize("com.cyc.cycjava.cycl.api_kernel");
initialize("com.cyc.cycjava.cycl.cfasl_kernel");
initialize("com.cyc.cycjava.cycl.event_model");
initialize("com.cyc.cycjava.cycl.event_broker");
initialize("com.cyc.cycjava.cycl.event_utilities");
initialize("com.cyc.cycjava.cycl.message_mailboxes");
initialize("com.cyc.cycjava.cycl.guardian");
initialize("com.cyc.cycjava.cycl.hl_interface_infrastructure");
initialize("com.cyc.cycjava.cycl.kb_macros");
initialize("com.cyc.cycjava.cycl.constant_completion_low");
initialize("com.cyc.cycjava.cycl.constant_completion_interface");
initialize("com.cyc.cycjava.cycl.constant_completion_high");
initialize("com.cyc.cycjava.cycl.constant_completion");
initialize("com.cyc.cycjava.cycl.constant_handles");
initialize("com.cyc.cycjava.cycl.constant_reader");
initialize("com.cyc.cycjava.cycl.enumeration_types");
initialize("com.cyc.cycjava.cycl.kb_control_vars");
initialize("com.cyc.cycjava.cycl.mt_vars");
initialize("com.cyc.cycjava.cycl.graphl_search_vars");
initialize("com.cyc.cycjava.cycl.ghl_search_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_iteration");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_paranoia");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_module_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_link_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_marking_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_datastructures");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_vars");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_link_iterators");
initialize("com.cyc.cycjava.cycl.at_vars");
initialize("com.cyc.cycjava.cycl.gt_vars");
initialize("com.cyc.cycjava.cycl.czer_vars");
initialize("com.cyc.cycjava.cycl.utilities_macros");
initialize("com.cyc.cycjava.cycl.kbi_vars");
initialize("com.cyc.cycjava.cycl.mt_relevance_macros");
initialize("com.cyc.cycjava.cycl.pred_relevance_macros");
initialize("com.cyc.cycjava.cycl.at_macros");
initialize("com.cyc.cycjava.cycl.czer_macros");
initialize("com.cyc.cycjava.cycl.wff_macros");
initialize("com.cyc.cycjava.cycl.wff_vars");
initialize("com.cyc.cycjava.cycl.gt_macros");
initialize("com.cyc.cycjava.cycl.hl_macros");
initialize("com.cyc.cycjava.cycl.kbi_macros");
initialize("com.cyc.cycjava.cycl.kbi_macros_2");
initialize("com.cyc.cycjava.cycl.obsolete");
initialize("com.cyc.cycjava.cycl.obsolete_macros");
initialize("com.cyc.cycjava.cycl.kb_mapping_macros");
initialize("com.cyc.cycjava.cycl.kb_access_metering");
initialize("com.cyc.cycjava.cycl.kb_object_manager");
initialize("com.cyc.cycjava.cycl.hlmt");
initialize("com.cyc.cycjava.cycl.hlmt_czer");
initialize("com.cyc.cycjava.cycl.constants_interface");
initialize("com.cyc.cycjava.cycl.constant_index_manager");
initialize("com.cyc.cycjava.cycl.constants_low");
initialize("com.cyc.cycjava.cycl.constants_high");
initialize("com.cyc.cycjava.cycl.nart_handles");
initialize("com.cyc.cycjava.cycl.narts_interface");
initialize("com.cyc.cycjava.cycl.nart_index_manager");
initialize("com.cyc.cycjava.cycl.nart_hl_formula_manager");
initialize("com.cyc.cycjava.cycl.narts_low");
initialize("com.cyc.cycjava.cycl.narts_high");
initialize("com.cyc.cycjava.cycl.forts");
initialize("com.cyc.cycjava.cycl.assertion_handles");
initialize("com.cyc.cycjava.cycl.assertions_interface");
initialize("com.cyc.cycjava.cycl.assertion_manager");
initialize("com.cyc.cycjava.cycl.assertions_low");
initialize("com.cyc.cycjava.cycl.assertions_high");
initialize("com.cyc.cycjava.cycl.kb_hl_support_manager");
initialize("com.cyc.cycjava.cycl.kb_hl_supports");
initialize("com.cyc.cycjava.cycl.deduction_handles");
initialize("com.cyc.cycjava.cycl.deductions_interface");
initialize("com.cyc.cycjava.cycl.deduction_manager");
initialize("com.cyc.cycjava.cycl.deductions_low");
initialize("com.cyc.cycjava.cycl.deductions_high");
initialize("com.cyc.cycjava.cycl.unrepresented_term_index_manager");
initialize("com.cyc.cycjava.cycl.unrepresented_terms");
initialize("com.cyc.cycjava.cycl.arguments");
initialize("com.cyc.cycjava.cycl.clause_strucs");
initialize("com.cyc.cycjava.cycl.variables");
initialize("com.cyc.cycjava.cycl.format_cycl_expression");
initialize("com.cyc.cycjava.cycl.hl_storage_modules");
initialize("com.cyc.cycjava.cycl.kb_modification_event_support");
initialize("com.cyc.cycjava.cycl.kb_modification_event");
initialize("com.cyc.cycjava.cycl.hl_modifiers");
initialize("com.cyc.cycjava.cycl.sxhash_external_kb");
initialize("com.cyc.cycjava.cycl.el_macros");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_macros");
initialize("com.cyc.cycjava.cycl.cycl_variables");
initialize("com.cyc.cycjava.cycl.el_utilities");
initialize("com.cyc.cycjava.cycl.el_math_utilities");
initialize("com.cyc.cycjava.cycl.clause_utilities");
initialize("com.cyc.cycjava.cycl.cycl_utilities");
initialize("com.cyc.cycjava.cycl.cycl_grammar");
initialize("com.cyc.cycjava.cycl.el_grammar");
initialize("com.cyc.cycjava.cycl.unicode_nauts");
initialize("com.cyc.cycjava.cycl.term");
initialize("com.cyc.cycjava.cycl.kb_indexing_datastructures");
initialize("com.cyc.cycjava.cycl.kb_utilities");
initialize("com.cyc.cycjava.cycl.simple_indexing");
initialize("com.cyc.cycjava.cycl.kb_indexing_declarations");
initialize("com.cyc.cycjava.cycl.kb_indexing_macros");
initialize("com.cyc.cycjava.cycl.kb_indexing");
initialize("com.cyc.cycjava.cycl.virtual_indexing");
initialize("com.cyc.cycjava.cycl.kb_mapping");
initialize("com.cyc.cycjava.cycl.kb_mapping_utilities");
initialize("com.cyc.cycjava.cycl.kb_gp_mapping");
initialize("com.cyc.cycjava.cycl.somewhere_cache");
initialize("com.cyc.cycjava.cycl.auxiliary_indexing");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_mapping_macros");
initialize("com.cyc.cycjava.cycl.inferred_indexing");
initialize("com.cyc.cycjava.cycl.arity");
initialize("com.cyc.cycjava.cycl.kb_accessors");
initialize("com.cyc.cycjava.cycl.kb_iterators");
initialize("com.cyc.cycjava.cycl.function_terms");
initialize("com.cyc.cycjava.cycl.relation_evaluation");
initialize("com.cyc.cycjava.cycl.assertion_utilities");
initialize("com.cyc.cycjava.cycl.indexing_utilities");
initialize("com.cyc.cycjava.cycl.parameter_specification_utilities");
initialize("com.cyc.cycjava.cycl.clauses");
initialize("com.cyc.cycjava.cycl.bindings");
initialize("com.cyc.cycjava.cycl.unification");
initialize("com.cyc.cycjava.cycl.unification_utilities");
// initialize("com.cyc.cycjava.cycl.file_backed_cache");
SubLMain.BOOTY_HACKZ = true;
initialize("com.cyc.cycjava.cycl.graphl_graph_utilities");
initialize("com.cyc.cycjava.cycl.ghl_graph_utilities");
initialize("com.cyc.cycjava.cycl.ghl_link_iterators");
initialize("com.cyc.cycjava.cycl.ghl_marking_utilities");
initialize("com.cyc.cycjava.cycl.ghl_search_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_graphs");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_caching_policies");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_module_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_links");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_nat_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_link_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_link_methods");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_marking_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_marking_methods");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_methods");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_what_mts");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_search_implied_relations");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_module_declarations");
initialize("com.cyc.cycjava.cycl.genls");
initialize("com.cyc.cycjava.cycl.disjoint_with");
initialize("com.cyc.cycjava.cycl.sdc");
initialize("com.cyc.cycjava.cycl.isa");
initialize("com.cyc.cycjava.cycl.genl_predicates");
initialize("com.cyc.cycjava.cycl.negation_predicate");
initialize("com.cyc.cycjava.cycl.genl_mts");
initialize("com.cyc.cycjava.cycl.mt_relevance_cache");
initialize("com.cyc.cycjava.cycl.predicate_relevance_cache");
initialize("com.cyc.cycjava.cycl.negation_mt");
initialize("com.cyc.cycjava.cycl.ghl_search_methods");
initialize("com.cyc.cycjava.cycl.hlmt_relevance");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_cache");
initialize("com.cyc.cycjava.cycl.fort_types_interface");
initialize("com.cyc.cycjava.cycl.czer_trampolines");
initialize("com.cyc.cycjava.cycl.wff_utilities");
initialize("com.cyc.cycjava.cycl.wff_module_datastructures");
initialize("com.cyc.cycjava.cycl.wff_modules");
initialize("com.cyc.cycjava.cycl.wff");
initialize("com.cyc.cycjava.cycl.wff_suggest");
initialize("com.cyc.cycjava.cycl.wff_benchmark");
initialize("com.cyc.cycjava.cycl.simplifier");
initialize("com.cyc.cycjava.cycl.tersifier");
initialize("com.cyc.cycjava.cycl.verbosifier");
initialize("com.cyc.cycjava.cycl.czer_utilities");
initialize("com.cyc.cycjava.cycl.precanonicalizer");
initialize("com.cyc.cycjava.cycl.postcanonicalizer");
initialize("com.cyc.cycjava.cycl.clausifier");
initialize("com.cyc.cycjava.cycl.prop_sentence_clausifier");
initialize("com.cyc.cycjava.cycl.czer_graph");
initialize("com.cyc.cycjava.cycl.czer_main");
initialize("com.cyc.cycjava.cycl.rule_macros");
initialize("com.cyc.cycjava.cycl.skolems");
initialize("com.cyc.cycjava.cycl.czer_meta");
initialize("com.cyc.cycjava.cycl.uncanonicalizer");
initialize("com.cyc.cycjava.cycl.canon_tl");
initialize("com.cyc.cycjava.cycl.reformulator_datastructures");
initialize("com.cyc.cycjava.cycl.reformulator_module_harness");
initialize("com.cyc.cycjava.cycl.reformulator_hub");
initialize("com.cyc.cycjava.cycl.reformulator_testing");
initialize("com.cyc.cycjava.cycl.reformulator_rule_unifier_datastructures");
initialize("com.cyc.cycjava.cycl.reformulator_rule_unifier");
initialize("com.cyc.cycjava.cycl.reformulator_module_subcollection_simplifier");
initialize("com.cyc.cycjava.cycl.reformulator_module_query_processing");
initialize("com.cyc.cycjava.cycl.reformulator_module_wff_options");
initialize("com.cyc.cycjava.cycl.reformulator_module_dates");
initialize("com.cyc.cycjava.cycl.reformulator_utilities");
initialize("com.cyc.cycjava.cycl.reformulator_module_subcollection_processor");
initialize("com.cyc.cycjava.cycl.reformulator_module_negation_processor");
initialize("com.cyc.cycjava.cycl.reformulator_module_quantifier_optimizer_3");
initialize("com.cyc.cycjava.cycl.reformulator_module_quantifier_unifier_3");
initialize("com.cyc.cycjava.cycl.reformulator_module_quantifier_processing_3");
initialize("com.cyc.cycjava.cycl.reformulator_module_vpp_non_state");
initialize("com.cyc.cycjava.cycl.reformulator_module_vpp_state");
initialize("com.cyc.cycjava.cycl.reformulator_module_type_shifting");
initialize("com.cyc.cycjava.cycl.reformulator_utilities_nl");
initialize("com.cyc.cycjava.cycl.at_routines");
initialize("com.cyc.cycjava.cycl.at_utilities");
initialize("com.cyc.cycjava.cycl.at_admitted");
initialize("com.cyc.cycjava.cycl.at_defns");
initialize("com.cyc.cycjava.cycl.defns");
initialize("com.cyc.cycjava.cycl.at_var_types");
initialize("com.cyc.cycjava.cycl.at_cache");
initialize("com.cyc.cycjava.cycl.arg_type");
initialize("com.cyc.cycjava.cycl.applicable_relations");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_macros");
initialize("com.cyc.cycjava.cycl.inference.janus_macros");
initialize("com.cyc.cycjava.cycl.gt_utilities");
initialize("com.cyc.cycjava.cycl.gt_search");
initialize("com.cyc.cycjava.cycl.gt_methods");
initialize("com.cyc.cycjava.cycl.transitivity");
initialize("com.cyc.cycjava.cycl.transfers_through");
initialize("com.cyc.cycjava.cycl.tva_utilities");
initialize("com.cyc.cycjava.cycl.tva_tactic");
initialize("com.cyc.cycjava.cycl.tva_strategy");
initialize("com.cyc.cycjava.cycl.tva_inference");
initialize("com.cyc.cycjava.cycl.tva_cache");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_dates");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_utilities");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_query_processing");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_search");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_assertion_processing");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_modules");
initialize("com.cyc.cycjava.cycl.sbhl.sbhl_time_defns");
initialize("com.cyc.cycjava.cycl.equality_store");
initialize("com.cyc.cycjava.cycl.equals");
initialize("com.cyc.cycjava.cycl.rewrite_of_propagation");
initialize("com.cyc.cycjava.cycl.hl_supports");
initialize("com.cyc.cycjava.cycl.conflicts");
initialize("com.cyc.cycjava.cycl.ebl");
initialize("com.cyc.cycjava.cycl.preserves_genls_in_arg");
initialize("com.cyc.cycjava.cycl.formula_pattern_match");
initialize("com.cyc.cycjava.cycl.cfasl_kb_methods");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_macros");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_modules");
initialize("com.cyc.cycjava.cycl.search");
initialize("com.cyc.cycjava.cycl.tms");
initialize("com.cyc.cycjava.cycl.inference.harness.after_adding");
initialize("com.cyc.cycjava.cycl.inference.harness.rule_after_adding");
initialize("com.cyc.cycjava.cycl.inference.modules.after_adding_modules");
initialize("com.cyc.cycjava.cycl.inference.harness.argumentation");
initialize("com.cyc.cycjava.cycl.backward");
initialize("com.cyc.cycjava.cycl.psc");
initialize("com.cyc.cycjava.cycl.inference.inference_trampolines");
initialize("com.cyc.cycjava.cycl.inference.inference_completeness_utilities");
initialize("com.cyc.cycjava.cycl.backward_utilities");
initialize("com.cyc.cycjava.cycl.backward_results");
if (rl > 2) {
initialize("com.cyc.cycjava.cycl.transformation_heuristics");
initialize("com.cyc.cycjava.cycl.inference.inference_pad_data");
initialize("com.cyc.cycjava.cycl.inference.inference_event_support");
initialize("com.cyc.cycjava.cycl.inference.inference_event");
initialize("com.cyc.cycjava.cycl.inference.inference_event_filters");
initialize("com.cyc.cycjava.cycl.inference.modules.preference_modules");
initialize("com.cyc.cycjava.cycl.inference.modules.preference_module_declarations");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_enumerated_types");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_problem_store");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_problem_query");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_problem");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_problem_link");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_tactic");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_proof");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_strategy");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_forward_propagate");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_datastructures_inference");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_czer");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_proof_spec");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_proof_spec_store");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_answer");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_restriction");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_removal");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_transformation");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_residual_transformation");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_rewrite");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_split");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_join_ordered");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_join");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_worker_union");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_tactician_strategic_uninterestingness");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_lookahead_productivity");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_min_transformation_depth");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_tactician_utilities");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_strategic_heuristics");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_balanced_tactician_datastructures");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_balanced_tactician_strategic_uninterestingness");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_balanced_tactician_motivation");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_balanced_tactician_execution");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_heuristic_balanced_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.balancing_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_tactician_datastructures");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_tactician_uninterestingness");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_tactician_motivation");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_tactician_execution");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.transformation_tactician_datastructures");
initialize("com.cyc.cycjava.cycl.inference.harness.transformation_tactician_uninterestingness");
initialize("com.cyc.cycjava.cycl.inference.harness.transformation_tactician_motivation");
initialize("com.cyc.cycjava.cycl.inference.harness.transformation_tactician_execution");
initialize("com.cyc.cycjava.cycl.inference.harness.transformation_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.new_root_tactician_datastructures");
initialize("com.cyc.cycjava.cycl.inference.harness.new_root_tactician_motivation");
initialize("com.cyc.cycjava.cycl.inference.harness.new_root_tactician_execution");
initialize("com.cyc.cycjava.cycl.inference.harness.new_root_tactician");
initialize("com.cyc.cycjava.cycl.inference.harness.reinforcement_learning_tactician");
}
initialize("com.cyc.cycjava.cycl.neural_net");
if (rl > 2) {
initialize("com.cyc.cycjava.cycl.inference.harness.inference_strategist");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_kernel");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_trivial");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_utilities");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_parameters");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_metrics");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_analysis");
initialize("com.cyc.cycjava.cycl.inference.harness.probably_approximately_done");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_serialization");
initialize("com.cyc.cycjava.cycl.cyc_testing.inference_unit_tests");
initialize("com.cyc.cycjava.cycl.cyc_testing.removal_module_tests");
initialize("com.cyc.cycjava.cycl.cyc_testing.transformation_module_tests");
initialize("com.cyc.cycjava.cycl.cyc_testing.evaluatable_relation_tests");
initialize("com.cyc.cycjava.cycl.cyc_testing.inference_testing_helpers");
initialize("com.cyc.cycjava.cycl.cyc_testing.inference_testing");
initialize("com.cyc.cycjava.cycl.cyc_testing.removal_module_cost_tests");
initialize("com.cyc.cycjava.cycl.inference.kb_query");
initialize("com.cyc.cycjava.cycl.inference.kbq_query_run");
initialize("com.cyc.cycjava.cycl.inference.arete");
initialize("com.cyc.cycjava.cycl.inference.janus");
initialize("com.cyc.cycjava.cycl.inference.leviathan");
initialize("com.cyc.cycjava.cycl.inference.deep_inference_generator");
initialize("com.cyc.cycjava.cycl.inference.lilliput");
initialize("com.cyc.cycjava.cycl.inference.lilliput_caches");
initialize("com.cyc.cycjava.cycl.inference.query_suggestor");
initialize("com.cyc.cycjava.cycl.inference.kct_parameters");
initialize("com.cyc.cycjava.cycl.inference.scheduled_queries");
initialize("com.cyc.cycjava.cycl.inference.ask_utilities");
initialize("com.cyc.cycjava.cycl.inference.harness.removal_module_utilities");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_lookup");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_minimization");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_evaluation");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_symmetry");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_transitivity");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_reflexivity");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_reflexive_on");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_genlpreds_lookup");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_relation_all");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_relation_all_instance");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_relation_all_exists");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_relation_instance_exists");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_term_external_id_string");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_backchain_required");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_abduction");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.meta_removal_modules");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_non_wff");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_isa");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_genls");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_denotes");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_classification");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_subset_of");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_nearest_isa");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_disjointwith");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_sbhl_time_preds");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_termofunit");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_natfunction");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_formula_arg_n");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_equals");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_evaluate");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_date_utilities");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_hlmt_utilities");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_time_utilities");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_different");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_genlmt");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_genlpreds");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_genlinverse");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_negationpreds");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_negationinverse");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_ist");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_consistent");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_admitted_formula");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_asserted_formula");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_asserted_arg1_binary_preds");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_function_corresponding_predicate");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_start_offset");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_true_sentence");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_formula_implies");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_asserted_more_specifically");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_isomorphic_sentences");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_conceptually_related");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_integer_between");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_indexical_referent");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_constant_name");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_assertion_mt");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_term_strings");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_extent_cardinality");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_min_quant_value");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_nth_largest_element");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_perform_subl");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_term_chosen");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_tva_lookup");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_bookkeeping");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_rtv");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_member_of_list");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_assertion_arguments");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_deduction_supports");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_assertion_deductions");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_assertion_hl_asserted_argument_keyword");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_inference_reflection");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_known_antecedent_rule");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_type_temporal_subsumption");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_distance_between");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_lat_long");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_country_of_city");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_ir_index_string");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_kappa");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_interval_range");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_ke_useless_precision_value");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_wn_direct_denots");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_kb_indexing");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_concatenate_strings");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_query_answers");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_owl");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_set_of_list_with_same_member_in_pos");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_type_string");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_conjunctive_pruning");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_sksi_sentence");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_source_schema_object_fn");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_kb_sentence");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_source_sentence");
}
initialize("com.cyc.cycjava.cycl.removal_modules_rkf");
initialize("com.cyc.cycjava.cycl.removal_modules_halo");
initialize("com.cyc.cycjava.cycl.chemistry_utilities");
initialize("com.cyc.cycjava.cycl.removal_modules_chemistry");
if (rl > 2) {
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_gis");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_conceptually_near_terms");
initialize("com.cyc.cycjava.cycl.inference.modules.transformation_modules");
initialize("com.cyc.cycjava.cycl.inference.modules.simplification_modules");
initialize("com.cyc.cycjava.cycl.inference.modules.rewrite_modules");
initialize("com.cyc.cycjava.cycl.inference.harness.forward");
initialize("com.cyc.cycjava.cycl.inference.modules.forward_modules");
initialize("com.cyc.cycjava.cycl.inference.forward_propagate_assertions");
initialize("com.cyc.cycjava.cycl.inference.harness.abnormal");
initialize("com.cyc.cycjava.cycl.inference.harness.hl_prototypes");
initialize("com.cyc.cycjava.cycl.inference.collection_intersection");
initialize("com.cyc.cycjava.cycl.inference.harness.inference_abduction_utilities");
}
initialize("com.cyc.cycjava.cycl.abduction");
initialize("com.cyc.cycjava.cycl.fi");
initialize("com.cyc.cycjava.cycl.cyc_bookkeeping");
initialize("com.cyc.cycjava.cycl.cyc_kernel");
initialize("com.cyc.cycjava.cycl.inference.harness.prove");
initialize("com.cyc.cycjava.cycl.inference.inference_iterators");
initialize("com.cyc.cycjava.cycl.ke");
initialize("com.cyc.cycjava.cycl.api_remote_objects");
initialize("com.cyc.cycjava.cycl.batch_ke");
initialize("com.cyc.cycjava.cycl.inference.inference_viewer");
initialize("com.cyc.cycjava.cycl.plot_generation");
initialize("com.cyc.cycjava.cycl.cardinality_estimates");
initialize("com.cyc.cycjava.cycl.relationship_generality_estimates");
initialize("com.cyc.cycjava.cycl.nl_generation_api_macros");
initialize("com.cyc.cycjava.cycl.evaluation_defns");
initialize("com.cyc.cycjava.cycl.collection_defns");
initialize("com.cyc.cycjava.cycl.ke_utilities");
initialize("com.cyc.cycjava.cycl.ke_file");
initialize("com.cyc.cycjava.cycl.ke_text");
initialize("com.cyc.cycjava.cycl.kb_ontology_utilities");
initialize("com.cyc.cycjava.cycl.ontology_layers");
initialize("com.cyc.cycjava.cycl.system_benchmarks");
initialize("com.cyc.cycjava.cycl.object_similarity");
initialize("com.cyc.cycjava.cycl.partitions");
initialize("com.cyc.cycjava.cycl.partition_utilities");
initialize("com.cyc.cycjava.cycl.convert_partitions");
initialize("com.cyc.cycjava.cycl.core");
initialize("com.cyc.cycjava.cycl.kbs_utilities");
initialize("com.cyc.cycjava.cycl.kbs_identification");
initialize("com.cyc.cycjava.cycl.kbs_add_redundant");
initialize("com.cyc.cycjava.cycl.kbs_partition");
initialize("com.cyc.cycjava.cycl.kbs_cleanup");
initialize("com.cyc.cycjava.cycl.kbs_compare");
initialize("com.cyc.cycjava.cycl.kb_cleanup");
initialize("com.cyc.cycjava.cycl.genls_hierarchy_problems");
initialize("com.cyc.cycjava.cycl.encapsulation");
if (rl > 9) {
initialize("com.cyc.cycjava.cycl.transcript_utilities");
initialize("com.cyc.cycjava.cycl.transcript_server");
initialize("com.cyc.cycjava.cycl.operation_communication");
initialize("com.cyc.cycjava.cycl.operation_queues");
initialize("com.cyc.cycjava.cycl.remote_operation_filters");
}
initialize("com.cyc.cycjava.cycl.user_actions");
initialize("com.cyc.cycjava.cycl.pph_error");
initialize("com.cyc.cycjava.cycl.pph_vars");
initialize("com.cyc.cycjava.cycl.pph_macros");
initialize("com.cyc.cycjava.cycl.pph_parameter_declaration");
initialize("com.cyc.cycjava.cycl.pph_parameter_declarations");
initialize("com.cyc.cycjava.cycl.lexicon_vars");
initialize("com.cyc.cycjava.cycl.lexicon_macros");
initialize("com.cyc.cycjava.cycl.parsing_vars");
initialize("com.cyc.cycjava.cycl.parsing_macros");
initialize("com.cyc.cycjava.cycl.formula_template_vars");
initialize("com.cyc.cycjava.cycl.xml_vars");
initialize("com.cyc.cycjava.cycl.xml_macros");
initialize("com.cyc.cycjava.cycl.agenda");
initialize("com.cyc.cycjava.cycl.subl_identifier");
initialize("com.cyc.cycjava.cycl.query_utilities");
initialize("com.cyc.cycjava.cycl.kb_compare");
initialize("com.cyc.cycjava.cycl.dcyc_kernel");
initialize("com.cyc.cycjava.cycl.dcyc_agent");
initialize("com.cyc.cycjava.cycl.kb_paths");
initialize("com.cyc.cycjava.cycl.ke_coherence");
initialize("com.cyc.cycjava.cycl.ke_tools");
initialize("com.cyc.cycjava.cycl.kb_filtering");
initialize("com.cyc.cycjava.cycl.xml_utilities");
initialize("com.cyc.cycjava.cycl.misc_kb_utilities");
initialize("com.cyc.cycjava.cycl.external_inference");
initialize("com.cyc.cycjava.cycl.kb_modification_event_filters");
initialize("com.cyc.cycjava.cycl.scientific_numbers");
initialize("com.cyc.cycjava.cycl.scientific_number_utilities");
initialize("com.cyc.cycjava.cycl.extended_numbers");
initialize("com.cyc.cycjava.cycl.arithmetic");
initialize("com.cyc.cycjava.cycl.quantities");
initialize("com.cyc.cycjava.cycl.numeric_quantification");
initialize("com.cyc.cycjava.cycl.date_utilities");
initialize("com.cyc.cycjava.cycl.date_defns");
initialize("com.cyc.cycjava.cycl.time_interval_utilities");
initialize("com.cyc.cycjava.cycl.time_parameter_utilities");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_macros");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_testing.sksi_testing_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_infrastructure_macros");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_debugging");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_after_addings");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_evaluation_defns");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_kb_accessors");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_sks_accessors");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_infrastructure_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_meaning_sentence_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_field_translation_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_access_path");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_csql_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_csql_generation");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_csql_interpretation");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_csql_sparql_interpretation");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_csql_oracle_sparql_interpretation");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_result_set_iterators");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_reformulate");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_sks_interaction");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sksi_cost_estimates");
initialize("com.cyc.cycjava.cycl.sksi.sksi_infrastructure.sparql_result_stream");
initialize("com.cyc.cycjava.cycl.hl_storage_module_declarations");
initialize("com.cyc.cycjava.cycl.bookkeeping_store");
initialize("com.cyc.cycjava.cycl.dumper");
initialize("com.cyc.cycjava.cycl.builder_utilities");
initialize("com.cyc.cycjava.cycl.gt_modules");
initialize("com.cyc.cycjava.cycl.task_processor");
initialize("com.cyc.cycjava.cycl.java_api_kernel");
initialize("com.cyc.cycjava.cycl.connection_guarding");
initialize("com.cyc.cycjava.cycl.task_scheduler");
initialize("com.cyc.cycjava.cycl.drt");
initialize("com.cyc.cycjava.cycl.drt_rm");
initialize("com.cyc.cycjava.cycl.drt_drs");
initialize("com.cyc.cycjava.cycl.gke_main");
initialize("com.cyc.cycjava.cycl.gke_template_specification");
initialize("com.cyc.cycjava.cycl.inference.open_cyc_inference_api");
initialize("com.cyc.cycjava.cycl.inference.open_cyc_simple_inference_api");
initialize("com.cyc.cycjava.cycl.inference.inference_ipc_queue_processor");
initialize("com.cyc.cycjava.cycl.query_library_api");
initialize("com.cyc.cycjava.cycl.term_classification_tree");
initialize("com.cyc.cycjava.cycl.cyc_testing.ctest_macros");
initialize("com.cyc.cycjava.cycl.cyc_testing.ctest_utils");
initialize("com.cyc.cycjava.cycl.cyc_testing.kb_content_test.kct_variables");
initialize("com.cyc.cycjava.cycl.cyc_testing.kb_content_test.kct_utils");
initialize("com.cyc.cycjava.cycl.cyc_testing.kb_content_test.kct_cyc_testing");
initialize("com.cyc.cycjava.cycl.cyc_testing.kb_content_test.kct_thinking");
initialize("com.cyc.cycjava.cycl.external_code_constants");
initialize("com.cyc.cycjava.cycl.rkf_macros");
initialize("com.cyc.cycjava.cycl.rkf_event_dispatcher");
initialize("com.cyc.cycjava.cycl.rkf_mumbler");
initialize("com.cyc.cycjava.cycl.uia_macros");
initialize("com.cyc.cycjava.cycl.uia_tool_declaration");
initialize("com.cyc.cycjava.cycl.uima_interface_parameter_declaration");
initialize("com.cyc.cycjava.cycl.user_interaction_agenda");
initialize("com.cyc.cycjava.cycl.uia_after_addings");
initialize("com.cyc.cycjava.cycl.uia_listeners");
initialize("com.cyc.cycjava.cycl.uia_mumbler");
initialize("com.cyc.cycjava.cycl.uia_trampolines");
initialize("com.cyc.cycjava.cycl.uia_setup_state");
initialize("com.cyc.cycjava.cycl.uia_serialize");
initialize("com.cyc.cycjava.cycl.uia_problem_reporting");
initialize("com.cyc.cycjava.cycl.uia_user_modeler");
initialize("com.cyc.cycjava.cycl.uia_discourse_tracking");
initialize("com.cyc.cycjava.cycl.uia_tools_basic");
initialize("com.cyc.cycjava.cycl.uia_tools_misc");
initialize("com.cyc.cycjava.cycl.uia_tools_setup");
initialize("com.cyc.cycjava.cycl.uia_tools_browsing");
initialize("com.cyc.cycjava.cycl.uia_tools_introduction");
initialize("com.cyc.cycjava.cycl.uia_tools_wizards");
initialize("com.cyc.cycjava.cycl.cycl_query_specification");
initialize("com.cyc.cycjava.cycl.new_cycl_query_specification");
initialize("com.cyc.cycjava.cycl.uia_tools_review_and_testing");
initialize("com.cyc.cycjava.cycl.uia_tools_salient_descriptor");
initialize("com.cyc.cycjava.cycl.uia_tools_glossary");
initialize("com.cyc.cycjava.cycl.missing_knowledge_discovery_events");
initialize("com.cyc.cycjava.cycl.nl_logging");
initialize("com.cyc.cycjava.cycl.uia_coa_utilities");
initialize("com.cyc.cycjava.cycl.kb_action_to_uia_trampolines");
initialize("com.cyc.cycjava.cycl.kqml");
initialize("com.cyc.cycjava.cycl.agent_manager_protocol");
initialize("com.cyc.cycjava.cycl.agent_manager");
initialize("com.cyc.cycjava.cycl.rkf_context_tools");
initialize("com.cyc.cycjava.cycl.rkf_tools");
initialize("com.cyc.cycjava.cycl.rkf_term_utilities");
initialize("com.cyc.cycjava.cycl.rkf_irrelevant_fort_cache");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_rkf_irrelevant_fort_cache");
initialize("com.cyc.cycjava.cycl.rkf_ontology_utilities");
initialize("com.cyc.cycjava.cycl.rkf_assertion_utilities");
initialize("com.cyc.cycjava.cycl.rkf_query_utilities");
initialize("com.cyc.cycjava.cycl.rkf_domain_examples");
initialize("com.cyc.cycjava.cycl.rkf_example_queries");
initialize("com.cyc.cycjava.cycl.rkf_relevance_utilities");
initialize("com.cyc.cycjava.cycl.rkf_user_modeler");
initialize("com.cyc.cycjava.cycl.rkf_concept_communicator");
initialize("com.cyc.cycjava.cycl.rkf_discourse_tracking");
initialize("com.cyc.cycjava.cycl.rkf_sentence_communicator");
initialize("com.cyc.cycjava.cycl.rkf_argument_communicator");
initialize("com.cyc.cycjava.cycl.rkf_concept_clarifier");
initialize("com.cyc.cycjava.cycl.rkf_concept_summarizer");
initialize("com.cyc.cycjava.cycl.rkf_analogy_developer");
initialize("com.cyc.cycjava.cycl.rkf_contradiction_finder");
initialize("com.cyc.cycjava.cycl.rkf_redundancy_detector");
initialize("com.cyc.cycjava.cycl.rkf_relationship_suggestor");
initialize("com.cyc.cycjava.cycl.rkf_term_agglomerator");
initialize("com.cyc.cycjava.cycl.rkf_concept_harvester");
initialize("com.cyc.cycjava.cycl.rkf_formula_optimizer");
initialize("com.cyc.cycjava.cycl.rkf_precision_suggestor");
initialize("com.cyc.cycjava.cycl.rkf_salient_descriptor_datastructures");
initialize("com.cyc.cycjava.cycl.rkf_salient_descriptor");
initialize("com.cyc.cycjava.cycl.rkf_salient_descriptor_prompter");
initialize("com.cyc.cycjava.cycl.rkf_assisted_reader");
initialize("com.cyc.cycjava.cycl.rkf_string_weeders");
initialize("com.cyc.cycjava.cycl.rkf_ch_html_scanner");
initialize("com.cyc.cycjava.cycl.rkf_predicate_creator");
initialize("com.cyc.cycjava.cycl.rkf_scenario_manipulator");
initialize("com.cyc.cycjava.cycl.rkf_scenario_constructor");
initialize("com.cyc.cycjava.cycl.rkf_query_constructor");
initialize("com.cyc.cycjava.cycl.rkf_solution_finder");
initialize("com.cyc.cycjava.cycl.rkf_rule_constructor");
initialize("com.cyc.cycjava.cycl.rkf_text_processors");
initialize("com.cyc.cycjava.cycl.predicate_strengthener");
initialize("com.cyc.cycjava.cycl.predicate_strengthener_internals");
initialize("com.cyc.cycjava.cycl.rkf_test_suite_tool");
initialize("com.cyc.cycjava.cycl.rkf_knowledge_sorter");
initialize("com.cyc.cycjava.cycl.rkf_todo_lists");
initialize("com.cyc.cycjava.cycl.rkf_collaborator_fire");
initialize("com.cyc.cycjava.cycl.rkf_collaborator_powerloom");
initialize("com.cyc.cycjava.cycl.rkf_collaborator_nusketch");
initialize("com.cyc.cycjava.cycl.rkf_collaborator_scoop");
initialize("com.cyc.cycjava.cycl.bugzilla");
initialize("com.cyc.cycjava.cycl.cyc_corpus_utilities");
initialize("com.cyc.cycjava.cycl.workflow_queue");
initialize("com.cyc.cycjava.cycl.html_utilities");
initialize("com.cyc.cycjava.cycl.html_script_utilities");
initialize("com.cyc.cycjava.cycl.html_rendering");
initialize("com.cyc.cycjava.cycl.apps_shared");
initialize("com.cyc.cycjava.cycl.xml_writer");
initialize("com.cyc.cycjava.cycl.formula_templates");
initialize("com.cyc.cycjava.cycl.ke_interaction_folder");
initialize("com.cyc.cycjava.cycl.graphic_library_format");
initialize("com.cyc.cycjava.cycl.value_tables");
initialize("com.cyc.cycjava.cycl.reformulation_specification");
initialize("com.cyc.cycjava.cycl.script_instance_editor_api");
initialize("com.cyc.cycjava.cycl.cb_macros");
initialize("com.cyc.cycjava.cycl.cb_javascript_macros");
initialize("com.cyc.cycjava.cycl.cb_parameters");
initialize("com.cyc.cycjava.cycl.cb_utilities");
initialize("com.cyc.cycjava.cycl.cb_form_widgets");
initialize("com.cyc.cycjava.cycl.cb_events");
initialize("com.cyc.cycjava.cycl.cb_adornments");
initialize(5, "com.cyc.cycjava.cycl.cb_frames");
initialize("com.cyc.cycjava.cycl.cb_viewpoint");
initialize("com.cyc.cycjava.cycl.cb_java_utilities");
initialize("com.cyc.cycjava.cycl.cb_naut_utilities");
initialize("com.cyc.cycjava.cycl.cb_unicode");
initialize("com.cyc.cycjava.cycl.html_arghash");
initialize("com.cyc.cycjava.cycl.html_complete");
initialize("com.cyc.cycjava.cycl.inference.qa_benchmarks");
initialize("com.cyc.cycjava.cycl.inference.experiment_loop");
initialize("com.cyc.cycjava.cycl.cyc_navigator_internals");
initialize("com.cyc.cycjava.cycl.cyc_navigator_links");
initialize(5, "com.cyc.cycjava.cycl.cb_browser");
initialize("com.cyc.cycjava.cycl.cb_inferred_index");
initialize("com.cyc.cycjava.cycl.cb_fact_sheets");
initialize("com.cyc.cycjava.cycl.cb_fet");
initialize("com.cyc.cycjava.cycl.cb_assertion_browser");
initialize("com.cyc.cycjava.cycl.cb_sentence_browser");
initialize("com.cyc.cycjava.cycl.cb_editor");
initialize("com.cyc.cycjava.cycl.cb_assertion_editor");
initialize("com.cyc.cycjava.cycl.cb_web_services");
initialize("com.cyc.cycjava.cycl.cb_ke_reviewer");
initialize("com.cyc.cycjava.cycl.cb_tools");
initialize("com.cyc.cycjava.cycl.cb_system_tools");
initialize("com.cyc.cycjava.cycl.cb_partitions");
initialize("com.cyc.cycjava.cycl.cb_applicable_relations");
initialize("com.cyc.cycjava.cycl.cb_precision_suggestor");
initialize("com.cyc.cycjava.cycl.cb_disjointness");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_query");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_kb_query");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_query_browser");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_inference_browser");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_inference_debugger");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_forward_inference_browser");
initialize("com.cyc.cycjava.cycl.inference.browser.cb_hl_module_summary");
initialize("com.cyc.cycjava.cycl.inference.browser.problem_store_visualization");
initialize("com.cyc.cycjava.cycl.cb_subloop");
initialize("com.cyc.cycjava.cycl.cb_harvesters");
initialize("com.cyc.cycjava.cycl.cyc_testing.kb_content_test.cb_kct_test");
initialize("com.cyc.cycjava.cycl.hierarchy_browser");
initialize("com.cyc.cycjava.cycl.cb_non_wff");
initialize("com.cyc.cycjava.cycl.cb_mysentient");
initialize("com.cyc.cycjava.cycl.cb_java_web_start_launcher");
initialize("com.cyc.cycjava.cycl.cb_random_thoughts");
initialize("com.cyc.cycjava.cycl.cb_gke_applet");
initialize("com.cyc.cycjava.cycl.cb_gke2_applet");
initialize("com.cyc.cycjava.cycl.cb_fet_applet");
initialize("com.cyc.cycjava.cycl.cb_ql_applet");
initialize("com.cyc.cycjava.cycl.cb_uia_forwarding");
initialize("com.cyc.cycjava.cycl.cb_refresher_applet");
initialize("com.cyc.cycjava.cycl.blue_grapher_utilities");
initialize("com.cyc.cycjava.cycl.cb_blue_grapher");
initialize("com.cyc.cycjava.cycl.cb_populator");
initialize("com.cyc.cycjava.cycl.cb_internal_reviewer");
initialize("com.cyc.cycjava.cycl.cb_external_reviewer");
initialize("com.cyc.cycjava.cycl.cb_uia_macros");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_utilities");
initialize("com.cyc.cycjava.cycl.cb_uia_mumbler");
initialize("com.cyc.cycjava.cycl.cb_uia_display_primitives");
initialize("com.cyc.cycjava.cycl.cb_uia_widgets");
initialize("com.cyc.cycjava.cycl.cb_uia_tool_declaration");
initialize("com.cyc.cycjava.cycl.cb_user_interaction_agenda");
initialize("com.cyc.cycjava.cycl.cb_uia_debugging");
initialize("com.cyc.cycjava.cycl.cb_uia_problem_reporting");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_basic");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_setup");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_browsing");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_glossary");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_misc");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_introduction");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_wizards");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_review_and_testing");
initialize("com.cyc.cycjava.cycl.cb_uia_tools_salient_descriptor");
initialize("com.cyc.cycjava.cycl.cb_uiat_ontology_browser");
initialize("com.cyc.cycjava.cycl.cb_uiat_smart");
initialize("com.cyc.cycjava.cycl.cb_uia_launchers");
initialize("com.cyc.cycjava.cycl.cb_uia_coa_launchers");
initialize("com.cyc.cycjava.cycl.cb_uia_collaborators");
initialize("com.cyc.cycjava.cycl.cb_uia_blue");
initialize("com.cyc.cycjava.cycl.cb_rtv");
initialize("com.cyc.cycjava.cycl.cb_predicate_creator");
initialize("com.cyc.cycjava.cycl.cb_scenario_constructor");
initialize("com.cyc.cycjava.cycl.cb_query_constructor");
initialize("com.cyc.cycjava.cycl.cb_solution_finder");
initialize("com.cyc.cycjava.cycl.cb_rule_constructor");
initialize("com.cyc.cycjava.cycl.cb_user_actions");
initialize("com.cyc.cycjava.cycl.cr_search_tool");
initialize("com.cyc.cycjava.cycl.html_create_term");
initialize("com.cyc.cycjava.cycl.cb_forward_propagate");
initialize("com.cyc.cycjava.cycl.cb_ke_text");
initialize("com.cyc.cycjava.cycl.html_ke_file");
initialize("com.cyc.cycjava.cycl.similarity");
initialize("com.cyc.cycjava.cycl.cb_similarity");
initialize("com.cyc.cycjava.cycl.wordnet_import.wordnet_import");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_comment");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_concept_match");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_concept_name");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_fact_slots");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_new_words");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_import_semtrans");
initialize("com.cyc.cycjava.cycl.wordnet_import.wordnet_import_offline_tasks");
initialize("com.cyc.cycjava.cycl.wordnet_import.cb_wordnet_utilities");
initialize("com.cyc.cycjava.cycl.wordnet_import.wordnet_utilities");
initialize("com.cyc.cycjava.cycl.rdf.rdf_utilities");
initialize("com.cyc.cycjava.cycl.rdf.rdf_triple");
initialize("com.cyc.cycjava.cycl.rdf.rdf_graph");
initialize("com.cyc.cycjava.cycl.rdf.rdf_uri");
initialize("com.cyc.cycjava.cycl.rdf.rdf_blank_node");
initialize("com.cyc.cycjava.cycl.rdf.rdf_literal");
initialize("com.cyc.cycjava.cycl.rdf.rdf_parser");
initialize("com.cyc.cycjava.cycl.rdf.rdf_n_triples_parser");
initialize("com.cyc.cycjava.cycl.rdf.rdf_n_triples_writer");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_rdf");
initialize("com.cyc.cycjava.cycl.rdf.sparql_utilities");
initialize("com.cyc.cycjava.cycl.rdf.census");
initialize("com.cyc.cycjava.cycl.owl.owl_utilities");
initialize("com.cyc.cycjava.cycl.owl.owl_to_cycl");
initialize("com.cyc.cycjava.cycl.owl.cb_owl_to_cycl");
initialize("com.cyc.cycjava.cycl.owl.owl_importer2");
initialize("com.cyc.cycjava.cycl.facets");
initialize("com.cyc.cycjava.cycl.cb_facets");
initialize("com.cyc.cycjava.cycl.cb_template_oe");
initialize("com.cyc.cycjava.cycl.vocab_pages");
initialize("com.cyc.cycjava.cycl.constrained_term_finder");
initialize("com.cyc.cycjava.cycl.constraint_filters");
initialize("com.cyc.cycjava.cycl.cb_kbs_browser");
initialize("com.cyc.cycjava.cycl.html_kernel");
initialize("com.cyc.cycjava.cycl.http_kernel");
initialize("com.cyc.cycjava.cycl.kb_logging");
initialize("com.cyc.cycjava.cycl.test_query_suite");
initialize("com.cyc.cycjava.cycl.nl_pragmatics");
initialize("com.cyc.cycjava.cycl.nl_api_datastructures");
initialize("com.cyc.cycjava.cycl.morphology");
initialize("com.cyc.cycjava.cycl.string_utilities_lexical");
initialize("com.cyc.cycjava.cycl.lexicon_cache");
initialize("com.cyc.cycjava.cycl.lexicon_accessors");
initialize("com.cyc.cycjava.cycl.lexicon_utilities");
initialize("com.cyc.cycjava.cycl.lexicon_after_addings");
initialize("com.cyc.cycjava.cycl.preprocessor");
initialize("com.cyc.cycjava.cycl.wales");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_lexicon");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_parse_trees");
initialize("com.cyc.cycjava.cycl.word_frequencies");
initialize("com.cyc.cycjava.cycl.nl_trie");
initialize("com.cyc.cycjava.cycl.nl_trie_accessors");
initialize("com.cyc.cycjava.cycl.nl_trie_completion");
initialize("com.cyc.cycjava.cycl.nl_trie_staleness_test");
initialize("com.cyc.cycjava.cycl.lexicon_subword_index");
initialize("com.cyc.cycjava.cycl.cb_lexical_info");
initialize("com.cyc.cycjava.cycl.lexicon_slurpers");
initialize("com.cyc.cycjava.cycl.document");
initialize("com.cyc.cycjava.cycl.disambiguation");
initialize("com.cyc.cycjava.cycl.nl_generation_fort_cache");
initialize("com.cyc.cycjava.cycl.assertion_gloss_cache");
initialize("com.cyc.cycjava.cycl.file_backed_cache_setup");
initialize("com.cyc.cycjava.cycl.nl_generation_api");
initialize("com.cyc.cycjava.cycl.pph_regression");
initialize("com.cyc.cycjava.cycl.pph_data_structures");
initialize("com.cyc.cycjava.cycl.pph_staleness_test");
initialize("com.cyc.cycjava.cycl.pph_utilities");
initialize("com.cyc.cycjava.cycl.pph_disambiguation");
initialize("com.cyc.cycjava.cycl.pph_variable_handling");
initialize("com.cyc.cycjava.cycl.pph_drs");
initialize("com.cyc.cycjava.cycl.pph_phrase");
initialize("com.cyc.cycjava.cycl.pph_phrase_resolution");
initialize("com.cyc.cycjava.cycl.pph_sentence");
initialize("com.cyc.cycjava.cycl.pph_document");
initialize("com.cyc.cycjava.cycl.pph_speech_act");
initialize("com.cyc.cycjava.cycl.pph_types");
initialize("com.cyc.cycjava.cycl.pph_templates");
initialize("com.cyc.cycjava.cycl.pph_methods_lexicon");
initialize("com.cyc.cycjava.cycl.pph_methods_formulas");
initialize("com.cyc.cycjava.cycl.pph_methods_verb_sem_trans");
initialize("com.cyc.cycjava.cycl.pph_methods");
initialize("com.cyc.cycjava.cycl.pph_sksi");
initialize("com.cyc.cycjava.cycl.pph_methods_rdf");
initialize("com.cyc.cycjava.cycl.pph_html");
initialize("com.cyc.cycjava.cycl.pph_main");
initialize("com.cyc.cycjava.cycl.pph_scripts");
initialize("com.cyc.cycjava.cycl.pph_diagnostics");
initialize("com.cyc.cycjava.cycl.pph_question");
initialize("com.cyc.cycjava.cycl.proof_view");
initialize("com.cyc.cycjava.cycl.pph_proof");
initialize("com.cyc.cycjava.cycl.pph_noun_compound");
initialize("com.cyc.cycjava.cycl.lexification_utilities");
initialize("com.cyc.cycjava.cycl.lexification_wizard");
initialize("com.cyc.cycjava.cycl.cb_lexification_wizard");
initialize("com.cyc.cycjava.cycl.query_sentence_lexifier");
initialize("com.cyc.cycjava.cycl.cb_query_sentence_lexifier");
initialize("com.cyc.cycjava.cycl.relation_lexifier");
initialize("com.cyc.cycjava.cycl.parse_template_utilities");
initialize("com.cyc.cycjava.cycl.sme_lexification_wizard");
initialize("com.cyc.cycjava.cycl.sme_lexification_wizard_accessors");
initialize("com.cyc.cycjava.cycl.cb_sme_lexification_wizard");
initialize("com.cyc.cycjava.cycl.xml_question_answering_agent");
initialize("com.cyc.cycjava.cycl.xml_sme_lexification_wizard");
initialize("com.cyc.cycjava.cycl.cb_uiat_lexification_wizard");
initialize("com.cyc.cycjava.cycl.lexification_reminders");
initialize("com.cyc.cycjava.cycl.cb_lexification_reminders");
initialize("com.cyc.cycjava.cycl.standard_tokenization");
initialize("com.cyc.cycjava.cycl.interval_span");
initialize("com.cyc.cycjava.cycl.parsing_utilities");
initialize("com.cyc.cycjava.cycl.rbp_wff");
initialize("com.cyc.cycjava.cycl.mwp_parse");
initialize("com.cyc.cycjava.cycl.morph_word");
initialize("com.cyc.cycjava.cycl.mwp_rule");
initialize("com.cyc.cycjava.cycl.mwp_affix_matcher");
initialize("com.cyc.cycjava.cycl.morphological_word_parser");
initialize("com.cyc.cycjava.cycl.nl_reformulator");
initialize("com.cyc.cycjava.cycl.rbp_rule_bank");
initialize("com.cyc.cycjava.cycl.rbp_chart_parser");
initialize("com.cyc.cycjava.cycl.noun_compound_parser");
initialize("com.cyc.cycjava.cycl.candidate_nc_utilities");
initialize("com.cyc.cycjava.cycl.noun_compound_caching");
initialize("com.cyc.cycjava.cycl.np_parser");
initialize("com.cyc.cycjava.cycl.finite_state_cascade_parser");
initialize("com.cyc.cycjava.cycl.numeral_parser");
initialize("com.cyc.cycjava.cycl.english_quantity_parser");
initialize("com.cyc.cycjava.cycl.psp_rules");
initialize("com.cyc.cycjava.cycl.psp_chart");
initialize("com.cyc.cycjava.cycl.psp_syntax");
initialize("com.cyc.cycjava.cycl.psp_semantics");
initialize("com.cyc.cycjava.cycl.psp_parse_tree_generator");
initialize("com.cyc.cycjava.cycl.psp_main");
initialize("com.cyc.cycjava.cycl.cb_phrase_structure_parser");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_ncr_constraints");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_candidate_noun_compounds");
initialize("com.cyc.cycjava.cycl.pos_tagger");
initialize("com.cyc.cycjava.cycl.inverted_index");
initialize("com.cyc.cycjava.cycl.inverted_indexes_concrete");
initialize("com.cyc.cycjava.cycl.inverted_index_query_library");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_relevant_similar_queries");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_semantically_related");
initialize("com.cyc.cycjava.cycl.auto_lexifier");
initialize("com.cyc.cycjava.cycl.qua_query");
initialize("com.cyc.cycjava.cycl.cb_qua");
initialize("com.cyc.cycjava.cycl.shop_parameters");
initialize("com.cyc.cycjava.cycl.shop_datastructures");
initialize("com.cyc.cycjava.cycl.shop_domain");
initialize("com.cyc.cycjava.cycl.multibindings");
initialize("com.cyc.cycjava.cycl.shop_basic_world_state");
initialize("com.cyc.cycjava.cycl.shop_mt_world_state");
initialize("com.cyc.cycjava.cycl.shop_inference");
initialize("com.cyc.cycjava.cycl.shop_internals");
initialize("com.cyc.cycjava.cycl.shop_log");
initialize("com.cyc.cycjava.cycl.shop_basic_plan_state");
initialize("com.cyc.cycjava.cycl.shop_basic_plan");
initialize("com.cyc.cycjava.cycl.shop_basic_planner_thread");
initialize("com.cyc.cycjava.cycl.shop_main");
initialize("com.cyc.cycjava.cycl.html_id_links");
initialize("com.cyc.cycjava.cycl.shop_displayers");
initialize("com.cyc.cycjava.cycl.cb_shop");
initialize("com.cyc.cycjava.cycl.image_demo_internals");
initialize("com.cyc.cycjava.cycl.html_image_demo");
initialize("com.cyc.cycjava.cycl.wordnet");
initialize("com.cyc.cycjava.cycl.kif");
initialize("com.cyc.cycjava.cycl.html_kif");
initialize("com.cyc.cycjava.cycl.folification");
initialize("com.cyc.cycjava.cycl.owl.owl_uris_and_prefixes");
initialize("com.cyc.cycjava.cycl.owl.owlification");
initialize("com.cyc.cycjava.cycl.owl.owl_cycl_to_xml");
initialize("com.cyc.cycjava.cycl.owl.opencyc_diagnostics");
initialize("com.cyc.cycjava.cycl.inference.tptp_datastructures");
initialize("com.cyc.cycjava.cycl.inference.tptp_kb_content_generator");
initialize("com.cyc.cycjava.cycl.inference.tptp_modules");
initialize("com.cyc.cycjava.cycl.inference.tptp_problem_generator");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_control_vars");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_datastructures");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_lexical_index");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_after_addings");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_logging");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_thinking");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_internals");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_io");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_integrity");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_utilities");
initialize("com.cyc.cycjava.cycl.thesaurus.tm_api");
initialize("com.cyc.cycjava.cycl.thesaurus.html_thesaurus");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_utilities");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_users");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_update");
initialize("com.cyc.cycjava.cycl.thesaurus.html_basic_thesaurus");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_browsing");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_editing");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_relation_editing");
initialize("com.cyc.cycjava.cycl.thesaurus.html_tm_correlate");
initialize("com.cyc.cycjava.cycl.taxonomy");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_indexing_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_predicate_indexing");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_mt_indexing");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_gaf_arg_indexing");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_sks_mapping_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sks_indexing.sksi_tva_utilities");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_query_datastructures");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_query_utilities");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_hl_support_utilities");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_preference_module_generation");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_removal_module_generation");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_rewrite_modules");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_conjunctive_removal_module_generation");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_conjunctive_removal_module_utilities");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_conjunctive_removal_modules_applicability");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_conjunctive_removal_modules_cost");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_conjunctive_removal_modules_expand");
initialize("com.cyc.cycjava.cycl.sksi.query_sks.sksi_sparql_removal_module_generation");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_data_warehousing_utilities");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_batch_translate");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_incremental_edit");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_cross_editing");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_batch_store");
initialize("com.cyc.cycjava.cycl.sksi.data_warehousing.sksi_db_saturation");
initialize("com.cyc.cycjava.cycl.sksi.sksi_database_fusion");
initialize("com.cyc.cycjava.cycl.sksi.semantic_etl_bus");
initialize("com.cyc.cycjava.cycl.sksi.metadata_parser");
initialize("com.cyc.cycjava.cycl.sksi.data_parser");
initialize("com.cyc.cycjava.cycl.sksi.mapping_engine");
initialize("com.cyc.cycjava.cycl.sksi.db_model_serialization");
initialize("com.cyc.cycjava.cycl.sksi.create_sks.sksi_create_sks");
initialize("com.cyc.cycjava.cycl.sksi.store_sks.sksi_hl_storage_module_generation");
initialize("com.cyc.cycjava.cycl.sksi.sks_browser.sksi_external_browser_utilities");
initialize("com.cyc.cycjava.cycl.sksi.sks_browser.sksi_external_predicate_extent_browser");
initialize("com.cyc.cycjava.cycl.sksi.sks_browser.sksi_external_mt_contents_browser");
initialize("com.cyc.cycjava.cycl.sksi.sks_browser.sksi_external_gaf_argument_browser");
initialize("com.cyc.cycjava.cycl.sksi.sks_browser.sksi_external_term_browser");
initialize("com.cyc.cycjava.cycl.sksi.modeling_tools.sksi_sks_structure_importer_utilities");
initialize("com.cyc.cycjava.cycl.sksi.modeling_tools.schema_validator.sksi_schema_validator");
initialize("com.cyc.cycjava.cycl.sksi.modeling_tools.interfaces.sksi_sks_manager");
initialize("com.cyc.cycjava.cycl.sksi.modeling_tools.interfaces.sksi_smt_macros");
initialize("com.cyc.cycjava.cycl.sksi.modeling_tools.interfaces.sksi_smt");
initialize("com.cyc.cycjava.cycl.sksi.sksi_testing.sksi_cache");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.imdb_widgets");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.nws_widgets");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.misc_widgets");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.sxsw_widgets");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.yahoo_movies_widgets");
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.washington_post_restaurants_widgets");
initialize("com.cyc.cycjava.cycl.constrained_parsing");
initialize("com.cyc.cycjava.cycl.bbn_strengthening_metrics");
initialize("com.cyc.cycjava.cycl.bbn_strengthening");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_removal_module_macros");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_removal_module_utilities");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_storage_module_macros");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_storage_module_utilities");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_module_utilities");
initialize("com.cyc.cycjava.cycl.sksi.corba.corba_hpac_removal_modules");
initialize("com.cyc.cycjava.cycl.collaborative_sense_making_utilities");
initialize("com.cyc.cycjava.cycl.rtp.rtp_vars");
initialize("com.cyc.cycjava.cycl.rtp_pipeline_integration");
initialize("com.cyc.cycjava.cycl.rtp.rtp_datastructures");
initialize("com.cyc.cycjava.cycl.rtp.recognition");
initialize("com.cyc.cycjava.cycl.rtp.iterative_template_parser");
initialize("com.cyc.cycjava.cycl.rtp.rtp_iterators");
initialize("com.cyc.cycjava.cycl.rtp.rtp_type_checkers");
initialize("com.cyc.cycjava.cycl.rtp.rtp_constituent_weeders");
initialize("com.cyc.cycjava.cycl.rtp.rtp_initialize");
initialize("com.cyc.cycjava.cycl.rtp.cb_rtp");
initialize("com.cyc.cycjava.cycl.rtp.rtp_madlibs");
initialize("com.cyc.cycjava.cycl.thcl");
initialize("com.cyc.cycjava.cycl.random_thought_generator");
initialize("com.cyc.cycjava.cycl.api_widgets");
initialize("com.cyc.cycjava.cycl.variable_unification");
initialize("com.cyc.cycjava.cycl.fact_sheets");
initialize("com.cyc.cycjava.cycl.glf_api_widgets");
initialize("com.cyc.cycjava.cycl.analysis_diagram_tool_widgets");
initialize("com.cyc.cycjava.cycl.formula_template_utilities");
initialize("com.cyc.cycjava.cycl.cb_formula_templates");
initialize("com.cyc.cycjava.cycl.jubl");
if (true) {
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_lexifier");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_lalr");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_globals");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_macros");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_processes");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_structures");
initialize("com.cyc.cycjava.cycl.cyblack.index_space");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_attributes");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_utilities");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_component");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_object");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_list_element_object");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_lockable");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_markable");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ordinal");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_messages");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_message_broker");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_external_module_table");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_support");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_blackboard");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_posting");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cycposting");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_timer_posting");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_posting_dispatch_functions");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_function_object_posting");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_global_posting_table");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_goal");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_application");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_datatype");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_precondition_pattern");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_activation_pattern");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_blackboard_daemon");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ks");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_state_change_listener");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ksb");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ksi");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_panel");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_derived_panels");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cycpanel");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_panel_dispatch_functions");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_timer_panel");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_function_object_panel");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_proposal");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_agenda");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_heuristic_agenda");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_problem_space_attribute");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_datatype_dictionary");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_unification");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ks_tools");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_monitor");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ui_panel");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ui_monitor");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_io_stream_monitor");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_sexpr_monitor");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_system_postings");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_defks");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_defbb");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_defbbsubset");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_defksb");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_defapp");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_standard_bb_subsets");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_ks_dispatch_functions");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cyc_event_model");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cb_events");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_missing_knowledge_discovery_events");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_rkf_events");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_isi_macros");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_isi_postings");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_isi_knowledge_sources");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cyc_event_blackboard");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cyc_event_bb_agenda");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cyc_event_model_glue");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_mumbler_ks");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_cyc_event_knowledge_sources");
initialize("com.cyc.cycjava.cycl.cyblack.cyblack_inspection_tools");
}
initialize("com.cyc.cycjava.cycl.cycml");
initialize("com.cyc.cycjava.cycl.cycml_generator");
initialize("com.cyc.cycjava.cycl.web_services");
if (true) {
initialize("com.cyc.cycjava.cycl.nl_parsing_api");
initialize("com.cyc.cycjava.cycl.concept_filter");
initialize("com.cyc.cycjava.cycl.concept_tagger");
initialize("com.cyc.cycjava.cycl.document_search");
initialize("com.cyc.cycjava.cycl.yahoo");
initialize("com.cyc.cycjava.cycl.clustering");
// initialize("com.cyc.cycjava.cycl.abstract_lexicon");
initialize("com.cyc.cycjava.cycl.term_lexicon");
initialize("com.cyc.cycjava.cycl.semtrans_lexicon");
initialize("com.cyc.cycjava.cycl.psp_lexicon");
initialize("com.cyc.cycjava.cycl.cyclifier_lexicon");
initialize("com.cyc.cycjava.cycl.textual_inference_lexicon");
initialize("com.cyc.cycjava.cycl.denots_of_string_lexicon");
initialize("com.cyc.cycjava.cycl.context");
initialize("com.cyc.cycjava.cycl.lexical_disambiguator");
initialize("com.cyc.cycjava.cycl.coreference_resolver");
initialize("com.cyc.cycjava.cycl.subcyclifier");
initialize("com.cyc.cycjava.cycl.cyclifier_interface");
initialize("com.cyc.cycjava.cycl.parse_tree");
initialize("com.cyc.cycjava.cycl.word_tree");
initialize("com.cyc.cycjava.cycl.coreference_resolution");
initialize("com.cyc.cycjava.cycl.anaphor_resolver");
initialize("com.cyc.cycjava.cycl.cyclifier");
initialize("com.cyc.cycjava.cycl.cyclifier_testing");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_cyclifier");
initialize("com.cyc.cycjava.cycl.cae_query_search");
initialize("com.cyc.cycjava.cycl.query_library_utils");
initialize("com.cyc.cycjava.cycl.nl.lexicon_dumping");
initialize("com.cyc.cycjava.cycl.linkage");
initialize("com.cyc.cycjava.cycl.word_linkage");
initialize("com.cyc.cycjava.cycl.linkage_assertion");
initialize("com.cyc.cycjava.cycl.link_parser_tests");
initialize("com.cyc.cycjava.cycl.parser");
initialize("com.cyc.cycjava.cycl.assert_charniak_parse_tree");
initialize("com.cyc.cycjava.cycl.test_case_generator");
initialize("com.cyc.cycjava.cycl.nl_stats.parse_tree_utilities");
initialize("com.cyc.cycjava.cycl.leader.parse_tree_gui");
initialize("com.cyc.cycjava.cycl.cb_annotator_simple");
initialize("com.cyc.cycjava.cycl.shallow_parser");
initialize("com.cyc.cycjava.cycl.named_entity_recognizer");
initialize("com.cyc.cycjava.cycl.textual_entailments");
initialize("com.cyc.cycjava.cycl.query_augmenter.query_augmenter_subtopic_followups");
initialize("com.cyc.cycjava.cycl.query_augmenter.removal_modules_subtopic_followups");
initialize("com.cyc.cycjava.cycl.related_concepts");
initialize("com.cyc.cycjava.cycl.string_typing");
initialize("com.cyc.cycjava.cycl.query_augmenter.query_augmenter_subloop_utils");
initialize("com.cyc.cycjava.cycl.lucene_session");
initialize("com.cyc.cycjava.cycl.rule_disambiguation");
initialize("com.cyc.cycjava.cycl.document_annotation_widgets");
initialize("com.cyc.cycjava.cycl.gaf_gathering_metrics");
initialize("com.cyc.cycjava.cycl.generate_gafs");
initialize("com.cyc.cycjava.cycl.gaf_gathering_master");
initialize("com.cyc.cycjava.cycl.term_learner");
initialize("com.cyc.cycjava.cycl.cure_api");
initialize("com.cyc.cycjava.cycl.lucene_index");
initialize("com.cyc.cycjava.cycl.cb_webstore_viewer");
initialize("com.cyc.cycjava.cycl.ebmt_template_parser");
initialize("com.cyc.cycjava.cycl.ebmt_tests");
initialize("com.cyc.cycjava.cycl.nlp_db_metrics");
initialize("com.cyc.cycjava.cycl.ql_index_support");
initialize("com.cyc.cycjava.cycl.event_learning");
initialize("com.cyc.cycjava.cycl.learning_reader");
initialize("com.cyc.cycjava.cycl.learning_reader_disambiguation");
initialize("com.cyc.cycjava.cycl.project.ccf.ccf_report_generation");
initialize("com.cyc.cycjava.cycl.project.ccf.ccf_reports_by_column");
initialize("com.cyc.cycjava.cycl.quirk.quirk_trampolines");
initialize("com.cyc.cycjava.cycl.quirk.wordnet_proxy");
initialize("com.cyc.cycjava.cycl.quirk.external_interfaces");
initialize("com.cyc.cycjava.cycl.quirk.quirk_removal_module");
initialize("com.cyc.cycjava.cycl.quirk.search_engine");
initialize("com.cyc.cycjava.cycl.quirk.sanity_checker");
initialize("com.cyc.cycjava.cycl.quirk.graph");
initialize("com.cyc.cycjava.cycl.quirk.information_extraction");
initialize("com.cyc.cycjava.cycl.quirk.focus_entity");
initialize("com.cyc.cycjava.cycl.quirk.question");
initialize("com.cyc.cycjava.cycl.quirk.relationship_question");
initialize("com.cyc.cycjava.cycl.quirk.yes_no_question");
initialize("com.cyc.cycjava.cycl.quirk.wh_question");
initialize("com.cyc.cycjava.cycl.quirk.date_question");
initialize("com.cyc.cycjava.cycl.quirk.definitional_question");
initialize("com.cyc.cycjava.cycl.quirk.event_location_question");
initialize("com.cyc.cycjava.cycl.quirk.geographical_question");
initialize("com.cyc.cycjava.cycl.quirk.intelligent_agent_question");
initialize("com.cyc.cycjava.cycl.quirk.speed_question");
initialize("com.cyc.cycjava.cycl.quirk.what_question");
initialize("com.cyc.cycjava.cycl.quirk.value_question");
initialize("com.cyc.cycjava.cycl.quirk.cardinal_question");
initialize("com.cyc.cycjava.cycl.quirk.distance_question");
initialize("com.cyc.cycjava.cycl.quirk.physical_quantity_question");
initialize("com.cyc.cycjava.cycl.quirk.answer");
initialize("com.cyc.cycjava.cycl.quirk.quirk_java_gui");
initialize("com.cyc.cycjava.cycl.predicate_populator");
initialize("com.cyc.cycjava.cycl.nl_stats.verb_argument_lookups");
initialize("com.cyc.cycjava.cycl.nl_stats.removal_modules_induced_typical_arg");
initialize("com.cyc.cycjava.cycl.nl_stats.noun_learner_noun_classes");
initialize("com.cyc.cycjava.cycl.nl_stats.learned_nouns");
initialize("com.cyc.cycjava.cycl.nl_stats.noun_learner");
initialize("com.cyc.cycjava.cycl.nl_stats.cb_noun_learner_tool_applet");
initialize("com.cyc.cycjava.cycl.nl_stats.cb_noun_lookup");
initialize("com.cyc.cycjava.cycl.nlp_tests");
initialize("com.cyc.cycjava.cycl.mysentient_utilities");
initialize("com.cyc.cycjava.cycl.mysentient_preprocess_widgets");
initialize("com.cyc.cycjava.cycl.mysentient_user_profile_manager_widgets");
initialize("com.cyc.cycjava.cycl.mysentient_user_experience_manager_widgets");
initialize("com.cyc.cycjava.cycl.mysentient_deductive_qa_widgets");
initialize("com.cyc.cycjava.cycl.mysentient_clarification_manager_widgets");
initialize("com.cyc.cycjava.cycl.mysentient_user_profile_dumper");
initialize("com.cyc.cycjava.cycl.mysentient_concept_extractor");
initialize("com.cyc.cycjava.cycl.mysentient_lexification_utilities");
}
initialize("com.cyc.cycjava.cycl.sksi.sksi_widgets.nimd_parser");
initialize("com.cyc.cycjava.cycl.quirk.scenario");
initialize("com.cyc.cycjava.cycl.cb_halo");
initialize("com.cyc.cycjava.cycl.halo_inference_paraphrase");
initialize("com.cyc.cycjava.cycl.halo_qa_interface");
initialize("com.cyc.cycjava.cycl.sg_search");
initialize("com.cyc.cycjava.cycl.sg_utilities");
initialize("com.cyc.cycjava.cycl.sg_modules");
initialize("com.cyc.cycjava.cycl.sg_abduction");
initialize("com.cyc.cycjava.cycl.sg_term_rank");
initialize("com.cyc.cycjava.cycl.sg_removal_modules");
initialize("com.cyc.cycjava.cycl.sg_browser");
initialize("com.cyc.cycjava.cycl.hypothesis_corroboration");
initialize("com.cyc.cycjava.cycl.sg_tracer");
initialize("com.cyc.cycjava.cycl.butler.suggestions_review_tool");
initialize("com.cyc.cycjava.cycl.predicate_suggestor");
initialize("com.cyc.cycjava.cycl.mt_suggestor");
initialize("com.cyc.cycjava.cycl.butler.example_finder");
initialize("com.cyc.cycjava.cycl.butler.internal_rule_reviewer_utilities");
initialize("com.cyc.cycjava.cycl.butler.external_rule_reviewer_utilities");
initialize("com.cyc.cycjava.cycl.butler.foil_export");
initialize("com.cyc.cycjava.cycl.butler.alchemy_export");
initialize("com.cyc.cycjava.cycl.butler.web_game");
initialize("com.cyc.cycjava.cycl.butler.cb_quick_question");
initialize("com.cyc.cycjava.cycl.butler.butler_inference_store");
initialize("com.cyc.cycjava.cycl.butler.ilp_learning");
initialize("com.cyc.cycjava.cycl.inference.dmiles.modus_tollens_removal");
initialize("com.cyc.cycjava.cycl.inference.dmiles.swi_prolog_link");
initialize("com.cyc.cycjava.cycl.properties");
initialize("com.cyc.cycjava.cycl.typicality_reference_set");
initialize("com.cyc.cycjava.cycl.story_constructor");
initialize("com.cyc.cycjava.cycl.cb_story_constructor");
initialize("com.cyc.cycjava.cycl.acip");
initialize("com.cyc.cycjava.cycl.project.nsf_nwu_kdd.nsf_nwu_kdd_stt_integration");
initialize("com.cyc.cycjava.cycl.project.nsf_nwu_kdd.blackbook_integration");
initialize("com.cyc.cycjava.cycl.project.nsf_nwu_kdd.stt_rrv_model_editor");
initialize("com.cyc.cycjava.cycl.webcache");
initialize("com.cyc.cycjava.cycl.inference.modules.removal.removal_modules_kmf");
initialize("com.cyc.cycjava.cycl.kbi_utilities");
initialize("com.cyc.cycjava.cycl.kbi_mt");
initialize("com.cyc.cycjava.cycl.kbi_cnf");
initialize("com.cyc.cycjava.cycl.kbi_fort");
initialize("com.cyc.cycjava.cycl.kbi_collection");
initialize("com.cyc.cycjava.cycl.kbi_relation");
initialize("com.cyc.cycjava.cycl.kbi_axiom");
initialize("com.cyc.cycjava.cycl.kbi_predicate");
initialize("com.cyc.cycjava.cycl.kbi_assertion");
initialize("com.cyc.cycjava.cycl.kbi_nat");
initialize("com.cyc.cycjava.cycl.kbi_word");
initialize("com.cyc.cycjava.cycl.kbi_function");
initialize("com.cyc.cycjava.cycl.kbi_skolem");
initialize("com.cyc.cycjava.cycl.recanonicalizer");
initialize("com.cyc.cycjava.cycl.wff_consequences");
initialize("com.cyc.cycjava.cycl.benchmarks");
initialize("com.cyc.cycjava.cycl.my_utilities");
initialize("com.cyc.cycjava.cycl.rename_utilities");
initialize("com.cyc.cycjava.cycl.xref_database");
if (true) {
initialize("com.cyc.cycjava.cycl.secure_translation");
initialize("com.cyc.cycjava.cycl.form_translation");
initialize("com.cyc.cycjava.cycl.file_translation");
initialize("com.cyc.cycjava.cycl.system_translation");
initialize("com.cyc.cycjava.cycl.common_optimization");
initialize("com.cyc.cycjava.cycl.c_name_translation");
initialize("com.cyc.cycjava.cycl.c_backend");
initialize("com.cyc.cycjava.cycl.optimized_funcall_declarations");
initialize("com.cyc.cycjava.cycl.java_name_translation");
initialize("com.cyc.cycjava.cycl.java_backend");
initialize("com.cyc.cycjava.cycl.translator_utilities");
initialize("com.cyc.cycjava.cycl.cb_translation_browser");
}
if (false)
{
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cycsecure_system_parameters");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.infrastructure_macros");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.infrastructure_vars");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.infrastructure_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cycsecure_file_hash_table_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.info_lookup_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_data_vars");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_data_macros");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_data_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_data_definitions");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_model");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_removal_module_macros");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_removal_module_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_removal_module_definitions");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.rsa");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cycsecure_after_addings");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cycsecure_guid_map");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.interface_vars");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.cs_html_vars");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.cs_html_macros");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.interface_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.cs_html_utilities");
initialize("com.cyc.cycjava.cycl.cycsecure.infrastructure.cs_adapters_nl");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.cs_data_ui");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.cs_policy_compliance_tool");
initialize("com.cyc.cycjava.cycl.cycsecure.package_interface.cs_html_policy_editor");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.browser");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.stats_page");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.network_view_tool");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.query_tool.cs_query_tool");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.planner_classes");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.plan_tasks");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.attack_goals");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.cs_defense_planner");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.plan_analysis");
initialize("com.cyc.cycjava.cycl.cycsecure.knowledge_discovery.planner.planner");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_configuration_tool");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_import_helpers");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_importer");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.sentinel_communication");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.initial_scan");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.complete_scan");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.scanner_tool");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.scan_scheduler");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.network_communication.network_scan.vulnerability_analyzer");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.model_management.model_manager");
initialize("com.cyc.cycjava.cycl.cycsecure.network_representation.model_management.model_editor");
}
return SubLNil.NIL;
}
}
|
L1126/ProjectLite2 | app/src/main/java/com/projectlite2/android/app/MyApplication.java | package com.projectlite2.android.app;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
import androidx.annotation.IdRes;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import com.projectlite2.android.BuildConfig;
import com.projectlite2.android.CustomUserProvider;
<<<<<<< HEAD
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import cn.jpush.android.api.JPushInterface;
=======
>>>>>>> 2b65d275b8abc085741fbf892a09bc5366e41c3d
import cn.leancloud.AVLogger;
import cn.leancloud.AVOSCloud;
import cn.leancloud.chatkit.LCChatKit;
import cn.leancloud.push.PushService;
import es.dmoral.toasty.Toasty;
import static androidx.navigation.Navigation.findNavController;
public class MyApplication extends Application {
@SuppressLint("StaticFieldLeak")
private static Context mContext;
@SuppressLint("StaticFieldLeak")
private static NavController navController;
//相册请求码
public static final int ALBUM_REQUEST_CODE = 1;
//相机请求码
public static final int CAMERA_REQUEST_CODE = 2;
//剪裁请求码
public static final int CROP_SMALL_PICTURE = 3;
//相机拍摄图像uri
public static Uri contentUri = null;
// ************ 国际版 *************
// private String _appId = "<KEY>";
// private String _appKey = "<KEY>";
// private String _serverUrl = "xCPMuwMt.api.lncldglobal.com";
// *****************************
// ************ 华北版 *************
private String _appId = "<KEY>";
private String _appKey = "<KEY>";
private String _serverUrl = "https://w1vgf0c7.lc-cn-n1-shared.com";
// *****************************
public static String MY_INSTALLATION_ID = "";
@Override
public void onCreate() {
super.onCreate();
//获取context
mContext = getApplicationContext();
// 在 AVOSCloud.initialize() 之前调用
AVOSCloud.setLogLevel(AVLogger.Level.DEBUG);
AVOSCloud.initialize(this, _appId, _appKey, _serverUrl);
// 初始化ChatKit
LCChatKit.getInstance().setProfileProvider(CustomUserProvider.getInstance());
LCChatKit.getInstance().init(mContext, _appId, _appKey, _serverUrl);
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
// 订阅某个频道(channel)的消息,只要在保存 Installation 之前调用 PushService.subscribe 方法
// 回调对象指用户点击通知栏的通知进入的 Activity 页面
// 订阅频道,当该频道消息到来的时候,打开对应的 Activity
// 参数依次为:当前的 context、频道名称、回调对象的类
// PushService.subscribe(this, "public", PushDemo.class);
// PushService.subscribe(this, "private", Callback1.class);
// PushService.subscribe(this, "protected", Callback2.class);
// 退订
// PushService.unsubscribe(context, "protected");
// //退订之后需要重新保存 Installation
// AVInstallation.getCurrentInstallation().saveInBackground();
//创建新的channel
NotificationManager mNotiManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel("default", "default", NotificationManager.IMPORTANCE_MAX);
mNotiManager.createNotificationChannel(channel);
}
// 设置默认的channel
PushService.setDefaultChannelId(this, "default");
}
//获取全局Context的静态方法
public static Context getContext() {
return mContext;
}
//Toast工具方法-String
public static void showToast(String s) {
Toast.makeText(MyApplication.getContext(), s, Toast.LENGTH_SHORT).show();
}
//Toast工具方法-Int
public static void showToast(Integer i) {
Toast.makeText(MyApplication.getContext(), i, Toast.LENGTH_SHORT).show();
}
/**
* 显示 Toasty success 工具方法
*
* @param s 显示文字
*/
public static void ToastySuccess(String s) {
Toasty.success(MyApplication.getContext(), s, Toast.LENGTH_SHORT, true).show();
}
/**
* 显示 Toasty warning 工具方法
*
* @param s 显示文字
*/
public static void ToastyWarning(String s) {
Toasty.warning(MyApplication.getContext(), s, Toast.LENGTH_SHORT, true).show();
}
/**
* 显示 Toasty error 工具方法
*
* @param s 显示文字
*/
public static void ToastyError(String s) {
Toasty.error(MyApplication.getContext(), s, Toast.LENGTH_SHORT, true).show();
}
/**
* 显示 Toasty info 工具方法
*
* @param s 显示文字
*/
public static void ToastyInfo(String s) {
Toasty.info(MyApplication.getContext(), s, Toast.LENGTH_SHORT, true).show();
}
/**
* navigation跳转
*
* @param view
* @param resId
*/
public static void navJump(View view, @IdRes int resId) {
navController = findNavController(view);
navController.navigate(resId);
}
/**
* 传递参数的navigation跳转
*
* @param view
* @param resId
* @param bundle
*/
public static void navJump(View view, @IdRes int resId, @Nullable Bundle bundle) {
navController = findNavController(view);
navController.navigate(resId, bundle);
}
<<<<<<< HEAD
/**
* 通用判断是否为合法手机号
*
* @param telNum
* @return
*/
public static boolean isMobilePhoneNum(String telNum) {
String regex = "^1[3-9]\\d{9}$";
Pattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(telNum);
return m.matches();
}
=======
>>>>>>> 2b65d275b8abc085741fbf892a09bc5366e41c3d
/**
* 生成随机的12位id
*
* @return id号码
*/
public static String BuildRandomID() {
String val = "";
Random random = new Random();
//length为几位密码
for (int i = 0; i < 12; i++) {
String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num";
//输出字母还是数字
if ("char".equalsIgnoreCase(charOrNum)) {
//输出是大写字母还是小写字母
int temp = random.nextInt(2) % 2 == 0 ? 65 : 97;
val += (char) (random.nextInt(26) + temp);
} else if ("num".equalsIgnoreCase(charOrNum)) {
val += String.valueOf(random.nextInt(10));
}
}
return val;
}
/**
* 软键盘显示/隐藏
*/
public static void hideShowKeyboard(Context ctx) {
InputMethodManager imm = (InputMethodManager) ctx.getSystemService(Context.INPUT_METHOD_SERVICE); //得到InputMethodManager的实例
if (imm.isActive()) {//如果开启
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_NOT_ALWAYS);//关闭软键盘,开启方法相同,这个方法是切换开启与关闭状态的
}
}
/**
* 拍照
*/
public static void TakePicture(Activity activity){
try{
//用于保存调用相机拍照后所生成的文件
File mTempFile = new File(activity.getExternalCacheDir().getPath() + "/picture/", System.currentTimeMillis() + ".png");
if (!mTempFile.getParentFile().exists()) {
mTempFile.getParentFile().mkdirs();
}
//跳转到调用系统相机
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.setFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
Uri contentUri = FileProvider.getUriForFile(activity, BuildConfig.APPLICATION_ID + ".FileProvider", mTempFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, contentUri);
activity. startActivityForResult(intent, CAMERA_REQUEST_CODE);
}catch( SecurityException e){
e.printStackTrace();
}
}
public static void TakePicture(Activity activity, Fragment fg){
try{
//用于保存调用相机拍照后所生成的文件
File mTempFile = new File(activity.getExternalCacheDir().getPath() + "/picture/", System.currentTimeMillis() + ".png");
if (!mTempFile.getParentFile().exists()) {
mTempFile.getParentFile().mkdirs();
}
mTempFile.createNewFile();
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N){
contentUri=FileProvider.getUriForFile(activity, BuildConfig.APPLICATION_ID + ".FileProvider", mTempFile);
}else{
Uri.fromFile(mTempFile);
}
//跳转到调用系统相机
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.setFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.putExtra(MediaStore.EXTRA_OUTPUT, contentUri);
fg. startActivityForResult(intent, CAMERA_REQUEST_CODE);
}catch(SecurityException | IOException e){
e.printStackTrace();
}
}
/**
* 从相册获取图片
*/
public static void GetPicFromAlbm(Activity activity) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
photoPickerIntent.setType("image/*");
activity.startActivityForResult(photoPickerIntent, ALBUM_REQUEST_CODE);
}
public static void GetPicFromAlbm(Activity activity,Fragment fg) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
photoPickerIntent.setType("image/*");
fg.startActivityForResult(photoPickerIntent, ALBUM_REQUEST_CODE);
}
/**
* 保存图像到手机
* @param bitmap
*/
public static void saveImage(Activity activity,Bitmap bitmap) {
File filesDir;
if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){//判断sd卡是否挂载
//路径1:storage/sdcard/Android/data/包名/files
filesDir = activity.getExternalFilesDir("");
}else{//手机内部存储
//路径:data/data/包名/files
filesDir = activity.getFilesDir();
}
FileOutputStream fos = null;
try {
File file = new File(filesDir,"icon.png");
fos = new FileOutputStream(file);
bitmap.compress(Bitmap.CompressFormat.PNG, 100,fos);
} catch (FileNotFoundException e) {
e.printStackTrace();
}finally{
if(fos != null){
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* 保存图像到手机,并返回路径
* @param bitmap
* @return
*/
public static String saveImageReturnPath(Activity activity, Bitmap bitmap) {
File filesDir;
if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){//判断sd卡是否挂载
//路径1:storage/sdcard/Android/data/包名/files
filesDir = activity.getExternalFilesDir("");
}else{//手机内部存储
//路径:data/data/包名/files
filesDir = activity.getFilesDir();
}
FileOutputStream fos = null;
try {
File file = new File(filesDir,"icon.png");
fos = new FileOutputStream(file);
bitmap.compress(Bitmap.CompressFormat.PNG, 100,fos);
} catch (FileNotFoundException e) {
e.printStackTrace();
}finally{
if(fos != null){
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return filesDir.getAbsolutePath();
}
} |
tftp/ruby_basics | Lesson_1/z_02.rb | <reponame>tftp/ruby_basics<gh_stars>1-10
# Triangle area calculation program
print 'Введите значение основания треугольника: '
a = gets.chomp.to_f
print 'Введите значение высоты треугольника: '
h = gets.chomp.to_f
# Next, calculate the area of the triangle s
s = a * h / 2
puts "Площадь треугольника равна значению #{s}"
|
davidbhon/dpc-app | dpc-attribution/src/main/java/gov/cms/dpc/attribution/resources/v1/GroupResource.java | <reponame>davidbhon/dpc-app
package gov.cms.dpc.attribution.resources.v1;
import com.codahale.metrics.annotation.ExceptionMetered;
import com.codahale.metrics.annotation.Timed;
import gov.cms.dpc.attribution.DPCAttributionConfiguration;
import gov.cms.dpc.attribution.jdbi.PatientDAO;
import gov.cms.dpc.attribution.jdbi.ProviderDAO;
import gov.cms.dpc.attribution.jdbi.RelationshipDAO;
import gov.cms.dpc.attribution.jdbi.RosterDAO;
import gov.cms.dpc.attribution.resources.AbstractGroupResource;
import gov.cms.dpc.attribution.utils.RESTUtils;
import gov.cms.dpc.common.entities.AttributionRelationship;
import gov.cms.dpc.common.entities.PatientEntity;
import gov.cms.dpc.common.entities.ProviderEntity;
import gov.cms.dpc.common.entities.RosterEntity;
import gov.cms.dpc.fhir.DPCIdentifierSystem;
import gov.cms.dpc.fhir.FHIRExtractors;
import gov.cms.dpc.fhir.annotations.FHIR;
import gov.cms.dpc.fhir.annotations.FHIRParameter;
import gov.cms.dpc.fhir.converters.FHIREntityConverter;
import io.dropwizard.hibernate.UnitOfWork;
import org.apache.commons.lang3.tuple.Pair;
import org.hibernate.validator.constraints.NotEmpty;
import org.hl7.fhir.dstu3.model.Group;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.Patient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.validation.constraints.NotNull;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
public class GroupResource extends AbstractGroupResource {
private static final Logger logger = LoggerFactory.getLogger(GroupResource.class);
private static final WebApplicationException NOT_FOUND_EXCEPTION = new WebApplicationException("Cannot find Roster resource", Response.Status.NOT_FOUND);
private static final WebApplicationException TOO_MANY_MEMBERS_EXCEPTION = new WebApplicationException("Roster limit reached", Response.Status.BAD_REQUEST);
private final ProviderDAO providerDAO;
private final PatientDAO patientDAO;
private final RosterDAO rosterDAO;
private final RelationshipDAO relationshipDAO;
private final DPCAttributionConfiguration config;
private final FHIREntityConverter converter;
@Inject
GroupResource(FHIREntityConverter converter, ProviderDAO providerDAO, RosterDAO rosterDAO, PatientDAO patientDAO, RelationshipDAO relationshipDAO, DPCAttributionConfiguration config) {
this.rosterDAO = rosterDAO;
this.providerDAO = providerDAO;
this.patientDAO = patientDAO;
this.relationshipDAO = relationshipDAO;
this.config = config;
this.converter = converter;
}
@POST
@FHIR
@UnitOfWork
@Override
public Response createRoster(Group attributionRoster) {
if (rosterSizeTooBig(config.getPatientLimit(), attributionRoster)) {
throw TOO_MANY_MEMBERS_EXCEPTION;
}
final String providerNPI = FHIRExtractors.getAttributedNPI(attributionRoster);
// Check and see if a roster already exists for the provider
final UUID organizationID = UUID.fromString(FHIRExtractors.getOrganizationID(attributionRoster));
final List<RosterEntity> entities = this.rosterDAO.findEntities(null, organizationID, providerNPI, null);
if (!entities.isEmpty()) {
final RosterEntity rosterEntity = entities.get(0);
return Response.status(Response.Status.OK).entity(this.converter.toFHIR(Group.class, rosterEntity)).build();
}
final List<ProviderEntity> providers = this.providerDAO.getProviders(null, providerNPI, organizationID);
if (providers.isEmpty()) {
throw new WebApplicationException("Unable to find attributable provider", Response.Status.NOT_FOUND);
}
verifyMembers(attributionRoster, organizationID);
final RosterEntity rosterEntity = RosterEntity.fromFHIR(attributionRoster, providers.get(0), generateExpirationTime());
// Add the first provider
final RosterEntity persisted = this.rosterDAO.persistEntity(rosterEntity);
final Group persistedGroup = this.converter.toFHIR(Group.class, persisted);
return Response.status(Response.Status.CREATED).entity(persistedGroup).build();
}
@GET
@FHIR
@UnitOfWork
@Override
public List<Group> rosterSearch(@QueryParam(Group.SP_RES_ID) UUID rosterID,
@NotEmpty @QueryParam("_tag") String organizationToken,
@QueryParam(Group.SP_CHARACTERISTIC_VALUE) String providerNPI,
@QueryParam(Group.SP_MEMBER) String patientID) {
final String providerIDPart;
if (providerNPI != null) {
providerIDPart = parseCompositeID(providerNPI).getRight().getIdPart();
} else {
providerIDPart = null;
}
final UUID organizationID = RESTUtils.tokenTagToUUID(organizationToken);
return this.rosterDAO.findEntities(rosterID, organizationID, providerIDPart, patientID)
.stream()
.map(r -> this.converter.toFHIR(Group.class, r))
.collect(Collectors.toList());
}
@GET
@Path("/{rosterID}/$patients")
@FHIR
@UnitOfWork
@Override
public List<Patient> getAttributedPatients(@NotNull @PathParam("rosterID") UUID rosterID, @QueryParam(value = "active") boolean activeOnly) {
if (!this.rosterDAO.rosterExists(rosterID)) {
throw new WebApplicationException(NOT_FOUND_EXCEPTION, Response.Status.NOT_FOUND);
}
// We have to do this because Hibernate/Dropwizard gets confused when returning a single type (like String)
@SuppressWarnings("unchecked") final List<String> patientMBIs = this.patientDAO.fetchPatientMBIByRosterID(rosterID, activeOnly);
return patientMBIs
.stream()
.map(mbi -> {
// Generate a fake patient, with only the ID set
final Patient p = new Patient();
p.addIdentifier().setSystem(DPCIdentifierSystem.MBI.getSystem()).setValue(mbi);
return p;
})
.collect(Collectors.toList());
}
@PUT
@Path("/{rosterID}")
@FHIR
@UnitOfWork
@Override
public Group replaceRoster(@PathParam("rosterID") UUID rosterID, Group groupUpdate) {
if (!this.rosterDAO.rosterExists(rosterID)) {
throw new WebApplicationException(NOT_FOUND_EXCEPTION, Response.Status.NOT_FOUND);
}
if (rosterSizeTooBig(config.getPatientLimit(), groupUpdate)) {
throw TOO_MANY_MEMBERS_EXCEPTION;
}
final UUID organizationID = UUID.fromString(FHIRExtractors.getOrganizationID(groupUpdate));
verifyMembers(groupUpdate, organizationID);
final RosterEntity rosterEntity = new RosterEntity();
rosterEntity.setId(rosterID);
final OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
// Remove all roster relationships
this.relationshipDAO.removeRosterAttributions(rosterID);
groupUpdate
.getMember()
.stream()
.map(Group.GroupMemberComponent::getEntity)
.map(ref -> {
final PatientEntity pe = new PatientEntity();
pe.setID(UUID.fromString(new IdType(ref.getReference()).getIdPart()));
return pe;
})
.map(pe -> new AttributionRelationship(rosterEntity, pe))
.peek(relationship -> relationship.setPeriodEnd(generateExpirationTime()))
.peek(relationship -> relationship.setPeriodBegin(now))
.forEach(relationshipDAO::addAttributionRelationship);
final RosterEntity rosterEntity1 = rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
return converter.toFHIR(Group.class, rosterEntity1);
}
@POST
@Path("/{rosterID}/$add")
@FHIR
@UnitOfWork
@Override
public Group addRosterMembers(@PathParam("rosterID") UUID rosterID, @FHIRParameter Group groupUpdate) {
if (!this.rosterDAO.rosterExists(rosterID)) {
throw new WebApplicationException(NOT_FOUND_EXCEPTION, Response.Status.NOT_FOUND);
}
final RosterEntity rosterEntity = this.rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
if (rosterSizeTooBig(config.getPatientLimit(), converter.toFHIR(Group.class, rosterEntity), groupUpdate)) {
throw TOO_MANY_MEMBERS_EXCEPTION;
}
final UUID orgId = UUID.fromString(FHIRExtractors.getOrganizationID(groupUpdate));
final OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
// For each group member, check to see if the patient exists, if not, throw an exception
// Check to see if they're already rostered, if so, ignore
groupUpdate
.getMember()
.stream()
.map(Group.GroupMemberComponent::getEntity)
// Check to see if patient exists, if not, throw an exception
.map(entity -> {
final UUID patientID = UUID.fromString(new IdType(entity.getReference()).getIdPart());
List<PatientEntity> patientEntities = this.patientDAO.patientSearch(patientID, null, orgId);
if (patientEntities == null || patientEntities.isEmpty()) {
throw new WebApplicationException(String.format("Cannot find patient with ID %s", patientID.toString()), Response.Status.BAD_REQUEST);
}
return patientEntities.get(0);
})
.map(patient -> {
// Check to see if the attribution already exists, if so, re-extend the expiration time
final AttributionRelationship relationship = this.relationshipDAO.lookupAttributionRelationship(rosterID, patient.getID())
.orElse(new AttributionRelationship(rosterEntity, patient, now));
// If the relationship is inactive, then we need to update the period begin for the new membership span
if (relationship.isInactive()) {
relationship.setPeriodBegin(now);
}
relationship.setInactive(false);
relationship.setPeriodEnd(generateExpirationTime());
return relationship;
})
.forEach(this.relationshipDAO::addAttributionRelationship);
//Getting it again to access the latest updates from above code
final RosterEntity rosterEntity1 = this.rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
return converter.toFHIR(Group.class, rosterEntity1);
}
@POST
@Path("/{rosterID}/$remove")
@FHIR
@UnitOfWork
@Override
public Group removeRosterMembers(@PathParam("rosterID") UUID rosterID, @FHIRParameter Group groupUpdate) {
if (!this.rosterDAO.rosterExists(rosterID)) {
throw new WebApplicationException(NOT_FOUND_EXCEPTION, Response.Status.NOT_FOUND);
}
groupUpdate
.getMember()
.stream()
.map(Group.GroupMemberComponent::getEntity)
.map(entity -> {
final PatientEntity patientEntity = new PatientEntity();
final UUID patientID = UUID.fromString(new IdType(entity.getReference()).getIdPart());
patientEntity.setID(patientID);
return this.relationshipDAO.lookupAttributionRelationship(rosterID, patientID);
})
.map(rOptional -> rOptional.orElseThrow(() -> new WebApplicationException("Cannot find attribution relationship.", Response.Status.BAD_REQUEST)))
.peek(relationship -> {
relationship.setInactive(true);
relationship.setPeriodEnd(OffsetDateTime.now(ZoneOffset.UTC));
})
.forEach(this.relationshipDAO::updateAttributionRelationship);
final RosterEntity rosterEntity = this.rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
return this.converter.toFHIR(Group.class, rosterEntity);
}
@DELETE
@Path("/{rosterID}")
@FHIR
@UnitOfWork
@Override
public Response deleteRoster(@PathParam("rosterID") UUID rosterID) {
final RosterEntity rosterEntity = this.rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
this.rosterDAO.delete(rosterEntity);
return Response.ok().build();
}
@Path("/{rosterID}")
@GET
@UnitOfWork
@Timed
@ExceptionMetered
@Override
public Group getRoster(
@PathParam("rosterID") UUID rosterID) {
logger.debug("API request to retrieve attributed patients for {}", rosterID);
final RosterEntity rosterEntity = this.rosterDAO.getEntity(rosterID)
.orElseThrow(() -> NOT_FOUND_EXCEPTION);
return converter.toFHIR(Group.class, rosterEntity);
}
private OffsetDateTime generateExpirationTime() {
return OffsetDateTime.now(ZoneOffset.UTC).plus(config.getExpirationThreshold());
}
private static Pair<IdType, IdType> parseCompositeID(String queryParam) {
final String[] split = queryParam.split("\\$", -1);
if (split.length != 2) {
throw new IllegalArgumentException("Cannot parse query param: " + queryParam);
}
// Left tag
final Pair<String, String> leftPair = FHIRExtractors.parseTag(split[0]);
final IdType leftID = new IdType(leftPair.getLeft(), leftPair.getRight());
// Right tag
final Pair<String, String> rightPair = FHIRExtractors.parseTag(split[1]);
final IdType rightID = new IdType(rightPair.getLeft(), rightPair.getRight());
return Pair.of(leftID, rightID);
}
private void verifyMembers(Group group, UUID orgId) {
for (Group.GroupMemberComponent member : group.getMember()) {
final UUID patientID = UUID.fromString(new IdType(member.getEntity().getReference()).getIdPart());
List<PatientEntity> patientEntities = patientDAO.patientSearch(patientID, null, orgId);
if (patientEntities.isEmpty()) {
throw new WebApplicationException(String.format("Cannot find patient with ID %s", patientID.toString()), Response.Status.BAD_REQUEST);
}
}
}
}
|
marcosjbarroso82/erp_web_client | ng-admin-jwt-auth/js/logoutController.js | <reponame>marcosjbarroso82/erp_web_client
var logoutController = function($scope, ngAdminJWTAuthService, $location) {
ngAdminJWTAuthService.logout();
$location.path('/login');
};
logoutController.$inject = ['$scope', 'ngAdminJWTAuthService', '$location'];
module.exports = logoutController; |
tarof429/recmd-dmn | dmn/logs_file.go | package dmn
import (
"log"
"os"
"path/filepath"
)
const (
// The log file
logsFile = "recmd_dmn.log"
)
// LogFile represents the log file
type LogFile struct {
Path string
Log *log.Logger
}
// Set sets the path to the log file
func (l *LogFile) Set(path string) {
l.Path = filepath.Join(path, logsFile)
}
// Create creates the log file
func (l *LogFile) Create() {
f, err := os.Create(l.Path)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
l.Log = log.New(f, "", log.LstdFlags|log.Lshortfile)
}
|
kingsmiler/nosql-playground | redis/src/test/java/org/xman/nosql/RedisSortedSetTest.java | <filename>redis/src/test/java/org/xman/nosql/RedisSortedSetTest.java<gh_stars>0
package org.xman.nosql;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import redis.clients.jedis.Jedis;
import java.util.HashMap;
public class RedisSortedSetTest {
private static Jedis jedis;
@BeforeClass
public static void init() {
jedis = RedisUtil.getRedisClient();
jedis.select(8);
jedis.flushDB();
}
@Test
public void testSaddOneByOne() {
jedis.flushDB();
String key ="memory";
jedis.zadd(key, 1, "1m");
jedis.zadd(key, 64, "64m");
jedis.zadd(key, 512, "512m");
Assert.assertEquals(3, jedis.zcard(key), 0);
Assert.assertEquals(1, jedis.zcount(key, 8, 128), 0);
Assert.assertEquals(2, jedis.zcount(key, 1, 128), 0);
}
@Test
public void testSaddBatch() {
jedis.flushDB();
String key ="memory";
HashMap<String, Double> items = new HashMap<>();
items.put("1m", 1D);
items.put("64m", 64D);
items.put("512m", 512D);
jedis.zadd(key, items);
Assert.assertEquals(3, jedis.zcard(key), 0);
Assert.assertEquals(2, jedis.zcount(key, 1, 128), 0);
Assert.assertEquals(1, jedis.zcount(key, 8, 128), 0);
}
}
|
itfvck/wechat-framework | wechat-api/src/main/java/com/itfvck/wechatframework/api/coupon/location/model/LocationInfo.java | package com.itfvck.wechatframework.api.coupon.location.model;
import com.itfvck.wechatframework.core.common.BaseData;
public class LocationInfo extends BaseData {
private static final long serialVersionUID = -8121179304482906888L;
// 图片地址
private String filePathName;
public String getFilePathName() {
return filePathName;
}
public void setFilePathName(String filePathName) {
this.filePathName = filePathName;
}
}
|
infamous55/school-api | server.js | <gh_stars>0
const express = require('express');
const morgan = require('morgan');
const cors = require('cors');
const helmet = require('helmet');
const rateLimit = require('express-rate-limit');
const app = express();
require('dotenv').config();
app.use(
express.urlencoded({
extended: true,
})
);
app.use(express.json());
if (process.env.NODE_ENV === 'development') app.use(morgan('dev'));
else app.use(morgan('combined'));
app.use(cors());
app.use(helmet());
const apiLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100,
standardHeaders: true,
legacyHeaders: false,
});
app.use('/api/v1', apiLimiter, require('./src/routes'));
const PORT = 5000 || process.env.PORT;
app.listen(PORT, () => {
console.log(`App listening on port ${PORT}`);
});
|
diododias/flask-boilerplate | src/application_business/interfaces/filter_user_by_email_usecase.py | from abc import ABCMeta, abstractmethod
class IFilterUserByEmailUseCase(metaclass=ABCMeta):
@abstractmethod
def execute(self, email: str):
raise NotImplementedError
|
onkwon/yaos | arch/armv7-m/lock.c | <filename>arch/armv7-m/lock.c
/*
* "[...] Sincerity (comprising truth-to-experience, honesty towards the self,
* and the capacity for human empathy and compassion) is a quality which
* resides within the laguage of literature. It isn't a fact or an intention
* behind the work [...]"
*
* - An introduction to Literary and Cultural Theory, <NAME>
*
*
* o8o
* `"'
* oooo ooo .oooo. .ooooo. .oooo.o oooo .ooooo.
* `88. .8' `P )88b d88' `88b d88( "8 `888 d88' `88b
* `88..8' .oP"888 888 888 `"Y88b. 888 888 888
* `888' d8( 888 888 888 o. )88b .o. 888 888 888
* .8' `Y888""8o `Y8bod8P' 8""888P' Y8P o888o `Y8bod8P'
* .o..P'
* `Y8P' <NAME> <<EMAIL>>
*
* Welcome aboard!
*/
#include <kernel/lock.h>
#include <error.h>
#if 0
int __attribute__((naked, noinline, leaf)) __ldrex(void *addr)
{
__asm__ __volatile__(
"ldrex r0, [r0] \n\t"
"bx lr \n\t"
::: "cc", "memory");
}
int __attribute__((naked, noinline, leaf)) __strex(int val, void *addr)
{
__asm__ __volatile__(
"strex r0, r0, [r1] \n\t"
"bx lr \n\t"
::: "cc", "memory");
}
#endif
void __attribute__((naked, noinline)) __semaphore_dec(struct semaphore *sem, int ms)
{
__asm__ __volatile__(
"push {r8, lr} \n\t"
"mov r8, r0 \n\t"
"1:" "ldrex r2, [r8] \n\t"
"cmp r2, #0 \n\t"
"bgt 2f \n\t"
"add r0, r8, #4 \n\t"
"bl sleep_in_waitqueue \n\t"
"b 1b \n\t"
"2:" "sub r2, #1 \n\t"
"strex r0, r2, [r8] \n\t"
"cmp r0, #0 \n\t"
"bne 1b \n\t"
"dmb \n\t"
"pop {r8, pc} \n\t"
::: "r0", "r1", "r2", "r8", "lr", "cc", "memory");
(void)sem;
(void)ms;
}
int __attribute__((naked, noinline)) __semaphore_dec_wait(struct semaphore *sem, int ms)
{
__asm__ __volatile__(
"push {r8, lr} \n\t"
"mov r8, r0 \n\t"
"1:" "ldrex r2, [r8] \n\t"
"cmp r2, #0 \n\t"
"bgt 2f \n\t"
"add r0, r8, #4 \n\t"
"bl sleep_in_waitqueue \n\t"
"cmp r0, %0 \n\t"
"beq 3f \n\t"
"b 1b \n\t"
"2:" "sub r2, #1 \n\t"
"strex r0, r2, [r8] \n\t"
"cmp r0, #0 \n\t"
"bne 1b \n\t"
"3:" "dmb \n\t"
"pop {r8, pc} \n\t"
:: "L"(-ETIME)
: "r0", "r1", "r2", "r8", "lr", "cc", "memory");
(void)sem;
(void)ms;
}
void __attribute__((naked, noinline)) __semaphore_inc(struct semaphore *sem)
{
__asm__ __volatile__(
"push {r8, lr} \n\t"
"mov r8, r0 \n\t"
"1:" "ldrex r2, [r8] \n\t"
"add r2, #1 \n\t"
"strex r0, r2, [r8] \n\t"
"cmp r0, #0 \n\t"
"bne 1b \n\t"
"dmb \n\t"
"cmp r2, #0 \n\t"
"itt gt \n\t"
"addgt r0, r8, #4 \n\t"
"blgt shake_waitqueue_out \n\t"
"pop {r8, pc} \n\t"
::: "r0", "r2", "r8", "lr", "cc", "memory");
(void)sem;
}
void __attribute__((naked, noinline)) __lock_atomic(lock_t *counter)
{
__asm__ __volatile__(
"mov r1, r0 \n\t"
"1:" "ldrex r2, [r1] \n\t"
"cmp r2, #0 \n\t"
"ble 1b \n\t"
"sub r2, #1 \n\t"
"strex r0, r2, [r1] \n\t"
"cmp r0, #0 \n\t"
"bne 1b \n\t"
"dmb \n\t"
"bx lr \n\t"
::: "r0", "r1", "r2", "cc", "memory");
(void)counter;
}
void __attribute__((naked, noinline)) __unlock_atomic(lock_t *counter)
{
__asm__ __volatile__(
"mov r1, r0 \n\t"
"1:" "ldrex r2, [r1] \n\t"
"add r2, #1 \n\t"
"strex r0, r2, [r1] \n\t"
"cmp r0, #0 \n\t"
"bne 1b \n\t"
"dmb \n\t"
"bx lr \n\t"
::: "r0", "r1", "r2", "cc", "memory");
(void)counter;
}
|
06needhamt/intellij-community | plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/configurers/MavenModuleConfigurer.java | <filename>plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/configurers/MavenModuleConfigurer.java<gh_stars>0
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* 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.jetbrains.idea.maven.importing.configurers;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.maven.project.MavenProject;
import java.util.ArrayList;
import java.util.List;
/**
* @author <NAME>
*/
public abstract class MavenModuleConfigurer {
private static volatile List<MavenModuleConfigurer> ourConfigurersList;
public abstract void configure(@NotNull MavenProject mavenProject, @NotNull Project project, @NotNull Module module);
public static List<MavenModuleConfigurer> getConfigurers() {
List<MavenModuleConfigurer> configurers = ourConfigurersList;
if (configurers == null) {
configurers = new ArrayList<>();
for (MavenModuleConfigurer configurer : new MavenModuleConfigurer[]{
new MavenCompilerConfigurer(),
new MavenEncodingConfigurer(),
new MavenAnnotationProcessorConfigurer(),
new MavenIdeaPluginConfigurer(),
new MavenWslTargetConfigurer()
}) {
if (!Boolean.parseBoolean(System.getProperty("idea.maven.disable." + configurer.getClass().getSimpleName()))) {
configurers.add(configurer);
}
}
ourConfigurersList = configurers;
}
return configurers;
}
}
|
ftomassetti/turin-programming-language | bytecode-generation/src/main/java/me/tomassetti/bytecode_generation/logicalop/LogicalNotBS.java | package me.tomassetti.bytecode_generation.logicalop;
import me.tomassetti.bytecode_generation.BytecodeSequence;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
public class LogicalNotBS extends BytecodeSequence {
private BytecodeSequence valueToNegate;
public LogicalNotBS(BytecodeSequence valueToNegate) {
this.valueToNegate = valueToNegate;
}
public LogicalNotBS() {
this.valueToNegate = null;
}
@Override
public void operate(MethodVisitor mv) {
if (valueToNegate != null) {
valueToNegate.operate(mv);
}
// it is very weird that there is not a single instruction for this...
Label l0 = new Label();
mv.visitJumpInsn(Opcodes.IFNE, l0);
mv.visitInsn(Opcodes.ICONST_1);
Label l1 = new Label();
mv.visitJumpInsn(Opcodes.GOTO, l1);
mv.visitLabel(l0);
mv.visitInsn(Opcodes.ICONST_0);
mv.visitLabel(l1);
}
}
|
susannahsoon/oldperth | nyc/find-bad-boroughs.py | #!/usr/bin/python
"""Identify geocodes which wind up in the wrong borough for debugging."""
import json
import sys
import boroughs
import re
records = json.load(file(sys.argv[1]))
boros_re = '(New York|Manhattan|Brooklyn|Bronx|Queens|Staten Island), (?:NY|N\.Y\.)$'
for rec in records:
if 'extracted' not in rec: continue
e = rec['extracted']
if 'latlon' not in e: continue
if 'located_str' not in e: continue
m = re.search(boros_re, e['located_str'])
lat, lon = e['latlon']
location_boro = m.group(1)
if location_boro == 'New York':
location_boro = 'Manhattan'
geocode_boro = boroughs.PointToBorough(lat, lon)
if location_boro != geocode_boro:
print 'Found %s expected %s : %s' % (geocode_boro, location_boro, rec)
|
oldmud0/Disparity-RHE | src/disparity/rpg/items/Armor.java | <reponame>oldmud0/Disparity-RHE
package disparity.rpg.items;
import disparity.rpg.being.Being;
public class Armor extends Equippable{
/**
* Constructor for Armor object subclasses,
* All instances of Armor should use this constructor
* #natzi
*/
protected Armor(String name, Quality quality, int baseArmorVal){
this.bonus = quality.getValue() + baseArmorVal;
this.name = quality.getName() + " " + name;
this.quality = quality;
}
/**
* Empty Constructor for reading
* Beings from JSON files
*/
public Armor(){
}
/**
* TODO implement
* skills that can be applied
* to Items
*/
public void applySkill(){
}
/**
* Applies Skill bonus of Being to
* Weapon, so that Being can have an
* updated AC stat
*/
public void applyBonus(Being being){
switch(this.quality.getType()){
case HEAVY:
this.bonus += being.getHeavyArmorBonus();
break;
case LIGHT:
this.bonus += being.getLightArmorBonus();
break;
case MEDIUM:
//TODO implement MEDIUM armor
break;
}
}
@Override
public String toString(){
return this.name;
}
/**
* Miscellaneous GETTERS/SETTERS
*/
public double getBonus(){
return this.bonus;
}
public void setBonus(int bonus){
this.bonus = bonus;
}
}
|
Malamut54/dbobrov | chapter_007/src/main/java/ru/job4j/jmm/RaceCondition.java | <filename>chapter_007/src/main/java/ru/job4j/jmm/RaceCondition.java
package ru.job4j.jmm;
/**
* Demonstrate Race Condition.
*
* @author <NAME> (<EMAIL>)
* @since 17.10.2017
*/
public class RaceCondition {
/**
* Shared variable.
*/
private int val = 0;
/**
* Create two Threads.
*/
void run() {
//Check parity
new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
if (val % 2 == 0) {
System.out.println("Even = " + val);
}
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();
//Increment value
new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
val++;
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();
}
}
/**
* Demo class.
*/
class RaceConditionDemo {
/**
* Main method.
* @param args input args
*/
public static void main(String[] args) {
RaceCondition raceCondition = new RaceCondition();
raceCondition.run();
}
} |
GaloisInc/hacrypto | src/C/Security-57031.40.6/Security/sec/Security/Regressions/secitem/si-67-sectrust-blacklist/login.yahoo.com.2.cer.h | <filename>src/C/Security-57031.40.6/Security/sec/Security/Regressions/secitem/si-67-sectrust-blacklist/login.yahoo.com.2.cer.h<gh_stars>10-100
unsigned char login_yahoo_com_2_cer[] = {
0x30, 0x82, 0x05, 0xd9, 0x30, 0x82, 0x04, 0xc1, 0xa0, 0x03, 0x02, 0x01,
0x02, 0x02, 0x10, 0x3e, 0x75, 0xce, 0xd4, 0x6b, 0x69, 0x30, 0x21, 0x21,
0x88, 0x30, 0xae, 0x86, 0xa8, 0x2a, 0x71, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x81,
0x97, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
0x02, 0x55, 0x54, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x07,
0x13, 0x0e, 0x53, 0x61, 0x6c, 0x74, 0x20, 0x4c, 0x61, 0x6b, 0x65, 0x20,
0x43, 0x69, 0x74, 0x79, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04,
0x0a, 0x13, 0x15, 0x54, 0x68, 0x65, 0x20, 0x55, 0x53, 0x45, 0x52, 0x54,
0x52, 0x55, 0x53, 0x54, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x18, 0x68,
0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x75, 0x73,
0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x31,
0x1f, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x16, 0x55, 0x54,
0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69, 0x72, 0x73, 0x74, 0x2d,
0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x30, 0x1e, 0x17, 0x0d,
0x31, 0x31, 0x30, 0x33, 0x31, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x5a, 0x17, 0x0d, 0x31, 0x34, 0x30, 0x33, 0x31, 0x34, 0x32, 0x33, 0x35,
0x39, 0x35, 0x39, 0x5a, 0x30, 0x81, 0xdf, 0x31, 0x0b, 0x30, 0x09, 0x06,
0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0e, 0x30, 0x0c,
0x06, 0x03, 0x55, 0x04, 0x11, 0x13, 0x05, 0x33, 0x38, 0x34, 0x37, 0x37,
0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x07, 0x46,
0x6c, 0x6f, 0x72, 0x69, 0x64, 0x61, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03,
0x55, 0x04, 0x07, 0x13, 0x07, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68,
0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x09, 0x13, 0x0e, 0x53,
0x65, 0x61, 0x20, 0x56, 0x69, 0x6c, 0x6c, 0x61, 0x67, 0x65, 0x20, 0x31,
0x30, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0b,
0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x4c, 0x74, 0x64, 0x2e, 0x31,
0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0a, 0x54, 0x65,
0x63, 0x68, 0x20, 0x44, 0x65, 0x70, 0x74, 0x2e, 0x31, 0x28, 0x30, 0x26,
0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x1f, 0x48, 0x6f, 0x73, 0x74, 0x65,
0x64, 0x20, 0x62, 0x79, 0x20, 0x47, 0x54, 0x49, 0x20, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13,
0x0b, 0x50, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x75, 0x6d, 0x53, 0x53, 0x4c,
0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0f, 0x6c,
0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63,
0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01,
0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xa1,
0xa4, 0x05, 0x3d, 0xed, 0x85, 0x45, 0x93, 0x8a, 0x18, 0x4d, 0xc6, 0x03,
0x00, 0x57, 0xe2, 0x40, 0x77, 0xf0, 0x1c, 0xeb, 0xd0, 0x19, 0xdf, 0x22,
0x5d, 0x08, 0x7f, 0xd1, 0x07, 0x3c, 0x41, 0x89, 0x46, 0x17, 0xa3, 0x09,
0xfa, 0xfc, 0xf8, 0xa9, 0x04, 0xd1, 0x96, 0x8f, 0xab, 0xd7, 0x4f, 0x3c,
0xf9, 0xad, 0x18, 0xa9, 0x74, 0x81, 0xc4, 0x57, 0x0a, 0x3a, 0x26, 0x16,
0xce, 0x62, 0x3e, 0xbc, 0x3f, 0x6c, 0x21, 0xee, 0x93, 0x8d, 0xcb, 0x0d,
0xa0, 0x1f, 0x9a, 0x96, 0xd0, 0x8f, 0xad, 0xf5, 0x93, 0x93, 0x82, 0xee,
0x72, 0x0c, 0xa1, 0x75, 0x15, 0xa3, 0x7b, 0x84, 0x56, 0xb8, 0xad, 0xff,
0x52, 0x11, 0x71, 0x84, 0xbc, 0x3a, 0x30, 0x0b, 0x7e, 0x98, 0xa8, 0xe1,
0xa8, 0x3f, 0x37, 0x52, 0xd0, 0xf1, 0x7c, 0x6f, 0x90, 0xd8, 0x45, 0x0a,
0xac, 0x39, 0x72, 0x6a, 0x61, 0xd5, 0xbb, 0xc3, 0x8c, 0xf9, 0xc2, 0xcc,
0xdf, 0xfd, 0x3a, 0x71, 0xb9, 0xaf, 0xbc, 0xdc, 0x3a, 0xdc, 0x0c, 0xb6,
0xb1, 0xd2, 0xd1, 0x89, 0xbb, 0x41, 0xb6, 0xf2, 0xde, 0x57, 0xd5, 0x15,
0xdf, 0xfc, 0xfd, 0xe2, 0x31, 0xc5, 0xdf, 0xca, 0xc1, 0xd8, 0x8f, 0x2c,
0xbf, 0xf0, 0x0e, 0x5b, 0x71, 0xe0, 0x34, 0x71, 0xc3, 0xc5, 0x4d, 0x7d,
0x7a, 0xd4, 0xfa, 0xed, 0x30, 0x4b, 0x2f, 0xea, 0xb6, 0x2e, 0x9e, 0x93,
0x3c, 0xe2, 0x3a, 0xf8, 0x42, 0xa2, 0x1a, 0xee, 0xdc, 0xdf, 0xcd, 0x0f,
0xa9, 0xf6, 0x79, 0x84, 0x1a, 0x8e, 0x6c, 0x02, 0xb6, 0x86, 0xe5, 0xbf,
0x51, 0x6a, 0x66, 0xf8, 0xf3, 0x9c, 0xd3, 0x59, 0x0c, 0x7b, 0xa5, 0x99,
0x78, 0xcd, 0x7c, 0x99, 0xfa, 0xc6, 0x96, 0x47, 0xd8, 0x32, 0xd4, 0x74,
0x76, 0x0e, 0x77, 0x4b, 0x20, 0x74, 0xa4, 0xb7, 0x89, 0x75, 0x92, 0x4a,
0xb4, 0x5b, 0x55, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x82, 0x01, 0xd5,
0x30, 0x82, 0x01, 0xd1, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04,
0x18, 0x30, 0x16, 0x80, 0x14, 0xa1, 0x72, 0x5f, 0x26, 0x1b, 0x28, 0x98,
0x43, 0x95, 0x5d, 0x07, 0x37, 0xd5, 0x85, 0x96, 0x9d, 0x4b, 0xd2, 0xc3,
0x45, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14,
0x86, 0x49, 0x45, 0xfc, 0x33, 0x19, 0x33, 0xd4, 0x04, 0xed, 0x27, 0x61,
0xee, 0xe8, 0x01, 0xc9, 0x0c, 0x7f, 0x2f, 0x7e, 0x30, 0x0e, 0x06, 0x03,
0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0,
0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02,
0x30, 0x00, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30,
0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06,
0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x30, 0x46, 0x06,
0x03, 0x55, 0x1d, 0x20, 0x04, 0x3f, 0x30, 0x3d, 0x30, 0x3b, 0x06, 0x0c,
0x2b, 0x06, 0x01, 0x04, 0x01, 0xb2, 0x31, 0x01, 0x02, 0x01, 0x03, 0x04,
0x30, 0x2b, 0x30, 0x29, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
0x02, 0x01, 0x16, 0x1d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64,
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x50, 0x53, 0x30, 0x7b, 0x06,
0x03, 0x55, 0x1d, 0x1f, 0x04, 0x74, 0x30, 0x72, 0x30, 0x38, 0xa0, 0x36,
0xa0, 0x34, 0x86, 0x32, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63,
0x72, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64, 0x6f, 0x63, 0x61, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52,
0x46, 0x69, 0x72, 0x73, 0x74, 0x2d, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61,
0x72, 0x65, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x36, 0xa0, 0x34, 0xa0, 0x32,
0x86, 0x30, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c,
0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x2f,
0x55, 0x54, 0x4e, 0x2d, 0x55, 0x53, 0x45, 0x52, 0x46, 0x69, 0x72, 0x73,
0x74, 0x2d, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63,
0x72, 0x6c, 0x30, 0x71, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
0x01, 0x01, 0x04, 0x65, 0x30, 0x63, 0x30, 0x3b, 0x06, 0x08, 0x2b, 0x06,
0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x2f, 0x68, 0x74, 0x74, 0x70,
0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6f, 0x64,
0x6f, 0x63, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x54, 0x4e, 0x41,
0x64, 0x64, 0x54, 0x72, 0x75, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x74, 0x30, 0x24, 0x06, 0x08, 0x2b,
0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x18, 0x68, 0x74, 0x74,
0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x63, 0x6f, 0x6d,
0x6f, 0x64, 0x6f, 0x63, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x1a, 0x06,
0x03, 0x55, 0x1d, 0x11, 0x04, 0x13, 0x30, 0x11, 0x82, 0x0f, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, 0x63, 0x6f,
0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
0x01, 0x05, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x53, 0x69, 0x98,
0x8e, 0x28, 0x4e, 0x9c, 0x2b, 0x5b, 0x1d, 0xcc, 0x6b, 0x77, 0x28, 0x3d,
0xbb, 0xfa, 0xa5, 0x4e, 0x7e, 0x56, 0x29, 0xa4, 0xea, 0x10, 0xe2, 0xf4,
0xe6, 0x2d, 0x06, 0xd1, 0x84, 0xdb, 0x23, 0xce, 0x97, 0xf3, 0x68, 0xb6,
0x0f, 0x3a, 0xde, 0x15, 0x0b, 0x24, 0x1d, 0x91, 0xe3, 0x6c, 0x2e, 0x30,
0xb7, 0xe9, 0x70, 0xb0, 0xc3, 0x46, 0x80, 0xf0, 0xd3, 0xb1, 0x51, 0xbf,
0x4f, 0xd6, 0x78, 0xa0, 0xfc, 0xac, 0xc6, 0xcf, 0x31, 0x04, 0x63, 0xe2,
0x34, 0x55, 0x05, 0x4a, 0x3d, 0xf6, 0x30, 0xba, 0xf3, 0x33, 0xe5, 0xba,
0xd2, 0x96, 0xf3, 0xd5, 0xb1, 0xb6, 0x93, 0x89, 0x1a, 0xa4, 0x68, 0xbe,
0x7e, 0xed, 0x63, 0xb4, 0x1a, 0x48, 0xc0, 0x53, 0xe4, 0xa3, 0xf0, 0x39,
0x0c, 0x32, 0x92, 0xc7, 0x43, 0x0d, 0x1a, 0x71, 0xed, 0xd0, 0x46, 0x93,
0xbf, 0x93, 0x62, 0x6c, 0x33, 0x4b, 0xcd, 0x36, 0x0d, 0x69, 0x5e, 0xbb,
0x6c, 0x96, 0x99, 0x21, 0x69, 0xc4, 0x4b, 0x67, 0x72, 0xdb, 0x6c, 0x6a,
0xb8, 0xf7, 0x68, 0xed, 0xc5, 0x8f, 0xad, 0x63, 0x65, 0x95, 0x0a, 0x4c,
0xe0, 0xf9, 0x0f, 0x7e, 0x37, 0x3d, 0xaa, 0xd4, 0x93, 0xba, 0x67, 0x09,
0xc3, 0xa5, 0xa4, 0x0d, 0x03, 0x5a, 0x6d, 0xd5, 0x0b, 0xfe, 0xf0, 0x40,
0x14, 0xb4, 0xf6, 0xb8, 0x69, 0x7c, 0x6d, 0xc2, 0x32, 0x4b, 0x9f, 0xb5,
0x1a, 0xe7, 0x46, 0xae, 0x4c, 0x5a, 0x2b, 0xaa, 0x7a, 0x5e, 0x90, 0x57,
0x95, 0xfa, 0xdb, 0x66, 0x02, 0x20, 0x1e, 0x6a, 0x69, 0x66, 0x15, 0x9c,
0xc2, 0xb6, 0xf5, 0xbc, 0x50, 0xb5, 0xfd, 0x45, 0xc7, 0x1f, 0x68, 0xb4,
0x47, 0x59, 0xac, 0xc4, 0x1b, 0x28, 0x93, 0x4e, 0x52, 0x53, 0x12, 0x03,
0x58, 0x4b, 0x71, 0x83, 0x9f, 0x66, 0xe6, 0xac, 0x79, 0x48, 0xfe, 0xfe,
0x47
};
unsigned int login_yahoo_com_2_cer_len = 1501;
|
letscode-17/Java | src/test/java/com/examplehub/conversions/DecimalToOctalTest.java | package com.examplehub.conversions;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
class DecimalToOctalTest {
@Test
void testDecimalToOctal() {
assertEquals(Integer.toString(0, 8), DecimalToOctal.toOctal(0));
assertEquals(Integer.toString(6, 8), DecimalToOctal.toOctal(6));
assertEquals(Integer.toString(111, 8), DecimalToOctal.toOctal(111));
assertEquals(Integer.toString(-1111, 8), DecimalToOctal.toOctal(-1111));
}
}
|
riscveval/Rocket-Chip | debugger/src/common/coreservices/iwire.h | /**
* @file
* @copyright Copyright 2016 GNSS Sensor Ltd. All right reserved.
* @author <NAME> - <EMAIL>
* @brief Single wire interface.
*/
#ifndef __DEBUGGER_PLUGIN_IWIRE_H__
#define __DEBUGGER_PLUGIN_IWIRE_H__
#include "iface.h"
#include <inttypes.h>
namespace debugger {
static const char *const IFACE_WIRE = "IWire";
class IWire : public IFace {
public:
IWire() : IFace(IFACE_WIRE) {}
virtual void raiseLine(int idx) =0;
virtual void lowerLine() =0;
virtual void setLevel(bool level) =0;
};
} // namespace debugger
#endif // __DEBUGGER_PLUGIN_IWIRE_H__
|
coolwho/android-idea | editor/src/main/java/com/jsdroid/editor/ContextUtil.java | <reponame>coolwho/android-idea
package com.jsdroid.editor;
import android.app.Activity;
import android.os.Build;
import android.view.Window;
public class ContextUtil {
/**
* 改变通知栏颜色
*/
public static void setActionBarColor(Activity activity, int color) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = activity.getWindow();
// window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
// | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
// window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(color); //这里动态修改颜色
}
}
}
|
vasilstoyanov99/JS_Advanced_September_2021 | JS Advanced/Lab/02.Arrays_and_Nested_Arrays/02_last_k_numbers_sequence.js | <reponame>vasilstoyanov99/JS_Advanced_September_2021<gh_stars>0
function getSequence(arrayLength, previousElements) {
//TODO: Solve it!
let array = new Array(arrayLength);
array[0] = 1;
for (let index = 0; index < array.length; index++) {
const element = array[index];
}
}
getSequence(6, 3); |
alinakazi/apache-royale-0.9.8-bin-js-swf | royale-compiler/compiler/src/main/java/org/apache/royale/compiler/tree/as/ILabeledStatementNode.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.compiler.tree.as;
import org.apache.royale.compiler.internal.tree.as.BlockNode;
/**
* An AST node representing the label block ("foo:{}").
*/
public interface ILabeledStatementNode extends IASNode
{
/**
* @return The name of the label in this labeled statement node.
*/
String getLabel();
/**
* @return The tree node for the statement this labeled statement labels.
*/
BlockNode getLabeledStatement();
}
|
polossk/Standard-Code-Library-of-Algorithm-Competition | src/ch01/020102.cpp | <filename>src/ch01/020102.cpp
int64 lcm(int64 a, int64 b) { return a / gcd(a, b) * b; } |
RainbowMango/huaweicloud-sdk-go-v3 | services/vpc/v2/vpc_meta.go | <reponame>RainbowMango/huaweicloud-sdk-go-v3
package v2
import (
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/vpc/v2/model"
"net/http"
)
func GenReqDefForAcceptVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v2.0/vpc/peerings/{peering_id}/accept").
WithResponse(new(model.AcceptVpcPeeringResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PeeringId").
WithJsonTag("peering_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreatePort() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/ports").
WithResponse(new(model.CreatePortResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateSecurityGroup() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/security-groups").
WithResponse(new(model.CreateSecurityGroupResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateSecurityGroupRule() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/security-group-rules").
WithResponse(new(model.CreateSecurityGroupRuleResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateSubnet() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/subnets").
WithResponse(new(model.CreateSubnetResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v2.0/vpc/peerings").
WithResponse(new(model.CreateVpcPeeringResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeletePort() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/ports/{port_id}").
WithResponse(new(model.DeletePortResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PortId").
WithJsonTag("port_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteSecurityGroup() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/security-groups/{security_group_id}").
WithResponse(new(model.DeleteSecurityGroupResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SecurityGroupId").
WithJsonTag("security_group_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteSecurityGroupRule() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/security-group-rules/{security_group_rule_id}").
WithResponse(new(model.DeleteSecurityGroupRuleResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SecurityGroupRuleId").
WithJsonTag("security_group_rule_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteSubnet() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id}").
WithResponse(new(model.DeleteSubnetResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SubnetId").
WithJsonTag("subnet_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v2.0/vpc/peerings/{peering_id}").
WithResponse(new(model.DeleteVpcPeeringResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PeeringId").
WithJsonTag("peering_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListPorts() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/ports").
WithResponse(new(model.ListPortsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Name").
WithJsonTag("name").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Id").
WithJsonTag("id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("AdminStateUp").
WithJsonTag("admin_state_up").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("NetworkId").
WithJsonTag("network_id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("MacAddress").
WithJsonTag("mac_address").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("DeviceId").
WithJsonTag("device_id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("DeviceOwner").
WithJsonTag("device_owner").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Status").
WithJsonTag("status").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("FixedIps").
WithJsonTag("fixed_ips").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("EnterpriseProjectId").
WithJsonTag("enterprise_project_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListSecurityGroupRules() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/security-group-rules").
WithResponse(new(model.ListSecurityGroupRulesResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SecurityGroupId").
WithJsonTag("security_group_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListSecurityGroups() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/security-groups").
WithResponse(new(model.ListSecurityGroupsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("EnterpriseProjectId").
WithJsonTag("enterprise_project_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListSubnets() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/subnets").
WithResponse(new(model.ListSubnetsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListVpcPeerings() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v2.0/vpc/peerings").
WithResponse(new(model.ListVpcPeeringsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Id").
WithJsonTag("id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Name").
WithJsonTag("name").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Status").
WithJsonTag("status").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("TenantId").
WithJsonTag("tenant_id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForRejectVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v2.0/vpc/peerings/{peering_id}/reject").
WithResponse(new(model.RejectVpcPeeringResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PeeringId").
WithJsonTag("peering_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowPort() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/ports/{port_id}").
WithResponse(new(model.ShowPortResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PortId").
WithJsonTag("port_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowQuota() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/quotas").
WithResponse(new(model.ShowQuotaResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Type").
WithJsonTag("type").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowSecurityGroup() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/security-groups/{security_group_id}").
WithResponse(new(model.ShowSecurityGroupResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SecurityGroupId").
WithJsonTag("security_group_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowSecurityGroupRule() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/security-group-rules/{security_group_rule_id}").
WithResponse(new(model.ShowSecurityGroupRuleResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SecurityGroupRuleId").
WithJsonTag("security_group_rule_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowSubnet() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/subnets/{subnet_id}").
WithResponse(new(model.ShowSubnetResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SubnetId").
WithJsonTag("subnet_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v2.0/vpc/peerings/{peering_id}").
WithResponse(new(model.ShowVpcPeeringResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PeeringId").
WithJsonTag("peering_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForUpdatePort() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v1/{project_id}/ports/{port_id}").
WithResponse(new(model.UpdatePortResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PortId").
WithJsonTag("port_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForUpdateSubnet() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id}").
WithResponse(new(model.UpdateSubnetResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SubnetId").
WithJsonTag("subnet_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForUpdateVpcPeering() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v2.0/vpc/peerings/{peering_id}").
WithResponse(new(model.UpdateVpcPeeringResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PeeringId").
WithJsonTag("peering_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreatePrivateip() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/privateips").
WithResponse(new(model.CreatePrivateipResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeletePrivateip() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/privateips/{privateip_id}").
WithResponse(new(model.DeletePrivateipResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PrivateipId").
WithJsonTag("privateip_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListPrivateips() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/subnets/{subnet_id}/privateips").
WithResponse(new(model.ListPrivateipsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("SubnetId").
WithJsonTag("subnet_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowNetworkIpAvailabilities() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v2.0/network-ip-availabilities/{network_id}").
WithResponse(new(model.ShowNetworkIpAvailabilitiesResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("NetworkId").
WithJsonTag("network_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowPrivateip() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/privateips/{privateip_id}").
WithResponse(new(model.ShowPrivateipResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("PrivateipId").
WithJsonTag("privateip_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateVpc() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v1/{project_id}/vpcs").
WithResponse(new(model.CreateVpcResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForCreateVpcRoute() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPost).
WithPath("/v2.0/vpc/routes").
WithResponse(new(model.CreateVpcRouteResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteVpc() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v1/{project_id}/vpcs/{vpc_id}").
WithResponse(new(model.DeleteVpcResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForDeleteVpcRoute() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodDelete).
WithPath("/v2.0/vpc/routes/{route_id}").
WithResponse(new(model.DeleteVpcRouteResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("RouteId").
WithJsonTag("route_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListVpcRoutes() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v2.0/vpc/routes").
WithResponse(new(model.ListVpcRoutesResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Id").
WithJsonTag("id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Type").
WithJsonTag("type").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Destination").
WithJsonTag("destination").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("TenantId").
WithJsonTag("tenant_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForListVpcs() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/vpcs").
WithResponse(new(model.ListVpcsResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Limit").
WithJsonTag("limit").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Marker").
WithJsonTag("marker").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Id").
WithJsonTag("id").
WithLocationType(def.Query))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("EnterpriseProjectId").
WithJsonTag("enterprise_project_id").
WithLocationType(def.Query))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowVpc() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v1/{project_id}/vpcs/{vpc_id}").
WithResponse(new(model.ShowVpcResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForShowVpcRoute() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodGet).
WithPath("/v2.0/vpc/routes/{route_id}").
WithResponse(new(model.ShowVpcRouteResponse))
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("RouteId").
WithJsonTag("route_id").
WithLocationType(def.Path))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
func GenReqDefForUpdateVpc() *def.HttpRequestDef {
reqDefBuilder := def.NewHttpRequestDefBuilder().
WithMethod(http.MethodPut).
WithPath("/v1/{project_id}/vpcs/{vpc_id}").
WithResponse(new(model.UpdateVpcResponse)).
WithContentType("application/json;charset=UTF-8")
// request
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("VpcId").
WithJsonTag("vpc_id").
WithLocationType(def.Path))
reqDefBuilder.WithRequestField(def.NewFieldDef().
WithName("Body").
WithLocationType(def.Body))
// response
requestDef := reqDefBuilder.Build()
return requestDef
}
|
phatblat/macOSPrivateFrameworks | PrivateFrameworks/GameCenterFoundation/GKSpecialPlayerInternal.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import <GameCenterFoundation/GKPlayerInternal.h>
@interface GKSpecialPlayerInternal : GKPlayerInternal
{
}
+ (BOOL)supportsSecureCoding;
- (id)compositeName;
- (BOOL)isLoaded;
- (void)setPhotos:(id)arg1;
- (id)photos;
- (void)setAlias:(id)arg1;
- (id)alias;
- (void)setTeamPlayerID:(id)arg1;
- (void)setGamePlayerID:(id)arg1;
- (void)setPlayerID:(id)arg1;
- (id)teamPlayerID;
- (id)gamePlayerID;
- (id)playerID;
@end
|
Hyhello/oui | packages/skeleton/src/_default.js | /**
* 作者:Hyhello
* 时间:2020-09-13
* 描述:配置
*/
// 默认配置
export default {
titleWidth: '38%', //
graph: {
rows: 3, // number
width: '61%' // number | string | Array<number | string>
},
avatar: {
size: 'small', // large / medium / small
shape: 'circle' // 'circle', 'square'
},
// / ============================== 争对上面的avatar
shape: ['circle', 'square'],
size: ['large', 'medium', 'small']
};
|
cyandterry/Python-Study | Ninja/Leetcode/112_Path_Sum.py | """
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ \
7 2 1
return true, as there exist a root-to-leaf path 5->4->11->2 which sum is 22.
"""
# Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param root, a tree node
# @param sum, an integer
# @return a boolean
def hasPathSum(self, root, sum):
if root is None:
return False
if root.left is None and root.right is None: # Found a leaf
if sum == root.val:
return True
return self.hasPathSum(root.left, sum-root.val) or self.hasPathSum(root.right, sum-root.val)
# Need to note, a leaf is a node has no left chind and no right child
|
tumi8/interceptls | tls-client-android/app/src/main/java/de/tum/in/net/client/ConfigurationReader.java | <filename>tls-client-android/app/src/main/java/de/tum/in/net/client/ConfigurationReader.java<gh_stars>0
/**
* Copyright © 2018 <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 de.tum.in.net.client;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Created by johannes on 07.04.17.
*/
public class ConfigurationReader {
private static final Logger log = LoggerFactory.getLogger(ConfigurationReader.class);
/**
* Reads the configuration for the target hosts.
*
* @param context
* @return a Set of targets to probe
*/
public static List<HostAndPort> getTargets(final Context context) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
//we need to create a copy, otherwise we modify the original settings
final Set<String> targetStrings = new HashSet<>(prefs.getStringSet(context.getString(R.string.hosts_default), null));
final String additionalHosts = prefs.getString(context.getString(R.string.hosts_additional), null);
if (additionalHosts != null) {
final String[] hosts = additionalHosts.split("\n");
for (final String host : hosts) {
//targets is a set so we do not have any duplicates
if (!host.isEmpty()) {
targetStrings.add(host.trim());
}
}
}
final List<HostAndPort> targets = new ArrayList<>();
for (final String target : targetStrings) {
try {
final HostAndPort t = HostAndPort.parse(target);
targets.add(t);
} catch (final IllegalArgumentException e) {
log.warn("Illegal host and port string found in settings: {}", target);
}
}
return targets;
}
public static boolean isDataCollectionAllowed(final Context context) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getBoolean(context.getString(R.string.data_collection), false);
}
public static int readServiceTime(final Context ctx) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
final String serviceTime = prefs.getString(ctx.getString(R.string.background_service), null);
return Integer.parseInt(serviceTime);
}
public static boolean isLocationAllowed(final Context ctx) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
return prefs.getBoolean(ctx.getString(R.string.location), false);
}
}
|
jeffrey-io/world-bootstrap | src/main/java/io/jeffrey/world/things/parts/CirclePart.java | package io.jeffrey.world.things.parts;
import java.util.ArrayList;
import io.jeffrey.world.things.behaviors.HasControlDoodadsInThingSpace;
import io.jeffrey.world.things.behaviors.IsSelectable;
import io.jeffrey.world.things.behaviors.structs.SelectionModel;
import io.jeffrey.world.things.core.ControlDoodad;
import io.jeffrey.world.things.core.ControlDoodad.Type;
import io.jeffrey.world.things.core.Part;
import io.jeffrey.zer.AdjustedMouseEvent;
public class CirclePart implements Part, HasControlDoodadsInThingSpace, IsSelectable {
private static final ControlDoodad[] DOODADS_ALL;
private static final ControlDoodad[] DOODADS_NONE;
private static final ControlDoodad[] DOODADS_ROTATE;
private static final ControlDoodad[] DOODADS_SCALE;
static {
final ArrayList<ControlDoodad> doodads_all = new ArrayList<>();
final ArrayList<ControlDoodad> doodads_scale = new ArrayList<>();
final ArrayList<ControlDoodad> doodads_rotate = new ArrayList<>();
doodads_all.add(new ControlDoodad(Type.Rotate, -1.05, 0));
doodads_all.add(new ControlDoodad(Type.Rotate, 1.05, 0));
doodads_all.add(new ControlDoodad(Type.Rotate, 0, -1.05));
doodads_all.add(new ControlDoodad(Type.Rotate, 0, 1.05));
doodads_rotate.add(new ControlDoodad(Type.Rotate, -1.05, 0));
doodads_rotate.add(new ControlDoodad(Type.Rotate, 1.05, 0));
doodads_rotate.add(new ControlDoodad(Type.Rotate, 0, -1.05));
doodads_rotate.add(new ControlDoodad(Type.Rotate, 0, 1.05));
doodads_all.add(new ControlDoodad(Type.Scale, 0.7, 0.7));
doodads_all.add(new ControlDoodad(Type.Scale, 0.7, -0.7));
doodads_all.add(new ControlDoodad(Type.Scale, -0.7, 0.7));
doodads_all.add(new ControlDoodad(Type.Scale, -0.7, -0.7));
doodads_scale.add(new ControlDoodad(Type.Scale, 0.7, 0.7));
doodads_scale.add(new ControlDoodad(Type.Scale, 0.7, -0.7));
doodads_scale.add(new ControlDoodad(Type.Scale, -0.7, 0.7));
doodads_scale.add(new ControlDoodad(Type.Scale, -0.7, -0.7));
DOODADS_ALL = doodads_all.toArray(new ControlDoodad[doodads_all.size()]);
DOODADS_ROTATE = doodads_rotate.toArray(new ControlDoodad[doodads_rotate.size()]);
DOODADS_SCALE = doodads_scale.toArray(new ControlDoodad[doodads_scale.size()]);
DOODADS_NONE = new ControlDoodad[0];
}
private final ControlDoodad[] doodads;
public CirclePart(final DoodadControls controls) {
switch (controls) {
case All:
doodads = DOODADS_ALL;
break;
case Rotation:
doodads = DOODADS_ROTATE;
break;
case Scale:
doodads = DOODADS_SCALE;
break;
case None:
default:
doodads = DOODADS_NONE;
break;
}
}
@Override
public boolean contains(final double x, final double y) {
final double d = x * x + y * y;
return Math.sqrt(d) <= 1.0;
}
@Override
public boolean doesMouseEventPreserveExistingSelection(final AdjustedMouseEvent event) {
return contains(event.position.x_1, event.position.y_1);
}
@Override
public ControlDoodad[] getDoodadsInThingSpace() {
return doodads;
}
@Override
public boolean selectionIntersect(final SelectionModel model) {
return model.isOriginCircleSelected(1);
}
}
|
polycular/oekogotschi-editor | app/controllers/clients/index.js | import Ember from 'ember'
export default Ember.Controller.extend({
queryParameters: ['page'],
page: 1,
size: 15,
modalModel: null,
openCreateClientModal: false,
openDestroyClientModal: false,
actions: {
goto(page) {
this.set('page', page)
},
openModal(modal, model) {
this.set(modal, true)
this.set('modalModel', model)
},
toggleModal(modal) {
this.set(modal, !modal)
},
createClient(modal, model) {
this.set(modal, false)
this.store
.createRecord('client', {
name: model.get('name'),
creator: this.get('currentUser').get('content')
})
.save()
},
destroyClient(modal) {
this.set(modal, false)
const model = this.get('modalModel')
this.set('modalModel', null)
model.destroyRecord()
}
}
})
|
AdrianZw/csapex_core_plugins | csapex_opencv/src/cvBlob/cvaux.cpp | <reponame>AdrianZw/csapex_core_plugins<filename>csapex_opencv/src/cvBlob/cvaux.cpp
// Copyright (C) 2007 by <NAME>
// <EMAIL>
//
// This file is part of cvBlob.
//
// cvBlob is free software: you can redistribute it and/or modify
// it under the terms of the Lesser GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// cvBlob 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
// Lesser GNU General Public License for more details.
//
// You should have received a copy of the Lesser GNU General Public License
// along with cvBlob. If not, see <http://www.gnu.org/licenses/>.
//
#include <cmath>
#if (defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__) || (defined(__APPLE__) & defined(__MACH__)))
#include <cv.h>
#else
#include <opencv2/core/version.hpp>
#if CV_MAJOR_VERSION <= 3
#include <opencv/cv.h>
#else
#include <opencv2/core/core_c.h>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/core/types_c.h>
#endif
#endif
#include <csapex_opencv/cvblob.h>
namespace cvb
{
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1
double cvDotProductPoints(CvPoint const& a, CvPoint const& b, CvPoint const& c)
{
double abx = b.x - a.x;
double aby = b.y - a.y;
double bcx = c.x - b.x;
double bcy = c.y - b.y;
return abx * bcx + aby * bcy;
}
double cvCrossProductPoints(CvPoint const& a, CvPoint const& b, CvPoint const& c)
{
double abx = b.x - a.x;
double aby = b.y - a.y;
double acx = c.x - a.x;
double acy = c.y - a.y;
return abx * acy - aby * acx;
}
double cvDistancePointPoint(CvPoint const& a, CvPoint const& b)
{
double abx = a.x - b.x;
double aby = a.y - b.y;
return sqrt(abx * abx + aby * aby);
}
double cvDistanceLinePoint(CvPoint const& a, CvPoint const& b, CvPoint const& c, bool isSegment)
{
if (isSegment) {
double dot1 = cvDotProductPoints(a, b, c);
if (dot1 > 0)
return cvDistancePointPoint(b, c);
double dot2 = cvDotProductPoints(b, a, c);
if (dot2 > 0)
return cvDistancePointPoint(a, c);
}
return fabs(cvCrossProductPoints(a, b, c) / cvDistancePointPoint(a, b));
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
} // namespace cvb
|
grgrzybek/fabric8 | gateway/gateway-fabric-support/src/main/java/io/fabric8/gateway/fabric/support/vertx/VertxServiceImpl.java | <filename>gateway/gateway-fabric-support/src/main/java/io/fabric8/gateway/fabric/support/vertx/VertxServiceImpl.java
/**
* Copyright 2005-2014 Red Hat, Inc.
*
* Red Hat 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 io.fabric8.gateway.fabric.support.vertx;
import io.fabric8.api.scr.AbstractComponent;
import org.apache.aries.util.AriesFrameworkUtil;
import org.apache.curator.framework.CuratorFramework;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Modified;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import io.fabric8.common.util.ClassLoaders;
import io.fabric8.common.util.Objects;
import org.osgi.framework.Bundle;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vertx.java.core.Vertx;
import org.vertx.java.core.VertxFactory;
import org.vertx.java.core.impl.DefaultVertxFactory;
import java.util.concurrent.Callable;
/**
* The gateway service which
*/
@Service(VertxService.class)
@Component(name = "io.fabric8.gateway.vertx", label = "Fabric8 Gateway Vertx Service", immediate = true, metatype = false)
public class VertxServiceImpl extends AbstractComponent implements VertxService {
private static final transient Logger LOG = LoggerFactory.getLogger(VertxServiceImpl.class);
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY, bind = "setCurator", unbind = "unsetCurator")
private CuratorFramework curator;
private Vertx vertx;
public VertxServiceImpl() {
}
@Activate
public void activate(ComponentContext context) throws Exception {
// TODO support injecting of the ClassLoader without depending on OSGi APIs
// see https://github.com/jboss-fuse/fuse/issues/104
Bundle bundle = context.getBundleContext().getBundle();
final ClassLoader classLoader = AriesFrameworkUtil.getClassLoader(bundle);
// lets set the thread context class loader for vertx to be able to find services
ClassLoaders.withContextClassLoader(classLoader, new Callable<Object>() {
@Override
public Object call() throws Exception {
if (vertx == null) {
try {
vertx = VertxFactory.newVertx();
} catch (Throwable e) {
LOG.warn("Failed to use META-INF/services to discover vertx: " + e, e);
}
if (vertx == null) {
try {
DefaultVertxFactory factory = new DefaultVertxFactory();
vertx = factory.createVertx();
} catch (Throwable e) {
LOG.error("Failed to create Vertx instance: " + e, e);
}
}
LOG.info("Created a vertx implementation: " + vertx);
}
return null;
}
});
Objects.notNull(vertx, "vertx");
}
@Modified
public void updated() throws Exception {
// lets reload the configuration and find all the groups to create if they are not already created
}
@Deactivate
public void deactivate() {
if (vertx != null) {
try {
vertx.stop();
} catch (Throwable e) {
LOG.warn("Failed to stop vertx: " + e, e);
}
vertx = null;
}
}
@Override
public Vertx getVertx() {
return vertx;
}
public void setVertx(Vertx vertx) {
this.vertx = vertx;
}
@Override
public CuratorFramework getCurator() {
return curator;
}
public void setCurator(CuratorFramework curator) {
this.curator = curator;
}
public void unsetCurator(CuratorFramework curator) {
this.curator = null;
}
}
|
ScalablyTyped/SlinkyTyped | a/activex-word/src/main/scala/typingsSlinky/activexWord/Word/ListTemplates.scala | package typingsSlinky.activexWord.Word
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait ListTemplates extends StObject {
def Add(): ListTemplate = js.native
def Add(OutlineNumbered: js.UndefOr[scala.Nothing], Name: js.Any): ListTemplate = js.native
def Add(OutlineNumbered: js.Any): ListTemplate = js.native
def Add(OutlineNumbered: js.Any, Name: js.Any): ListTemplate = js.native
val Application: typingsSlinky.activexWord.Word.Application = js.native
val Count: Double = js.native
val Creator: Double = js.native
def Item(Index: js.Any): ListTemplate = js.native
val Parent: js.Any = js.native
@JSName("Word.ListTemplates_typekey")
var WordDotListTemplates_typekey: ListTemplates = js.native
}
|
xiao125/LatteDamo | latte-core/src/main/java/com/imooc/core/util/callback/CallbackManager.java | package com.imooc.core.util.callback;
import java.util.WeakHashMap;
/**
* Created by Administrator on 2017/10/15.
*/
public class CallbackManager {
private static final WeakHashMap<Object,IGlobalCallback> CALLBACKS = new WeakHashMap<>();
private static class Holder{
private static final CallbackManager INSTANCE = new CallbackManager();
}
public static CallbackManager getInstance(){
return Holder.INSTANCE;
}
public CallbackManager addCallback(Object tag,IGlobalCallback callback){
CALLBACKS.put(tag,callback);
return this;
}
public IGlobalCallback getCallback(Object tag){
return CALLBACKS.get(tag);
}
}
|
Jorch72/VoltzEngine | src/main/scala/com/builtbroken/mc/lib/access/AccessUtility.java | package com.builtbroken.mc.lib.access;
import java.util.*;
import java.util.Map.Entry;
/**
* Handler for the default group loaded by all machines that use AccessProfiles. Includes functions
* that are helpful when dealing with access profiles. It is suggested to never modify the default
* group unless there is not other way. However, any access node needs to be registered threw this
* class to allow other things to access it. This also include applying those permissions to the
* default
* groups.
*
* @author DarkGuardsman
*/
public class AccessUtility
{
/**
* Global list of all permissions
*/
public final static Set<Permission> permissions = new LinkedHashSet();
/**
* Map of default groups and those group permissions permissions. Used to build a new group set.
*/
public static final HashMap<String, List<String>> groupDefaultNodes = new LinkedHashMap<>();
/**
* Map of default groups and the group it extends. Used to build a new group set.
*/
public static final HashMap<String, String> groupDefaultExtends = new LinkedHashMap<>();
// Pre-loads the default groups
static
{
List<String> list = new ArrayList<>();
// Owner group defaults
list.add(Permissions.PROFILE_OWNER.toString());
list.add(Permissions.inventoryDisable.toString());
list.add(Permissions.inventoryEnable.toString());
list.add(Permissions.profile.toString());
// Admin group defaults
List<String> list2 = new ArrayList<>();
list2.add(Permissions.PROFILE_ADMIN.toString());
list2.add(Permissions.inventoryModify.toString());
list2.add(Permissions.inventoryLock.toString());
list2.add(Permissions.inventoryUnlock.toString());
list2.add(Permissions.inventoryModify.toString());
list2.add(Permissions.group.toString());
// User group defaults
List<String> list3 = new ArrayList<>();
list3.add(Permissions.PROFILE_USER.toString());
list3.add(Permissions.inventoryOpen.toString());
list3.add(Permissions.inventoryInput.toString());
list3.add(Permissions.inventoryOutput.toString());
createDefaultGroup("user", null, list3);
createDefaultGroup("admin", "user", list2);
createDefaultGroup("owner", "admin", list);
}
/**
* Creates a default group for all machines to use. Only add a group if there is no option to
* really manage the group's settings
*
* @param name - group name
* @param prefabGroup - group this should extend. Make sure it exists.
* @param nodes - all commands or custom permissions
*/
public static void createDefaultGroup(String name, String prefabGroup, List<String> nodes)
{
if (name != null)
{
groupDefaultNodes.put(name, nodes);
groupDefaultExtends.put(name, prefabGroup);
}
}
/**
* Creates a default group for all machines to use. Only add a group if there is no option to
* really manage the group's settings
*
* @param name - group name
* @param prefabGroup - group this should extend. Make sure it exists.
* @param nodes - all commands or custom permissions
*/
public static void createDefaultGroup(String name, String prefabGroup, String... nodes)
{
createDefaultGroup(name, prefabGroup, nodes != null ? Arrays.asList(nodes) : null);
}
/**
* Registers a node with the master list making it available
*/
public static void registerPermission(String node, String group)
{
registerPermission(new Permission(node), group);
}
/**
* Registers a node with the master list making it available
*/
public static void registerPermission(Permission perm, String group)
{
if (!permissions.contains(perm))
{
permissions.add(perm);
}
if (group != null && !group.isEmpty() && groupDefaultNodes.containsKey(group))
{
List<String> perms = groupDefaultNodes.get(group);
if (perms != null && !perms.contains(perm.id))
{
perms.add(perm.id);
}
}
}
/**
* Builds a new default group list for a basic machine
*/
public static List<AccessGroup> buildNewGroup()
{
List<AccessGroup> groups = new ArrayList<>();
// Create groups and load permissions
for (Entry<String, List<String>> entry : groupDefaultNodes.entrySet())
{
AccessGroup group = new AccessGroup(entry.getKey());
if (entry.getValue() != null)
{
for (String string : entry.getValue())
{
group.addNode(string);
}
}
groups.add(group);
}
// Set group to extend each other
for (Entry<String, String> entry : groupDefaultExtends.entrySet())
{
if (entry.getKey() != null && !entry.getKey().isEmpty())
{
AccessGroup group = getGroup(groups, entry.getKey());
AccessGroup groupToExtend = getGroup(groups, entry.getValue());
if (group != null && groupToExtend != null)
{
group.setToExtend(groupToExtend);
}
}
}
return groups;
}
/**
* Builds then loaded a new default group set into the terminal
*/
public static void loadNewGroupSet(IProfileContainer container)
{
if (container != null)
{
loadNewGroupSet(container.getAccessProfile());
}
}
public static void loadNewGroupSet(AccessProfile profile)
{
if (profile != null)
{
List<AccessGroup> groups = buildNewGroup();
for (AccessGroup group : groups)
{
profile.addGroup(group);
}
}
}
/**
* Picks a group out of a list using the groups name
*/
public static AccessGroup getGroup(Collection<AccessGroup> groups, String name)
{
for (AccessGroup group : groups)
{
if (group.getName().equalsIgnoreCase(name))
{
return group;
}
}
return null;
}
}
|
gismaker/lambkit | src/main/java/com/lambkit/db/mgr/MgrTable.java | <reponame>gismaker/lambkit
/**
* Copyright (c) 2015-2017, <NAME> 杨勇 (<EMAIL>).
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.lambkit.db.mgr;
import java.util.List;
import com.lambkit.db.dialect.LambkitDialect;
import com.lambkit.db.meta.TableMeta;
import com.lambkit.db.sql.column.Columns;
public class MgrTable {
private String name;
private ITable model;
private TableMeta meta;
private List<? extends IField> fieldList;
private LambkitDialect dialect;
public ITable getModel() {
return model;
}
public void setModel(ITable model) {
this.model = model;
}
public TableMeta getMeta() {
return meta;
}
public void setMeta(TableMeta meta) {
this.meta = meta;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<? extends IField> getFieldList() {
return fieldList;
}
public void setFieldList(List<? extends IField> list) {
this.fieldList = list;
}
/******/
public String getPrimaryKey() {
if(meta!=null) {
return meta.getPrimaryKey();
} else {
return null;
}
}
public Object getId() {
if(model!=null) {
return model.getId();
} else {
return null;
}
}
public String getTitle() {
if(model!=null) {
return model.getTitle();
} else {
return null;
}
}
public LambkitDialect getDialect() {
return dialect;
}
public void setDialect(LambkitDialect dialect) {
this.dialect = dialect;
}
/////////////////////////////////////////////////
public String getLoadColumns(String alias) {
return MgrdbManager.me().getService().getSelectNamesOfView(this, alias);
}
protected String sql4FindById(Object id) {
String pkname = getPrimaryKey();
return dialect.forFindByColumns(getName(), getLoadColumns(""), Columns.create(pkname, id).getList(), "", null);
}
}
|
MirekSz/webpack-es6-ts | app/mods/mod814.js | <gh_stars>0
import mod813 from './mod813';
var value=mod813+1;
export default value;
|
atveit/vespa | searchlib/src/tests/bytecomplens/bytecomp.cpp | <reponame>atveit/vespa
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <memory>
#include <vespa/log/log.h>
LOG_SETUP("bytecomplens_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/random.h>
#include <vespa/searchlib/docstore/bytecomplens.h>
class Test : public vespalib::TestApp {
private:
void testRandomLengths();
public:
int Main() override {
TEST_INIT("bytecomplens_test");
testRandomLengths(); TEST_FLUSH();
TEST_DONE();
}
};
TEST_APPHOOK(Test);
void
Test::testRandomLengths()
{
vespalib::RandomGen rndgen(0x07031969);
#define TBLSIZ 0xc00000
auto lentable = std::unique_ptr<uint32_t[]>(new uint32_t[TBLSIZ]);
auto offtable = std::unique_ptr<uint64_t[]>(new uint64_t[TBLSIZ]);
uint64_t offset = 16;
for (int i = 0; i < TBLSIZ; i++) {
int sel = rndgen.nextInt32();
int val = rndgen.nextInt32();
switch (sel & 0x7) {
case 0:
val &= 0x7F;
break;
case 1:
val &= 0xFF;
break;
case 3:
val &= 0x1FFF;
break;
case 4:
val &= 0x3FFF;
break;
case 5:
val &= 0x7FFF;
break;
case 6:
val &= 0xFFFF;
break;
case 7:
default:
val &= 0xFFFFF;
break;
}
offtable[i] = offset;
lentable[i] = val;
offset += val;
}
LOG(info, "made %d random offsets", TBLSIZ);
search::ByteCompressedLengths foo;
LOG(info, "empty BCL using %9ld bytes memory", foo.memoryUsed());
foo.addOffsetTable(TBLSIZ/4, offtable.get());
foo.addOffsetTable(TBLSIZ/4, offtable.get() + 1*(TBLSIZ/4));
LOG(info, "half BCL using %9ld bytes memory", foo.memoryUsed());
search::ByteCompressedLengths bar;
foo.swap(bar);
bar.addOffsetTable(TBLSIZ/4, offtable.get() + 2*(TBLSIZ/4));
bar.addOffsetTable(TBLSIZ/4, offtable.get() + 3*(TBLSIZ/4));
foo.swap(bar);
LOG(info, "full BCL using %9ld bytes memory", foo.memoryUsed());
LOG(info, "constructed %d byte compressed lengths", TBLSIZ-1);
for (int i = 0; i < TBLSIZ-1; i++) {
search::ByteCompressedLengths::OffLen offlen;
offlen = foo.getOffLen(i);
if ((i % 1000000) == 0) {
LOG(info, "data blob [%d] length %ld offset %ld", i, offlen.length, offlen.offset);
}
EXPECT_EQUAL(lentable[i], offlen.length);
EXPECT_EQUAL(offtable[i], offlen.offset);
}
}
|
MobClub/CMSSDK-for-iOS | SDK/Required/JiMu.framework/Headers/JIMULocationConstant.h | <filename>SDK/Required/JiMu.framework/Headers/JIMULocationConstant.h<gh_stars>0
//
// JIMULocation.h
// JiMu
//
// Created by 冯鸿杰 on 17/2/21.
// Copyright © 2017年 Mob. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JIMULocationSearchIndex.h"
/**
地理位置常量
*/
@interface JIMULocationConstant : NSObject
/**
名字
*/
@property (nonatomic, copy, readonly) NSString *name;
/**
获取国家列表
@return 国家列表
*/
+ (NSArray<JIMULocationConstant *> *)countries;
/**
获取省份列表
@param country 国家
@return 省份列表
*/
+ (NSArray<JIMULocationConstant *> *)provinces:(JIMULocationConstant *)country;
/**
获取城市列表
@param province 省
@return 城市列表
*/
+ (NSArray<JIMULocationConstant *> *)cities:(JIMULocationConstant *)province;
/**
获取位置
@param index 地区索引
@return 位置信息
*/
+ (JIMULocationConstant *)getLocation:(int)index;
/**
获取搜索位置索引,配合getLocation使用,如:查找中国上海,则为:[JIMULocationConstant getLocation:JIMULocationConstant.search.China.Shanghai.index];
@return 位置索引
*/
+ (struct JIMULocationSearchIndex)search;
@end
|
RS131419/fire | fire-engines/fire-spark/src/main/scala/com/zto/fire/spark/acc/EnvironmentAccumulator.scala | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zto.fire.spark.acc
import java.util.concurrent.ConcurrentLinkedQueue
import com.zto.fire.common.conf.FireFrameworkConf
import org.apache.commons.lang3.StringUtils
import org.apache.spark.util.AccumulatorV2
/**
* 运行时累加器,用于收集运行时的jvm、gc、thread、cpu、memory、disk等信息
*
* @author ChengLong 2019年11月6日 16:56:38
*/
private[fire] class EnvironmentAccumulator extends AccumulatorV2[String, ConcurrentLinkedQueue[String]] {
// 用于存放运行时信息的队列
private val envInfoQueue = new ConcurrentLinkedQueue[String]
// 判断是否打开运行时信息累加器
private lazy val isEnable = FireFrameworkConf.accEnable && FireFrameworkConf.accEnvEnable
/**
* 判断累加器是否为空
*/
override def isZero: Boolean = this.envInfoQueue.size() == 0
/**
* 用于复制累加器
*/
override def copy(): AccumulatorV2[String, ConcurrentLinkedQueue[String]] = new EnvironmentAccumulator
/**
* driver端执行有效,用于清空累加器
*/
override def reset(): Unit = this.envInfoQueue.clear
/**
* executor端执行,用于收集运行时信息
*
* @param envInfo
* 运行时信息
*/
override def add(envInfo: String): Unit = {
if (this.isEnable && StringUtils.isNotBlank(envInfo)) {
this.envInfoQueue.add(envInfo)
this.clear
}
}
/**
* executor端向driver端merge累加数据
*
* @param other
* executor端累加结果
*/
override def merge(other: AccumulatorV2[String, ConcurrentLinkedQueue[String]]): Unit = {
if (other != null && other.value.size() > 0) {
this.envInfoQueue.addAll(other.value)
this.clear
}
}
/**
* driver端获取累加器的值
*
* @return
* 收集到的日志信息
*/
override def value: ConcurrentLinkedQueue[String] = this.envInfoQueue
/**
* 当日志累积量超过maxLogSize所设定的值时清理过期的日志数据
* 直到达到minLogSize所设定的最小值,防止频繁的进行清理
*/
def clear: Unit = {
if (this.envInfoQueue.size() > FireFrameworkConf.maxEnvSize) {
while (this.envInfoQueue.size() > FireFrameworkConf.minEnvSize) {
this.envInfoQueue.poll
}
}
}
}
|
COx2/slPlugins | 3rdparty/soundpipe/h/atone.h | <reponame>COx2/slPlugins
typedef struct {
SPFLOAT hp;
SPFLOAT c1, c2, yt1, prvhp;
SPFLOAT tpidsr;
} sp_atone;
int sp_atone_create(sp_atone **p);
int sp_atone_destroy(sp_atone **p);
int sp_atone_init(sp_data *sp, sp_atone *p);
int sp_atone_compute(sp_data *sp, sp_atone *p, SPFLOAT *in, SPFLOAT *out);
|
cilium/kube-apate | api/k8s/v1/server/restapi/admissionregistration_v1beta1/create_admissionregistration_v1beta1_mutating_webhook_configuration_responses.go | <reponame>cilium/kube-apate
// Code generated by go-swagger; DO NOT EDIT.
// Copyright 2017-2020 Authors of Cilium
// SPDX-License-Identifier: Apache-2.0
package admissionregistration_v1beta1
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/cilium/kube-apate/api/k8s/v1/models"
)
// CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOKCode is the HTTP code returned for type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK
const CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOKCode int = 200
/*CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK OK
swagger:response createAdmissionregistrationV1beta1MutatingWebhookConfigurationOK
*/
type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK struct {
/*
In: Body
*/
Payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration `json:"body,omitempty"`
}
// NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK creates CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK with default headers values
func NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK() *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK {
return &CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK{}
}
// WithPayload adds the payload to the create admissionregistration v1beta1 mutating webhook configuration o k response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK) WithPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the create admissionregistration v1beta1 mutating webhook configuration o k response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK) SetPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) {
o.Payload = payload
}
// WriteResponse to the client
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreatedCode is the HTTP code returned for type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated
const CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreatedCode int = 201
/*CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated Created
swagger:response createAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated
*/
type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated struct {
/*
In: Body
*/
Payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration `json:"body,omitempty"`
}
// NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated creates CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated with default headers values
func NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated() *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated {
return &CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated{}
}
// WithPayload adds the payload to the create admissionregistration v1beta1 mutating webhook configuration created response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated) WithPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated {
o.Payload = payload
return o
}
// SetPayload sets the payload to the create admissionregistration v1beta1 mutating webhook configuration created response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated) SetPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) {
o.Payload = payload
}
// WriteResponse to the client
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(201)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAcceptedCode is the HTTP code returned for type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted
const CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAcceptedCode int = 202
/*CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted Accepted
swagger:response createAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted
*/
type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted struct {
/*
In: Body
*/
Payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration `json:"body,omitempty"`
}
// NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted creates CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted with default headers values
func NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted() *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted {
return &CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted{}
}
// WithPayload adds the payload to the create admissionregistration v1beta1 mutating webhook configuration accepted response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted) WithPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted {
o.Payload = payload
return o
}
// SetPayload sets the payload to the create admissionregistration v1beta1 mutating webhook configuration accepted response
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted) SetPayload(payload *models.IoK8sAPIAdmissionregistrationV1beta1MutatingWebhookConfiguration) {
o.Payload = payload
}
// WriteResponse to the client
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(202)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorizedCode is the HTTP code returned for type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized
const CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorizedCode int = 401
/*CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized Unauthorized
swagger:response createAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized
*/
type CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized struct {
}
// NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized creates CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized with default headers values
func NewCreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized() *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized {
return &CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized{}
}
// WriteResponse to the client
func (o *CreateAdmissionregistrationV1beta1MutatingWebhookConfigurationUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
|
sohero-0406/appraisalx | web/src/main/java/com/jeesite/modules/aa/service/IdentifyTecDetailService.java | /**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.modules.aa.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.modules.aa.entity.ExamDetail;
import com.jeesite.modules.aa.entity.IdentifyTec;
import com.jeesite.modules.aa.entity.TechnologyInfo;
import com.jeesite.modules.common.entity.Exam;
import com.jeesite.modules.common.entity.ExamUser;
import com.jeesite.modules.common.service.ExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.aa.entity.IdentifyTecDetail;
import com.jeesite.modules.aa.dao.IdentifyTecDetailDao;
/**
* 鉴定技术状况详情Service
*
* @author lvchangwei
* @version 2019-07-04
*/
@Service
@Transactional(readOnly = true)
public class IdentifyTecDetailService extends CrudService<IdentifyTecDetailDao, IdentifyTecDetail> {
@Autowired
private IdentifyTecDetailDao identifyTecDetailDao;
@Autowired
private ExamDetailService examDetailService;
@Autowired
private ExamService examService;
@Autowired
private TechnologyInfoService technologyInfoService;
/**
* 获取单条数据
*
* @param identifyTecDetail
* @return
*/
@Override
public IdentifyTecDetail get(IdentifyTecDetail identifyTecDetail) {
return super.get(identifyTecDetail);
}
/**
* 查询分页数据
*
* @param identifyTecDetail 查询条件
* @param identifyTecDetail.page 分页对象
* @return
*/
@Override
public Page<IdentifyTecDetail> findPage(IdentifyTecDetail identifyTecDetail) {
return super.findPage(identifyTecDetail);
}
/**
* 保存数据(插入或更新)
*
* @param identifyTecDetail
*/
@Override
@Transactional(readOnly = false)
public void save(IdentifyTecDetail identifyTecDetail) {
super.save(identifyTecDetail);
}
/**
* 更新状态
*
* @param identifyTecDetail
*/
@Override
@Transactional(readOnly = false)
public void updateStatus(IdentifyTecDetail identifyTecDetail) {
super.updateStatus(identifyTecDetail);
}
/**
* 删除数据
*
* @param identifyTecDetail
*/
@Override
@Transactional(readOnly = false)
public void delete(IdentifyTecDetail identifyTecDetail) {
super.delete(identifyTecDetail);
}
public IdentifyTec findData(IdentifyTec identifyTec, ExamUser examUser) {
String type = identifyTec.getType();
//查询启用项
ExamDetail examDetail = new ExamDetail();
//路试项
boolean isDel = false;
if ("7".equals(type)) {
//考生
if (StringUtils.isNotBlank(examUser.getExamId())) {
examDetail.setExamId(examUser.getExamId());
examDetail = examDetailService.getByEntity(examDetail);
//未查到或者为启用,均查询学生答案,否则查询正确答案
if (null == examDetail || "1".equals(examDetail.getEnableCheckBodySkeleton())) {
identifyTec.setExamUserId(examUser.getId());
} else {
Exam exam = examService.get(examUser.getExamId());
if (null != exam) {
identifyTec.setPaperId(exam.getPaperId());
}
isDel = true;
}
} else {
//教师
identifyTec.setPaperId(examUser.getPaperId());
}
} else {
identifyTec.setExamUserId(examUser.getId());
identifyTec.setPaperId(examUser.getPaperId());
}
//查询考生或教师已作答过的题目
identifyTec = identifyTecDetailDao.findData(identifyTec);
if (isDel) {
identifyTec.setId(null);
}
Map<String, IdentifyTecDetail> map = new HashMap<>();
if (null != identifyTec) {
List<IdentifyTecDetail> detailList = identifyTec.getItemList();
for (IdentifyTecDetail detail : detailList) {
if ("正常".equals(detail.getCode()) || "无".equals(detail.getCode()) || "是".equals(detail.getCode())) {
detail.setCheckRes("正常");
} else {
detail.setCheckRes("有缺陷");
}
//清空查看时的id,为了路试项禁用时使用
if (isDel) {
detail.setId(null);
}
map.put(detail.getTypeName(), detail);
}
//外包接口需要、有点傻逼
identifyTec.setItemList(null);
} else {
identifyTec = new IdentifyTec();
}
identifyTec.setExamDetail(examDetail);
//查询全部节点的id及对应名字
TechnologyInfo technologyInfo = new TechnologyInfo();
technologyInfo.setType(type);
List<TechnologyInfo> infoList = technologyInfoService.findList(technologyInfo);
for (TechnologyInfo info : infoList) {
String key = info.getName();
if (!map.containsKey(key)) {
IdentifyTecDetail detail = new IdentifyTecDetail();
detail.setTechnologyInfoId(info.getId());
detail.setTypeName(info.getName());
map.put(info.getName(), detail);
}
}
identifyTec.setItemMap(map);
return identifyTec;
}
/**
* 鉴定技术状况 - 二手车鉴定评估作业表
*
* @param examUser
* @return
*/
public List<IdentifyTec> findIdentityTecCondition(IdentifyTec identifyTec) {
return identifyTecDetailDao.findIdentityTecCondition(identifyTec);
}
} |
SD2E/experimental-intent-parser | intent_parser/accessor/mongo_db_accessor.py | <reponame>SD2E/experimental-intent-parser
from datetime import datetime
from intent_parser.table.experiment_status_table import ExperimentStatusTableParser
import intent_parser.utils.intent_parser_utils as ip_util
import intent_parser.constants.google_api_constants as google_constants
import intent_parser.constants.ta4_db_constants as ta4_constants
import logging
import os.path
import pymongo
class TA4DBAccessor(object):
"""
Retrieve job pipeline status for an experiment from TA4 MongoDB.
"""
_LOGGER = logging.getLogger('intent_parser_mongo_db_accessor')
_MONGODB_ACCESSOR = None
def __init__(self):
pass
def __new__(cls, *args, **kwargs):
if not cls._MONGODB_ACCESSOR:
cls._MONGODB_ACCESSOR = super(TA4DBAccessor, cls).__new__(cls, *args, **kwargs)
cls._MONGODB_ACCESSOR._authenticate_credentials()
return cls._MONGODB_ACCESSOR
def _authenticate_credentials(self):
credential_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'intent_parser_api_keys.json')
credential = ip_util.load_json_file(credential_file)['dbURI']
self.database = pymongo.MongoClient(credential).catalog_staging
def get_experiment_status(self, doc_id, lab_name):
"""Retrieve of Status for an experiment.
Args:
doc_id: id of Google Doc.
lab_name: name of lab
Returns:
A dictionary. The key represents the experiment_id. The value represents a ExperimentStatusTableParser.
"""
experiment_ref = google_constants.GOOGLE_DOC_URL_PREFIX + doc_id
db_response = self.database.structured_requests.find({ta4_constants.EXPERIMENT_REFERENCE_URL: experiment_ref,
'$where': 'this.derived_from.length > 0'})
result = {}
status_table = ExperimentStatusTableParser()
for status in db_response:
if lab_name.lower() in status[ta4_constants.LAB].lower():
if ta4_constants.STATUS not in status:
return {}
for status_type, status_values in status[ta4_constants.STATUS].items():
status_last_updated = status_values[ta4_constants.LAST_UPDATED] if ta4_constants.LAST_UPDATED in status_values else datetime.now()
status_state = status_values[ta4_constants.STATE] if ta4_constants.STATE in status_values else False
status_path = status_values[ta4_constants.PATH] if ta4_constants.PATH in status_values else 'no data'
if status_type == ta4_constants.XPLAN_REQUEST_SUBMITTED:
status_path = status[ta4_constants.PARENT_GIT_PATH]
status_table.add_status(status_type,
status_last_updated,
status_state,
status_path)
result[status[ta4_constants.EXPERIMENT_ID]] = status_table
return result
|
inket/smartPins | classdump_SafariShared/WBSCreditCardDataController.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <objc/NSObject.h>
@class NSArray, NSMapTable;
@interface WBSCreditCardDataController : NSObject
{
NSMapTable *_creditCardDataKeychainReferences;
}
+ (BOOL)hasCreditCardData;
- (void).cxx_destruct;
- (void)invalidateCreditCardData;
- (void)clearCreditCardData;
- (void)creditCardDataDidChange;
- (void)neverSaveCreditCardData:(id)arg1;
- (void)_removeNeverSaveCreditCardData:(id)arg1;
- (id)_neverSavedCreditCardSuffixFromCardNumber:(id)arg1;
- (id)_neverSavedCreditCardSuffixFromCard:(id)arg1;
- (BOOL)isCreditCardDataSaved:(id)arg1;
- (void)saveCreditCardDataIfAllowed:(id)arg1;
- (void)saveCreditCardData:(id)arg1;
- (void)replaceCreditCardData:(id)arg1 withCard:(id)arg2;
- (void)removeCreditCardData:(id)arg1;
- (id)savableCreditCardDataInForm:(id)arg1;
- (id)defaultNameForCardOfType:(unsigned long long)arg1 cardholderName:(id)arg2;
- (id)_uniqueCardNameForCardName:(id)arg1;
- (BOOL)shouldAddCardWithNumber:(id)arg1;
- (id)existingCardWithNumber:(id)arg1;
- (BOOL)shouldNeverSaveCardWithNumber:(id)arg1;
@property(readonly, nonatomic) NSArray *creditCardData;
- (id)init;
@end
|
fciubotaru/z-pec | ZimbraServer/src/java/com/zimbra/cs/account/accesscontrol/TargetType.java | <reponame>fciubotaru/z-pec<gh_stars>1-10
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2008, 2009, 2010, 2011 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.cs.account.accesscontrol;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.zimbra.common.service.ServiceException;
import com.zimbra.common.util.SetUtil;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.account.AccountServiceException;
import com.zimbra.cs.account.AttributeClass;
import com.zimbra.cs.account.AttributeManager;
import com.zimbra.cs.account.CalendarResource;
import com.zimbra.cs.account.Config;
import com.zimbra.cs.account.Cos;
import com.zimbra.cs.account.DistributionList;
import com.zimbra.cs.account.Domain;
import com.zimbra.cs.account.DynamicGroup;
import com.zimbra.cs.account.Entry;
import com.zimbra.cs.account.GlobalGrant;
import com.zimbra.cs.account.NamedEntry;
import com.zimbra.cs.account.Provisioning;
import com.zimbra.cs.account.UCService;
import com.zimbra.common.account.Key;
import com.zimbra.common.account.Key.AccountBy;
import com.zimbra.cs.account.ldap.LdapDIT;
import com.zimbra.cs.account.ldap.LdapProv;
import com.zimbra.cs.account.Server;
import com.zimbra.cs.account.XMPPComponent;
import com.zimbra.cs.account.Zimlet;
import com.zimbra.soap.type.TargetBy;
/**
* @author pshao
*/
public enum TargetType {
account(true, true, AttributeClass.account, com.zimbra.soap.type.TargetType.account, "Account"),
calresource(true, true, AttributeClass.calendarResource, com.zimbra.soap.type.TargetType.calresource, "CalendarResource"),
cos(true, false, AttributeClass.cos, com.zimbra.soap.type.TargetType.cos, "Cos"),
dl(true, true, AttributeClass.distributionList, com.zimbra.soap.type.TargetType.dl, "DistributionList"), // static group
group(true, true, AttributeClass.group, com.zimbra.soap.type.TargetType.group, "DynamicGroup"), // dynamic group
domain(true, false, AttributeClass.domain, com.zimbra.soap.type.TargetType.domain, "Domain"),
server(true, false, AttributeClass.server, com.zimbra.soap.type.TargetType.server, "Server"),
ucservice(true, false, AttributeClass.ucService, com.zimbra.soap.type.TargetType.ucservice, "UCService"),
xmppcomponent(true, false, AttributeClass.xmppComponent, com.zimbra.soap.type.TargetType.xmppcomponent, "XMPPComponent"),
zimlet(true, false, AttributeClass.zimletEntry, com.zimbra.soap.type.TargetType.zimlet, "Zimlet"),
config(false, false, AttributeClass.globalConfig, com.zimbra.soap.type.TargetType.config, "GlobalConfig"),
global(false, false, AttributeClass.aclTarget, com.zimbra.soap.type.TargetType.global, "GlobalGrant");
private boolean mNeedsTargetIdentity;
private boolean mIsDomained;
private AttributeClass mAttrClass;
private com.zimbra.soap.type.TargetType jaxbTargetType;
private String mPrettyName;
//
// mInheritedByTargetTypes and mInheritFromTargetTypes represents
// the same fact from two opposite directions
//
// set of target types that can inherit from this target type
// e.g. if this target type is domain, the set would be
// account, calresource, dl, group, domain
private Set<TargetType> mInheritedByTargetTypes;
// set of target types this target type can inherit from
// e.g. if this target type is domain, the set would be
// globalGrant, domain
private Set<TargetType> mInheritFromTargetTypes;
// pretty much like mInheritedByTargetTypes, but this is for LDAP
// search of sub-targets of a target type. This Set is different
// from the mInheritedByTargetTypes that it does not contain self
private Set<TargetType> mSubTargetTypes;
static {
init();
}
TargetType(boolean NeedsTargetIdentity, boolean isDomained,
AttributeClass attrClass,
com.zimbra.soap.type.TargetType jaxbTargetType,
String prettyName) {
mNeedsTargetIdentity = NeedsTargetIdentity;
mIsDomained = isDomained;
mAttrClass = attrClass;
this.jaxbTargetType = jaxbTargetType;
mPrettyName = prettyName;
}
/* return equivalent JAXB enum */
public com.zimbra.soap.type.TargetType toJaxb() {
return jaxbTargetType;
}
public static TargetType fromJaxb(com.zimbra.soap.type.TargetType jaxbTT) {
for (TargetType tt :TargetType.values()) {
if (tt.toJaxb() == jaxbTT) {
return tt;
}
}
throw new IllegalArgumentException("Unrecognised TargetType" + jaxbTT);
}
private void setInheritedByTargetTypes(TargetType[] targetTypes) {
mInheritedByTargetTypes = new HashSet<TargetType>(Arrays.asList(targetTypes));
}
static void init() {
TargetType.account.setInheritedByTargetTypes(
new TargetType[]{account});
TargetType.calresource.setInheritedByTargetTypes(
new TargetType[]{calresource});
TargetType.dl.setInheritedByTargetTypes(
new TargetType[]{account, calresource, dl});
TargetType.group.setInheritedByTargetTypes(
new TargetType[]{account, calresource, group});
TargetType.domain.setInheritedByTargetTypes(
new TargetType[]{account, calresource, dl, group, domain});
TargetType.cos.setInheritedByTargetTypes(
new TargetType[]{cos});
TargetType.server.setInheritedByTargetTypes(
new TargetType[]{server});
TargetType.ucservice.setInheritedByTargetTypes(
new TargetType[]{ucservice});
TargetType.xmppcomponent.setInheritedByTargetTypes(
new TargetType[]{xmppcomponent});
TargetType.zimlet.setInheritedByTargetTypes(
new TargetType[]{zimlet});
TargetType.config.setInheritedByTargetTypes(
new TargetType[]{config});
TargetType.global.setInheritedByTargetTypes(
new TargetType[]{account,
calresource,
cos,
dl,
group,
domain,
server,
ucservice,
xmppcomponent,
zimlet,
config,
global}); // inherited by all
// compute mInheritFromTargetTypes and mSubTargetTypes
// from mInheritedByTargetTypes
for (TargetType inheritFrom : TargetType.values()) {
inheritFrom.mInheritFromTargetTypes = new HashSet<TargetType>();
inheritFrom.mSubTargetTypes = new HashSet<TargetType>();
for (TargetType inheritedBy : TargetType.values()) {
if (inheritedBy.mInheritedByTargetTypes.contains(inheritFrom)) {
inheritFrom.mInheritFromTargetTypes.add(inheritedBy);
}
}
for (TargetType tt: inheritFrom.mInheritedByTargetTypes) {
if (inheritFrom != tt) {
inheritFrom.mSubTargetTypes.add(tt);
}
}
}
for (TargetType tt : TargetType.values()) {
tt.mInheritedByTargetTypes = Collections.unmodifiableSet(tt.mInheritedByTargetTypes);
tt.mInheritFromTargetTypes = Collections.unmodifiableSet(tt.mInheritFromTargetTypes);
tt.mSubTargetTypes = Collections.unmodifiableSet(tt.mSubTargetTypes);
}
/*
for (TargetType tt : TargetType.values()) {
tt.dump();
}
*/
}
private void dump() {
System.out.println();
System.out.println(mPrettyName);
System.out.println("mInheritedByTargetTypes");
for (TargetType tt : mInheritedByTargetTypes) {
System.out.println(" " + tt);
}
System.out.println("mInheritFromTargetTypes");
for (TargetType tt : mInheritFromTargetTypes) {
System.out.println(" " + tt);
}
System.out.println("mSubTargetTypes");
for (TargetType tt : mSubTargetTypes) {
System.out.println(" " + tt);
}
}
/**
* returns if targetType can inherit from this targetType
*
* @param targetType the targetType of question
* @return
*/
boolean isInheritedBy(TargetType targetType) {
return mInheritedByTargetTypes.contains(targetType);
}
/**
* returns the set of sub target types this target type can be inherited by.
* do not include the target type itself.
*
* e.g. if this is domain, then account, calresource, and dl will be returned
*
* @return
*/
Set<TargetType> subTargetTypes() {
return mSubTargetTypes;
}
/**
* returns the set of target types this target type can inherit from
* @return
*/
Set<TargetType> inheritFrom() {
return mInheritFromTargetTypes;
}
public static boolean canBeInheritedFrom(Entry target) throws ServiceException {
TargetType targetType = TargetType.getTargetType(target);
return !targetType.subTargetTypes().isEmpty();
}
public static TargetType fromCode(String s) throws ServiceException {
try {
return TargetType.valueOf(s);
} catch (IllegalArgumentException e) {
throw ServiceException.INVALID_REQUEST("unknown target type: " + s, e);
}
}
public String getCode() {
return name();
}
public String getPrettyName() {
return mPrettyName;
}
public boolean needsTargetIdentity() {
return mNeedsTargetIdentity;
}
AttributeClass getAttributeClass() {
return mAttrClass;
}
public static Entry lookupTarget(Provisioning prov, TargetType targetType,
TargetBy targetBy, String target) throws ServiceException {
return lookupTarget(prov, targetType, targetBy, target, true);
}
public static Entry lookupTarget(Provisioning prov, TargetType targetType,
TargetBy targetBy, String target, boolean mustFind) throws ServiceException {
return lookupTarget(prov, targetType, targetBy, target, false, mustFind);
}
/**
* central place where a target should be loaded
*
* @param prov
* @param targetType
* @param targetBy
* @param target
* @return
* @throws ServiceException
*/
public static Entry lookupTarget(Provisioning prov, TargetType targetType,
TargetBy targetBy, String target, boolean needFullDL, boolean mustFind)
throws ServiceException {
Entry targetEntry = null;
switch (targetType) {
case account:
targetEntry = prov.get(AccountBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_ACCOUNT(target);
}
break;
case calresource:
targetEntry = prov.get(Key.CalendarResourceBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_CALENDAR_RESOURCE(target);
}
break;
case dl:
if (needFullDL) {
targetEntry = prov.getGroup(Key.DistributionListBy.fromString(targetBy.name()), target);
} else {
targetEntry = prov.getGroupBasic(Key.DistributionListBy.fromString(targetBy.name()), target);
}
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_DISTRIBUTION_LIST(target);
}
break;
case group:
targetEntry = prov.getGroupBasic(Key.DistributionListBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_DISTRIBUTION_LIST(target);
}
break;
case domain:
targetEntry = prov.get(Key.DomainBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_DOMAIN(target);
}
break;
case cos:
targetEntry = prov.get(Key.CosBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_COS(target);
}
break;
case server:
targetEntry = prov.get(Key.ServerBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_SERVER(target);
}
break;
case ucservice:
targetEntry = prov.get(Key.UCServiceBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_UC_SERVICE(target);
}
break;
case xmppcomponent:
targetEntry = prov.get(Key.XMPPComponentBy.fromString(targetBy.name()), target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_XMPP_COMPONENT(target);
}
break;
case zimlet:
Key.ZimletBy zimletBy = Key.ZimletBy.fromString(targetBy.name());
if (zimletBy != Key.ZimletBy.name) {
throw ServiceException.INVALID_REQUEST("zimlet must be by name", null);
}
targetEntry = prov.getZimlet(target);
if (targetEntry == null && mustFind) {
throw AccountServiceException.NO_SUCH_ZIMLET(target);
}
break;
case config:
targetEntry = prov.getConfig();
break;
case global:
targetEntry = prov.getGlobalGrant();
break;
default:
ServiceException.INVALID_REQUEST("invallid target type for lookupTarget:" + targetType.toString(), null);
}
return targetEntry;
}
public static Set<String> getAttrsInClass(Entry target) throws ServiceException {
AttributeClass klass = TargetType.getAttributeClass(target);
return AttributeManager.getInstance().getAllAttrsInClass(klass);
}
static AttributeClass getAttributeClass(Entry target) throws ServiceException {
return TargetType.getTargetType(target).getAttributeClass();
}
public static TargetType getTargetType(Entry target) throws ServiceException{
if (target instanceof CalendarResource)
return TargetType.calresource;
else if (target instanceof Account)
return TargetType.account;
else if (target instanceof Domain)
return TargetType.domain;
else if (target instanceof Cos)
return TargetType.cos;
else if (target instanceof DistributionList)
return TargetType.dl;
else if (target instanceof DynamicGroup)
return TargetType.group;
else if (target instanceof Server)
return TargetType.server;
else if (target instanceof UCService)
return TargetType.ucservice;
else if (target instanceof Config)
return TargetType.config;
else if (target instanceof GlobalGrant)
return TargetType.global;
else if (target instanceof Zimlet)
return TargetType.zimlet;
else if (target instanceof XMPPComponent)
return TargetType.xmppcomponent;
else
throw ServiceException.FAILURE("internal error, target is : " +
(target==null?"null":target.getClass().getCanonicalName()), null);
}
boolean isDomained() {
return mIsDomained;
}
public boolean isGroup() {
return (this == TargetType.dl || this == TargetType.group);
}
public static String getId(Entry target) {
return (target instanceof NamedEntry)? ((NamedEntry)target).getId() : null;
}
public static Domain getTargetDomain(Provisioning prov, Entry target)
throws ServiceException{
if (target instanceof CalendarResource) {
CalendarResource cr = (CalendarResource)target;
return prov.getDomain(cr);
} else if (target instanceof Account) {
Account acct = (Account)target;
return prov.getDomain(acct);
} else if (target instanceof DistributionList) {
DistributionList dl = (DistributionList)target;
return prov.getDomain(dl);
} else if (target instanceof DynamicGroup) {
DynamicGroup group = (DynamicGroup)target;
return prov.getDomain(group);
} else
return null;
}
public static String getTargetDomainName(Provisioning prov, Entry target)
throws ServiceException{
if (target instanceof CalendarResource) {
CalendarResource cr = (CalendarResource)target;
return cr.getDomainName();
} else if (target instanceof Account) {
Account acct = (Account)target;
return acct.getDomainName();
} else if (target instanceof DistributionList) {
DistributionList dl = (DistributionList)target;
return dl.getDomainName();
} else if (target instanceof DynamicGroup) {
DynamicGroup group = (DynamicGroup)target;
return group.getDomainName();
} else {
return null;
}
}
static String getSearchBase(Provisioning prov, TargetType tt)
throws ServiceException {
LdapDIT dit = ((LdapProv)prov).getDIT();
String base;
switch (tt) {
case account:
case calresource:
case dl:
case group:
base = dit.mailBranchBaseDN();
break;
case domain:
base = dit.domainBaseDN();
break;
case cos:
base = dit.cosBaseDN();
break;
case server:
base = dit.serverBaseDN();
break;
case ucservice:
base = dit.ucServiceBaseDN();
break;
case xmppcomponent:
base = dit.xmppcomponentBaseDN();
break;
case zimlet:
base = dit.zimletBaseDN();
break;
case config:
base = dit.configDN();
break;
case global:
// is really an internal error, globalgrant should never appear in the
// targetTypes if we get here, because it is not a sub-target of any
// other target types.
base = dit.globalGrantDN();
break;
default:
throw ServiceException.FAILURE("internal error", null);
}
return base;
}
static class SearchBaseAndOC {
String mBase;
List<String> mOCs;
}
/*
* This method is called for searching for negative grants granted on a
* "sub-target" of a target on which we are granting a right. If the
* granting account has any negative grants for a right that is a
* "sub-right" of the right he is trying to grant to someone else,
* and this negative grant is on a "sub-target" of the target he is
* trying to grant on, then sorry, it is not allowed. Because otherwise
* the person receiving the grant can end up getting "more" rights
* than the granting person.
*
* e.g. on domain D.com, adminA +domainAdminRights
* on dl <EMAIL>, adminA -setPassword
*
* When adminA tries to grant domainAdminRights to adminB on
* domain D.com, it should not be allowed; otherwise adminB
* can setPassword for accounts in <EMAIL>, but adminA cannot.
*
* The targetTypes parameter contains a set of target types that are
* "sub-target" of the target type on which we are trying to grant.
*
* SO, for the search base:
* - for domain-ed targets, dls must be under the domain, but accounts
* in dls can be in any domain, so the search base is the mail branch base.
* - for non domain-ed targets, the search base is the base DN for the type
*
* we go through all wanted target types, find the least common base
*/
static Map<String, Set<String>> getSearchBasesAndOCs(Provisioning prov,
Set<TargetType> targetTypes) throws ServiceException {
// sanity check, is really an internal error if targetTypes is empty
if (targetTypes.isEmpty())
return null;
Map<String, Set<String>> tempResult = new HashMap<String, Set<String>>();
for (TargetType tt : targetTypes) {
String base = getSearchBase(prov, tt);
String oc = tt.getAttributeClass().getOCName();
Set<String> ocs = tempResult.get(base);
if (ocs == null) {
ocs = new HashSet<String>();
tempResult.put(base, ocs);
}
ocs.add(oc);
}
// optimize
LdapDIT dit = ((LdapProv)prov).getDIT();
String configBranchBase = dit.configBranchBaseDN();
Set<String> mailBranchOCs = new HashSet<String>();
Set<String> configBranchOCs = new HashSet<String>();
String leastCommonBaseInMailBranch = null;
String leastCommonBaseInConfigBranch = null;
for (Map.Entry<String, Set<String>> entry : tempResult.entrySet()) {
String base = entry.getKey();
Set<String> ocs = entry.getValue();
boolean inConfigBranch = base.endsWith(configBranchBase);
if (inConfigBranch) {
configBranchOCs.addAll(ocs);
if (leastCommonBaseInConfigBranch == null) {
leastCommonBaseInConfigBranch = base;
} else {
leastCommonBaseInConfigBranch =
getCommonBase(base, leastCommonBaseInConfigBranch);
}
} else {
mailBranchOCs.addAll(ocs);
if (leastCommonBaseInMailBranch == null) {
leastCommonBaseInMailBranch = base;
} else {
leastCommonBaseInMailBranch =
getCommonBase(base, leastCommonBaseInMailBranch);
}
}
}
Map<String, Set<String>> result = new HashMap<String, Set<String>>();
// if zimbra default DIT and both mail branch and config branch are needed, merge the two
if (LdapDIT.isZimbraDefault(dit)) {
if (leastCommonBaseInMailBranch != null && leastCommonBaseInConfigBranch != null) {
// merge the two
String commonBase = getCommonBase(leastCommonBaseInMailBranch,
leastCommonBaseInConfigBranch);
Set<String> allOCs = SetUtil.union(mailBranchOCs, configBranchOCs);
result.put(commonBase, allOCs);
return result;
}
}
// bug 48272, do two searches, one based at the mail branch, one based on the config branch.
if (leastCommonBaseInMailBranch != null) {
result.put(leastCommonBaseInMailBranch, mailBranchOCs);
}
if (leastCommonBaseInConfigBranch != null) {
result.put(leastCommonBaseInConfigBranch, configBranchOCs);
}
return result;
}
static String getCommonBase(String dn1, String dn2) {
String top = "";
if (top.equals(dn1) || top.equals(dn2))
return top;
String[] rdns1 = dn1.split(",");
String[] rdns2 = dn2.split(",");
String[] shorter = rdns1.length < rdns2.length? rdns1 : rdns2;
int i = 0;
while (i < shorter.length) {
if (!rdns1[rdns1.length-1-i].equals(rdns2[rdns2.length-1-i]))
break;
else;
i++;
}
StringBuilder sb = new StringBuilder();
for (int j = shorter.length - i; j < shorter.length; j++) {
if (j != shorter.length - i)
sb.append(",");
sb.append(shorter[j]);
}
return sb.toString();
}
}
|
AtWinner/LunaFramework | viewframework/src/main/java/com/luna/viewframework/CardRefreshLoadmoreLayout.java | package com.luna.viewframework;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
/**
* 自定义下拉刷新(上拉加载)布局
* Upgrade by Hufanglin on 2016/2/20.
*/
public class CardRefreshLoadmoreLayout extends RefreshLoadmoreLayout {
private boolean isLoading;
private boolean isRefreshing;
private int[] imageRes = new int[]{R.mipmap.icon_anim1, R.mipmap.icon_anim2, R.mipmap.icon_anim3, R.mipmap.icon_anim4, R.mipmap.icon_anim5};
private RefeshListener refresh = new RefeshListener();
public CardRefreshLoadmoreLayout(Context context) {
this(context, null);
}
public CardRefreshLoadmoreLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public CardRefreshLoadmoreLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
private void init() {
setRefreshView(R.layout.card_refresh_normal, refresh);
setLoadmoreView(R.layout.loadmore_normal, new LoadmoreListener());
setAnimationDuration(300);
// setSucessOrFailedDuration(300);
}
private class RefeshListener implements RefreshViewListener {
private ImageView refreshImageLoad;
private AnimationDrawable animationDrawable;
private TextView txtRefresh;
private boolean pull_min1 = true;
private boolean pull_max1 = false;
private RefeshListener() {
}
@Override
public void onPulling(View refreshView, float percent) {
findView(refreshView);
Log.e("percent", "" + percent);
if (percent <= 1) {
int index = (int) (percent * 10);
index = index - 5;
if (index < 0) {
index = 0;
}
if (index >= imageRes.length) {
index = imageRes.length - 1;
}
refreshImageLoad.setImageResource(imageRes[index]);
txtRefresh.setText("下拉刷新");
/*numberCircleProgressBar.setProgress((int) (percent * 100));
if (pull_max1) {
textView.setText("下拉刷新");
// arrowView.startAnimation(mRotateDownAnim);
}*/
pull_min1 = true;
pull_max1 = false;
} else {
/*if (pull_min1) {
textView.setText("松开刷新");
numberCircleProgressBar.setProgress(100);
// arrowView.startAnimation(mRotateUpAnim);
}*/
refreshImageLoad.setImageResource(imageRes[imageRes.length - 1]);
txtRefresh.setText("松开刷新");
pull_min1 = false;
pull_max1 = true;
}
}
@Override
public void onReset(View refreshView) {
findView(refreshView);
txtRefresh.setText("下拉刷新");
}
@Override
public void onRefresh(View refreshView) {
findView(refreshView);
// arrowView.clearAnimation();
// arrowView.setVisibility(View.INVISIBLE);
/*numberCircleProgressBar.setVisibility(View.GONE);
progressBar.setVisibility(View.VISIBLE);
textView.setText("正在刷新");*/
refreshImageLoad.setImageResource(R.drawable.image_load_anim);
animationDrawable = (AnimationDrawable) refreshImageLoad.getDrawable();
animationDrawable.start();
txtRefresh.setText("正在刷新");
isRefreshing = true;
}
@Override
public void onSuccess(View refreshView) {
findView(refreshView);
// arrowView.setVisibility(View.GONE);
/*numberCircleProgressBar.setVisibility(View.GONE);
progressBar.setVisibility(View.GONE);
textView.setText("刷新成功");*/
if (animationDrawable != null)
animationDrawable.stop();
txtRefresh.setText("刷新成功");
isRefreshing = false;
}
@Override
public void onFailed(View refreshView) {
findView(refreshView);
// arrowView.setVisibility(View.GONE);
/*numberCircleProgressBar.setVisibility(View.GONE);
progressBar.setVisibility(View.GONE);
textView.setText("刷新失败");*/
if (animationDrawable != null)
animationDrawable.stop();
txtRefresh.setText("刷新失败");
isRefreshing = false;
}
private void findView(View fartherView) {
if (refreshImageLoad == null || txtRefresh == null) {
txtRefresh = (TextView) fartherView.findViewById(R.id.txtRefresh);
refreshImageLoad = (ImageView) fartherView.findViewById(R.id.refreshImageLoad);
}
/* if (numberCircleProgressBar == null || textView == null || progressBar == null) {
numberCircleProgressBar = (NumberCircleProgressBar) fartherView
.findViewById(R.id.numberCircleProgressBar);
textView = (TextView) fartherView
.findViewById(R.id.refresh_textview);
progressBar = (ProgressBar) fartherView
.findViewById(R.id.refresh_progressbar);
}*/
}
}
private class LoadmoreListener implements LoadmoreViewListener {
private TextView textView;
private ProgressBar progressBar;
@Override
public void onPulling(View loadmoreView, float percent) {
findView(loadmoreView);
if (percent < 1) {
textView.setText("上拉加载");
} else {
textView.setText("松开加载");
}
}
@Override
public void onReset(View loadmoreView) {
findView(loadmoreView);
progressBar.setVisibility(View.GONE);
textView.setText("上拉加载");
}
@Override
public void onLoadmore(View loadmoreView) {
findView(loadmoreView);
progressBar.setVisibility(View.VISIBLE);
textView.setText("正在加载");
isLoading = true;
}
@Override
public void onSuccess(View loadmoreView) {
findView(loadmoreView);
progressBar.setVisibility(View.GONE);
textView.setText("加载成功");
isLoading = false;
}
@Override
public void onFailed(View loadmoreView) {
findView(loadmoreView);
progressBar.setVisibility(View.GONE);
textView.setText("加载失败");
isLoading = false;
}
private void findView(View fartherView) {
if (textView == null || progressBar == null) {
textView = (TextView) fartherView
.findViewById(R.id.loadmore_textview);
progressBar = (ProgressBar) fartherView
.findViewById(R.id.loadmore_progressbar);
}
}
}
/**
* 手动开始刷新
*/
public void startRefresh() {
View v = LayoutInflater.from(this.getContext()).inflate(R.layout.card_refresh_normal, (ViewGroup) null);
refresh.onRefresh(v);
}
public boolean isLoading() {
return isLoading;
}
public boolean isRefreshing() {
return isRefreshing;
}
} |
CoderSong2015/Apache-Trafodion | core/sql/langman/LmRoutineJava.h | <filename>core/sql/langman/LmRoutineJava.h
#ifndef LMROUTINEJAVA_H
#define LMROUTINEJAVA_H
/* -*-C++-*-
**********************************************************************
*
* File: LmRoutineJava.h
* Description:
*
* Created: 08/22/2003
* Language: C++
*
// @@@ START COPYRIGHT @@@
//
// 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.
//
// @@@ END COPYRIGHT @@@
**********************************************************************/
#include "ComSmallDefs.h"
#include "NABoolean.h"
#include "LmRoutine.h"
#include "LmLangManagerJava.h"
#include "LmParameter.h"
#include "LmJavaType.h"
#include "LmContManager.h"
#include "LmResultSetJava.h"
#include "LmConnection.h"
//////////////////////////////////////////////////////////////////////
//
// LmRoutineJava
//
// The LmRoutineJava is a concrete class used to maintain state for,
// and the invocation of, a static Java method. Its base class
// representation is returned by the LMJ as a handle to LM clients.
//
//////////////////////////////////////////////////////////////////////
class LmRoutineJava : public LmRoutine
{
friend class LmLanguageManagerJava;
friend class LmJavaExceptionReporter;
public:
// Deletes the given LmResultSet object.
virtual void cleanupLmResultSet(LmResultSet *resultSet,
ComDiagsArea *diagsArea = NULL);
// Deletes the LmResultSet object at a given index.
void cleanupLmResultSet(ComUInt32 index,
ComDiagsArea *diagsArea = NULL);
// Deletes the LmResultSetJava objects in the resultSetList_
void cleanupResultSets(ComDiagsArea *diagsArea = NULL);
// Main routine invocation method and its support methods.
virtual LmResult invokeRoutine(void *inputRow,
void *outputRow,
ComDiagsArea *da);
// A flag to indicate whether the default catalog and schema should
// be set in the Java environment prior to invokeRoutine
void setDefaultCatSchFlag(NABoolean value) { defaultCatSch_ = value; }
NABoolean getDefaultCatSchFlag() const { return defaultCatSch_; }
protected:
LmRoutineJava(
const char *sqlName,
const char *externalName,
const char *librarySqlName,
ComUInt32 numSqlParam,
LmParameter *returnValue,
ComUInt32 maxResultSets,
char *routineSig,
ComRoutineParamStyle paramStyle,
ComRoutineTransactionAttributes transactionAttrs,
ComRoutineSQLAccess sqlAccessMode,
ComRoutineExternalSecurity externalSecurity,
Int32 routineOwnerId,
const char *parentQid,
ComUInt32 inputRowLen,
ComUInt32 outputRowLen,
const char *currentUserName,
const char *sessionUserName,
LmParameter *parameters,
LmLanguageManagerJava *lm,
LmHandle routine,
LmContainer *container,
ComDiagsArea *diagsArea);
virtual ~LmRoutineJava();
// Utilities.
LmHandle getContainerHandle()
{ return container()->getHandle(); }
inline void setUdrForJavaMain(ComBoolean main)
{ udrForJavaMain_ = main; }
inline ComBoolean isUdrForJavaMain() const
{ return udrForJavaMain_; }
inline void setIsInternalSPJ(ComBoolean internal)
{ udrForInternalSPJ_ = internal; }
inline ComBoolean isInternalSPJ() const
{ return udrForInternalSPJ_; }
virtual ComBoolean isValid() const;
// This method invokes a static Java method that returns void. In
// the future if we need to support Java methods that return a value
// (for example, for Java UDFs) new methods can be created.
LmResult voidRoutine(void*, LmParameter*);
// This method creates a LmResultSet object for the passed in
// Java result set only when the result set is not null, not closed
// and not a duplicate. The newly created LmResultSet object is
// added to a NAList data structure.
LmResult populateResultSetInfo(LmHandle rs, Int32 paramPos, ComDiagsArea *da);
// Checks if the passed in Java result set object is already
// part of a LmResultSet object in the result set list.
NABoolean isDuplicateRS( LmHandle newRs );
// Deletes the LmResultSetJava objects in resultSetList_
// over and above the routine's decalred max result set value
void deleteLmResultSetsOverMax(ComDiagsArea *diagsArea);
void closeDefConnWithNoRS(ComDiagsArea *diagsArea = NULL);
virtual LmLanguageManagerJava *getLM()
{ return (LmLanguageManagerJava *) lm_; }
virtual LmResult handleFinalCall(ComDiagsArea *diagsArea = NULL);
private:
LmResult generateDefAuthToken(char *defAuthToken, ComDiagsArea *da);
private:
void *javaParams_; // Java method parameters (array of jvalue).
LmJavaType::Type retType_; // Routine return type.
ComBoolean udrForJavaMain_; // Routine is for Java main()
ComBoolean udrForInternalSPJ_; // Routine for internal SPJ
NABoolean defaultCatSch_; // flag that tells if cat & sch
// need to be set
// List of LmConnection objects for default and non-default
// Java connection objects created during the SPJ's invocation.
NAList<LmConnection*> connectionList_;
}; // class LmRoutineJava
#endif
|
hugo-paiva/IntroducaoCienciasDaComputacao | Lista6/Lista6ex2.py | convidados = []
for _ in range(int(input())):
convidados.append(input())
if 'André' in convidados:
print('Cuidado!')
else:
print('Seguro!')
|
ZP-Hust/MITK | Modules/IGTUI/Qmitk/QmitkNDIAbstractDeviceWidget.cpp | /*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "QmitkNDIAbstractDeviceWidget.h"
#include <QThread>
const std::string QmitkNDIAbstractDeviceWidget::VIEW_ID = "org.mitk.views.NDIAbstractDeviceWidget";
QmitkNDIAbstractDeviceWidget::QmitkNDIAbstractDeviceWidget(QWidget* parent, Qt::WindowFlags f)
: QmitkAbstractTrackingDeviceWidget(parent, f)
, m_ScanPortsWorker(new QmitkTrackingDeviceConfigurationWidgetScanPortsWorker())
, m_ScanPortsWorkerThread(new QThread())
{
}
void QmitkNDIAbstractDeviceWidget::InitializeNDIWidget()
{
InitializeSuperclassWidget();
CreateConnections();
}
QmitkNDIAbstractDeviceWidget::~QmitkNDIAbstractDeviceWidget()
{
if (m_ScanPortsWorker) delete m_ScanPortsWorker;
if (m_ScanPortsWorkerThread) delete m_ScanPortsWorkerThread;
}
void QmitkNDIAbstractDeviceWidget::CreateConnections()
{
//slots for the worker thread
connect(m_ScanPortsWorker, SIGNAL(PortsScanned(int, QString, int)), this, SLOT(AutoScanPortsFinished(int, QString, int)));
connect(m_ScanPortsWorkerThread, SIGNAL(started()), m_ScanPortsWorker, SLOT(ScanPortsThreadFunc()));
}
void QmitkNDIAbstractDeviceWidget::AutoScanPorts()
{
this->setEnabled(false);
AddOutput("<br>Scanning...");
m_ScanPortsWorkerThread->start();
}
void QmitkNDIAbstractDeviceWidget::AutoScanPortsFinished(int Port, QString result, int PortType)
{
m_ScanPortsWorkerThread->quit();
#ifdef WIN32
if (PortType != -1) { MITK_WARN << "Port type is specified although this should not be the case for Windows. Ignoring port type."; }
#else //linux systems
SetPortTypeToGUI(PortType);
#endif
SetPortValueToGUI(Port);
AddOutput(result.toStdString());
this->setEnabled(true);
}
|
elinor-fung/coreclr | src/vm/eventpipesession.h | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __EVENTPIPE_SESSION_H__
#define __EVENTPIPE_SESSION_H__
#ifdef FEATURE_PERFTRACING
enum class EventPipeEventLevel;
struct EventPipeProviderConfiguration;
class EventPipeSessionProviderList;
class EventPipeSessionProvider;
enum class EventPipeSessionType
{
File,
Streaming
};
class EventPipeSession
{
private:
// The set of configurations for each provider in the session.
EventPipeSessionProviderList *m_pProviderList;
// The configured size of the circular buffer.
size_t m_circularBufferSizeInBytes;
// True if rundown is enabled.
Volatile<bool> m_rundownEnabled;
// The type of the session.
// This determines behavior within the system (e.g. policies around which events to drop, etc.)
EventPipeSessionType m_sessionType;
// Start date and time in UTC.
FILETIME m_sessionStartTime;
// Start timestamp.
LARGE_INTEGER m_sessionStartTimeStamp;
// The maximum trace length in seconds. Used to determine when to flush the current file and start a new one.
UINT64 m_multiFileTraceLengthInSeconds;
public:
// TODO: This needs to be exposed via EventPipe::CreateSession() and EventPipe::DeleteSession() to avoid memory ownership issues.
EventPipeSession(
EventPipeSessionType sessionType,
unsigned int circularBufferSizeInMB,
EventPipeProviderConfiguration *pProviders,
unsigned int numProviders,
UINT64 multiFileTraceLengthInSeconds);
~EventPipeSession();
// Determine if the session is valid or not. Invalid sessions can be detected before they are enabled.
bool IsValid() const;
// Get the session type.
EventPipeSessionType GetSessionType() const
{
LIMITED_METHOD_CONTRACT;
return m_sessionType;
}
// Get the configured size of the circular buffer.
size_t GetCircularBufferSize() const
{
LIMITED_METHOD_CONTRACT;
return m_circularBufferSizeInBytes;
}
// Determine if rundown is enabled.
bool RundownEnabled() const
{
LIMITED_METHOD_CONTRACT;
return m_rundownEnabled;
}
// Set the rundown enabled flag.
void SetRundownEnabled(bool value)
{
LIMITED_METHOD_CONTRACT;
m_rundownEnabled = value;
}
// Get the session start time in UTC.
FILETIME GetStartTime() const
{
LIMITED_METHOD_CONTRACT;
return m_sessionStartTime;
}
// Get the session start timestamp.
LARGE_INTEGER GetStartTimeStamp() const
{
LIMITED_METHOD_CONTRACT;
return m_sessionStartTimeStamp;
}
UINT64 GetMultiFileTraceLengthInSeconds() const
{
LIMITED_METHOD_CONTRACT;
return m_multiFileTraceLengthInSeconds;
}
// Add a new provider to the session.
void AddSessionProvider(EventPipeSessionProvider *pProvider);
// Get the session provider for the specified provider if present.
EventPipeSessionProvider* GetSessionProvider(EventPipeProvider *pProvider);
};
class EventPipeSessionProviderList
{
private:
// The list of providers.
SList<SListElem<EventPipeSessionProvider*>> *m_pProviders;
// A catch-all provider used when tracing is enabled for all events.
EventPipeSessionProvider *m_pCatchAllProvider;
public:
// Create a new list based on the input.
EventPipeSessionProviderList(EventPipeProviderConfiguration *pConfigs, unsigned int numConfigs);
~EventPipeSessionProviderList();
// Add a new session provider to the list.
void AddSessionProvider(EventPipeSessionProvider *pProvider);
// Get the session provider for the specified provider.
// Return NULL if one doesn't exist.
EventPipeSessionProvider* GetSessionProvider(EventPipeProvider *pProvider);
// Returns true if the list is empty.
bool IsEmpty() const;
};
class EventPipeSessionProvider
{
private:
// The provider name.
WCHAR *m_pProviderName;
// The enabled keywords.
UINT64 m_keywords;
// The loging level.
EventPipeEventLevel m_loggingLevel;
// The filter data.
WCHAR *m_pFilterData;
public:
EventPipeSessionProvider(
LPCWSTR providerName,
UINT64 keywords,
EventPipeEventLevel loggingLevel,
LPCWSTR filterData);
~EventPipeSessionProvider();
LPCWSTR GetProviderName() const;
UINT64 GetKeywords() const;
EventPipeEventLevel GetLevel() const;
LPCWSTR GetFilterData() const;
};
#endif // FEATURE_PERFTRACING
#endif // __EVENTPIPE_SESSION_H__
|
curiosityyy/SubgraphMatchGPU | src/preprocess/mt-metis-0.7.2/wildriver/src/IRowMatrixWriter.hpp | /**
* @file IRowMatrixWriter.hpp
* @brief An interface for writing out matrices row by row.
* @author <NAME> <<EMAIL>>
* Copyright 2017, Solid Lake LLC
* @version 1
* @date 2017-07-26
*/
#ifndef WILDRIVER_IROWMATRIXWRITER_HPP
#define WILDRIVER_IROWMATRIXWRITER_HPP
#include "base.h"
namespace WildRiver
{
class IRowMatrixWriter
{
public:
/**
* @brief Destructor.
*/
virtual ~IRowMatrixWriter()
{
// do nothing
}
/**
* @brief Write the header of this matrix file. The header consists of
* internal fields set by "setInfo()".
*/
virtual void writeHeader(
dim_t nrows,
dim_t ncols,
ind_t nnz) = 0;
/**
* @brief Set the next row in the matrix file.
*
* @param numNonZeros The number of non-zeros in the row.
* @param columns The column IDs.
* @param values The values.
*/
virtual void setNextRow(
dim_t numNonZeros,
dim_t const * columns,
val_t const * values) = 0;
};
}
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.