code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
# Asarum nipponicum var. nipponicum VARIETY #### Status ACCEPTED #### According to NUB Generator [autonym] #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Piperales/Aristolochiaceae/Asarum/Asarum nipponicum/Asarum nipponicum nipponicum/README.md
Markdown
apache-2.0
175
# Copyright 2021, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Federated CIFAR-10 classification library using TFF.""" import functools from typing import Callable, Optional from absl import logging import tensorflow as tf import tensorflow_federated as tff from fedopt_guide import training_loop from utils.datasets import cifar10_dataset from utils.models import resnet_models CIFAR_SHAPE = (32, 32, 3) NUM_CLASSES = 100 def run_federated( iterative_process_builder: Callable[..., tff.templates.IterativeProcess], client_epochs_per_round: int, client_batch_size: int, clients_per_round: int, client_datasets_random_seed: Optional[int] = None, crop_size: Optional[int] = 24, total_rounds: Optional[int] = 1500, experiment_name: Optional[str] = 'federated_cifar10', root_output_dir: Optional[str] = '/tmp/fed_opt', uniform_weighting: Optional[bool] = False, **kwargs): """Runs an iterative process on the CIFAR-10 classification task. This method will load and pre-process dataset and construct a model used for the task. It then uses `iterative_process_builder` to create an iterative process that it applies to the task, using `federated_research.utils.training_loop`. We assume that the iterative process has the following functional type signatures: * `initialize`: `( -> S@SERVER)` where `S` represents the server state. * `next`: `<S@SERVER, {B*}@CLIENTS> -> <S@SERVER, T@SERVER>` where `S` represents the server state, `{B*}` represents the client datasets, and `T` represents a python `Mapping` object. The iterative process must also have a callable attribute `get_model_weights` that takes as input the state of the iterative process, and returns a `tff.learning.ModelWeights` object. Args: iterative_process_builder: A function that accepts a no-arg `model_fn`, and returns a `tff.templates.IterativeProcess`. The `model_fn` must return a `tff.learning.Model`. client_epochs_per_round: An integer representing the number of epochs of training performed per client in each training round. client_batch_size: An integer representing the batch size used on clients. clients_per_round: An integer representing the number of clients participating in each round. client_datasets_random_seed: An optional int used to seed which clients are sampled at each round. If `None`, no seed is used. crop_size: An optional integer representing the resulting size of input images after preprocessing. total_rounds: The number of federated training rounds. experiment_name: The name of the experiment being run. This will be appended to the `root_output_dir` for purposes of writing outputs. root_output_dir: The name of the root output directory for writing experiment outputs. uniform_weighting: Whether to weigh clients uniformly. If false, clients are weighted by the number of samples. **kwargs: Additional arguments configuring the training loop. For details on supported arguments, see `federated_research/utils/training_utils.py`. """ crop_shape = (crop_size, crop_size, 3) cifar_train, _ = cifar10_dataset.get_federated_datasets( train_client_epochs_per_round=client_epochs_per_round, train_client_batch_size=client_batch_size, crop_shape=crop_shape) _, cifar_test = cifar10_dataset.get_centralized_datasets( crop_shape=crop_shape) input_spec = cifar_train.create_tf_dataset_for_client( cifar_train.client_ids[0]).element_spec model_builder = functools.partial( resnet_models.create_resnet18, input_shape=crop_shape, num_classes=NUM_CLASSES) loss_builder = tf.keras.losses.SparseCategoricalCrossentropy metrics_builder = lambda: [tf.keras.metrics.SparseCategoricalAccuracy()] def tff_model_fn() -> tff.learning.Model: return tff.learning.from_keras_model( keras_model=model_builder(), input_spec=input_spec, loss=loss_builder(), metrics=metrics_builder()) if uniform_weighting: client_weight_fn = tff.learning.ClientWeighting.UNIFORM else: client_weight_fn = tff.learning.ClientWeighting.NUM_EXAMPLES training_process = iterative_process_builder(tff_model_fn, client_weight_fn) client_datasets_fn = functools.partial( tff.simulation.build_uniform_sampling_fn( dataset=cifar_train.client_ids, random_seed=client_datasets_random_seed), # pytype: disable=wrong-keyword-args # gen-stub-imports size=clients_per_round) evaluate_fn = tff.learning.build_federated_evaluation( tff_model_fn, use_experimental_simulation_loop=True) def validation_fn(model_weights, round_num): del round_num return evaluate_fn(model_weights, [cifar_test]) def test_fn(model_weights): return evaluate_fn(model_weights, [cifar_test]) logging.info('Training model:') logging.info(model_builder().summary()) training_loop.run( iterative_process=training_process, train_client_datasets_fn=client_datasets_fn, evaluation_fn=validation_fn, test_fn=test_fn, total_rounds=total_rounds, experiment_name=experiment_name, root_output_dir=root_output_dir, **kwargs)
google-research/federated
fedopt_guide/cifar10_resnet/federated_cifar10.py
Python
apache-2.0
5,796
/* ========================================================================= * * Boarder * * http://boarder.mikuz.org/ * * ========================================================================= * * Copyright (C) 2013 Boarder * * * * 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 fi.mikuz.boarder.util; import org.acra.ACRA; import android.content.Context; import android.os.Looper; import android.util.Log; import android.widget.Toast; public abstract class ContextUtils { private static final String TAG = ContextUtils.class.getSimpleName(); public static void toast(Context context, String toast) { toast(context, toast, Toast.LENGTH_SHORT); } public static void toast(Context context, String toast, int duration) { String errLogMsg = "Unable to toast message: \"" + toast + "\""; if (Looper.myLooper() == null) { Exception e = new IllegalStateException("Not running in a looper"); Log.e(TAG, errLogMsg, e); ACRA.getErrorReporter().handleException(e); } else if (Looper.myLooper() != Looper.getMainLooper()) { Exception e = new IllegalStateException("Not running in the main looper"); Log.e(TAG, errLogMsg, e); ACRA.getErrorReporter().handleException(e); } else { try { Toast.makeText(context, toast, duration).show(); } catch (NullPointerException e) { Log.e(TAG, errLogMsg, e); } } } }
Mikuz/Boarder
src/fi/mikuz/boarder/util/ContextUtils.java
Java
apache-2.0
2,556
#include <iostream> #include <iomanip> #include <cstdint> #include <typeinfo> #include "color/color.hpp" int main( int argc, char *argv[] ) { using namespace color; using namespace std; cout << "gray<std::uint8_t > is: " << typeid( trait::component< gray< std::uint8_t >::category_type >::instance_type ).name() << endl; cout << "gray<std::uint32_t> is: " << typeid( trait::component< gray< std::uint32_t >::category_type >::instance_type ).name() << endl; cout << "gray<float > is: " << typeid( trait::component< gray< float >::category_type >::instance_type ).name() << endl; cout << "gray<double > is: " << typeid( trait::component< gray< double >::category_type >::instance_type ).name() << endl; cout << "gray<long double > is: " << typeid( trait::component< gray< long double >::category_type >::instance_type ).name() << endl; return EXIT_SUCCESS; }
dmilos/color
example/less-than-1k/trait/component/gray.cpp
C++
apache-2.0
928
# AUTOGENERATED FILE FROM balenalib/nanopi-neo-air-alpine:3.10-build ENV NODE_VERSION 14.16.1 ENV YARN_VERSION 1.22.4 # Install dependencies RUN apk add --no-cache libgcc libstdc++ libuv \ && apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1 RUN for key in \ 6A010C5166006599AA17F08146C2130DFD2497F5 \ ; do \ gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \ done \ && curl -SLO "http://resin-packages.s3.amazonaws.com/node/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7hf-alpine.tar.gz" \ && echo "0d7d74264cbd457d1f54e4dcb6407a4b4b4602055d66e0a2cdec8bd635af8f59 node-v$NODE_VERSION-linux-armv7hf-alpine.tar.gz" | sha256sum -c - \ && tar -xzf "node-v$NODE_VERSION-linux-armv7hf-alpine.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$NODE_VERSION-linux-armv7hf-alpine.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && mkdir -p /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && npm config set unsafe-perm true -g --unsafe-perm \ && rm -rf /tmp/* CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/[email protected]" \ && echo "Running test-stack@node" \ && chmod +x [email protected] \ && bash [email protected] \ && rm -rf [email protected] RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Alpine Linux 3.10 \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v14.16.1, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && ln -f /bin/sh /bin/sh.real \ && ln -f /bin/sh-shim /bin/sh
nghiant2710/base-images
balena-base-images/node/nanopi-neo-air/alpine/3.10/14.16.1/build/Dockerfile
Dockerfile
apache-2.0
2,961
/* * Copyright 2017 StreamSets Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.streamsets.pipeline.kafka.impl; import com.streamsets.pipeline.api.Record; import com.streamsets.pipeline.api.Stage; import com.streamsets.pipeline.api.StageException; import com.streamsets.pipeline.config.DataFormat; import com.streamsets.pipeline.kafka.api.PartitionStrategy; import com.streamsets.pipeline.kafka.api.SdcKafkaProducer; import com.streamsets.pipeline.lib.kafka.KafkaErrors; import com.streamsets.pipeline.lib.kafka.exception.KafkaConnectionException; import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Properties; public class KafkaProducer08 implements SdcKafkaProducer { private static final Logger LOG = LoggerFactory.getLogger(KafkaProducer08.class); private static final String METADATA_BROKER_LIST_KEY = "metadata.broker.list"; private static final String KEY_SERIALIZER_CLASS_KEY = "key.serializer.class"; private static final String PRODUCER_TYPE_KEY = "producer.type"; private static final String PRODUCER_TYPE_DEFAULT = "sync"; private static final String SERIALIZER_CLASS_KEY = "serializer.class"; private static final String REQUEST_REQUIRED_ACKS_KEY = "request.required.acks"; private static final String REQUEST_REQUIRED_ACKS_DEFAULT = "1"; private static final String DEFAULT_ENCODER_CLASS = "kafka.serializer.DefaultEncoder"; private static final String STRING_ENCODER_CLASS = "kafka.serializer.StringEncoder"; private static final String PARTITIONER_CLASS_KEY = "partitioner.class"; private static final String RANDOM_PARTITIONER_CLASS = "com.streamsets.pipeline.kafka.impl.RandomPartitioner"; private static final String ROUND_ROBIN_PARTITIONER_CLASS = "com.streamsets.pipeline.kafka.impl.RoundRobinPartitioner"; private static final String EXPRESSION_PARTITIONER_CLASS = "com.streamsets.pipeline.kafka.impl.ExpressionPartitioner"; /*Topic to readData from*/ /*Host on which the seed broker is running*/ private final String metadataBrokerList; private final Map<String, Object> kafkaProducerConfigs; private final DataFormat producerPayloadType; private final PartitionStrategy partitionStrategy; private List<KeyedMessage> messageList; private Producer producer; public KafkaProducer08( String metadataBrokerList, DataFormat producerPayloadType, PartitionStrategy partitionStrategy, Map<String, Object> kafkaProducerConfigs ) { this.metadataBrokerList = metadataBrokerList; this.producerPayloadType = producerPayloadType; this.partitionStrategy = partitionStrategy; this.messageList = new ArrayList<>(); this.kafkaProducerConfigs = kafkaProducerConfigs; } @Override public void init() throws StageException { Properties props = new Properties(); //metadata.broker.list props.put(METADATA_BROKER_LIST_KEY, metadataBrokerList); //producer.type props.put(PRODUCER_TYPE_KEY, PRODUCER_TYPE_DEFAULT); //key.serializer.class props.put(KEY_SERIALIZER_CLASS_KEY, STRING_ENCODER_CLASS); //partitioner.class configurePartitionStrategy(props, partitionStrategy); //serializer.class configureSerializer(props, producerPayloadType); //request.required.acks props.put(REQUEST_REQUIRED_ACKS_KEY, REQUEST_REQUIRED_ACKS_DEFAULT); addUserConfiguredProperties(props); ProducerConfig config = new ProducerConfig(props); producer = new Producer<>(config); } @Override public void destroy() { if(producer != null) { producer.close(); } } @Override public String getVersion() { return Kafka08Constants.KAFKA_VERSION; } @Override public void enqueueMessage(String topic, Object message, Object messageKey) { //Topic could be a record EL string. This is not a good place to evaluate expression //Hence get topic as parameter messageList.add(new KeyedMessage<>(topic, messageKey, message)); } @Override public void clearMessages() { messageList.clear(); } @Override public List<Record> write(Stage.Context context) throws StageException { try { producer.send(messageList); messageList.clear(); } catch (Exception e) { //Producer internally refreshes metadata and retries if there is any recoverable exception. //If retry fails, a FailedToSendMessageException is thrown. //In this case we want to fail pipeline. LOG.error(KafkaErrors.KAFKA_50.getMessage(), e.toString(), e); throw new KafkaConnectionException(KafkaErrors.KAFKA_50, e.toString(), e); } return Collections.emptyList(); } private void configureSerializer(Properties props, DataFormat producerPayloadType) { if(producerPayloadType == DataFormat.TEXT) { props.put(SERIALIZER_CLASS_KEY, DEFAULT_ENCODER_CLASS); } } private void configurePartitionStrategy(Properties props, PartitionStrategy partitionStrategy) { if (partitionStrategy == PartitionStrategy.RANDOM) { props.put(PARTITIONER_CLASS_KEY, RANDOM_PARTITIONER_CLASS); } else if (partitionStrategy == PartitionStrategy.ROUND_ROBIN) { props.put(PARTITIONER_CLASS_KEY, ROUND_ROBIN_PARTITIONER_CLASS); } else if (partitionStrategy == PartitionStrategy.EXPRESSION) { props.put(PARTITIONER_CLASS_KEY, EXPRESSION_PARTITIONER_CLASS); } else if (partitionStrategy == PartitionStrategy.DEFAULT) { //default partitioner class } } private void addUserConfiguredProperties(Properties props) { //The following options, if specified, are ignored : "metadata.broker.list", "producer.type", // "key.serializer.class", "partitioner.class", "serializer.class". if (kafkaProducerConfigs != null && !kafkaProducerConfigs.isEmpty()) { kafkaProducerConfigs.remove(METADATA_BROKER_LIST_KEY); kafkaProducerConfigs.remove(KEY_SERIALIZER_CLASS_KEY); kafkaProducerConfigs.remove(SERIALIZER_CLASS_KEY); for (Map.Entry<String, Object> producerConfig : kafkaProducerConfigs.entrySet()) { props.put(producerConfig.getKey(), producerConfig.getValue()); } } } }
kunickiaj/datacollector
sdc-kafka_0_8/src/main/java/com/streamsets/pipeline/kafka/impl/KafkaProducer08.java
Java
apache-2.0
6,836
/* * Copyright 2014-2019 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://aws.amazon.com/apache2.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. */ package com.amazonaws.services.docdb.model.transform; import java.util.ArrayList; import javax.xml.stream.events.XMLEvent; import javax.annotation.Generated; import com.amazonaws.services.docdb.model.*; import com.amazonaws.transform.Unmarshaller; import com.amazonaws.transform.StaxUnmarshallerContext; import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*; /** * Event StAX Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EventStaxUnmarshaller implements Unmarshaller<Event, StaxUnmarshallerContext> { public Event unmarshall(StaxUnmarshallerContext context) throws Exception { Event event = new Event(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return event; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SourceIdentifier", targetDepth)) { event.setSourceIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("SourceType", targetDepth)) { event.setSourceType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Message", targetDepth)) { event.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("EventCategories", targetDepth)) { event.withEventCategories(new ArrayList<String>()); continue; } if (context.testExpression("EventCategories/EventCategory", targetDepth)) { event.withEventCategories(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Date", targetDepth)) { event.setDate(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; } if (context.testExpression("SourceArn", targetDepth)) { event.setSourceArn(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return event; } } } } private static EventStaxUnmarshaller instance; public static EventStaxUnmarshaller getInstance() { if (instance == null) instance = new EventStaxUnmarshaller(); return instance; } }
jentfoo/aws-sdk-java
aws-java-sdk-docdb/src/main/java/com/amazonaws/services/docdb/model/transform/EventStaxUnmarshaller.java
Java
apache-2.0
3,623
package com.gentics.mesh.changelog.changes; import static com.gentics.mesh.core.data.relationship.GraphRelationships.SCHEMA_CONTAINER_VERSION_KEY_PROPERTY; import com.gentics.mesh.changelog.AbstractChange; import com.tinkerpop.blueprints.Direction; /** * Changelog entry which removed the schema version edges with properties */ public class ReplaceSchemaVersionEdges extends AbstractChange { @Override public String getUuid() { return "E737684330534623B768433053C623F2"; } @Override public String getName() { return "ReplaceSchemaVersionEdges"; } @Override public String getDescription() { return "Replaces edges from node content to schema versions with properties."; } @Override public void applyInTx() { replaceSingleEdge("NodeGraphFieldContainerImpl", Direction.OUT, "HAS_SCHEMA_CONTAINER_VERSION", SCHEMA_CONTAINER_VERSION_KEY_PROPERTY); } }
gentics/mesh
changelog-system/src/main/java/com/gentics/mesh/changelog/changes/ReplaceSchemaVersionEdges.java
Java
apache-2.0
877
package sl.hr_client; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
862573026/SchoolHRProj
Android/HRAM_SNU_App/hr-client/src/androidTest/java/sl/hr_client/ApplicationTest.java
Java
apache-2.0
343
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. // Licensed under the Apache License, Version 2.0. using System; #if Q8 using QuantumType = System.Byte; #elif Q16 using QuantumType = System.UInt16; #elif Q16HDRI using QuantumType = System.Single; #else #error Not implemented! #endif namespace ImageMagick { /// <summary> /// Class that represents a HSV color. /// </summary> public sealed class ColorHSV : ColorBase { /// <summary> /// Initializes a new instance of the <see cref="ColorHSV"/> class. /// </summary> /// <param name="hue">Hue component value of this color.</param> /// <param name="saturation">Saturation component value of this color.</param> /// <param name="value">Value component value of this color.</param> public ColorHSV(double hue, double saturation, double value) : base(new MagickColor(0, 0, 0)) { Hue = hue; Saturation = saturation; Value = value; } private ColorHSV(IMagickColor<QuantumType> color) : base(color) { Initialize(color.R, color.G, color.B); } /// <summary> /// Gets or sets the hue component value of this color. /// </summary> public double Hue { get; set; } /// <summary> /// Gets or sets the saturation component value of this color. /// </summary> public double Saturation { get; set; } /// <summary> /// Gets or sets the value component value of this color. /// </summary> public double Value { get; set; } /// <summary> /// Converts the specified <see cref="MagickColor"/> to an instance of this type. /// </summary> /// <param name="color">The color to use.</param> /// <returns>A <see cref="ColorHSV"/> instance.</returns> public static implicit operator ColorHSV?(MagickColor color) => FromMagickColor(color); /// <summary> /// Converts the specified <see cref="IMagickColor{QuantumType}"/> to an instance of this type. /// </summary> /// <param name="color">The color to use.</param> /// <returns>A <see cref="ColorHSV"/> instance.</returns> public static ColorHSV? FromMagickColor(IMagickColor<QuantumType> color) { if (color == null) return null; return new ColorHSV(color); } /// <summary> /// Performs a hue shift with the specified degrees. /// </summary> /// <param name="degrees">The degrees.</param> public void HueShift(double degrees) { Hue += degrees / 360.0; while (Hue >= 1.0) Hue -= 1.0; while (Hue < 0.0) Hue += 1.0; } /// <summary> /// Updates the color value in an inherited class. /// </summary> protected override void UpdateColor() { if (Math.Abs(Saturation) < double.Epsilon) { Color.R = Color.G = Color.B = Quantum.ScaleToQuantum(Value); return; } var h = 6.0 * (Hue - Math.Floor(Hue)); var f = h - Math.Floor(h); var p = Value * (1.0 - Saturation); var q = Value * (1.0 - (Saturation * f)); var t = Value * (1.0 - (Saturation * (1.0 - f))); switch ((int)h) { case 0: default: Color.R = Quantum.ScaleToQuantum(Value); Color.G = Quantum.ScaleToQuantum(t); Color.B = Quantum.ScaleToQuantum(p); break; case 1: Color.R = Quantum.ScaleToQuantum(q); Color.G = Quantum.ScaleToQuantum(Value); Color.B = Quantum.ScaleToQuantum(p); break; case 2: Color.R = Quantum.ScaleToQuantum(p); Color.G = Quantum.ScaleToQuantum(Value); Color.B = Quantum.ScaleToQuantum(t); break; case 3: Color.R = Quantum.ScaleToQuantum(p); Color.G = Quantum.ScaleToQuantum(q); Color.B = Quantum.ScaleToQuantum(Value); break; case 4: Color.R = Quantum.ScaleToQuantum(t); Color.G = Quantum.ScaleToQuantum(p); Color.B = Quantum.ScaleToQuantum(Value); break; case 5: Color.R = Quantum.ScaleToQuantum(Value); Color.G = Quantum.ScaleToQuantum(p); Color.B = Quantum.ScaleToQuantum(q); break; } } private void Initialize(double red, double green, double blue) { Hue = 0.0; Saturation = 0.0; Value = 0.0; var min = Math.Min(Math.Min(red, green), blue); var max = Math.Max(Math.Max(red, green), blue); if (Math.Abs(max) < double.Epsilon) return; var delta = max - min; Saturation = delta / max; Value = (1.0 / Quantum.Max) * max; if (Math.Abs(delta) < double.Epsilon) return; if (Math.Abs(red - max) < double.Epsilon) Hue = (green - blue) / delta; else if (Math.Abs(green - max) < double.Epsilon) Hue = 2.0 + ((blue - red) / delta); else Hue = 4.0 + ((red - green) / delta); Hue /= 6.0; if (Hue < 0.0) Hue += 1.0; } } }
dlemstra/Magick.NET
src/Magick.NET/Colors/ColorHSV.cs
C#
apache-2.0
5,867
package cc.mallet.util; /** * Static utility methods for Strings */ final public class Strings { public static int commonPrefixIndex (String[] strings) { int prefixLen = strings[0].length(); for (int i = 1; i < strings.length; i++) { if (strings[i].length() < prefixLen) prefixLen = strings[i].length(); int j = 0; if (prefixLen == 0) return 0; while (j < prefixLen) { if (strings[i-1].charAt(j) != strings[i].charAt(j)) { prefixLen = j; break; } j++; } } return prefixLen; } public static String commonPrefix (String[] strings) { return strings[0].substring (0, commonPrefixIndex(strings)); } public static int count (String string, char ch) { int idx = -1; int count = 0; while ((idx = string.indexOf (ch, idx+1)) >= 0) { count++; }; return count; } public static double levenshteinDistance (String s, String t) { int n = s.length(); int m = t.length(); int d[][]; // matrix int i; // iterates through s int j; // iterates through t char s_i; // ith character of s char t_j; // jth character of t int cost; // cost if (n == 0) return 1.0; if (m == 0) return 1.0; d = new int[n+1][m+1]; for (i = 0; i <= n; i++) d[i][0] = i; for (j = 0; j <= m; j++) d[0][j] = j; for (i = 1; i <= n; i++) { s_i = s.charAt (i - 1); for (j = 1; j <= m; j++) { t_j = t.charAt (j - 1); cost = (s_i == t_j) ? 0 : 1; d[i][j] = minimum (d[i-1][j]+1, d[i][j-1]+1, d[i-1][j-1] + cost); } } int longer = (n > m) ? n : m; return (double)d[n][m] / longer; // Normalize to 0-1. } private static int minimum (int a, int b, int c) { int mi = a; if (b < mi) { mi = b; } if (c < mi) { mi = c; } return mi; } }
UnsupervisedOntologyLearning/hrLDA
hrLDA/src/cc/mallet/util/Strings.java
Java
apache-2.0
1,930
package org.museautomation.core.step; import org.jetbrains.annotations.*; import org.museautomation.core.*; import org.museautomation.core.context.*; import org.museautomation.core.step.descriptor.*; import org.museautomation.core.steptask.*; import org.museautomation.core.values.*; import org.museautomation.core.values.descriptor.*; import java.util.*; /** * Executes the steps contained within a Macro. * * Note that this does NOT execute those steps within a separate variable scope, despite this class extending * ScopedGroup. It overrides #isCreateNewVariableScope to disable that behavior. That seems a bit strange, but * CallFunction builds on the basic function of CallMacroStep and it needs to be scoped. We need multiple-inheritance * to do this cleanly (yuck), but this will have to suffice. * * @see Macro * @author Christopher L Merrill (see LICENSE.txt for license details) */ @MuseTypeId("callmacro") @MuseStepName("Macro") @MuseInlineEditString("call macro {id}") @MuseStepIcon("glyph:FontAwesome:EXTERNAL_LINK") @MuseStepTypeGroup("Structure") @MuseStepLongDescription("The 'id' source is resolved to a string and used to find the macro in the project. The steps within the macro are then executed as children of the call-macro step, within the same variable scope as the parent. This means that steps within the macro have access to the same variables as the caller.") @MuseSubsourceDescriptor(displayName = "Macro name", description = "The name (resource id) of the macro to call", type = SubsourceDescriptor.Type.Named, name = CallMacroStep.ID_PARAM) public class CallMacroStep extends ScopedGroup { @SuppressWarnings("unused") // called via reflection public CallMacroStep(StepConfiguration config, MuseProject project) { super(config, project); _config = config; _project = project; } @Override protected StepExecutionContext createStepExecutionContextForChildren(StepExecutionContext context) throws MuseExecutionError { String id = getStepsId(context); ContainsStep resource = _project.getResourceStorage().getResource(id, ContainsStep.class); if (resource == null) throw new StepExecutionError("unable to locate project resource, id=" + id); StepConfiguration step = resource.getStep(); List<StepConfiguration> steps; if (step.getChildren() != null && step.getChildren().size() > 0) steps = step.getChildren(); else { steps = new ArrayList<>(); steps.add(step); } context.getStepLocator().loadSteps(steps); context.raiseEvent(DynamicStepLoadingEventType.create(_config, steps)); return new ListOfStepsExecutionContext(context.getParent(), steps, isCreateNewVariableScope(), this); } /** * Get the id of the project resource that contains the steps that should be run. */ @NotNull @SuppressWarnings("WeakerAccess") protected String getStepsId(StepExecutionContext context) throws MuseExecutionError { MuseValueSource id_source = getValueSource(_config, ID_PARAM, true, context.getProject()); return BaseValueSource.getValue(id_source, context, false, String.class); } @Override protected boolean isCreateNewVariableScope() { return false; } protected MuseProject _project; private StepConfiguration _config; public final static String ID_PARAM = "id"; public final static String TYPE_ID = CallMacroStep.class.getAnnotation(MuseTypeId.class).value(); }
ChrisLMerrill/muse
core/src/main/java/org/museautomation/core/step/CallMacroStep.java
Java
apache-2.0
3,625
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.diff.impl.patch.formove; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diff.impl.patch.FilePatch; import com.intellij.openapi.diff.impl.patch.TextFilePatch; import com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchBase; import com.intellij.openapi.diff.impl.patch.apply.ApplyFilePatchFactory; import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.fileTypes.FileTypes; import com.intellij.openapi.fileTypes.ex.FileTypeChooser; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.ThrowableComputable; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.*; import com.intellij.openapi.vcs.changes.patch.RelativePathCalculator; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.ContainerUtil; import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.CalledInAwt; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.IOException; import java.util.*; public class PathsVerifier { // in private final Project myProject; private final VirtualFile myBaseDirectory; private final List<FilePatch> myPatches; // temp private final Map<VirtualFile, MovedFileData> myMovedFiles; private final List<FilePath> myBeforePaths; private final List<VirtualFile> myCreatedDirectories; // out private final List<PatchAndFile> myTextPatches; private final List<PatchAndFile> myBinaryPatches; @NotNull private final List<VirtualFile> myWritableFiles; private final ProjectLevelVcsManager myVcsManager; private final List<FilePatch> mySkipped; private DelayedPrecheckContext myDelayedPrecheckContext; private final List<FilePath> myAddedPaths; private final List<FilePath> myDeletedPaths; private boolean myIgnoreContentRootsCheck; public PathsVerifier(@NotNull Project project, @NotNull VirtualFile baseDirectory, @NotNull List<FilePatch> patches) { myProject = project; myBaseDirectory = baseDirectory; myPatches = patches; myMovedFiles = new HashMap<>(); myBeforePaths = new ArrayList<>(); myCreatedDirectories = new ArrayList<>(); myTextPatches = new ArrayList<>(); myBinaryPatches = new ArrayList<>(); myWritableFiles = new ArrayList<>(); myVcsManager = ProjectLevelVcsManager.getInstance(myProject); mySkipped = new ArrayList<>(); myAddedPaths = new ArrayList<>(); myDeletedPaths = new ArrayList<>(); } // those to be moved to CL: target + created dirs public List<FilePath> getDirectlyAffected() { final List<FilePath> affected = new ArrayList<>(); addAllFilePath(myCreatedDirectories, affected); addAllFilePath(myWritableFiles, affected); affected.addAll(myBeforePaths); return affected; } // old parents of moved files public List<VirtualFile> getAllAffected() { final List<VirtualFile> affected = new ArrayList<>(); affected.addAll(myCreatedDirectories); affected.addAll(myWritableFiles); // after files' parent for (VirtualFile file : myMovedFiles.keySet()) { final VirtualFile parent = file.getParent(); if (parent != null) { affected.add(parent); } } // before.. for (FilePath path : myBeforePaths) { final FilePath parent = path.getParentPath(); if (parent != null) { affected.add(parent.getVirtualFile()); } } return affected; } private static void addAllFilePath(final Collection<VirtualFile> files, final Collection<FilePath> paths) { for (VirtualFile file : files) { paths.add(VcsUtil.getFilePath(file)); } } @CalledInAwt public List<FilePatch> nonWriteActionPreCheck() { List<FilePatch> failedToApply = ContainerUtil.newArrayList(); myDelayedPrecheckContext = new DelayedPrecheckContext(myProject); for (FilePatch patch : myPatches) { final CheckPath checker = getChecker(patch); if (!checker.canBeApplied(myDelayedPrecheckContext)) { revert(checker.getErrorMessage()); failedToApply.add(patch); } } final Collection<FilePatch> skipped = myDelayedPrecheckContext.doDelayed(); mySkipped.addAll(skipped); myPatches.removeAll(skipped); myPatches.removeAll(failedToApply); return failedToApply; } public List<FilePatch> getSkipped() { return mySkipped; } public List<FilePatch> execute() { List<FilePatch> failedPatches = ContainerUtil.newArrayList(); try { final List<CheckPath> checkers = new ArrayList<>(myPatches.size()); for (FilePatch patch : myPatches) { final CheckPath checker = getChecker(patch); checkers.add(checker); } for (CheckPath checker : checkers) { if (!checker.check()) { failedPatches.add(checker.getPatch()); revert(checker.getErrorMessage()); } } } catch (IOException e) { revert(e.getMessage()); } myPatches.removeAll(failedPatches); return failedPatches; } private CheckPath getChecker(final FilePatch patch) { final String beforeFileName = patch.getBeforeName(); final String afterFileName = patch.getAfterName(); if (beforeFileName == null || patch.isNewFile()) { return new CheckAdded(patch); } else if (afterFileName == null || patch.isDeletedFile()) { return new CheckDeleted(patch); } else if (!beforeFileName.equals(afterFileName)) { return new CheckMoved(patch); } else { return new CheckModified(patch); } } public Collection<FilePath> getToBeAdded() { return myAddedPaths; } public Collection<FilePath> getToBeDeleted() { return myDeletedPaths; } @NotNull public Collection<FilePatch> filterBadFileTypePatches() { List<PatchAndFile> failedTextPatches = ContainerUtil.findAll(myTextPatches, textPatch -> !isFileTypeOk(textPatch.getFile())); myTextPatches.removeAll(failedTextPatches); return ContainerUtil.map(failedTextPatches, patchInfo -> patchInfo.getApplyPatch().getPatch()); } private boolean isFileTypeOk(@NotNull VirtualFile file) { if (file.isDirectory()) { PatchApplier .showError(myProject, "Cannot apply content for " + file.getPresentableName() + " file from patch because it is directory."); return false; } FileType fileType = file.getFileType(); if (fileType == FileTypes.UNKNOWN) { fileType = FileTypeChooser.associateFileType(file.getName()); if (fileType == null) { PatchApplier .showError(myProject, "Cannot apply content for " + file.getPresentableName() + " file from patch because its type not defined."); return false; } } if (fileType.isBinary()) { PatchApplier.showError(myProject, "Cannot apply file " + file.getPresentableName() + " from patch because it is binary."); return false; } return true; } private class CheckModified extends CheckDeleted { private CheckModified(final FilePatch path) { super(path); } } private class CheckDeleted extends CheckPath { protected CheckDeleted(final FilePatch path) { super(path); } @Override protected boolean precheck(final VirtualFile beforeFile, final VirtualFile afterFile, DelayedPrecheckContext context) { if (beforeFile == null) { context.addSkip(getMappedFilePath(myBeforeName), myPatch); } return true; } @Override protected boolean check() { final VirtualFile beforeFile = getMappedFile(myBeforeName); if (! checkExistsAndValid(beforeFile, myBeforeName)) { return false; } addPatch(myPatch, beforeFile); FilePath filePath = VcsUtil.getFilePath(beforeFile.getParent(), beforeFile.getName(), beforeFile.isDirectory()); if (myPatch.isDeletedFile() || myPatch.getAfterName() == null) { myDeletedPaths.add(filePath); } myBeforePaths.add(filePath); return true; } } private class CheckAdded extends CheckPath { private CheckAdded(final FilePatch path) { super(path); } @Override protected boolean precheck(final VirtualFile beforeFile, final VirtualFile afterFile, DelayedPrecheckContext context) { if (afterFile != null) { context.addOverrideExisting(myPatch, VcsUtil.getFilePath(afterFile)); } return true; } @Override public boolean check() throws IOException { final String[] pieces = RelativePathCalculator.split(myAfterName); final VirtualFile parent = makeSureParentPathExists(pieces); if (parent == null) { setErrorMessage(fileNotFoundMessage(myAfterName)); return false; } String name = pieces[pieces.length - 1]; File afterFile = new File(parent.getPath(), name); //if user already accepted overwriting, we shouldn't have created a new one final VirtualFile file = myDelayedPrecheckContext.getOverridenPaths().contains(VcsUtil.getFilePath(afterFile)) ? parent.findChild(name) : createFile(parent, name); if (file == null) { setErrorMessage(fileNotFoundMessage(myAfterName)); return false; } myAddedPaths.add(VcsUtil.getFilePath(file)); if (! checkExistsAndValid(file, myAfterName)) { return false; } addPatch(myPatch, file); return true; } } private class CheckMoved extends CheckPath { private CheckMoved(final FilePatch path) { super(path); } // before exists; after does not exist @Override protected boolean precheck(final VirtualFile beforeFile, final VirtualFile afterFile, final DelayedPrecheckContext context) { if (beforeFile == null) { setErrorMessage(fileNotFoundMessage(myBeforeName)); } else if (afterFile != null) { setErrorMessage(fileAlreadyExists(afterFile.getPath())); } return beforeFile != null && afterFile == null; } @Override public boolean check() throws IOException { final String[] pieces = RelativePathCalculator.split(myAfterName); final VirtualFile afterFileParent = makeSureParentPathExists(pieces); if (afterFileParent == null) { setErrorMessage(fileNotFoundMessage(myAfterName)); return false; } final VirtualFile beforeFile = getMappedFile(myBeforeName); if (! checkExistsAndValid(beforeFile, myBeforeName)) { return false; } assert beforeFile != null; // if beforeFile is null then checkExist returned false; myMovedFiles.put(beforeFile, new MovedFileData(afterFileParent, beforeFile, myPatch.getAfterFileName())); addPatch(myPatch, beforeFile); return true; } } private abstract class CheckPath { protected final String myBeforeName; protected final String myAfterName; protected final FilePatch myPatch; private String myErrorMessage; CheckPath(final FilePatch path) { myPatch = path; myBeforeName = path.getBeforeName(); myAfterName = path.getAfterName(); } public String getErrorMessage() { return myErrorMessage; } public void setErrorMessage(final String errorMessage) { myErrorMessage = errorMessage; } public boolean canBeApplied(DelayedPrecheckContext context) { final VirtualFile beforeFile = getMappedFile(myBeforeName); final VirtualFile afterFile = getMappedFile(myAfterName); return precheck(beforeFile, afterFile, context); } protected abstract boolean precheck(final VirtualFile beforeFile, final VirtualFile afterFile, DelayedPrecheckContext context); protected abstract boolean check() throws IOException; protected boolean checkExistsAndValid(final VirtualFile file, final String name) { if (file == null) { setErrorMessage(fileNotFoundMessage(name)); return false; } return checkModificationValid(file, name); } protected boolean checkModificationValid(final VirtualFile file, final String name) { if (ApplicationManager.getApplication().isUnitTestMode() && myIgnoreContentRootsCheck) return true; // security check to avoid overwriting system files with a patch if (file == null || !inContent(file) || myVcsManager.getVcsRootFor(file) == null) { setErrorMessage("File to patch found outside content root: " + name); return false; } return true; } @Nullable protected VirtualFile getMappedFile(String path) { return PathMerger.getFile(myBaseDirectory, path); } protected FilePath getMappedFilePath(String path) { return PathMerger.getFile(VcsUtil.getFilePath(myBaseDirectory), path); } private boolean inContent(VirtualFile file) { return myVcsManager.isFileInContent(file); } public FilePatch getPatch() { return myPatch; } } private void addPatch(final FilePatch patch, final VirtualFile file) { if (patch instanceof TextFilePatch) { myTextPatches.add(new PatchAndFile(file, ApplyFilePatchFactory.create((TextFilePatch)patch))); } else { myBinaryPatches.add(new PatchAndFile(file, ApplyFilePatchFactory.createGeneral(patch))); } myWritableFiles.add(file); } private static String fileNotFoundMessage(final String path) { return VcsBundle.message("cannot.find.file.to.patch", path); } private static String fileAlreadyExists(final String path) { return VcsBundle.message("cannot.apply.file.already.exists", path); } private void revert(final String errorMessage) { PatchApplier.showError(myProject, errorMessage); // move back /*for (MovedFileData movedFile : myMovedFiles) { try { final VirtualFile current = movedFile.getCurrent(); final VirtualFile newParent = current.getParent(); final VirtualFile file; if (! Comparing.equal(newParent, movedFile.getOldParent())) { file = moveFile(current, movedFile.getOldParent()); } else { file = current; } if (! Comparing.equal(current.getName(), movedFile.getOldName())) { file.rename(PatchApplier.class, movedFile.getOldName()); } } catch (IOException e) { // ignore: revert as much as possible } } // go back ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { for (int i = myCreatedDirectories.size() - 1; i >= 0; -- i) { final VirtualFile file = myCreatedDirectories.get(i); try { file.delete(PatchApplier.class); } catch (IOException e) { // ignore } } } }); myBinaryPatches.clear(); myTextPatches.clear(); myWritableFiles.clear();*/ } private static VirtualFile createFile(final VirtualFile parent, final String name) throws IOException { return parent.createChildData(PatchApplier.class, name); /*final Ref<IOException> ioExceptionRef = new Ref<IOException>(); final Ref<VirtualFile> result = new Ref<VirtualFile>(); ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { try { result.set(parent.createChildData(PatchApplier.class, name)); } catch (IOException e) { ioExceptionRef.set(e); } } }); if (! ioExceptionRef.isNull()) { throw ioExceptionRef.get(); } return result.get();*/ } private static VirtualFile moveFile(final VirtualFile file, final VirtualFile newParent) throws IOException { file.move(FilePatch.class, newParent); return file; /*final Ref<IOException> ioExceptionRef = new Ref<IOException>(); ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { try { file.move(FilePatch.class, newParent); } catch (IOException e) { ioExceptionRef.set(e); } } }); if (! ioExceptionRef.isNull()) { throw ioExceptionRef.get(); } return file;*/ } @Nullable private VirtualFile makeSureParentPathExists(final String[] pieces) throws IOException { VirtualFile child = myBaseDirectory; final int size = pieces.length - 1; for (int i = 0; i < size; i++) { final String piece = pieces[i]; if (StringUtil.isEmptyOrSpaces(piece)) { continue; } if ("..".equals(piece)) { child = child.getParent(); continue; } VirtualFile nextChild = child.findChild(piece); if (nextChild == null) { nextChild = VfsUtil.createDirectories(child.getPath() + '/' + piece); myCreatedDirectories.add(nextChild); } child = nextChild; } return child; } public List<PatchAndFile> getTextPatches() { return myTextPatches; } public List<PatchAndFile> getBinaryPatches() { return myBinaryPatches; } @NotNull public List<VirtualFile> getWritableFiles() { return myWritableFiles; } public void doMoveIfNeeded(final VirtualFile file) throws IOException { final MovedFileData movedFile = myMovedFiles.get(file); if (movedFile != null) { myBeforePaths.add(VcsUtil.getFilePath(file)); ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<VirtualFile, IOException>() { @Override public VirtualFile compute() throws IOException { return movedFile.doMove(); } }); } } private static class MovedFileData { private final VirtualFile myNewParent; private final VirtualFile myCurrent; private final String myNewName; private MovedFileData(@NotNull final VirtualFile newParent, @NotNull final VirtualFile current, @NotNull final String newName) { myNewParent = newParent; myCurrent = current; myNewName = newName; } public VirtualFile getCurrent() { return myCurrent; } public VirtualFile getNewParent() { return myNewParent; } public String getNewName() { return myNewName; } public VirtualFile doMove() throws IOException { final VirtualFile oldParent = myCurrent.getParent(); boolean needRename = !Comparing.equal(myCurrent.getName(), myNewName); boolean needMove = !myNewParent.equals(oldParent); if (needRename) { if (needMove) { File oldParentFile = VfsUtilCore.virtualToIoFile(oldParent); File targetAfterRenameFile = new File(oldParentFile, myNewName); if (targetAfterRenameFile.exists() && myCurrent.exists()) { // if there is a conflict during first rename we have to rename to third name, then move, then rename to final target performRenameWithConflicts(oldParentFile); return myCurrent; } } myCurrent.rename(PatchApplier.class, myNewName); } if (needMove) { myCurrent.move(PatchApplier.class, myNewParent); } return myCurrent; } private void performRenameWithConflicts(@NotNull File oldParent) throws IOException { File tmpFileWithUniqueName = FileUtil.createTempFile(oldParent, "tempFileToMove", null, false); File newParentFile = VfsUtilCore.virtualToIoFile(myNewParent); File destFile = new File(newParentFile, tmpFileWithUniqueName.getName()); while (destFile.exists()) { destFile = new File(newParentFile, FileUtil.createTempFile(oldParent, FileUtil.getNameWithoutExtension(destFile.getName()), null, false) .getName()); } myCurrent.rename(PatchApplier.class, destFile.getName()); myCurrent.move(PatchApplier.class, myNewParent); myCurrent.rename(PatchApplier.class, myNewName); } } private static class DelayedPrecheckContext { private final Map<FilePath, FilePatch> mySkipDeleted; private final Map<FilePath, FilePatch> myOverrideExisting; private final List<FilePath> myOverridenPaths; private final Project myProject; private DelayedPrecheckContext(final Project project) { myProject = project; myOverrideExisting = new HashMap<>(); mySkipDeleted = new HashMap<>(); myOverridenPaths = new LinkedList<>(); } public void addSkip(final FilePath path, final FilePatch filePatch) { mySkipDeleted.put(path, filePatch); } public void addOverrideExisting(final FilePatch patch, final FilePath filePath) { if (! myOverrideExisting.containsKey(filePath)) { myOverrideExisting.put(filePath, patch); } } // returns those to be skipped public Collection<FilePatch> doDelayed() { final List<FilePatch> result = new LinkedList<>(); if (! myOverrideExisting.isEmpty()) { final String title = "Overwrite Existing Files"; List<FilePath> files = new ArrayList<>(myOverrideExisting.keySet()); Collection<FilePath> selected = AbstractVcsHelper.getInstance(myProject).selectFilePathsToProcess( files, title, "\nThe following files should be created by patch, but they already exist.\nDo you want to overwrite them?\n", title, "The following file should be created by patch, but it already exists.\nDo you want to overwrite it?\n{0}", VcsShowConfirmationOption.STATIC_SHOW_CONFIRMATION, "Overwrite", "Cancel"); if (selected != null) { for (FilePath path : selected) { myOverrideExisting.remove(path); } } result.addAll(myOverrideExisting.values()); if (selected != null) { myOverridenPaths.addAll(selected); } } result.addAll(mySkipDeleted.values()); return result; } public List<FilePath> getOverridenPaths() { return myOverridenPaths; } public Collection<FilePath> getAlreadyDeletedPaths() { return mySkipDeleted.keySet(); } } public void setIgnoreContentRootsCheck(boolean ignoreContentRootsCheck) { myIgnoreContentRootsCheck = ignoreContentRootsCheck; } public static class PatchAndFile { private final VirtualFile myFile; private final ApplyFilePatchBase<?> myPatch; public PatchAndFile(VirtualFile file, ApplyFilePatchBase<?> patch) { myFile = file; myPatch = patch; } public VirtualFile getFile() { return myFile; } public ApplyFilePatchBase<?> getApplyPatch() { return myPatch; } } }
goodwinnk/intellij-community
platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/formove/PathsVerifier.java
Java
apache-2.0
23,092
f- == fő
nanmar/f-
README.md
Markdown
apache-2.0
11
package com.therabbitmage.android.beacon.network; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URISyntaxException; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.message.BasicHeader; import android.net.Uri; import android.util.Log; import com.therabbitmage.android.beacon.entities.google.urlshortener.Url; public final class URLShortenerAPI { private static final String TAG = URLShortenerAPI.class.getSimpleName(); private static final String BASE_URL = "https://www.googleapis.com/urlshortener/v1/url"; public static NetworkResponse urlShorten(String url) throws IOException, URISyntaxException{ android.net.Uri.Builder uriBuilder = Uri.parse(BASE_URL).buildUpon(); String uri = uriBuilder.build().toString(); Header[] headers = new Header[1]; headers[0] = new BasicHeader(ApacheNetworkUtils.HEADER_CONTENT_TYPE, ApacheNetworkUtils.TYPE_JSON); ApacheNetworkUtils.getAndroidInstance(ApacheNetworkUtils.sUserAgent, false); HttpResponse response = ApacheNetworkUtils.post( uri, ApacheNetworkUtils.getDefaultApacheHeaders(), new Url(url).toJson()); ApacheNetworkUtils.toStringResponseHeaders(response.getAllHeaders()); ApacheNetworkUtils.toStringStatusLine(response.getStatusLine()); HttpEntity entity = response.getEntity(); NetworkResponse networkResponse = new NetworkResponse(); if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK){ networkResponse.setError(0); BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); StringBuilder stringBuilder = new StringBuilder(); String output = new String(); while((output = br.readLine()) != null){ stringBuilder.append(output); } br.close(); Log.i(TAG, "Body: " + stringBuilder.toString()); networkResponse.setUrl(Url.fromJson(stringBuilder.toString())); } else { networkResponse.setError(1); } return networkResponse; } }
GregSaintJean/Beacon
src/com/therabbitmage/android/beacon/network/URLShortenerAPI.java
Java
apache-2.0
2,158
#include "common/common/version.h" std::string VersionInfo::version() { return fmt::format("{}/{}", GIT_SHA.substr(0, 6), #ifdef NDEBUG "RELEASE" #else "DEBUG" #endif ); }
timperrett/envoy
source/common/common/version.cc
C++
apache-2.0
238
/** * Copyright (c) 2015 the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.github.jmnarloch.spring.jaxrs.client.support; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import javax.ws.rs.ext.Provider; import java.util.Arrays; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; /** * Tests the {@link JaxRsClientProxyFactorySupport} class. * * @author Jakub Narloch */ public class JaxRsClientProxyFactorySupportTest { /** * The instance of the tested class. */ private JaxRsClientProxyFactorySupport instance; /** * Sets up the test environment. * * @throws Exception if any error occurs */ @Before public void setUp() throws Exception { instance = new MockJaxRsClientProxyFactorySupport(); } @Test public void shouldRetrieveProviders() { // given final List<JaxRsClientConfigurer> configurers = Arrays.asList( mock(JaxRsClientConfigurer.class), mock(JaxRsClientConfigurer.class) ); for(JaxRsClientConfigurer conf : configurers) { doAnswer(new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { ((ProviderRegistry)invocation.getArguments()[0]).addProvider(SimpleProvider.class); return null; } }).when(conf).registerProviders(any(ProviderRegistry.class)); } instance.setConfigurers(configurers); // when Class<?>[] providers = instance.getProviders(); // then assertNotNull(providers); assertEquals(2, providers.length); } private static class MockJaxRsClientProxyFactorySupport extends JaxRsClientProxyFactorySupport { @Override public <T> T createClientProxy(Class<T> serviceClass, String serviceUrl) { return null; } } /** * A simple provider class used for testing. * * @author Jakub Narloch */ @Provider private static class SimpleProvider { } }
jmnarloch/spring-jax-rs-client-proxy
src/test/java/com/github/jmnarloch/spring/jaxrs/client/support/JaxRsClientProxyFactorySupportTest.java
Java
apache-2.0
2,921
#!/bin/bash #crosscontaminate in=<file,file,...> out=<file,file,...> usage(){ echo " Written by Brian Bushnell Last modified February 17, 2015 Description: Generates synthetic cross-contaminated files from clean files. Intended for use with synthetic reads generated by SynthMDA or RandomReads. Usage: crosscontaminate.sh in=<file,file,...> out=<file,file,...> Parameters and their defaults: Input parameters: in=<file,file,...> Clean input reads. innamefile=<file> A file containing the names of input files, one name per line. interleaved=auto (int) t/f overrides interleaved autodetection. qin=auto Input quality offset: 33 (Sanger), 64, or auto. reads=-1 If positive, quit after processing X reads or pairs. Processing Parameters: minsinks=1 Min contamination destinations from one source. maxsinks=8 Max contamination destinations from one source. minprob=0.000005 Min allowed contamination rate (geometric distribution). maxprob=0.025 Max allowed contamination rate. Output parameters: out=<file,file,...> Contaminated output reads. outnamefile=<file> A file containing the names of output files, one name per line. overwrite=t (ow) Grant permission to overwrite files. #showspeed=t (ss) 'f' suppresses display of processing speed. ziplevel=2 (zl) Compression level; 1 (min) through 9 (max). threads=auto (t) Set number of threads to use; default is number of logical processors. qout=auto Output quality offset: 33 (Sanger), 64, or auto. shuffle=f Shuffle contents of output files. shufflethreads=3 Use this many threads for shuffling (requires more memory). Java Parameters: -Xmx This will be passed to Java to set memory usage, overriding the program's automatic memory detection. -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs. The max is typically 85% of physical memory. There is a changelog at docs/changelog_crosscontaminate.txt Please contact Brian Bushnell at [email protected] if you encounter any problems. " } pushd . > /dev/null DIR="${BASH_SOURCE[0]}" while [ -h "$DIR" ]; do cd "$(dirname "$DIR")" DIR="$(readlink "$(basename "$DIR")")" done cd "$(dirname "$DIR")" DIR="$(pwd)/" popd > /dev/null #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" CP="$DIR""current/" z="-Xmx4g" z2="-Xms4g" EA="-ea" set=0 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then usage exit fi calcXmx () { source "$DIR""/calcmem.sh" parseXmx "$@" if [[ $set == 1 ]]; then return fi freeRam 4000m 42 z="-Xmx${RAM}m" } calcXmx "$@" crosscontaminate() { #module unload oracle-jdk #module load oracle-jdk/1.7_64bit #module load pigz local CMD="java $EA $z -cp $CP jgi.CrossContaminate $@" echo $CMD >&2 eval $CMD } crosscontaminate "$@"
CruorVolt/mu_bbmap
src/bbmap/crosscontaminate.sh
Shell
apache-2.0
2,864
# Stylonychia dupla Dumas SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Protozoa/Ciliophora/Hypotrichea/Oxytrichida/Oxytrichidae/Stylonychia/Stylonychia dupla/README.md
Markdown
apache-2.0
181
/* Copyright (c) 2012 Marco Amadei. 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 net.ucanaccess.test; import java.sql.Connection; import com.healthmarketscience.jackcess.Database.FileFormat; public class PasswordTest extends UcanaccessTestBase { public PasswordTest() { super(); } public PasswordTest(FileFormat accVer) { super(accVer); } public String getAccessPath() { return "net/ucanaccess/test/resources/pwd.mdb"; } protected void setUp() throws Exception {} public void testPassword() throws Exception { Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); Connection ucanaccessConnection = null; try { ucanaccessConnection = getUcanaccessConnection(); } catch (Exception e) { } assertNull(ucanaccessConnection); super.setPassword("ucanaccess"); //url will be try { ucanaccessConnection = getUcanaccessConnection(); } catch (Exception e) { e.printStackTrace(); } assertNotNull(ucanaccessConnection); } }
lmu-bioinformatics/ucanaccess
src/test/java/net/ucanaccess/test/PasswordTest.java
Java
apache-2.0
1,516
# Parmularia novomexicana B. de Lesd. SPECIES #### Status ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Parmularia novomexicana B. de Lesd. ### Remarks null
mdoering/backbone
life/Fungi/Ascomycota/Dothideomycetes/Hysteriales/Parmulariaceae/Parmularia/Parmularia novomexicana/README.md
Markdown
apache-2.0
199
<?php /*! * @mainpage Configuration * * @section intro Introduction * * You can create file <b>application/config.php</b> for configuration. * * @section intro Configuration items * * @subsection encryptor Encrypt * For NpFactory::getEncryptor, $_CONFIG['encryptor'] * @param mode encrypt mode, support aes, 3des; default aes * @param password password, length limit: min 7, max 32 for aes and 16 for 3des * @param timeout seconds for expire time, default 0 (forever) * * @subsection database Database * For NpFactory::getDatabase, $_CONFIG['database'] * @param type database type for PDO, default mysql * @param host host or ip address for connect, default localhost * @param port port for connect, default 3306 * @param user username for connect, default root * @param passwd password for connect, default empty * @param dbname database name for connect, default mysql * @param charset charset for connect, default utf8 * @param persistent persistent for connect, default true * * For NpFactory::getExtraDatabase, $_CONFIG's key is 'database-' append extra name. * * @subsection cache Key-Value Cache * For NpFactory::getCache, $_CONFIG['cache'] * @param type cache type, support memcache,memcached,redis; default memcache * @param host host or ip address for connect, default localhost * @param port port for connect, default 11211 * @param prefix prefix append for keys, default empty * @param timeout seconds for expire time, default 0 (forever) * * For NpFactory::getExtraCache, $_CONFIG's key is 'cache-' append extra name. * * @subsection system Environment * For Framework environment, $_CONFIG['system'] * @param quiet error reporting level switch, true is E_ERROR | E_PARSE, flase is E_ALL ^ E_NOTICE, default false * @param timeZone date's default time zone, default UTC */ //! The class for configs class NpConfig { private static $configs; private static function load() { if(!defined('NP_CONF_PATH')) define('NP_CONF_PATH', NP_APP_PATH); $_CONFIG=array(); // encryptor $config=array(); $config['mode'] = 'aes'; // as: aes(32), 3des(16) $config['password'] = 'b5ee4d5b4f59451431081b0246c57c7b'; $config['timeout'] = 0; // seconds $_CONFIG['encryptor']=$config; // database $config=array(); $config['type'] = 'mysql'; $config['host'] = 'localhost'; $config['port'] = 3306; $config['user'] = 'root'; $config['passwd'] = ''; $config['dbname'] = 'mysql'; $config['charset'] = 'utf8'; $config['persistent'] = true; $_CONFIG['database']=$config; // cache $config=array(); $config['type'] = 'memcache'; $config['host'] = 'localhost'; $config['port'] = 11211; $config['prefix'] = ''; $config['timeout'] = 0; // seconds $_CONFIG['cache']=$config; // system $config=array(); $config['quiet'] = false; $config['timeZone'] = 'UTC'; $_CONFIG['system']=$config; // load application config @include(NP_CONF_PATH.'config.php'); // apply values to setting if($_CONFIG['system']['quiet']===true) error_reporting(E_ERROR | E_PARSE); else error_reporting(E_ALL ^ E_NOTICE); date_default_timezone_set($_CONFIG['system']['timeZone']); self::$configs=$_CONFIG; } //! Get a config item object public static function get($key) { if(self::$configs===null) self::load(); if(!isset(self::$configs[$key])) throw new Exception('Not found config item:'.$key); return self::$configs[$key]; } } ?>
vietor/NextPHP
system/NpConfig.php
PHP
apache-2.0
3,541
/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirread.c,v 1.2 2003/11/17 15:09:39 dron Exp $ */ /* * Copyright (c) 1988-1996 Sam Leffler * Copyright (c) 1991-1996 Silicon Graphics, Inc. * Copyright (c( 1996 USAF Phillips Laboratory * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* * TIFF Library. * * These routines written by Conrad J. Poelman on a single late-night of * March 20-21, 1996. * * The entire purpose of this file is to provide a single external function, * TIFFReadPrivateDataSubDirectory(). This function is intended for use in reading a * private subdirectory from a TIFF file into a private structure. The * actual writing of data into the structure is handled by the setFieldFn(), * which is passed to TIFFReadPrivateDataSubDirectory() as a parameter. The idea is to * enable any application wishing to store private subdirectories to do so * easily using this function, without modifying the TIFF library. * * The astute observer will notice that only two functions are at all different * from the original tif_dirread.c file: TIFFReadPrivateDataSubDirectory() and * TIFFFetchNormalSubTag(). All the other stuff that makes this file so huge * is only necessary because all of those functions are declared static in * tif_dirread.c, so we have to totally duplicate them in order to use them. * * Oh, also note the bug fix in TIFFFetchFloat(). * */ #include "tiffiop.h" #define IGNORE 0 /* tag placeholder used below */ #if HAVE_IEEEFP #define TIFFCvtIEEEFloatToNative(tif, n, fp) #define TIFFCvtIEEEDoubleToNative(tif, n, dp) #else extern void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*); extern void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*); #endif static void EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16); static void MissingRequired(TIFF*, const char*); static int CheckDirCount(TIFF*, TIFFDirEntry*, uint32); static tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*); static tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*); static float TIFFFetchRational(TIFF*, TIFFDirEntry*); static int TIFFFetchNormalSubTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*, int (*getFieldFn)(TIFF *tif,ttag_t tag,...)); static int TIFFFetchPerSampleShorts(TIFF*, TIFFDirEntry*, int*); static int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*); static int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*); static int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**); static int TIFFFetchExtraSamples(TIFF*, TIFFDirEntry*); static int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*); static float TIFFFetchFloat(TIFF*, TIFFDirEntry*); static int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*); static int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*); static int TIFFFetchAnyArray(TIFF*, TIFFDirEntry*, double*); static int TIFFFetchShortPair(TIFF*, TIFFDirEntry*); #if STRIPCHOP_SUPPORT static void ChopUpSingleUncompressedStrip(TIFF*); #endif static char * CheckMalloc(TIFF* tif, tsize_t n, const char* what) { char *cp = (char*)_TIFFmalloc(n); if (cp == NULL) TIFFError(tif->tif_name, "No space %s", what); return (cp); } /* Just as was done with TIFFWritePrivateDataSubDirectory(), here we implement TIFFReadPrivateDataSubDirectory() which takes an offset into the TIFF file, a TIFFFieldInfo structure specifying the types of the various tags, and a function to use to set individual tags when they are encountered. The data is read from the file, translated using the TIFF library's built-in machine-independent conversion functions, and filled into private subdirectory structure. This code was written by copying the original TIFFReadDirectory() function from tif_dirread.c and paring it down to what is needed for this. It is the caller's responsibility to allocate and initialize the internal structure that setFieldFn() will be writing into. If this function is being called more than once before closing the file, the caller also must be careful to free data in the structure before re-initializing. It is also the caller's responsibility to verify the presence of any required fields after reading the directory in. */ int TIFFReadPrivateDataSubDirectory(TIFF* tif, toff_t pdir_offset, TIFFFieldInfo *field_info, int (*setFieldFn)(TIFF *tif, ttag_t tag, ...)) { register TIFFDirEntry* dp; register int n; register TIFFDirectory* td; TIFFDirEntry* dir; int iv; long v; double dv; const TIFFFieldInfo* fip; int fix; uint16 dircount; uint32 nextdiroff; char* cp; int diroutoforderwarning = 0; /* Skipped part about checking for directories or compression data. */ if (!isMapped(tif)) { if (!SeekOK(tif, pdir_offset)) { TIFFError(tif->tif_name, "Seek error accessing TIFF private subdirectory"); return (0); } if (!ReadOK(tif, &dircount, sizeof (uint16))) { TIFFError(tif->tif_name, "Can not read TIFF private subdirectory count"); return (0); } if (tif->tif_flags & TIFF_SWAB) TIFFSwabShort(&dircount); dir = (TIFFDirEntry *)CheckMalloc(tif, dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory"); if (dir == NULL) return (0); if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) { TIFFError(tif->tif_name, "Can not read TIFF private subdirectory"); goto bad; } /* * Read offset to next directory for sequential scans. */ (void) ReadOK(tif, &nextdiroff, sizeof (uint32)); } else { toff_t off = pdir_offset; if (off + sizeof (short) > tif->tif_size) { TIFFError(tif->tif_name, "Can not read TIFF private subdirectory count"); return (0); } else _TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16)); off += sizeof (uint16); if (tif->tif_flags & TIFF_SWAB) TIFFSwabShort(&dircount); dir = (TIFFDirEntry *)CheckMalloc(tif, dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory"); if (dir == NULL) return (0); if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) { TIFFError(tif->tif_name, "Can not read TIFF private subdirectory"); goto bad; } else _TIFFmemcpy(dir, tif->tif_base + off, dircount*sizeof (TIFFDirEntry)); off += dircount* sizeof (TIFFDirEntry); if (off + sizeof (uint32) < tif->tif_size) _TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32)); } if (tif->tif_flags & TIFF_SWAB) TIFFSwabLong(&nextdiroff); /* * Setup default value and then make a pass over * the fields to check type and tag information, * and to extract info required to size data * structures. A second pass is made afterwards * to read in everthing not taken in the first pass. */ td = &tif->tif_dir; for (fip = field_info, dp = dir, n = dircount; n > 0; n--, dp++) { if (tif->tif_flags & TIFF_SWAB) { TIFFSwabArrayOfShort(&dp->tdir_tag, 2); TIFFSwabArrayOfLong(&dp->tdir_count, 2); } /* * Find the field information entry for this tag. */ /* * Silicon Beach (at least) writes unordered * directory tags (violating the spec). Handle * it here, but be obnoxious (maybe they'll fix it?). */ if (dp->tdir_tag < fip->field_tag) { if (!diroutoforderwarning) { TIFFWarning(tif->tif_name, "invalid TIFF private subdirectory; tags are not sorted in ascending order"); diroutoforderwarning = 1; } fip = field_info; /* O(n^2) */ } while (fip->field_tag && fip->field_tag < dp->tdir_tag) fip++; if (!fip->field_tag || fip->field_tag != dp->tdir_tag) { TIFFWarning(tif->tif_name, "unknown field with tag %d (0x%x) in private subdirectory ignored", dp->tdir_tag, dp->tdir_tag); dp->tdir_tag = IGNORE; fip = field_info;/* restart search */ continue; } /* * Null out old tags that we ignore. */ /* Not implemented yet, since FIELD_IGNORE is specific to the main directories. Could pass this in too... */ if (0 /* && fip->field_bit == FIELD_IGNORE */) { ignore: dp->tdir_tag = IGNORE; continue; } /* * Check data type. */ while (dp->tdir_type != (u_short)fip->field_type) { if (fip->field_type == TIFF_ANY) /* wildcard */ break; fip++; if (!fip->field_tag || fip->field_tag != dp->tdir_tag) { TIFFWarning(tif->tif_name, "wrong data type %d for \"%s\"; tag ignored", dp->tdir_type, fip[-1].field_name); goto ignore; } } /* * Check count if known in advance. */ if (fip->field_readcount != TIFF_VARIABLE) { uint32 expected = (fip->field_readcount == TIFF_SPP) ? (uint32) td->td_samplesperpixel : (uint32) fip->field_readcount; if (!CheckDirCount(tif, dp, expected)) goto ignore; } /* Now read in and process data from field. */ if (!TIFFFetchNormalSubTag(tif, dp, fip, setFieldFn)) goto bad; } if (dir) _TIFFfree(dir); return (1); bad: if (dir) _TIFFfree(dir); return (0); } static void EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) { register TIFFDirEntry *dp; register TIFFDirectory *td = &tif->tif_dir; uint16 i; if (td->td_stripbytecount) _TIFFfree(td->td_stripbytecount); td->td_stripbytecount = (uint32*) CheckMalloc(tif, td->td_nstrips * sizeof (uint32), "for \"StripByteCounts\" array"); if (td->td_compression != COMPRESSION_NONE) { uint32 space = (uint32)(sizeof (TIFFHeader) + sizeof (uint16) + (dircount * sizeof (TIFFDirEntry)) + sizeof (uint32)); toff_t filesize = TIFFGetFileSize(tif); uint16 n; /* calculate amount of space used by indirect values */ for (dp = dir, n = dircount; n > 0; n--, dp++) { uint32 cc = dp->tdir_count*TIFFDataWidth(dp->tdir_type); if (cc > sizeof (uint32)) space += cc; } space = (filesize - space) / td->td_samplesperpixel; for (i = 0; i < td->td_nstrips; i++) td->td_stripbytecount[i] = space; /* * This gross hack handles the case were the offset to * the last strip is past the place where we think the strip * should begin. Since a strip of data must be contiguous, * it's safe to assume that we've overestimated the amount * of data in the strip and trim this number back accordingly. */ i--; if (td->td_stripoffset[i] + td->td_stripbytecount[i] > filesize) td->td_stripbytecount[i] = filesize - td->td_stripoffset[i]; } else { uint32 rowbytes = TIFFScanlineSize(tif); uint32 rowsperstrip = td->td_imagelength / td->td_nstrips; for (i = 0; i < td->td_nstrips; i++) td->td_stripbytecount[i] = rowbytes*rowsperstrip; } TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) td->td_rowsperstrip = td->td_imagelength; } static void MissingRequired(TIFF* tif, const char* tagname) { TIFFError(tif->tif_name, "TIFF directory is missing required \"%s\" field", tagname); } /* * Check the count field of a directory * entry against a known value. The caller * is expected to skip/ignore the tag if * there is a mismatch. */ static int CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count) { if (count != dir->tdir_count) { TIFFWarning(tif->tif_name, "incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, dir->tdir_count, count); return (0); } return (1); } /* * Fetch a contiguous directory item. */ static tsize_t TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp) { int w = TIFFDataWidth(dir->tdir_type); tsize_t cc = dir->tdir_count * w; if (!isMapped(tif)) { if (!SeekOK(tif, dir->tdir_offset)) goto bad; if (!ReadOK(tif, cp, cc)) goto bad; } else { if (dir->tdir_offset + cc > tif->tif_size) goto bad; _TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc); } if (tif->tif_flags & TIFF_SWAB) { switch (dir->tdir_type) { case TIFF_SHORT: case TIFF_SSHORT: TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count); break; case TIFF_LONG: case TIFF_SLONG: case TIFF_FLOAT: TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count); break; case TIFF_RATIONAL: case TIFF_SRATIONAL: TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count); break; case TIFF_DOUBLE: TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count); break; } } return (cc); bad: TIFFError(tif->tif_name, "Error fetching data for field \"%s\"", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); return ((tsize_t) 0); } /* * Fetch an ASCII item from the file. */ static tsize_t TIFFFetchString(TIFF* tif, TIFFDirEntry* dir, char* cp) { if (dir->tdir_count <= 4) { uint32 l = dir->tdir_offset; if (tif->tif_flags & TIFF_SWAB) TIFFSwabLong(&l); _TIFFmemcpy(cp, &l, dir->tdir_count); return (1); } return (TIFFFetchData(tif, dir, cp)); } /* * Convert numerator+denominator to float. */ static int cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv) { if (denom == 0) { TIFFError(tif->tif_name, "%s: Rational with zero denominator (num = %lu)", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num); return (0); } else { if (dir->tdir_type == TIFF_RATIONAL) *rv = ((float)num / (float)denom); else *rv = ((float)(int32)num / (float)(int32)denom); return (1); } } /* * Fetch a rational item from the file * at offset off and return the value * as a floating point number. */ static float TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir) { uint32 l[2]; float v; return (!TIFFFetchData(tif, dir, (char *)l) || !cvtRational(tif, dir, l[0], l[1], &v) ? 1.0f : v); } /* * Fetch a single floating point value * from the offset field and return it * as a native float. */ static float TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir) { /* This appears to be a flagrant bug in the TIFF library, yet I actually don't understand how it could have ever worked the old way. Look at the comments in my new code and you'll understand. */ #if (0) float v = (float) TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset); TIFFCvtIEEEFloatToNative(tif, 1, &v); #else float v; /* This is a little bit tricky - if we just cast the uint32 to a float, C will perform a numerical conversion, which is not what we want. We want to take the actual bit pattern in the uint32 and interpret it as a float. Thus we cast a uint32 * into a float * and then dereference to get v. */ uint32 l = (uint32) TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset); v = * (float *) &l; TIFFCvtIEEEFloatToNative(tif, 1, &v); #endif return (v); } /* * Fetch an array of BYTE or SBYTE values. */ static int TIFFFetchByteArray(TIFF* tif, TIFFDirEntry* dir, uint16* v) { if (dir->tdir_count <= 4) { /* * Extract data from offset field. */ if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) { switch (dir->tdir_count) { case 4: v[3] = dir->tdir_offset & 0xff; case 3: v[2] = (dir->tdir_offset >> 8) & 0xff; case 2: v[1] = (dir->tdir_offset >> 16) & 0xff; case 1: v[0] = dir->tdir_offset >> 24; } } else { switch (dir->tdir_count) { case 4: v[3] = dir->tdir_offset >> 24; case 3: v[2] = (dir->tdir_offset >> 16) & 0xff; case 2: v[1] = (dir->tdir_offset >> 8) & 0xff; case 1: v[0] = dir->tdir_offset & 0xff; } } return (1); } else return (TIFFFetchData(tif, dir, (char*) v) != 0); /* XXX */ } /* * Fetch an array of SHORT or SSHORT values. */ static int TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v) { if (dir->tdir_count <= 2) { if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) { switch (dir->tdir_count) { case 2: v[1] = dir->tdir_offset & 0xffff; case 1: v[0] = dir->tdir_offset >> 16; } } else { switch (dir->tdir_count) { case 2: v[1] = dir->tdir_offset >> 16; case 1: v[0] = dir->tdir_offset & 0xffff; } } return (1); } else return (TIFFFetchData(tif, dir, (char *)v) != 0); } /* * Fetch a pair of SHORT or BYTE values. */ static int TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir) { uint16 v[2]; int ok = 0; switch (dir->tdir_type) { case TIFF_SHORT: case TIFF_SSHORT: ok = TIFFFetchShortArray(tif, dir, v); break; case TIFF_BYTE: case TIFF_SBYTE: ok = TIFFFetchByteArray(tif, dir, v); break; } if (ok) TIFFSetField(tif, dir->tdir_tag, v[0], v[1]); return (ok); } /* * Fetch an array of LONG or SLONG values. */ static int TIFFFetchLongArray(TIFF* tif, TIFFDirEntry* dir, uint32* v) { if (dir->tdir_count == 1) { v[0] = dir->tdir_offset; return (1); } else return (TIFFFetchData(tif, dir, (char*) v) != 0); } /* * Fetch an array of RATIONAL or SRATIONAL values. */ static int TIFFFetchRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v) { int ok = 0; uint32* l; l = (uint32*)CheckMalloc(tif, dir->tdir_count*TIFFDataWidth(dir->tdir_type), "to fetch array of rationals"); if (l) { if (TIFFFetchData(tif, dir, (char *)l)) { uint32 i; for (i = 0; i < dir->tdir_count; i++) { ok = cvtRational(tif, dir, l[2*i+0], l[2*i+1], &v[i]); if (!ok) break; } } _TIFFfree((char *)l); } return (ok); } /* * Fetch an array of FLOAT values. */ static int TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v) { if (dir->tdir_count == 1) { v[0] = *(float*) &dir->tdir_offset; TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v); return (1); } else if (TIFFFetchData(tif, dir, (char*) v)) { TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v); return (1); } else return (0); } /* * Fetch an array of DOUBLE values. */ static int TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v) { if (TIFFFetchData(tif, dir, (char*) v)) { TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v); return (1); } else return (0); } /* * Fetch an array of ANY values. The actual values are * returned as doubles which should be able hold all the * types. Yes, there really should be an tany_t to avoid * this potential non-portability ... Note in particular * that we assume that the double return value vector is * large enough to read in any fundamental type. We use * that vector as a buffer to read in the base type vector * and then convert it in place to double (from end * to front of course). */ static int TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v) { int i; switch (dir->tdir_type) { case TIFF_BYTE: case TIFF_SBYTE: if (!TIFFFetchByteArray(tif, dir, (uint16*) v)) return (0); if (dir->tdir_type == TIFF_BYTE) { uint16* vp = (uint16*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } else { int16* vp = (int16*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } break; case TIFF_SHORT: case TIFF_SSHORT: if (!TIFFFetchShortArray(tif, dir, (uint16*) v)) return (0); if (dir->tdir_type == TIFF_SHORT) { uint16* vp = (uint16*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } else { int16* vp = (int16*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } break; case TIFF_LONG: case TIFF_SLONG: if (!TIFFFetchLongArray(tif, dir, (uint32*) v)) return (0); if (dir->tdir_type == TIFF_LONG) { uint32* vp = (uint32*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } else { int32* vp = (int32*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } break; case TIFF_RATIONAL: case TIFF_SRATIONAL: if (!TIFFFetchRationalArray(tif, dir, (float*) v)) return (0); { float* vp = (float*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } break; case TIFF_FLOAT: if (!TIFFFetchFloatArray(tif, dir, (float*) v)) return (0); { float* vp = (float*) v; for (i = dir->tdir_count-1; i >= 0; i--) v[i] = vp[i]; } break; case TIFF_DOUBLE: return (TIFFFetchDoubleArray(tif, dir, (double*) v)); default: /* TIFF_NOTYPE */ /* TIFF_ASCII */ /* TIFF_UNDEFINED */ TIFFError(tif->tif_name, "Cannot read TIFF_ANY type %d for field \"%s\"", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); return (0); } return (1); } /* * Fetch a tag that is not handled by special case code. */ /* The standard function TIFFFetchNormalTag() could definitely be replaced with a simple call to this function, just adding TIFFSetField() as the last argument. */ static int TIFFFetchNormalSubTag(TIFF* tif, TIFFDirEntry* dp, const TIFFFieldInfo* fip, int (*setFieldFn)(TIFF *tif, ttag_t tag, ...)) { static char mesg[] = "to fetch tag value"; int ok = 0; if (dp->tdir_count > 1) { /* array of values */ char* cp = NULL; switch (dp->tdir_type) { case TIFF_BYTE: case TIFF_SBYTE: /* NB: always expand BYTE values to shorts */ cp = CheckMalloc(tif, dp->tdir_count * sizeof (uint16), mesg); ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp); break; case TIFF_SHORT: case TIFF_SSHORT: cp = CheckMalloc(tif, dp->tdir_count * sizeof (uint16), mesg); ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp); break; case TIFF_LONG: case TIFF_SLONG: cp = CheckMalloc(tif, dp->tdir_count * sizeof (uint32), mesg); ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp); break; case TIFF_RATIONAL: case TIFF_SRATIONAL: cp = CheckMalloc(tif, dp->tdir_count * sizeof (float), mesg); ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp); break; case TIFF_FLOAT: cp = CheckMalloc(tif, dp->tdir_count * sizeof (float), mesg); ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp); break; case TIFF_DOUBLE: cp = CheckMalloc(tif, dp->tdir_count * sizeof (double), mesg); ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp); break; case TIFF_ASCII: case TIFF_UNDEFINED: /* bit of a cheat... */ /* * Some vendors write strings w/o the trailing * NULL byte, so always append one just in case. */ cp = CheckMalloc(tif, dp->tdir_count+1, mesg); if (ok = (cp && TIFFFetchString(tif, dp, cp))) cp[dp->tdir_count] = '\0'; /* XXX */ break; } if (ok) { ok = (fip->field_passcount ? (*setFieldFn)(tif, dp->tdir_tag, dp->tdir_count, cp) : (*setFieldFn)(tif, dp->tdir_tag, cp)); } if (cp != NULL) _TIFFfree(cp); } else if (CheckDirCount(tif, dp, 1)) { /* singleton value */ switch (dp->tdir_type) { case TIFF_BYTE: case TIFF_SBYTE: case TIFF_SHORT: case TIFF_SSHORT: /* * If the tag is also acceptable as a LONG or SLONG * then (*setFieldFn) will expect an uint32 parameter * passed to it (through varargs). Thus, for machines * where sizeof (int) != sizeof (uint32) we must do * a careful check here. It's hard to say if this * is worth optimizing. * * NB: We use TIFFFieldWithTag here knowing that * it returns us the first entry in the table * for the tag and that that entry is for the * widest potential data type the tag may have. */ { TIFFDataType type = fip->field_type; if (type != TIFF_LONG && type != TIFF_SLONG) { uint16 v = (uint16) TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset); ok = (fip->field_passcount ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) : (*setFieldFn)(tif, dp->tdir_tag, v)); break; } } /* fall thru... */ case TIFF_LONG: case TIFF_SLONG: { uint32 v32 = TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset); ok = (fip->field_passcount ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v32) : (*setFieldFn)(tif, dp->tdir_tag, v32)); } break; case TIFF_RATIONAL: case TIFF_SRATIONAL: case TIFF_FLOAT: { float v = (dp->tdir_type == TIFF_FLOAT ? TIFFFetchFloat(tif, dp) : TIFFFetchRational(tif, dp)); ok = (fip->field_passcount ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) : (*setFieldFn)(tif, dp->tdir_tag, v)); } break; case TIFF_DOUBLE: { double v; ok = (TIFFFetchDoubleArray(tif, dp, &v) && (fip->field_passcount ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) : (*setFieldFn)(tif, dp->tdir_tag, v)) ); } break; case TIFF_ASCII: case TIFF_UNDEFINED: /* bit of a cheat... */ { char c[2]; if (ok = (TIFFFetchString(tif, dp, c) != 0)) { c[1] = '\0'; /* XXX paranoid */ ok = (*setFieldFn)(tif, dp->tdir_tag, c); } } break; } } return (ok); } /* Everything after this is exactly duplicated from the standard tif_dirread.c file, necessitated by the fact that they are declared static there so we can't call them! */ #define NITEMS(x) (sizeof (x) / sizeof (x[0])) /* * Fetch samples/pixel short values for * the specified tag and verify that * all values are the same. */ static int TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl) { int samples = tif->tif_dir.td_samplesperpixel; int status = 0; if (CheckDirCount(tif, dir, (uint32) samples)) { uint16 buf[10]; uint16* v = buf; if (samples > NITEMS(buf)) v = (uint16*) _TIFFmalloc(samples * sizeof (uint16)); if (TIFFFetchShortArray(tif, dir, v)) { int i; for (i = 1; i < samples; i++) if (v[i] != v[0]) { TIFFError(tif->tif_name, "Cannot handle different per-sample values for field \"%s\"", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); goto bad; } *pl = v[0]; status = 1; } bad: if (v != buf) _TIFFfree((char*) v); } return (status); } /* * Fetch samples/pixel ANY values for * the specified tag and verify that * all values are the same. */ static int TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl) { int samples = (int) tif->tif_dir.td_samplesperpixel; int status = 0; if (CheckDirCount(tif, dir, (uint32) samples)) { double buf[10]; double* v = buf; if (samples > NITEMS(buf)) v = (double*) _TIFFmalloc(samples * sizeof (double)); if (TIFFFetchAnyArray(tif, dir, v)) { int i; for (i = 1; i < samples; i++) if (v[i] != v[0]) { TIFFError(tif->tif_name, "Cannot handle different per-sample values for field \"%s\"", _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); goto bad; } *pl = v[0]; status = 1; } bad: if (v != buf) _TIFFfree(v); } return (status); } #undef NITEMS /* * Fetch a set of offsets or lengths. * While this routine says "strips", * in fact it's also used for tiles. */ static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp) { register uint32* lp; int status; if (!CheckDirCount(tif, dir, (uint32) nstrips)) return (0); /* * Allocate space for strip information. */ if (*lpp == NULL && (*lpp = (uint32 *)CheckMalloc(tif, nstrips * sizeof (uint32), "for strip array")) == NULL) return (0); lp = *lpp; if (dir->tdir_type == (int)TIFF_SHORT) { /* * Handle uint16->uint32 expansion. */ uint16* dp = (uint16*) CheckMalloc(tif, dir->tdir_count* sizeof (uint16), "to fetch strip tag"); if (dp == NULL) return (0); if (status = TIFFFetchShortArray(tif, dir, dp)) { register uint16* wp = dp; while (nstrips-- > 0) *lp++ = *wp++; } _TIFFfree((char*) dp); } else status = TIFFFetchLongArray(tif, dir, lp); return (status); } #define NITEMS(x) (sizeof (x) / sizeof (x[0])) /* * Fetch and set the ExtraSamples tag. */ static int TIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir) { uint16 buf[10]; uint16* v = buf; int status; if (dir->tdir_count > NITEMS(buf)) v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16)); if (dir->tdir_type == TIFF_BYTE) status = TIFFFetchByteArray(tif, dir, v); else status = TIFFFetchShortArray(tif, dir, v); if (status) status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v); if (v != buf) _TIFFfree((char*) v); return (status); } #undef NITEMS #ifdef COLORIMETRY_SUPPORT /* * Fetch and set the RefBlackWhite tag. */ static int TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir) { static char mesg[] = "for \"ReferenceBlackWhite\" array"; char* cp; int ok; if (dir->tdir_type == TIFF_RATIONAL) return (1/*TIFFFetchNormalTag(tif, dir) just so linker won't complain - this part of the code is never used anyway */); /* * Handle LONG's for backward compatibility. */ cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg); if (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) { float* fp = (float*) CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg); if (ok = (fp != NULL)) { uint32 i; for (i = 0; i < dir->tdir_count; i++) fp[i] = (float)((uint32*) cp)[i]; ok = TIFFSetField(tif, dir->tdir_tag, fp); _TIFFfree((char*) fp); } } if (cp) _TIFFfree(cp); return (ok); } #endif #if STRIPCHOP_SUPPORT /* * Replace a single strip (tile) of uncompressed data by * multiple strips (tiles), each approximately 8Kbytes. * This is useful for dealing with large images or * for dealing with machines with a limited amount * memory. */ static void ChopUpSingleUncompressedStrip(TIFF* tif) { register TIFFDirectory *td = &tif->tif_dir; uint32 bytecount = td->td_stripbytecount[0]; uint32 offset = td->td_stripoffset[0]; tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes; tstrip_t strip, nstrips, rowsperstrip; uint32* newcounts; uint32* newoffsets; /* * Make the rows hold at least one * scanline, but fill 8k if possible. */ if (rowbytes > 8192) { stripbytes = rowbytes; rowsperstrip = 1; } else { rowsperstrip = 8192 / rowbytes; stripbytes = rowbytes * rowsperstrip; } /* never increase the number of strips in an image */ if (rowsperstrip >= td->td_rowsperstrip) return; nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes); newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32), "for chopped \"StripByteCounts\" array"); newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32), "for chopped \"StripOffsets\" array"); if (newcounts == NULL || newoffsets == NULL) { /* * Unable to allocate new strip information, give * up and use the original one strip information. */ if (newcounts != NULL) _TIFFfree(newcounts); if (newoffsets != NULL) _TIFFfree(newoffsets); return; } /* * Fill the strip information arrays with * new bytecounts and offsets that reflect * the broken-up format. */ for (strip = 0; strip < nstrips; strip++) { if (stripbytes > bytecount) stripbytes = bytecount; newcounts[strip] = stripbytes; newoffsets[strip] = offset; offset += stripbytes; bytecount -= stripbytes; } /* * Replace old single strip info with multi-strip info. */ td->td_stripsperimage = td->td_nstrips = nstrips; TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); _TIFFfree(td->td_stripbytecount); _TIFFfree(td->td_stripoffset); td->td_stripbytecount = newcounts; td->td_stripoffset = newoffsets; } #endif /* STRIPCHOP_SUPPORT */
OpenXIP/xip-libraries
src/extern/tiff-3.7.4/contrib/pds/tif_pdsdirread.c
C
apache-2.0
31,914
/* * Copyright 2017-2019 University of Hildesheim, Software Systems Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.ssehub.kernel_haven.code_model; import java.io.File; import java.util.LinkedList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.ssehub.kernel_haven.SetUpException; import net.ssehub.kernel_haven.config.DefaultSettings; import net.ssehub.kernel_haven.provider.AbstractCache; import net.ssehub.kernel_haven.provider.AbstractProvider; import net.ssehub.kernel_haven.util.null_checks.NonNull; /** * The provider for the code model. This class serves as an intermediate between the analysis and the code model * extractor. * * @author Adam */ public class CodeModelProvider extends AbstractProvider<SourceFile<?>> { @Override protected long getTimeout() { return config.getValue(DefaultSettings.CODE_PROVIDER_TIMEOUT); } @Override protected @NonNull List<@NonNull File> getTargets() throws SetUpException { List<@NonNull File> result = new LinkedList<>(); Pattern pattern = config.getValue(DefaultSettings.CODE_EXTRACTOR_FILE_REGEX); for (String relativeStr : config.getValue(DefaultSettings.CODE_EXTRACTOR_FILES)) { File relativeFile = new File(relativeStr); File absoluteFile = new File(config.getValue(DefaultSettings.SOURCE_TREE), relativeFile.getPath()); if (absoluteFile.isFile()) { result.add(relativeFile); } else if (absoluteFile.isDirectory()) { readFilesFromDirectory(absoluteFile, pattern, result); } else { throw new SetUpException("Non-existing file specified in code.extractor.files: " + relativeFile.getPath()); } } return result; } /** * Finds all files in the given directory (recursively) that match the given * pattern. The files that match are added to filesToParse. * * @param directory * The directory to search in. * @param pattern * The pattern to check against. * @param result * The list to add the found files to. */ private void readFilesFromDirectory(File directory, Pattern pattern, List<File> result) { for (File file : directory.listFiles()) { if (file.isDirectory()) { readFilesFromDirectory(file, pattern, result); } else { Matcher m = pattern.matcher(file.getName()); if (m.matches()) { result.add(config.getValue(DefaultSettings.SOURCE_TREE).toPath() .relativize(file.toPath()).toFile()); } } } } @Override protected @NonNull AbstractCache<SourceFile<?>> createCache() { return new JsonCodeModelCache(config.getValue(DefaultSettings.CACHE_DIR), config.getValue(DefaultSettings.CODE_PROVIDER_CACHE_COMPRESS)); } @Override public boolean readCache() { return config.getValue(DefaultSettings.CODE_PROVIDER_CACHE_READ); } @Override public boolean writeCache() { return config.getValue(DefaultSettings.CODE_PROVIDER_CACHE_WRITE); } @Override public int getNumberOfThreads() { return config.getValue(DefaultSettings.CODE_EXTRACTOR_THREADS); } }
KernelHaven/KernelHaven
src/net/ssehub/kernel_haven/code_model/CodeModelProvider.java
Java
apache-2.0
3,998
/* * Copyright 2005-2008 The Kuali Foundation * * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * 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.kuali.rice.edl.impl; public class TestConfigProcessor extends TestEDLModelCompent { }
sbower/kuali-rice-1
it/kew/src/test/java/org/kuali/rice/edl/impl/TestConfigProcessor.java
Java
apache-2.0
734
package org.apache.hadoop.hive.kafka.camus; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.MapWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.UTF8; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableComparable; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Map; /** * The key for the mapreduce job to pull kafka. Contains offsets and the * checksum. */ public class KafkaKey implements WritableComparable<KafkaKey>, IKafkaKey { public static final Text SERVER = new Text("server"); public static final Text SERVICE = new Text("service"); public static KafkaKey DUMMY_KEY = new KafkaKey(); private String leaderId = ""; private int partition = 0; private long beginOffset = 0; private long offset = 0; private long checksum = 0; private String topic = ""; private long time = 0; private String server = ""; private String service = ""; private MapWritable partitionMap = new MapWritable(); /** * dummy empty constructor */ public KafkaKey() { this("dummy", "0", 0, 0, 0, 0); } public KafkaKey(KafkaKey other) { this.partition = other.partition; this.beginOffset = other.beginOffset; this.offset = other.offset; this.checksum = other.checksum; this.topic = other.topic; this.time = other.time; this.server = other.server; this.service = other.service; this.partitionMap = new MapWritable(other.partitionMap); } public KafkaKey(String topic, String leaderId, int partition) { this.set(topic, leaderId, partition, 0, 0, 0); } public KafkaKey(String topic, String leaderId, int partition, long beginOffset, long offset) { this.set(topic, leaderId, partition, beginOffset, offset, 0); } public KafkaKey(String topic, String leaderId, int partition, long beginOffset, long offset, long checksum) { this.set(topic, leaderId, partition, beginOffset, offset, checksum); } public void set(String topic, String leaderId, int partition, long beginOffset, long offset, long checksum) { this.leaderId = leaderId; this.partition = partition; this.beginOffset = beginOffset; this.offset = offset; this.checksum = checksum; this.topic = topic; this.time = System.currentTimeMillis(); // if event can't be decoded, // this time will be used for // debugging. } public void clear() { leaderId = ""; partition = 0; beginOffset = 0; offset = 0; checksum = 0; topic = ""; time = 0; server = ""; service = ""; partitionMap = new MapWritable(); } public String getServer() { return partitionMap.get(SERVER).toString(); } public void setServer(String newServer) { partitionMap.put(SERVER, new Text(newServer)); } public String getService() { return partitionMap.get(SERVICE).toString(); } public void setService(String newService) { partitionMap.put(SERVICE, new Text(newService)); } public long getTime() { return time; } public void setTime(long time) { this.time = time; } public String getTopic() { return topic; } public String getLeaderId() { return leaderId; } public int getPartition() { return this.partition; } public long getBeginOffset() { return this.beginOffset; } public void setOffset(long offset) { this.offset = offset; } public long getOffset() { return this.offset; } public long getChecksum() { return this.checksum; } @Override public long getMessageSize() { Text key = new Text("message.size"); if (this.partitionMap.containsKey(key)) return ((LongWritable) this.partitionMap.get(key)).get(); else return 1024; //default estimated size } public void setMessageSize(long messageSize) { Text key = new Text("message.size"); put(key, new LongWritable(messageSize)); } public void put(Writable key, Writable value) { this.partitionMap.put(key, value); } public void addAllPartitionMap(MapWritable partitionMap) { this.partitionMap.putAll(partitionMap); } public MapWritable getPartitionMap() { return partitionMap; } @Override public void readFields(DataInput in) throws IOException { this.leaderId = UTF8.readString(in); this.partition = in.readInt(); this.beginOffset = in.readLong(); this.offset = in.readLong(); this.checksum = in.readLong(); this.topic = in.readUTF(); this.time = in.readLong(); this.server = in.readUTF(); // left for legacy this.service = in.readUTF(); // left for legacy this.partitionMap = new MapWritable(); try { this.partitionMap.readFields(in); } catch (IOException e) { this.setServer(this.server); this.setService(this.service); } } @Override public void write(DataOutput out) throws IOException { UTF8.writeString(out, this.leaderId); out.writeInt(this.partition); out.writeLong(this.beginOffset); out.writeLong(this.offset); out.writeLong(this.checksum); out.writeUTF(this.topic); out.writeLong(this.time); out.writeUTF(this.server); // left for legacy out.writeUTF(this.service); // left for legacy this.partitionMap.write(out); } @Override public int compareTo(KafkaKey o) { if (partition != o.partition) { return partition = o.partition; } else { if (offset > o.offset) { return 1; } else if (offset < o.offset) { return -1; } else { if (checksum > o.checksum) { return 1; } else if (checksum < o.checksum) { return -1; } else { return 0; } } } } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("topic="); builder.append(topic); builder.append(" partition="); builder.append(partition); builder.append("leaderId="); builder.append(leaderId); builder.append(" server="); builder.append(server); builder.append(" service="); builder.append(service); builder.append(" beginOffset="); builder.append(beginOffset); builder.append(" offset="); builder.append(offset); builder.append(" msgSize="); builder.append(getMessageSize()); builder.append(" server="); builder.append(server); builder.append(" checksum="); builder.append(checksum); builder.append(" time="); builder.append(time); for (Map.Entry<Writable, Writable> e : partitionMap.entrySet()) { builder.append(" " + e.getKey() + "="); builder.append(e.getValue().toString()); } return builder.toString(); } }
HiveKa/HiveKa
src/main/java/org/apache/hadoop/hive/kafka/camus/KafkaKey.java
Java
apache-2.0
6,733
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.jstestdriver.output; /** * Escapes and formats a filename. * * @author Cory Smith ([email protected]) */ public class FileNameFormatter { public String format(String path, String format) { String escaped = path .replace('/', 'a') .replace('\\', 'a') .replace(">", "a") .replace(":", "a") .replace(":", "a") .replace(";", "a") .replace("+", "a") .replace(",", "a") .replace("<", "a") .replace("?", "a") .replace("*", "a") .replace(" ", "a"); return String.format(format, escaped.length() > 200 ? escaped.substring(0, 200) : escaped); } }
BladeRunnerJS/brjs-JsTestDriver
JsTestDriver/src/com/google/jstestdriver/output/FileNameFormatter.java
Java
apache-2.0
1,271
/** * Copyright 2014 Google Inc. * Copyright 2014 Andreas Schildbach * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.bitcoin.wallet; import com.google.bitcoin.crypto.*; import com.google.bitcoin.store.UnreadableWalletException; import com.google.common.base.Charsets; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import org.bitcoinj.wallet.Protos; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; import java.io.UnsupportedEncodingException; import java.security.SecureRandom; import java.util.List; import static com.google.bitcoin.core.Utils.HEX; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; /** * Holds the seed bytes for the BIP32 deterministic wallet algorithm, inside a * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. The purpose of this wrapper is to simplify the encryption * code. */ public class DeterministicSeed implements EncryptableItem { // It would take more than 10^12 years to brute-force a 128 bit seed using $1B worth of computing equipment. public static final int DEFAULT_SEED_ENTROPY_BITS = 128; public static final int MAX_SEED_ENTROPY_BITS = 512; @Nullable private final byte[] seed; @Nullable private List<String> mnemonicCode; @Nullable private EncryptedData encryptedMnemonicCode; private final long creationTimeSeconds; public DeterministicSeed(String mnemonicCode, String passphrase, long creationTimeSeconds) throws UnreadableWalletException { this(decodeMnemonicCode(mnemonicCode), passphrase, creationTimeSeconds); } public DeterministicSeed(byte[] seed, List<String> mnemonic, long creationTimeSeconds) { this.seed = checkNotNull(seed); this.mnemonicCode = checkNotNull(mnemonic); this.encryptedMnemonicCode = null; this.creationTimeSeconds = creationTimeSeconds; } public DeterministicSeed(EncryptedData encryptedMnemonic, long creationTimeSeconds) { this.seed = null; this.mnemonicCode = null; this.encryptedMnemonicCode = checkNotNull(encryptedMnemonic); this.creationTimeSeconds = creationTimeSeconds; } /** * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more * details on this scheme. * @param mnemonicCode A list of words. * @param passphrase A user supplied passphrase, or an empty string if there is no passphrase * @param creationTimeSeconds When the seed was originally created, UNIX time. */ public DeterministicSeed(List<String> mnemonicCode, String passphrase, long creationTimeSeconds) { this(MnemonicCode.toSeed(mnemonicCode, passphrase), mnemonicCode, creationTimeSeconds); } /** * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more * details on this scheme. * @param random Entropy source * @param bits number of bits, must be divisible by 32 * @param passphrase A user supplied passphrase, or an empty string if there is no passphrase * @param creationTimeSeconds When the seed was originally created, UNIX time. */ public DeterministicSeed(SecureRandom random, int bits, String passphrase, long creationTimeSeconds) { this(getEntropy(random, bits), passphrase, creationTimeSeconds); } /** * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more * details on this scheme. * @param entropy entropy bits, length must be divisible by 32 * @param passphrase A user supplied passphrase, or an empty string if there is no passphrase * @param creationTimeSeconds When the seed was originally created, UNIX time. */ public DeterministicSeed(byte[] entropy, String passphrase, long creationTimeSeconds) { Preconditions.checkArgument(entropy.length % 4 == 0, "entropy size in bits not divisible by 32"); Preconditions.checkArgument(entropy.length * 8 >= DEFAULT_SEED_ENTROPY_BITS, "entropy size too small"); try { this.mnemonicCode = MnemonicCode.INSTANCE.toMnemonic(entropy); } catch (MnemonicException.MnemonicLengthException e) { // cannot happen throw new RuntimeException(e); } this.seed = MnemonicCode.toSeed(mnemonicCode, passphrase); this.encryptedMnemonicCode = null; this.creationTimeSeconds = creationTimeSeconds; } private static byte[] getEntropy(SecureRandom random, int bits) { Preconditions.checkArgument(bits <= MAX_SEED_ENTROPY_BITS, "requested entropy size too large"); byte[] seed = new byte[bits / 8]; random.nextBytes(seed); return seed; } @Override public boolean isEncrypted() { checkState(mnemonicCode != null || encryptedMnemonicCode != null); return encryptedMnemonicCode != null; } @Override public String toString() { if (isEncrypted()) return "DeterministicSeed [encrypted]"; else return "DeterministicSeed " + toHexString() + ((mnemonicCode != null) ? " " + Joiner.on(" ").join(mnemonicCode) : ""); } /** Returns the seed as hex or null if encrypted. */ @Nullable public String toHexString() { if (seed != null) return HEX.encode(seed); else return null; } @Nullable @Override public byte[] getSecretBytes() { return getMnemonicAsBytes(); } @Nullable public byte[] getSeedBytes() { return seed; } @Nullable @Override public EncryptedData getEncryptedData() { return encryptedMnemonicCode; } @Override public Protos.Wallet.EncryptionType getEncryptionType() { return Protos.Wallet.EncryptionType.ENCRYPTED_SCRYPT_AES; } @Override public long getCreationTimeSeconds() { return creationTimeSeconds; } public DeterministicSeed encrypt(KeyCrypter keyCrypter, KeyParameter aesKey) { checkState(encryptedMnemonicCode == null, "Trying to encrypt seed twice"); checkState(mnemonicCode != null, "Mnemonic missing so cannot encrypt"); EncryptedData mnemonic = keyCrypter.encrypt(getMnemonicAsBytes(), aesKey); return new DeterministicSeed(mnemonic, creationTimeSeconds); } private byte[] getMnemonicAsBytes() { return Joiner.on(" ").join(mnemonicCode).getBytes(Charsets.UTF_8); } public DeterministicSeed decrypt(KeyCrypter crypter, String passphrase, KeyParameter aesKey) { checkState(isEncrypted()); checkNotNull(encryptedMnemonicCode); List<String> mnemonic = null; try { mnemonic = decodeMnemonicCode(crypter.decrypt(encryptedMnemonicCode, aesKey)); } catch (UnreadableWalletException e) { // TODO what is the best way to handle this exception? throw new RuntimeException(e); } return new DeterministicSeed(mnemonic, passphrase, creationTimeSeconds); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeterministicSeed seed = (DeterministicSeed) o; if (creationTimeSeconds != seed.creationTimeSeconds) return false; if (encryptedMnemonicCode != null) { if (seed.encryptedMnemonicCode == null) return false; if (!encryptedMnemonicCode.equals(seed.encryptedMnemonicCode)) return false; } else { if (!mnemonicCode.equals(seed.mnemonicCode)) return false; } return true; } @Override public int hashCode() { int result = encryptedMnemonicCode != null ? encryptedMnemonicCode.hashCode() : mnemonicCode.hashCode(); result = 31 * result + (int) (creationTimeSeconds ^ (creationTimeSeconds >>> 32)); return result; } /** * Check if our mnemonic is a valid mnemonic phrase for our word list. * Does nothing if we are encrypted. * * @throws com.google.bitcoin.crypto.MnemonicException if check fails */ public void check() throws MnemonicException { if (mnemonicCode != null) MnemonicCode.INSTANCE.check(mnemonicCode); } byte[] getEntropyBytes() throws MnemonicException { return MnemonicCode.INSTANCE.toEntropy(mnemonicCode); } /** Get the mnemonic code, or null if unknown. */ @Nullable public List<String> getMnemonicCode() { return mnemonicCode; } private static List<String> decodeMnemonicCode(byte[] mnemonicCode) throws UnreadableWalletException { try { return Splitter.on(" ").splitToList(new String(mnemonicCode, "UTF-8")); } catch (UnsupportedEncodingException e) { throw new UnreadableWalletException(e.toString()); } } private static List<String> decodeMnemonicCode(String mnemonicCode) { return Splitter.on(" ").splitToList(mnemonicCode); } }
troggy/bitcoinj
core/src/main/java/com/google/bitcoin/wallet/DeterministicSeed.java
Java
apache-2.0
9,791
package com.datawizards.dmg.service import com.datawizards.dmg.repository.{AvroSchemaRegistryRepository, AvroSchemaRegistryRepositoryImpl} class AvroSchemaRegistryServiceImpl(url: String) extends AvroSchemaRegistryService { override protected val repository: AvroSchemaRegistryRepository = new AvroSchemaRegistryRepositoryImpl(url) override protected val hdfsService: HDFSService = HDFSServiceImpl }
mateuszboryn/data-model-generator
src/main/scala/com/datawizards/dmg/service/AvroSchemaRegistryServiceImpl.scala
Scala
apache-2.0
406
/* * Copyright (c) 2016-present, RxJava Contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package io.reactivex.rxjava3.internal.operators.flowable; import static org.junit.Assert.*; import java.util.*; import java.util.concurrent.ExecutionException; import org.junit.Test; import org.reactivestreams.*; import io.reactivex.rxjava3.core.*; import io.reactivex.rxjava3.functions.*; import io.reactivex.rxjava3.internal.subscriptions.BooleanSubscription; import io.reactivex.rxjava3.schedulers.Schedulers; import io.reactivex.rxjava3.subscribers.*; import io.reactivex.rxjava3.testsupport.*; public class FlowableMaterializeTest extends RxJavaTest { @Test public void materialize1() { // null will cause onError to be triggered before "three" can be // returned final TestAsyncErrorObservable o1 = new TestAsyncErrorObservable("one", "two", null, "three"); TestNotificationSubscriber observer = new TestNotificationSubscriber(); Flowable<Notification<String>> m = Flowable.unsafeCreate(o1).materialize(); m.subscribe(observer); try { o1.t.join(); } catch (InterruptedException e) { throw new RuntimeException(e); } assertFalse(observer.onError); assertTrue(observer.onComplete); assertEquals(3, observer.notifications.size()); assertTrue(observer.notifications.get(0).isOnNext()); assertEquals("one", observer.notifications.get(0).getValue()); assertTrue(observer.notifications.get(1).isOnNext()); assertEquals("two", observer.notifications.get(1).getValue()); assertTrue(observer.notifications.get(2).isOnError()); assertEquals(NullPointerException.class, observer.notifications.get(2).getError().getClass()); } @Test public void materialize2() { final TestAsyncErrorObservable o1 = new TestAsyncErrorObservable("one", "two", "three"); TestNotificationSubscriber subscriber = new TestNotificationSubscriber(); Flowable<Notification<String>> m = Flowable.unsafeCreate(o1).materialize(); m.subscribe(subscriber); try { o1.t.join(); } catch (InterruptedException e) { throw new RuntimeException(e); } assertFalse(subscriber.onError); assertTrue(subscriber.onComplete); assertEquals(4, subscriber.notifications.size()); assertTrue(subscriber.notifications.get(0).isOnNext()); assertEquals("one", subscriber.notifications.get(0).getValue()); assertTrue(subscriber.notifications.get(1).isOnNext()); assertEquals("two", subscriber.notifications.get(1).getValue()); assertTrue(subscriber.notifications.get(2).isOnNext()); assertEquals("three", subscriber.notifications.get(2).getValue()); assertTrue(subscriber.notifications.get(3).isOnComplete()); } @Test public void multipleSubscribes() throws InterruptedException, ExecutionException { final TestAsyncErrorObservable o = new TestAsyncErrorObservable("one", "two", null, "three"); Flowable<Notification<String>> m = Flowable.unsafeCreate(o).materialize(); assertEquals(3, m.toList().toFuture().get().size()); assertEquals(3, m.toList().toFuture().get().size()); } @Test public void backpressureOnEmptyStream() { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); Flowable.<Integer> empty().materialize().subscribe(ts); ts.assertNoValues(); ts.request(1); ts.assertValueCount(1); assertTrue(ts.values().get(0).isOnComplete()); ts.assertComplete(); } @Test public void backpressureNoError() { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); Flowable.just(1, 2, 3).materialize().subscribe(ts); ts.assertNoValues(); ts.request(1); ts.assertValueCount(1); ts.request(2); ts.assertValueCount(3); ts.request(1); ts.assertValueCount(4); ts.assertComplete(); } @Test public void backpressureNoErrorAsync() throws InterruptedException { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); Flowable.just(1, 2, 3) .materialize() .subscribeOn(Schedulers.computation()) .subscribe(ts); Thread.sleep(100); ts.assertNoValues(); ts.request(1); Thread.sleep(100); ts.assertValueCount(1); ts.request(2); Thread.sleep(100); ts.assertValueCount(3); ts.request(1); Thread.sleep(100); ts.assertValueCount(4); ts.assertComplete(); } @Test public void backpressureWithError() { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); Flowable.<Integer> error(new IllegalArgumentException()).materialize().subscribe(ts); ts.assertNoValues(); ts.request(1); ts.assertValueCount(1); ts.assertComplete(); } @Test public void backpressureWithEmissionThenError() { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); IllegalArgumentException ex = new IllegalArgumentException(); Flowable.fromIterable(Arrays.asList(1)).concatWith(Flowable.<Integer> error(ex)).materialize() .subscribe(ts); ts.assertNoValues(); ts.request(1); ts.assertValueCount(1); assertTrue(ts.values().get(0).isOnNext()); ts.request(1); ts.assertValueCount(2); assertTrue(ts.values().get(1).isOnError()); assertEquals(ex, ts.values().get(1).getError()); ts.assertComplete(); } @Test public void withCompletionCausingError() { TestSubscriberEx<Notification<Integer>> ts = new TestSubscriberEx<>(); final RuntimeException ex = new RuntimeException("boo"); Flowable.<Integer>empty().materialize().doOnNext(new Consumer<Object>() { @Override public void accept(Object t) { throw ex; } }).subscribe(ts); ts.assertError(ex); ts.assertNoValues(); ts.assertTerminated(); } @Test public void unsubscribeJustBeforeCompletionNotificationShouldPreventThatNotificationArriving() { TestSubscriber<Notification<Integer>> ts = new TestSubscriber<>(0L); Flowable.<Integer>empty().materialize() .subscribe(ts); ts.assertNoValues(); ts.cancel(); ts.request(1); ts.assertNoValues(); } private static class TestNotificationSubscriber extends DefaultSubscriber<Notification<String>> { boolean onComplete; boolean onError; List<Notification<String>> notifications = new Vector<>(); @Override public void onComplete() { this.onComplete = true; } @Override public void onError(Throwable e) { this.onError = true; } @Override public void onNext(Notification<String> value) { this.notifications.add(value); } } private static class TestAsyncErrorObservable implements Publisher<String> { String[] valuesToReturn; TestAsyncErrorObservable(String... values) { valuesToReturn = values; } volatile Thread t; @Override public void subscribe(final Subscriber<? super String> subscriber) { subscriber.onSubscribe(new BooleanSubscription()); t = new Thread(new Runnable() { @Override public void run() { for (String s : valuesToReturn) { if (s == null) { System.out.println("throwing exception"); try { Thread.sleep(100); } catch (Throwable e) { } subscriber.onError(new NullPointerException()); return; } else { subscriber.onNext(s); } } System.out.println("subscription complete"); subscriber.onComplete(); } }); t.start(); } } @Test public void backpressure() { TestSubscriber<Notification<Integer>> ts = Flowable.range(1, 5).materialize().test(0); ts.assertEmpty(); ts.request(5); ts.assertValueCount(5) .assertNoErrors() .assertNotComplete(); ts.request(1); ts.assertValueCount(6) .assertNoErrors() .assertComplete(); } @Test public void dispose() { TestHelper.checkDisposed(Flowable.just(1).materialize()); } @Test public void doubleOnSubscribe() { TestHelper.checkDoubleOnSubscribeFlowable(new Function<Flowable<Object>, Flowable<Notification<Object>>>() { @Override public Flowable<Notification<Object>> apply(Flowable<Object> f) throws Exception { return f.materialize(); } }); } @Test public void badSource() { TestHelper.checkBadSourceFlowable(new Function<Flowable<Object>, Object>() { @Override public Object apply(Flowable<Object> f) throws Exception { return f.materialize(); } }, false, null, null, Notification.createOnComplete()); } @Test public void badRequest() { TestHelper.assertBadRequestReported(Flowable.just(1).materialize()); } }
ReactiveX/RxJava
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableMaterializeTest.java
Java
apache-2.0
10,356
package net.unicon.cas.addons.serviceregistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; /** * <code>BeanFactoryPostProcessor</code> to remove 2 quartz beans responsible for reloading the default services registry's registered services. * <p/> * Useful in cases where other facilities are responsible for reloading in-memory services cache, for example on-demand reloading * of JSON services registry, etc. * <p/> * This bean just needs to be declared in CAS' application context and upon bootstrap Spring will call back into it and * 2 scheduling quartz beans dedicated for services registry reloading thread will be removed from the final application context * effectively disabling the default reloading behavior. * * @author Dmitriy Kopylenko * @author Unicon, inc. * @since 1.8 */ public class RegisteredServicesReloadDisablingBeanFactoryPostProcessor implements BeanFactoryPostProcessor { private static final String JOB_DETAIL_BEAN_NAME = "serviceRegistryReloaderJobDetail"; private static final String JOB_TRIGGER_BEAN_NAME = "periodicServiceRegistryReloaderTrigger"; private static final Logger logger = LoggerFactory.getLogger(RegisteredServicesReloadDisablingBeanFactoryPostProcessor.class); public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { logger.debug("Removing [{}] bean definition from the application context...", JOB_DETAIL_BEAN_NAME); BeanDefinitionRegistry.class.cast(beanFactory).removeBeanDefinition(JOB_DETAIL_BEAN_NAME); logger.debug("Removing [{}] bean definition from the application context...", JOB_TRIGGER_BEAN_NAME); BeanDefinitionRegistry.class.cast(beanFactory).removeBeanDefinition(JOB_TRIGGER_BEAN_NAME); } }
Unicon/cas-addons
src/main/java/net/unicon/cas/addons/serviceregistry/RegisteredServicesReloadDisablingBeanFactoryPostProcessor.java
Java
apache-2.0
2,060
package dhg.util import scala.collection.generic.CanBuildFrom object Pattern { object UInt { val IntRE = """^(-?\d+)$""".r def unapply(v: String): Option[Int] = v match { case IntRE(s) => Some(s.toInt) case _ => None } } // implicit def int2unapplyInt(objA: Int.type) = UInt object UDouble { val DoubleRE = """^(-?\d+\.?\d*|-?\d*\.?\d+)$""".r def unapply(v: String): Option[Double] = v match { case DoubleRE(s) => Some(s.toDouble) case _ => None } } // implicit def double2unapplyDouble(objA: Double.type) = UDouble object UBoolean { val booleanRE = """([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])""".r def unapply(v: String): Option[Boolean] = v match { case booleanRE(s) => Some(s.toBoolean) case _ => None } } object UMap { def unapplySeq[A, B](m: Map[A, B]): Option[Seq[(A, B)]] = Some(m.toIndexedSeq) } object USet { def unapplySeq[A](s: Set[A]): Option[Seq[A]] = Some(s.toIndexedSeq) } object -> { def unapply[A, B](pair: (A, B)): Option[(A, B)] = { Some(pair) } } object Range { val RangeRE = """^(\d+)-(\d+)$""".r def unapply(s: String): Option[Seq[Int]] = Some( s.replaceAll("\\s+", "").split(",").flatMap { case UInt(i) => i to i case RangeRE(UInt(b), UInt(e)) if b <= e => b to e }) } class Range(max: Int) { val OpenRangeRE = """^(\d+)-$""".r def unapply(s: String): Option[Seq[Int]] = Some( s.replaceAll("\\s+", "").split(",").flatMap { case OpenRangeRE(UInt(b)) => b to max case Range(r) => r }) } def makeRangeString(seq: Seq[Int]): String = { assert(seq.nonEmpty, "cannot make empty sequence into a range string") assert(seq.exists(_ >= 0), s"negative numbers are not permitted: $seq") (-2 +: seq).sliding(2).foldLeft(Vector[Vector[Int]]()) { case ((z :+ c), Seq(a, b)) => if (a != b - 1) (z :+ c) :+ Vector(b) else (z :+ (c :+ b)) case (z, Seq(a, b)) => z :+ Vector(b) } .map { case Seq(x) => x.toString case s => s.head + "-" + s.last }.mkString(",") } object Iterable { def unapplySeq[T](s: Iterable[T]): Option[Seq[T]] = Some(s.toIndexedSeq) } }
dhgarrette/low-resource-pos-tagging-2013
src/main/scala/dhg/util/Pattern.scala
Scala
apache-2.0
2,296
# Omphalia epichysium (Pers.) P. Kumm., 1871 SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in Führ. Pilzk. (Zwickau) 107 (1871) #### Original name Agaricus epichysium Pers., 1794 ### Remarks null
mdoering/backbone
life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Mycenaceae/Xeromphalina/Xeromphalina leonina/ Syn. Omphalia epichysium/README.md
Markdown
apache-2.0
256
# Achillea lereschei Sch.Bip. SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Achillea lereschei/README.md
Markdown
apache-2.0
177
using ClassLibrary; using Pokemon_IMIE.Model; using Pokemon_IMIE.usercontrols; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 namespace Pokemon_IMIE.usercontrols { public sealed partial class PokemonStatus : BaseUserControl { private Model.Pokemon pokemon; public Model.Pokemon Pokemon { get { return pokemon; } set { pokemon = value; base.OnPropertyChanged("Pokemon"); } } public PokemonStatus() { this.InitializeComponent(); base.DataContext = this; } } }
clementhouillere/Pokemon_IMIE
app/Pokemon_IMIE/Pokemon_IMIE/usercontrols/PokemonStatus.xaml.cs
C#
apache-2.0
1,107
#coding=utf-8 from django.db import models from django.contrib.auth.models import User class Activity(models.Model): owner = models.ForeignKey(User, null=False) text = models.CharField(max_length=20, unique=True) class Dessert(models.Model): activity = models.ForeignKey(Activity, null=False) description = models.TextField() photo = models.ImageField()
Moonshile/goondream
src/desserts/models.py
Python
apache-2.0
376
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Day57-vlvibesSwitch</title> <script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script> <script src="https://rawgit.com/ngokevin/aframe-text-component/master/dist/aframe-text-component.min.js"></script> <script src="https://code.jquery.com/jquery-2.1.1.js"></script> </head> <body> <a-scene> <!-- camera --> <a-entity id="camera" rotation="0 0 0" position="0 0 0"> <a-camera> <a-entity cursor="maxDistance:10000" position="0 0 -1" color="pink" geometry="primitive:ring; color:pink; radiusInner:.005; radiusOuter:.01"></a-entity> </a-camera> </a-entity> <!--divs and baloon--> <a-entity id="titleName"></a-entity> <a-entity id="sphereA"> <a-sphere id="sphere1" visable="true" material="src:url(http://www.headsub.com/attachment/uq23A3T8/Templates/Textures/Football.png)" radius="1"></a-sphere> <a-animation attribute="position" from="0 -20 -2" to="0 0 -2"></a-animation> </a-entity> <!-- light --> <a-entity><a-entity id="light" light="color:#F5F5F5; intensity:2" position="-1 3 2"></a-entity></a-entity> <!-- sounds --> <a-entity id="vibes" geometry="primitive: plane" material="color: pink" position="-10 0 0" sound="src: vibes.mp3; autoplay: false"></a-entity> <a-entity id="mainMenu" position="-4.5 3.5 -8"><a-plane material="src:url(https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcT5l4ULXmIyLZDMgJ2-iUnWSINwaxERpLFlqwBtnEFekiYlwnyn)"></a-plane></a-entity> <a-sky color="#333"></a-sky> </a-scene> <script> $(document).ready(function(){ document.querySelector('#sphere1').addEventListener('click', function () { // text add $("a-scene").append('<a-entity><a-entity material="color:#F16785" scale="5 5 5" text="text:Lay ut"></a-entity><a-animation begin="500" attribute="position" from="20 0 -10" to=".15 0 -10"></a-animation></a-entity>'); $("a-scene").append('<a-entity><a-entity material="color:#F16785" scale="5 5 5" text="text:Virtual"></a-entity><a-animation begin="500" attribute="position" from="-20 0 -10" to="-10.5 0 -10"></a-animation></a-entity>'); // welcome slide in and slide out $("a-scene").append('<a-entity><a-entity material="color:#F16785" scale="1 1 1" text="text:Welcome to"></a-entity><a-animation begin="1100" attribute="position" from="-20 3 -10" to="-4 3 -10"></a-animation><a-animation begin="2000" attribute="position" from="-4 3 -10" to="-40 3 -10"></a-animation><a-animation begin="6050" attribute="position" from="-43 3 -10" to="-8 3 -10 -10"></a-animation></a-entity>'); // animated spotlight $("a-scene").append('<a-entity><a-entity id="spotLight" light="color:#F5F5F5; type:spot; intensity:1.8; angle:10"></a-entity><a-animation id="durAnimation" attribute="position" dur="5000" from="-25 -2 2" to="25 -1 4" repeat="indefinite"></a-animation></a-entity>'); // remove original sphere $(this).hide(1,function(){$(this).remove();}); // create new sphere $("a-scene").append('<a-entity id="sphereB" camera"><a-sphere position="0 0 -2" id="sphere1" material="src:url(http://www.headsub.com/attachment/uq23A3T8/Templates/Textures/Football.png)" radius="1"></a-sphere><a-animation attribute="position" from=0 0 -4" to="0 4 -8"></a-animation><a-animation begin="1410" attribute="rotation" dur="5000" fill="forwards" to="0 0 -360"></a-animation><a-animation attribute="position" begin="1710" from="0 4 -8" to="2 5 -8"></a-animation><a-animation attribute="position" begin="2500" from="2 5 -8" to="3.5 3.2 -8"></a-animation><a-animation attribute="position" begin="3400" from="3.5 3.2 -8" to="6.58 3.2 -8"></a-animation><a-animation attribute="position" begin="4500" from="6.58 3.2 -8" to="6.58 .9 -8"></a-animation></a-entity>'); // sphere slammer $("a-scene").append('<a-entity id="sphereRod"><a-cylinder></a-cylinder height="5"><a-animation begin="3800" attribute="position" from="6.58 20 -10" to="6.58 3.5 -10"></a-animation><a-animation begin="4500" attribute="position" from="6.58 3.5 -10" to="6.58 20 -10"></a-animation></a-entity>') // welcome slammer $("a-scene").append('<a-entity id="welcomeRod"><a-cylinder></a-cylinder height="5" rotation="0 0 180"><a-animation begin="6000" attribute="position" from="-41 3 -10" to="-10 3 -10 -10"></a-animation><a-animation begin="7500" attribute="position" from="-10 3 -10" to="-100 3 -10"></a-animation></a-entity>') }); document.querySelector('#mainMenu').addEventListener('toggle', function(){ $('a-scene').append('<a-entity id="lightSwitch"><a-plane material="src:url(https://d13yacurqjgara.cloudfront.net/users/63537/screenshots/1069396/toggle.gif)" position="-5.5 -3.5 -8"></a-plane></a-entity>') $('a-scene').append('<a-entity id="sphereMenu"><a-plane material="src:url(https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/128/switch.png)" position="-5.5 3.5 -8"></a-plane></a-entity>') $('a-scene').append('<a-entity id="fogSwitch"><a-plane material="src:url(https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQaw2r7ErK7CnwqssEY1ulDL6s0gZe7raDCUaovxK4WMSkDrwubiF2M7w)" position="-5.5 -7 -8"></a-plane></a-entity>') $('a-scene').append('<a-entity id=spotLightSpeed><a-plane material="src:url(https://cdn0.iconfinder.com/data/icons/astronomy-1/500/speed-512.png)" position="-5.5 -9.5 -8"></a-plane></a-entity>'); $('a-scene').append('<a-entity id="cameraSwitch"><a-plane material="src:url()" position="-5.5 -12 -8"></a-plane></a-entity>'); $('a-scene')append('<a-entity id="vibesSwitch"><a-plane material="src:url()" position="-5.5 -14.5 -8"></a-plane></a-entity>') }) document.querySelector('#sphereMenu').addEventListener('click', function () { $('a-scene').append('<a-entity id="MENU"><a-plane height="2" width="10" position="2 5 -7"></a-plane></a-entity>') $('a-scene').append('<a-plane id="futbol" height="1.5" width="1.5" position="-1.5 5 -6.8" material="src:url(http://www.headsub.com/attachment/uq23A3T8/Templates/Textures/Football.png)"></a-plane>') $('a-scene').append('<a-entity id="bask"><a-plane id="basketball" height="1.5" width="1.5" position=".5 5 -6.8" material="src:url(http://www.robinwood.com/Catalog/FreeStuff/Textures/TextureDownloads/Balls/BasketballColor.jpg)"></a-plane></a-entity>'); }); document.querySelector('#bask').addEventListener('toggle', function () { $('#sphere1').attr('material', 'src:url(http://www.robinwood.com/Catalog/FreeStuff/Textures/TextureDownloads/Balls/BasketballColor.jpg)'); }); document.querySelector('#lightSwitch').addEventListener('click', function () { $('#light').attr('light','color:#555555; intensity:5'); }); document.querySelector('#fogSwitch').addEventListener('click', function () { $('#light').attr('light','color:#555555; intensity:5'); }); document.querySelector('#spotLightSpeed').addEventListener('click', function () { $('#durAnimation').attr('dur','3000'); }); document.querySelector('#cameraSwitch').addEventListener('click', function () { $('#camera').attr('position','5 0 0'); $('#camera').attr('rotation','20 0 0'); }); document.querySelector('#vibesSwitch').addEventListener('click', function(){ $('#vibes').attr('autoplay', 'true'); }) }); </script> </body> </html>
VirtualLayout/360sites
day57-vlVibesSwitch.html
HTML
apache-2.0
7,334
var angularjs = angular.module('articleDetailModule', ['courseTagServiceModule', 'ngCookies', 'ngVideo']); angularjs.controller('ArticleDetailController', ['$rootScope', '$scope', '$http', '$stateParams', '$state', '$location', 'CourseTagService', '$sce', '$cookies', '$httpParamSerializer', 'video', '$route', function($rootScope, $scope, $http, $stateParams, $state, $location, courseTagSrv, $sce, $cookies, $httpParamSerializer, video, $route) { if ($stateParams.courseId === undefined) { $state.go('home'); } var token = $location.search().token; if (token !== undefined) { console.log('set token on cookie'); $cookies.put('access_token', token); } $scope.showShare = false; $scope.shareImg = "img/share_400_400_2.png"; $scope.courseUrl = $location.absUrl(); console.log('location=', $scope.courseUrl); var util = new DomainNameUtil($location); $scope.originUrl = window.location.href; console.log('get access token:', $cookies.get('access_token')); $scope.favoriteCls = 'fontawesome-heart-empty'; $scope.favoriteText = '收藏'; $http.get(util.getBackendServiceUrl() + '/course/proposal/' + $stateParams.courseId, { headers: { 'access_token': $cookies.get('access_token') } }). success(function(e) { console.log('get course ', e); $scope.course = e; $rootScope.title = e.name; var $body = $('body'); var $iframe = $('<iframe src="/favicon.ico"></iframe>'); $iframe.on('load', function() { setTimeout(function() { $iframe.off('load').remove(); }, 0); }).appendTo($body); $scope.course.videoUrl = $sce.trustAsResourceUrl($scope.course.videoUrl); document.getElementById('article_content').innerHTML = $scope.course.content; // video.addSource('mp4',$scope.course.videoUrl); setFavoriteDom(); configJSAPI(); }).error(function(e) { }); $http.get(util.getBackendServiceUrl() + '/course/proposal/query?number=3&ignore_course_id=' + $stateParams.courseId) .success(function(e) { console.log('get related courses ', e); $scope.relatedCourses = e; }).error(function(e) { }); courseTagSrv.getCourseTags().then(function(e) { $scope.courseTags = e; }); $scope.background = function(course) { return { 'background-image': 'url(' + course.titleImageUrl + ')', 'background-size': '100%' }; } $scope.goToCourseTag = function(tag, $event) { console.log('go to course tag'); $state.go('course_tags', { courseTagId: tag.id, courseName: tag.name }); $event.stopPropagation(); } $scope.share = function() { console.log('share'); $scope.showShare = true; // var ret = recordShareFavorite('SHARE'); // ret.success(function(e){ // }); } $scope.favorite = function() { console.log('favorite'); if ($cookies.get('access_token') === undefined) { var redirect = encodeURI($scope.courseUrl).replace('#', '%23'); console.log('redirect=', encodeURI($scope.courseUrl).replace('#', '%23')); window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfe34c2ab5b5c5813&redirect_uri=http%3a%2f%2fwww.imzao.com%2feducation%2fzaozao%2fwechat%2flogin&response_type=code&scope=snsapi_userinfo&state=WECHAT_SERVICE-' + redirect + '#wechat_redirect'; return; } var promise = recordShareFavorite('FAVORITE'); promise.success(function(e) { console.log('favorite success ', e); $scope.course.favorited = !$scope.course.favorited; setFavoriteDom(); }).error(function(e) { console.log('share failed'); }); } function setFavoriteDom() { if ($scope.course.favorited === true) { $scope.favoriteCls = 'fontawesome-heart'; $scope.favoriteText = '已收藏'; } else { $scope.favoriteCls = 'fontawesome-heart-empty'; $scope.favoriteText = '收藏'; } } $scope.hideShare = function() { $scope.showShare = false; } $scope.showPlayButton = true; $scope.showVideo = false; $scope.playVideo = function(e) { console.log('course video,', $("#course_video")); $("#course_video")[0].play(); } document.getElementById('course_video').addEventListener('webkitendfullscreen', function(e) { // handle end full screen console.log('webkitendfullscreen'); $scope.showVideo = false; $scope.showPlayButton = true; $scope.$apply(); }); document.getElementById('course_video').addEventListener('webkitenterfullscreen', function(e) { // handle end full screen console.log('webkitenterfullscreen'); $scope.showVideo = true; $scope.$apply(); }); // $scope.videoEnded = function(e) { // console.log('video ended '); // $scope.showPlayButton = true; // } // $scope.videoPaused = function(e) { // console.log('video paused '); // $scope.showPlayButton = true; // } function configJSAPI() { console.log('js api config:', $scope.courseUrl); $http.get(util.getBackendServiceUrl() + '/wechat/jsapi?url=' + $scope.courseUrl.split('#')[0].replace('&', '%26')) .success(function(e) { console.log(e); var signature = e; wx.config({ debug: false, appId: e.appid, timestamp: e.timestamp, nonceStr: e.noncestr, signature: e.signature, jsApiList: ['checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage'] }); wx.ready(function() { console.log('wx ready'); }); wx.error(function(res) { console.log('wx error'); }); wx.onMenuShareTimeline({ title: $scope.course.name, link: $scope.courseUrl, imgUrl: encodeURI($scope.course.titleImageUrl), success: function() { console.log('share success'); scope.showShare = false; recordShareFavorite('SHARE'); }, cancel: function() { console.log('cancel share'); scope.showShare = false; } }); var shareDesc = ''; console.log('share desc:', $scope.course.introduction); if ($scope.course.introduction !== null && $scope.course.introduction !== 'undefined') { shareDesc = $scope.course.introduction; } wx.onMenuShareAppMessage({ title: $scope.course.name, // 分享标题 desc: shareDesc, // 分享描述 link: $scope.courseUrl, // 分享链接 imgUrl: encodeURI($scope.course.titleImageUrl), // 分享图标 // 分享类型,music、video或link,不填默认为link // 如果type是music或video,则要提供数据链接,默认为空 success: function(res) { // 用户确认分享后执行的回调函数 console.log('share success'); recordShareFavorite('SHARE'); scope.showShare = false; }, cancel: function(res) { // 用户取消分享后执行的回调函数 console.log('cancel share'); scope.showShare = false; }, fail: function(res) { } }); }).error(function(e) { }); } function recordShareFavorite(activity) { var link = util.getBackendServiceUrl() + '/course/interactive'; var req = { method: 'POST', url: link, headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'access_token': $cookies.get('access_token') //'Content-Type': 'multipart/form-data; charset=utf-8;' }, data: $httpParamSerializer({ course_id: $scope.course.id, flag: activity }) }; return $http(req); } } ]); angularjs.directive('videoLoader', function() { return function(scope, element, attrs) { scope.$watch(attrs.videoLoader, function() { console.log('element:', element); $("#course_video").bind('ended', function() { console.log('video ended.'); // element.removeAttr('controls'); scope.showPlayButton = true; scope.showVideo = false; scope.$apply(); // $(this).unbind('ended'); // if (!this.hasPlayed) { // return; // } }); $("#course_video").bind('pause', function() { console.log('video paused.'); scope.showPlayButton = false; scope.showVideo = true; // element.attr('controls',true); scope.$apply(); // $(this).unbind('paused'); // if (!this.hasPlayed) { // return; // } }); $("#course_video").bind('play', function() { console.log('video played.'); scope.showPlayButton = false; scope.showVideo = true; // element.attr('controls',true); scope.$apply(); // $(this).unbind('played'); // if (!this.hasPlayed) { // return; // } }); $("#course_video").bind('webkitfullscreenchange mozfullscreenchange fullscreenchange', function(event) { console.log('full screen ', event); var state = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; if (state !== undefined) { scope.showVideo = true; } else { scope.showVideo = false; } scope.$apply(); }); }); } });
c2611261/zaozao2
public/js/article_detail.js
JavaScript
apache-2.0
8,955
import time from tsm.common.app import exception import requests import json from requests.packages.urllib3.util.retry import Retry from requests.adapters import HTTPAdapter KANGROUTER_WEBSERVICE_APPLICATION_ROOT="/kangrouter/srv/v1" class KangRouterClient: pathbase = "https://thesolvingmachine.com/kangrouter/srv/v1/solvers" def __init__(self,apiKey,licenseId): self.headers = {"content-type": "application/json", "Authorization": apiKey} self.params = {"licenseId" : licenseId } retries = Retry(total=5, backoff_factor=0.75) self.session = requests.Session() self.session.mount(KANGROUTER_WEBSERVICE_APPLICATION_ROOT, HTTPAdapter(max_retries=retries)) def validateReply(self,req): if req.status_code >= 400 and req.status_code <= 500: try: j = req.json() except ValueError: raise exception.InternalError(req.text,req.status_code) raise exception.jsonToException(req.json()) def create(self,problem,**kwargs): path = self.pathbase payload=json.dumps(problem) params = self.params.copy() params.update(kwargs) req = self.session.post(path, params=params, headers=self.headers, data=payload) self.validateReply(req) return req.text def delete(self,solverId): path = "{base}/{solverId}".format(base=self.pathbase, solverId=str(solverId)) req = self.session.delete(path, params=self.params, headers=self.headers) self.validateReply(req) return True def stop(self,solverId): path = "{base}/{solverId}/stop".format(base=self.pathbase, solverId=str(solverId)) req = self.session.put(path, params=self.params, headers=self.headers) self.validateReply(req) return True def getStatus(self,solverId): path = "{base}/{solverId}/status".format(base=self.pathbase, solverId=str(solverId)) req = self.session.get(path, params=self.params, headers=self.headers) self.validateReply(req) return req.json() def getSolution(self,solverId): path = "{base}/{solverId}/solution".format(base=self.pathbase, solverId=str(solverId)) req = self.session.get(path, params=self.params, headers=self.headers) self.validateReply(req) return req.json() # polling def createAndWait(self,problem,cancel,**kwargs): solverId = self.create(problem,**kwargs) timeout = 300 while not cancel() and timeout>0: status = self.getStatus(solverId) if status["execStatus"] =="invalid": raise exception.solverError(json.dumps(status["errors"])) if status["execStatus"] =="completed": return self.getSolution(solverId) time.sleep(1) timeout -= 1 if timeout == 0: raise exception.InternalError("Timed out waiting for solver") raise exception.UserCancelled()
TheSolvingMachine/kangrouter-py
kangrouter.py
Python
apache-2.0
3,278
/* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory This file is part of HermiT. HermiT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HermiT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with HermiT. If not, see <http://www.gnu.org/licenses/>. */ package org.semanticweb.HermiT.datatypes.owlreal; import java.math.BigDecimal; import java.math.BigInteger; public enum NumberRange { NOTHING, INTEGER, DECIMAL, RATIONAL, REAL; public boolean isDense() { return ordinal() >= DECIMAL.ordinal(); } public static NumberRange intersection(NumberRange it1, NumberRange it2) { int minOrdinal = Math.min(it1.ordinal(), it2.ordinal()); return values()[minOrdinal]; } public static NumberRange union(NumberRange it1, NumberRange it2) { int maxOrdinal = Math.max(it1.ordinal(), it2.ordinal()); return values()[maxOrdinal]; } public static boolean isSubsetOf(NumberRange subset, NumberRange superset) { return subset.ordinal() <= superset.ordinal(); } public static NumberRange getMostSpecificRange(Number n) { if (n instanceof Integer || n instanceof Long || n instanceof BigInteger) return INTEGER; else if (n instanceof BigDecimal) return DECIMAL; else if (n instanceof BigRational) return RATIONAL; else throw new IllegalArgumentException(); } }
CPoirot3/OWL-Reasoner
project/src/org/semanticweb/HermiT/datatypes/owlreal/NumberRange.java
Java
apache-2.0
1,986
/* * Copyright 2017-2022 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://aws.amazon.com/apache2.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. */ package com.amazonaws.services.lookoutequipment.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.lookoutequipment.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * CreateDatasetResult JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDatasetResultJsonUnmarshaller implements Unmarshaller<CreateDatasetResult, JsonUnmarshallerContext> { public CreateDatasetResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateDatasetResult createDatasetResult = new CreateDatasetResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return createDatasetResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("DatasetName", targetDepth)) { context.nextToken(); createDatasetResult.setDatasetName(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("DatasetArn", targetDepth)) { context.nextToken(); createDatasetResult.setDatasetArn(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Status", targetDepth)) { context.nextToken(); createDatasetResult.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return createDatasetResult; } private static CreateDatasetResultJsonUnmarshaller instance; public static CreateDatasetResultJsonUnmarshaller getInstance() { if (instance == null) instance = new CreateDatasetResultJsonUnmarshaller(); return instance; } }
aws/aws-sdk-java
aws-java-sdk-lookoutequipment/src/main/java/com/amazonaws/services/lookoutequipment/model/transform/CreateDatasetResultJsonUnmarshaller.java
Java
apache-2.0
3,307
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="Recipe.cs" company="Dapr Labs"> // Copyright 2014, Dapr Labs Pty. Ltd. // </copyright> // <summary> // Describes a recipe. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace ForkTip.Models { using System; using System.Collections.Generic; /// <summary> /// Describes a recipe. /// </summary> [Serializable] public class Recipe { /// <summary> /// Gets or sets the id. /// </summary> public Guid Id { get; set; } /// <summary> /// Gets or sets the name. /// </summary> public string Name { get; set; } /// <summary> /// Gets or sets the creator's name. /// </summary> public string Author { get; set; } /// <summary> /// Gets or sets the description. /// </summary> public string Description { get; set; } /// <summary> /// Gets or sets the ingredients. /// </summary> public List<string> Ingredients { get; set; } /// <summary> /// Gets or sets the directions. /// </summary> public List<string> Directions { get; set; } } }
daprlabs/ForkTip
ForkTip/Models/Recipe.cs
C#
apache-2.0
1,399
package com.designpattern.structural.facade; public class Facade { SystemOne system1 = new SystemOne(); SystemTwo system2 = new SystemTwo(); SystemThree system3 = new SystemThree(); SystemFour system4 = new SystemFour(); public void facadeFunction1() { System.out.println("---- facade function 1"); system1.methodOne(); system3.methodThree(); system4.methodFour(); System.out.println("---- facade function 1 end"); } public void facadeFunction2() { System.out.println("---- facade function 2"); system2.methodTwo(); system3.methodThree(); System.out.println("---- facade function 2 end"); } }
tyybjcc/Design-Patterns-in-java
DesignPatterns/src/com/designpattern/structural/facade/Facade.java
Java
apache-2.0
649
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_92) on Wed Jul 27 21:27:29 CEST 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>PythonParserConstants (PMD Python 5.5.1 API)</title> <meta name="date" content="2016-07-27"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="PythonParserConstants (PMD Python 5.5.1 API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PythonParserConstants.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserTokenManager.html" title="class in net.sourceforge.pmd.lang.python.ast"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html" target="_top">Frames</a></li> <li><a href="PythonParserConstants.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li>Method</li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">net.sourceforge.pmd.lang.python.ast</div> <h2 title="Interface PythonParserConstants" class="title">Interface PythonParserConstants</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Known Implementing Classes:</dt> <dd><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserTokenManager.html" title="class in net.sourceforge.pmd.lang.python.ast">PythonParserTokenManager</a></dd> </dl> <hr> <br> <pre>public interface <span class="typeNameLabel">PythonParserConstants</span></pre> <div class="block">Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#AND">AND</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#AND_BOOL">AND_BOOL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#ANDEQ">ANDEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#AS">AS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#ASSERT">ASSERT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#AT">AT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#BINNUMBER">BINNUMBER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#BREAK">BREAK</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#CLASS">CLASS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#COLON">COLON</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#COMMA">COMMA</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#COMPLEX">COMPLEX</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#CONTINUATION">CONTINUATION</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#CONTINUE">CONTINUE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DECNUMBER">DECNUMBER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DEF">DEF</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DEFAULT">DEFAULT</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DEL">DEL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DIGIT">DIGIT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DIVIDE">DIVIDE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DIVIDEEQ">DIVIDEEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#DOT">DOT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#ELIF">ELIF</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#ELSE">ELSE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EOF">EOF</a></span></code> <div class="block">End of File.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EQEQUAL">EQEQUAL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EQGREATER">EQGREATER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EQLESS">EQLESS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EQUAL">EQUAL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EXCEPT">EXCEPT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EXEC">EXEC</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#EXPONENT">EXPONENT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FINALLY">FINALLY</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FLOAT">FLOAT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FLOORDIVIDE">FLOORDIVIDE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FLOORDIVIDEEQ">FLOORDIVIDEEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FOR">FOR</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#FROM">FROM</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#GLOBAL">GLOBAL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#GREATER">GREATER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#HEXNUMBER">HEXNUMBER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IF">IF</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IMPORT">IMPORT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN">IN</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING11">IN_BSTRING11</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING13">IN_BSTRING13</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING1NLC">IN_BSTRING1NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING21">IN_BSTRING21</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING23">IN_BSTRING23</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_BSTRING2NLC">IN_BSTRING2NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING11">IN_STRING11</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING13">IN_STRING13</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING1NLC">IN_STRING1NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING21">IN_STRING21</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING23">IN_STRING23</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_STRING2NLC">IN_STRING2NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING11">IN_USTRING11</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING13">IN_USTRING13</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING1NLC">IN_USTRING1NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING21">IN_USTRING21</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING23">IN_USTRING23</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IN_USTRING2NLC">IN_USTRING2NLC</a></span></code> <div class="block">Lexical state.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#IS">IS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LAMBDA">LAMBDA</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LBRACE">LBRACE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LBRACKET">LBRACKET</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LESS">LESS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LESSGREATER">LESSGREATER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LETTER">LETTER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LPAREN">LPAREN</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LSHIFT">LSHIFT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#LSHIFTEQ">LSHIFTEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MINUS">MINUS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MINUSEQ">MINUSEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MODULO">MODULO</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MODULOEQ">MODULOEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MULTIPLY">MULTIPLY</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#MULTIPLYEQ">MULTIPLYEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#NAME">NAME</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#NEWLINE">NEWLINE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#NOT">NOT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#NOT_BOOL">NOT_BOOL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#NOTEQUAL">NOTEQUAL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#OCTNUMBER">OCTNUMBER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#OR">OR</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#OR_BOOL">OR_BOOL</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#OREQ">OREQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#PASS">PASS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#PLUS">PLUS</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#PLUSEQ">PLUSEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#POWER">POWER</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#POWEREQ">POWEREQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#PRINT">PRINT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RAISE">RAISE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RBRACE">RBRACE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RBRACKET">RBRACKET</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RETURN">RETURN</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RPAREN">RPAREN</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RSHIFT">RSHIFT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#RSHIFTEQ">RSHIFTEQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SEMICOLON">SEMICOLON</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_BSTRING">SINGLE_BSTRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_BSTRING2">SINGLE_BSTRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_STRING">SINGLE_STRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_STRING2">SINGLE_STRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_USTRING">SINGLE_USTRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SINGLE_USTRING2">SINGLE_USTRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#SPACE">SPACE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#tokenImage">tokenImage</a></span></code> <div class="block">Literal token values.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRAILING_COMMENT">TRAILING_COMMENT</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_BSTRING">TRIPLE_BSTRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_BSTRING2">TRIPLE_BSTRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_STRING">TRIPLE_STRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_STRING2">TRIPLE_STRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_USTRING">TRIPLE_USTRING</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRIPLE_USTRING2">TRIPLE_USTRING2</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#TRY">TRY</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#WHILE">WHILE</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#WITH">WITH</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#XOR">XOR</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#XOREQ">XOREQ</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html#YIELD">YIELD</a></span></code> <div class="block">RegularExpression Id.</div> </td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="EOF"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EOF</h4> <pre>static final&nbsp;int EOF</pre> <div class="block">End of File.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EOF">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SPACE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SPACE</h4> <pre>static final&nbsp;int SPACE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SPACE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="CONTINUATION"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONTINUATION</h4> <pre>static final&nbsp;int CONTINUATION</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.CONTINUATION">Constant Field Values</a></dd> </dl> </li> </ul> <a name="NEWLINE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>NEWLINE</h4> <pre>static final&nbsp;int NEWLINE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.NEWLINE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRAILING_COMMENT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRAILING_COMMENT</h4> <pre>static final&nbsp;int TRAILING_COMMENT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRAILING_COMMENT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LPAREN"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LPAREN</h4> <pre>static final&nbsp;int LPAREN</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LPAREN">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RPAREN"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RPAREN</h4> <pre>static final&nbsp;int RPAREN</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RPAREN">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LBRACE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LBRACE</h4> <pre>static final&nbsp;int LBRACE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LBRACE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RBRACE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RBRACE</h4> <pre>static final&nbsp;int RBRACE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RBRACE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LBRACKET"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LBRACKET</h4> <pre>static final&nbsp;int LBRACKET</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LBRACKET">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RBRACKET"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RBRACKET</h4> <pre>static final&nbsp;int RBRACKET</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RBRACKET">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SEMICOLON"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SEMICOLON</h4> <pre>static final&nbsp;int SEMICOLON</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SEMICOLON">Constant Field Values</a></dd> </dl> </li> </ul> <a name="COMMA"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>COMMA</h4> <pre>static final&nbsp;int COMMA</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.COMMA">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DOT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DOT</h4> <pre>static final&nbsp;int DOT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DOT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="COLON"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>COLON</h4> <pre>static final&nbsp;int COLON</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.COLON">Constant Field Values</a></dd> </dl> </li> </ul> <a name="PLUS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>PLUS</h4> <pre>static final&nbsp;int PLUS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.PLUS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MINUS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MINUS</h4> <pre>static final&nbsp;int MINUS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MINUS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MULTIPLY"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MULTIPLY</h4> <pre>static final&nbsp;int MULTIPLY</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MULTIPLY">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DIVIDE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DIVIDE</h4> <pre>static final&nbsp;int DIVIDE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DIVIDE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FLOORDIVIDE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FLOORDIVIDE</h4> <pre>static final&nbsp;int FLOORDIVIDE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FLOORDIVIDE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="POWER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>POWER</h4> <pre>static final&nbsp;int POWER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.POWER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LSHIFT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LSHIFT</h4> <pre>static final&nbsp;int LSHIFT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LSHIFT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RSHIFT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RSHIFT</h4> <pre>static final&nbsp;int RSHIFT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RSHIFT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MODULO"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MODULO</h4> <pre>static final&nbsp;int MODULO</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MODULO">Constant Field Values</a></dd> </dl> </li> </ul> <a name="NOT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>NOT</h4> <pre>static final&nbsp;int NOT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.NOT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="XOR"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>XOR</h4> <pre>static final&nbsp;int XOR</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.XOR">Constant Field Values</a></dd> </dl> </li> </ul> <a name="OR"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>OR</h4> <pre>static final&nbsp;int OR</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.OR">Constant Field Values</a></dd> </dl> </li> </ul> <a name="AND"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>AND</h4> <pre>static final&nbsp;int AND</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.AND">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EQUAL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EQUAL</h4> <pre>static final&nbsp;int EQUAL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EQUAL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="GREATER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>GREATER</h4> <pre>static final&nbsp;int GREATER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.GREATER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LESS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LESS</h4> <pre>static final&nbsp;int LESS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LESS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EQEQUAL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EQEQUAL</h4> <pre>static final&nbsp;int EQEQUAL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EQEQUAL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EQLESS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EQLESS</h4> <pre>static final&nbsp;int EQLESS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EQLESS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EQGREATER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EQGREATER</h4> <pre>static final&nbsp;int EQGREATER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EQGREATER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LESSGREATER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LESSGREATER</h4> <pre>static final&nbsp;int LESSGREATER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LESSGREATER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="NOTEQUAL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>NOTEQUAL</h4> <pre>static final&nbsp;int NOTEQUAL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.NOTEQUAL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="PLUSEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>PLUSEQ</h4> <pre>static final&nbsp;int PLUSEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.PLUSEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MINUSEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MINUSEQ</h4> <pre>static final&nbsp;int MINUSEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MINUSEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MULTIPLYEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MULTIPLYEQ</h4> <pre>static final&nbsp;int MULTIPLYEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MULTIPLYEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DIVIDEEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DIVIDEEQ</h4> <pre>static final&nbsp;int DIVIDEEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DIVIDEEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FLOORDIVIDEEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FLOORDIVIDEEQ</h4> <pre>static final&nbsp;int FLOORDIVIDEEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FLOORDIVIDEEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="MODULOEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>MODULOEQ</h4> <pre>static final&nbsp;int MODULOEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.MODULOEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="ANDEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ANDEQ</h4> <pre>static final&nbsp;int ANDEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.ANDEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="OREQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>OREQ</h4> <pre>static final&nbsp;int OREQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.OREQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="XOREQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>XOREQ</h4> <pre>static final&nbsp;int XOREQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.XOREQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LSHIFTEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LSHIFTEQ</h4> <pre>static final&nbsp;int LSHIFTEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LSHIFTEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RSHIFTEQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RSHIFTEQ</h4> <pre>static final&nbsp;int RSHIFTEQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RSHIFTEQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="POWEREQ"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>POWEREQ</h4> <pre>static final&nbsp;int POWEREQ</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.POWEREQ">Constant Field Values</a></dd> </dl> </li> </ul> <a name="OR_BOOL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>OR_BOOL</h4> <pre>static final&nbsp;int OR_BOOL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.OR_BOOL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="AND_BOOL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>AND_BOOL</h4> <pre>static final&nbsp;int AND_BOOL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.AND_BOOL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="NOT_BOOL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>NOT_BOOL</h4> <pre>static final&nbsp;int NOT_BOOL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.NOT_BOOL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IS</h4> <pre>static final&nbsp;int IS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN</h4> <pre>static final&nbsp;int IN</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LAMBDA"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LAMBDA</h4> <pre>static final&nbsp;int LAMBDA</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LAMBDA">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IF"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IF</h4> <pre>static final&nbsp;int IF</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IF">Constant Field Values</a></dd> </dl> </li> </ul> <a name="ELSE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ELSE</h4> <pre>static final&nbsp;int ELSE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.ELSE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="ELIF"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ELIF</h4> <pre>static final&nbsp;int ELIF</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.ELIF">Constant Field Values</a></dd> </dl> </li> </ul> <a name="WHILE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>WHILE</h4> <pre>static final&nbsp;int WHILE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.WHILE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FOR"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FOR</h4> <pre>static final&nbsp;int FOR</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FOR">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRY"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRY</h4> <pre>static final&nbsp;int TRY</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRY">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EXCEPT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EXCEPT</h4> <pre>static final&nbsp;int EXCEPT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EXCEPT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DEF"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DEF</h4> <pre>static final&nbsp;int DEF</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DEF">Constant Field Values</a></dd> </dl> </li> </ul> <a name="CLASS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CLASS</h4> <pre>static final&nbsp;int CLASS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.CLASS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FINALLY"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FINALLY</h4> <pre>static final&nbsp;int FINALLY</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FINALLY">Constant Field Values</a></dd> </dl> </li> </ul> <a name="PRINT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>PRINT</h4> <pre>static final&nbsp;int PRINT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.PRINT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="PASS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>PASS</h4> <pre>static final&nbsp;int PASS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.PASS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="BREAK"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>BREAK</h4> <pre>static final&nbsp;int BREAK</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.BREAK">Constant Field Values</a></dd> </dl> </li> </ul> <a name="CONTINUE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>CONTINUE</h4> <pre>static final&nbsp;int CONTINUE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.CONTINUE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RETURN"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RETURN</h4> <pre>static final&nbsp;int RETURN</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RETURN">Constant Field Values</a></dd> </dl> </li> </ul> <a name="YIELD"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>YIELD</h4> <pre>static final&nbsp;int YIELD</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.YIELD">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IMPORT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IMPORT</h4> <pre>static final&nbsp;int IMPORT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IMPORT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FROM"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FROM</h4> <pre>static final&nbsp;int FROM</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FROM">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DEL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DEL</h4> <pre>static final&nbsp;int DEL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DEL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="RAISE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>RAISE</h4> <pre>static final&nbsp;int RAISE</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.RAISE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="GLOBAL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>GLOBAL</h4> <pre>static final&nbsp;int GLOBAL</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.GLOBAL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EXEC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EXEC</h4> <pre>static final&nbsp;int EXEC</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EXEC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="ASSERT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ASSERT</h4> <pre>static final&nbsp;int ASSERT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.ASSERT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="AS"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>AS</h4> <pre>static final&nbsp;int AS</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.AS">Constant Field Values</a></dd> </dl> </li> </ul> <a name="WITH"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>WITH</h4> <pre>static final&nbsp;int WITH</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.WITH">Constant Field Values</a></dd> </dl> </li> </ul> <a name="AT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>AT</h4> <pre>static final&nbsp;int AT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.AT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="NAME"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>NAME</h4> <pre>static final&nbsp;int NAME</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.NAME">Constant Field Values</a></dd> </dl> </li> </ul> <a name="LETTER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>LETTER</h4> <pre>static final&nbsp;int LETTER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.LETTER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DECNUMBER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DECNUMBER</h4> <pre>static final&nbsp;int DECNUMBER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DECNUMBER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="HEXNUMBER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>HEXNUMBER</h4> <pre>static final&nbsp;int HEXNUMBER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.HEXNUMBER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="OCTNUMBER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>OCTNUMBER</h4> <pre>static final&nbsp;int OCTNUMBER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.OCTNUMBER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="BINNUMBER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>BINNUMBER</h4> <pre>static final&nbsp;int BINNUMBER</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.BINNUMBER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FLOAT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FLOAT</h4> <pre>static final&nbsp;int FLOAT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.FLOAT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="COMPLEX"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>COMPLEX</h4> <pre>static final&nbsp;int COMPLEX</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.COMPLEX">Constant Field Values</a></dd> </dl> </li> </ul> <a name="EXPONENT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>EXPONENT</h4> <pre>static final&nbsp;int EXPONENT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.EXPONENT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DIGIT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DIGIT</h4> <pre>static final&nbsp;int DIGIT</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DIGIT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_STRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_STRING</h4> <pre>static final&nbsp;int SINGLE_STRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_STRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_STRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_STRING2</h4> <pre>static final&nbsp;int SINGLE_STRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_STRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_STRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_STRING</h4> <pre>static final&nbsp;int TRIPLE_STRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_STRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_STRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_STRING2</h4> <pre>static final&nbsp;int TRIPLE_STRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_STRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_BSTRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_BSTRING</h4> <pre>static final&nbsp;int SINGLE_BSTRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_BSTRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_BSTRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_BSTRING2</h4> <pre>static final&nbsp;int SINGLE_BSTRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_BSTRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_BSTRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_BSTRING</h4> <pre>static final&nbsp;int TRIPLE_BSTRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_BSTRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_BSTRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_BSTRING2</h4> <pre>static final&nbsp;int TRIPLE_BSTRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_BSTRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_USTRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_USTRING</h4> <pre>static final&nbsp;int SINGLE_USTRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_USTRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="SINGLE_USTRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>SINGLE_USTRING2</h4> <pre>static final&nbsp;int SINGLE_USTRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.SINGLE_USTRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_USTRING"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_USTRING</h4> <pre>static final&nbsp;int TRIPLE_USTRING</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_USTRING">Constant Field Values</a></dd> </dl> </li> </ul> <a name="TRIPLE_USTRING2"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>TRIPLE_USTRING2</h4> <pre>static final&nbsp;int TRIPLE_USTRING2</pre> <div class="block">RegularExpression Id.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.TRIPLE_USTRING2">Constant Field Values</a></dd> </dl> </li> </ul> <a name="DEFAULT"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>DEFAULT</h4> <pre>static final&nbsp;int DEFAULT</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.DEFAULT">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING11"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING11</h4> <pre>static final&nbsp;int IN_STRING11</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING11">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING21"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING21</h4> <pre>static final&nbsp;int IN_STRING21</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING21">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING13"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING13</h4> <pre>static final&nbsp;int IN_STRING13</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING13">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING23"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING23</h4> <pre>static final&nbsp;int IN_STRING23</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING23">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING11"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING11</h4> <pre>static final&nbsp;int IN_BSTRING11</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING11">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING21"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING21</h4> <pre>static final&nbsp;int IN_BSTRING21</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING21">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING13"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING13</h4> <pre>static final&nbsp;int IN_BSTRING13</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING13">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING23"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING23</h4> <pre>static final&nbsp;int IN_BSTRING23</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING23">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING11"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING11</h4> <pre>static final&nbsp;int IN_USTRING11</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING11">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING21"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING21</h4> <pre>static final&nbsp;int IN_USTRING21</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING21">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING13"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING13</h4> <pre>static final&nbsp;int IN_USTRING13</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING13">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING23"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING23</h4> <pre>static final&nbsp;int IN_USTRING23</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING23">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING1NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING1NLC</h4> <pre>static final&nbsp;int IN_STRING1NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING1NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_STRING2NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_STRING2NLC</h4> <pre>static final&nbsp;int IN_STRING2NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_STRING2NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING1NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING1NLC</h4> <pre>static final&nbsp;int IN_USTRING1NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING1NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_USTRING2NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_USTRING2NLC</h4> <pre>static final&nbsp;int IN_USTRING2NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_USTRING2NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING1NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING1NLC</h4> <pre>static final&nbsp;int IN_BSTRING1NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING1NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="IN_BSTRING2NLC"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>IN_BSTRING2NLC</h4> <pre>static final&nbsp;int IN_BSTRING2NLC</pre> <div class="block">Lexical state.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../../constant-values.html#net.sourceforge.pmd.lang.python.ast.PythonParserConstants.IN_BSTRING2NLC">Constant Field Values</a></dd> </dl> </li> </ul> <a name="tokenImage"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>tokenImage</h4> <pre>static final&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] tokenImage</pre> <div class="block">Literal token values.</div> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PythonParserConstants.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li><a href="../../../../../../net/sourceforge/pmd/lang/python/ast/PythonParserTokenManager.html" title="class in net.sourceforge.pmd.lang.python.ast"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html" target="_top">Frames</a></li> <li><a href="PythonParserConstants.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li>Method</li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2016 <a href="http://pmd.sourceforge.net/">InfoEther</a>. All rights reserved.</small></p> </body> </html>
jasonwee/videoOnCloud
pmd/pmd-doc-5.5.1/pmd-python/apidocs/net/sourceforge/pmd/lang/python/ast/PythonParserConstants.html
HTML
apache-2.0
95,162
<?php namespace Slime; use Illuminate\Database\Eloquent\Model; class Persona extends Model { protected $table = "Persona"; protected $fillable = ['nombre','apellido','Cargo_id']; }
rots87/Slime
SLIME/app/Persona.php
PHP
apache-2.0
192
/* * Copyright (C) 2013 @JamesMontemagno http://www.montemagno.com http://www.refractored.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using Android.Content; using Android.Content.Res; using Android.Graphics; using Android.Runtime; using Android.Util; using Android.Widget; using MyCompany.Visitors.Client.Droid; namespace com.refractored.controls { public class RobotoTextView : TextView { private const int RobotoThin = 0; private const int RobotoThinItalic = 1; private const int RobotoLight = 2; private const int RobotoLightItalic = 3; private const int RobotoRegular = 4; private const int RobotoItalic = 5; private const int RobotoMedium = 6; private const int RobotoMediumItalic = 7; private const int RobotoBold = 8; private const int RobotoBoldItalic = 9; private const int RobotoBlack = 10; private const int RobotoBlackItalic = 11; private const int RobotoCondensed = 12; private const int RobotoCondensedItalic = 13; private const int RobotoCondensedBold = 14; private const int RobotoCondensedBoldItalic = 15; private TypefaceStyle m_Style = TypefaceStyle.Normal; private static readonly Dictionary<int, Typeface> Typefaces = new Dictionary<int, Typeface>(16); public RobotoTextView(Context context) : base(context) { } protected RobotoTextView(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { } public RobotoTextView(Context context, IAttributeSet attrs) : base(context, attrs) { this.Initialize(context, attrs); } public RobotoTextView(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle) { this.Initialize(context, attrs); } private void Initialize(Context context, IAttributeSet attrs) { try { TypedArray values = context.ObtainStyledAttributes(attrs, Resource.Styleable.RobotoTextView); int typefaceValue = values.GetInt(Resource.Styleable.RobotoTextView_typeface, 4); values.Recycle(); var font = this.ObtainTypeface(context, typefaceValue); this.SetTypeface(font, this.m_Style); } catch (Exception) { } } private Typeface ObtainTypeface(Context context, int typefaceValue) { try { Typeface typeface = null; if (Typefaces.ContainsKey(typefaceValue)) typeface = Typefaces[typefaceValue]; if (typeface == null) { typeface = this.CreateTypeface(context, typefaceValue); Typefaces.Add(typefaceValue, typeface); } return typeface; } catch (Exception ex) { } return null; } private Typeface CreateTypeface(Context context, int typefaceValue) { try { Typeface typeface; switch (typefaceValue) { case RobotoThin: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Thin.ttf"); break; case RobotoThinItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-ThinItalic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoLight: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Light.ttf"); break; case RobotoLightItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-LightItalic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoRegular: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Regular.ttf"); break; case RobotoItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Italic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoMedium: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Medium.ttf"); break; case RobotoMediumItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-MediumItalic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoBold: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Bold.ttf"); m_Style = TypefaceStyle.Bold; break; case RobotoBoldItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-BoldItalic.ttf"); m_Style = TypefaceStyle.BoldItalic; break; case RobotoBlack: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Black.ttf"); break; case RobotoBlackItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-BlackItalic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoCondensed: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-Condensed.ttf"); break; case RobotoCondensedItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-CondensedItalic.ttf"); m_Style = TypefaceStyle.Italic; break; case RobotoCondensedBold: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-BoldCondensed.ttf"); m_Style = TypefaceStyle.Bold; break; case RobotoCondensedBoldItalic: typeface = Typeface.CreateFromAsset(context.Assets, "fonts/Roboto-BoldCondensedItalic.ttf"); m_Style = TypefaceStyle.BoldItalic; break; default: throw new ArgumentException("Unknown typeface attribute value " + typefaceValue); } return typeface; } catch (Exception) { } return null; } } }
xamarin/MyCompany
MyCompany.Visitors.Client.Droid/Extensions/RobotoTextView.cs
C#
apache-2.0
7,655
/* * Copyright 2010-2016 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://aws.amazon.com/apache2.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. */ #pragma once #include <aws/dms/DatabaseMigrationService_EXPORTS.h> #include <aws/dms/DatabaseMigrationServiceRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/dms/model/Tag.h> namespace Aws { namespace DatabaseMigrationService { namespace Model { /** * <p/> */ class AWS_DATABASEMIGRATIONSERVICE_API CreateReplicationSubnetGroupRequest : public DatabaseMigrationServiceRequest { public: CreateReplicationSubnetGroupRequest(); Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline const Aws::String& GetReplicationSubnetGroupIdentifier() const{ return m_replicationSubnetGroupIdentifier; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(const Aws::String& value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier = value; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(Aws::String&& value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier = value; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(const char* value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier.assign(value); } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(const Aws::String& value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(Aws::String&& value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(const char* value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline const Aws::String& GetReplicationSubnetGroupDescription() const{ return m_replicationSubnetGroupDescription; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(const Aws::String& value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription = value; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(Aws::String&& value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription = value; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(const char* value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription.assign(value); } /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(const Aws::String& value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(Aws::String&& value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(const char* value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline const Aws::Vector<Aws::String>& GetSubnetIds() const{ return m_subnetIds; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline void SetSubnetIds(const Aws::Vector<Aws::String>& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline void SetSubnetIds(Aws::Vector<Aws::String>&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithSubnetIds(const Aws::Vector<Aws::String>& value) { SetSubnetIds(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithSubnetIds(Aws::Vector<Aws::String>&& value) { SetSubnetIds(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(const Aws::String& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(Aws::String&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(const char* value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;} /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } private: Aws::String m_replicationSubnetGroupIdentifier; bool m_replicationSubnetGroupIdentifierHasBeenSet; Aws::String m_replicationSubnetGroupDescription; bool m_replicationSubnetGroupDescriptionHasBeenSet; Aws::Vector<Aws::String> m_subnetIds; bool m_subnetIdsHasBeenSet; Aws::Vector<Tag> m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace DatabaseMigrationService } // namespace Aws
ambasta/aws-sdk-cpp
aws-cpp-sdk-dms/include/aws/dms/model/CreateReplicationSubnetGroupRequest.h
C
apache-2.0
9,707
<template name="ListStudent"> {{#IfLoggedIn}} <div class="row" style="background-image: url('/images/textbookheader.png'); background-size: cover;"> <div class="col-md-10"> <div class="bumper"> <table class="table table-hover" style="background-color: white; border-top: 5px solid #00AFDD;"> <thead> <tr> <th>First</th> <th>Last</th> <th>Email</th> <th></th> </tr> </thead> <tbody> {{#each studentList}} <tr> <td>{{first}}</td> <td>{{last}}</td> <td>{{email}}</td> <td><a class="deletestudent button1" style="font-size: 10px" href="#">BAN</a></td> </tr> {{/each}} </tbody> </table> </div> </div> <div class="col-md-2" style="background-color: rgba(250,250,250,0.7);"> <div class="bumper"> <div class="matchbox"> <h1 style="text-align: center; padding-bottom: 10px;">BANNED STUDENTS</h1> </div> <table class="table table-hover" style="background-color: white; border-top: 5px solid #00AFDD;"> <thead> <tr> <th>Email</th> <th></th> </tr> </thead> <tbody> {{#each banList}} <tr> <td>{{email}}</td> <td><a class="unban button1" style="font-size: 10px" href="#">UNBAN</a></td> </tr> {{/each}} </tbody> </table> </div> </div> </div> {{/IfLoggedIn}} </template>
textbookmania/SkyBlue
app/client/templates/pages/Student/ListStudent.html
HTML
apache-2.0
1,610
<?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Symfony\\Component\\Icu\\' => array($vendorDir . '/symfony/icu'), 'Symfony\\Bundle\\SwiftmailerBundle' => array($vendorDir . '/symfony/swiftmailer-bundle'), 'Symfony\\Bundle\\MonologBundle' => array($vendorDir . '/symfony/monolog-bundle'), 'Symfony\\Bundle\\AsseticBundle' => array($vendorDir . '/symfony/assetic-bundle'), 'Symfony\\' => array($vendorDir . '/symfony/symfony/src'), 'Sensio\\Bundle\\GeneratorBundle' => array($vendorDir . '/sensio/generator-bundle'), 'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir . '/sensio/framework-extra-bundle'), 'Sensio\\Bundle\\DistributionBundle' => array($vendorDir . '/sensio/distribution-bundle'), 'Psr\\Log\\' => array($vendorDir . '/psr/log'), 'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'), 'Gregwar\\CaptchaBundle' => array($vendorDir . '/gregwar/captcha-bundle'), 'Gregwar\\Captcha' => array($vendorDir . '/gregwar/captcha'), 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), 'Doctrine\\Bundle\\DoctrineBundle' => array($vendorDir . '/doctrine/doctrine-bundle'), 'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), array($baseDir . '/src') );
hlkzmy/evaluation-system
vendor/composer/autoload_namespaces.php
PHP
apache-2.0
1,967
/* * Copyright 2019 Stephane Nicolas * Copyright 2019 Daniel Molinero Reguera * * 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 toothpick.getInstance; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.sameInstance; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import toothpick.Scope; import toothpick.ScopeImpl; import toothpick.Toothpick; import toothpick.config.Module; import toothpick.configuration.Configuration; import toothpick.configuration.CyclicDependencyException; import toothpick.data.CyclicFoo; import toothpick.data.CyclicNamedFoo; import toothpick.data.IFoo; import toothpick.locators.NoFactoryFoundException; /* * Creates a instance in the simplest possible way * without any module. */ public class CycleCheckTest { @BeforeClass public static void setUp() { Toothpick.setConfiguration(Configuration.forDevelopment()); } @AfterClass public static void staticTearDown() { Toothpick.setConfiguration(Configuration.forProduction()); } @After public void tearDown() { Toothpick.reset(); } @Test(expected = CyclicDependencyException.class) public void testSimpleCycleDetection() { // GIVEN Scope scope = new ScopeImpl(""); // WHEN scope.getInstance(CyclicFoo.class); // THEN fail("Should throw an exception as a cycle is detected"); } @Test public void testCycleDetection_whenSameClass_and_differentName_shouldNotCrash() { // GIVEN final CyclicNamedFoo instance1 = new CyclicNamedFoo(); Scope scope = new ScopeImpl(""); scope.installModules( new Module() { { bind(CyclicNamedFoo.class).withName("foo").toInstance(instance1); } }); // WHEN CyclicNamedFoo instance2 = scope.getInstance(CyclicNamedFoo.class); // THEN // Should not crashed assertThat(instance2, notNullValue()); assertThat(instance2.cyclicFoo, sameInstance(instance1)); } @Test(expected = NoFactoryFoundException.class) public void testCycleDetection_whenGetInstanceFails_shouldCloseCycle() { // GIVEN Scope scope = new ScopeImpl(""); // WHEN try { scope.getInstance(IFoo.class); } catch (NoFactoryFoundException nfe) { nfe.printStackTrace(); } scope.getInstance(IFoo.class); // THEN fail( "Should throw NoFactoryFoundException as IFoo does not have any implementation bound." + "But It should not throw CyclicDependencyException as it was removed from the stack."); } }
stephanenicolas/toothpick
toothpick-runtime/src/test/java/toothpick/getInstance/CycleCheckTest.java
Java
apache-2.0
3,214
<?php function geoip($dbipcsv, $ip){ $csvData = file_get_contents("/lib/".$dbipcsv); $lines = explode(PHP_EOL, $csvData); $rangeArray = array(); foreach ($lines as $line) { $rangeArray[] = str_getcsv($line); } $input = $ip; $array_input = explode(".", $input); foreach($rangeArray as $current) { $array_start = explode(".", $current['0']); $array_stop = explode(".", $current['1']); if((int)$array_input[0] >= (int)$array_start[0]){ if((int)$array_input[0] <= (int)$array_stop[0]){ if((int)$array_input[1] >= (int)$array_start[1]){ if((int)$array_input[1] <= (int)$array_stop[1]){ if((int)$array_input[2] >= (int)$array_start[2]){ if((int)$array_input[2] <= (int)$array_stop[2]){ if((int)$array_input[3] >= (int)$array_start[3]){ if((int)$array_input[3] <= (int)$array_stop[3]){ $data = $current[2]; } } } } } } } } } return $data; } ?>
yeungalan/oauth_project
lib/dbip.php
PHP
apache-2.0
959
# Contributing to SlicerITKUltrasound Contributions are welcome and encouraged. To contribute, create a pull request on the [project's GitHub repository](https://github.com/KitwareMedical/SlicerITKUltrasound). Respectful and collaborative discourse is appreciated and expected. Please patiently address all automated builds and review comments. For more information how to use the Git version control system, see the excellent [ProGit book](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics). This repository uses common GitHub practices, sometimes referred to as the [GitHub flow](https://help.github.com/articles/github-flow/).
KitwareMedical/SlicerITKUltrasound
CONTRIBUTING.md
Markdown
apache-2.0
642
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>ttt</title> <link rel="stylesheet" href="style.css"> </head> <body> <div> <form method="post" action="/shop/register"> </form> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src="assets/js/jquery.jcarousellite.js"></script> <script type="text/javascript" src="assets/js/jquery.cookie.min.js"></script> <script type="text/javascript" src="assets/js/jquery.validate.js"></script> <script type="text/javascript" src="assets/js/jquery.form.js"></script> <script type="text/javascript" src="assets/js/script.js"></script> <script type="text/javascript" src="assets/js/reg.js"></script> </body> </html>
andreiHi/hincuA
internet_shop/src/test/java/ru/job4j/shop/test/test.html
HTML
apache-2.0
762
#!/usr/bin/env python """ This pretty much just tests creating a user, a universe, a planet, a building type name, a building type, and a building. """ import os import sys import sqlalchemy sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import legendary_waffle # Database setup db_engine = sqlalchemy.create_engine("sqlite://") legendary_waffle.models.MODELBASE.metadata.create_all(db_engine) legendary_waffle.models.MODELBASE.metadata.bind = db_engine db_session = sqlalchemy.orm.sessionmaker(bind=db_engine) db = db_session() # Create the user legendary_waffle.model_create(db, legendary_waffle.models.User, name='sk4ly') print "Users: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.User)) # Create the universe universe_config = { "name": 'poopiverse', "map_size": 1000, "max_planets": 1000, "max_players": 10 } legendary_waffle.model_create(db, legendary_waffle.models.Universe, **universe_config) print "Universe: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Universe)) # Create the planet planet_config = { "universe": 1, # The pkid of the universe 'poopiverse' "coordinate_x": 1, "coordinate_y": 1, "name": 'bloth', "habitable": True, "player_control": 1, # The pkid of user 'sk4ly' "default_condition": 1000, "default_resources": 1000, "current_condition": 1000, "current_resources": 1000 } legendary_waffle.model_create(db, legendary_waffle.models.Planet, **planet_config) print "Planet: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Planet)) # Create building type name legendary_waffle.model_create(db, legendary_waffle.models.BuildingTypeName, name="Control Center") print "Building Type Name: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.BuildingTypeName)) # Create building type building_type_config = { "typename": 1, # The pkid of the building type name 'Control Center' "description": "This is the control center", "default_condition": 100, "default_firepower": 0, "default_storage": 100, "rhr_passive": 0, "rhr_active": 0, "rhr_destructive": 0, "build_resource_reqs": 500, } legendary_waffle.model_create(db, legendary_waffle.models.BuildingType, **building_type_config) print "Building Type: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.BuildingType)) # Now create our new building building_config = { "building_type": 1, # The pkid of the building type with the name 'Control Center' "universe": 1, # The pkid of the universe 'poopiverse' "planet": 1, # The pkid of the planet 'bloth' "player_control": 1, # The pkid of the user 'sk4ly' } legendary_waffle.model_create(db, legendary_waffle.models.Building, **building_config) print "Building: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Building))
bplower/legendary-waffle-lib
test/test_universe_create.py
Python
apache-2.0
2,904
package io.taric.domains import concurrent.Future import io.taric.services.FlatFileRecord /** * File created: 2013-01-13 18:46 * * Copyright Solvies AB 2013 * For licensing information see LICENSE file */ object LocatingTaricFiles { private[this] def fNum( f: String ): Int = f.take( 4 ).toInt def latestFileVersion( fileNameList: List[String] ): Int = { def highestNum = ( i: Int, f: String ) ⇒ if ( i > fNum( f ) ) i else fNum( f ) fileNameList.foldLeft( 0 )( highestNum ) } def filterFileType( pattern: String, fileName: String ): Boolean = pattern.r.findFirstMatchIn( fileName ).isDefined def filesIncluding( ver: Int, fileNameList: List[String] ): List[String] = fileNameList.filter( fNum( _ ) == ver ) def filesLaterThan( ver: Int, fileNameList: List[String] ): List[String] = fileNameList.filter( fNum( _ ) > ver ) def encapsulateWithRecords( records: Stream[String] ): Stream[FlatFileRecord] = records.map( FlatFileRecord( _ ) ) } trait FetchRemoteResources { def fetchFileListing( url: String ): Future[List[String]] def fetchFilePlainTextLines( url: String, fileName: String ): Future[Stream[String]] }
magnusart/taric.io
taric-import/src/main/scala/io/taric/domains/LocatingTaricFiles.scala
Scala
apache-2.0
1,172
/* * 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.intel.ssg.dcst.panthera.parse.sql.transformer.fb; import java.util.ArrayList; import java.util.List; import org.antlr.runtime.tree.CommonTree; import com.intel.ssg.dcst.panthera.parse.sql.PantheraExpParser; import com.intel.ssg.dcst.panthera.parse.sql.SqlXlateException; import com.intel.ssg.dcst.panthera.parse.sql.SqlXlateUtil; import com.intel.ssg.dcst.panthera.parse.sql.TranslateContext; import br.com.porcelli.parser.plsql.PantheraParser_PLSQLParser; /** * transform AND to JOIN(by rebuilding left select).<br> * AndFilterBlock. * */ public class AndFilterBlock extends LogicFilterBlock { /** * this must have two children. * * @throws SqlXlateException */ @Override public void process(FilterBlockContext fbContext, TranslateContext context) throws SqlXlateException { FilterBlock leftFB = this.getChildren().get(0); leftFB.process(fbContext, context); fbContext.getQueryStack().peek().setQueryForTransfer(leftFB.getTransformedNode()); fbContext.getQueryStack().peek().setRebuildQueryForTransfer(); FilterBlock rightFB = this.getChildren().get(1); CommonTree condition = rightFB.getASTNode(); TypeFilterBlock type = fbContext.getTypeStack().peek(); if (rightFB instanceof UnCorrelatedFilterBlock) { // simple condition if (type instanceof WhereFilterBlock) { rebuildWhereCondition(leftFB, condition); } if (type instanceof HavingFilterBlock) { rebuildHavingCondition(leftFB, condition); } this.setTransformedNode(leftFB.getTransformedNode()); } else { rightFB.process(fbContext, context); this.setTransformedNode(rightFB.getTransformedNode()); } } private void rebuildWhereCondition(FilterBlock leftFB, CommonTree condition) { CommonTree transformedSelect = leftFB.getTransformedNode(); rebuildWhereCond(transformedSelect, condition); } private void rebuildWhereCond(CommonTree transformedSelect, CommonTree condition) { if (transformedSelect.getType() == PantheraParser_PLSQLParser.SUBQUERY) { for (int i = 0; i < transformedSelect.getChildCount(); i++) { rebuildWhereCond((CommonTree) transformedSelect.getChild(i), condition); } } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT) { rebuildWhereCondition(transformedSelect, condition); } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_UNION) { // UNION node rebuildWhereCond((CommonTree) transformedSelect.getChild(0), condition); } } private void rebuildWhereCondition(CommonTree transformedSelect, CommonTree condition) { CommonTree tableRefElement = (CommonTree) transformedSelect.getChild(0).getChild(0).getChild(0); CommonTree subQuery = (CommonTree) tableRefElement.getChild(tableRefElement.getChildCount() - 1).getChild(0) .getChild(0).getChild(0); List<List<CommonTree>> selects = new ArrayList<List<CommonTree>>(); for (int i = 0; i < subQuery.getChildCount(); i++) { List<CommonTree> selectLists = new ArrayList<CommonTree>(); FilterBlockUtil.findNode((CommonTree) subQuery.getChild(i), PantheraExpParser.SELECT_LIST, selectLists); assert(selectLists != null); List<CommonTree> oneSelects = new ArrayList<CommonTree>(); for (CommonTree sl:selectLists) { oneSelects.add((CommonTree) sl.getParent()); } selects.add(oneSelects); } for (List<CommonTree> sels:selects) { CommonTree sel = sels.get(0); for (int j = 0; j < sels.size(); j++) { sel = sels.get(j); if(sel.getCharPositionInLine() == condition.getAncestor(PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT).getCharPositionInLine()) { break; } } CommonTree where = (CommonTree) sel .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_WHERE); if (where == null) { where = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.SQL92_RESERVED_WHERE, "where"); CommonTree group = (CommonTree) sel .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_GROUP); if (group != null) { int groupIndex = group.getChildIndex(); SqlXlateUtil.addCommonTreeChild(sel, groupIndex, where); } else { sel.addChild(where); } CommonTree logicExpr = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.LOGIC_EXPR, "LOGIC_EXPR"); where.addChild(logicExpr); logicExpr.addChild(condition); } else { CommonTree logicExpr = (CommonTree) where.getChild(0); FilterBlockUtil.addConditionToLogicExpr(logicExpr, condition); } } } private void rebuildHavingCondition(FilterBlock leftFB, CommonTree condition) { CommonTree transformedSelect = leftFB.getTransformedNode(); rebuildHavingCond(transformedSelect, condition); } private void rebuildHavingCond(CommonTree transformedSelect, CommonTree condition) { if (transformedSelect.getType() == PantheraParser_PLSQLParser.SUBQUERY) { for (int i = 0; i < transformedSelect.getChildCount(); i++) { rebuildHavingCond((CommonTree) transformedSelect.getChild(i), condition); } } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT) { rebuildHavingCondition(transformedSelect, condition); } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_UNION) { // UNION node rebuildHavingCond((CommonTree) transformedSelect.getChild(0), condition); } } private void rebuildHavingCondition(CommonTree transformedSelect, CommonTree condition) { CommonTree tableRefElement = (CommonTree) transformedSelect.getChild(0).getChild(0).getChild(0); CommonTree subQuery = (CommonTree) tableRefElement.getChild(tableRefElement.getChildCount() - 1).getChild(0) .getChild(0).getChild(0); List<List<CommonTree>> groups = new ArrayList<List<CommonTree>>(); for(int i = 0; i < subQuery.getChildCount(); i++){ List<CommonTree> oneGroups = new ArrayList<CommonTree>(); FilterBlockUtil.findNode((CommonTree) subQuery.getChild(i), PantheraExpParser.SQL92_RESERVED_GROUP, oneGroups); assert(oneGroups != null); groups.add(oneGroups); } for(List<CommonTree> grps:groups) { CommonTree group = grps.get(0); for (int j = 0; j < grps.size(); j++) { group = grps.get(j); if(group.getCharPositionInLine() == condition.getAncestor(PantheraParser_PLSQLParser.SQL92_RESERVED_GROUP).getCharPositionInLine()) { break; } } CommonTree having = (CommonTree) group .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_HAVING); if (having == null) { having = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.SQL92_RESERVED_HAVING, "having"); group.addChild(having); CommonTree logicExpr = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.LOGIC_EXPR, "LOGIC_EXPR"); having.addChild(logicExpr); logicExpr.addChild(condition); } else { CommonTree logicExpr = (CommonTree) having.getChild(0); FilterBlockUtil.addConditionToLogicExpr(logicExpr, condition); } } } }
adrian-wang/project-panthera-skin
src/main/java/com/intel/ssg/dcst/panthera/parse/sql/transformer/fb/AndFilterBlock.java
Java
apache-2.0
8,205
<pr-stack-widget options="widget.options" params="widget.params" filters="filters"></pr-stack-widget>
pulsarIO/pulsar-reporting-ui
app/src/prReporting/prDashboardWidgets/stack/view.html
HTML
apache-2.0
101
body { font-size: 1rem; font-weight: 300; background-color: #292B36; color: #d0d0d0; font-family: "Roboto", "sans-serif"; width: 100%; } header, main, footer { margin: 3rem; } pre { margin-top: 1.75rem; } pre, code { font-family: "Hack", "monospace"; font-size: .75rem; } a { color: #00aba5; text-decoration: none; } a:hover, a:active { color: #8485CE; } p { margin: 1rem 0; } h3 { font-weight: 300; }
padurean/elm-a-book
src/css/css.css
CSS
apache-2.0
462
package io.swagger.client.api; import com.sun.jersey.api.client.GenericType; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.model.CodeSnippet; import io.swagger.client.model.CodeSnippetList; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-11T02:09:38.462Z") public class DefaultApi { private ApiClient apiClient; public DefaultApi() { this(Configuration.getDefaultApiClient()); } public DefaultApi(ApiClient apiClient) { this.apiClient = apiClient; } public ApiClient getApiClient() { return apiClient; } public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** * Creates a code snippet. * Creates a code snippet in the specified language. * @param codeSnippetBody Code snippet object. * @throws ApiException if fails to make API call */ public void snipPost(CodeSnippet codeSnippetBody) throws ApiException { Object localVarPostBody = codeSnippetBody; // create path and map variables String localVarPath = "/snip".replaceAll("\\{format\\}","json"); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Retrieves the specified code snippet. * Retrieves the specified code snippet. * @param codeSnippetUuid Code snippet unique identifier. * @return CodeSnippet * @throws ApiException if fails to make API call */ public CodeSnippet snipCodeSnippetUuidGet(String codeSnippetUuid) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidGet"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType<CodeSnippet> localVarReturnType = new GenericType<CodeSnippet>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Updates a code snippet. * Updates a code snippet changes. * @param codeSnippetUuid Code snippet unique identifier. * @param codeSnippetBody Code snippet object. * @throws ApiException if fails to make API call */ public void snipCodeSnippetUuidPut(String codeSnippetUuid, CodeSnippet codeSnippetBody) throws ApiException { Object localVarPostBody = codeSnippetBody; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidPut"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes the specified code snippet. * Deletes the specified code snippet. * @param codeSnippetUuid Code snippet unique identifier. * @throws ApiException if fails to make API call */ public void snipCodeSnippetUuidDelete(String codeSnippetUuid) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidDelete"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Retrieves all code snippets. * * @return CodeSnippetList * @throws ApiException if fails to make API call */ public CodeSnippetList snipsGet() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/snips".replaceAll("\\{format\\}","json"); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType<CodeSnippetList> localVarReturnType = new GenericType<CodeSnippetList>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }
jsodini/CodeSnip
sdk/java/src/main/java/io/swagger/client/api/DefaultApi.java
Java
apache-2.0
8,599
# Epipactis leptochila subsp. naousaensis SUBSPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name Epipactis naousaensis Robatsch ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Epipactis/Epipactis leptochila/Epipactis leptochila naousaensis/README.md
Markdown
apache-2.0
226
# Hartighsea alliaria Arn. ex Wight & Arn. SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Sapindales/Meliaceae/Hartighsea/Hartighsea alliaria/README.md
Markdown
apache-2.0
190
// Copyright 2016-2022 The Libsacloud Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package icon import ( "github.com/sacloud/libsacloud/v2/helper/service" "github.com/sacloud/libsacloud/v2/helper/validate" "github.com/sacloud/libsacloud/v2/sacloud" "github.com/sacloud/libsacloud/v2/sacloud/types" ) type UpdateRequest struct { ID types.ID `request:"-" validate:"required"` Name *string `request:",omitempty" validate:"omitempty,min=1"` Tags *types.Tags `request:",omitempty"` } func (req *UpdateRequest) Validate() error { return validate.Struct(req) } func (req *UpdateRequest) ToRequestParameter(current *sacloud.Icon) (*sacloud.IconUpdateRequest, error) { r := &sacloud.IconUpdateRequest{} if err := service.RequestConvertTo(current, r); err != nil { return nil, err } if err := service.RequestConvertTo(req, r); err != nil { return nil, err } return r, nil }
sacloud/libsacloud
v2/helper/service/icon/update_request.go
GO
apache-2.0
1,414
/** * CommonFramework * * Copyright (C) 2017 Black Duck Software, Inc. * http://www.blackducksoftware.com/ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.blackducksoftware.tools.commonframework.standard.protex.report.template; // TODO: Auto-generated Javadoc /** * Pojo representing the second sheet of our test template . * * @author akamen */ public class TestPojoPageTwo extends TestPojo { /** The value1page2. */ public String value1page2; /** The value2page2. */ public String value2page2; /** * Gets the value2 page2. * * @return the value2 page2 */ public String getValue2Page2() { return value2page2; } /** * Sets the value2page2. * * @param value2page2 * the new value2page2 */ public void setValue2page2(String value2page2) { this.value2page2 = value2page2; } /** * Gets the value1 page2. * * @return the value1 page2 */ public String getValue1Page2() { return value1page2; } /** * Sets the value1page2. * * @param value1page2 * the new value1page2 */ public void setValue1page2(String value1page2) { this.value1page2 = value1page2; } }
blackducksoftware/common-framework
src/test/java/com/blackducksoftware/tools/commonframework/standard/protex/report/template/TestPojoPageTwo.java
Java
apache-2.0
2,010
package org.test; import org.test.act.MainGame; import loon.LSetting; import loon.LSystem; import loon.LazyLoading; import loon.Screen; import loon.javase.Loon; public class JavaSEMain { public static void main(String[]args){ LSetting setting = new LSetting(); setting.isFPS = true; setting.isLogo = false; setting.logoPath = "loon_logo.png"; // 原始大小 setting.width = 800; setting.height = 480; setting.fps = 60; setting.fontName = "黑体"; setting.appName = "动作游戏"; LSystem.NOT_MOVE = true; Loon.register(setting, new LazyLoading.Data() { @Override public Screen onScreen() { //此Screen位于sample文件夹下,引入资源即可加载 return new MainGame(); } }); } }
cping/LGame
Java/Examples/cannonblast(0.5)/src/org/test/JavaSEMain.java
Java
apache-2.0
744
// Diamond-in-the-Rough // Code Wars program written in JavaScript for the RingoJS environment // // The MIT License (MIT) // // Copyright (c) 2015 Lee Jenkins // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. var stdin = require("system").stdin; var stdout = require("system").stdout; "use strict"; (function SpiralTriangles() { function run() { var inputData = readDiamondInfo(); while( inputData.size > 0 ) { printDiamonds( inputData ); inputData = readDiamondInfo(); } }; function printDiamonds( inputData ) { var midSize = inputData.size / 2; for( var gridRow=0; gridRow<inputData.rows; ++gridRow ) { for( var diamondRow=0; diamondRow<inputData.size; ++diamondRow ) { var line = ""; for( var gridCol=0; gridCol<inputData.cols; ++gridCol ) { for( var diamondCol=0; diamondCol<inputData.size; ++diamondCol ) { var c = "#"; if( diamondRow < midSize ) { // top half if( diamondCol >= (midSize-(diamondRow+1)) && diamondCol < midSize ) { c = "/"; } else if( diamondCol >= midSize && diamondCol <= (midSize+diamondRow) ) { c = "\\"; } } else { // bottom half if( diamondCol >= (diamondRow-midSize) && diamondCol < midSize ) { c = "\\"; } else if( diamondCol >= midSize && diamondCol < (inputData.size+midSize-diamondRow) ) { c = "/"; } } line += c; } } print( line ); } } }; function readDiamondInfo() { var tokens = stdin.readLine().split(/\s+/); return { size: parseInt( tokens[0] ), rows: parseInt( tokens[1] ), cols: parseInt( tokens[2] ) }; }; run(); }) ();
p473lr/i-urge-mafia-gear
HP Code Wars Documents/2015/Solutions/prob11_DiamondInTheRough-lee.js
JavaScript
apache-2.0
3,164
package apple.uikit; import java.io.*; import java.nio.*; import java.util.*; import com.google.j2objc.annotations.*; import com.google.j2objc.runtime.*; import com.google.j2objc.runtime.block.*; import apple.audiotoolbox.*; import apple.corefoundation.*; import apple.coregraphics.*; import apple.coreservices.*; import apple.foundation.*; import apple.coreanimation.*; import apple.coredata.*; import apple.coreimage.*; import apple.coretext.*; import apple.corelocation.*; @Library("UIKit/UIKit.h") @Mapping("UIMenuControllerArrowDirection") public final class UIMenuControllerArrowDirection extends ObjCEnum { @GlobalConstant("UIMenuControllerArrowDefault") public static final long Default = 0L; @GlobalConstant("UIMenuControllerArrowUp") public static final long Up = 1L; @GlobalConstant("UIMenuControllerArrowDown") public static final long Down = 2L; @GlobalConstant("UIMenuControllerArrowLeft") public static final long Left = 3L; @GlobalConstant("UIMenuControllerArrowRight") public static final long Right = 4L; }
Sellegit/j2objc
runtime/src/main/java/apple/uikit/UIMenuControllerArrowDirection.java
Java
apache-2.0
1,076
/** * @private * @providesModule CustomTabsAndroid * @flow */ 'use strict'; import { NativeModules } from 'react-native'; import type { TabOption } from './TabOption'; const CustomTabsManager = NativeModules.CustomTabsManager; /** * To open the URL of the http or https in Chrome Custom Tabs. * If Chrome is not installed, opens the URL in other browser. */ export default class CustomTabsAndroid { /** * Opens the URL on a Custom Tab. * * @param url the Uri to be opened. * @param option the Option to customize Custom Tabs of look & feel. */ static openURL(url: string, option: TabOption = {}): Promise<boolean> { return CustomTabsManager.openURL(url, option) } }
droibit/react-native-custom-tabs
src/CustomTabsAndroid.js
JavaScript
apache-2.0
701
package com.swifts.frame.modules.wx.fastweixin.company.message.req; /** * 微信企业号异步任务类型 * ==================================================================== * * -------------------------------------------------------------------- * @author Nottyjay * @version 1.0.beta * @since 1.3.6 * ==================================================================== */ public final class QYBatchJobType { private String SYNCUSER = "sync_user";// 增量更新成员 private String REPLACEUSER = "replace_user";// 全量覆盖成员 private String INVITEUSER = "invite_user";// 邀请成员关注 private String REPLACEPARTY = "replace_party";// 全量覆盖部门 private QYBatchJobType() { } }
hanyahui88/swifts
src/main/java/com/swifts/frame/modules/wx/fastweixin/company/message/req/QYBatchJobType.java
Java
apache-2.0
754
/** * 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.hadoop.io.erasurecode.coder; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; import org.apache.hadoop.io.erasurecode.ECChunk; import org.apache.hadoop.io.erasurecode.TestCoderBase; import java.lang.reflect.Constructor; /** * Erasure coder test base with utilities. */ public abstract class TestErasureCoderBase extends TestCoderBase { protected Class<? extends ErasureCoder> encoderClass; protected Class<? extends ErasureCoder> decoderClass; private ErasureCoder encoder; private ErasureCoder decoder; protected int numChunksInBlock = 16; /** * It's just a block for this test purpose. We don't use HDFS block here * at all for simple. */ protected static class TestBlock extends ECBlock { private ECChunk[] chunks; // For simple, just assume the block have the chunks already ready. // In practice we need to read/write chunks from/to the block via file IO. public TestBlock(ECChunk[] chunks) { this.chunks = chunks; } } /** * Generating source data, encoding, recovering and then verifying. * RawErasureCoder mainly uses ECChunk to pass input and output data buffers, * it supports two kinds of ByteBuffers, one is array backed, the other is * direct ByteBuffer. Have usingDirectBuffer to indicate which case to test. * @param usingDirectBuffer */ protected void testCoding(boolean usingDirectBuffer) { this.usingDirectBuffer = usingDirectBuffer; prepareCoders(); /** * The following runs will use 3 different chunkSize for inputs and outputs, * to verify the same encoder/decoder can process variable width of data. */ performTestCoding(baseChunkSize, true); performTestCoding(baseChunkSize - 17, false); performTestCoding(baseChunkSize + 16, true); } private void performTestCoding(int chunkSize, boolean usingSlicedBuffer) { setChunkSize(chunkSize); prepareBufferAllocator(usingSlicedBuffer); // Generate data and encode ECBlockGroup blockGroup = prepareBlockGroupForEncoding(); // Backup all the source chunks for later recovering because some coders // may affect the source data. TestBlock[] clonedDataBlocks = cloneBlocksWithData((TestBlock[]) blockGroup.getDataBlocks()); TestBlock[] parityBlocks = (TestBlock[]) blockGroup.getParityBlocks(); ErasureCodingStep codingStep; codingStep = encoder.calculateCoding(blockGroup); performCodingStep(codingStep); // Erase specified sources but return copies of them for later comparing TestBlock[] backupBlocks = backupAndEraseBlocks(clonedDataBlocks, parityBlocks); // Decode blockGroup = new ECBlockGroup(clonedDataBlocks, blockGroup.getParityBlocks()); codingStep = decoder.calculateCoding(blockGroup); performCodingStep(codingStep); // Compare compareAndVerify(backupBlocks, codingStep.getOutputBlocks()); } /** * This is typically how a coding step should be performed. * @param codingStep */ private void performCodingStep(ErasureCodingStep codingStep) { // Pretend that we're opening these input blocks and output blocks. ECBlock[] inputBlocks = codingStep.getInputBlocks(); ECBlock[] outputBlocks = codingStep.getOutputBlocks(); // We allocate input and output chunks accordingly. ECChunk[] inputChunks = new ECChunk[inputBlocks.length]; ECChunk[] outputChunks = new ECChunk[outputBlocks.length]; for (int i = 0; i < numChunksInBlock; ++i) { // Pretend that we're reading input chunks from input blocks. for (int j = 0; j < inputBlocks.length; ++j) { inputChunks[j] = ((TestBlock) inputBlocks[j]).chunks[i]; } // Pretend that we allocate and will write output results to the blocks. for (int j = 0; j < outputBlocks.length; ++j) { outputChunks[j] = allocateOutputChunk(); ((TestBlock) outputBlocks[j]).chunks[i] = outputChunks[j]; } // Given the input chunks and output chunk buffers, just call it ! codingStep.performCoding(inputChunks, outputChunks); } codingStep.finish(); } /** * Compare and verify if recovered blocks data are the same with the erased * blocks data. * @param erasedBlocks * @param recoveredBlocks */ protected void compareAndVerify(ECBlock[] erasedBlocks, ECBlock[] recoveredBlocks) { for (int i = 0; i < erasedBlocks.length; ++i) { compareAndVerify(((TestBlock) erasedBlocks[i]).chunks, ((TestBlock) recoveredBlocks[i]).chunks); } } private void prepareCoders() { if (encoder == null) { encoder = createEncoder(); } if (decoder == null) { decoder = createDecoder(); } } /** * Create the raw erasure encoder to test * @return */ protected ErasureCoder createEncoder() { ErasureCoder encoder; try { Constructor<? extends ErasureCoder> constructor = (Constructor<? extends ErasureCoder>) encoderClass.getConstructor(int.class, int.class); encoder = constructor.newInstance(numDataUnits, numParityUnits); } catch (Exception e) { throw new RuntimeException("Failed to create encoder", e); } encoder.setConf(getConf()); return encoder; } /** * create the raw erasure decoder to test * @return */ protected ErasureCoder createDecoder() { ErasureCoder decoder; try { Constructor<? extends ErasureCoder> constructor = (Constructor<? extends ErasureCoder>) decoderClass.getConstructor(int.class, int.class); decoder = constructor.newInstance(numDataUnits, numParityUnits); } catch (Exception e) { throw new RuntimeException("Failed to create decoder", e); } decoder.setConf(getConf()); return decoder; } /** * Prepare a block group for encoding. * @return */ protected ECBlockGroup prepareBlockGroupForEncoding() { ECBlock[] dataBlocks = new TestBlock[numDataUnits]; ECBlock[] parityBlocks = new TestBlock[numParityUnits]; for (int i = 0; i < numDataUnits; i++) { dataBlocks[i] = generateDataBlock(); } for (int i = 0; i < numParityUnits; i++) { parityBlocks[i] = allocateOutputBlock(); } return new ECBlockGroup(dataBlocks, parityBlocks); } /** * Generate random data and return a data block. * @return */ protected ECBlock generateDataBlock() { ECChunk[] chunks = new ECChunk[numChunksInBlock]; for (int i = 0; i < numChunksInBlock; ++i) { chunks[i] = generateDataChunk(); } return new TestBlock(chunks); } /** * Erase blocks to test the recovering of them. Before erasure clone them * first so could return themselves. * @param dataBlocks * @return clone of erased dataBlocks */ protected TestBlock[] backupAndEraseBlocks(TestBlock[] dataBlocks, TestBlock[] parityBlocks) { TestBlock[] toEraseBlocks = new TestBlock[erasedDataIndexes.length + erasedParityIndexes.length]; int idx = 0; TestBlock block; for (int i = 0; i < erasedParityIndexes.length; i++) { block = parityBlocks[erasedParityIndexes[i]]; toEraseBlocks[idx ++] = cloneBlockWithData(block); eraseDataFromBlock(block); } for (int i = 0; i < erasedDataIndexes.length; i++) { block = dataBlocks[erasedDataIndexes[i]]; toEraseBlocks[idx ++] = cloneBlockWithData(block); eraseDataFromBlock(block); } return toEraseBlocks; } /** * Allocate an output block. Note the chunk buffer will be allocated by the * up caller when performing the coding step. * @return */ protected TestBlock allocateOutputBlock() { ECChunk[] chunks = new ECChunk[numChunksInBlock]; return new TestBlock(chunks); } /** * Clone blocks with data copied along with, avoiding affecting the original * blocks. * @param blocks * @return */ protected TestBlock[] cloneBlocksWithData(TestBlock[] blocks) { TestBlock[] results = new TestBlock[blocks.length]; for (int i = 0; i < blocks.length; ++i) { results[i] = cloneBlockWithData(blocks[i]); } return results; } /** * Clone exactly a block, avoiding affecting the original block. * @param block * @return a new block */ protected TestBlock cloneBlockWithData(TestBlock block) { ECChunk[] newChunks = cloneChunksWithData(block.chunks); return new TestBlock(newChunks); } /** * Erase data from a block. */ protected void eraseDataFromBlock(TestBlock theBlock) { eraseDataFromChunks(theBlock.chunks); theBlock.setErased(true); } }
anjuncc/hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/coder/TestErasureCoderBase.java
Java
apache-2.0
9,576
/* * Copyright (c) 2010-2017 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.evolveum.midpoint.model.intest.rbac; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.ContextConfiguration; import java.io.File; /** * @author semancik * */ @ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"}) @DirtiesContext(classMode = ClassMode.AFTER_CLASS) public class TestRbacDeprecated extends TestRbac { protected static final File ROLE_GOVERNOR_DEPRECATED_FILE = new File(TEST_DIR, "role-governor-deprecated.xml"); protected static final File ROLE_CANNIBAL_DEPRECATED_FILE = new File(TEST_DIR, "role-cannibal-deprecated.xml"); @Override protected File getRoleGovernorFile() { return ROLE_GOVERNOR_DEPRECATED_FILE; } @Override protected File getRoleCannibalFile() { return ROLE_CANNIBAL_DEPRECATED_FILE; } @Override protected boolean testMultiplicityConstraintsForNonDefaultRelations() { return false; } }
Pardus-Engerek/engerek
model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/rbac/TestRbacDeprecated.java
Java
apache-2.0
1,603
package com.koch.ambeth.util; import org.junit.Assert; import org.junit.Test; import com.koch.ambeth.ioc.util.ImmutableTypeSet; public class ImmutableTypeSetTest { public interface MyType { // intended blank } public class MyClass implements MyType { // intended blank } @Test public void test() { ImmutableTypeSet immutableTypeSet = new ImmutableTypeSet(); Assert.assertFalse(immutableTypeSet.isImmutableType(MyClass.class)); immutableTypeSet.registerImmutableType(MyType.class); Assert.assertTrue(immutableTypeSet.isImmutableType(MyType.class)); Assert.assertTrue(immutableTypeSet.isImmutableType(MyClass.class)); } }
Dennis-Koch/ambeth
jambeth/jambeth-ioc-test/src/test/java/com/koch/ambeth/util/ImmutableTypeSetTest.java
Java
apache-2.0
677
/* * Copyright 2010-2020 Alfresco Software, 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. */ package org.activiti.bpmn.model; public class EventGateway extends Gateway { public EventGateway clone() { EventGateway clone = new EventGateway(); clone.setValues(this); return clone; } public void setValues(EventGateway otherElement) { super.setValues(otherElement); } }
Activiti/Activiti
activiti-core/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/EventGateway.java
Java
apache-2.0
912
// Originally submitted to OSEHRA 2/21/2017 by DSS, Inc. // Authored by DSS, Inc. 2014-2017 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VA.Gov.Artemis.Vista.Broker { internal enum RpcMessageStatus { Uknown, Ready, Error } }
VHAINNOVATIONS/Maternity-Tracker
Dashboard/va.gov.artemis.vista/Broker/RpcMessageStatus.cs
C#
apache-2.0
316
/* * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.skylark.io.impl; import com.facebook.buck.skylark.io.Globber; import com.facebook.buck.util.MoreCollectors; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.UnixGlob; import java.io.IOException; import java.util.Collection; import java.util.Set; /** * A simple implementation of globbing functionality that allows resolving file paths based on * include patterns (file patterns that should be returned) minus exclude patterns (file patterns * that should be excluded from the resulting set). * * <p>Since this is a simple implementation it does not support caching and other smarts. */ public class SimpleGlobber implements Globber { /** Path used as a root when resolving patterns. */ private final Path basePath; private SimpleGlobber(Path basePath) { this.basePath = basePath; } /** * @param include File patterns that should be included in the resulting set. * @param exclude File patterns that should be excluded from the resulting set. * @param excludeDirectories Whether directories should be excluded from the resulting set. * @return The set of paths resolved using include patterns minus paths excluded by exclude * patterns. */ @Override public Set<String> run( Collection<String> include, Collection<String> exclude, Boolean excludeDirectories) throws IOException { ImmutableSet<String> includePaths = resolvePathsMatchingGlobPatterns(include, basePath, excludeDirectories); ImmutableSet<String> excludePaths = resolvePathsMatchingGlobPatterns(exclude, basePath, excludeDirectories); return Sets.difference(includePaths, excludePaths); } /** * Resolves provided list of glob patterns into a set of paths. * * @param patterns The glob patterns to resolve. * @param basePath The base path used when resolving glob patterns. * @param excludeDirectories Flag indicating whether directories should be excluded from result. * @return The set of paths corresponding to requested patterns. */ private static ImmutableSet<String> resolvePathsMatchingGlobPatterns( Collection<String> patterns, Path basePath, Boolean excludeDirectories) throws IOException { UnixGlob.Builder includeGlobBuilder = UnixGlob.forPath(basePath).addPatterns(patterns); if (excludeDirectories != null) { includeGlobBuilder.setExcludeDirectories(excludeDirectories); } return includeGlobBuilder .glob() .stream() .map(includePath -> includePath.relativeTo(basePath).getPathString()) .collect(MoreCollectors.toImmutableSet()); } /** * Factory method for creating {@link SimpleGlobber} instances. * * @param basePath The base path relative to which paths matching glob patterns will be resolved. */ public static Globber create(Path basePath) { return new SimpleGlobber(basePath); } }
shybovycha/buck
src/com/facebook/buck/skylark/io/impl/SimpleGlobber.java
Java
apache-2.0
3,622
package android_testsuite; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android_testsuite.mytest.application_search.AppSearchActivity; import android_testsuite.mytest.application_search.UidActivity; import android_testsuite.mytest.camera.CameraActivity; import android_testsuite.mytest.camera.CameraIntentTestActivity; import android_testsuite.mytest.custom_loading.CustomLoadingActivity; import android_testsuite.mytest.media.MediaPlayerTestActivity; import android_testsuite.mytest.network_test.HttpActivity; import android_testsuite.mytest.network_test.SocketActivity; import android_testsuite.mytest.rsa.RsaActivity; import android_testsuite.mytest.seekbar.SeekBarActivity; /** * @author Ren Hui * @since 1.0.1.058 */ public class GuideActivity extends Activity { private Button mBtSelHttp; private Button mBtSelSocket; private Button mBtSearchApp; private Button mBtRSa; private Button mBtUid; private Button mBtMedia; private Button mCameraBt; private Button mCustomLoadingBt; private Button mCameraNewBtn; private Button mSeekBarBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_guide); this.mBtSelHttp = (Button) findViewById(R.id.bt_selHttp); mBtSelHttp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, HttpActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtSelSocket = (Button) findViewById(R.id.bt_selSocket); mBtSelSocket.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, SocketActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtSearchApp = (Button) findViewById(R.id.bt_searchApp); mBtSearchApp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, AppSearchActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtRSa = (Button) findViewById(R.id.RSA); mBtRSa.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, RsaActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtUid = (Button) findViewById(R.id.uid); mBtUid.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, UidActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtMedia = (Button) findViewById(R.id.media); mBtMedia.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, MediaPlayerTestActivity.class); GuideActivity.this.startActivity(intent); } }); this.mCameraBt = (Button) findViewById(R.id.camera_intent); mCameraBt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, CameraIntentTestActivity.class); GuideActivity.this.startActivity(intent); } }); this.mCustomLoadingBt = (Button) findViewById(R.id.custom_loading); mCustomLoadingBt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, CustomLoadingActivity.class)); } }); mCameraNewBtn = (Button) findViewById(R.id.camera); mCameraNewBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, CameraActivity.class)); } }); mSeekBarBtn = (Button) findViewById(R.id.seek_bar); mSeekBarBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, SeekBarActivity.class)); } }); } }
renhui/android_career
business/android_testsuite/android_testsuite/android_testsuite/src/main/java/android_testsuite/GuideActivity.java
Java
apache-2.0
5,130
using System; using Microsoft.SPOT; namespace WeatherStation.WebServer { /// <summary> /// Base class for HTTP object (request/response) /// </summary> public class HttpBase { #region Constants ... // const string separator protected const char CR = '\r'; protected const char LF = '\n'; // request line separator protected const char REQUEST_LINE_SEPARATOR = ' '; // starting of query string protected const char QUERY_STRING_SEPARATOR = '?'; // query string parameters separator protected const char QUERY_STRING_PARAMS_SEPARATOR = '&'; // query string value separator protected const char QUERY_STRING_VALUE_SEPARATOR = '='; // header-value separator protected const char HEADER_VALUE_SEPARATOR = ':'; // form parameters separator protected const char FORM_PARAMS_SEPARATOR = '&'; // form value separator protected const char FORM_VALUE_SEPARATOR = '='; #endregion #region Properties ... /// <summary> /// Headers of the HTTP request/response /// </summary> public NameValueCollection Headers { get; protected set; } /// <summary> /// Body of HTTP request/response /// </summary> public string Body { get; set; } #endregion /// <summary> /// Constructor /// </summary> public HttpBase() { this.Headers = new NameValueCollection(); } } }
ppatierno/mfweatherstation
WeatherStation/WebServer/HttpBase.cs
C#
apache-2.0
1,574
// 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.cloudstack.api.command.user.loadbalancer; import javax.inject.Inject; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SslCertResponse; import org.apache.cloudstack.context.CallContext; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import org.apache.cloudstack.network.tls.CertService; @APICommand(name = "uploadSslCert", description = "Upload a certificate to CloudStack", responseObject = SslCertResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UploadSslCertCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(UploadSslCertCmd.class.getName()); private static final String s_name = "uploadsslcertresponse"; @Inject CertService _certService; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.CERTIFICATE, type = CommandType.STRING, required = true, description = "SSL certificate", length = 16384) private String cert; @Parameter(name = ApiConstants.PRIVATE_KEY, type = CommandType.STRING, required = true, description = "Private key", length = 16384) private String key; @Parameter(name = ApiConstants.CERTIFICATE_CHAIN, type = CommandType.STRING, description = "Certificate chain of trust", length = 2097152) private String chain; @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "Password for the private key") private String password; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that will own the SSL certificate") private String accountName; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the SSL certificate") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning the SSL certificate") private Long domainId; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// public String getCert() { return cert; } public String getKey() { return key; } public String getChain() { return chain; } public String getPassword() { return password; } public String getAccountName() { return accountName; } public Long getDomainId() { return domainId; } public Long getProjectId() { return projectId; } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { SslCertResponse response = _certService.uploadSslCert(this); setResponseObject(response); response.setResponseName(getCommandName()); } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } @Override public String getCommandName() { return s_name; } @Override public long getEntityOwnerId() { return CallContext.current().getCallingAccount().getId(); } }
jcshen007/cloudstack
api/src/org/apache/cloudstack/api/command/user/loadbalancer/UploadSslCertCmd.java
Java
apache-2.0
5,159
package info.cyanac.plugin.bukkit; import java.util.ArrayList; import java.util.List; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; public class CyanACTabCompleter implements TabCompleter { @Override public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { if(command.getName().equalsIgnoreCase("cyanac")){ List<String> tabCompletionList = new ArrayList(); tabCompletionList.add("help"); tabCompletionList.add("resync"); tabCompletionList.add("license"); return tabCompletionList; } return null; } }
Moritz30-Projects/CyanAC-Plugin
src/info/cyanac/plugin/bukkit/CyanACTabCompleter.java
Java
apache-2.0
675
<?php /** * This file is part of the SevenShores/NetSuite library * AND originally from the NetSuite PHP Toolkit. * * New content: * @package ryanwinchester/netsuite-php * @copyright Copyright (c) Ryan Winchester * @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 * @link https://github.com/ryanwinchester/netsuite-php * * Original content: * @copyright Copyright (c) NetSuite Inc. * @license https://raw.githubusercontent.com/ryanwinchester/netsuite-php/master/original/NetSuite%20Application%20Developer%20License%20Agreement.txt * @link http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml * * generated: 2020-04-10 09:56:55 PM UTC */ namespace NetSuite\Classes; class FolderFolderType { static $paramtypesmap = array( ); const _appPackages = "_appPackages"; const _attachmentsReceived = "_attachmentsReceived"; const _attachmentsSent = "_attachmentsSent"; const _certificates = "_certificates"; const _documentsAndFiles = "_documentsAndFiles"; const _emailTemplates = "_emailTemplates"; const _faxTemplates = "_faxTemplates"; const _images = "_images"; const _letterTemplates = "_letterTemplates"; const _mailMerge = "_mailMerge"; const _marketingTemplates = "_marketingTemplates"; const _pdfTemplates = "_pdfTemplates"; const _suitebundles = "_suitebundles"; const _suitecommerceAdvancedSiteTemplates = "_suitecommerceAdvancedSiteTemplates"; const _suitescripts = "_suitescripts"; const _templates = "_templates"; const _webSiteHostingFiles = "_webSiteHostingFiles"; }
RyanWinchester/netsuite-php
src/Classes/FolderFolderType.php
PHP
apache-2.0
1,641
<?php /** * Menu Module * * @author Bálint Horváth <[email protected]> */ namespace Franklin\Component; class Menu extends \Franklin\System\Object{ public $Id; public $Name; public $Status; public $CleanURL; public function __construct($Parent) { parent::__construct($Parent); $this->Status = new Status($this); } }
snett/Franklin
Modules/Component/Menu.php
PHP
apache-2.0
375
package pe.com.ccpl.siconc.web.service; import pe.com.ccpl.siconc.web.model.Role; public interface RoleService { public Role getRole(int id); }
JR-CCPL87/ccpl-affirmation
src/main/java/pe/com/ccpl/siconc/web/service/RoleService.java
Java
apache-2.0
150
BrowseEverythingController.before_filter do if params[:context] collection = Admin::Collection.find(params[:context]) browser.providers['file_system'].config[:home] = collection.dropbox_absolute_path end end
uvalib/avalon
config/initializers/dropbox_context.rb
Ruby
apache-2.0
220
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Hello Wooorld</title> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="styles.css" rel="stylesheet"> </head> <body> <div class="container"> <h1>Welcome.</h1> <div id="nameInput" class="input-group-lg center-block helloInput"> <p class="lead">What is your name?</p> <input id="user_name" type="text" class="form-control" placeholder="name" aria-describedby="sizing-addon1" value="" /> </div> <p id="response" class="lead text-center"></p> <p id="databaseNames" class="lead text-center"></p> </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="antixss.js" type="text/javascript"></script> <script> //Submit data when enter key is pressed $('#user_name').keydown(function(e) { var name = $('#user_name').val(); if (e.which == 13 && name.length > 0) { //catch Enter key //POST request to API to create a new visitor entry in the database $.ajax({ method: "POST", url: "./api/visitors", contentType: "application/json", data: JSON.stringify({name: name }) }) .done(function(data) { $('#response').html(AntiXSS.sanitizeInput(data)); $('#nameInput').hide(); getNames(); }); } }); //Retreive all the visitors from the database function getNames(){ $.get("./api/visitors") .done(function(data) { if(data.length > 0) { data.forEach(function(element, index) { data[index] = AntiXSS.sanitizeInput(element) }); $('#databaseNames').html("Database contents: " + JSON.stringify(data)); } }); } //Call getNames on page load. getNames(); </script> </body> </html>
Okisa/heroes-card
views/index.html
HTML
apache-2.0
2,563
<html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <span class='rank5 5.23758013687111'>?NEW</span> <span class='rank5 5.092407184714711'>YORK</span> <span class='rank4 4.3452095742978045'>BOTANICAL</span> <span class='rank5 4.836230413135688'>GARDEN</span> </br> <span class='rank24 23.68441486703646'>CULTIVATED</span> <span class='rank4 3.9555862618421074'>PLANTS</span> <span class='rank6 6.171300748459634'>OF</span> <span class='rank10 9.986050120726519'>GRAN</span> <span class='rank0 0.0'>D</span> <span class='rank2 2.156557235213036'>C/EfMAN</span> <span class='rank12 12.081526498619874'>EWI</span> </br> <span class='rank11 10.714595530729639'>VoI^SUZlJ</span> </br> <span class='rank12 12.270670438212889'>ÇÕÔivd'ta</span> <span class='rank6 6.37332945951861'>sp.</span> <span class='rank6 5.703960236633383'>L.</span> </br> <span class='rank5 5.131137911966853'>Shrub;</span> <span class='rank8 7.54588394801948'>Leaves</span> <span class='rank0 0.3947714162252218'>green</span> <span class='rank-17 -16.585643118145434'>containing</span> <span class='rank3 3.162206211046385'>white</span> <span class='rank11 11.18572446377565'>margins;</span> <span class='rank10 10.249410291448903'>full</span> <span class='rank17 17.287585110585724'>sunlight;</span> <span class='rank3 3.360632617274767'>rocky</span> <span class='rank2 2.416899481030569'>soil;</span> <span class='rank9 9.328301169609748'>1,5</span> <span class='rank8 7.947303845497636'>meters;</span> <span class='rank-12 -11.551466452746979'>abandoned</span> <span class='rank-3 -2.7004070387897556'>honesite,</span> <span class='rank2 2.2670777674599414'>South</span> <span class='rank12 12.082006686030129'>£cund</span> <span class='rank16 15.899761973947854'>Rd.,</span> <span class='rank17 16.53645291085764'>outside</span> <span class='rank6 6.129628052059067'>of</span> <span class='rank-13 -13.008372207453675'>Georgetown.</span> </br> <span class='rank2 1.9684131869572745'>goll</span> <span class='rank8 7.536541700381693'>N.</span> <span class='rank-13 -13.184994579363924'>Chevalier_</span> <span class='rank0 0.0'>1S1</span> <span class='rank3 2.8711404739185156'>August</span> <span class='rank7 7.181168483165266'>24,</span> <span class='rank4 3.8650293934949715'>1971</span> <span class='rank3 3.017868087179137'>det</span> </br> <span class='rank-3 -2.810734468887766'>00198996</span> </br> </br></br> <strong>Legend - </strong> Level of confidence that token is an accurately-transcribed word</br> <span class='rank-13'>&nbsp;&nbsp;&nbsp;</span> extremely low <span class='rank-7'>&nbsp;&nbsp;&nbsp;</span> very low <span class='rank-1'>&nbsp;&nbsp;&nbsp;</span> low <span class='rank0'>&nbsp;&nbsp;&nbsp;</span> undetermined <span class='rank1'>&nbsp;&nbsp;&nbsp;</span> medium <span class='rank6'>&nbsp;&nbsp;&nbsp;</span> high <span class='rank16'>&nbsp;&nbsp;&nbsp;</span> very high</br> </body> </html>
idigbio-citsci-hackathon/carrotFacetNgram
carrot2-webapp-3.8.1/herballsilvertrigram/00198996.txt.html
HTML
apache-2.0
2,934
/* * Copyright (c) 2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wso2.developerstudio.eclipse.artifact.proxyservice.validators; import org.apache.axiom.om.OMElement; import org.apache.commons.lang.StringUtils; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.wso2.developerstudio.eclipse.artifact.proxyservice.model.ProxyServiceModel; import org.wso2.developerstudio.eclipse.artifact.proxyservice.model.ProxyServiceModel.TargetEPType; import org.wso2.developerstudio.eclipse.artifact.proxyservice.utils.PsArtifactConstants; import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBArtifact; import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBProjectArtifact; import org.wso2.developerstudio.eclipse.platform.core.exception.FieldValidationException; import org.wso2.developerstudio.eclipse.platform.core.model.AbstractFieldController; import org.wso2.developerstudio.eclipse.platform.core.project.model.ProjectDataModel; import org.wso2.developerstudio.eclipse.project.extensions.templates.ArtifactTemplate; import org.wso2.developerstudio.eclipse.platform.ui.validator.CommonFieldValidator; import java.util.List; public class ProxyServiceProjectFieldController extends AbstractFieldController { public void validate(String modelProperty, Object value, ProjectDataModel model) throws FieldValidationException { boolean optWsdlbasedProxy = false; boolean optCustomProxy = false; ArtifactTemplate selectedTemplate = (ArtifactTemplate)model.getModelPropertyValue("ps.type"); if(selectedTemplate!=null){ optWsdlbasedProxy = selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.WSDL_BASED_PROXY_TEMPL_ID); optCustomProxy = (selectedTemplate.isCustom() || selectedTemplate.getId() .equalsIgnoreCase(PsArtifactConstants.CUSTOM_PROXY_TEMPL_ID)); } if (modelProperty.equals("ps.name")) { CommonFieldValidator.validateArtifactName(value); if (value != null) { String resource = value.toString(); ProxyServiceModel proxyModel = (ProxyServiceModel) model; if (proxyModel != null) { IContainer resLocation = proxyModel.getProxyServiceSaveLocation(); if (resLocation != null) { IProject project = resLocation.getProject(); ESBProjectArtifact esbProjectArtifact = new ESBProjectArtifact(); try { esbProjectArtifact.fromFile(project.getFile("artifact.xml").getLocation().toFile()); List<ESBArtifact> allArtifacts = esbProjectArtifact.getAllESBArtifacts(); for (ESBArtifact artifact : allArtifacts) { if (resource.equals(artifact.getName())) { throw new FieldValidationException(""); } } } catch (Exception e) { throw new FieldValidationException("Specified proxy service name already exsits."); } } } } } else if (modelProperty.equals("import.file")) { CommonFieldValidator.validateImportFile(value); } else if (modelProperty.equals("proxy.target.ep.type")) { /** //TODO: if((((ProxyServiceModel)model).getTargetEPType()==TargetEPType.URL) && !(optWsdlbasedProxy||optCustomProxy)){ throw new FieldValidationException("Specified Target Endpoint"); }**/ } else if (modelProperty.equals("templ.common.ps.epurl")) { if (((ProxyServiceModel)model).getTargetEPType() == TargetEPType.URL && !(optWsdlbasedProxy||optCustomProxy)) { if (value == null || value.toString().equals("")) { throw new FieldValidationException("Target Endpoint URL cannot be empty. Please specify a valid Endpoint URL."); } else { CommonFieldValidator.isValidUrl(value.toString().trim(), "Endpoint URL"); } } } else if (modelProperty.equals("templ.common.ps.epkey")) { if ((((ProxyServiceModel)model).getTargetEPType() == TargetEPType.REGISTRY) && (value == null || value.toString().equals("")) && !(optWsdlbasedProxy||optCustomProxy)) { throw new FieldValidationException("Target Registry Endpoint key is invalid or empty. Please specify a valid Endpoint Key."); } } else if (modelProperty.equals("templ.secure.ps.secpolicy")) { } else if (modelProperty.equals("templ.wsdl.ps.wsdlurl")) { if (optWsdlbasedProxy) { if (value == null || value.toString().equals("")) { throw new FieldValidationException("Target WSDL URL cannot be empty. Please specify a valid WSDL URI."); } else { CommonFieldValidator.isValidUrl(value.toString().trim(), "WSDL URL"); } } } else if (modelProperty.equals("templ.wsdl.ps.wsdlservice")) { if (optWsdlbasedProxy && (value == null || value.toString().equals(""))) { throw new FieldValidationException("Target WSDL service is invalid or empty. Please specify a valid WSDL Service."); } } else if (modelProperty.equals("templ.wsdl.ps.wsdlport")) { if (optWsdlbasedProxy && (value == null || value.toString().equals(""))) { throw new FieldValidationException("Target WSDL port is invalid or empty. Please specify a valid WSDL Port."); } } else if (modelProperty.equals("templ.wsdl.ps.publishsame")) { } else if (modelProperty.equals("templ.logging.ps.reqloglevel")) { } else if (modelProperty.equals("templ.logging.ps.resloglevel")) { } else if (modelProperty.equals("templ.transformer.ps.xslt")) { if (selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.TRANSFORMER_PROXY_TEMPL_ID)) { if (value == null || StringUtils.isBlank(value.toString())) { throw new FieldValidationException("Request XSLT key cannot be empty. Please specify a valid XSLT key."); } } } else if (modelProperty.equals("templ.common.ps.eplist")) { if ((((ProxyServiceModel)model).getTargetEPType()==TargetEPType.PREDEFINED) && (value==null || value.toString().equals(""))) { throw new FieldValidationException("Target Predefined Endpoint key cannot be empty. Please specify a valid Predefined Endpoint."); } } else if (modelProperty.equals("save.file")) { IResource resource = (IResource)value; if (resource == null || !resource.exists()) { throw new FieldValidationException("Please specify a valid ESB Project to Save the proxy service."); } } else if (modelProperty.equals("templ.transformer.ps.transformresponses")) { if (selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.TRANSFORMER_PROXY_TEMPL_ID)) { if ((Boolean)value && ((ProxyServiceModel)model).getResponseXSLT().equals("")) { throw new FieldValidationException("Response XSLT key cannot be empty. Please specify a valid XSLT key."); } } } } public boolean isEnableField(String modelProperty, ProjectDataModel model) { boolean enableField = super.isEnableField(modelProperty, model); if (modelProperty.equals("import.file")) { enableField = true; } return enableField; } public List<String> getUpdateFields(String modelProperty, ProjectDataModel model) { List<String> updateFields = super.getUpdateFields(modelProperty, model); if (modelProperty.equals("import.file")) { updateFields.add("available.ps"); } else if (modelProperty.equals("create.esb.prj")) { updateFields.add("save.file"); } else if (modelProperty.equals("ps.type")) { updateFields.add("proxy.AdvancedConfig"); } return updateFields; } public boolean isVisibleField(String modelProperty, ProjectDataModel model) { boolean visibleField = super.isVisibleField(modelProperty, model); if (modelProperty.equals("available.ps")) { List<OMElement> availableEPList = ((ProxyServiceModel) model).getAvailablePSList(); visibleField = (availableEPList != null && availableEPList.size() > 0); } return visibleField; } public boolean isReadOnlyField(String modelProperty, ProjectDataModel model) { boolean readOnlyField = super.isReadOnlyField(modelProperty, model); if (modelProperty.equals("save.file")) { readOnlyField = true; } return readOnlyField; } }
prabushi/devstudio-tooling-esb
plugins/org.wso2.developerstudio.eclipse.artifact.proxyservice/src/org/wso2/developerstudio/eclipse/artifact/proxyservice/validators/ProxyServiceProjectFieldController.java
Java
apache-2.0
8,585
#import "RLDTableViewModelProtocol.h" #pragma mark - RLDTableViewGenericEventHandler protocol @protocol RLDTableViewGenericEventHandler <NSObject> // Suitability checking + (BOOL)canHandleTableView:(UITableView *)tableView viewModel:(id<RLDTableViewReusableViewModel>)viewModel view:(UIView *)view; // Collaborators - (void)setTableView:(UITableView *)tableView; - (void)setViewModel:(id<RLDTableViewReusableViewModel>)viewModel; - (void)setView:(UIView *)view; @optional // Display customization - (void)willReuseView; - (void)willDisplayView; - (void)didEndDisplayingView; @end #pragma mark - RLDTableViewCellEventHandler protocol @protocol RLDTableViewCellEventHandler <RLDTableViewGenericEventHandler> @optional // Accessories (disclosures) - (void)accessoryButtonTapped; // Selection - (BOOL)shouldHighlightView; - (void)didHighlightView; - (void)didUnhighlightView; - (void)willSelectView; - (void)willDeselectView; - (void)didSelectView; - (void)didDeselectView; // Editing - (void)willBeginEditing; - (void)didEndEditing; - (NSArray *)editActions; // Copy and Paste - (BOOL)canPerformAction:(SEL)action withSender:(id)sender; - (void)performAction:(SEL)action withSender:(id)sender; @end #pragma mark - RLDTableViewSectionAccessoryViewEventHandler protocol @protocol RLDTableViewSectionAccessoryViewEventHandler <RLDTableViewGenericEventHandler> @end #pragma mark - RLDTableViewEventHandlerProvider protocol @protocol RLDTableViewEventHandlerProvider <NSObject> - (id<RLDTableViewGenericEventHandler>)eventHandlerWithTableView:(UITableView *)tableView viewModel:(id<RLDTableViewReusableViewModel>)viewModel view:(UIView *)view; @end
rlopezdiez/RLDTableViewSuite
Classes/RLDTableViewEventHandlerProtocol.h
C
apache-2.0
1,662
--- title: Contributing Misc and CLA --- ### Miscellaneous #### Contributor license agreement (CLA) *When you contribute code, you affirm that the contribution is your original work and that you license the work to the project under the project’s open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project’s open source license and warrant that you have the legal authority to do so.* Please make sure you have signed our Contributor License Agreement (either [Individual Contributor License Agreement v1.0](https://docs.google.com/forms/d/e/1FAIpQLSdA-aWKQ15yBzp8wKcFPpuxIyGwohGU1Hx-6Pa4hfaEbbb3fg/viewform?usp=sf_link) or [Software Grant and Corporate Contributor License Agreement (“Agreement”) v1.0)](https://docs.google.com/forms/d/e/1FAIpQLSf3RZ_ZRWOdymT8OnTxRh5FeIadfANLWUrhaSHadg_E20zBAQ/viewform?usp=sf_link). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. ### Release checklist GE core team members use this checklist to ship releases. 1. If this is a major release (incrementing either the first or second version number) the manual acceptance testing must be completed. * This [private Google Doc](https://docs.google.com/document/d/16QJPSCawEkwuEjShZeHa01TlQm9nbUwS6GwmFewJ3EY) outlines the procedure. (Note this will be made public eventually) 2. Merge all approved PRs into `develop`. 3. Make a new branch from `develop` called something like `release-prep-2021-06-01`. 4. In this branch, update the version number in the `great_expectations/deployment_version` file. 5. Update the `changelog.md` move all things under the `Develop` heading under a new heading with the new release number. NOTE: You should remove the `Develop` heading for the released version, it will be replaced in step #12. * Verify that any changes to requirements are specifically identified in the changelog * Double check the grouping / order of changes matches [FEATURE], [BUGFIX], [DOCS], [MAINTENANCE] and that all changes since the last release are mentioned or summarized in a bullet. * Make sure to shout out community contributions in the changelog! E.g. after the change title add `(thanks @<contributor_id>)` 6. Submit this as a PR against `develop` 7. After successful checks, get it approved and merged. 8. Update your local branches and switch to main: `git fetch --all; git checkout main; git pull`. 9. Merge the now-updated `develop` branch into `main` and trigger the release: `git merge origin/develop; git push` 10. Wait for all the builds to complete. The builds should include several test jobs and a deploy job, which handles the actual publishing of code to pypi. You can watch the progress of these builds on Azure. 11. Check [PyPI](https://pypi.org/project/great-expectations/#history) for the new release 12. Create an annotated Git tag: * Run `git tag -a $VERSION -m $VERSION` with the correct new version. * Push the tag up by running `git push origin $VERSION` with the correct new version. * Merge main into develop so that the tagged commit becomes part of the history for develop: `git checkout develop; git pull; git merge main` * On develop, add a new “Develop” section header to changelog.md, and push the updated file with message “Update changelog for develop” 13. [Create the release on GitHub](https://github.com/great-expectations/great_expectations/releases) with the version number. Copy the changelog notes into the release notes, and update any rst-specific links to use GitHub issue numbers. * The deploy step will automatically create a draft for the release. * Generally, we use the name of the tag (Ex: “0.13.2”) as the release title. 14. Notify [email protected] about any community-contributed PRs that should be celebrated. 15. Socialize the release on GE slack by copying the changelog with an optional nice personal message (thank people if you can) 16. Review and merge the automatically-generated PR for [conda-forge/great-expectations-feedstock](https://github.com/conda-forge/great-expectations-feedstock/pulls), updating requirements as necessary and verifying the build status. * To list requirements changed since a previous version of GE, you can run `git diff <<old_tag_e.g._0.12.6>>..<<new_tag_e.g._0.12.7>> -- requirements.txt`. If there are differences, update the requirements section of `recipe/meta.yaml`. This is an important step as this is not done automatically when the PR is generated. * In most cases, the PR will change the SHA and version number. Check the commits for other changes, they may be maintenance changes from the Conda dev team which are OK to merge. * Review all items on the conda-forge CI system and PR checklist. The active conda-forge community frequently updates build processes and testing, and may help discover issues not observed in our pypi deployment process. * If you need to re-run a failing build and don’t have appropriate permissions or you don’t have permissions to merge please refer to the Account Permissions Overview on the superconductive internal [wiki[(https://superconductive.atlassian.net/wiki/spaces/SUP/pages) for who to ask. Other conda-forge community partners are extremely responsive and may be able to help resolve issues quickly. 17. Check for open issues in the [GE conda-forge repository](https://github.com/conda-forge/great-expectations-feedstock/issues). If there are open issues that do not have a corresponding issue in the main GE repo, please create an issue in the GE repo with a link to the corresponding conda issue (e.g. issue [#2021](https://github.com/great-expectations/great_expectations/issues/2021) ). This allows us to internally triage and track the issue. 18 Celebrate! You have successfully released a new version of Great Expectations!! #### Beta Release Notes * To ship a beta release, follow the above checklist, but use the branch name `v0.13.x` as the equivalent of `main` and `v0.11.x-develop` as the equivalent of `develop` * Ship the release using beta version numbers when updating the `great_expectations/deployment_version` and when creating the annotated tag (e.g. **0.13.0b0**) ### Issue Tags We use `stalebot` to automatically tag issues without activity as `stale`, and close them if no response is received in one week. Adding the `stalebot-exempt` tag will prevent the bot from trying to close the issue. Additionally, we try to add tags to indicate the status of key discussion elements: * `help wanted` covers issues where we have not prioritized the request, but believe the feature is useful and so we would welcome community contributors to help accelerate development. * `enhacement` and `expectation-request` indicate discussion of potential new features for Great Expectations * `good first issue` indicates a small-ish task that would be a good way to begin making contributions to Great Expectations
great-expectations/great_expectations
docs/contributing/contributing_misc.md
Markdown
apache-2.0
7,201
/* * Copyright (C) 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.xys.libzxing.zxing.activity; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.Window; import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widget.ImageView; import android.widget.RelativeLayout; import com.google.zxing.Result; import com.xys.libzxing.R; import com.xys.libzxing.zxing.camera.CameraManager; import com.xys.libzxing.zxing.decode.DecodeThread; import com.xys.libzxing.zxing.utils.BeepManager; import com.xys.libzxing.zxing.utils.CaptureActivityHandler; import com.xys.libzxing.zxing.utils.InactivityTimer; import java.io.IOException; import java.lang.reflect.Field; /** * This activity opens the camera and does the actual scanning on a background * thread. It draws a viewfinder to help the user place the barcode correctly, * shows feedback as the image processing is happening, and then overlays the * results when a scan is successful. * * @author [email protected] (Daniel Switkin) * @author Sean Owen */ public final class CaptureActivity extends AppCompatActivity implements SurfaceHolder.Callback { private static final String TAG = CaptureActivity.class.getSimpleName(); private CameraManager cameraManager; private CaptureActivityHandler handler; private InactivityTimer inactivityTimer; private BeepManager beepManager; private SurfaceView scanPreview = null; private RelativeLayout scanContainer; private RelativeLayout scanCropView; private ImageView scanLine; private Rect mCropRect = null; private boolean isHasSurface = false; public Handler getHandler() { return handler; } public CameraManager getCameraManager() { return cameraManager; } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView(R.layout.activity_capture); scanPreview = (SurfaceView) findViewById(R.id.capture_preview); scanContainer = (RelativeLayout) findViewById(R.id.capture_container); scanCropView = (RelativeLayout) findViewById(R.id.capture_crop_view); scanLine = (ImageView) findViewById(R.id.capture_scan_line); inactivityTimer = new InactivityTimer(this); beepManager = new BeepManager(this); TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation .RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f); animation.setDuration(4500); animation.setRepeatCount(-1); animation.setRepeatMode(Animation.RESTART); scanLine.startAnimation(animation); } @Override protected void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); } @Override protected void onPause() { if (handler != null) { handler.quitSynchronously(); handler = null; } inactivityTimer.onPause(); beepManager.close(); cameraManager.closeDriver(); if (!isHasSurface) { scanPreview.getHolder().removeCallback(this); } super.onPause(); } @Override protected void onDestroy() { inactivityTimer.shutdown(); super.onDestroy(); } @Override public void surfaceCreated(SurfaceHolder holder) { if (holder == null) { Log.e(TAG, "*** WARNING *** surfaceCreated() gave us a null surface!"); } if (!isHasSurface) { isHasSurface = true; initCamera(holder); } } @Override public void surfaceDestroyed(SurfaceHolder holder) { isHasSurface = false; } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } /** * A valid barcode has been found, so give an indication of success and show * the results. * * @param rawResult The contents of the barcode. * @param bundle The extras */ public void handleDecode(Result rawResult, Bundle bundle) { inactivityTimer.onActivity(); beepManager.playBeepSoundAndVibrate(); Intent resultIntent = new Intent(); bundle.putInt("width", mCropRect.width()); bundle.putInt("height", mCropRect.height()); bundle.putString("result", rawResult.getText()); resultIntent.putExtras(bundle); this.setResult(RESULT_OK, resultIntent); CaptureActivity.this.finish(); } private void initCamera(SurfaceHolder surfaceHolder) { if (surfaceHolder == null) { throw new IllegalStateException("No SurfaceHolder provided"); } if (cameraManager.isOpen()) { Log.w(TAG, "initCamera() while already open -- late SurfaceView callback?"); return; } try { cameraManager.openDriver(surfaceHolder); // Creating the handler starts the preview, which can also throw a // RuntimeException. if (handler == null) { handler = new CaptureActivityHandler(this, cameraManager, DecodeThread.ALL_MODE); } initCrop(); } catch (IOException ioe) { Log.w(TAG, ioe); displayFrameworkBugMessageAndExit(); } catch (RuntimeException e) { // Barcode Scanner has seen crashes in the wild of this variety: // java.?lang.?RuntimeException: Fail to connect to camera service Log.w(TAG, "Unexpected error initializing camera", e); displayFrameworkBugMessageAndExit(); } } private void displayFrameworkBugMessageAndExit() { // camera error AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.zxing_bar_name)); builder.setMessage("Camera error"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); } }); builder.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { finish(); } }); builder.show(); } public void restartPreviewAfterDelay(long delayMS) { if (handler != null) { handler.sendEmptyMessageDelayed(R.id.restart_preview, delayMS); } } public Rect getCropRect() { return mCropRect; } /** * 初始化截取的矩形区域 */ private void initCrop() { int cameraWidth = cameraManager.getCameraResolution().y; int cameraHeight = cameraManager.getCameraResolution().x; /** 获取布局中扫描框的位置信息 */ int[] location = new int[2]; scanCropView.getLocationInWindow(location); int cropLeft = location[0]; int cropTop = location[1] - getStatusBarHeight(); int cropWidth = scanCropView.getWidth(); int cropHeight = scanCropView.getHeight(); /** 获取布局容器的宽高 */ int containerWidth = scanContainer.getWidth(); int containerHeight = scanContainer.getHeight(); /** 计算最终截取的矩形的左上角顶点x坐标 */ int x = cropLeft * cameraWidth / containerWidth; /** 计算最终截取的矩形的左上角顶点y坐标 */ int y = cropTop * cameraHeight / containerHeight; /** 计算最终截取的矩形的宽度 */ int width = cropWidth * cameraWidth / containerWidth; /** 计算最终截取的矩形的高度 */ int height = cropHeight * cameraHeight / containerHeight; /** 生成最终的截取的矩形 */ mCropRect = new Rect(x, y, width + x, height + y); } private int getStatusBarHeight() { try { Class<?> c = Class.forName("com.android.internal.R$dimen"); Object obj = c.newInstance(); Field field = c.getField("status_bar_height"); int x = Integer.parseInt(field.get(obj).toString()); return getResources().getDimensionPixelSize(x); } catch (Exception e) { e.printStackTrace(); } return 0; } }
WindFromFarEast/SmartButler
libzxing/src/main/java/com/xys/libzxing/zxing/activity/CaptureActivity.java
Java
apache-2.0
10,672
/** \file parse_options.cpp \author [email protected] \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2015 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. \brief Parse Options Implementation */ #include "parse_options.h" /** * takes a string in the Format "c i i i ..." * (1 char followed by potentially many integers) and returns a vector of all i * @param str the string to tokenize * @param tokens the result vector of wire id */ void tokenize_verilog(const std::string& str, std::vector<uint32_t>& tokens, const std::string& delimiters) { tokens.clear(); // Skip delimiters at beginning. Skip first two characters (1 Char + 1 Space) std::string::size_type lastPos = str.find_first_not_of(delimiters, 2); // Find first "non-delimiter". std::string::size_type pos = str.find_first_of(delimiters, lastPos); while (std::string::npos != pos || std::string::npos != lastPos) { // Found a token, add it to the vector. tokens.push_back(atoi(str.substr(lastPos, pos - lastPos).c_str())); // Skip delimiters. Note the "not_of" lastPos = str.find_first_not_of(delimiters, pos); // Find next "non-delimiter" pos = str.find_first_of(delimiters, lastPos); } } /** * takes a string in the Format "i|i|i|..." * (integers separated by '|') and returns a vector of all integers * @param str the string to tokenize * @param tokens the result vector of wire id */ void tokenize(const std::string& str, std::vector<uint32_t>& tokens, const std::string& delimiters) { tokens.clear(); // Skip delimiters at beginning std::string::size_type lastPos = str.find_first_not_of(delimiters, 0); // Find first "non-delimiter". std::string::size_type pos = str.find_first_of(delimiters, lastPos); while (std::string::npos != pos || std::string::npos != lastPos) { // Found a token, add it to the vector. tokens.push_back(atoi(str.substr(lastPos, pos - lastPos).c_str())); // Skip delimiters. Note the "not_of" lastPos = str.find_first_not_of(delimiters, pos); // Find next "non-delimiter" pos = str.find_first_of(delimiters, lastPos); } } int32_t parse_options(int32_t* argcp, char*** argvp, parsing_ctx* options, uint32_t nops) { int result = 0; bool skip; uint32_t i; if(*argcp < 2) return 0; while ((*argcp) > 1) { if ((*argvp)[1][0] != '-' || (*argvp)[1][1] == '\0' || (*argvp)[1][2] != '\0') return result; for (i = 0, skip = false; i < nops && !skip; i++) { if (((*argvp)[1][1]) == options[i].opt_name) { switch (options[i].type) { case T_NUM: if (isdigit((*argvp)[2][0])) { ++*argvp; --*argcp; *((uint32_t*) options[i].val) = atoi((*argvp)[1]); } break; case T_DOUBLE: ++*argvp; --*argcp; *((double*) options[i].val) = atof((*argvp)[1]); break; case T_STR: ++*argvp; --*argcp; *((std::string*) options[i].val) = (*argvp)[1]; break; case T_FLAG: *((bool*) options[i].val) = true; break; } ++result; ++*argvp; --*argcp; options[i].set = true; skip = true; } } } for (i = 0; i < nops; i++) { if (options[i].required && !options[i].set) return 0; } return 1; } void print_usage(std::string progname, parsing_ctx* options, uint32_t nops) { uint32_t i; std::cout << "Usage: " << progname << std::endl; for (i = 0; i < nops; i++) { std::cout << " -" << options[i].opt_name << " [" << options[i].help_str << (options[i].required ? ", required" : ", optional") << "]" << std::endl; } std::cout << std::endl << "Program exiting" << std::endl; }
huxh10/iSDX
aby/src/abycore/util/parse_options.cpp
C++
apache-2.0
4,288
--- copyright: years: 2015, 2016 --- # Gradle을 사용하여 클라이언트 푸시 SDK 설치 {: #android_install} 이 섹션에서는 클라이언트 푸시 SDK를 설치하고 이를 사용하여 추가적으로 Android 애플리케이션을 개발하는 방법에 대해 설명합니다. Gradle을 사용하여 Bluemix® 모바일 서비스 푸시 SDK를 추가할 수 있습니다. Gradle은 저장소에서 아티팩트를 자동으로 다운로드하여 Android 애플리케이션에 제공합니다. Android Studio 및 Android Studio SDK를 올바로 설정해야 합니다. 시스템 설정 방법에 대한 자세한 정보는 [Android Studio 개요](https://developer.android.com/tools/studio/index.html)를 참조하십시오. Gradle에 대한 자세한 정보는 [Gradle 빌드 구성](http://developer.android.com/tools/building/configuring-gradle.html)을 참조하십시오. 1. Android Studio에서 모바일 애플리케이션을 작성하고 연 다음에 애플리케이션 **build.gradle** 파일을 여십시오. 다음 종속 항목을 모바일 애플리케이션에 추가하십시오. 이러한 import 문은 코드 스니펫에 필요합니다. ``` import com.ibm.mobilefirstplatform.clientsdk.android.core.api.BMSClient; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPush; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushException; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushResponseListener; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushNotificationListener; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPSimplePushNotification; ``` 1. 다음 종속 항목을 모바일 애플리케이션에 추가하십시오. 다음 행이 Bluemix™ Mobile Services Push 클라이언트 SDK 및 Google 플레이 서비스 SDK를 사용자의 컴파일 범위 종속 항목에 추가합니다. ``` dependencies { compile 'com.ibm.mobilefirstplatform.clientsdk.android:push:1.+' compile 'com.google.android.gms:play-services:7.8.0' } ``` 1. **AndroidManifest.xml** 파일에서 다음 권한을 추가하십시오. 샘플 Manifest를 보려면 [Android helloPush 샘플 애플리케이션](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellopush/blob/master/helloPush/app/src/main/AndroidManifest.xml)을 참조하십시오. 샘플 Gradle 파일을 보려면 [샘플 빌드 Gradle 파일](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellopush/blob/master/helloPush/app/build.gradle)을 참조하십시오. ``` <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="com.ibm.clientsdk.android.app.permission.C2D_MESSAGE" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> ``` 여기서 [Android 권한](http://developer.android.com/guide/topics/security/permissions.html)에 대한 정보를 볼 수 있습니다. 1. 활동에 대한 알림 의도 설정을 추가하십시오. 사용자가 알림 영역에서 수신한 알림을 클릭할 경우 이 설정을 통해 애플리케이션이 시작됩니다. ``` <intent-filter> <action android:name="<Your_Android_Package_Name.IBMPushNotification"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> ``` **참고**: 위의 조치에서 *Your_Android_Package_Name*을 사용자 애플리케이션에서 사용되는 애플리케이션 패키지 이름으로 대체하십시오. 1. GCM(Google Cloud Messaging) 의도 서비스 및 RECEIVE 이벤트 알림에 대한 의도 필터를 추가하십시오. ``` service android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushIntentService" /> <receiver android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPPushBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.ibm.mobilefirstplatform.clientsdk.android.app" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="com.ibm.mobilefirstplatform.clientsdk.android.app" /> </intent-filter> </receiver> ``` # Android 앱을 위한 푸시 SDK 초기화 {: #android_initialize} 초기화 코드를 배치하는 공통 위치는 Android 애플리케이션에서 기본 활동의 onCreate 메소드입니다. Bluemix 애플리케이션 대시보드의 **모바일 옵션** 링크를 클릭하여 애플리케이션 라우트와 애플리케이션 GUID를 확보하십시오. 라우트 및 앱 GUID에 이러한 값을 사용하십시오. Bluemix 앱 appRoute 및 appGUID 매개변수를 사용하려면 코드 스니펫을 수정하십시오. ##Core SDK 초기화 ``` // Initialize the SDK for Java (Android) with IBM Bluemix AppGUID and route BMSClient.getInstance().initialize(getApplicationContext(), "applicationRoute","applicationGUID", bluemixRegion:"Location where your app Hosted"); ``` **appRoute** Bluemix에서 생성한 서버 애플리케이션에 지정된 라우트를 지정합니다. **AppGUID** Bluemix에서 생성한 애플리케이션에 지정된 고유 키를 지정합니다. 이 값은 대소문자를 구분합니다. **bluemixRegionSuffix** 앱이 호스트된 위치를 지정합니다. 다음 값 중 하나를 사용할 수 있습니다. - BMSClient.REGION_US_SOUTH - BMSClient.REGION_UK - BMSClient.REGION_SYDNEY ##클라이언트 푸시 SDK 초기화 ``` //Initialize client Push SDK for Java MFPPush push = MFPPush.getInstance(); push.initialize(getApplicationContext()); ``` # Android 디바이스 등록 {: #android_register} `IMFPush.register()` API를 사용하여 디바이스를 Push Notification 서비스에 등록할 수 있습니다. Android 디바이스의 등록인 경우, 우선 Bluemix 푸시 서비스 구성 대시보드에서 GCM(Google Cloud Messaging) 정보를 추가하십시오. 자세한 정보는 [GCM(Google Cloud Messaging)의 신임 정보 구성](t_push_provider_android.html)을 참조하십시오. 다음 코드 스니펫을 복사하여 Android 모바일 애플리케이션에 붙여넣으십시오. ``` //Register Android devices push.register(new MFPPushResponseListener<String>() { @Override public void onSuccess(String deviceId) { //handle success here } @Override public void onFailure(MFPPushException ex) { //handle failure here } }); ``` ``` //Handles the notification when it arrives MFPPushNotificationListener notificationListener = new MFPPushNotificationListener() { @Override public void onReceive (final MFPSimplePushNotification message){ // Handle Push Notification } }; ``` # Android 디바이스에서 푸시 알림 수신 {: #android_receive} notificationListener 오브젝트를 푸시에 등록하려면 **MFPPush.listen()** 메소드를 호출하십시오. 푸시 알림을 처리하는 활동의 **onResume()** 메소드에서 일반적으로 이 메소드가 호출됩니다. 1. notificationListener 오브젝트를 푸시에 등록하려면 **listen()** 메소드를 호출하십시오. 푸시 알림을 처리하는 활동의 **onResume()** 메소드에서 일반적으로 이 메소드가 호출됩니다. ``` @Override protected void onResume(){ super.onResume(); if(push != null) { push.listen(notificationListener); } } ``` 2. 프로젝트를 빌드하고 디바이스 또는 에뮬레이터에서 이를 실행하십시오. register() 메소드의 응답 리스너에 대해 onSuccess() 메소드가 호출되면 디바이스가 Push Notification 서비스에 정상적으로 푸시에 등록된 것입니다. 이 때 기본 푸시 알림 전송에 설명된 대로 메시지를 보낼 수 있습니다. 3. 디바이스가 알림을 수신했는지 확인하십시오. 애플리케이션이 포그라운드에 있는 경우 **MFPPushNotificationListener**에 의해 알림이 처리됩니다. 애플리케이션이 백그라운드에 있는 경우 알림 막대에 메시지가 표시됩니다. # 기본 푸시 알림 전송 {: #push-send-notifications} 애플리케이션이 개발된 후에는 (태그, 배지, 추가 페이로드 또는 사운드 파일을 사용하지 않아도) 기본 푸시 알림을 전송할 수 있습니다. 기본 푸시 알림을 전송하십시오. 1. **청취자 선택**에서 다음 청취자 중 하나를 선택하십시오. **모든 디바이스** 또는 플랫폼 기준으로 **iOS 디바이스만** 또는 **Anroid 디바이스만**. **참고**: **모든 디바이스** 옵션을 선택하는 경우 푸시 알림에 등록된 모든 디바이스는 알림을 수신합니다. ![알림 화면](images/tag_notification.jpg) 2. **알림 작성**에서 메시지를 입력한 후 **전송**을 클릭하십시오. 3. 디바이스가 알림을 수신했는지 확인하십시오. 다음 스크린샷은 Android 및 iOS 디바이스의 포그라운드에서 푸시 알림을 처리하는 경보 상자를 표시합니다. ![Android의 포그라운드 푸시 알림](images/Android_Screenshot.jpg) ![iOS의 포그라운드 푸시 알림](images/iOS_Screenshot.jpg) 다음 스크린샷은 Android의 백그라운드에 있는 푸시 알림을 보여줍니다.![Android의 백그라운드 푸시 알림](images/background.jpg) # 다음 단계 {: #next_steps_tags} 정상적으로 기본 알림을 설정한 후 태그 기반 알림 및 고급 옵션을 구성할 수 있습니다. 다음의 Push Notifications 서비스 기능을 사용자의 앱에 추가하십시오. 태그 기반 알림을 사용하려면 [태그 기반 알림](c_tag_basednotifications.html)을 참조하십시오. 고급 알림 옵션을 사용하려면 [고급 푸시 알림](t_advance_notifications.html)을 참조하십시오.
nickgaski/docs
services/mobilepush/nl/ko/t_android_install_sdk.md
Markdown
apache-2.0
10,649
"""heroku_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import include, url from django.contrib import admin from blog.views import index, signup, login, logout urlpatterns = [ url(r'^$', index, name='index'), url(r'^signup', signup, name='signup'), url(r'^login', login, name='login'), url(r'^logout', logout, name='logout'), url(r'^admin/', include(admin.site.urls)), ]
barbossa/django-heroku-blog
heroku_blog/urls.py
Python
apache-2.0
1,004
/** * Copyright (c) 2005-2012 https://github.com/zhangkaitao Licensed under the Apache License, Version 2.0 (the * "License"); */ package com.yang.spinach.common.utils.spring; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sf.ehcache.Ehcache; import org.apache.shiro.cache.Cache; import org.apache.shiro.cache.CacheException; import org.apache.shiro.cache.CacheManager; import org.apache.shiro.util.CollectionUtils; import org.springframework.cache.support.SimpleValueWrapper; /** * 包装Spring cache抽象 */ public class SpringCacheManagerWrapper implements CacheManager { private org.springframework.cache.CacheManager cacheManager; /** * 设置spring cache manager * * @param cacheManager */ public void setCacheManager( org.springframework.cache.CacheManager cacheManager) { this.cacheManager = cacheManager; } @Override public <K, V> Cache<K, V> getCache(String name) throws CacheException { org.springframework.cache.Cache springCache = cacheManager .getCache(name); return new SpringCacheWrapper(springCache); } static class SpringCacheWrapper implements Cache { private final org.springframework.cache.Cache springCache; SpringCacheWrapper(org.springframework.cache.Cache springCache) { this.springCache = springCache; } @Override public Object get(Object key) throws CacheException { Object value = springCache.get(key); if (value instanceof SimpleValueWrapper) { return ((SimpleValueWrapper) value).get(); } return value; } @Override public Object put(Object key, Object value) throws CacheException { springCache.put(key, value); return value; } @Override public Object remove(Object key) throws CacheException { springCache.evict(key); return null; } @Override public void clear() throws CacheException { springCache.clear(); } @Override public int size() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); return ehcache.getSize(); } throw new UnsupportedOperationException( "invoke spring cache abstract size method not supported"); } @Override public Set keys() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); return new HashSet(ehcache.getKeys()); } throw new UnsupportedOperationException( "invoke spring cache abstract keys method not supported"); } @Override public Collection values() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); System.out.println("cache savePath:" + ehcache.getCacheManager().getDiskStorePath() + "--------------"); List keys = ehcache.getKeys(); if (!CollectionUtils.isEmpty(keys)) { List values = new ArrayList(keys.size()); for (Object key : keys) { Object value = get(key); if (value != null) { values.add(value); } } return Collections.unmodifiableList(values); } else { return Collections.emptyList(); } } throw new UnsupportedOperationException( "invoke spring cache abstract values method not supported"); } } }
yangb0/spinach
spinach/spinach-web/src/main/java/com/yang/spinach/common/utils/spring/SpringCacheManagerWrapper.java
Java
apache-2.0
3,363
package org.javacore.io.zip; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.util.Enumeration; import java.util.zip.Adler32; import java.util.zip.CheckedInputStream; import java.util.zip.CheckedOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; /* * Copyright [2015] [Jeff Lee] * * 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. */ /** * @author admin * @since 2015-10-17 14:58:59 * 利用Zip进行多文件保存 */ public class ZipCompress { private static String filePath = "src" + File.separator + "org" + File.separator + "javacore" + File.separator + "io" + File.separator; private static String[] fileNames= new String[] { filePath + "BufferedInputFileT.java", filePath + "ChangeSystemOut.java" }; public static void main(String[] args) throws IOException { zipFiles(fileNames); } private static void zipFiles(String[] fileNames) throws IOException { // 获取zip文件输出流 FileOutputStream f = new FileOutputStream("test.zip"); // 从文件输出流中获取数据校验和输出流,并设置Adler32 CheckedOutputStream csum = new CheckedOutputStream(f,new Adler32()); // 从数据校验和输出流中获取Zip输出流 ZipOutputStream zos = new ZipOutputStream(csum); // 从Zip输出流中获取缓冲输出流 BufferedOutputStream out = new BufferedOutputStream(zos); // 设置Zip文件注释 zos.setComment("测试 java zip stream"); for (String file : fileNames) { System.out.println("写入文件: " + file); // 获取文件输入字符流 BufferedReader in = new BufferedReader(new FileReader(file)); // 想Zip处理写入新的文件条目,并流定位到数据开始处 zos.putNextEntry(new ZipEntry(file)); int c; while ((c = in.read()) > 0) out.write(c); in.close(); // 刷新Zip输出流,将缓冲的流写入该流 out.flush(); } // 文件全部写入Zip输出流后,关闭 out.close(); // 输出数据校验和 System.out.println("数据校验和: " + csum.getChecksum().getValue()); System.out.println("读取zip文件"); // 读取test.zip文件输入流 FileInputStream fi = new FileInputStream("test.zip"); // 从文件输入流中获取数据校验和流 CheckedInputStream csumi = new CheckedInputStream(fi,new Adler32()); // 从数据校验和流中获取Zip解压流 ZipInputStream in2 = new ZipInputStream(csumi); // 从Zip解压流中获取缓冲输入流 BufferedInputStream bis = new BufferedInputStream(in2); // 创建文件条目 ZipEntry zipEntry; while ((zipEntry = in2.getNextEntry()) != null) { System.out.println("读取文件: " + zipEntry); int x; while ((x = bis.read()) > 0) System.out.write(x); } if (fileNames.length == 1) System.out.println("数据校验和: " + csumi.getChecksum().getValue()); bis.close(); // 获取Zip文件 ZipFile zf = new ZipFile("test.zip"); // 获取文件条目枚举 Enumeration e = zf.entries(); while (e.hasMoreElements()) { // 从Zip文件的枚举中获取文件条目 ZipEntry ze2 = (ZipEntry) e.nextElement(); System.out.println("文件: " + ze2); } } }
tzpBingo/java-example
src/main/java/org/javacore/io/zip/ZipCompress.java
Java
apache-2.0
4,471
package Zoe::Runtime::Database; use Mojo::Base 'Zoe::Runtime'; sub new { my $class = shift; my %arg = @_; my $self = { type => undef, #database type (mysql | sqlite| perl DBD driver name]) dbfile => undef, #path to database # required if type is sqlite dbname => undef, #database name port => undef, #database port host => undef, #databse host dbuser => undef, #database user name dbpassword => undef, #database user password is_verbose => undef, #verbose logging (1| 0) mandatory_fields => [ 'type'], #mandatory fields %arg }; return bless $self, $class; } sub check_valid { #if type is sqlite ->dbfile is required #else all other params are required my $self = shift; my $type = $self->{type}; my @not_valids = (); push(@not_valids, 'type') unless (defined($self->{type})); if ($type =~ /sqlite/imx){ push(@not_valids, 'type'); }else { my @list = ('dbname', 'port', 'host', 'dbuser', 'dbpassword'); foreach my $field (@list) { push(@not_valids, $field) unless ( defined($self->{$field}) ); } } return @not_valids; } 1; __DATA__ =head1 NAME ZOE::Runtime::Database =head1 Description Stores the runtime Database details; Database parameters are stored in the runtime.yml file or passed as key values to the Zoe::Runtime::Database constructer keys and description below type database type (mysql | sqlite| perl DBD driver name]) dbfile path to database required if type is sqlite dbname database name port database port host databse host dbuser database user name dbpassword database user password is_verbose verbose logging (1| 0) mandatory_fields => [ 'type'], #mandatory fields #if type is sqlite ->dbfile is required #else all other params are required =head1 YML Examples Sqlite example: database: type: sqlite dbfile: /var/apps/myapp/app.db is_verbose: 1 All other DB example: database: type: mysql dbname: mydatabase port: 3306 host: dbhost dbuser: dbuser dbpassword: butt3rSk0tcH! is_verbose: 1 =head1 Author [email protected] =cut
chubbz327/Zoe
lib/Zoe/Runtime/Database.pm
Perl
apache-2.0
2,612
/** * * Copyright 2014-2017 Florian Schmaus * * 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 eu.geekplace.javapinning.pin; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import java.util.logging.Level; import java.util.logging.Logger; import eu.geekplace.javapinning.util.HexUtilities; public abstract class Pin { private static final Logger LOGGER = Logger.getLogger(Sha256Pin.class.getName()); protected static final MessageDigest sha256md; static { MessageDigest sha256mdtemp = null; try { sha256mdtemp = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { LOGGER.log(Level.WARNING, "SHA-256 MessageDigest not available", e); } sha256md = sha256mdtemp; } protected final byte[] pinBytes; protected Pin(byte[] pinBytes) { this.pinBytes = pinBytes; } protected Pin(String pinHexString) { pinBytes = HexUtilities.decodeFromHex(pinHexString); } public abstract boolean pinsCertificate(X509Certificate x509certificate) throws CertificateEncodingException; protected abstract boolean pinsCertificate(byte[] pubkey); /** * Create a new {@link Pin} from the given String. * <p> * The Pin String must be in the format <tt>[type]:[hex-string]</tt>, where * <tt>type</tt> denotes the type of the Pin and <tt>hex-string</tt> is the * binary value of the Pin encoded in hex. Currently supported types are * <ul> * <li>PLAIN</li> * <li>SHA256</li> * <li>CERTPLAIN</li> * <li>CERTSHA256</li> * </ul> * The hex-string must contain only of whitespace characters, colons (':'), * numbers [0-9] and ASCII letters [a-fA-F]. It must be a valid hex-encoded * binary representation. First the string is lower-cased, then all * whitespace characters and colons are removed before the string is decoded * to bytes. * </p> * * @param string * the Pin String. * @return the Pin for the given Pin String. * @throws IllegalArgumentException * if the given String is not a valid Pin String */ public static Pin fromString(String string) { // The Pin's string may have multiple colons (':'), assume that // everything before the first colon is the Pin type and everything // after the colon is the Pin's byte encoded in hex. String[] pin = string.split(":", 2); if (pin.length != 2) { throw new IllegalArgumentException("Invalid pin string, expected: 'format-specifier:hex-string'."); } String type = pin[0]; String pinHex = pin[1]; switch (type) { case "SHA256": return new Sha256Pin(pinHex); case "PLAIN": return new PlainPin(pinHex); case "CERTSHA256": return new CertSha256Pin(pinHex); case "CERTPLAIN": return new CertPlainPin(pinHex); default: throw new IllegalArgumentException(); } } /** * Returns a clone of the bytes that represent this Pin. * <p> * This method is meant for unit testing only and therefore not public. * </p> * * @return a clone of the bytes that represent this Pin. */ byte[] getPinBytes() { return pinBytes.clone(); } }
Flowdalic/java-pinning
java-pinning-core/src/main/java/eu/geekplace/javapinning/pin/Pin.java
Java
apache-2.0
3,689
body { margin:0px; background-image:none; position:relative; left:-0px; width:1074px; margin-left:auto; margin-right:auto; text-align:left; } #base { position:absolute; z-index:0; } #u6641 { position:absolute; left:0px; top:63px; width:128px; height:320px; } #u6641_menu { position:absolute; left:-3px; top:-3px; width:134px; height:326px; } #u6642 { position:absolute; left:0px; top:0px; width:133px; height:325px; } #u6643_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6643 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6644 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6645_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6645 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6646 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6647_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6647 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6648 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6649_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6649 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6650 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6651_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6651 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6652 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6653_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6653 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6654 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6655_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6655 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6656 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6657_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6657 { position:absolute; left:0px; top:224px; width:128px; height:32px; } #u6658 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6659_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6659 { position:absolute; left:0px; top:256px; width:128px; height:32px; } #u6660 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6661_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6661 { position:absolute; left:0px; top:288px; width:128px; height:32px; } #u6662 { position:absolute; left:2px; top:8px; width:124px; visibility:hidden; word-wrap:break-word; } #u6663 { position:absolute; left:128px; top:0px; width:128px; height:192px; visibility:hidden; } #u6663_menu { position:absolute; left:-3px; top:-3px; width:134px; height:198px; } #u6664 { position:absolute; left:0px; top:0px; width:133px; height:197px; } #u6665_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6665 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6666 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6667_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6667 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6668 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6669_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6669 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6670 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6671_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6671 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6672 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6673_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6673 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6674 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6675_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6675 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6676 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6677 { position:absolute; left:128px; top:32px; width:128px; height:128px; visibility:hidden; } #u6677_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6678 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6679_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6679 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6680 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6681_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6681 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6682 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6683_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6683 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6684 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6685_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6685 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6686 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6687 { position:absolute; left:128px; top:64px; width:128px; height:224px; visibility:hidden; } #u6687_menu { position:absolute; left:-3px; top:-3px; width:134px; height:230px; } #u6688 { position:absolute; left:0px; top:0px; width:133px; height:229px; } #u6689_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6689 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6690 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6691_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6691 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6692 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6693_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6693 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6694 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6695_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6695 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6696 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6697_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6697 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6698 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6699_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6699 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6700 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6701_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6701 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6702 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6703 { position:absolute; left:128px; top:96px; width:128px; height:128px; visibility:hidden; } #u6703_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6704 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6705_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6705 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6706 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6707_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6707 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6708 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6709_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6709 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6710 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6711_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6711 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6712 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6713 { position:absolute; left:128px; top:128px; width:128px; height:128px; visibility:hidden; } #u6713_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6714 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6715_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6715 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6716 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6717_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6717 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6718 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6719_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6719 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6720 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6721_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6721 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6722 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6723 { position:absolute; left:128px; top:160px; width:128px; height:64px; visibility:hidden; } #u6723_menu { position:absolute; left:-3px; top:-3px; width:134px; height:70px; } #u6724 { position:absolute; left:0px; top:0px; width:133px; height:69px; } #u6725_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6725 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6726 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6727_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6727 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6728 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6729 { position:absolute; left:128px; top:192px; width:128px; height:32px; visibility:hidden; } #u6729_menu { position:absolute; left:-3px; top:-3px; width:134px; height:38px; } #u6730 { position:absolute; left:0px; top:0px; width:133px; height:37px; } #u6731_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6731 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6732 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6733 { position:absolute; left:128px; top:224px; width:128px; height:224px; visibility:hidden; } #u6733_menu { position:absolute; left:-3px; top:-3px; width:134px; height:230px; } #u6734 { position:absolute; left:0px; top:0px; width:133px; height:229px; } #u6735_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6735 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6736 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6737_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6737 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6738 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6739_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6739 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6740 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6741_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6741 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6742 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6743_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6743 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6744 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6745_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6745 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6746 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6747_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6747 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6748 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6749 { position:absolute; left:128px; top:256px; width:128px; height:64px; visibility:hidden; } #u6749_menu { position:absolute; left:-3px; top:-3px; width:134px; height:70px; } #u6750 { position:absolute; left:0px; top:0px; width:133px; height:69px; } #u6751_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6751 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6752 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6753_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6753 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6754 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6756_div { position:absolute; left:0px; top:0px; width:1024px; height:64px; background:inherit; background-color:rgba(215, 215, 215, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6756 { position:absolute; left:0px; top:0px; width:1024px; height:64px; } #u6757 { position:absolute; left:2px; top:24px; width:1020px; visibility:hidden; word-wrap:break-word; } #u6759_img { position:absolute; left:0px; top:0px; width:85px; height:29px; } #u6759 { position:absolute; left:22px; top:18px; width:85px; height:29px; font-family:'华文琥珀 Regular', '华文琥珀'; font-weight:400; font-style:normal; font-size:28px; } #u6760 { position:absolute; left:2px; top:6px; width:81px; visibility:hidden; word-wrap:break-word; } #u6761_img { position:absolute; left:0px; top:0px; width:64px; height:64px; } #u6761 { position:absolute; left:960px; top:0px; width:64px; height:64px; } #u6762 { position:absolute; left:2px; top:24px; width:60px; visibility:hidden; word-wrap:break-word; } #u6763_div { position:absolute; left:0px; top:0px; width:85px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#666666; } #u6763 { position:absolute; left:858px; top:11px; width:85px; height:16px; color:#666666; } #u6764 { position:absolute; left:0px; top:0px; width:85px; white-space:nowrap; } #u6765_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#666666; } #u6765 { position:absolute; left:914px; top:37px; width:29px; height:16px; color:#666666; } #u6766 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6767_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6767 { position:absolute; left:138px; top:74px; width:57px; height:16px; } #u6768 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6769_div { position:absolute; left:0px; top:0px; width:5px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6769 { position:absolute; left:205px; top:74px; width:5px; height:16px; } #u6770 { position:absolute; left:0px; top:0px; width:5px; white-space:nowrap; } #u6771_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6771 { position:absolute; left:219px; top:74px; width:57px; height:16px; } #u6772 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6773_img { position:absolute; left:0px; top:0px; width:887px; height:2px; } #u6773 { position:absolute; left:138px; top:96px; width:886px; height:1px; } #u6774 { position:absolute; left:2px; top:-8px; width:882px; visibility:hidden; word-wrap:break-word; } #u6775_div { position:absolute; left:0px; top:0px; width:886px; height:149px; background:inherit; background-color:rgba(204, 204, 204, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6775 { position:absolute; left:138px; top:107px; width:886px; height:149px; } #u6776 { position:absolute; left:2px; top:66px; width:882px; visibility:hidden; word-wrap:break-word; } #u6777_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6777 { position:absolute; left:911px; top:192px; width:96px; height:36px; font-size:14px; color:#666666; } #u6778 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6779_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6779 { position:absolute; left:911px; top:128px; width:96px; height:36px; font-size:14px; color:#666666; } #u6780 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6781_div { position:absolute; left:0px; top:0px; width:886px; height:171px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6781 { position:absolute; left:138px; top:320px; width:886px; height:171px; } #u6782 { position:absolute; left:2px; top:78px; width:882px; visibility:hidden; word-wrap:break-word; } #u6783_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6783 { position:absolute; left:219px; top:341px; width:9px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6784 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6785_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6785 { position:absolute; left:291px; top:341px; width:72px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6786 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6787_img { position:absolute; left:-1px; top:-1px; width:858px; height:5px; } #u6787 { position:absolute; left:152px; top:367px; width:855px; height:2px; } #u6788 { position:absolute; left:2px; top:-7px; width:851px; visibility:hidden; word-wrap:break-word; } #u6789_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6789 { position:absolute; left:219px; top:383px; width:9px; height:16px; } #u6790 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6791_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6791 { position:absolute; left:219px; top:420px; width:9px; height:16px; } #u6792 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6793_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6793 { position:absolute; left:219px; top:458px; width:9px; height:16px; } #u6794 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6795_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6795 { position:absolute; left:505px; top:383px; width:71px; height:16px; } #u6796 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6797_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6797 { position:absolute; left:505px; top:420px; width:71px; height:16px; } #u6798 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6799_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6799 { position:absolute; left:505px; top:458px; width:71px; height:16px; } #u6800 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6801_img { position:absolute; left:0px; top:0px; width:856px; height:2px; } #u6801 { position:absolute; left:152px; top:410px; width:855px; height:1px; } #u6802 { position:absolute; left:2px; top:-8px; width:851px; visibility:hidden; word-wrap:break-word; } #u6803_img { position:absolute; left:0px; top:0px; width:856px; height:2px; } #u6803 { position:absolute; left:152px; top:447px; width:855px; height:1px; } #u6804 { position:absolute; left:2px; top:-8px; width:851px; visibility:hidden; word-wrap:break-word; } #u6805 { position:absolute; left:154px; top:341px; width:52px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6806 { position:absolute; left:16px; top:0px; width:34px; word-wrap:break-word; } #u6805_input { position:absolute; left:-3px; top:-2px; } #u6807 { position:absolute; left:154px; top:383px; width:39px; height:16px; } #u6808 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6807_input { position:absolute; left:-3px; top:-2px; } #u6809 { position:absolute; left:154px; top:420px; width:39px; height:16px; } #u6810 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6809_input { position:absolute; left:-3px; top:-2px; } #u6811 { position:absolute; left:154px; top:458px; width:39px; height:16px; } #u6812 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6811_input { position:absolute; left:-3px; top:-2px; } #u6813 { position:absolute; left:0px; top:0px; width:0px; height:0px; } #u6814_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); border-right:0px; border-radius:5px; border-top-right-radius:0px; border-bottom-right-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6814 { position:absolute; left:491px; top:669px; width:40px; height:36px; } #u6815 { position:absolute; left:2px; top:10px; width:36px; visibility:hidden; word-wrap:break-word; } #u6816_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6816 { position:absolute; left:649px; top:669px; width:40px; height:36px; } #u6817 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6818_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); border-left:0px; border-radius:5px; border-top-left-radius:0px; border-bottom-left-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6818 { position:absolute; left:920px; top:669px; width:40px; height:36px; } #u6819 { position:absolute; left:2px; top:10px; width:36px; visibility:hidden; word-wrap:break-word; } #u6820_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6820 { position:absolute; left:571px; top:669px; width:40px; height:36px; } #u6821 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6822_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6822 { position:absolute; left:610px; top:669px; width:40px; height:36px; } #u6823 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6824_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6824 { position:absolute; left:688px; top:669px; width:40px; height:36px; } #u6825 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6826_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6826 { position:absolute; left:724px; top:669px; width:40px; height:36px; } #u6827 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6828_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6828 { position:absolute; left:763px; top:669px; width:40px; height:36px; } #u6829 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6830_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6830 { position:absolute; left:802px; top:669px; width:40px; height:36px; } #u6831 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6832_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6832 { position:absolute; left:841px; top:669px; width:40px; height:36px; } #u6833 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6834_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6834 { position:absolute; left:532px; top:669px; width:40px; height:36px; } #u6835 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6836_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6836 { position:absolute; left:880px; top:669px; width:40px; height:36px; } #u6837 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6838_img { position:absolute; left:0px; top:0px; width:30px; height:30px; } #u6838 { position:absolute; left:925px; top:672px; width:30px; height:30px; font-family:'IOS8-Icons Regular', 'IOS8-Icons'; font-weight:400; font-style:normal; font-size:28px; } #u6839 { position:absolute; left:0px; top:7px; width:30px; visibility:hidden; word-wrap:break-word; } #u6840_img { position:absolute; left:0px; top:0px; width:30px; height:30px; } #u6840 { position:absolute; left:496px; top:672px; width:30px; height:30px; font-family:'IOS8-Icons Regular', 'IOS8-Icons'; font-weight:400; font-style:normal; font-size:28px; } #u6841 { position:absolute; left:0px; top:7px; width:30px; visibility:hidden; word-wrap:break-word; } #u6843_div { position:absolute; left:0px; top:0px; width:1024px; height:64px; background:inherit; background-color:rgba(215, 215, 215, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FFFFFF; } #u6843 { position:absolute; left:0px; top:741px; width:1024px; height:64px; color:#FFFFFF; } #u6844 { position:absolute; left:2px; top:24px; width:1020px; word-wrap:break-word; } #u6845_div { position:absolute; left:0px; top:0px; width:60px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6845 { position:absolute; left:506px; top:341px; width:60px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6846 { position:absolute; left:0px; top:0px; width:60px; word-wrap:break-word; } #u6847_div { position:absolute; left:0px; top:0px; width:63px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6847 { position:absolute; left:638px; top:341px; width:63px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6848 { position:absolute; left:0px; top:0px; width:63px; word-wrap:break-word; } #u6849_div { position:absolute; left:0px; top:0px; width:36px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6849 { position:absolute; left:916px; top:341px; width:36px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6850 { position:absolute; left:0px; top:0px; width:36px; word-wrap:break-word; } #u6851_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6851 { position:absolute; left:146px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6852 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6853_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6853 { position:absolute; left:591px; top:383px; width:174px; height:16px; } #u6854 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6855_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6855 { position:absolute; left:898px; top:383px; width:72px; height:16px; color:#0099FF; } #u6856 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6857_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6857 { position:absolute; left:269px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6858 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6859_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6859 { position:absolute; left:394px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6860 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6861_div { position:absolute; left:0px; top:0px; width:115px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6861 { position:absolute; left:281px; top:383px; width:115px; height:16px; } #u6862 { position:absolute; left:0px; top:0px; width:115px; word-wrap:break-word; } #u6863_div { position:absolute; left:0px; top:0px; width:115px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6863 { position:absolute; left:281px; top:420px; width:115px; height:16px; } #u6864 { position:absolute; left:0px; top:0px; width:115px; word-wrap:break-word; } #u6865_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6865 { position:absolute; left:281px; top:458px; width:71px; height:16px; } #u6866 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6867_div { position:absolute; left:0px; top:0px; width:36px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6867 { position:absolute; left:791px; top:341px; width:36px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6868 { position:absolute; left:0px; top:0px; width:36px; word-wrap:break-word; } #u6869_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6869 { position:absolute; left:784px; top:383px; width:71px; height:16px; } #u6870 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6871_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6871 { position:absolute; left:784px; top:420px; width:71px; height:16px; } #u6872 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6873_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6873 { position:absolute; left:784px; top:458px; width:71px; height:16px; } #u6874 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6875_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6875 { position:absolute; left:591px; top:420px; width:174px; height:16px; } #u6876 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6877_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6877 { position:absolute; left:591px; top:458px; width:174px; height:16px; } #u6878 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6879_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6879 { position:absolute; left:898px; top:420px; width:72px; height:16px; color:#0099FF; } #u6880 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6881_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6881 { position:absolute; left:898px; top:458px; width:72px; height:16px; color:#0099FF; } #u6882 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6883_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6883 { position:absolute; left:411px; top:383px; width:71px; height:16px; } #u6884 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6885_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6885 { position:absolute; left:411px; top:420px; width:71px; height:16px; } #u6886 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6887_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6887 { position:absolute; left:411px; top:458px; width:71px; height:16px; } #u6888 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6889_div { position:absolute; left:0px; top:0px; width:42px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6889 { position:absolute; left:412px; top:341px; width:42px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6890 { position:absolute; left:0px; top:0px; width:42px; word-wrap:break-word; } #u6891_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6891 { position:absolute; left:1050px; top:324px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6892 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6893_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6893 { position:absolute; left:20px; top:856px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6894 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6895_div { position:absolute; left:0px; top:0px; width:239px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6895 { position:absolute; left:54px; top:860px; width:239px; height:16px; color:#FF00FF; } #u6896 { position:absolute; left:0px; top:0px; width:239px; white-space:nowrap; } #u6897_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6897 { position:absolute; left:211px; top:192px; width:180px; height:36px; } #u6898 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6899 { position:absolute; left:212px; top:193px; width:178px; height:34px; } #u6899_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:left; border-color:transparent; outline-style:none; } #u6900_img { position:absolute; left:0px; top:0px; width:12px; height:8px; } #u6900 { position:absolute; left:370px; top:206px; width:12px; height:8px; -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); color:#000000; } #u6901 { position:absolute; left:2px; top:-4px; width:8px; visibility:hidden; word-wrap:break-word; } #u6902_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6902 { position:absolute; left:146px; top:202px; width:29px; height:16px; } #u6903 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6904_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6904 { position:absolute; left:518px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6905 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6906_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6906 { position:absolute; left:638px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6907 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6908_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6908 { position:absolute; left:1050px; top:167px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6909 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6910_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6910 { position:absolute; left:1050px; top:269px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6911 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6912_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6912 { position:absolute; left:20px; top:953px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6913 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6914_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6914 { position:absolute; left:54px; top:957px; width:57px; height:16px; color:#FF00FF; } #u6915 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6916_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6916 { position:absolute; left:20px; top:1333px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6917 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6918_div { position:absolute; left:0px; top:0px; width:281px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6918 { position:absolute; left:54px; top:1337px; width:281px; height:16px; color:#FF00FF; } #u6919 { position:absolute; left:0px; top:0px; width:281px; white-space:nowrap; } #u6920_div { position:absolute; left:0px; top:0px; width:600px; height:240px; background:inherit; background-color:rgba(153, 153, 153, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6920 { position:absolute; left:54px; top:997px; width:600px; height:240px; } #u6921 { position:absolute; left:2px; top:112px; width:596px; visibility:hidden; word-wrap:break-word; } #u6922_img { position:absolute; left:0px; top:0px; width:601px; height:2px; } #u6922 { position:absolute; left:54px; top:1050px; width:600px; height:1px; } #u6923 { position:absolute; left:2px; top:-8px; width:596px; visibility:hidden; word-wrap:break-word; } #u6924_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6924 { position:absolute; left:72px; top:1016px; width:29px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6925 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6926_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6926 { position:absolute; left:72px; top:1070px; width:71px; height:16px; } #u6927 { position:absolute; left:0px; top:0px; width:71px; white-space:nowrap; } #u6928_img { position:absolute; left:0px; top:0px; width:601px; height:2px; } #u6928 { position:absolute; left:54px; top:1186px; width:600px; height:1px; } #u6929 { position:absolute; left:2px; top:-8px; width:596px; visibility:hidden; word-wrap:break-word; } #u6930_div { position:absolute; left:0px; top:0px; width:120px; height:36px; background:inherit; background-color:rgba(0, 157, 217, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#FFFFFF; } #u6930 { position:absolute; left:509px; top:1193px; width:120px; height:36px; font-size:14px; color:#FFFFFF; } #u6931 { position:absolute; left:2px; top:10px; width:116px; word-wrap:break-word; } #u6932_div { position:absolute; left:0px; top:0px; width:80px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6932 { position:absolute; left:405px; top:1193px; width:80px; height:36px; font-size:14px; color:#666666; } #u6933 { position:absolute; left:2px; top:10px; width:76px; word-wrap:break-word; } #u6934_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6934 { position:absolute; left:629px; top:1006px; width:9px; height:16px; } #u6935 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6936_div { position:absolute; left:0px; top:0px; width:337px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6936 { position:absolute; left:54px; top:1271px; width:337px; height:16px; color:#FF00FF; } #u6937 { position:absolute; left:0px; top:0px; width:337px; white-space:nowrap; } #u6938_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6938 { position:absolute; left:210px; top:129px; width:180px; height:36px; } #u6939 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6940 { position:absolute; left:211px; top:130px; width:177px; height:34px; } #u6940_input { position:absolute; left:0px; top:0px; width:177px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6941_img { position:absolute; left:0px; top:0px; width:12px; height:8px; } #u6941 { position:absolute; left:369px; top:143px; width:12px; height:8px; -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); color:#000000; } #u6942 { position:absolute; left:2px; top:-4px; width:8px; visibility:hidden; word-wrap:break-word; } #u6943_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6943 { position:absolute; left:146px; top:139px; width:57px; height:16px; } #u6944 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6945_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6945 { position:absolute; left:483px; top:129px; width:180px; height:36px; } #u6946 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6947 { position:absolute; left:484px; top:130px; width:177px; height:34px; } #u6947_input { position:absolute; left:0px; top:0px; width:177px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6948_img { position:absolute; left:0px; top:0px; width:15px; height:18px; } #u6948 { position:absolute; left:411px; top:138px; width:15px; height:18px; font-family:'FontAwesome Regular', 'FontAwesome'; font-weight:400; font-style:normal; font-size:18px; text-align:left; } #u6949 { position:absolute; left:0px; top:0px; width:15px; visibility:hidden; word-wrap:break-word; } #u6950_div { position:absolute; left:0px; top:0px; width:197px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6950 { position:absolute; left:54px; top:894px; width:197px; height:16px; color:#FF00FF; } #u6951 { position:absolute; left:0px; top:0px; width:197px; white-space:nowrap; } #u6952_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6952 { position:absolute; left:408px; top:202px; width:57px; height:16px; } #u6953 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6954_div { position:absolute; left:0px; top:0px; width:182px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6954 { position:absolute; left:482px; top:192px; width:182px; height:36px; } #u6955 { position:absolute; left:2px; top:10px; width:178px; visibility:hidden; word-wrap:break-word; } #u6956 { position:absolute; left:484px; top:193px; width:178px; height:34px; } #u6956_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6957_div { position:absolute; left:0px; top:0px; width:15px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6957 { position:absolute; left:675px; top:202px; width:15px; height:16px; } #u6958 { position:absolute; left:0px; top:0px; width:15px; white-space:nowrap; } #u6959_div { position:absolute; left:0px; top:0px; width:182px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6959 { position:absolute; left:701px; top:192px; width:182px; height:36px; } #u6960 { position:absolute; left:2px; top:10px; width:178px; visibility:hidden; word-wrap:break-word; } #u6961 { position:absolute; left:703px; top:193px; width:178px; height:34px; } #u6961_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; }
yicold/axure-case
xinteyao/新特药电商平台_Server端_UE终版xxx_V1/files/p2-5医院管理/styles.css
CSS
apache-2.0
62,114
# Lactarius peckii var. peckii VARIETY #### Status ACCEPTED #### According to Index Fungorum #### Published in Mem. Torrey bot. Club 14: 76 (1908) #### Original name Lactarius peckii var. peckii ### Remarks null
mdoering/backbone
life/Fungi/Basidiomycota/Agaricomycetes/Russulales/Russulaceae/Lactarius/Lactarius peckii/Lactarius peckii peckii/README.md
Markdown
apache-2.0
216
/* * Copyright 2014 Richard Thurston. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.northernwall.hadrian.handlers.service.dao; import com.northernwall.hadrian.domain.Audit; import java.util.LinkedList; import java.util.List; public class GetAuditData { public List<Audit> audits = new LinkedList<>(); }
Jukkorsis/Hadrian
src/main/java/com/northernwall/hadrian/handlers/service/dao/GetAuditData.java
Java
apache-2.0
840
@import url('../../../assets/css/app.css'); @font-face { font-family: 'Muli'; font-style: normal; font-weight: 400; src: local('Muli'), url(../fonts/Muli.woff) format('woff'); } body { background-color: #e7a279; color: #434343; font-family: 'Muli', sans-serif; font-size: 14px; max-width: 800px; padding-bottom: 20px; } q,blockquote { font-family: 'Muli', sans-serif; } a { color: #cf7c4b; text-decoration: underline; } a:hover { color: #cf7c4b; text-decoration: none; } a:visited { color: #cf7c4b; text-decoration: line-through; } h1, h2, h3 { color: #9b6d51; margin: 0; } h3 { margin-top: 5px; margin-bottom: 5px; } header { margin: 0; padding-top: 10px; padding-bottom: 10px; border-left: 1px solid #9b6d51; border-right: 1px solid #9b6d51; border-bottom: 1px solid #9b6d51; background: #434343; } .logo { color: #CCC; } a.logo { margin-left: 8px; } a.logo:hover { color: #000; } header li a { color: #CCC; text-decoration: none; padding-top: 3px; padding-left: 9px; padding-right: 9px; padding-bottom: 3px; } header li a:hover { color: #cf7c4b; text-decoration: underline; } header li { padding-left: 0; } nav .active a { border: 1px solid #9b6d51; -moz-border-radius: 8px; border-radius: 8px; background-color: #e7a279; margin-left: 6px; margin-right: 6px; font-weight: normal; } section.page { background-color: #FFF; border-left: 1px solid #CCC; border-right: 1px solid #CCC; border-bottom: 1px solid #CCC; border-radius: 0px 0px 8px 8px; padding-bottom: 5px; padding-top: 15px; } .page-header { margin-bottom: 15px; } .page-header ul { margin-right: 5px; } .page-header li { margin: 0; padding: 0; padding-right: 5px; } .page-header h2, .page-section h2 { border-bottom: 1px dotted #CCC; font-family: 'Muli', sans-serif; font-size: 20px; font-weight: normal; margin: 0; padding: 6px 10px; } .items article { border: none; border-bottom: 1px dotted #CCC; background-color: inherit; margin-bottom: 0; padding-bottom: 10px; } .items #current-item { border: #9b6d51; } .items article:last-child { border-bottom: none; padding-bottom: 0; } .items a:hover { color: #cf7c4b; } #items-paging { margin-top: 10px; font-size: 100%; } .items .preview { font-family: 'Muli', sans-serif; } form { border: none; padding-left: 10px; } .form-actions { margin-top: 20px; } input[type='email'], input[type='tel'], input[type='password'], input[type='text'], textarea, select { -webkit-border-radius: 4px; border-radius: 4px; border: 1px solid #CCC; margin-top: 3px; padding: 5px; font-family: 'Muli', sans-serif; font-size: 15px; } input[type='email']:focus, input[type='tel']:focus, input[type='password']:focus, input[type='text']:focus, textarea:focus { border: 1px solid #cf7c4b; box-shadow: none; } /* alerts */ .alert { padding: 8px 35px 8px 14px; margin-left: 10px; margin-right: 10px; margin-bottom: 10px; color: #cf7c4b; background-color: #434343; border: 1px solid #cf7c4b; border-radius: 4px; } .alert-success { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-error { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-info { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-normal { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } /* buttons */ .btn { -webkit-appearance: none; appearance: none; display: inline-block; color: #cf7c4b; border: 1px solid #cf7c4b; background: #434343; padding: 5px; padding-left: 15px; padding-right: 15px; font-size: 90%; cursor: pointer; border-radius: 2px; } a.btn { text-decoration: none; font-weight: bold; } .btn-red { border-color: #cf7c4b; background: #434343; color: #cf7c4b; } a.btn-red:hover, .btn-red:hover, .btn-red:focus { color: #cf7c4b; background: #e7a279; } .btn-blue { border-color: #cf7c4b; background: #434343; color: #cf7c4b; } .btn-blue:hover, .btn-blue:focus { border-color: #cf7c4b; background: #e7a279; } .item { padding-bottom: 0; font-family: 'Muli', sans-serif; } .item nav span, .item nav a, .item nav a:visited { color: #cf7c4b; } .item nav.top { margin-bottom: 20px; } #login { border-radius: 8px; } @media only screen and (max-width: 480px) { body { border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding-bottom: 0; } #login-page { border: none; } header { padding: 0; border: none; } header li { background-color: #FFF; } section.page { border: none; border-radius: 0; } .item { padding-bottom: 0; font-family: 'Muli', sans-serif; } }
mat-mo/miniflux_ynh
sources/themes/copper/css/app.css
CSS
apache-2.0
5,154
<?php /** * NewExten listener, will capture extensions as channels step by them. * * PHP Version 5 * * @category AsterTrace * @package EventHandlers * @author Marcelo Gornstein <[email protected]> * @license http://marcelog.github.com/ Apache License 2.0 * @version SVN: $Id$ * @link http://marcelog.github.com/ * * Copyright 2011 Marcelo Gornstein <[email protected]> * * 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. * */ namespace AsterTrace\EventHandlers; class NewExtenListener extends PDOListener { public function onNewexten($event) { $this->executeStatement($this->insertStatement, array( 'uniqueid' => $event->getUniqueId(), 'channel' => $event->getChannel(), 'app' => $event->getApplication(), 'data' => $event->getApplicationData(), 'context' => $event->getContext(), 'priority' => $event->getPriority(), 'exten' => $event->getExtension() )); } }
marcelog/AsterTrace
src/mg/AsterTrace/EventHandlers/NewExtenListener.php
PHP
apache-2.0
1,505