text stringlengths 2 99k | meta dict |
|---|---|
package org.infinispan.tools.store.migrator;
import static org.infinispan.tools.store.migrator.Element.SOURCE;
import java.util.Properties;
import org.infinispan.tools.store.migrator.file.SingleFileStoreReader;
import org.infinispan.tools.store.migrator.file.SoftIndexFileStoreIterator;
import org.infinispan.tools.store.migrator.jdbc.JdbcStoreReader;
import org.infinispan.tools.store.migrator.rocksdb.RocksDBReader;
class StoreIteratorFactory {
static StoreIterator get(Properties properties) {
StoreProperties props = new StoreProperties(SOURCE, properties);
switch (props.storeType()) {
case JDBC_BINARY:
case JDBC_MIXED:
case JDBC_STRING:
return new JdbcStoreReader(props);
case LEVELDB:
case ROCKSDB:
return new RocksDBReader(props);
case SINGLE_FILE_STORE:
return new SingleFileStoreReader(props);
case SOFT_INDEX_FILE_STORE:
return new SoftIndexFileStoreIterator(props);
}
return null;
}
}
| {
"pile_set_name": "Github"
} |
#include "AutosaveJob.h"
#include "control/Control.h"
#include "control/xojfile/SaveHandler.h"
#include "XojMsgBox.h"
#include "filesystem.h"
#include "i18n.h"
AutosaveJob::AutosaveJob(Control* control): control(control) {}
AutosaveJob::~AutosaveJob() = default;
void AutosaveJob::afterRun() {
string msg = FS(_F("Error while autosaving: {1}") % this->error);
g_warning("%s", msg.c_str());
XojMsgBox::showErrorToUser(control->getGtkWindow(), msg);
}
void AutosaveJob::run() {
SaveHandler handler;
control->getUndoRedoHandler()->documentAutosaved();
Document* doc = control->getDocument();
doc->lock();
handler.prepareSave(doc);
auto filepath = doc->getFilepath();
doc->unlock();
if (filepath.empty()) {
filepath = Util::getAutosaveFilepath();
} else {
filepath = filepath.parent_path() / ("." + filepath.filename().string());
}
Util::clearExtensions(filepath);
filepath += ".autosave.xopp";
control->renameLastAutosaveFile();
g_message("%s", FS(_F("Autosaving to {1}") % filepath.string()).c_str());
handler.saveTo(filepath);
this->error = handler.getErrorMessage();
if (!this->error.empty()) {
callAfterRun();
} else {
// control->deleteLastAutosaveFile(filepath);
control->setLastAutosaveFile(filepath);
}
}
auto AutosaveJob::getType() -> JobType { return JOB_TYPE_AUTOSAVE; }
| {
"pile_set_name": "Github"
} |
/*
* MAX8997-haptic controller driver
*
* Copyright (C) 2012 Samsung Electronics
* Donggeun Kim <dg77.kim@samsung.com>
*
* This program is not provided / owned by Maxim Integrated Products.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/pwm.h>
#include <linux/input.h>
#include <linux/mfd/max8997-private.h>
#include <linux/mfd/max8997.h>
#include <linux/regulator/consumer.h>
/* Haptic configuration 2 register */
#define MAX8997_MOTOR_TYPE_SHIFT 7
#define MAX8997_ENABLE_SHIFT 6
#define MAX8997_MODE_SHIFT 5
/* Haptic driver configuration register */
#define MAX8997_CYCLE_SHIFT 6
#define MAX8997_SIG_PERIOD_SHIFT 4
#define MAX8997_SIG_DUTY_SHIFT 2
#define MAX8997_PWM_DUTY_SHIFT 0
struct max8997_haptic {
struct device *dev;
struct i2c_client *client;
struct input_dev *input_dev;
struct regulator *regulator;
struct work_struct work;
struct mutex mutex;
bool enabled;
unsigned int level;
struct pwm_device *pwm;
unsigned int pwm_period;
enum max8997_haptic_pwm_divisor pwm_divisor;
enum max8997_haptic_motor_type type;
enum max8997_haptic_pulse_mode mode;
unsigned int internal_mode_pattern;
unsigned int pattern_cycle;
unsigned int pattern_signal_period;
};
static int max8997_haptic_set_duty_cycle(struct max8997_haptic *chip)
{
int ret = 0;
if (chip->mode == MAX8997_EXTERNAL_MODE) {
unsigned int duty = chip->pwm_period * chip->level / 100;
ret = pwm_config(chip->pwm, duty, chip->pwm_period);
} else {
int i;
u8 duty_index = 0;
for (i = 0; i <= 64; i++) {
if (chip->level <= i * 100 / 64) {
duty_index = i;
break;
}
}
switch (chip->internal_mode_pattern) {
case 0:
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGPWMDC1, duty_index);
break;
case 1:
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGPWMDC2, duty_index);
break;
case 2:
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGPWMDC3, duty_index);
break;
case 3:
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGPWMDC4, duty_index);
break;
default:
break;
}
}
return ret;
}
static void max8997_haptic_configure(struct max8997_haptic *chip)
{
u8 value;
value = chip->type << MAX8997_MOTOR_TYPE_SHIFT |
chip->enabled << MAX8997_ENABLE_SHIFT |
chip->mode << MAX8997_MODE_SHIFT | chip->pwm_divisor;
max8997_write_reg(chip->client, MAX8997_HAPTIC_REG_CONF2, value);
if (chip->mode == MAX8997_INTERNAL_MODE && chip->enabled) {
value = chip->internal_mode_pattern << MAX8997_CYCLE_SHIFT |
chip->internal_mode_pattern << MAX8997_SIG_PERIOD_SHIFT |
chip->internal_mode_pattern << MAX8997_SIG_DUTY_SHIFT |
chip->internal_mode_pattern << MAX8997_PWM_DUTY_SHIFT;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_DRVCONF, value);
switch (chip->internal_mode_pattern) {
case 0:
value = chip->pattern_cycle << 4;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_CYCLECONF1, value);
value = chip->pattern_signal_period;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGCONF1, value);
break;
case 1:
value = chip->pattern_cycle;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_CYCLECONF1, value);
value = chip->pattern_signal_period;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGCONF2, value);
break;
case 2:
value = chip->pattern_cycle << 4;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_CYCLECONF2, value);
value = chip->pattern_signal_period;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGCONF3, value);
break;
case 3:
value = chip->pattern_cycle;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_CYCLECONF2, value);
value = chip->pattern_signal_period;
max8997_write_reg(chip->client,
MAX8997_HAPTIC_REG_SIGCONF4, value);
break;
default:
break;
}
}
}
static void max8997_haptic_enable(struct max8997_haptic *chip)
{
int error;
mutex_lock(&chip->mutex);
error = max8997_haptic_set_duty_cycle(chip);
if (error) {
dev_err(chip->dev, "set_pwm_cycle failed, error: %d\n", error);
goto out;
}
if (!chip->enabled) {
chip->enabled = true;
regulator_enable(chip->regulator);
max8997_haptic_configure(chip);
if (chip->mode == MAX8997_EXTERNAL_MODE)
pwm_enable(chip->pwm);
}
out:
mutex_unlock(&chip->mutex);
}
static void max8997_haptic_disable(struct max8997_haptic *chip)
{
mutex_lock(&chip->mutex);
if (chip->enabled) {
chip->enabled = false;
max8997_haptic_configure(chip);
if (chip->mode == MAX8997_EXTERNAL_MODE)
pwm_disable(chip->pwm);
regulator_disable(chip->regulator);
}
mutex_unlock(&chip->mutex);
}
static void max8997_haptic_play_effect_work(struct work_struct *work)
{
struct max8997_haptic *chip =
container_of(work, struct max8997_haptic, work);
if (chip->level)
max8997_haptic_enable(chip);
else
max8997_haptic_disable(chip);
}
static int max8997_haptic_play_effect(struct input_dev *dev, void *data,
struct ff_effect *effect)
{
struct max8997_haptic *chip = input_get_drvdata(dev);
chip->level = effect->u.rumble.strong_magnitude;
if (!chip->level)
chip->level = effect->u.rumble.weak_magnitude;
schedule_work(&chip->work);
return 0;
}
static void max8997_haptic_close(struct input_dev *dev)
{
struct max8997_haptic *chip = input_get_drvdata(dev);
cancel_work_sync(&chip->work);
max8997_haptic_disable(chip);
}
static int max8997_haptic_probe(struct platform_device *pdev)
{
struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
const struct max8997_platform_data *pdata =
dev_get_platdata(iodev->dev);
const struct max8997_haptic_platform_data *haptic_pdata =
pdata->haptic_pdata;
struct max8997_haptic *chip;
struct input_dev *input_dev;
int error;
if (!haptic_pdata) {
dev_err(&pdev->dev, "no haptic platform data\n");
return -EINVAL;
}
chip = kzalloc(sizeof(struct max8997_haptic), GFP_KERNEL);
input_dev = input_allocate_device();
if (!chip || !input_dev) {
dev_err(&pdev->dev, "unable to allocate memory\n");
error = -ENOMEM;
goto err_free_mem;
}
INIT_WORK(&chip->work, max8997_haptic_play_effect_work);
mutex_init(&chip->mutex);
chip->client = iodev->haptic;
chip->dev = &pdev->dev;
chip->input_dev = input_dev;
chip->pwm_period = haptic_pdata->pwm_period;
chip->type = haptic_pdata->type;
chip->mode = haptic_pdata->mode;
chip->pwm_divisor = haptic_pdata->pwm_divisor;
switch (chip->mode) {
case MAX8997_INTERNAL_MODE:
chip->internal_mode_pattern =
haptic_pdata->internal_mode_pattern;
chip->pattern_cycle = haptic_pdata->pattern_cycle;
chip->pattern_signal_period =
haptic_pdata->pattern_signal_period;
break;
case MAX8997_EXTERNAL_MODE:
chip->pwm = pwm_request(haptic_pdata->pwm_channel_id,
"max8997-haptic");
if (IS_ERR(chip->pwm)) {
error = PTR_ERR(chip->pwm);
dev_err(&pdev->dev,
"unable to request PWM for haptic, error: %d\n",
error);
goto err_free_mem;
}
break;
default:
dev_err(&pdev->dev,
"Invalid chip mode specified (%d)\n", chip->mode);
error = -EINVAL;
goto err_free_mem;
}
chip->regulator = regulator_get(&pdev->dev, "inmotor");
if (IS_ERR(chip->regulator)) {
error = PTR_ERR(chip->regulator);
dev_err(&pdev->dev,
"unable to get regulator, error: %d\n",
error);
goto err_free_pwm;
}
input_dev->name = "max8997-haptic";
input_dev->id.version = 1;
input_dev->dev.parent = &pdev->dev;
input_dev->close = max8997_haptic_close;
input_set_drvdata(input_dev, chip);
input_set_capability(input_dev, EV_FF, FF_RUMBLE);
error = input_ff_create_memless(input_dev, NULL,
max8997_haptic_play_effect);
if (error) {
dev_err(&pdev->dev,
"unable to create FF device, error: %d\n",
error);
goto err_put_regulator;
}
error = input_register_device(input_dev);
if (error) {
dev_err(&pdev->dev,
"unable to register input device, error: %d\n",
error);
goto err_destroy_ff;
}
platform_set_drvdata(pdev, chip);
return 0;
err_destroy_ff:
input_ff_destroy(input_dev);
err_put_regulator:
regulator_put(chip->regulator);
err_free_pwm:
if (chip->mode == MAX8997_EXTERNAL_MODE)
pwm_free(chip->pwm);
err_free_mem:
input_free_device(input_dev);
kfree(chip);
return error;
}
static int max8997_haptic_remove(struct platform_device *pdev)
{
struct max8997_haptic *chip = platform_get_drvdata(pdev);
input_unregister_device(chip->input_dev);
regulator_put(chip->regulator);
if (chip->mode == MAX8997_EXTERNAL_MODE)
pwm_free(chip->pwm);
kfree(chip);
return 0;
}
#ifdef CONFIG_PM_SLEEP
static int max8997_haptic_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct max8997_haptic *chip = platform_get_drvdata(pdev);
max8997_haptic_disable(chip);
return 0;
}
#endif
static SIMPLE_DEV_PM_OPS(max8997_haptic_pm_ops, max8997_haptic_suspend, NULL);
static const struct platform_device_id max8997_haptic_id[] = {
{ "max8997-haptic", 0 },
{ },
};
MODULE_DEVICE_TABLE(i2c, max8997_haptic_id);
static struct platform_driver max8997_haptic_driver = {
.driver = {
.name = "max8997-haptic",
.owner = THIS_MODULE,
.pm = &max8997_haptic_pm_ops,
},
.probe = max8997_haptic_probe,
.remove = max8997_haptic_remove,
.id_table = max8997_haptic_id,
};
module_platform_driver(max8997_haptic_driver);
MODULE_ALIAS("platform:max8997-haptic");
MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>");
MODULE_DESCRIPTION("max8997_haptic driver");
MODULE_LICENSE("GPL");
| {
"pile_set_name": "Github"
} |
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o
obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o
obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o
obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o
obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o
obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o
obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o
obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
| {
"pile_set_name": "Github"
} |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package com.google.protobuf;
import protobuf_unittest.UnittestProto.TestAllTypes;
import protobuf_unittest.UnittestProto.TestAllTypesOrBuilder;
import junit.framework.TestCase;
import java.util.Collections;
import java.util.List;
/**
* Tests for {@link RepeatedFieldBuilder}. This tests basic functionality.
* More extensive testing is provided via other tests that exercise the
* builder.
*
* @author jonp@google.com (Jon Perlow)
*/
public class RepeatedFieldBuilderTest extends TestCase {
public void testBasicUse() {
TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent();
RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder> builder = newRepeatedFieldBuilder(mockParent);
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build());
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build());
assertEquals(0, builder.getMessage(0).getOptionalInt32());
assertEquals(1, builder.getMessage(1).getOptionalInt32());
List<TestAllTypes> list = builder.build();
assertEquals(2, list.size());
assertEquals(0, list.get(0).getOptionalInt32());
assertEquals(1, list.get(1).getOptionalInt32());
assertIsUnmodifiable(list);
// Make sure it doesn't change.
List<TestAllTypes> list2 = builder.build();
assertSame(list, list2);
assertEquals(0, mockParent.getInvalidationCount());
}
public void testGoingBackAndForth() {
TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent();
RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder> builder = newRepeatedFieldBuilder(mockParent);
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build());
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build());
assertEquals(0, builder.getMessage(0).getOptionalInt32());
assertEquals(1, builder.getMessage(1).getOptionalInt32());
// Convert to list
List<TestAllTypes> list = builder.build();
assertEquals(2, list.size());
assertEquals(0, list.get(0).getOptionalInt32());
assertEquals(1, list.get(1).getOptionalInt32());
assertIsUnmodifiable(list);
// Update 0th item
assertEquals(0, mockParent.getInvalidationCount());
builder.getBuilder(0).setOptionalString("foo");
assertEquals(1, mockParent.getInvalidationCount());
list = builder.build();
assertEquals(2, list.size());
assertEquals(0, list.get(0).getOptionalInt32());
assertEquals("foo", list.get(0).getOptionalString());
assertEquals(1, list.get(1).getOptionalInt32());
assertIsUnmodifiable(list);
assertEquals(1, mockParent.getInvalidationCount());
}
public void testVariousMethods() {
TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent();
RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder> builder = newRepeatedFieldBuilder(mockParent);
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build());
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(2).build());
builder.addBuilder(0, TestAllTypes.getDefaultInstance())
.setOptionalInt32(0);
builder.addBuilder(TestAllTypes.getDefaultInstance()).setOptionalInt32(3);
assertEquals(0, builder.getMessage(0).getOptionalInt32());
assertEquals(1, builder.getMessage(1).getOptionalInt32());
assertEquals(2, builder.getMessage(2).getOptionalInt32());
assertEquals(3, builder.getMessage(3).getOptionalInt32());
assertEquals(0, mockParent.getInvalidationCount());
List<TestAllTypes> messages = builder.build();
assertEquals(4, messages.size());
assertSame(messages, builder.build()); // expect same list
// Remove a message.
builder.remove(2);
assertEquals(1, mockParent.getInvalidationCount());
assertEquals(3, builder.getCount());
assertEquals(0, builder.getMessage(0).getOptionalInt32());
assertEquals(1, builder.getMessage(1).getOptionalInt32());
assertEquals(3, builder.getMessage(2).getOptionalInt32());
// Remove a builder.
builder.remove(0);
assertEquals(1, mockParent.getInvalidationCount());
assertEquals(2, builder.getCount());
assertEquals(1, builder.getMessage(0).getOptionalInt32());
assertEquals(3, builder.getMessage(1).getOptionalInt32());
// Test clear.
builder.clear();
assertEquals(1, mockParent.getInvalidationCount());
assertEquals(0, builder.getCount());
assertTrue(builder.isEmpty());
}
public void testLists() {
TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent();
RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder> builder = newRepeatedFieldBuilder(mockParent);
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build());
builder.addMessage(0,
TestAllTypes.newBuilder().setOptionalInt32(0).build());
assertEquals(0, builder.getMessage(0).getOptionalInt32());
assertEquals(1, builder.getMessage(1).getOptionalInt32());
// Use list of builders.
List<TestAllTypes.Builder> builders = builder.getBuilderList();
assertEquals(0, builders.get(0).getOptionalInt32());
assertEquals(1, builders.get(1).getOptionalInt32());
builders.get(0).setOptionalInt32(10);
builders.get(1).setOptionalInt32(11);
// Use list of protos
List<TestAllTypes> protos = builder.getMessageList();
assertEquals(10, protos.get(0).getOptionalInt32());
assertEquals(11, protos.get(1).getOptionalInt32());
// Add an item to the builders and verify it's updated in both
builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(12).build());
assertEquals(3, builders.size());
assertEquals(3, protos.size());
}
private void assertIsUnmodifiable(List<?> list) {
if (list == Collections.emptyList()) {
// OKAY -- Need to check this b/c EmptyList allows you to call clear.
} else {
try {
list.clear();
fail("List wasn't immutable");
} catch (UnsupportedOperationException e) {
// good
}
}
}
private RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder>
newRepeatedFieldBuilder(GeneratedMessage.BuilderParent parent) {
return new RepeatedFieldBuilder<TestAllTypes, TestAllTypes.Builder,
TestAllTypesOrBuilder>(Collections.<TestAllTypes>emptyList(), false,
parent, false);
}
}
| {
"pile_set_name": "Github"
} |
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>BotProviderBase.botDefinition - tock</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">tock</a> / <a href="../index.html">ai.tock.bot.definition</a> / <a href="index.html">BotProviderBase</a> / <a href="./bot-definition.html">botDefinition</a><br/>
<br/>
<h1>botDefinition</h1>
<a name="ai.tock.bot.definition.BotProviderBase$botDefinition()"></a>
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">botDefinition</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="../-bot-definition/index.html"><span class="identifier">BotDefinition</span></a></code> <a href="https://github.com/theopenconversationkit/tock/blob/master/bot/engine/src/main/kotlin/definition/BotProviderBase.kt#L24">(source)</a>
<p>Provides the bot definition.</p>
<a name="ai.tock.bot.definition.BotProviderBase$botDefinition"></a>
<code><span class="keyword">val </span><span class="identifier">botDefinition</span><span class="symbol">: </span><a href="../-bot-definition/index.html"><span class="identifier">BotDefinition</span></a></code> <a href="https://github.com/theopenconversationkit/tock/blob/master/bot/engine/src/main/kotlin/definition/BotProviderBase.kt#L22">(source)</a>
</BODY>
</HTML>
| {
"pile_set_name": "Github"
} |
# Copyright 2019 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""This example handles rich error status in client-side."""
from __future__ import print_function
import logging
import grpc
from grpc_status import rpc_status
from google.rpc import error_details_pb2
from examples import helloworld_pb2
from examples import helloworld_pb2_grpc
_LOGGER = logging.getLogger(__name__)
def process(stub):
try:
response = stub.SayHello(helloworld_pb2.HelloRequest(name='Alice'))
_LOGGER.info('Call success: %s', response.message)
except grpc.RpcError as rpc_error:
_LOGGER.error('Call failure: %s', rpc_error)
status = rpc_status.from_call(rpc_error)
for detail in status.details:
if detail.Is(error_details_pb2.QuotaFailure.DESCRIPTOR):
info = error_details_pb2.QuotaFailure()
detail.Unpack(info)
_LOGGER.error('Quota failure: %s', info)
else:
raise RuntimeError('Unexpected failure: %s' % detail)
def main():
# NOTE(gRPC Python Team): .close() is possible on a channel and should be
# used in circumstances in which the with statement does not fit the needs
# of the code.
with grpc.insecure_channel('localhost:50051') as channel:
stub = helloworld_pb2_grpc.GreeterStub(channel)
process(stub)
if __name__ == '__main__':
logging.basicConfig()
main()
| {
"pile_set_name": "Github"
} |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Khmer language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['km'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'កូត',
newPage : 'ទំព័រថ្មី',
save : 'រក្សាទុក',
preview : 'មើលសាកល្បង',
cut : 'កាត់យក',
copy : 'ចំលងយក',
paste : 'ចំលងដាក់',
print : 'បោះពុម្ភ',
underline : 'ដិតបន្ទាត់ពីក្រោមអក្សរ',
bold : 'អក្សរដិតធំ',
italic : 'អក្សរផ្តេក',
selectAll : 'ជ្រើសរើសទាំងអស់',
removeFormat : 'លប់ចោល ការរចនា',
strike : 'ដិតបន្ទាត់ពាក់កណ្តាលអក្សរ',
subscript : 'អក្សរតូចក្រោម',
superscript : 'អក្សរតូចលើ',
horizontalrule : 'បន្ថែមបន្ទាត់ផ្តេក',
pagebreak : 'បន្ថែម ការផ្តាច់ទំព័រ',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'លប់ឈ្នាប់',
undo : 'សារឡើងវិញ',
redo : 'ធ្វើឡើងវិញ',
// Common messages and labels.
common :
{
browseServer : 'មើល',
url : 'URL',
protocol : 'ប្រូតូកូល',
upload : 'ទាញយក',
uploadSubmit : 'បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា',
image : 'រូបភាព',
flash : 'Flash',
form : 'បែបបទ',
checkbox : 'ប្រអប់ជ្រើសរើស',
radio : 'ប៉ូតុនរង្វង់មូល',
textField : 'ជួរសរសេរអត្ថបទ',
textarea : 'តំបន់សរសេរអត្ថបទ',
hiddenField : 'ជួរលាក់',
button : 'ប៉ូតុន',
select : 'ជួរជ្រើសរើស',
imageButton : 'ប៉ូតុនរូបភាព',
notSet : '<មិនមែន>',
id : 'Id',
name : 'ឈ្មោះ',
langDir : 'ទិសដៅភាសា',
langDirLtr : 'ពីឆ្វេងទៅស្តាំ(LTR)',
langDirRtl : 'ពីស្តាំទៅឆ្វេង(RTL)',
langCode : 'លេខកូតភាសា',
longDescr : 'អធិប្បាយ URL វែង',
cssClass : 'Stylesheet Classes',
advisoryTitle : 'ចំណងជើង ប្រឹក្សា',
cssStyle : 'ម៉ូត',
ok : 'យល់ព្រម',
cancel : 'មិនយល់ព្រម',
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'General', // MISSING
advancedTab : 'កំរិតខ្ពស់',
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'ទទឹង',
height : 'កំពស់',
align : 'កំណត់ទីតាំង',
alignLeft : 'ខាងឆ្វង',
alignRight : 'ខាងស្តាំ',
alignCenter : 'កណ្តាល',
alignTop : 'ខាងលើ',
alignMiddle : 'កណ្តាល',
alignBottom : 'ខាងក្រោម',
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'បន្ថែមអក្សរពិសេស',
title : 'តូអក្សរពិសេស',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'បន្ថែម/កែប្រែ ឈ្នាប់',
other : '<other>', // MISSING
menu : 'កែប្រែឈ្នាប់',
title : 'ឈ្នាប់',
info : 'ពត៌មានអំពីឈ្នាប់',
target : 'គោលដៅ',
upload : 'ទាញយក',
advanced : 'កំរិតខ្ពស់',
type : 'ប្រភេទឈ្នាប់',
toUrl : 'URL', // MISSING
toAnchor : 'យុថ្កានៅក្នុងទំព័រនេះ',
toEmail : 'អ៊ីមែល',
targetFrame : '<ហ្វ្រេម>',
targetPopup : '<វីនដូវ លោត>',
targetFrameName : 'ឈ្មោះហ្រ្វេមដែលជាគោលដៅ',
targetPopupName : 'ឈ្មោះវីនដូវលោត',
popupFeatures : 'លក្ខណះរបស់វីនដូលលោត',
popupResizable : 'Resizable', // MISSING
popupStatusBar : 'របា ពត៌មាន',
popupLocationBar: 'របា ទីតាំង',
popupToolbar : 'របា ឩបករណ៍',
popupMenuBar : 'របា មឺនុយ',
popupFullScreen : 'អេក្រុងពេញ(IE)',
popupScrollBars : 'របា ទាញ',
popupDependent : 'អាស្រ័យលើ (Netscape)',
popupLeft : 'ទីតាំងខាងឆ្វេង',
popupTop : 'ទីតាំងខាងលើ',
id : 'Id', // MISSING
langDir : 'ទិសដៅភាសា',
langDirLTR : 'ពីឆ្វេងទៅស្តាំ(LTR)',
langDirRTL : 'ពីស្តាំទៅឆ្វេង(RTL)',
acccessKey : 'ឃី សំរាប់ចូល',
name : 'ឈ្មោះ',
langCode : 'ទិសដៅភាសា',
tabIndex : 'លេខ Tab',
advisoryTitle : 'ចំណងជើង ប្រឹក្សា',
advisoryContentType : 'ប្រភេទអត្ថបទ ប្រឹក្សា',
cssClasses : 'Stylesheet Classes',
charset : 'លេខកូតអក្សររបស់ឈ្នាប់',
styles : 'ម៉ូត',
rel : 'Relationship', // MISSING
selectAnchor : 'ជ្រើសរើសយុថ្កា',
anchorName : 'តាមឈ្មោះរបស់យុថ្កា',
anchorId : 'តាម Id',
emailAddress : 'អ៊ីមែល',
emailSubject : 'ចំណងជើងអត្ថបទ',
emailBody : 'អត្ថបទ',
noAnchors : '(No anchors available in the document)', // MISSING
noUrl : 'សូមសរសេរ អាស័យដ្ឋាន URL',
noEmail : 'សូមសរសេរ អាស័យដ្ឋាន អ៊ីមែល'
},
// Anchor dialog
anchor :
{
toolbar : 'បន្ថែម/កែប្រែ យុថ្កា',
menu : 'ការកំណត់យុថ្កា',
title : 'ការកំណត់យុថ្កា',
name : 'ឈ្មោះយុទ្ធថ្កា',
errorName : 'សូមសរសេរ ឈ្មោះយុទ្ធថ្កា',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace', // MISSING
find : 'ស្វែងរក',
replace : 'ជំនួស',
findWhat : 'ស្វែងរកអ្វី:',
replaceWith : 'ជំនួសជាមួយ:',
notFoundMsg : 'ពាក្យនេះ រកមិនឃើញទេ ។',
findOptions : 'Find Options', // MISSING
matchCase : 'ករណ៉ត្រូវរក',
matchWord : 'ត្រូវពាក្យទាំងអស់',
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'ជំនួសទាំងអស់',
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'តារាង',
title : 'ការកំណត់ តារាង',
menu : 'ការកំណត់ តារាង',
deleteTable : 'លប់តារាង',
rows : 'ជួរផ្តេក',
columns : 'ជួរឈរ',
border : 'ទំហំស៊ុម',
widthPx : 'ភីកសែល',
widthPc : 'ភាគរយ',
widthUnit : 'width unit', // MISSING
cellSpace : 'គំលាតសែល',
cellPad : 'គែមសែល',
caption : 'ចំណងជើង',
summary : 'សេចក្តីសង្ខេប',
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Cell', // MISSING
insertBefore : 'Insert Cell Before', // MISSING
insertAfter : 'Insert Cell After', // MISSING
deleteCell : 'លប់សែល',
merge : 'បញ្ជូលសែល',
mergeRight : 'Merge Right', // MISSING
mergeDown : 'Merge Down', // MISSING
splitHorizontal : 'Split Cell Horizontally', // MISSING
splitVertical : 'Split Cell Vertically', // MISSING
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Row', // MISSING
insertBefore : 'Insert Row Before', // MISSING
insertAfter : 'Insert Row After', // MISSING
deleteRow : 'លប់ជួរផ្តេក'
},
column :
{
menu : 'Column', // MISSING
insertBefore : 'Insert Column Before', // MISSING
insertAfter : 'Insert Column After', // MISSING
deleteColumn : 'លប់ជួរឈរ'
}
},
// Button Dialog.
button :
{
title : 'ការកំណត់ ប៉ូតុន',
text : 'អត្ថបទ(តំលៃ)',
type : 'ប្រភេទ',
typeBtn : 'Button', // MISSING
typeSbm : 'Submit', // MISSING
typeRst : 'Reset' // MISSING
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'ការកំណត់ប្រអប់ជ្រើសរើស',
radioTitle : 'ការកំណត់ប៉ូតុនរង្វង់',
value : 'តំលៃ',
selected : 'បានជ្រើសរើស'
},
// Form Dialog.
form :
{
title : 'ការកំណត់បែបបទ',
menu : 'ការកំណត់បែបបទ',
action : 'សកម្មភាព',
method : 'វិធី',
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'ការកំណត់ជួរជ្រើសរើស',
selectInfo : 'ពត៌មាន',
opAvail : 'ការកំណត់ជ្រើសរើស ដែលអាចកំណត់បាន',
value : 'តំលៃ',
size : 'ទំហំ',
lines : 'បន្ទាត់',
chkMulti : 'អនុញ្ញាតអោយជ្រើសរើសច្រើន',
opText : 'ពាក្យ',
opValue : 'តំលៃ',
btnAdd : 'បន្ថែម',
btnModify : 'ផ្លាស់ប្តូរ',
btnUp : 'លើ',
btnDown : 'ក្រោម',
btnSetValue : 'Set as selected value', // MISSING
btnDelete : 'លប់'
},
// Textarea Dialog.
textarea :
{
title : 'ការកំណត់កន្លែងសរសេរអត្ថបទ',
cols : 'ជូរឈរ',
rows : 'ជូរផ្តេក'
},
// Text Field Dialog.
textfield :
{
title : 'ការកំណត់ជួរអត្ថបទ',
name : 'ឈ្មោះ',
value : 'តំលៃ',
charWidth : 'ទទឹង អក្សរ',
maxChars : 'អក្សរអតិបរិមា',
type : 'ប្រភេទ',
typeText : 'ពាក្យ',
typePass : 'ពាក្យសំងាត់'
},
// Hidden Field Dialog.
hidden :
{
title : 'ការកំណត់ជួរលាក់',
name : 'ឈ្មោះ',
value : 'តំលៃ'
},
// Image Dialog.
image :
{
title : 'ការកំណត់រូបភាព',
titleButton : 'ការកំណត់ប៉ូតុនរូបភាព',
menu : 'ការកំណត់រូបភាព',
infoTab : 'ពត៌មានអំពីរូបភាព',
btnUpload : 'បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា',
upload : 'ទាញយក',
alt : 'អត្ថបទជំនួស',
lockRatio : 'អត្រាឡុក',
resetSize : 'កំណត់ទំហំឡើងវិញ',
border : 'ស៊ុម',
hSpace : 'គំលាតទទឹង',
vSpace : 'គំលាតបណ្តោយ',
alertUrl : 'សូមសរសេរងាស័យដ្ឋានរបស់រូបភាព',
linkTab : 'ឈ្នាប់',
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'ការកំណត់ Flash',
propertiesTab : 'Properties', // MISSING
title : 'ការកំណត់ Flash',
chkPlay : 'លេងដោយស្វ័យប្រវត្ត',
chkLoop : 'ចំនួនដង',
chkMenu : 'បង្ហាញ មឺនុយរបស់ Flash',
chkFull : 'Allow Fullscreen', // MISSING
scale : 'ទំហំ',
scaleAll : 'បង្ហាញទាំងអស់',
scaleNoBorder : 'មិនបង្ហាញស៊ុម',
scaleFit : 'ត្រូវល្មម',
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs Bottom', // MISSING
alignAbsMiddle : 'Abs Middle', // MISSING
alignBaseline : 'បន្ទាត់ជាមូលដ្ឋាន',
alignTextTop : 'លើអត្ថបទ',
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'ពណ៌ផ្ទៃខាងក្រោយ',
hSpace : 'គំលាតទទឹង',
vSpace : 'គំលាតបណ្តោយ',
validateSrc : 'សូមសរសេរ អាស័យដ្ឋាន URL',
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'ពិនិត្យអក្ខរាវិរុទ្ធ',
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'គ្មានក្នុងវចនានុក្រម',
changeTo : 'ផ្លាស់ប្តូរទៅ',
btnIgnore : 'មិនផ្លាស់ប្តូរ',
btnIgnoreAll : 'មិនផ្លាស់ប្តូរ ទាំងអស់',
btnReplace : 'ជំនួស',
btnReplaceAll : 'ជំនួសទាំងអស់',
btnUndo : 'សារឡើងវិញ',
noSuggestions : '- គ្មានសំណើរ -',
progress : 'កំពុងពិនិត្យអក្ខរាវិរុទ្ធ...',
noMispell : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: គ្មានកំហុស',
noChanges : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពុំមានផ្លាស់ប្តូរ',
oneChange : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពាក្យមួយត្រូចបានផ្លាស់ប្តូរ',
manyChanges : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: %1 ពាក្យបានផ្លាស់ប្តូរ',
ieSpellDownload : 'ពុំមានកម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធ ។ តើចង់ទាញយកពីណា?'
},
smiley :
{
toolbar : 'រូបភាព',
title : 'បញ្ជូលរូបភាព',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'បញ្ជីជាអក្សរ',
bulletedlist : 'បញ្ជីជារង្វង់មូល',
indent : 'បន្ថែមការចូលបន្ទាត់',
outdent : 'បន្ថយការចូលបន្ទាត់',
justify :
{
left : 'តំរឹមឆ្វេង',
center : 'តំរឹមកណ្តាល',
right : 'តំរឹមស្តាំ',
block : 'តំរឹមសងខាង'
},
blockquote : 'Block Quote', // MISSING
clipboard :
{
title : 'ចំលងដាក់',
cutError : 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ\u200bមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ កាត់អត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+X) ។',
copyError : 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ\u200bមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ ចំលងអត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+C)។',
pasteMsg : 'សូមចំលងអត្ថបទទៅដាក់ក្នុងប្រអប់ដូចខាងក្រោមដោយប្រើប្រាស់ ឃី \u200b(<STRONG>Ctrl/Cmd+V</STRONG>) ហើយចុច <STRONG>OK</STRONG> ។',
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'ចំលងដាក់ពី Word',
title : 'ចំលងដាក់ពី Word',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'ចំលងដាក់អត្ថបទធម្មតា',
title : 'ចំលងដាក់អត្ថបទធម្មតា'
},
templates :
{
button : 'ឯកសារគំរូ',
title : 'ឯកសារគំរូ របស់អត្ថន័យ',
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents', // MISSING
selectPromptMsg : 'សូមជ្រើសរើសឯកសារគំរូ ដើម្បីបើកនៅក្នុងកម្មវិធីតាក់តែងអត្ថបទ<br>(អត្ថបទនឹងបាត់បង់):',
emptyListMsg : '(ពុំមានឯកសារគំរូត្រូវបានកំណត់)'
},
showBlocks : 'Show Blocks', // MISSING
stylesCombo :
{
label : 'ម៉ូត',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'រចនា',
panelTitle : 'រចនា',
tag_p : 'Normal',
tag_pre : 'Formatted',
tag_address : 'Address',
tag_h1 : 'Heading 1',
tag_h2 : 'Heading 2',
tag_h3 : 'Heading 3',
tag_h4 : 'Heading 4',
tag_h5 : 'Heading 5',
tag_h6 : 'Heading 6',
tag_div : 'Normal (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'ហ្វុង',
voiceLabel : 'Font', // MISSING
panelTitle : 'ហ្វុង'
},
fontSize :
{
label : 'ទំហំ',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'ទំហំ'
},
colorButton :
{
textColorTitle : 'ពណ៌អក្សរ',
bgColorTitle : 'ពណ៌ផ្ទៃខាងក្រោយ',
panelTitle : 'Colors', // MISSING
auto : 'ស្វ័យប្រវត្ត',
more : 'ពណ៌ផ្សេងទៀត..'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximize', // MISSING
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'ការកំណត់ ឯកសារ',
title : 'ការកំណត់ ឯកសារ',
design : 'Design', // MISSING
meta : 'ទិន្នន័យមេ',
chooseColor : 'Choose', // MISSING
other : '<other>',
docTitle : 'ចំណងជើងទំព័រ',
charset : 'កំណត់លេខកូតភាសា',
charsetOther : 'កំណត់លេខកូតភាសាផ្សេងទៀត',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'ប្រភេទក្បាលទំព័រ',
docTypeOther : 'ប្រភេទក្បាលទំព័រផ្សេងទៀត',
xhtmlDec : 'បញ្ជូល XHTML',
bgColor : 'ពណ៌ខាងក្រោម',
bgImage : 'URL របស់រូបភាពខាងក្រោម',
bgFixed : 'ទំព័រក្រោមមិនប្តូរ',
txtColor : 'ពណ៌អក្សរ',
margin : 'ស៊ុមទំព័រ',
marginTop : 'លើ',
marginLeft : 'ឆ្វេង',
marginRight : 'ស្ដាំ',
marginBottom : 'ក្រោម',
metaKeywords : 'ពាក្យនៅក្នុងឯកសារ (ផ្តាច់ពីគ្នាដោយក្បៀស)',
metaDescription : 'សេចក្តីអត្ថាធិប្បាយអំពីឯកសារ',
metaAuthor : 'អ្នកនិពន្ធ',
metaCopyright : 'រក្សាសិទ្ធិ៏',
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| {
"pile_set_name": "Github"
} |
/*(function () {
})();*/ | {
"pile_set_name": "Github"
} |
// included by json_value.cpp
// everything is within Json namespace
// //////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////
// class ValueInternalArray
// //////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////
ValueArrayAllocator::~ValueArrayAllocator()
{
}
// //////////////////////////////////////////////////////////////////
// class DefaultValueArrayAllocator
// //////////////////////////////////////////////////////////////////
#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
class DefaultValueArrayAllocator : public ValueArrayAllocator
{
public: // overridden from ValueArrayAllocator
virtual ~DefaultValueArrayAllocator()
{
}
virtual ValueInternalArray *newArray()
{
return new ValueInternalArray();
}
virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
{
return new ValueInternalArray( other );
}
virtual void destructArray( ValueInternalArray *array )
{
delete array;
}
virtual void reallocateArrayPageIndex( Value **&indexes,
ValueInternalArray::PageIndex &indexCount,
ValueInternalArray::PageIndex minNewIndexCount )
{
ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
if ( minNewIndexCount > newIndexCount )
newIndexCount = minNewIndexCount;
void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
if ( !newIndexes )
throw std::bad_alloc();
indexCount = newIndexCount;
indexes = static_cast<Value **>( newIndexes );
}
virtual void releaseArrayPageIndex( Value **indexes,
ValueInternalArray::PageIndex indexCount )
{
if ( indexes )
free( indexes );
}
virtual Value *allocateArrayPage()
{
return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
}
virtual void releaseArrayPage( Value *value )
{
if ( value )
free( value );
}
};
#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
/// @todo make this thread-safe (lock when accessign batch allocator)
class DefaultValueArrayAllocator : public ValueArrayAllocator
{
public: // overridden from ValueArrayAllocator
virtual ~DefaultValueArrayAllocator()
{
}
virtual ValueInternalArray *newArray()
{
ValueInternalArray *array = arraysAllocator_.allocate();
new (array) ValueInternalArray(); // placement new
return array;
}
virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
{
ValueInternalArray *array = arraysAllocator_.allocate();
new (array) ValueInternalArray( other ); // placement new
return array;
}
virtual void destructArray( ValueInternalArray *array )
{
if ( array )
{
array->~ValueInternalArray();
arraysAllocator_.release( array );
}
}
virtual void reallocateArrayPageIndex( Value **&indexes,
ValueInternalArray::PageIndex &indexCount,
ValueInternalArray::PageIndex minNewIndexCount )
{
ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
if ( minNewIndexCount > newIndexCount )
newIndexCount = minNewIndexCount;
void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
if ( !newIndexes )
throw std::bad_alloc();
indexCount = newIndexCount;
indexes = static_cast<Value **>( newIndexes );
}
virtual void releaseArrayPageIndex( Value **indexes,
ValueInternalArray::PageIndex indexCount )
{
if ( indexes )
free( indexes );
}
virtual Value *allocateArrayPage()
{
return static_cast<Value *>( pagesAllocator_.allocate() );
}
virtual void releaseArrayPage( Value *value )
{
if ( value )
pagesAllocator_.release( value );
}
private:
BatchAllocator<ValueInternalArray,1> arraysAllocator_;
BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
};
#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
static ValueArrayAllocator *&arrayAllocator()
{
static DefaultValueArrayAllocator defaultAllocator;
static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
return arrayAllocator;
}
static struct DummyArrayAllocatorInitializer {
DummyArrayAllocatorInitializer()
{
arrayAllocator(); // ensure arrayAllocator() statics are initialized before main().
}
} dummyArrayAllocatorInitializer;
// //////////////////////////////////////////////////////////////////
// class ValueInternalArray
// //////////////////////////////////////////////////////////////////
bool
ValueInternalArray::equals( const IteratorState &x,
const IteratorState &other )
{
return x.array_ == other.array_
&& x.currentItemIndex_ == other.currentItemIndex_
&& x.currentPageIndex_ == other.currentPageIndex_;
}
void
ValueInternalArray::increment( IteratorState &it )
{
JSON_ASSERT_MESSAGE( it.array_ &&
(it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
!= it.array_->size_,
"ValueInternalArray::increment(): moving iterator beyond end" );
++(it.currentItemIndex_);
if ( it.currentItemIndex_ == itemsPerPage )
{
it.currentItemIndex_ = 0;
++(it.currentPageIndex_);
}
}
void
ValueInternalArray::decrement( IteratorState &it )
{
JSON_ASSERT_MESSAGE( it.array_ && it.currentPageIndex_ == it.array_->pages_
&& it.currentItemIndex_ == 0,
"ValueInternalArray::decrement(): moving iterator beyond end" );
if ( it.currentItemIndex_ == 0 )
{
it.currentItemIndex_ = itemsPerPage-1;
--(it.currentPageIndex_);
}
else
{
--(it.currentItemIndex_);
}
}
Value &
ValueInternalArray::unsafeDereference( const IteratorState &it )
{
return (*(it.currentPageIndex_))[it.currentItemIndex_];
}
Value &
ValueInternalArray::dereference( const IteratorState &it )
{
JSON_ASSERT_MESSAGE( it.array_ &&
(it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
< it.array_->size_,
"ValueInternalArray::dereference(): dereferencing invalid iterator" );
return unsafeDereference( it );
}
void
ValueInternalArray::makeBeginIterator( IteratorState &it ) const
{
it.array_ = const_cast<ValueInternalArray *>( this );
it.currentItemIndex_ = 0;
it.currentPageIndex_ = pages_;
}
void
ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
{
it.array_ = const_cast<ValueInternalArray *>( this );
it.currentItemIndex_ = index % itemsPerPage;
it.currentPageIndex_ = pages_ + index / itemsPerPage;
}
void
ValueInternalArray::makeEndIterator( IteratorState &it ) const
{
makeIterator( it, size_ );
}
ValueInternalArray::ValueInternalArray()
: pages_( 0 )
, size_( 0 )
, pageCount_( 0 )
{
}
ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
: pages_( 0 )
, pageCount_( 0 )
, size_( other.size_ )
{
PageIndex minNewPages = other.size_ / itemsPerPage;
arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages,
"ValueInternalArray::reserve(): bad reallocation" );
IteratorState itOther;
other.makeBeginIterator( itOther );
Value *value;
for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
{
if ( index % itemsPerPage == 0 )
{
PageIndex pageIndex = index / itemsPerPage;
value = arrayAllocator()->allocateArrayPage();
pages_[pageIndex] = value;
}
new (value) Value( dereference( itOther ) );
}
}
ValueInternalArray &
ValueInternalArray::operator =( const ValueInternalArray &other )
{
ValueInternalArray temp( other );
swap( temp );
return *this;
}
ValueInternalArray::~ValueInternalArray()
{
// destroy all constructed items
IteratorState it;
IteratorState itEnd;
makeBeginIterator( it);
makeEndIterator( itEnd );
for ( ; !equals(it,itEnd); increment(it) )
{
Value *value = &dereference(it);
value->~Value();
}
// release all pages
PageIndex lastPageIndex = size_ / itemsPerPage;
for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
// release pages index
arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
}
void
ValueInternalArray::swap( ValueInternalArray &other )
{
Value **tempPages = pages_;
pages_ = other.pages_;
other.pages_ = tempPages;
ArrayIndex tempSize = size_;
size_ = other.size_;
other.size_ = tempSize;
PageIndex tempPageCount = pageCount_;
pageCount_ = other.pageCount_;
other.pageCount_ = tempPageCount;
}
void
ValueInternalArray::clear()
{
ValueInternalArray dummy;
swap( dummy );
}
void
ValueInternalArray::resize( ArrayIndex newSize )
{
if ( newSize == 0 )
clear();
else if ( newSize < size_ )
{
IteratorState it;
IteratorState itEnd;
makeIterator( it, newSize );
makeIterator( itEnd, size_ );
for ( ; !equals(it,itEnd); increment(it) )
{
Value *value = &dereference(it);
value->~Value();
}
PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
PageIndex lastPageIndex = size_ / itemsPerPage;
for ( ; pageIndex < lastPageIndex; ++pageIndex )
arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
size_ = newSize;
}
else if ( newSize > size_ )
resolveReference( newSize );
}
void
ValueInternalArray::makeIndexValid( ArrayIndex index )
{
// Need to enlarge page index ?
if ( index >= pageCount_ * itemsPerPage )
{
PageIndex minNewPages = (index + 1) / itemsPerPage;
arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
}
// Need to allocate new pages ?
ArrayIndex nextPageIndex =
(size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
: size_;
if ( nextPageIndex <= index )
{
PageIndex pageIndex = nextPageIndex / itemsPerPage;
PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
for ( ; pageToAllocate-- > 0; ++pageIndex )
pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
}
// Initialize all new entries
IteratorState it;
IteratorState itEnd;
makeIterator( it, size_ );
size_ = index + 1;
makeIterator( itEnd, size_ );
for ( ; !equals(it,itEnd); increment(it) )
{
Value *value = &dereference(it);
new (value) Value(); // Construct a default value using placement new
}
}
Value &
ValueInternalArray::resolveReference( ArrayIndex index )
{
if ( index >= size_ )
makeIndexValid( index );
return pages_[index/itemsPerPage][index%itemsPerPage];
}
Value *
ValueInternalArray::find( ArrayIndex index ) const
{
if ( index >= size_ )
return 0;
return &(pages_[index/itemsPerPage][index%itemsPerPage]);
}
ValueInternalArray::ArrayIndex
ValueInternalArray::size() const
{
return size_;
}
int
ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
{
return indexOf(y) - indexOf(x);
}
ValueInternalArray::ArrayIndex
ValueInternalArray::indexOf( const IteratorState &iterator )
{
if ( !iterator.array_ )
return ArrayIndex(-1);
return ArrayIndex(
(iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage
+ iterator.currentItemIndex_ );
}
int
ValueInternalArray::compare( const ValueInternalArray &other ) const
{
int sizeDiff( size_ - other.size_ );
if ( sizeDiff != 0 )
return sizeDiff;
for ( ArrayIndex index =0; index < size_; ++index )
{
int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare(
other.pages_[index/itemsPerPage][index%itemsPerPage] );
if ( diff != 0 )
return diff;
}
return 0;
}
| {
"pile_set_name": "Github"
} |
/**
* Copyright (C) 2019-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* 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
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the Server Side Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#pragma once
#include <cstddef>
#include <memory>
#include <vector>
#include "mongo/base/data_range.h"
#include "mongo/base/secure_allocator.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/shell/kms_gen.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/util/net/hostandport.h"
namespace mongo {
/**
* KMSService
*
* Represents a Key Management Service. May be a local file KMS or remote.
*
* Responsible for securely encrypting and decrypting data. The encrypted data is treated as a
* blockbox by callers.
*/
class KMSService {
public:
virtual ~KMSService() = default;
/**
* Encrypt a plaintext with the specified key and return a encrypted blob.
*/
virtual std::vector<uint8_t> encrypt(ConstDataRange cdr, StringData keyId) = 0;
/**
* Decrypt an encrypted blob and return the plaintext.
*/
virtual SecureVector<uint8_t> decrypt(ConstDataRange cdr, BSONObj masterKey) = 0;
/**
* Encrypt a data key with the specified key and return a BSONObj that describes what needs to
* be store in the key vault.
*
* {
* keyMaterial : "<ciphertext>""
* masterKey : {
* provider : "<provider_name>"
* ... <provider specific fields>
* }
* }
*/
virtual BSONObj encryptDataKey(ConstDataRange cdr, StringData keyId) = 0;
};
/**
* KMSService Factory
*
* Provides static registration of KMSService.
*/
class KMSServiceFactory {
public:
virtual ~KMSServiceFactory() = default;
/**
* Create an instance of the KMS service
*/
virtual std::unique_ptr<KMSService> create(const BSONObj& config) = 0;
};
/**
* KMSService Controller
*
* Provides static registration of KMSServiceFactory
*/
class KMSServiceController {
public:
/**
* Create an instance of the KMS service
*/
static void registerFactory(KMSProviderEnum provider,
std::unique_ptr<KMSServiceFactory> factory);
/**
* Creates a KMS Service for the specified provider with the config.
*/
static std::unique_ptr<KMSService> createFromClient(StringData kmsProvider,
const BSONObj& config);
/**
* Creates a KMS Service with the given mongo constructor options and key vault record.
*/
static std::unique_ptr<KMSService> createFromDisk(const BSONObj& config,
const BSONObj& kmsProvider);
private:
static stdx::unordered_map<KMSProviderEnum, std::unique_ptr<KMSServiceFactory>> _factories;
};
/**
* Parse a basic url of "https://host:port" to a HostAndPort.
*
* Does not support URL encoding or anything else.
*/
HostAndPort parseUrl(StringData url);
} // namespace mongo
| {
"pile_set_name": "Github"
} |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.book.animated_container">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
| {
"pile_set_name": "Github"
} |
.mod-group.create-project-collection(ng-form name="projectCollectionFrom" ng-class="{'need-valid':needValid}" novalidate)
loading(ng-if="isWaitingCreate")
ul.info-list.group-info.com-list-info
li.has-border
span.info-name 项目名称
span.require-domain *
.info-content.info-content-lg-height
p.txt-prompt 项目名称会作为docker镜像的一部分,创建后不可修改,请慎重选择项目名称。
.line-long
input.ui-input-fill.line-element(ng-model="projectCollection.name" name="projectCollectionName" placeholder="不能有大写字母,不能以中横线开头和结尾" required ng-pattern="/^[a-z0-9]+([._-][a-z0-9]+)*$/" ng-model-options="{updateOn:'default blur',debounce:{default:500,blur:0}}" is-project-collection-exist)
span.txt-error(ng-if="(needValid||projectCollectionFrom.projectCollectionName.$dirty)&&projectCollectionFrom.projectCollectionName.$error.required") 必填
span.txt-error(ng-if="(needValid||projectCollectionFrom.projectCollectionName.$dirty)&&!projectCollectionFrom.projectCollectionName.$error.required&&projectCollectionFrom.projectCollectionName.$error.pattern") 非法的名称
span.txt-error(ng-if="(needValid||projectCollectionFrom.projectCollectionName.$dirty)&&!projectCollectionFrom.projectCollectionName.$error.required&&!projectCollectionFrom.projectCollectionName.$error.pattern&&projectCollectionFrom.projectCollectionName.$invalid&&projectCollectionFrom.projectCollectionName.$error.isProjectCollectionExist") 项目名已存在
li.has-border
span.info-name.info-name-sm 项目描述
.info-content
.line-long
textarea.info-txt.ui-input-fill.line-element(ng-model="projectCollection.description" name="projectDescription" placeholder="输入项目描述")
li.has-border
span.info-name 公开项目
.info-content
dome-toggle(ng-class="{'on':isPublic}" ng-click="isPublic=!isPublic")
span.tip.txt-prompt 项目公开后对所有用户可见
span.tool-next
a.icon-help(tooltip="项目公开后所有用户均能查看项目信息和该项目下工程信息,并启动工程构建,但无法编辑或者删除项目和该项目下的工程")
li
span.info-name 项目成员
.info-content
.line-long
.com-select-con.line-element(select-con label="true")
ul.selected-labels
li.select-label(ng-repeat="user in selectedUsers" ng-cloak)
//- | {{user.username}}
//- a.icon-cancel(ng-click="cancelUser($index)")
a.icon-cancle.icon-cancle-former(ng-click="cancelUser($index)")
| {{user.username}}
li.select-input
input.line-element.ui-btn-select(placeholder="搜索成员" ng-model="userKey.key" ng-keydown="userKeyDown($event,userKey.key,userListFiltered[0])")
ul.select-list
li(ng-if="!userList||userListFiltered.length===0")
a 无相关用户信息
li.select-item(ng-repeat="user in userListFiltered=(userList| filter:{'username':userKey.key})")
a(ng-bind="user.username" ng-click="selectUser(user.id,user.username);")
.line-long.line-member
.com-select-con.line-element(select-con)
button.ui-btn.ui-btn-select.ui-btn-white.line-element-sm(ng-cloak)
i.icon-down
| {{role}}
ul.select-list
li.select-item
a(ng-click="toggleRole('MASTER')") MASTER
li.select-item
a(ng-click="toggleRole('DEVELOPER')") DEVELOPER
li.select-item
a(ng-click="toggleRole('REPORTER')") REPORTER
button.ui-btn.ui-btn-sm.ui-btn-bright.ui-btn-add(ng-click="addUser()") 添加
.line-long
table.ui-table-primary
thead
tr
th(style="width:40%") 成员名称
th 项目权限
th
tbody
tr
td(ng-bind="myself.username")
td(ng-bind="myself.role")
td
tr(ng-repeat="user in selectedUsersList")
td(ng-bind="user.username")
td
.com-select-con(select-con)
button.ui-btn.ui-btn-white.ui-btn-select(ng-cloak)
i.icon-down
| {{user.role}}
ul.select-list
li.select-item
a(ng-click="user.role='MASTER'") MASTER
li.select-item
a(ng-click="user.role='DEVELOPER'") DEVELOPER
li.select-item
a(ng-click="user.role='REPORTER'") REPORTER
td
button.ui-btn-none.fa.fa-trash-o.icon-trash-color(ng-click="deleteUser($index)")
.com-bottom-option
span.com-bottom-option-con
button.ui-btn.ui-btn-sm.ui-btn-bright(ui-sref="projectCollectionManage") 取消
button.ui-btn.ui-btn-lg.ui-btn-bright(ng-disabled="isWaitingCreate" ng-click="needValid=true;projectCollectionFrom.$valid&&createProjectCollection()") 完成创建
span.txt-error(ng-if="needValid&&projectCollectionFrom.$invalid") 您有不合法数据,请修改后重试。 | {
"pile_set_name": "Github"
} |
CP15_BARRIER_EMULATION
DEVKMEM
DEVMEM
HID_A4TECH
HID_ACRUX
HID_BELKIN
HID_CHERRY
HID_CHICONY
HID_CYPRESS
HID_DRAGONRISE
HID_EMS_FF
HID_EZKEY
HID_GREENASIA
HID_GYRATION
HID_HOLTEK
HID_KENSINGTON
HID_KEYTOUCH
HID_KYE
HID_LCPOWER
HID_LOGITECH
HID_MONTEREY
HID_NTRIG
HID_ORTEK
HID_PANTHERLORD
HID_PETALYNX
HID_PICOLCD
HID_PRIMAX
HID_PRODIKEYS
HID_ROCCAT
HID_SAITEK
HID_SAMSUNG
HID_SMARTJOYPLUS
HID_SONY
HID_SPEEDLINK
HID_SUNPLUS
HID_THRUSTMASTER
HID_TIVO
HID_TOPSEED
HID_TWINHAN
HID_UCLOGIC
HID_WACOM
HID_WALTOP
HID_WIIMOTE
HID_ZEROPLUS
HID_ZYDACRON
JOYSTICK_XPAD_FF
JOYSTICK_XPAD_LEDS
KSM
MODULES
PSTORE
SETEND_EMULATION
TABLET_USB_ACECAD
TABLET_USB_AIPTEK
TABLET_USB_GTCO
TABLET_USB_HANWANG
TABLET_USB_KBTAB
USB_CONFIGFS
USB_OTG_WAKELOCK
| {
"pile_set_name": "Github"
} |
#
# U-boot - Makefile
#
# Copyright (c) 2005-2008 Analog Device Inc.
#
# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y := bf533-stamp.o
obj-$(CONFIG_STAMP_CF) += ide-cf.o
obj-$(CONFIG_VIDEO) += video.o
| {
"pile_set_name": "Github"
} |
// colour_baseline.less
//
// Baseline CSS for the Hathor colours.
// Compilers should include this in their colour's imports, but not directly
// compile using this file.
// -----------------------------------------------------
// Core variables and mixins
@import "../../../../media/jui/less/mixins.less";
// Bootstrap Buttons
// Using override for Hathor to target specific instances only
@import "buttons.less";
// Bootstrap Forms
// Using override for Hathor since we're not pulling in all Bootstrap form styles
@import "forms.less";
// Bootstrap Labels and Badges
@import "../../../../media/jui/less/labels-badges.less";
/*
* General styles
*/
body {
background-color: @bodyBackground;
color: @textColor;
}
h1 {
color: @textColor;
}
a:link {
color: @linkColor;
}
a:visited {
color: @linkColor;
}
/*
* Overall Styles
*/
#header {
background: @bodyBackground url(../images/j_logo.png) no-repeat;
}
#header h1.title {
color: @textColor;
}
#nav {
#gradient > .vertical(@gradientTop, @gradientBottom);
border: 1px solid @mainBorder;
}
#content {
background: @bodyBackground;
}
#no-submenu {
border-bottom: 1px solid @mainBorder;
}
#element-box {
background: @bodyBackground;
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
border-left: 1px solid @mainBorder;
}
#element-box.login {
border-top: 1px solid @mainBorder;
}
/*
* Various Styles
*/
.enabled,
.success,
.allow,
span.writable {
color: @successText;
}
.disabled,
p.error,
.warning,
.deny,
span.unwritable {
color: @errorText;
}
.nowarning {
color: @textColor;
}
.none,
.protected {
color: @mainBorder;
}
span.note {
background: @bodyBackground;
color: @textColor;
}
div.checkin-tick {
background: url(../images/admin/tick.png) 20px 50% no-repeat;
}
/*
* Overlib
*/
.ol-foreground {
background-color: @altBackground;
}
.ol-background {
background-color: @successText;
}
.ol-textfont {
color: @textColor;
}
.ol-captionfont {
color: @bodyBackground;
}
.ol-captionfont a {
color: @linkColor;
}
/*
* Subheader, toolbar, page title
*/
div.subheader .padding {
background: @bodyBackground;
}
.pagetitle h2 {
color: @textColor;
}
div.configuration {
color: @textColor;
background-image: url(../images/menu/icon-16-config.png);
background-repeat: no-repeat;
}
div.toolbar-box {
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
border-left: 1px solid @mainBorder;
background: @bodyBackground;
}
div.toolbar-list li {
color: @textColor;
}
div.toolbar-list li.divider {
border-right: 1px dotted @hoverBackground;
}
div.toolbar-list a {
border-left: 1px solid @hoverBackground;
border-top: 1px solid @hoverBackground;
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
background: @altBackground;
}
div.toolbar-list a:hover {
border-left: 1px solid @NWBorder;
border-top: 1px solid @NWBorder;
border-right: 1px solid @SEBorder;
border-bottom: 1px solid @SEBorder;
background: @hoverBackground;
color: @toolbarColor;
}
div.btn-toolbar {
margin-left: 5px;
padding-top: 3px;
}
div.btn-toolbar li.divider {
border-right: 1px dotted @hoverBackground;
}
div.btn-toolbar div.btn-group button {
border-left: 1px solid @hoverBackground;
border-top: 1px solid @hoverBackground;
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
padding: 5px 4px 5px 4px;
}
div.btn-toolbar div.btn-group button:hover {
border-left: 1px solid @NWBorder;
border-top: 1px solid @NWBorder;
border-right: 1px solid @SEBorder;
border-bottom: 1px solid @SEBorder;
background: @hoverBackground;
color: @toolbarColor;
cursor: pointer;
}
div.btn-toolbar a {
border-left: 1px solid @hoverBackground;
border-top: 1px solid @hoverBackground;
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
padding: 6px 5px;
text-align: center;
white-space: nowrap;
font-size: 1.2em;
text-decoration: none;
}
div.btn-toolbar a:hover {
border-left: 1px solid @NWBorder;
border-top: 1px solid @NWBorder;
border-right: 1px solid @SEBorder;
border-bottom: 1px solid @SEBorder;
background: @hoverBackground;
color: @toolbarColor;
cursor: pointer;
}
div.btn-toolbar div.btn-group button.inactive {
background: @altBackground;
}
/*
* Pane Slider pane Toggler styles
*/
.pane-sliders .title {
color: @textColor;
}
.pane-sliders .panel {
border: 1px solid @mainBorder;
}
.pane-sliders .panel h3 {
#gradient > .vertical(@gradientTop, @gradientBottom);
color: @linkColor;
}
.pane-sliders .panel h3:hover {
background: @hoverBackground;
}
.pane-sliders .panel h3:hover a {
text-decoration: none;
}
.pane-sliders .adminlist {
border: 0 none;
}
.pane-sliders .adminlist td {
border: 0 none;
}
.pane-toggler span {
background: transparent url(../images/j_arrow.png) 5px 50% no-repeat;
}
.pane-toggler-down span {
background: transparent url(../images/j_arrow_down.png) 5px 50% no-repeat;
}
.pane-toggler-down {
border-bottom: 1px solid @mainBorder;
}
/*
* Tabs
*/
dl.tabs dt {
border: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
color: @linkColor;
}
dl.tabs dt:hover {
background: @hoverBackground;
}
dl.tabs dt.open {
background: @bodyBackground;
border-bottom: 1px solid @bodyBackground;
color: @textColor;
}
dl.tabs dt.open a:visited {
color: @textColor;
}
dl.tabs dt a:hover {
text-decoration: none;
}
dl.tabs dt a:focus {
text-decoration: underline;
}
div.current {
border: 1px solid @mainBorder;
background: @bodyBackground;
}
/*
* New parameter styles
*/
div.current fieldset {
border: none 0;
}
div.current fieldset.adminform {
border: 1px solid @mainBorder;
}
/*
* Login Settings
*/
#login-page .pagetitle h2 {
background: transparent;
}
#login-page #header {
border-bottom: 1px solid @mainBorder;
}
#login-page #lock {
background: url(../images/j_login_lock.png) 50% 0 no-repeat;
}
#login-page #element-box.login {
#gradient > .vertical(@gradientTop, @gradientBottom);
}
#form-login {
background: @bodyBackground;
border: 1px solid @mainBorder;
}
#form-login label {
color: @textColor;
}
#form-login div.button1 a {
color: @linkColor;
}
/*
* Cpanel Settings
*/
#cpanel div.icon a, .cpanel div.icon a {
color: @linkColor;
border-left: 1px solid @hoverBackground;
border-top: 1px solid @hoverBackground;
border-right: 1px solid @mainBorder;
border-bottom: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
#cpanel div.icon a:hover,
#cpanel div.icon a:focus,
.cpanel div.icon a:hover,
.cpanel div.icon a:focus {
border-left: 1px solid @NWBorder;
border-top: 1px solid @NWBorder;
border-right: 1px solid @SEBorder;
border-bottom: 1px solid @SEBorder;
color: @linkColor;
background: @hoverBackground;
}
/*
* Form Styles
*/
fieldset {
border: 1px @mainBorder solid;
}
legend {
color: @textColor;
}
fieldset ul.checklist input:focus {
outline: thin dotted @textColor;
}
fieldset#filter-bar {
border-top: 0 solid @mainBorder;
border-right: 0 solid @mainBorder;
border-bottom: 1px solid @mainBorder;
border-left: 0 solid @mainBorder;
}
fieldset#filter-bar ol, fieldset#filter-bar ul {
border: 0;
}
fieldset#filter-bar ol li fieldset, fieldset#filter-bar ul li fieldset {
border: 0;
}
/* Note: these visual cues should be augmented by aria */
.invalid {
color: @errorText;
}
/* must be augmented by aria at the same time if changed dynamically by js
aria-invalid=true or aria-invalid=false */
input.invalid {
border: 1px solid @errorText;
}
/* augmented by aria in template javascript */
input.readonly, span.faux-input {
border: 0;
}
input.required {
background-color: @inputBackground;
}
input.disabled {
background-color: @disabledBackground;
}
input, select, span.faux-input {
background-color: @bodyBackground;
border: 1px solid @mainBorder;
}
/* Inputs used as buttons */
input[type="button"], input[type="submit"], input[type="reset"] {
color: @linkColor;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
input[type="button"]:hover, input[type="button"]:focus,
input[type="submit"]:hover, input[type="submit"]:focus,
input[type="reset"]:hover, input[type="reset"]:focus {
background: @hoverBackground;
}
textarea {
background-color: @bodyBackground;
border: 1px solid @mainBorder;
}
input:focus, select:focus, textarea:focus, option:focus,
input:hover, select:hover, textarea:hover, option:hover {
background-color: @hoverBackground;
color: @linkColor;
}
/*
* Option or Parameter styles
*/
.paramrules {
background: @altBackground;
}
span.gi {
color: @mainBorder;
}
/*
* Admintable Styles
*/
table.admintable td.key, table.admintable td.paramlist_key {
background-color: @altBackground;
color: @textColor;
border-bottom: 1px solid @mainBorder;
border-right: 1px solid @mainBorder;
}
table.paramlist td.paramlist_description {
background-color: @altBackground;
color: @textColor;
border-bottom: 1px solid @mainBorder;
border-right: 1px solid @mainBorder;
}
/*
* Admin Form Styles
*/
fieldset.adminform {
border: 1px solid @mainBorder;
}
/*
* Table styles are for use with tabular data
*/
table.adminform {
background-color: @bodyBackground;
}
table.adminform tr.row0 {
background-color: @bodyBackground;
}
table.adminform tr.row1 {
background-color: @hoverBackground;
}
table.adminform th {
color: @textColor;
background: @bodyBackground;
}
table.adminform tr {
border-bottom: 1px solid @mainBorder;
border-right: 1px solid @mainBorder;
}
/*
* Adminlist Table layout
*/
table.adminlist {
border-spacing: 1px;
background-color: @bodyBackground;
color: @textColor;
}
table.adminlist.modal {
border-right: 1px solid @mainBorder;
border-left: 1px solid @mainBorder;
}
table.adminlist a {
color: @linkColor;
}
table.adminlist thead th {
background: @bodyBackground;
color: @textColor;
border-bottom: 1px solid @mainBorder;
}
/*
* Table row styles
*/
table.adminlist tbody tr {
background: @bodyBackground;
}
table.adminlist tbody tr.row1 {
background: @bodyBackground;
}
table.adminlist tbody tr.row1:last-child td,
table.adminlist tbody tr.row1:last-child th {
border-bottom: 1px solid @mainBorder;
}
table.adminlist tbody tr.row0:hover td,
table.adminlist tbody tr.row1:hover td,
table.adminlist tbody tr.row0:hover th,
table.adminlist tbody tr.row1:hover th,
table.adminlist tbody tr.row0:focus td,
table.adminlist tbody tr.row1:focus td,
table.adminlist tbody tr.row0:focus th,
table.adminlist tbody tr.row1:focus th {
background-color: @hoverBackground;
}
table.adminlist tbody tr td,
table.adminlist tbody tr th {
border-right: 1px solid @mainBorder;
}
table.adminlist tbody tr td:last-child {
border-right: none;
}
table.adminlist tbody tr.row0:last-child td,
table.adminlist tbody tr.row0:last-child th {
border-bottom: 1px solid @mainBorder;
}
table.adminlist tbody tr.row0 td,
table.adminlist tbody tr.row0 th {
#gradient > .vertical(@gradientTop, @gradientBottom);
}
table.adminlist {
border-bottom: 0 solid @mainBorder;
}
table.adminlist tfoot tr {
color: @textColor;
}
/*
* Table td/th styles
*/
table.adminlist tfoot td,
table.adminlist tfoot th {
background-color: @bodyBackground;
border-top: 1px solid @mainBorder;
}
/*
* Adminlist buttons
*/
table.adminlist tr td.btns a {
border: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
color: @linkColor;
}
table.adminlist tr td.btns a:hover,
table.adminlist tr td.btns a:active,
table.adminlist tr td.btns a:focus {
background-color: @bodyBackground;
}
/*
* Saving order icon styling in admin tables
*/
a.saveorder {
background: url(../images/admin/filesave.png) no-repeat;
}
a.saveorder.inactive {
background-position: 0 -16px;
}
/*
* Saving order icon styling in admin tables
*/
fieldset.batch {
background: @bodyBackground;
}
/**
* Button styling
*/
button {
color: @toolbarColor;
border: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
button:hover,
button:focus {
background: @hoverBackground;
}
.invalid {
color: #ff0000;
}
/* Button 1 Type */
.button1 {
border: 1px solid @mainBorder;
color: @linkColor;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
/* Use this if you add images to the buttons such as directional arrows */
.button1 a {
color: @linkColor;
/* add padding if you are using the directional images */
/* padding: 0 30px 0 6px; */
}
.button1 a:hover,
.button1 a:focus {
background: @hoverBackground;
}
/* Button 2 Type */
.button2-left,
.button2-right {
border: 1px solid @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
.button2-left a,
.button2-right a,
.button2-left span,
.button2-right span {
color: @linkColor;
}
/* these are inactive buttons */
.button2-left span,
.button2-right span {
color: #999999;
}
.page span,
.blank span {
color: @linkColor;
}
.button2-left a:hover,
.button2-right a:hover,
.button2-left a:focus,
.button2-right a:focus {
background: @hoverBackground;
}
/**
* Pagination styles
*/
/* Grey out the current page number */
.pagination .page span {
color: #999999;
}
/**
* Tooltips
*/
.tip {
background: #000000;
border: 1px solid #FFFFFF;
}
.tip-title {
background: url(../images/selector-arrow-std.png) no-repeat;
}
/**
* Calendar
*/
a img.calendar {
background: url(../images/calendar.png) no-repeat;
}
/**
* JGrid styles
*/
.jgrid span.publish {
background-image: url(../images/admin/tick.png);
}
.jgrid span.unpublish {
background-image: url(../images/admin/publish_x.png);
}
.jgrid span.archive {
background-image: url(../images/menu/icon-16-archive.png);
}
.jgrid span.trash {
background-image: url(../images/menu/icon-16-trash.png);
}
.jgrid span.default {
background-image: url(../images/menu/icon-16-default.png);
}
.jgrid span.notdefault {
background-image: url(../images/menu/icon-16-notdefault.png);
}
.jgrid span.checkedout {
background-image: url(../images/admin/checked_out.png);
}
.jgrid span.downarrow {
background-image: url(../images/admin/downarrow.png);
}
.jgrid span.downarrow_disabled {
background-image: url(../images/admin/downarrow0.png);
}
.jgrid span.uparrow {
background-image: url(../images/admin/uparrow.png);
}
.jgrid span.uparrow_disabled {
background-image: url(../images/admin/uparrow0.png);
}
.jgrid span.published {
background-image: url(../images/admin/publish_g.png);
}
.jgrid span.expired {
background-image: url(../images/admin/publish_r.png);
}
.jgrid span.pending {
background-image: url(../images/admin/publish_y.png);
}
.jgrid span.warning {
background-image: url(../images/admin/publish_y.png);
}
/**
* Toolbar icons
* These icons are used for the toolbar buttons
* The classes are constructed dynamically when the toolbar is created
*/
.icon-32-send {
background-image: url(../images/toolbar/icon-32-send.png);
}
.icon-32-delete {
background-image: url(../images/toolbar/icon-32-delete.png);
}
.icon-32-help {
background-image: url(../images/toolbar/icon-32-help.png);
}
.icon-32-cancel {
background-image: url(../images/toolbar/icon-32-cancel.png);
}
.icon-32-checkin {
background-image: url(../images/toolbar/icon-32-checkin.png);
}
.icon-32-options {
background-image: url(../images/toolbar/icon-32-config.png);
}
.icon-32-apply {
background-image: url(../images/toolbar/icon-32-apply.png);
}
.icon-32-back {
background-image: url(../images/toolbar/icon-32-back.png);
}
.icon-32-forward {
background-image: url(../images/toolbar/icon-32-forward.png);
}
.icon-32-save {
background-image: url(../images/toolbar/icon-32-save.png);
}
.icon-32-edit {
background-image: url(../images/toolbar/icon-32-edit.png);
}
.icon-32-copy {
background-image: url(../images/toolbar/icon-32-copy.png);
}
.icon-32-move {
background-image: url(../images/toolbar/icon-32-move.png);
}
.icon-32-new {
background-image: url(../images/toolbar/icon-32-new.png);
}
.icon-32-upload {
background-image: url(../images/toolbar/icon-32-upload.png);
}
.icon-32-assign {
background-image: url(../images/toolbar/icon-32-publish.png);
}
.icon-32-html {
background-image: url(../images/toolbar/icon-32-html.png);
}
.icon-32-css {
background-image: url(../images/toolbar/icon-32-css.png);
}
.icon-32-menus {
background-image: url(../images/toolbar/icon-32-menu.png);
}
.icon-32-publish {
background-image: url(../images/toolbar/icon-32-publish.png);
}
.icon-32-unblock {
background-image: url(../images/toolbar/icon-32-unblock.png);
}
.icon-32-unpublish {
background-image: url(../images/toolbar/icon-32-unpublish.png);
}
.icon-32-restore {
background-image: url(../images/toolbar/icon-32-revert.png);
}
.icon-32-trash {
background-image: url(../images/toolbar/icon-32-trash.png);
}
.icon-32-archive {
background-image: url(../images/toolbar/icon-32-archive.png);
}
.icon-32-unarchive {
background-image: url(../images/toolbar/icon-32-unarchive.png);
}
.icon-32-preview {
background-image: url(../images/toolbar/icon-32-preview.png);
}
.icon-32-default {
background-image: url(../images/toolbar/icon-32-default.png);
}
.icon-32-refresh {
background-image: url(../images/toolbar/icon-32-refresh.png);
}
.icon-32-save-new {
background-image: url(../images/toolbar/icon-32-save-new.png);
}
.icon-32-save-copy {
background-image: url(../images/toolbar/icon-32-save-copy.png);
}
.icon-32-error {
background-image: url(../images/toolbar/icon-32-error.png);
}
.icon-32-new-style {
background-image: url(../images/toolbar/icon-32-new-style.png);
}
.icon-32-delete-style {
background-image: url(../images/toolbar/icon-32-delete-style.png);
}
.icon-32-purge {
background-image: url(../images/toolbar/icon-32-purge.png);
}
.icon-32-remove {
background-image: url(../images/toolbar/icon-32-remove.png);
}
.icon-32-featured {
background-image: url(../images/toolbar/icon-32-featured.png);
}
.icon-32-unfeatured {
background-image: url(../images/toolbar/icon-32-featured.png);
background-position: 0% 100%;
}
.icon-32-export {
background-image: url(../images/toolbar/icon-32-export.png);
}
.icon-32-stats {
background-image: url(../images/toolbar/icon-32-stats.png);
}
.icon-32-print {
background-image: url(../images/toolbar/icon-32-print.png);
}
.icon-32-batch {
background-image: url(../images/toolbar/icon-32-batch.png);
}
.icon-32-envelope {
background-image: url(../images/toolbar/icon-32-messaging.png);
}
.icon-32-download {
background-image: url(../images/toolbar/icon-32-export.png);
}
.icon-32-bars {
background-image: url(../images/toolbar/icon-32-stats.png);
}
/**
* Quick Icons
* Also knows as Header Icons
* These are used for the Quick Icons on the Control Panel
* The same classes are also assigned the Component Title
*/
.icon-48-categories {
background-image: url(../images/header/icon-48-category.png);
}
.icon-48-category-edit {
background-image: url(../images/header/icon-48-category.png);
}
.icon-48-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-generic {
background-image: url(../images/header/icon-48-generic.png);
}
.icon-48-banners {
background-image: url(../images/header/icon-48-banner.png);
}
.icon-48-banners-categories {
background-image: url(../images/header/icon-48-banner-categories.png);
}
.icon-48-banners-category-edit {
background-image: url(../images/header/icon-48-banner-categories.png);
}
.icon-48-banners-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-banners-clients {
background-image: url(../images/header/icon-48-banner-client.png);
}
.icon-48-banners-tracks {
background-image: url(../images/header/icon-48-banner-tracks.png);
}
.icon-48-checkin {
background-image: url(../images/header/icon-48-checkin.png);
}
.icon-48-clear {
background-image: url(../images/header/icon-48-clear.png);
}
.icon-48-contact {
background-image: url(../images/header/icon-48-contacts.png);
}
.icon-48-contact-categories {
background-image: url(../images/header/icon-48-contacts-categories.png);
}
.icon-48-contact-category-edit {
background-image: url(../images/header/icon-48-contacts-categories.png);
}
.icon-48-contact-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-purge {
background-image: url(../images/header/icon-48-purge.png);
}
.icon-48-cpanel {
background-image: url(../images/header/icon-48-cpanel.png);
}
.icon-48-config {
background-image: url(../images/header/icon-48-config.png);
}
.icon-48-groups {
background-image: url(../images/header/icon-48-groups.png);
}
.icon-48-groups-add {
background-image: url(../images/header/icon-48-groups-add.png);
}
.icon-48-levels {
background-image: url(../images/header/icon-48-levels.png);
}
.icon-48-levels-add {
background-image: url(../images/header/icon-48-levels-add.png);
}
.icon-48-module {
background-image: url(../images/header/icon-48-module.png);
}
.icon-48-menu {
background-image: url(../images/header/icon-48-menu.png);
}
.icon-48-menu-add {
background-image: url(../images/header/icon-48-menu-add.png);
}
.icon-48-menumgr {
background-image: url(../images/header/icon-48-menumgr.png);
}
.icon-48-trash {
background-image: url(../images/header/icon-48-trash.png);
}
.icon-48-user {
background-image: url(../images/header/icon-48-user.png);
}
.icon-48-user-add {
background-image: url(../images/header/icon-48-user-add.png);
}
.icon-48-user-edit {
background-image: url(../images/header/icon-48-user-edit.png);
}
.icon-48-user-profile {
background-image: url(../images/header/icon-48-user-profile.png);
}
.icon-48-inbox {
background-image: url(../images/header/icon-48-inbox.png);
}
.icon-48-new-privatemessage {
background-image: url(../images/header/icon-48-new-privatemessage.png);
}
.icon-48-msgconfig {
background-image: url(../images/header/icon-48-message_config.png);
}
.icon-48-langmanager {
background-image: url(../images/header/icon-48-language.png);
}
.icon-48-mediamanager {
background-image: url(../images/header/icon-48-media.png);
}
.icon-48-plugin {
background-image: url(../images/header/icon-48-plugin.png);
}
.icon-48-help_header {
background-image: url(../images/header/icon-48-help_header.png);
}
.icon-48-impressions {
background-image: url(../images/header/icon-48-stats.png);
}
.icon-48-browser {
background-image: url(../images/header/icon-48-stats.png);
}
.icon-48-searchtext {
background-image: url(../images/header/icon-48-stats.png);
}
.icon-48-thememanager {
background-image: url(../images/header/icon-48-themes.png);
}
.icon-48-writemess {
background-image: url(../images/header/icon-48-writemess.png);
}
.icon-48-featured {
background-image: url(../images/header/icon-48-featured.png);
}
.icon-48-sections {
background-image: url(../images/header/icon-48-section.png);
}
.icon-48-article-add {
background-image: url(../images/header/icon-48-article-add.png);
}
.icon-48-article-edit {
background-image: url(../images/header/icon-48-article-edit.png);
}
.icon-48-article {
background-image: url(../images/header/icon-48-article.png);
}
.icon-48-content-categories {
background-image: url(../images/header/icon-48-category.png);
}
.icon-48-content-category-edit {
background-image: url(../images/header/icon-48-category.png);
}
.icon-48-content-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-install {
background-image: url(../images/header/icon-48-extension.png);
}
.icon-48-dbbackup {
background-image: url(../images/header/icon-48-backup.png);
}
.icon-48-dbrestore {
background-image: url(../images/header/icon-48-dbrestore.png);
}
.icon-48-dbquery {
background-image: url(../images/header/icon-48-query.png);
}
.icon-48-systeminfo {
background-image: url(../images/header/icon-48-info.png);
}
.icon-48-massmail {
background-image: url(../images/header/icon-48-massmail.png);
}
.icon-48-redirect {
background-image: url(../images/header/icon-48-redirect.png);
}
.icon-48-search {
background-image: url(../images/header/icon-48-search.png);
}
.icon-48-finder {
background-image: url(../images/header/icon-48-search.png);
}
.icon-48-newsfeeds {
background-image: url(../images/header/icon-48-newsfeeds.png);
}
.icon-48-newsfeeds-categories {
background-image: url(../images/header/icon-48-newsfeeds-cat.png);
}
.icon-48-newsfeeds-category-edit {
background-image: url(../images/header/icon-48-newsfeeds-cat.png);
}
.icon-48-newsfeeds-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-weblinks {
background-image: url(../images/header/icon-48-links.png);
}
.icon-48-weblinks-categories {
background-image: url(../images/header/icon-48-links-cat.png);
}
.icon-48-weblinks-category-edit {
background-image: url(../images/header/icon-48-links-cat.png);
}
.icon-48-weblinks-category-add {
background-image: url(../images/header/icon-48-category-add.png);
}
.icon-48-tags {
background-image: url(../images/header/icon-48-tags.png);
}
/**
* General styles
*/
div.message {
border: 1px solid @mainBorder;
color: @textColor;
}
.helpFrame {
border-left: 0 solid @mainBorder;
border-right: none;
border-top: none;
border-bottom: none;
}
.outline {
border: 1px solid @mainBorder;
background: @bodyBackground;
}
/**
* Modal Styles
*/
dl.menu_type dt {
border-bottom: 1px solid @mainBorder;
}
ul#new-modules-list {
border-top: 1px solid @mainBorder;
}
/**
* User Accessibility
*/
/* Skip to Content Visual Styling */
#skiplinkholder a, #skiplinkholder a:link, #skiplinkholder a:visited {
color: @bodyBackground;
background: @linkColor;
border-bottom: solid #336 2px;
}
/**
* Admin Form Styles
*/
fieldset.panelform {
border: none 0;
}
/**
* ACL STYLES relocated from com_users/media/grid.css
*/
a.move_up {
background-image: url('../images/admin/uparrow.png');
}
span.move_up {
background-image: url('../images/admin/uparrow0.png');
}
a.move_down {
background-image: url('../images/admin/downarrow.png');
}
span.move_down {
background-image: url('../images/admin/downarrow0.png');
}
a.grid_false {
background-image: url('../images/admin/publish_x.png');
}
a.grid_true {
background-image: url('../images/admin/tick.png');
}
a.grid_trash {
background-image: url('../images/admin/icon-16-trash.png');
}
/**
* ACL PANEL STYLES
*/
/* All Tabs */
tr.row1 {
background-color: @altBackground;
}
/* Summary Tab */
table.aclsummary-table td.col2,
table.aclsummary-table th.col2,
table.aclsummary-table td.col3,
table.aclsummary-table th.col3,
table.aclsummary-table td.col4,
table.aclsummary-table th.col4,
table.aclsummary-table td.col5,
table.aclsummary-table th.col5,
table.aclsummary-table td.col6,
table.aclsummary-table th.col6,
table.aclmodify-table td.col2,
table.aclmodify-table th.col2 {
border-left: 1px solid @mainBorder;
}
/* Icons */
span.icon-16-unset {
background: url(../images/admin/icon-16-denyinactive.png) no-repeat;
}
span.icon-16-allowed {
background: url(../images/admin/icon-16-allow.png) no-repeat;
}
span.icon-16-denied {
background: url(../images/admin/icon-16-deny.png) no-repeat;
}
span.icon-16-locked {
background: url(../images/admin/checked_out.png) 0 0 no-repeat;
}
label.icon-16-allow {
background: url(../images/admin/icon-16-allow.png) no-repeat;
}
label.icon-16-deny {
background: url(../images/admin/icon-16-deny.png) no-repeat;
}
a.icon-16-allow {
background: url(../images/admin/icon-16-allow.png) no-repeat;
}
a.icon-16-deny {
background: url(../images/admin/icon-16-deny.png) no-repeat;
}
a.icon-16-allowinactive {
background: url(../images/admin/icon-16-allowinactive.png) no-repeat;
}
a.icon-16-denyinactive {
background: url(../images/admin/icon-16-denyinactive.png) no-repeat;
}
/* ACL footer/legend */
ul.acllegend li.acl-allowed {
background: url(../images/admin/icon-16-allow.png) no-repeat left;
}
ul.acllegend li.acl-denied {
background: url(../images/admin/icon-16-deny.png) no-repeat left;
}
li.acl-editgroups,
li.acl-resetbtn {
background-color: @altBackground;
border: 1px solid @mainBorder;
}
li.acl-editgroups a,
li.acl-resetbtn a {
color: @linkColor;
}
li.acl-editgroups:hover,
li.acl-resetbtn:hover,
li.acl-editgroups:focus,
li.acl-resetbtn:focus {
background-color: @hoverBackground;
}
/* ACL Config --------- */
table#acl-config {
border: 1px solid @mainBorder;
}
table#acl-config th,
table#acl-config td {
background: @altBackground;
border-bottom: 1px solid @mainBorder;
}
table#acl-config th.acl-groups {
border-right: 1px solid @mainBorder;
}
/**
* Mod_rewrite Warning
*/
#jform_sef_rewrite-lbl {
background: url(../images/admin/icon-16-notice-note.png) right top no-repeat;
}
/**
* Permission Rules
*/
#permissions-sliders .tip {
background: @bodyBackground;
border: 1px solid @mainBorder;
}
#permissions-sliders ul#rules,
#permissions-sliders ul#rules ul {
border: solid 0 @mainBorder;
background: @bodyBackground;
}
ul#rules li .pane-sliders .panel h3.title {
border: solid 0 @mainBorder;
}
#permissions-sliders ul#rules .pane-slider {
border: solid 1px @mainBorder;
}
#permissions-sliders ul#rules li h3 {
border: solid 1px @mainBorder;
}
#permissions-sliders ul#rules li h3.pane-toggler-down a {
border: solid 0;
}
#permissions-sliders ul#rules .group-kind {
color: @textColor;
}
#permissions-sliders ul#rules table.group-rules {
border: solid 1px @mainBorder;
}
#permissions-sliders ul#rules table.group-rules td {
border-right: solid 1px @mainBorder;
border-bottom: solid 1px @mainBorder;
}
#permissions-sliders ul#rules table.group-rules th {
background: @hoverBackground;
border-right: solid 1px @mainBorder;
border-bottom: solid 1px @mainBorder;
color: @textColor;
}
ul#rules table.aclmodify-table {
border: solid 1px @mainBorder;
}
ul#rules table.group-rules td label {
border: solid 0 @mainBorder;
}
#permissions-sliders ul#rules .mypanel {
border: solid 0 @mainBorder;
}
#permissions-sliders ul#rules table.group-rules td {
background: @bodyBackground;
}
#permissions-sliders span.level {
color: @mainBorder;
background-image: none;
}
/*
* Debug styles
*/
.check-0,
table.adminlist tbody td.check-0 {
background-color: @permissionDefault;
}
.check-a,
table.adminlist tbody td.check-a {
background-color: @permissionAllowed;
}
.check-d,
table.adminlist tbody td.check-d {
background-color: @permissionDenied;
}
/**
* System Messages
*/
#system-message dd ul {
color: @textColor;
}
#system-message dd.error ul {
color: @textColor;
}
#system-message dd.message ul {
color: @textColor;
}
#system-message dd.notice ul {
color: @textColor;
}
/** CSS file for Accessible Admin Menu
* based on Matt Carrolls' son of suckerfish
* with javascript by Bill Tomczak
*/
/* Note: set up the font-size on the id and used 100% on the elements.
If ul/li/a are different ems, then the shifting back via non-js keyboard
doesn't work properly */
/**
* Menu Styling
*/
#menu {
/* this is on the main ul */
color: @textColor;
}
#menu ul.dropdown-menu {
/* all lists */
#gradient > .vertical(@gradientTop, @gradientBottom);
color: @textColor;
}
#menu ul.dropdown-menu li.dropdown-submenu {
background: url(../images/j_arrow.png) no-repeat right 50%;
}
#menu ul.dropdown-menu li.divider {
margin-bottom: 0;
border-bottom: 1px dotted @mainBorder;
}
#menu a {
color: @toolbarColor;
background-repeat: no-repeat;
background-position: left 50%;
}
#menu li {
/* all list items */
border-right: 1px solid @mainBorder;
background-color: transparent;
}
#menu li a:hover, #menu li a:focus {
background-color: @hoverBackground;
}
#menu li.disabled a:hover,
#menu li.disabled a:focus,
#menu li.disabled a {
color: @mainBorder;
#gradient > .vertical(@gradientTop, @gradientBottom);
}
#menu li ul {
/* second-level lists */
border: 1px solid @mainBorder;
}
#menu li li {
/* second-level row */
background-color: transparent;
}
/**
* Styling parents
*/
/* 1 level - sfhover */
#menu li.sfhover a {
background-color: @hoverBackground;
}
/* 2 level - normal */
#menu li.sfhover li a {
background-color: transparent;
}
/* 2 level - hover */
#menu li.sfhover li.sfhover a, #menu li li a:focus {
background-color: @hoverBackground;
}
/* 3 level - normal */
#menu li.sfhover li.sfhover li a {
background-color: transparent;
}
/* 3 level - hover */
#menu li.sfhover li.sfhover li.sfhover a, #menu li li li a:focus {
background-color: @hoverBackground;
}
/* bring back the focus elements into view */
#menu li li a:focus, #menu li li li a:focus {
background-color: @hoverBackground;
}
#menu li li li a:focus {
background-color: @hoverBackground;
}
/**
* Submenu styling
*/
#submenu {
border-bottom: 1px solid @mainBorder;
/* border-bottom plus padding-bottom is the technique */
/* This is the background befind the tabs */
/*background: @bodyBackground;*/
}
#submenu li, #submenu span.nolink {
#gradient > .vertical(@gradientTop, @gradientBottom);
border: 1px solid @mainBorder;
color: @linkColor;
}
#submenu li:hover, #submenu li:focus {
background: @hoverBackground;
}
#submenu li.active, #submenu span.nolink.active {
background: @bodyBackground;
border-bottom: 1px solid @bodyBackground;
}
#submenu li.active a,
#submenu span.nolink.active {
color: #000;
}
.element-invisible {
margin: 0;
padding: 0;
}
/* -- Codemirror Editor ----------- */
div.CodeMirror-wrapping {
border: 1px solid @mainBorder;
}
/* User Notes */
table.adminform tr.row0 {
background-color: @bodyBackground;
}
ul.alternating > li:nth-child(odd) {
background-color: @bodyBackground;
}
ul.alternating > li:nth-child(even) {
background-color: @altBackground;
}
ol.alternating > li:nth-child(odd) {
background-color: @bodyBackground;
}
ol.alternating > li:nth-child(even) {
background-color: @altBackground;
}
/* Installer Database */
#installer-database, #installer-discover, #installer-update, #installer-warnings {
border-top: 1px solid @mainBorder;
}
#installer-database p.warning {
background: transparent url(../images/admin/icon-16-deny.png) center left no-repeat;
}
#installer-database p.nowarning {
background: transparent url(../images/admin/icon-16-allow.png) center left no-repeat;
}
/* Override default bootstrap font-size */
.input-append,
.input-prepend {
font-size: 1.2em;
}
| {
"pile_set_name": "Github"
} |
[English](./README.md) | 简体中文
<h1 align="center">Feflow</h1>
<p align="center">
🚀 Feflow 是一个致力于提升大前端开发效率的前端工程化工具.
</p>
<br>
[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![deps][deps]][deps-url]
[![Install Size][size]][size-url]
[![Downloads][downloads]][downloads-url]
[![lerna][lerna]][lerna-url]
[![GitHub contributors][contributors]][contributors-url]
[![Issue resolution][issue-resolution]][issue-resolution-url]
[![PR's welcome][pr-welcome]][pr-welcome-url]
## 介绍
Feflow 是腾讯开源的一款大前端领域的工程化方案,致力于提升开发效率和规范。
## 开始使用
先通过 npm 安装 feflow 开始.
```
npm install @feflow/cli -g
```
在 Feflow 里面有3类命令,分别是原生命令、开发套件命令和插件命令
- 原生命令
- `fef config`
- `fef help`
- `fef info`
- `fef install`
- `fef uninstall`
- `fef list`
你可以通过编写开发套件或者插件去扩展 Feflow 的命令
更多详细信息可前往:
- [Github Wiki](https://github.com/Tencent/feflow/wiki)
- [官网](https://feflowjs.com/)
## 发布日志
本项目遵从 [Semantic Versioning](http://semver.org/).
每次发布信息都会在 Github 的 [Releases](https://github.com/Tencent/feflow/releases) 中呈现.
## 许可证
[MIT](LICENSE.txt)
[build-status]: https://travis-ci.org/Tencent/feflow.svg
[build-status-url]: https://travis-ci.org/Tencent/feflow
[contributors]: https://img.shields.io/github/contributors/Tencent/feflow.svg
[contributors-url]: https://github.com/Tencent/feflow/graphs/contributors
[deps]: https://img.shields.io/david/Tencent/feflow.svg
[deps-url]: https://david-dm.org/Tencent/feflow
[downloads]: https://img.shields.io/npm/dw/@feflow/cli.svg
[downloads-url]: https://www.npmjs.com/package/@feflow/cli
[issue-resolution]: https://isitmaintained.com/badge/resolution/Tencent/feflow.svg
[issue-resolution-url]: https://github.com/Tencent/feflow/issues
[lerna]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg
[lerna-url]: http://www.lernajs.io/
[npm]: https://img.shields.io/npm/v/@feflow/cli.svg
[npm-url]: https://www.npmjs.com/package/@feflow/cli
[pr-welcome]: https://img.shields.io/badge/PRs%20-welcome-brightgreen.svg
[pr-welcome-url]: https://github.com/Tencent/feflow/blob/next/.github/CONTRIBUTING.md
[size]: https://packagephobia.now.sh/badge?p=@feflow/cli
[size-url]: https://packagephobia.now.sh/result?p=@feflow/cli | {
"pile_set_name": "Github"
} |
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
MyFunction:
Type: AWS::Serverless::<caret>
| {
"pile_set_name": "Github"
} |
/*******************************************************************************
* *
* Copyright (C) 2020 by Max Lv <max.c.lv@gmail.com> *
* Copyright (C) 2020 by Mygod Studio <contact-shadowsocks-android@mygod.be> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
package com.github.shadowsocks
import android.content.Context
import com.google.android.gms.ads.AdLoader
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.RequestConfiguration
internal object AdsManager {
init {
MobileAds.setRequestConfiguration(RequestConfiguration.Builder().apply {
setTestDeviceIds(listOf(
"B08FC1764A7B250E91EA9D0D5EBEB208", "7509D18EB8AF82F915874FEF53877A64",
"F58907F28184A828DD0DB6F8E38189C6", "FE983F496D7C5C1878AA163D9420CA97"))
}.build())
}
fun load(context: Context?, setup: AdLoader.Builder.() -> Unit) =
AdLoader.Builder(context, "ca-app-pub-3283768469187309/8632513739").apply(setup).build()
.loadAd(AdRequest.Builder().build())
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
* Copyright (C) 2013, 2015, 2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
InspectorBackendClass = class InspectorBackendClass
{
constructor()
{
this._lastSequenceId = 1;
this._pendingResponses = new Map;
this._agents = {};
this._deferredScripts = [];
this._customTracer = null;
this._defaultTracer = new WebInspector.LoggingProtocolTracer;
this._activeTracers = [this._defaultTracer];
this._currentDispatchState = {
event: null,
request: null,
response: null,
};
this._dumpInspectorTimeStats = false;
let setting = WebInspector.autoLogProtocolMessagesSetting = new WebInspector.Setting("auto-collect-protocol-messages", false);
setting.addEventListener(WebInspector.Setting.Event.Changed, this._startOrStopAutomaticTracing.bind(this))
this._startOrStopAutomaticTracing();
}
// Public
// It's still possible to set this flag on InspectorBackend to just
// dump protocol traffic as it happens. For more complex uses of
// protocol data, install a subclass of WebInspector.ProtocolTracer.
set dumpInspectorProtocolMessages(value)
{
// Implicitly cause automatic logging to start if it's allowed.
let setting = WebInspector.autoLogProtocolMessagesSetting;
setting.value = value;
this._defaultTracer.dumpMessagesToConsole = value;
}
get dumpInspectorProtocolMessages()
{
return WebInspector.autoLogProtocolMessagesSetting.value;
}
set dumpInspectorTimeStats(value)
{
this._dumpInspectorTimeStats = !!value;
if (!this.dumpInspectorProtocolMessages)
this.dumpInspectorProtocolMessages = true;
this._defaultTracer.dumpTimingDataToConsole = value;
}
get dumpInspectorTimeStats()
{
return this._dumpInspectorTimeStats;
}
set customTracer(tracer)
{
console.assert(!tracer || tracer instanceof WebInspector.ProtocolTracer, tracer);
console.assert(!tracer || tracer !== this._defaultTracer, tracer);
// Bail early if no state change is to be made.
if (!tracer && !this._customTracer)
return;
if (tracer === this._customTracer)
return;
if (tracer === this._defaultTracer)
return;
if (this._customTracer)
this._customTracer.logFinished();
this._customTracer = tracer;
this._activeTracers = [this._defaultTracer];
if (this._customTracer) {
this._customTracer.logStarted();
this._activeTracers.push(this._customTracer);
}
}
get activeTracers()
{
return this._activeTracers;
}
registerCommand(qualifiedName, callSignature, replySignature)
{
var [domainName, commandName] = qualifiedName.split(".");
var agent = this._agentForDomain(domainName);
agent.addCommand(InspectorBackend.Command.create(this, qualifiedName, callSignature, replySignature));
}
registerEnum(qualifiedName, enumValues)
{
var [domainName, enumName] = qualifiedName.split(".");
var agent = this._agentForDomain(domainName);
agent.addEnum(enumName, enumValues);
}
registerEvent(qualifiedName, signature)
{
var [domainName, eventName] = qualifiedName.split(".");
var agent = this._agentForDomain(domainName);
agent.addEvent(new InspectorBackend.Event(eventName, signature));
}
registerDomainDispatcher(domainName, dispatcher)
{
var agent = this._agentForDomain(domainName);
agent.dispatcher = dispatcher;
}
dispatch(message)
{
let messageObject = (typeof message === "string") ? JSON.parse(message) : message;
if ("id" in messageObject)
this._dispatchResponse(messageObject);
else
this._dispatchEvent(messageObject);
}
runAfterPendingDispatches(script)
{
console.assert(script);
console.assert(typeof script === "function");
if (!this._pendingResponses.size)
script.call(this);
else
this._deferredScripts.push(script);
}
activateDomain(domainName, activationDebuggableType)
{
if (!activationDebuggableType || InspectorFrontendHost.debuggableType() === activationDebuggableType) {
var agent = this._agents[domainName];
agent.activate();
return agent;
}
return null;
}
// Private
_startOrStopAutomaticTracing()
{
this._defaultTracer.dumpMessagesToConsole = this.dumpInspectorProtocolMessages;
this._defaultTracer.dumpTimingDataToConsole = this.dumpTimingDataToConsole;
}
_agentForDomain(domainName)
{
if (this._agents[domainName])
return this._agents[domainName];
var agent = new InspectorBackend.Agent(domainName);
this._agents[domainName] = agent;
return agent;
}
_sendCommandToBackendWithCallback(command, parameters, callback)
{
let sequenceId = this._lastSequenceId++;
let messageObject = {
"id": sequenceId,
"method": command.qualifiedName,
};
if (!isEmptyObject(parameters))
messageObject["params"] = parameters;
let responseData = {command, request: messageObject, callback};
if (this.activeTracer)
responseData.sendRequestTimestamp = timestamp();
this._pendingResponses.set(sequenceId, responseData);
this._sendMessageToBackend(messageObject);
}
_sendCommandToBackendExpectingPromise(command, parameters)
{
let sequenceId = this._lastSequenceId++;
let messageObject = {
"id": sequenceId,
"method": command.qualifiedName,
};
if (!isEmptyObject(parameters))
messageObject["params"] = parameters;
let responseData = {command, request: messageObject};
if (this.activeTracer)
responseData.sendRequestTimestamp = timestamp();
let responsePromise = new Promise(function(resolve, reject) {
responseData.promise = {resolve, reject};
});
this._pendingResponses.set(sequenceId, responseData);
this._sendMessageToBackend(messageObject);
return responsePromise;
}
_sendMessageToBackend(messageObject)
{
for (let tracer of this.activeTracers)
tracer.logFrontendRequest(messageObject);
InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject));
}
_dispatchResponse(messageObject)
{
console.assert(this._pendingResponses.size >= 0);
if (messageObject["error"]) {
if (messageObject["error"].code !== -32000)
console.error("Request with id = " + messageObject["id"] + " failed. " + JSON.stringify(messageObject["error"]));
}
let sequenceId = messageObject["id"];
console.assert(this._pendingResponses.has(sequenceId), sequenceId, this._pendingResponses);
let responseData = this._pendingResponses.take(sequenceId) || {};
let {request, command, callback, promise} = responseData;
let processingStartTimestamp = timestamp();
for (let tracer of this.activeTracers)
tracer.logWillHandleResponse(messageObject);
this._currentDispatchState.request = request;
this._currentDispatchState.response = messageObject;
if (typeof callback === "function")
this._dispatchResponseToCallback(command, request, messageObject, callback);
else if (typeof promise === "object")
this._dispatchResponseToPromise(command, messageObject, promise);
else
console.error("Received a command response without a corresponding callback or promise.", messageObject, command);
this._currentDispatchState.request = null;
this._currentDispatchState.response = null;
let processingTime = (timestamp() - processingStartTimestamp).toFixed(3);
let roundTripTime = (processingStartTimestamp - responseData.sendRequestTimestamp).toFixed(3);
for (let tracer of this.activeTracers)
tracer.logDidHandleResponse(messageObject, {rtt: roundTripTime, dispatch: processingTime});
if (this._deferredScripts.length && !this._pendingResponses.size)
this._flushPendingScripts();
}
_dispatchResponseToCallback(command, requestObject, responseObject, callback)
{
let callbackArguments = [];
callbackArguments.push(responseObject["error"] ? responseObject["error"].message : null);
if (responseObject["result"]) {
for (let parameterName of command.replySignature)
callbackArguments.push(responseObject["result"][parameterName]);
}
try {
callback.apply(null, callbackArguments);
} catch (e) {
WebInspector.reportInternalError(e, {"cause": `An uncaught exception was thrown while dispatching response callback for command ${command.qualifiedName}.`});
}
}
_dispatchResponseToPromise(command, messageObject, promise)
{
let {resolve, reject} = promise;
if (messageObject["error"])
reject(new Error(messageObject["error"].message));
else
resolve(messageObject["result"]);
}
_dispatchEvent(messageObject)
{
let qualifiedName = messageObject["method"];
let [domainName, eventName] = qualifiedName.split(".");
if (!(domainName in this._agents)) {
console.error("Protocol Error: Attempted to dispatch method '" + eventName + "' for non-existing domain '" + domainName + "'");
return;
}
let agent = this._agentForDomain(domainName);
if (!agent.active) {
console.error("Protocol Error: Attempted to dispatch method for domain '" + domainName + "' which exists but is not active.");
return;
}
let event = agent.getEvent(eventName);
if (!event) {
console.error("Protocol Error: Attempted to dispatch an unspecified method '" + qualifiedName + "'");
return;
}
let eventArguments = [];
if (messageObject["params"])
eventArguments = event.parameterNames.map((name) => messageObject["params"][name]);
let processingStartTimestamp = timestamp();
for (let tracer of this.activeTracers)
tracer.logWillHandleEvent(messageObject);
this._currentDispatchState.event = messageObject;
try {
agent.dispatchEvent(eventName, eventArguments);
} catch (e) {
for (let tracer of this.activeTracers)
tracer.logFrontendException(messageObject, e);
WebInspector.reportInternalError(e, {"cause": `An uncaught exception was thrown while handling event: ${qualifiedName}`});
}
this._currentDispatchState.event = null;
let processingDuration = (timestamp() - processingStartTimestamp).toFixed(3);
for (let tracer of this.activeTracers)
tracer.logDidHandleEvent(messageObject, {dispatch: processingDuration});
}
_flushPendingScripts()
{
console.assert(this._pendingResponses.size === 0);
let scriptsToRun = this._deferredScripts;
this._deferredScripts = [];
for (let script of scriptsToRun)
script.call(this);
}
};
InspectorBackend = new InspectorBackendClass;
InspectorBackend.Agent = class InspectorBackendAgent
{
constructor(domainName)
{
this._domainName = domainName;
// Agents are always created, but are only useable after they are activated.
this._active = false;
// Commands are stored directly on the Agent instance using their unqualified
// method name as the property. Thus, callers can write: FooAgent.methodName().
// Enums are stored similarly based on the unqualified type name.
this._events = {};
}
// Public
get domainName()
{
return this._domainName;
}
get active()
{
return this._active;
}
get currentDispatchState() { return this._currentDispatchState; }
set dispatcher(value)
{
this._dispatcher = value;
}
addEnum(enumName, enumValues)
{
this[enumName] = enumValues;
}
addCommand(command)
{
this[command.commandName] = command;
}
addEvent(event)
{
this._events[event.eventName] = event;
}
getEvent(eventName)
{
return this._events[eventName];
}
hasEvent(eventName)
{
return eventName in this._events;
}
hasEventParameter(eventName, eventParameterName)
{
let event = this._events[eventName];
return event && event.parameterNames.includes(eventParameterName);
}
activate()
{
this._active = true;
window[this._domainName + "Agent"] = this;
}
dispatchEvent(eventName, eventArguments)
{
if (!(eventName in this._dispatcher)) {
console.error("Protocol Error: Attempted to dispatch an unimplemented method '" + this._domainName + "." + eventName + "'");
return false;
}
this._dispatcher[eventName].apply(this._dispatcher, eventArguments);
return true;
}
};
// InspectorBackend.Command can't use ES6 classes because of its trampoline nature.
// But we can use strict mode to get stricter handling of the code inside its functions.
InspectorBackend.Command = function(backend, qualifiedName, callSignature, replySignature)
{
'use strict';
this._backend = backend;
this._instance = this;
var [domainName, commandName] = qualifiedName.split(".");
this._qualifiedName = qualifiedName;
this._commandName = commandName;
this._callSignature = callSignature || [];
this._replySignature = replySignature || [];
};
InspectorBackend.Command.create = function(backend, commandName, callSignature, replySignature)
{
'use strict';
var instance = new InspectorBackend.Command(backend, commandName, callSignature, replySignature);
function callable() {
return instance._invokeWithArguments.apply(instance, arguments);
}
callable._instance = instance;
Object.setPrototypeOf(callable, InspectorBackend.Command.prototype);
return callable;
};
// As part of the workaround to make commands callable, these functions use |this._instance|.
// |this| could refer to the callable trampoline, or the InspectorBackend.Command instance.
InspectorBackend.Command.prototype = {
__proto__: Function.prototype,
// Public
get qualifiedName()
{
return this._instance._qualifiedName;
},
get commandName()
{
return this._instance._commandName;
},
get callSignature()
{
return this._instance._callSignature;
},
get replySignature()
{
return this._instance._replySignature;
},
invoke: function(commandArguments, callback)
{
'use strict';
let instance = this._instance;
if (typeof callback === "function")
instance._backend._sendCommandToBackendWithCallback(instance, commandArguments, callback);
else
return instance._backend._sendCommandToBackendExpectingPromise(instance, commandArguments);
},
supports: function(parameterName)
{
'use strict';
var instance = this._instance;
return instance.callSignature.some((parameter) => parameter["name"] === parameterName);
},
// Private
_invokeWithArguments: function()
{
'use strict';
let instance = this._instance;
let commandArguments = Array.from(arguments);
let callback = typeof commandArguments.lastValue === "function" ? commandArguments.pop() : null;
function deliverFailure(message) {
console.error(`Protocol Error: ${message}`);
if (callback)
setTimeout(callback.bind(null, message), 0);
else
return Promise.reject(new Error(message));
}
let parameters = {};
for (let parameter of instance.callSignature) {
let parameterName = parameter["name"];
let typeName = parameter["type"];
let optionalFlag = parameter["optional"];
if (!commandArguments.length && !optionalFlag)
return deliverFailure(`Invalid number of arguments for command '${instance.qualifiedName}'.`);
let value = commandArguments.shift();
if (optionalFlag && value === undefined)
continue;
if (typeof value !== typeName)
return deliverFailure(`Invalid type of argument '${parameterName}' for command '${instance.qualifiedName}' call. It must be '${typeName}' but it is '${typeof value}'.`);
parameters[parameterName] = value;
}
if (!callback && commandArguments.length === 1 && commandArguments[0] !== undefined)
return deliverFailure(`Protocol Error: Optional callback argument for command '${instance.qualifiedName}' call must be a function but its type is '${typeof args[0]}'.`);
if (callback)
instance._backend._sendCommandToBackendWithCallback(instance, parameters, callback);
else
return instance._backend._sendCommandToBackendExpectingPromise(instance, parameters);
}
};
InspectorBackend.Event = class Event
{
constructor(eventName, parameterNames)
{
this.eventName = eventName;
this.parameterNames = parameterNames;
}
};
| {
"pile_set_name": "Github"
} |
/***************************************************//**
* @file FlameX.cpp
* @date April 2017
* @author Ocean Optics, Inc.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2017, Ocean Optics Inc
*
* 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.
*******************************************************/
#include "common/globals.h"
#include "api/seabreezeapi/ProtocolFamilies.h"
#include "common/buses/BusFamilies.h"
#include "vendors/OceanOptics/buses/network/FlameXTCPIPv4.h"
#include "vendors/OceanOptics/buses/rs232/OOIRS232Interface.h"
#include "vendors/OceanOptics/buses/usb/FlameXUSB.h"
#include "vendors/OceanOptics/devices/FlameX.h"
#include "vendors/OceanOptics/features/spectrometer/FlameXSpectrometerFeature.h"
#include "vendors/OceanOptics/features/data_buffer/FlameXDataBufferFeature.h"
#include "vendors/OceanOptics/features/raw_bus_access/RawUSBBusAccessFeature.h"
#include "vendors/OceanOptics/features/serial_number/SerialNumberFeature.h"
#include "vendors/OceanOptics/features/introspection/IntrospectionFeature.h"
#include "vendors/OceanOptics/features/light_source/StrobeLampFeature.h"
#include "vendors/OceanOptics/features/nonlinearity/NonlinearityCoeffsFeature.h"
#include "vendors/OceanOptics/features/stray_light/StrayLightCoeffsFeature.h"
#include "vendors/OceanOptics/features/fast_buffer/FlameXFastBufferFeature.h"
#include "vendors/OceanOptics/features/ethernet_configuration/EthernetConfigurationFeature.h"
#include "vendors/OceanOptics/features/multicast/MulticastFeature.h"
#include "vendors/OceanOptics/features/ipv4/IPv4Feature.h"
#include "vendors/OceanOptics/features/wifi_configuration/WifiConfigurationFeature.h"
#include "vendors/OceanOptics/features/dhcp_server/DHCPServerFeature.h"
#include "vendors/OceanOptics/features/network_configuration/NetworkConfigurationFeature.h"
#include "vendors/OceanOptics/features/temperature/TemperatureFeature.h"
#include "vendors/OceanOptics/features/revision/RevisionFeature.h"
#include "vendors/OceanOptics/features/optical_bench/OpticalBenchFeature.h"
#include "vendors/OceanOptics/features/gpio/gpioFeature.h"
#include "vendors/OceanOptics/features/i2c_master/i2cMasterFeature.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPSerialNumberProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPIntrospectionProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPStrobeLampProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPNonlinearityCoeffsProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPStrayLightCoeffsProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPFastBufferProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPEthernetConfigurationProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPMulticastProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPIPv4Protocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPWifiConfigurationProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPDHCPServerProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPNetworkConfigurationProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPTemperatureProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPRevisionProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPOpticalBenchProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPGPIOProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OBPI2CMasterProtocol.h"
#include "vendors/OceanOptics/protocols/obp/impls/OceanBinaryProtocol.h"
using namespace seabreeze;
using namespace seabreeze::oceanBinaryProtocol;
using namespace seabreeze::api;
using namespace std;
FlameX::FlameX() {
this->name = "FlameX";
// 0 is the control address, since it is not valid in this context, means not used
this->usbEndpoint_primary_out = 0x01;
this->usbEndpoint_primary_in = 0x81;
this->usbEndpoint_secondary_out = 0;
this->usbEndpoint_secondary_in = 0;
this->usbEndpoint_secondary_in2 = 0;
/* Set up the available buses on this device */
this->buses.push_back(new FlameXUSB());
this->buses.push_back(new FlameXTCPIPv4());
this->buses.push_back(new OOIRS232Interface());
/* Set up the available protocols understood by this device */
this->protocols.push_back(new OceanBinaryProtocol());
/* Set up the features that comprise this device */
/* Add introspection feature*/
vector<ProtocolHelper *> introspectionHelpers;
introspectionHelpers.push_back(new OBPIntrospectionProtocol());
IntrospectionFeature *introspection = new IntrospectionFeature(introspectionHelpers);
this->features.push_back(introspection);
/* Add Revision feature (not fully implemented by flame x*/
vector<ProtocolHelper *> revisionHelpers;
revisionHelpers.push_back(new OBPRevisionProtocol());
this->features.push_back(
new RevisionFeature(revisionHelpers));
#if 0
/* Add optical bench feature */
vector<ProtocolHelper *> opticalBenchHelpers;
opticalBenchHelpers.push_back(new OBPOpticalBenchProtocol());
this->features.push_back(
new OpticalBenchFeature(opticalBenchHelpers));
#endif
/* spectrometer and databuffer features*/
FlameXFastBufferFeature *flameXDataBuffer = new FlameXFastBufferFeature();
this->features.push_back(flameXDataBuffer);
this->features.push_back(new FlameXSpectrometerFeature(introspection, flameXDataBuffer));
this->features.push_back(new FlameXDataBufferFeature());
/* Add serial number feature */
vector<ProtocolHelper *> serialNumberHelpers;
serialNumberHelpers.push_back(new OBPSerialNumberProtocol());
this->features.push_back(new SerialNumberFeature(serialNumberHelpers));
/* Add nonlinearity coefficients feature */
vector<ProtocolHelper *> nonlinearityHelpers;
nonlinearityHelpers.push_back(new OBPNonlinearityCoeffsProtocol());
this->features.push_back(new NonlinearityCoeffsFeature(nonlinearityHelpers));
/* Add Temperature feature */
vector<ProtocolHelper *> temperatureHelpers;
temperatureHelpers.push_back(new OBPTemperatureProtocol());
this->features.push_back(
new TemperatureFeature(temperatureHelpers));
/* Add stray light coefficients feature */
vector<ProtocolHelper *> strayHelpers;
strayHelpers.push_back(new OBPStrayLightCoeffsProtocol());
this->features.push_back(new StrayLightCoeffsFeature(strayHelpers));
/* Add lamp enable feature */
vector<ProtocolHelper *> lampHelpers;
lampHelpers.push_back(new OBPStrobeLampProtocol());
this->features.push_back(new StrobeLampFeature(lampHelpers));
/* Add network configuration feature */
vector<ProtocolHelper *> networkConfigurationHelpers;
networkConfigurationHelpers.push_back(new OBPNetworkConfigurationProtocol());
this->features.push_back(new NetworkConfigurationFeature(networkConfigurationHelpers));
/* Add ethernet configuration feature */
vector<ProtocolHelper *> ethernetConfigurationHelpers;
ethernetConfigurationHelpers.push_back(new OBPEthernetConfigurationProtocol());
this->features.push_back(new EthernetConfigurationFeature(ethernetConfigurationHelpers));
/* Add IPv4 Addressing feature */
vector<ProtocolHelper *> multicastHelpers;
multicastHelpers.push_back(new OBPMulticastProtocol());
this->features.push_back(new MulticastFeature(multicastHelpers));
/* Add DHCP Server feature */
vector<ProtocolHelper *> dhcpServerHelpers;
dhcpServerHelpers.push_back(new OBPDHCPServerProtocol());
this->features.push_back(new DHCPServerFeature(dhcpServerHelpers));
/* Add IPv4 Addressing feature */
vector<ProtocolHelper *> ipv4Helpers;
ipv4Helpers.push_back(new OBPIPv4Protocol());
this->features.push_back(new IPv4Feature(ipv4Helpers));
/* Add wifi configuration feature */
vector<ProtocolHelper *> wifiConfigurationHelpers;
wifiConfigurationHelpers.push_back(new OBPWifiConfigurationProtocol());
this->features.push_back(new WifiConfigurationFeature(wifiConfigurationHelpers));
/* Add gpio feature */
vector<ProtocolHelper *> gpioHelpers;
gpioHelpers.push_back(new OBPGPIOProtocol());
this->features.push_back(new GPIOFeature(gpioHelpers));
/* Add i2c master feature */
vector<ProtocolHelper *> i2cMasterHelpers;
i2cMasterHelpers.push_back(new OBPI2CMasterProtocol());
this->features.push_back(new i2cMasterFeature(i2cMasterHelpers));
this->features.push_back(new RawUSBBusAccessFeature());
}
FlameX::~FlameX() {
}
ProtocolFamily FlameX::getSupportedProtocol(FeatureFamily family, BusFamily bus) {
ProtocolFamilies protocols;
/* The FlameX uses one protocol for all buses. */
return protocols.OCEAN_BINARY_PROTOCOL;
}
| {
"pile_set_name": "Github"
} |
" Vim syntax file
" Language: /var/log/messages file
" Maintainer: Yakov Lerner <iler.ml@gmail.com>
" Latest Revision: 2008-06-29
" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339
syn match messagesDate contained display '\a\a\a [ 0-9]\d *'
\ nextgroup=messagesHour
syn match messagesHour contained display '\d\d:\d\d:\d\d\s*'
\ nextgroup=messagesHost
syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d'
\ nextgroup=messagesRFC3339T
syn match messagesRFC3339T contained display '\cT'
\ nextgroup=messagesHourRFC3339
syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)'
\ nextgroup=messagesHost
syn match messagesHost contained display '\S*\s*'
\ nextgroup=messagesLabel
syn match messagesLabel contained display '\s*[^:]*:\s*'
\ nextgroup=messagesText contains=messagesKernel,messagesPID
syn match messagesPID contained display '\[\zs\d\+\ze\]'
syn match messagesKernel contained display 'kernel:'
syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+'
syn match messagesURL '\w\+://\S\+'
syn match messagesText contained display '.*'
\ contains=messagesNumber,messagesIP,messagesURL,messagesError
syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*'
syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*'
hi def link messagesDate Constant
hi def link messagesHour Type
hi def link messagesDateRFC3339 Constant
hi def link messagesHourRFC3339 Type
hi def link messagesRFC3339T Normal
hi def link messagesHost Identifier
hi def link messagesLabel Operator
hi def link messagesPID Constant
hi def link messagesKernel Special
hi def link messagesError ErrorMsg
hi def link messagesIP Constant
hi def link messagesURL Underlined
hi def link messagesText Normal
hi def link messagesNumber Number
let b:current_syntax = "messages"
let &cpo = s:cpo_save
unlet s:cpo_save
| {
"pile_set_name": "Github"
} |
'use strict'
var url = require('url')
, tunnel = require('tunnel-agent')
var defaultProxyHeaderWhiteList = [
'accept',
'accept-charset',
'accept-encoding',
'accept-language',
'accept-ranges',
'cache-control',
'content-encoding',
'content-language',
'content-location',
'content-md5',
'content-range',
'content-type',
'connection',
'date',
'expect',
'max-forwards',
'pragma',
'referer',
'te',
'user-agent',
'via'
]
var defaultProxyHeaderExclusiveList = [
'proxy-authorization'
]
function constructProxyHost(uriObject) {
var port = uriObject.port
, protocol = uriObject.protocol
, proxyHost = uriObject.hostname + ':'
if (port) {
proxyHost += port
} else if (protocol === 'https:') {
proxyHost += '443'
} else {
proxyHost += '80'
}
return proxyHost
}
function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) {
var whiteList = proxyHeaderWhiteList
.reduce(function (set, header) {
set[header.toLowerCase()] = true
return set
}, {})
return Object.keys(headers)
.filter(function (header) {
return whiteList[header.toLowerCase()]
})
.reduce(function (set, header) {
set[header] = headers[header]
return set
}, {})
}
function constructTunnelOptions (request, proxyHeaders) {
var proxy = request.proxy
var tunnelOptions = {
proxy : {
host : proxy.hostname,
port : +proxy.port,
proxyAuth : proxy.auth,
headers : proxyHeaders
},
headers : request.headers,
ca : request.ca,
cert : request.cert,
key : request.key,
passphrase : request.passphrase,
pfx : request.pfx,
ciphers : request.ciphers,
rejectUnauthorized : request.rejectUnauthorized,
secureOptions : request.secureOptions,
secureProtocol : request.secureProtocol
}
return tunnelOptions
}
function constructTunnelFnName(uri, proxy) {
var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
return [uriProtocol, proxyProtocol].join('Over')
}
function getTunnelFn(request) {
var uri = request.uri
var proxy = request.proxy
var tunnelFnName = constructTunnelFnName(uri, proxy)
return tunnel[tunnelFnName]
}
function Tunnel (request) {
this.request = request
this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
this.proxyHeaderExclusiveList = []
if (typeof request.tunnel !== 'undefined') {
this.tunnelOverride = request.tunnel
}
}
Tunnel.prototype.isEnabled = function () {
var self = this
, request = self.request
// Tunnel HTTPS by default. Allow the user to override this setting.
// If self.tunnelOverride is set (the user specified a value), use it.
if (typeof self.tunnelOverride !== 'undefined') {
return self.tunnelOverride
}
// If the destination is HTTPS, tunnel.
if (request.uri.protocol === 'https:') {
return true
}
// Otherwise, do not use tunnel.
return false
}
Tunnel.prototype.setup = function (options) {
var self = this
, request = self.request
options = options || {}
if (typeof request.proxy === 'string') {
request.proxy = url.parse(request.proxy)
}
if (!request.proxy || !request.tunnel) {
return false
}
// Setup Proxy Header Exclusive List and White List
if (options.proxyHeaderWhiteList) {
self.proxyHeaderWhiteList = options.proxyHeaderWhiteList
}
if (options.proxyHeaderExclusiveList) {
self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList
}
var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList)
var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList)
// Setup Proxy Headers and Proxy Headers Host
// Only send the Proxy White Listed Header names
var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList)
proxyHeaders.host = constructProxyHost(request.uri)
proxyHeaderExclusiveList.forEach(request.removeHeader, request)
// Set Agent from Tunnel Data
var tunnelFn = getTunnelFn(request)
var tunnelOptions = constructTunnelOptions(request, proxyHeaders)
request.agent = tunnelFn(tunnelOptions)
return true
}
Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList
Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList
exports.Tunnel = Tunnel
| {
"pile_set_name": "Github"
} |
gcr.io/google_containers/kube-controller-manager:v1.10.1
| {
"pile_set_name": "Github"
} |
import {EventEmitter} from '@angular/core';
import {NotificationType} from '../enums/notification-type.enum';
import {NotificationAnimationType} from '../enums/notification-animation-type.enum';
export interface Notification {
id?: string;
type: NotificationType;
icon: string;
title?: any;
content?: any;
override?: any;
html?: any;
state?: string;
createdOn?: Date;
destroyedOn?: Date;
animate?: NotificationAnimationType;
timeOut?: number;
maxLength?: number;
pauseOnHover?: boolean;
clickToClose?: boolean;
clickIconToClose?: boolean;
theClass?: string;
click?: EventEmitter<{}>;
clickIcon?: EventEmitter<{}>;
timeoutEnd?: EventEmitter<{}>;
context?: any;
}
| {
"pile_set_name": "Github"
} |
---
# ===========================================================
# OWASP SAMM2 Security Practice Level template/sample
# ===========================================================
#Link to the practice, using its unique identifier
practice: b2af112859d34cada6ce4cf44d393b94
#Link to the maturity level, using its unique identifier
maturitylevel: 47dd82af343e4695a0385418af4398d1
#Unique identifier (GUID) used to refer to this practice level.
#Please generate another identifier for your specific practice level.
id: 46f16450b23d4c29a5cf19b056c2636e
#Objective of this particular practice level
objective: Build process is optimized and fully integrated into the workflow.
#Type Classification of the Document
type: PracticeLevel
| {
"pile_set_name": "Github"
} |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""API tests for the `tensorboard.summary` module.
These tests are especially important because this module is the standard
public entry point for end users, so we should be as careful as possible
to ensure that we export the right things.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections.abc
import sys
import unittest
import tensorboard.summary as tb_summary
import tensorboard.summary.v1 as tb_summary_v1
import tensorboard.summary.v2 as tb_summary_v2
class SummaryExportsBaseTest(object):
module = None
plugins = None
allowed = frozenset()
def test_each_plugin_has_an_export(self):
for plugin in self.plugins:
self.assertIsInstance(
getattr(self.module, plugin), collections.abc.Callable
)
def test_plugins_export_pb_functions(self):
for plugin in self.plugins:
self.assertIsInstance(
getattr(self.module, "%s_pb" % plugin), collections.abc.Callable
)
def test_all_exports_correspond_to_plugins(self):
exports = [
name for name in dir(self.module) if not name.startswith("_")
]
bad_exports = [
name
for name in exports
if name not in self.allowed
and not any(
name == plugin or name.startswith("%s_" % plugin)
for plugin in self.plugins
)
]
if bad_exports:
self.fail(
"The following exports do not correspond to known standard "
"plugins: %r. Please mark these as private by prepending an "
"underscore to their names, or, if they correspond to a new "
"plugin that you are certain should be part of the public API "
"forever, add that plugin to the STANDARD_PLUGINS set in this "
"module." % bad_exports
)
class SummaryExportsTest(SummaryExportsBaseTest, unittest.TestCase):
module = tb_summary
allowed = frozenset(("v1", "v2"))
plugins = frozenset(["audio", "histogram", "image", "scalar", "text",])
def test_plugins_export_pb_functions(self):
self.skipTest("V2 summary API _pb functions are not finalized yet")
class SummaryExportsV1Test(SummaryExportsBaseTest, unittest.TestCase):
module = tb_summary_v1
plugins = frozenset(
[
"audio",
"custom_scalar",
"histogram",
"image",
"pr_curve",
"scalar",
"text",
]
)
class SummaryExportsV2Test(SummaryExportsBaseTest, unittest.TestCase):
module = tb_summary_v2
plugins = frozenset(["audio", "histogram", "image", "scalar", "text",])
def test_plugins_export_pb_functions(self):
self.skipTest("V2 summary API _pb functions are not finalized yet")
class SummaryDepTest(unittest.TestCase):
def test_no_tf_dep(self):
# Check as a precondition that TF wasn't already imported.
self.assertEqual("notfound", sys.modules.get("tensorflow", "notfound"))
# Check that referencing summary API symbols still avoids a TF import
# as long as we don't actually invoke any API functions.
for module in (tb_summary, tb_summary_v1, tb_summary_v2):
print(dir(module))
print(module.scalar)
self.assertEqual("notfound", sys.modules.get("tensorflow", "notfound"))
if __name__ == "__main__":
unittest.main()
| {
"pile_set_name": "Github"
} |
import { getEnabledElement } from './enabledElements.js';
import getStoredPixels from './getStoredPixels.js';
import getModalityLUT from './internal/getModalityLUT.js';
/**
* Retrieves an array of pixels from a rectangular region with modality LUT transformation applied
*
* @param {HTMLElement} element The DOM element enabled for Cornerstone
* @param {Number} x The x coordinate of the top left corner of the sampling rectangle in image coordinates
* @param {Number} y The y coordinate of the top left corner of the sampling rectangle in image coordinates
* @param {Number} width The width of the of the sampling rectangle in image coordinates
* @param {Number} height The height of the of the sampling rectangle in image coordinates
* @returns {Array} The modality pixel value of the pixels in the sampling rectangle
*/
export default function (element, x, y, width, height) {
const storedPixels = getStoredPixels(element, x, y, width, height);
const ee = getEnabledElement(element);
const mlutfn = getModalityLUT(ee.image.slope, ee.image.intercept, ee.viewport.modalityLUT);
return storedPixels.map(mlutfn);
}
| {
"pile_set_name": "Github"
} |
{% load comment_tags oauth_tags %}
{% load humanize %}
<div class="card-body p-2 p-md-3 f-17" id="comment-list">
<ul class="list-unstyled">
<div class="mb-3">
<strong>{% get_comment_user_count article %} 人参与 | {% get_comment_count article %} 条评论</strong>
</div>
{% for comment in comment_list %}
<div class="comment-parent pt-2" id="com-{{ comment.id }}">
<li class="media">
{% get_user_avatar_tag comment.author %}
<div class="media-body ml-2">
<a class="float-right small mr-2 rep-btn" href="#editor-block"
data-repid="{{ comment.id }}" data-repuser="{{ comment.author.username }}">回复</a>
<p class="mt-0 mb-1">
{% get_user_link comment.author as user_link_info %}
{% if user_link_info.is_verified and user_link_info.link %}
<strong >
<a href="{{ user_link_info.link }}"
title="前往 {{ comment.author }} 的个人网站"
target="_blank">{{ comment.author }}
</a>
</strong>
{% else %}
<strong title="该用户未认证或没有个人站点">{{ comment.author }}</strong>
{% endif %}
{% if user_link_info.is_verified %}
{% if user_link_info.provider == 'GitHub' %}
<i class="fa fa-github" title="Github 绑定用户"></i>
{% elif user_link_info.provider == 'Weibo' %}
<i class="fa fa-weibo" title="Weibo 绑定用户"></i>
{% else %}
<i class="fa fa-envelope-o" title="邮箱认证用户"></i>
{% endif %}
{% endif %}
{% if comment.author.is_superuser %}
<small class="text-danger">[博主]</small>
{% elif comment.author == article.author %}
<small class="text-info">[作者]</small>
{% endif %}
</p>
<p class="small text-muted">{{ forloop.revcounter }} 楼 - {{ comment.create_date|naturaltime }}</p>
</div>
</li>
<div class="comment-body">{{ comment.content_to_markdown|safe }}</div>
</div>
{% get_child_comments comment as child_comments %}
{% if child_comments %}
<ul class="list-unstyled ml-4">
{% for each in child_comments %}
<div class="comment-child pt-2" id="com-{{ each.id }}">
<li class="media">
{% get_user_avatar_tag each.author %}
<div class="media-body ml-2">
<a class="float-right small mr-2 rep-btn" href="#editor-block"
data-repid="{{ each.id }}" data-repuser="{{ each.author.username }}">回复</a>
<p class="mt-0 mb-1">
{% get_user_link each.author as each_user_link_info %}
{% if each_user_link_info.is_verified and each_user_link_info.link %}
<strong >
<a href="{{ each_user_link_info.link }}"
title="前往 {{ each.author }} 的个人网站"
target="_blank">{{ each.author }}
</a>
</strong>
{% else %}
<strong title="该用户未认证或没有个人站点">{{ each.author }}</strong>
{% endif %}
{% if each_user_link_info.is_verified %}
{% if each_user_link_info.provider == 'GitHub' %}
<i class="fa fa-github" title="Github 绑定用户"></i>
{% elif each_user_link_info.provider == 'Weibo' %}
<i class="fa fa-weibo" title="Weibo 绑定用户"></i>
{% else %}
<i class="fa fa-envelope-o" title="邮箱认证用户"></i>
{% endif %}
{% endif %}
{% if each.author.is_superuser %}
<small class="text-danger">[博主]</small>
{% endif %}
<i class="fa fa-share"></i>
@{{ each.rep_to.author.username }}
</p>
<p class="small text-muted">{{ each.create_date|naturaltime }}</p>
</div>
</li>
<div class="comment-body">{{ each.content_to_markdown|safe }}</div>
</div>
{% endfor %}
</ul>
{% endif %}
{% empty %}
暂时没有评论,欢迎来尬聊!
{% endfor %}
</ul>
</div> | {
"pile_set_name": "Github"
} |
# coding: utf-8
from __future__ import unicode_literals
from mock import Mock
from spacy.matcher import DependencyMatcher
from ..util import get_doc
def test_issue4590(en_vocab):
"""Test that matches param in on_match method are the same as matches run with no on_match method"""
pattern = [
{"SPEC": {"NODE_NAME": "jumped"}, "PATTERN": {"ORTH": "jumped"}},
{
"SPEC": {"NODE_NAME": "fox", "NBOR_RELOP": ">", "NBOR_NAME": "jumped"},
"PATTERN": {"ORTH": "fox"},
},
{
"SPEC": {"NODE_NAME": "quick", "NBOR_RELOP": ".", "NBOR_NAME": "jumped"},
"PATTERN": {"ORTH": "fox"},
},
]
on_match = Mock()
matcher = DependencyMatcher(en_vocab)
matcher.add("pattern", on_match, pattern)
text = "The quick brown fox jumped over the lazy fox"
heads = [3, 2, 1, 1, 0, -1, 2, 1, -3]
deps = ["det", "amod", "amod", "nsubj", "ROOT", "prep", "det", "amod", "pobj"]
doc = get_doc(en_vocab, text.split(), heads=heads, deps=deps)
matches = matcher(doc)
on_match_args = on_match.call_args
assert on_match_args[0][3] == matches
| {
"pile_set_name": "Github"
} |
/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
"enable_external_display" = "Enable External Display";
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="@codebase@" href="example.jnlp">
<information>
<title>@title@</title>
<vendor>@vendor@</vendor>
<homepage href="@homepage@" />
<description>Swing Example</description>
<description kind="short">example</description>
</information>
<update check="timeout" policy="always" />
<resources>
<java version="@compile.source@+" />
<jar href="example.jar" main="true" />
</resources>
<application-desc main-class="@main.class@" />
</jnlp>
| {
"pile_set_name": "Github"
} |
@comment $OpenBSD$
share/redmine/extra/
share/redmine/extra/mail_handler/
share/redmine/extra/mail_handler/rdm-mailhandler.rb
share/redmine/extra/sample_plugin/
share/redmine/extra/sample_plugin/README
share/redmine/extra/sample_plugin/app/
share/redmine/extra/sample_plugin/app/controllers/
share/redmine/extra/sample_plugin/app/controllers/example_controller.rb
share/redmine/extra/sample_plugin/app/models/
share/redmine/extra/sample_plugin/app/models/meeting.rb
share/redmine/extra/sample_plugin/app/views/
share/redmine/extra/sample_plugin/app/views/example/
share/redmine/extra/sample_plugin/app/views/example/say_goodbye.html.erb
share/redmine/extra/sample_plugin/app/views/example/say_hello.html.erb
share/redmine/extra/sample_plugin/app/views/my/
share/redmine/extra/sample_plugin/app/views/my/blocks/
share/redmine/extra/sample_plugin/app/views/my/blocks/_sample_block.html.erb
share/redmine/extra/sample_plugin/app/views/settings/
share/redmine/extra/sample_plugin/app/views/settings/_sample_plugin_settings.html.erb
share/redmine/extra/sample_plugin/assets/
share/redmine/extra/sample_plugin/assets/images/
share/redmine/extra/sample_plugin/assets/images/it_works.png
share/redmine/extra/sample_plugin/assets/stylesheets/
share/redmine/extra/sample_plugin/assets/stylesheets/example.css
share/redmine/extra/sample_plugin/config/
share/redmine/extra/sample_plugin/config/locales/
share/redmine/extra/sample_plugin/config/locales/en.yml
share/redmine/extra/sample_plugin/config/locales/fr.yml
share/redmine/extra/sample_plugin/config/routes.rb
share/redmine/extra/sample_plugin/db/
share/redmine/extra/sample_plugin/db/migrate/
share/redmine/extra/sample_plugin/db/migrate/001_create_meetings.rb
share/redmine/extra/sample_plugin/init.rb
share/redmine/extra/sample_plugin/test/
share/redmine/extra/sample_plugin/test/integration/
share/redmine/extra/sample_plugin/test/integration/routing_test.rb
share/redmine/extra/svn/
share/redmine/extra/svn/Redmine.pm
share/redmine/extra/svn/reposman.rb
| {
"pile_set_name": "Github"
} |
// copy.frag
#define SHADER_NAME SIMPLE_TEXTURE
precision highp float;
varying vec2 vTextureCoord;
uniform float seed;
uniform float noiseScale;
vec4 permute(vec4 x) { return mod(((x*34.0)+1.0)*x, 289.0); }
vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
float snoise(vec3 v){
const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;
const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);
vec3 i = floor(v + dot(v, C.yyy) );
vec3 x0 = v - i + dot(i, C.xxx) ;
vec3 g = step(x0.yzx, x0.xyz);
vec3 l = 1.0 - g;
vec3 i1 = min( g.xyz, l.zxy );
vec3 i2 = max( g.xyz, l.zxy );
vec3 x1 = x0 - i1 + 1.0 * C.xxx;
vec3 x2 = x0 - i2 + 2.0 * C.xxx;
vec3 x3 = x0 - 1. + 3.0 * C.xxx;
i = mod(i, 289.0 );
vec4 p = permute( permute( permute( i.z + vec4(0.0, i1.z, i2.z, 1.0 )) + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));
float n_ = 1.0/7.0;
vec3 ns = n_ * D.wyz - D.xzx;
vec4 j = p - 49.0 * floor(p * ns.z *ns.z);
vec4 x_ = floor(j * ns.z);
vec4 y_ = floor(j - 7.0 * x_ );
vec4 x = x_ *ns.x + ns.yyyy;
vec4 y = y_ *ns.x + ns.yyyy;
vec4 h = 1.0 - abs(x) - abs(y);
vec4 b0 = vec4( x.xy, y.xy );
vec4 b1 = vec4( x.zw, y.zw );
vec4 s0 = floor(b0)*2.0 + 1.0;
vec4 s1 = floor(b1)*2.0 + 1.0;
vec4 sh = -step(h, vec4(0.0));
vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;
vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;
vec3 p0 = vec3(a0.xy,h.x);
vec3 p1 = vec3(a0.zw,h.y);
vec3 p2 = vec3(a1.xy,h.z);
vec3 p3 = vec3(a1.zw,h.w);
vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));
p0 *= norm.x;
p1 *= norm.y;
p2 *= norm.z;
p3 *= norm.w;
vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
m = m * m;
return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3) ) );
}
float snoise(float x, float y, float z){
return snoise(vec3(x, y, z));
}
void main(void) {
const float scale = 1.0;
float noise = snoise(vTextureCoord.x * noiseScale, vTextureCoord.y * noiseScale, seed);
noise = abs(noise - 0.5);
float d = smoothstep(.4, .35, noise);
gl_FragColor = vec4(vec3(0.0), d);
} | {
"pile_set_name": "Github"
} |
// +build linux,riscv64
package remote
import "syscall"
// linux_riscv64 doesn't have syscall.Dup2 which ginkgo uses, so
// use the nearly identical syscall.Dup3 instead
func syscallDup(oldfd int, newfd int) (err error) {
return syscall.Dup3(oldfd, newfd, 0)
}
| {
"pile_set_name": "Github"
} |
/* Copyright 2003 Kjetil S. Matheussen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern LANGSPEC void posix_EndPlayer(void);
extern LANGSPEC bool posix_InitPlayer(void);
| {
"pile_set_name": "Github"
} |
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview Tests for differential fuzzing.
*/
'use strict';
const assert = require('assert');
const program = require('commander');
const sinon = require('sinon');
const helpers = require('./helpers.js');
const scriptMutator = require('../script_mutator.js');
const sourceHelpers = require('../source_helpers.js');
const random = require('../random.js');
const { DifferentialFuzzMutator, DifferentialFuzzSuppressions } = require(
'../mutators/differential_fuzz_mutator.js');
const { DifferentialScriptMutator } = require(
'../differential_script_mutator.js');
const sandbox = sinon.createSandbox();
function testMutators(settings, mutatorClass, inputFile, expectedFile) {
const source = helpers.loadTestData('differential_fuzz/' + inputFile);
const mutator = new mutatorClass(settings);
mutator.mutate(source);
const mutated = sourceHelpers.generateCode(source);
helpers.assertExpectedResult(
'differential_fuzz/' + expectedFile, mutated);
}
describe('Differential fuzzing', () => {
beforeEach(() => {
// Zero settings for all mutators.
this.settings = scriptMutator.defaultSettings();
for (const key of Object.keys(this.settings)) {
this.settings[key] = 0.0;
}
// By default, deterministically use all mutations of differential
// fuzzing.
this.settings['DIFF_FUZZ_EXTRA_PRINT'] = 1.0;
this.settings['DIFF_FUZZ_TRACK_CAUGHT'] = 1.0;
// Fake fuzzer being called with --input_dir flag.
this.oldInputDir = program.input_dir;
program.input_dir = helpers.BASE_DIR;
});
afterEach(() => {
sandbox.restore();
program.input_dir = this.oldInputDir;
});
it('applies suppressions', () => {
// This selects the first random variable when replacing .arguments.
sandbox.stub(random, 'single').callsFake(a => a[0]);
testMutators(
this.settings,
DifferentialFuzzSuppressions,
'suppressions.js',
'suppressions_expected.js');
});
it('adds extra printing', () => {
testMutators(
this.settings,
DifferentialFuzzMutator,
'mutations.js',
'mutations_expected.js');
});
it('does no extra printing', () => {
this.settings['DIFF_FUZZ_EXTRA_PRINT'] = 0.0;
testMutators(
this.settings,
DifferentialFuzzMutator,
'exceptions.js',
'exceptions_expected.js');
});
it('runs end to end', () => {
// Don't choose any zeroed settings or IGNORE_DEFAULT_PROB in try-catch
// mutator. Choose using original flags with >= 2%.
const chooseOrigFlagsProb = 0.2;
sandbox.stub(random, 'choose').callsFake((p) => p >= chooseOrigFlagsProb);
// Fake build directory from which two json configurations for flags are
// loaded.
const env = {
APP_DIR: 'test_data/differential_fuzz',
GENERATE: process.env.GENERATE,
};
sandbox.stub(process, 'env').value(env);
// Fake loading resources and instead load one fixed fake file for each.
sandbox.stub(sourceHelpers, 'loadResource').callsFake(() => {
return helpers.loadTestData('differential_fuzz/fake_resource.js');
});
// Load input files.
const files = [
'differential_fuzz/input1.js',
'differential_fuzz/input2.js',
];
const sources = files.map(helpers.loadTestData);
// Apply top-level fuzzing, with all probabilistic configs switched off.
this.settings['DIFF_FUZZ_EXTRA_PRINT'] = 0.0;
this.settings['DIFF_FUZZ_TRACK_CAUGHT'] = 0.0;
const mutator = new DifferentialScriptMutator(
this.settings, helpers.DB_DIR);
const mutated = mutator.mutateMultiple(sources);
helpers.assertExpectedResult(
'differential_fuzz/combined_expected.js', mutated.code);
// Flags for v8_foozzie.py are calculated from v8_fuzz_experiments.json and
// v8_fuzz_flags.json in test_data/differential_fuzz.
const expectedFlags = [
'--first-config=ignition',
'--second-config=ignition_turbo',
'--second-d8=d8',
'--second-config-extra-flags=--foo1',
'--second-config-extra-flags=--foo2',
'--first-config-extra-flags=--flag1',
'--second-config-extra-flags=--flag1',
'--first-config-extra-flags=--flag2',
'--second-config-extra-flags=--flag2',
'--first-config-extra-flags=--flag3',
'--second-config-extra-flags=--flag3',
'--first-config-extra-flags=--flag4',
'--second-config-extra-flags=--flag4'
];
assert.deepEqual(expectedFlags, mutated.flags);
});
});
| {
"pile_set_name": "Github"
} |
/* randist/binomial.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 James Theiler, Brian Gough
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "gsl__config.h"
#include <math.h>
#include "gsl_sys.h"
#include "gsl_rng.h"
#include "gsl_randist.h"
#include "gsl_sf_gamma.h"
/* The binomial distribution has the form,
prob(k) = n!/(k!(n-k)!) * p^k (1-p)^(n-k) for k = 0, 1, ..., n
This is the algorithm from Knuth */
/* Default binomial generator is now in binomial_tpe.c */
unsigned int
gsl_ran_binomial_knuth (const gsl_rng * r, double p, unsigned int n)
{
unsigned int i, a, b, k = 0;
while (n > 10) /* This parameter is tunable */
{
double X;
a = 1 + (n / 2);
b = 1 + n - a;
X = gsl_ran_beta (r, (double) a, (double) b);
if (X >= p)
{
n = a - 1;
p /= X;
}
else
{
k += a;
n = b - 1;
p = (p - X) / (1 - X);
}
}
for (i = 0; i < n; i++)
{
double u = gsl_rng_uniform (r);
if (u < p)
k++;
}
return k;
}
double
gsl_ran_binomial_pdf (const unsigned int k, const double p,
const unsigned int n)
{
if (k > n)
{
return 0;
}
else
{
double P;
if (p == 0)
{
P = (k == 0) ? 1 : 0;
}
else if (p == 1)
{
P = (k == n) ? 1 : 0;
}
else
{
double ln_Cnk = gsl_sf_lnchoose (n, k);
P = ln_Cnk + k * log (p) + (n - k) * log1p (-p);
P = exp (P);
}
return P;
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html><!-- DO NOT EDIT. This file auto-generated by generate_closure_unit_tests.js --><!--
Copyright 2017 The Closure Library Authors. All Rights Reserved.
Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
--><html><head><meta charset="UTF-8">
<script src="../../base.js"></script>
<script>goog.require('goog.labs.events.NonDisposableEventTargetTest');</script>
<title>Closure Unit Tests - goog.labs.events.NonDisposableEventTargetTest</title></head><body></body></html> | {
"pile_set_name": "Github"
} |
package com.eriwen.gradle.js
import com.eriwen.gradle.js.source.JavaScriptSourceSet
import com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.NamedDomainObjectFactory
import org.gradle.api.Project
import org.gradle.api.internal.file.FileResolver
import org.gradle.internal.reflect.Instantiator
import org.gradle.util.ConfigureUtil
class JavaScriptExtension {
public static final NAME = "javascript"
final NamedDomainObjectContainer<JavaScriptSourceSet> source
JavaScriptExtension(Project project, Instantiator instantiator, FileResolver fileResolver) {
source = project.container(JavaScriptSourceSet.class, new NamedDomainObjectFactory<JavaScriptSourceSet>() {
@Override
JavaScriptSourceSet create(String name) {
return instantiator.newInstance(DefaultJavaScriptSourceSet.class, name, project, instantiator, fileResolver);
}
})
}
void source(Closure closure) {
ConfigureUtil.configure(closure, source)
}
}
| {
"pile_set_name": "Github"
} |
<HTML>
<HEAD>
<TITLE>bochs: The Open Source IA-32 Emulation Project (Bochs Links)</TITLE>
<!--#include virtual="includes/header.txt" -->
<img src="images/logo.gif" alt="A Window, Tux, and the BSD Daemon" width="160" height="175" align="right">
<BR><font face="arial, helvetica" color="#1e029a" size="4"><b>Bochs-related Links</b></font><BR>
<ul>
<li>
<a href="http://www.fysnet.net/mtools.htm">Ben Lunt's MTOOLS for win32</a>. Mtools allows you to read and write files inside a DOS/Windows
disk image file. For other platforms, visit the <a href="http://gnu.org/s/mtools/">Mtools main site</a> for source code.
<li>
Don Becker's <a href="http://www.psyon.org/bochs-win32">Bochs-Win32 page</a>
contains binaries for Windows platforms.
<li>
<a href="http://www.psyon.org/bochs-rfb">Bochs-RFB</a>, also by Don Becker,
allows you to access the emulated system via the VNC Viewer from AT&T.
Don's Bochs-RFB code is now integrated into Bochs as of version 1.2.pre1.
<li>
Christophe Bothamy has written an <a href="http://www.nongnu.org/vgabios/">Open Source VGA BIOS</a>, distributed under the LGPL.
<li>
<a href="http://bfe.sourceforge.net">BFE</a> is a graphical debugger interface for
Bochs by <a href="mailto:brand@qzx.com">Brand Huntsman</a>.
<li> Georg Potthast has written a <a href="http://peter-bochs.googlecode.com/files/Bochs%20-%20a%20Guide%20and%20Tutorial%20for%20Windows%20II.pdf">guide and tutorial</a> for running Bochs on Windows.
</ul>
<!--#include virtual="includes/footer.txt" -->
Last Modified on <!--#flastmod file="links.html" -->.<BR>
<!--#include virtual="includes/cright.txt" -->
</BODY>
</HTML>
| {
"pile_set_name": "Github"
} |
#include <gtest/gtest.h>
#include <torch/torch.h>
#include <algorithm>
#include <memory>
#include <vector>
#include <test/cpp/api/support.h>
using namespace torch::nn;
using namespace torch::test;
struct ModuleListTest : torch::test::SeedingFixture {};
TEST_F(ModuleListTest, ConstructsFromSharedPointer) {
struct M : torch::nn::Module {
explicit M(int value_) : value(value_) {}
int value;
};
ModuleList list(
std::make_shared<M>(1), std::make_shared<M>(2), std::make_shared<M>(3));
ASSERT_EQ(list->size(), 3);
}
TEST_F(ModuleListTest, ConstructsFromConcreteType) {
static int copy_count;
struct M : torch::nn::Module {
explicit M(int value_) : value(value_) {}
M(const M& other) : torch::nn::Module(other) {
copy_count++;
}
int value;
};
copy_count = 0;
ModuleList list(M(1), M(2), M(3));
ASSERT_EQ(list->size(), 3);
// NOTE: The current implementation expects each module to be copied exactly
// once, which happens when the module is passed into `std::make_shared<T>()`.
// TODO: Find a way to avoid copying, and then delete the copy constructor of
// `M`.
ASSERT_EQ(copy_count, 3);
}
TEST_F(ModuleListTest, ConstructsFromModuleHolder) {
struct MImpl : torch::nn::Module {
explicit MImpl(int value_) : value(value_) {}
int value;
};
struct M : torch::nn::ModuleHolder<MImpl> {
using torch::nn::ModuleHolder<MImpl>::ModuleHolder;
using torch::nn::ModuleHolder<MImpl>::get;
};
ModuleList list(M(1), M(2), M(3));
ASSERT_EQ(list->size(), 3);
}
TEST_F(ModuleListTest, PushBackAddsAnElement) {
struct M : torch::nn::Module {
explicit M(int value_) : value(value_) {}
int value;
};
ModuleList list;
ASSERT_EQ(list->size(), 0);
ASSERT_TRUE(list->is_empty());
list->push_back(Linear(3, 4));
ASSERT_EQ(list->size(), 1);
list->push_back(std::make_shared<M>(1));
ASSERT_EQ(list->size(), 2);
list->push_back(M(2));
ASSERT_EQ(list->size(), 3);
}
TEST_F(ModuleListTest, Insertion) {
struct MImpl : torch::nn::Module {
explicit MImpl(int value_) : value(value_) {}
int value;
};
TORCH_MODULE(M);
ModuleList list;
list->push_back(MImpl(1));
ASSERT_EQ(list->size(), 1);
list->insert(0, std::make_shared<MImpl>(2));
ASSERT_EQ(list->size(), 2);
list->insert(1, M(3));
ASSERT_EQ(list->size(), 3);
list->insert(3, M(4));
ASSERT_EQ(list->size(), 4);
ASSERT_EQ(list->at<MImpl>(0).value, 2);
ASSERT_EQ(list->at<MImpl>(1).value, 3);
ASSERT_EQ(list->at<MImpl>(2).value, 1);
ASSERT_EQ(list->at<MImpl>(3).value, 4);
std::unordered_map<size_t, size_t> U = {{0, 2}, {1, 3}, {2, 1}, {3, 4}};
for (const auto& P : list->named_modules("", false))
ASSERT_EQ(U[std::stoul(P.key())], P.value()->as<M>()->value);
}
TEST_F(ModuleListTest, AccessWithAt) {
struct M : torch::nn::Module {
explicit M(int value_) : value(value_) {}
int value;
};
std::vector<std::shared_ptr<M>> modules = {
std::make_shared<M>(1), std::make_shared<M>(2), std::make_shared<M>(3)};
ModuleList list;
for (auto& module : modules) {
list->push_back(module);
}
ASSERT_EQ(list->size(), 3);
// returns the correct module for a given index
for (size_t i = 0; i < modules.size(); ++i) {
ASSERT_EQ(&list->at<M>(i), modules[i].get());
}
// throws for a bad index
ASSERT_THROWS_WITH(list->at<M>(modules.size() + 1), "Index out of range");
ASSERT_THROWS_WITH(
list->at<M>(modules.size() + 1000000), "Index out of range");
}
TEST_F(ModuleListTest, AccessWithPtr) {
struct M : torch::nn::Module {
explicit M(int value_) : value(value_) {}
int value;
};
std::vector<std::shared_ptr<M>> modules = {
std::make_shared<M>(1), std::make_shared<M>(2), std::make_shared<M>(3)};
ModuleList list;
for (auto& module : modules) {
list->push_back(module);
}
ASSERT_EQ(list->size(), 3);
// returns the correct module for a given index
for (size_t i = 0; i < modules.size(); ++i) {
ASSERT_EQ(list->ptr(i).get(), modules[i].get());
ASSERT_EQ(list[i].get(), modules[i].get());
ASSERT_EQ(list->ptr<M>(i).get(), modules[i].get());
}
// throws for a bad index
ASSERT_THROWS_WITH(list->ptr(modules.size() + 1), "Index out of range");
ASSERT_THROWS_WITH(list->ptr(modules.size() + 1000000), "Index out of range");
}
TEST_F(ModuleListTest, SanityCheckForHoldingStandardModules) {
ModuleList list(
Linear(10, 3),
Conv2d(1, 2, 3),
Dropout(0.5),
BatchNorm2d(5),
Embedding(4, 10),
LSTM(4, 5));
}
TEST_F(ModuleListTest, ExtendPushesModulesFromOtherModuleList) {
struct A : torch::nn::Module {};
struct B : torch::nn::Module {};
struct C : torch::nn::Module {};
struct D : torch::nn::Module {};
ModuleList a(A{}, B{});
ModuleList b(C{}, D{});
a->extend(*b);
ASSERT_EQ(a->size(), 4);
ASSERT_TRUE(a[0]->as<A>());
ASSERT_TRUE(a[1]->as<B>());
ASSERT_TRUE(a[2]->as<C>());
ASSERT_TRUE(a[3]->as<D>());
ASSERT_EQ(b->size(), 2);
ASSERT_TRUE(b[0]->as<C>());
ASSERT_TRUE(b[1]->as<D>());
std::vector<std::shared_ptr<A>> c = {std::make_shared<A>(),
std::make_shared<A>()};
b->extend(c);
ASSERT_EQ(b->size(), 4);
ASSERT_TRUE(b[0]->as<C>());
ASSERT_TRUE(b[1]->as<D>());
ASSERT_TRUE(b[2]->as<A>());
ASSERT_TRUE(b[3]->as<A>());
}
TEST_F(ModuleListTest, HasReferenceSemantics) {
ModuleList first(Linear(2, 3), Linear(4, 4), Linear(4, 5));
ModuleList second(first);
ASSERT_EQ(first.get(), second.get());
ASSERT_EQ(first->size(), second->size());
ASSERT_TRUE(std::equal(
first->begin(),
first->end(),
second->begin(),
[](const std::shared_ptr<Module>& first,
const std::shared_ptr<Module>& second) {
return first.get() == second.get();
}));
}
TEST_F(ModuleListTest, IsCloneable) {
ModuleList list(Linear(3, 4), Functional(torch::relu), BatchNorm1d(3));
ModuleList clone = std::dynamic_pointer_cast<ModuleListImpl>(list->clone());
ASSERT_EQ(list->size(), clone->size());
for (size_t i = 0; i < list->size(); ++i) {
// The modules should be the same kind (type).
ASSERT_EQ(list[i]->name(), clone[i]->name());
// But not pointer-equal (distinct objects).
ASSERT_NE(list[i], clone[i]);
}
// Verify that the clone is deep, i.e. parameters of modules are cloned too.
torch::NoGradGuard no_grad;
auto params1 = list->named_parameters();
auto params2 = clone->named_parameters();
ASSERT_EQ(params1.size(), params2.size());
for (auto& param : params1) {
ASSERT_FALSE(pointer_equal(param.value(), params2[param.key()]));
ASSERT_EQ(param->device(), params2[param.key()].device());
ASSERT_TRUE(param->allclose(params2[param.key()]));
param->add_(2);
}
for (auto& param : params1) {
ASSERT_FALSE(param->allclose(params2[param.key()]));
}
}
TEST_F(ModuleListTest, RegistersElementsAsSubmodules) {
ModuleList list(Linear(10, 3), Conv2d(1, 2, 3), Dropout2d(0.5));
auto modules = list->children();
ASSERT_TRUE(modules[0]->as<Linear>());
ASSERT_TRUE(modules[1]->as<Conv2d>());
ASSERT_TRUE(modules[2]->as<Dropout2d>());
}
TEST_F(ModuleListTest, NestingIsPossible) {
ModuleList list(
(ModuleList(Dropout(), Dropout())),
(ModuleList(Dropout(), Dropout()), Dropout()));
}
TEST_F(ModuleListTest, CloneToDevice_CUDA) {
ModuleList list(Linear(3, 4), Functional(torch::relu), BatchNorm1d(3));
torch::Device device(torch::kCUDA, 0);
ModuleList clone =
std::dynamic_pointer_cast<ModuleListImpl>(list->clone(device));
for (const auto& p : clone->parameters()) {
ASSERT_EQ(p.device(), device);
}
for (const auto& b : clone->buffers()) {
ASSERT_EQ(b.device(), device);
}
}
TEST_F(ModuleListTest, PrettyPrintModuleList) {
ModuleList list(
Linear(10, 3),
Conv2d(1, 2, 3),
Dropout(0.5),
BatchNorm2d(5),
Embedding(4, 10),
LSTM(4, 5));
ASSERT_EQ(
c10::str(list),
"torch::nn::ModuleList(\n"
" (0): torch::nn::Linear(in_features=10, out_features=3, bias=true)\n"
" (1): torch::nn::Conv2d(1, 2, kernel_size=[3, 3], stride=[1, 1])\n"
" (2): torch::nn::Dropout(p=0.5, inplace=false)\n"
" (3): torch::nn::BatchNorm2d(5, eps=1e-05, momentum=0.1, affine=true, track_running_stats=true)\n"
" (4): torch::nn::Embedding(num_embeddings=4, embedding_dim=10)\n"
" (5): torch::nn::LSTM(input_size=4, hidden_size=5, num_layers=1, bias=true, batch_first=false, dropout=0, bidirectional=false)\n"
")");
}
TEST_F(ModuleListTest, RangeBasedForLoop) {
torch::nn::ModuleList mlist(
torch::nn::Linear(3, 4),
torch::nn::BatchNorm1d(4),
torch::nn::Dropout(0.5)
);
std::stringstream buffer;
for (const auto &module : *mlist) {
module->pretty_print(buffer);
}
}
| {
"pile_set_name": "Github"
} |
/*
* @flow strict-local
* Copyright (C) 2019 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/
import * as React from 'react';
import Table from '../Table';
import formatLabelCode from '../../utility/formatLabelCode';
import {
defineCheckboxColumn,
defineNameColumn,
defineTextColumn,
defineTypeColumn,
defineEntityColumn,
defineBeginDateColumn,
defineEndDateColumn,
ratingsColumn,
removeFromMergeColumn,
} from '../../utility/tableColumns';
type Props = {
+$c: CatalystContextT,
+checkboxes?: string,
+labels: $ReadOnlyArray<LabelT>,
+mergeForm?: MergeFormT,
+order?: string,
+showRatings?: boolean,
+sortable?: boolean,
};
const LabelList = ({
$c,
checkboxes,
labels,
mergeForm,
order,
showRatings = false,
sortable,
}: Props): React.Element<typeof Table> => {
const columns = React.useMemo(
() => {
const checkboxColumn = $c.user && (nonEmpty(checkboxes) || mergeForm)
? defineCheckboxColumn({mergeForm: mergeForm, name: checkboxes})
: null;
const nameColumn = defineNameColumn<LabelT>({
order: order,
sortable: sortable,
title: l('Label'),
});
const typeColumn = defineTypeColumn({
order: order,
sortable: sortable,
typeContext: 'label_type',
});
const labelCodeColumn = defineTextColumn<LabelT>({
columnName: 'label_code',
getText: entity => entity.label_code
? formatLabelCode(entity.label_code)
: '',
order: order,
sortable: sortable,
title: l('Code'),
});
const areaColumn = defineEntityColumn<LabelT>({
columnName: 'area',
getEntity: entity => entity.area,
order: order,
sortable: sortable,
title: l('Area'),
});
const beginDateColumn = defineBeginDateColumn({
order: order,
sortable: sortable,
});
const endDateColumn = defineEndDateColumn({
order: order,
sortable: sortable,
});
return [
...(checkboxColumn ? [checkboxColumn] : []),
nameColumn,
typeColumn,
labelCodeColumn,
areaColumn,
beginDateColumn,
endDateColumn,
...(showRatings ? [ratingsColumn] : []),
...(mergeForm && labels.length > 2 ? [removeFromMergeColumn] : []),
];
},
[
$c.user,
checkboxes,
labels,
mergeForm,
order,
showRatings,
sortable,
],
);
return <Table columns={columns} data={labels} />;
};
export default LabelList;
| {
"pile_set_name": "Github"
} |
# JDCaptchaCrack
Python + Selenium + chromedirver 破解京东登录滑块验证码
2019.4.17更新:重新放出源码,懒,后续可能会写篇文章介绍破解思路和简析源码.
2019.1.16更新:被说公布对京东影响不好,现撤下脚本.
以下是旧说明==============================================
如果你感兴趣,请给我一下start,感谢!
运行效果如下:

s | {
"pile_set_name": "Github"
} |
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>
<script src="../layer/vector/TOPOJSON.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script type='text/javascript'>
var map = L.map('map', {center: L.latLng(58.4, 43.0), zoom: 3});
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);;
var borders = new L.TOPOJSON('country.min.topojson', {async: true}).addTo(map);
borders.on('addlayer',function (e) {
e.layer.eachLayer(function (dist) {
var iso = dist.toGeoJSON().properties.ISO2.toLowerCase();
dist.bindPopup('<strong>'+dist.toGeoJSON().properties.NAME_ISO+'</strong>',{closeButton:false});
if (dist.options) {
dist.options.className = 'country country-'+iso;
} else {
dist.eachLayer(function (dist2) {
dist2.options.className = 'country country-'+iso;
});
}
});
});
borders.on('loaded', function (e) { map.fitBounds(e.target.getBounds()); });
</script>
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2010, 2011, 2014-2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#if ENABLE(SMOOTH_SCROLLING)
#include "IntRect.h"
#include "FloatPoint.h"
#include "FloatSize.h"
#include "ScrollAnimator.h"
#include "Timer.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS WebScrollAnimationHelperDelegate;
OBJC_CLASS WebScrollerImpPairDelegate;
OBJC_CLASS WebScrollerImpDelegate;
typedef id ScrollerImpPair;
namespace WebCore {
class Scrollbar;
class ScrollAnimatorMac : public ScrollAnimator {
public:
ScrollAnimatorMac(ScrollableArea&);
virtual ~ScrollAnimatorMac();
void immediateScrollToPositionForScrollAnimation(const FloatPoint& newPosition);
bool haveScrolledSincePageLoad() const { return m_haveScrolledSincePageLoad; }
void updateScrollerStyle();
bool scrollbarPaintTimerIsActive() const;
void startScrollbarPaintTimer();
void stopScrollbarPaintTimer();
void setVisibleScrollerThumbRect(const IntRect&);
bool scrollbarsCanBeActive() const final;
private:
RetainPtr<id> m_scrollAnimationHelper;
RetainPtr<WebScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate;
RetainPtr<ScrollerImpPair> m_scrollerImpPair;
RetainPtr<WebScrollerImpPairDelegate> m_scrollerImpPairDelegate;
RetainPtr<WebScrollerImpDelegate> m_horizontalScrollerImpDelegate;
RetainPtr<WebScrollerImpDelegate> m_verticalScrollerImpDelegate;
void initialScrollbarPaintTimerFired();
Timer m_initialScrollbarPaintTimer;
void sendContentAreaScrolledTimerFired();
Timer m_sendContentAreaScrolledTimer;
FloatSize m_contentAreaScrolledTimerScrollDelta;
bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping) override;
#if ENABLE(RUBBER_BANDING)
bool shouldForwardWheelEventsToParent(const PlatformWheelEvent&);
bool handleWheelEvent(const PlatformWheelEvent&) override;
#endif
void handleWheelEventPhase(PlatformWheelEventPhase) override;
void cancelAnimations() override;
void notifyPositionChanged(const FloatSize& delta) override;
void contentAreaWillPaint() const override;
void mouseEnteredContentArea() override;
void mouseExitedContentArea() override;
void mouseMovedInContentArea() override;
void mouseEnteredScrollbar(Scrollbar*) const override;
void mouseExitedScrollbar(Scrollbar*) const override;
void mouseIsDownInScrollbar(Scrollbar*, bool) const override;
void willStartLiveResize() override;
void contentsResized() const override;
void willEndLiveResize() override;
void contentAreaDidShow() override;
void contentAreaDidHide() override;
void didBeginScrollGesture() const;
void didEndScrollGesture() const;
void mayBeginScrollGesture() const;
void lockOverlayScrollbarStateToHidden(bool shouldLockState) final;
void didAddVerticalScrollbar(Scrollbar*) override;
void willRemoveVerticalScrollbar(Scrollbar*) override;
void didAddHorizontalScrollbar(Scrollbar*) override;
void willRemoveHorizontalScrollbar(Scrollbar*) override;
void invalidateScrollbarPartLayers(Scrollbar*) override;
void verticalScrollbarLayerDidChange() override;
void horizontalScrollbarLayerDidChange() override;
bool shouldScrollbarParticipateInHitTesting(Scrollbar*) override;
void notifyContentAreaScrolled(const FloatSize& delta) override;
// sendContentAreaScrolledSoon() will do the same work that sendContentAreaScrolled() does except
// it does it after a zero-delay timer fires. This will prevent us from updating overlay scrollbar
// information during layout.
void sendContentAreaScrolled(const FloatSize& scrollDelta);
void sendContentAreaScrolledSoon(const FloatSize& scrollDelta);
FloatPoint adjustScrollPositionIfNecessary(const FloatPoint&) const;
void immediateScrollToPosition(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
bool isRubberBandInProgress() const override;
bool isScrollSnapInProgress() const override;
#if ENABLE(RUBBER_BANDING)
/// ScrollControllerClient member functions.
IntSize stretchAmount() override;
bool allowsHorizontalStretching(const PlatformWheelEvent&) override;
bool allowsVerticalStretching(const PlatformWheelEvent&) override;
bool pinnedInDirection(const FloatSize&) override;
bool canScrollHorizontally() override;
bool canScrollVertically() override;
bool shouldRubberBandInDirection(ScrollDirection) override;
void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) override;
void immediateScrollBy(const FloatSize&) override;
void adjustScrollPositionToBoundsIfNecessary() override;
bool isAlreadyPinnedInDirectionOfGesture(const PlatformWheelEvent&, ScrollEventAxis);
#endif
bool m_haveScrolledSincePageLoad;
bool m_needsScrollerStyleUpdate;
IntRect m_visibleScrollerThumbRect;
};
} // namespace WebCore
#endif // ENABLE(SMOOTH_SCROLLING)
| {
"pile_set_name": "Github"
} |
/*
* This file is part of INAV.
*
* INAV is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* INAV is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define TARGET_BOARD_IDENTIFIER "FXF7"
#define USBD_PRODUCT_STRING "FOXEER722DUAL"
/*** Indicators ***/
#define LED0 PC15
#define BEEPER PA4
#define BEEPER_INVERTED
/*** IMU sensors ***/
#define USE_EXTI
// We use dual IMU sensors, they have to be described in the target file
#define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
#define USE_MPU_DATA_READY_SIGNAL
#ifdef FOXEERF722DUAL
#define USE_DUAL_GYRO
#endif
// MPU6000
#define USE_IMU_MPU6000
#define IMU_MPU6000_ALIGN CW270_DEG
#define MPU6000_CS_PIN PB2
#define MPU6000_SPI_BUS BUS_SPI1
#define MPU6000_EXTI_PIN PC4
// ICM20602 - handled by MPU6500 driver
#ifdef FOXEERF722DUAL
#define USE_IMU_MPU6500
#define IMU_MPU6500_ALIGN CW180_DEG
#define MPU6500_CS_PIN PB1
#define MPU6500_SPI_BUS BUS_SPI1
#define MPU6500_EXTI_PIN PB0
#endif
/*** SPI/I2C bus ***/
#define USE_SPI
#define USE_SPI_DEVICE_1
#define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7
#define USE_SPI_DEVICE_2
#define SPI2_SCK_PIN PB13
#define SPI2_MISO_PIN PB14
#define SPI2_MOSI_PIN PB15
#define USE_SPI_DEVICE_3
#define SPI3_SCK_PIN PC10
#define SPI3_MISO_PIN PC11
#define SPI3_MOSI_PIN PB5
#define USE_I2C
#define USE_I2C_DEVICE_1
#define I2C1_SCL PB8
#define I2C1_SDA PB9
/*** Onboard flash ***/
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define M25P16_CS_PIN PB12
#define M25P16_SPI_BUS BUS_SPI2
/*** OSD ***/
#define USE_OSD
#define USE_MAX7456
#define MAX7456_SPI_BUS BUS_SPI3
#define MAX7456_CS_PIN PC3
/*** Serial ports ***/
#define USE_VCP
#define USE_UART1
#define UART1_TX_PIN PB6
#define UART1_RX_PIN PB7
#define USE_UART2
#define UART2_TX_PIN PA2
#define UART2_RX_PIN PA3
#define USE_UART3
#define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11
#define USE_UART4
#define UART4_TX_PIN PA0
#define UART4_RX_PIN PA1
#define USE_UART5
#define UART5_TX_PIN PC12
#define UART5_RX_PIN PD2
#define SERIAL_PORT_COUNT 6
/*** BARO & MAG ***/
#define USE_BARO
#define BARO_I2C_BUS BUS_I2C1
#define USE_BARO_BMP280
#define USE_BARO_MS5611
#define USE_MAG
#define MAG_I2C_BUS BUS_I2C1
#define USE_MAG_HMC5883
#define USE_MAG_QMC5883
#define USE_MAG_IST8310
#define USE_MAG_MAG3110
#define USE_MAG_LIS3MDL
/*** ADC ***/
#define USE_ADC
#define ADC_CHANNEL_1_PIN PC0
#define ADC_CHANNEL_2_PIN PC2
#define ADC_CHANNEL_3_PIN PA0
#define VBAT_ADC_CHANNEL ADC_CHN_1
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
#define RSSI_ADC_CHANNEL ADC_CHN_3
/*** LED STRIP ***/
#define USE_LED_STRIP
#define WS2811_PIN PA15
/*** Default settings ***/
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
#define SERIALRX_UART SERIAL_PORT_USART1
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
//#define CURRENT_METER_SCALE 166
/*** Timer/PWM output ***/
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define MAX_PWM_OUTPUT_PORTS 6
#define USE_DSHOT
#define USE_ESC_SENSOR
/*** Used pins ***/
#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2)) | {
"pile_set_name": "Github"
} |
Example of Convergence Tester
Koi, Tatsumi
SLAC National Accelerator Laboratory / PPA
tkoi@slac.stanford.eedu
This example shows how to use convergece tester in Geant4.
The aim of Convergence Tester
After a Monte Carlo simulation, we get an answer. However how to estimate quality of the answer.
The answer is usually given in a form of average value.
But sometimes the value is strongly affected by single or a few events in the full calculation.
In such case, we must concern about quality of the value.
What we must remember is
Large number of history does not valid result of simulation.
Small Relative Error does not valid result of simulation
Convergence tester provides statistical information
to assist establishing valid confidence intervals for Monte Carlo results for users.
Geometry and Physics are same to exampleB1. Please see README.B1
Note that in this example, the classes with the code added for
the purpose of demonstration of the Convergence Tester start with a prefix
B1Con instead of B1 and also the executable and the test macro names are changed
in exampleB1Con and exampleB1Con.in.
Known problem:
Computing time of T cannot be gotten properly in current MT migration of example of B1Con. Therefore
FOM (=1/(R^2T) where R is relative error and T is computing time) relates numbers are unusable.
***********************************************************************************************************************
Output example
// Part I.A
// Basic statistics values
G4ConvergenceTester Output Result of DOSE_TALLY
EFFICIENCY = 0.601
MEAN = 4.81721e-12
VAR = 2.15334e-23
SD = 4.64041e-12
R = 0.0304622
SHIFT = 2.22459e-13
VOV = 0.000166754
FOM = 1238.68
// Part I.B
// If the largeset scored events happen at next to the last event,
// then how much the event effects the statistics values of the calculation
THE LARGEST SCORE = 1.07301e-11 and it happend at 487th event
Affected Mean = 4.82311e-12 and its ratio to orignal is 1.00123
Affected VAR = 2.15468e-23 and its ratio to orignal is 1.00062
Affected R = 0.0304192 and its ratio to orignal is 0.998587
Affected SHIFT = 2.1804e-13 and its ratio to orignal is 0.980133
Affected FOM = 1238.68 and its ratio to orignal is 1
// Part I.C
// Convergence tests results
MEAN distribution is RANDOM
r follows 1/std::sqrt(N)
r is monotonically decrease
r is less than 0.1. r = 0.0304622
VOV follows 1/std::sqrt(N)
VOV is monotonically decrease
FOM distribution is not RANDOM
SLOPE is not large enough
This result passes 6 / 8 Convergence Test.
// Part II
// Profile of statistics values in the history
G4ConvergenceTester Output History of DOSE_TALLY
i/16 till_ith mean var sd r vov fom shift e r2eff r2int
1 62 4.94618e-12 2.04631e-23 4.52362e-12 0.115225 0.00313634 86.5745 -1.73435e-14 0.619048 0.00976801 0.00329797
2 124 4.69364e-12 2.10698e-23 4.59018e-12 0.0874712 0.001597 150.228 3.11143e-13 0.6 0.00533333 0.00225666
3 187 4.72161e-12 2.14009e-23 4.62612e-12 0.0714575 0.00101852 225.105 3.1009e-13 0.590426 0.00368986 0.00138916
4 249 4.95617e-12 2.13982e-23 4.62582e-12 0.0590299 0.000690138 329.865 9.71971e-14 0.62 0.00245161 0.00101898
5 312 4.8529e-12 2.13482e-23 4.62041e-12 0.0538155 0.000573301 396.887 1.95662e-13 0.607029 0.00206827 0.000818582
6 374 5.14255e-12 2.15736e-23 4.64474e-12 0.046641 0.000432121 528.379 -6.42963e-14 0.637333 0.00151743 0.000652145
7 437 5.03849e-12 2.13484e-23 4.62043e-12 0.0438173 0.000379317 598.673 2.54207e-14 0.636986 0.00130112 0.000614447
8 499 4.96962e-12 2.1429e-23 4.62914e-12 0.0416574 0.000329007 662.364 9.27708e-14 0.63 0.0011746 0.000557264
9 562 4.91513e-12 2.14709e-23 4.63367e-12 0.0397316 0.000285324 728.13 1.33544e-13 0.623446 0.0010728 0.000502991
10 624 4.82995e-12 2.13825e-23 4.62412e-12 0.0382954 0.000272664 783.766 2.19101e-13 0.616 0.000997403 0.000466792
11 687 4.79197e-12 2.13975e-23 4.62574e-12 0.0368022 0.000251788 848.661 2.48547e-13 0.606105 0.000944593 0.000407838
12 749 4.77183e-12 2.15116e-23 4.63807e-12 0.0354912 0.000227501 912.513 2.6728e-13 0.601333 0.000883962 0.000373986
13 812 4.76087e-12 2.14479e-23 4.63119e-12 0.0341162 0.000212259 987.548 2.70437e-13 0.597786 0.000827601 0.000334885
14 874 4.81359e-12 2.13296e-23 4.6184e-12 0.0324353 0.0001976 1092.56 2.14521e-13 0.603429 0.000751082 0.000299767
15 937 4.82018e-12 2.14558e-23 4.63204e-12 0.0313767 0.000181379 1167.52 2.18545e-13 0.601279 0.000706952 0.000276498
16 999 4.81721e-12 2.15334e-23 4.64041e-12 0.0304622 0.000166754 1238.68 2.22459e-13 0.601 0.000663894 0.000263125
**************************************************************************************************************************
Reference of this Convergence tests
MCNP(TM) -A General Monte Carlo N-Particle Transport Code
Version 4B
Judith F. Briesmeister, Editor
LA-12625-M, Issued: March 1997, UC 705 and UC 700
CHAPTER 2. GEOMETRY, DATA, PHYSICS, AND MATHEMATICS
VI. ESTIMATION OF THE MONTE CARLO PRECISION
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/default_bk"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/user_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ececec"
android:paddingBottom="25dp"
android:paddingTop="25dp"
>
<com.mogujie.tt.ui.widget.IMBaseImageView
android:id="@+id/user_portrait"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginLeft="15dp"
android:layout_alignParentLeft="true"
android:src="@drawable/tt_default_user_portrait_corner"
android:scaleType="centerCrop" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@id/user_portrait"
android:gravity="center|center_vertical"
android:layout_centerVertical="true"
>
<TextView
android:id="@+id/nickName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="17sp"/>
<TextView
android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/nickName"
android:layout_marginTop="5dp"
android:textColor="@color/default_light_grey_color"
android:textSize="14sp"
/>
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_centerVertical="true"
android:src="@drawable/tt_default_arrow" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settingPage"
android:layout_width="match_parent"
android:layout_height="45dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:textColor="@android:color/black"
android:textSize="15sp"
android:text="@string/notify_setting" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/tt_default_arrow"
android:visibility="visible"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:background="@drawable/tt_divide_line"
/>
<RelativeLayout
android:id="@+id/clearPage"
android:layout_width="match_parent"
android:layout_height="45dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:textColor="@android:color/black"
android:textSize="15sp"
android:text="@string/thumb_remove" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/tt_default_arrow"
android:visibility="gone"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:background="@drawable/tt_divide_line"
/>
<RelativeLayout
android:id="@+id/exitPage"
android:layout_width="match_parent"
android:layout_height="45dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:textColor="@android:color/black"
android:textSize="15sp"
android:text="@string/exit" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_centerVertical="true"
android:src="@drawable/tt_default_arrow"
android:visibility="gone"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:background="@drawable/tt_divide_line"
/>
</LinearLayout>
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateDrawable="@drawable/tt_progressbar"
android:indeterminateDuration="4000"
android:visibility="visible" />
</RelativeLayout> | {
"pile_set_name": "Github"
} |
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<link href="{% static "css/base.css" %}" rel="stylesheet">
</head>
<body>
<div id="header">
<span class="logo">Bookmarks</span>
{% if request.user.is_authenticated %}
<ul class="menu">
<li {% if section == "dashboard" %}class="selected"{% endif %}>
<a href="{% url "dashboard" %}">My dashboard</a>
</li>
<li {% if section == "images" %}class="selected"{% endif %}>
<a href="{% url "images:list" %}">Images</a>
</li>
<li {% if section == "people" %}class="selected"{% endif %}>
<a href="{% url "user_list" %}">People</a>
</li>
</ul>
{% endif %}
<span class="user">
{% if request.user.is_authenticated %}
Hello {{ request.user.first_name }},
<a href="{% url "logout" %}">Logout</a>
{% else %}
<a href="{% url "login" %}">Log-in</a>
{% endif %}
</span>
</div>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li class="{{ message.tags }}">
{{ message|safe }}
<a href="#" class="close">x</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div id="content">
{% block content %}
{% endblock %}
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script>
var csrftoken = Cookies.get('csrftoken');
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
$(document).ready(function(){
{% block domready %}
{% endblock %}
});
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
@class NSString;
@interface WCADShareInfo : NSObject
{
NSString *userName;
unsigned int memberCount;
}
@property(nonatomic) unsigned int memberCount; // @synthesize memberCount;
@property(retain, nonatomic) NSString *userName; // @synthesize userName;
- (void).cxx_destruct;
- (id)init;
@end
| {
"pile_set_name": "Github"
} |
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Solution-ChallengeActivity1-CircleClass.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.7
javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=circleclass.CircleClass
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
| {
"pile_set_name": "Github"
} |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http2
import (
"errors"
"io"
"sync"
)
// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like
// io.Pipe except there are no PipeReader/PipeWriter halves, and the
// underlying buffer is an interface. (io.Pipe is always unbuffered)
type pipe struct {
mu sync.Mutex
c sync.Cond // c.L lazily initialized to &p.mu
b pipeBuffer // nil when done reading
err error // read error once empty. non-nil means closed.
breakErr error // immediate read error (caller doesn't see rest of b)
donec chan struct{} // closed on error
readFn func() // optional code to run in Read before error
}
type pipeBuffer interface {
Len() int
io.Writer
io.Reader
}
func (p *pipe) Len() int {
p.mu.Lock()
defer p.mu.Unlock()
if p.b == nil {
return 0
}
return p.b.Len()
}
// Read waits until data is available and copies bytes
// from the buffer into p.
func (p *pipe) Read(d []byte) (n int, err error) {
p.mu.Lock()
defer p.mu.Unlock()
if p.c.L == nil {
p.c.L = &p.mu
}
for {
if p.breakErr != nil {
return 0, p.breakErr
}
if p.b != nil && p.b.Len() > 0 {
return p.b.Read(d)
}
if p.err != nil {
if p.readFn != nil {
p.readFn() // e.g. copy trailers
p.readFn = nil // not sticky like p.err
}
p.b = nil
return 0, p.err
}
p.c.Wait()
}
}
var errClosedPipeWrite = errors.New("write on closed buffer")
// Write copies bytes from p into the buffer and wakes a reader.
// It is an error to write more data than the buffer can hold.
func (p *pipe) Write(d []byte) (n int, err error) {
p.mu.Lock()
defer p.mu.Unlock()
if p.c.L == nil {
p.c.L = &p.mu
}
defer p.c.Signal()
if p.err != nil {
return 0, errClosedPipeWrite
}
if p.breakErr != nil {
return len(d), nil // discard when there is no reader
}
return p.b.Write(d)
}
// CloseWithError causes the next Read (waking up a current blocked
// Read if needed) to return the provided err after all data has been
// read.
//
// The error must be non-nil.
func (p *pipe) CloseWithError(err error) { p.closeWithError(&p.err, err, nil) }
// BreakWithError causes the next Read (waking up a current blocked
// Read if needed) to return the provided err immediately, without
// waiting for unread data.
func (p *pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) }
// closeWithErrorAndCode is like CloseWithError but also sets some code to run
// in the caller's goroutine before returning the error.
func (p *pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) }
func (p *pipe) closeWithError(dst *error, err error, fn func()) {
if err == nil {
panic("err must be non-nil")
}
p.mu.Lock()
defer p.mu.Unlock()
if p.c.L == nil {
p.c.L = &p.mu
}
defer p.c.Signal()
if *dst != nil {
// Already been done.
return
}
p.readFn = fn
if dst == &p.breakErr {
p.b = nil
}
*dst = err
p.closeDoneLocked()
}
// requires p.mu be held.
func (p *pipe) closeDoneLocked() {
if p.donec == nil {
return
}
// Close if unclosed. This isn't racy since we always
// hold p.mu while closing.
select {
case <-p.donec:
default:
close(p.donec)
}
}
// Err returns the error (if any) first set by BreakWithError or CloseWithError.
func (p *pipe) Err() error {
p.mu.Lock()
defer p.mu.Unlock()
if p.breakErr != nil {
return p.breakErr
}
return p.err
}
// Done returns a channel which is closed if and when this pipe is closed
// with CloseWithError.
func (p *pipe) Done() <-chan struct{} {
p.mu.Lock()
defer p.mu.Unlock()
if p.donec == nil {
p.donec = make(chan struct{})
if p.err != nil || p.breakErr != nil {
// Already hit an error.
p.closeDoneLocked()
}
}
return p.donec
}
| {
"pile_set_name": "Github"
} |
set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Analysis
BitReader
BitWriter
CodeGen
Core
Coroutines
IPO
IRReader
AggressiveInstCombine
InstCombine
Instrumentation
FuzzMutate
MC
ObjCARCOpts
ScalarOpts
Support
Target
TransformUtils
Vectorize
Passes
)
add_llvm_fuzzer(llvm-opt-fuzzer
llvm-opt-fuzzer.cpp
DUMMY_MAIN DummyOptFuzzer.cpp
)
| {
"pile_set_name": "Github"
} |
// Stdafx.cpp : source file that includes just the standard includes
// VisEmacs.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
#include "atlimpl.cpp"
| {
"pile_set_name": "Github"
} |
# Preview all emails at http://localhost:3000/rails/mailers/notifications_mailer
class SolutionCommentsMailerPreview < ActionMailer::Preview
def new_comment_for_solution_user
SolutionCommentsMailer.new_comment_for_solution_user(User.first, SolutionComment.first)
end
def new_comment_for_other_commenter
SolutionCommentsMailer.new_comment_for_other_commenter(User.first, SolutionComment.first)
end
end
| {
"pile_set_name": "Github"
} |
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program 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.
*
* 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 Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sk89q.worldedit.util.command.parametric;
import com.boydti.fawe.command.FawePrimitiveBinding;
import com.boydti.fawe.command.MaskBinding;
import com.boydti.fawe.command.PatternBinding;
import com.boydti.fawe.config.Commands;
import com.google.common.collect.ImmutableBiMap.Builder;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandPermissions;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.command.MethodCommands;
import com.sk89q.worldedit.internal.command.ActorAuthorizer;
import com.sk89q.worldedit.internal.command.CommandLoggingHandler;
import com.sk89q.worldedit.internal.command.UserCommandCompleter;
import com.sk89q.worldedit.internal.command.WorldEditBinding;
import com.sk89q.worldedit.util.auth.Authorizer;
import com.sk89q.worldedit.util.auth.NullAuthorizer;
import com.sk89q.worldedit.util.command.CallableProcessor;
import com.sk89q.worldedit.util.command.CommandCallable;
import com.sk89q.worldedit.util.command.CommandCompleter;
import com.sk89q.worldedit.util.command.Dispatcher;
import com.sk89q.worldedit.util.command.NullCompleter;
import com.sk89q.worldedit.util.command.ProcessedCallable;
import com.sk89q.worldedit.util.command.binding.PrimitiveBindings;
import com.sk89q.worldedit.util.command.binding.StandardBindings;
import com.sk89q.worldedit.util.command.binding.Switch;
import com.thoughtworks.paranamer.Paranamer;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Creates commands using annotations placed on methods and individual parameters of
* such methods.
*
* @see Command defines a command
* @see Switch defines a flag
*/
public class ParametricBuilder {
private final Map<Type, Binding> bindings = new HashMap<Type, Binding>();
private final Paranamer paranamer = new FaweParanamer();
private final List<InvokeListener> invokeListeners = new ArrayList<InvokeListener>();
private final List<ExceptionConverter> exceptionConverters = new ArrayList<ExceptionConverter>();
private Authorizer authorizer = new NullAuthorizer();
private CommandCompleter defaultCompleter = new NullCompleter();
/**
* Create a new builder.
* <p>
* <p>This method will install {@link PrimitiveBindings} and
* {@link StandardBindings} and default bindings.</p>
*/
public ParametricBuilder() {
addBinding(new FawePrimitiveBinding());
addBinding(new StandardBindings());
}
/**
* Add a binding for a given type or classifier (annotation).
* <p>
* <p>Whenever a method parameter is encountered, a binding must be found for it
* so that it can be called later to consume the stack of arguments provided by
* the user and return an object that is later passed to
* {@link Method#invoke(Object, Object...)}.</p>
* <p>
* <p>Normally, a {@link Type} is used to discern between different bindings, but
* if this is not specific enough, an annotation can be defined and used. This
* makes it a "classifier" and it will take precedence over the base type. For
* example, even if there is a binding that handles {@link String} parameters,
* a special {@code @MyArg} annotation can be assigned to a {@link String}
* parameter, which will cause the {@link Builder} to consult the {@link Binding}
* associated with {@code @MyArg} rather than with the binding for
* the {@link String} type.</p>
*
* @param binding the binding
* @param type a list of types (if specified) to override the binding's types
*/
public void addBinding(Binding binding, Type... type) {
if (type == null || type.length == 0) {
type = binding.getTypes();
}
for (Type t : type) {
bindings.put(t, binding);
}
}
/**
* Attach an invocation listener.
* <p>
* <p>Invocation handlers are called in order that their listeners are
* registered with a {@link ParametricBuilder}. It is not guaranteed that
* a listener may be called, in the case of a {@link CommandException} being
* thrown at any time before the appropriate listener or handler is called.
* It is possible for a
* {@link com.sk89q.worldedit.util.command.parametric.InvokeHandler#preInvoke(Object, Method, com.sk89q.worldedit.util.command.parametric.ParameterData[], Object[], CommandContext)} to
* be called for a invocation handler, but not the associated
* {@link com.sk89q.worldedit.util.command.parametric.InvokeHandler#postInvoke(Object, Method, com.sk89q.worldedit.util.command.parametric.ParameterData[], Object[], CommandContext)}.</p>
* <p>
* <p>An example of an invocation listener is one to handle
* {@link CommandPermissions}, by first checking to see if permission is available
* in a {@link com.sk89q.worldedit.util.command.parametric.InvokeHandler#preInvoke(Object, Method, com.sk89q.worldedit.util.command.parametric.ParameterData[], Object[], CommandContext)}
* call. If permission is not found, then an appropriate {@link CommandException}
* can be thrown to cease invocation.</p>
*
* @param listener the listener
* @see com.sk89q.worldedit.util.command.parametric.InvokeHandler the handler
*/
public void addInvokeListener(InvokeListener listener) {
invokeListeners.add(listener);
}
/**
* Attach an exception converter to this builder in order to wrap unknown
* {@link Throwable}s into known {@link CommandException}s.
* <p>
* <p>Exception converters are called in order that they are registered.</p>
*
* @param converter the converter
* @see ExceptionConverter for an explanation
*/
public void addExceptionConverter(ExceptionConverter converter) {
exceptionConverters.add(converter);
}
/**
* Build a list of commands from methods specially annotated with {@link Command}
* (and other relevant annotations) and register them all with the given
* {@link Dispatcher}.
*
* @param dispatcher the dispatcher to register commands with
* @param object the object contain the methods
* @throws com.sk89q.worldedit.util.command.parametric.ParametricException thrown if the commands cannot be registered
*/
public void registerMethodsAsCommands(Dispatcher dispatcher, Object object) throws ParametricException {
registerMethodsAsCommands(dispatcher, object, null);
}
/**
* Build a list of commands from methods specially annotated with {@link Command}
* (and other relevant annotations) and register them all with the given
* {@link Dispatcher}.
*
* @param dispatcher the dispatcher to register commands with
* @param object the object contain the methods
* @throws com.sk89q.worldedit.util.command.parametric.ParametricException thrown if the commands cannot be registered
*/
public void registerMethodsAsCommands(Dispatcher dispatcher, Object object, CallableProcessor processor) throws ParametricException {
for (Method method : object.getClass().getDeclaredMethods()) {
Command definition = method.getAnnotation(Command.class);
if (definition != null) {
definition = Commands.translate(method.getDeclaringClass(), definition);
CommandCallable callable = build(object, method, definition);
if (processor != null) {
callable = new ProcessedCallable(callable, processor);
}
else if (object instanceof CallableProcessor) {
callable = new ProcessedCallable(callable, (CallableProcessor) object);
}
if (object instanceof MethodCommands) {
((MethodCommands) object).register(method, callable, dispatcher);
}
dispatcher.registerCommand(callable, definition.aliases());
}
}
}
/**
* Build a {@link CommandCallable} for the given method.
*
* @param object the object to be invoked on
* @param method the method to invoke
* @param definition the command definition annotation
* @return the command executor
* @throws ParametricException thrown on an error
*/
private CommandCallable build(Object object, Method method, Command definition)
throws ParametricException {
try {
return new ParametricCallable(this, object, method, definition);
} catch (Throwable e) {
if (e instanceof ParametricException) {
throw (ParametricException) e;
}
e.printStackTrace();
return null;
}
}
/**
* Get the object used to get method names on Java versions before 8 (assuming
* that Java 8 is given the ability to reliably reflect method names at runtime).
*
* @return the paranamer
*/
public Paranamer getParanamer() {
return paranamer;
}
/**
* Get the map of bindings.
*
* @return the map of bindings
*/
public Map<Type, Binding> getBindings() {
return bindings;
}
/**
* Get a list of invocation listeners.
*
* @return a list of invocation listeners
*/
public List<InvokeListener> getInvokeListeners() {
return invokeListeners;
}
/**
* Get the list of exception converters.
*
* @return a list of exception converters
*/
public List<ExceptionConverter> getExceptionConverters() {
return exceptionConverters;
}
/**
* Get the authorizer.
*
* @return the authorizer
*/
public Authorizer getAuthorizer() {
return authorizer;
}
/**
* Set the authorizer.
*
* @param authorizer the authorizer
*/
public void setAuthorizer(Authorizer authorizer) {
checkNotNull(authorizer);
this.authorizer = authorizer;
}
/**
* Get the default command suggestions provider that will be used if
* no suggestions are available.
*
* @return the default command completer
*/
public CommandCompleter getDefaultCompleter() {
return defaultCompleter;
}
/**
* Set the default command suggestions provider that will be used if
* no suggestions are available.
*
* @param defaultCompleter the default command completer
*/
public void setDefaultCompleter(CommandCompleter defaultCompleter) {
checkNotNull(defaultCompleter);
this.defaultCompleter = defaultCompleter;
}
public static Class<?> inject() {
return ParametricBuilder.class;
}
}
| {
"pile_set_name": "Github"
} |
# Wegpunkt

Der Wegpunkt kann mit Hilfe des [Navigations-Upgrades](../item/navigationUpgrade.md) erkannt werden. So können Geräte mit diesem Upgrade Wegpunkte verwenden um durch die Welt zu navigieren. Dies ist besonders nützlich zum Schreiben einfach wiederverwendbarer Programme für Geräte wie [Roboter](robot.md) und [Drohnen](../item/drone.md).
Es gilt zu beachten, dass die tatsächliche Position welche das Navigationsupgrade zurückgibt *der Block vor dem Wegpunkt* ist (wie durch die Partikel angedeutet). So kann der Wegpunkt neben und über eine Kiste platziert werden und die Position des Wegpunktes kann als "über der Kiste" bezeichnet werden, ohne die Rotation beachten zu müssen.
Ein Wegpunkt hat zwei Eigenschaften die über das Navigations-Upgrade abgefragt werden können: Das derzeitige Redstonesignal und ein veränderbares Label. Das Label ist ein 32 Zeichen langer String der entweder über die GUI oder über die Komponenten-API des Wegpunktblocks verändert werden kann. Diese zwei Eigenschaften können dann auf dem Gerät verwendet werden um festzulegen was an dem Wegpunkt zu tun ist. Beispielsweise können alle Wegpunkt mit einem starken Redstonesignal als Input, alle mit schwachem Signal als Output verwendet werden.
| {
"pile_set_name": "Github"
} |
@-webkit-keyframes nutSlideRightIn {
from {
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
transform: translate3d(0, 0, 0);
}
}
@-webkit-keyframes nutSlideRightOut {
from {
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
transform: translate3d(100%, 0, 0);
}
}
// 适合右侧菜单
@include make-animation(nutSlideRight);
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright (c) Enalean, 2014 - 2017. All Rights Reserved.
*
* This file is a part of Tuleap.
*
* Tuleap is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tuleap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
*/
require_once __DIR__ . '/../include/pre.php';
$current_user->setPreference($request->get('user_preference_name'), $request->get('sidebar_state'));
| {
"pile_set_name": "Github"
} |
module CanTango
module Rules
module Adaptor
module MongoMapper
include module CanTango::Rules::Adaptor::Mongo
end
end
end
end
| {
"pile_set_name": "Github"
} |
/*
[GPL v2 licence]
Copyright (c) 2012 Bao Haojun
All rights reserved.
*/
grammar OrgMode;
options {backtrack=true; memoize=true; output=template; rewrite=true;}
tokens
{
BEGIN_EXAMPLE;
END_EXAMPLE;
BEGIN_SRC;
END_SRC;
}
@members {
public boolean noSpace() {
if (input.LT(1) == null) {
return true;
}
boolean result = input.LT(1).getCharPositionInLine() == input.LT(-1).getCharPositionInLine() + input.LT(-1).getText().length();
System.out.println("noSpace? " + input.LT(1) + " " + input.LT(-1) + ": " + result);
return result;
}
}
@lexer::members {
protected boolean bol = true;
boolean in_example = false;
protected boolean assertIsKeyword = true;
void debug(String s) {
System.out.println(s + " at " + getLine() + ":" + getCharPositionInLine());
}
void debug(int do_it, String s) {
if (do_it != 0) {
System.out.println(s + " at " + getLine() + ":" + getCharPositionInLine());
}
}
boolean looking_backat_white_space() {
return true;
}
boolean inExample(String w) {
System.out.println("checking for inExample in " + w);
return in_example && getCharPositionInLine() == 0;
}
boolean looking_at_white_space() {
return true;
}
public String getErrorMessage(RecognitionException e,
String[] tokenNames)
{
List stack = getRuleInvocationStack(e, this.getClass().getName());
String msg = null;
if ( e instanceof NoViableAltException ) {
NoViableAltException nvae = (NoViableAltException)e;
msg = " no viable alt; token="+e.token+
" (decision="+nvae.decisionNumber+
" state "+nvae.stateNumber+")"+
" decision=<<"+nvae.grammarDecisionDescription+">>";
}
else {
msg = super.getErrorMessage(e, tokenNames);
}
return stack+" "+msg;
}
}
orgFile : block* ;
block :
header
| exampleParagraph
| normalParagraph
| NL
;
header : HEADER_STAR notNL+ NL {System.out.println("got a header " + $text + " end of header");};
exampleParagraph : BEG_EXAMPLE .* END_EXAMPLE {System.out.println("matched exampleParagraph: " + $text);} ;
normalParagraph : (lineText NL)+ ;
lineText : textItem+;
textItem : normalText;
notNL : ~NL ;
normalText : notNL {System.out.println("matched normal text: " + $text);} ;
BEG_BLOCK : '#+begin_' WORDF ;
END_BLOCK : '#+end_' WORDF ;
fragment
WORDF : ('a'..'z' | 'A'..'Z' | '_')+ ;
WS : ( ' ' | '\t' | '\r' | '\f' )+ {$channel = HIDDEN;} ;
fragment
WSF : ' ' | '\t' | '\f' | '\r';
/* start code-generator
# BOLD_INLINE : '*' ~('*' | AWSF) .* (~AWSF '*' AWSF {debug("matched * :" + $text);} | '\n' ) ;
cat << EOF | perl -npe "s#(.*?)\s*: '(.)'#
\$1 : '\$2' ~('\$2' | AWSF) .*
(
~AWSF '\$2' (
WSF { emit(new CommonToken(\$1, \\\$text)); debug(\"matched code \$1 :\" + \\\$text); }
| NL { emit(new CommonToken(\$1, \\\$text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, \\\$text)); emit(new CommonToken(NL)); }
) ;#"
BOLD_INLINE : '*'
UNDERLINED_INLINE : '_'
CODE_INLINE : '='
VERBATIM_INLINE : '~'
STRIKE_INLINE : '+'
ITALIC_INLINE : '/'
EOF
end code-generator */
// start generated code
BOLD_INLINE : '*' ~('*' | AWSF) .*
(
~AWSF '*' (
WSF { emit(new CommonToken(BOLD_INLINE, $text)); debug("matched code BOLD_INLINE :" + $text); }
| NL { emit(new CommonToken(BOLD_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
UNDERLINED_INLINE : '_' ~('_' | AWSF) .*
(
~AWSF '_' (
WSF { emit(new CommonToken(UNDERLINED_INLINE, $text)); debug("matched code UNDERLINED_INLINE :" + $text); }
| NL { emit(new CommonToken(UNDERLINED_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
CODE_INLINE : '=' ~('=' | AWSF) .*
(
~AWSF '=' (
WSF { emit(new CommonToken(CODE_INLINE, $text)); debug("matched code CODE_INLINE :" + $text); }
| NL { emit(new CommonToken(CODE_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
VERBATIM_INLINE : '~' ~('~' | AWSF) .*
(
~AWSF '~' (
WSF { emit(new CommonToken(VERBATIM_INLINE, $text)); debug("matched code VERBATIM_INLINE :" + $text); }
| NL { emit(new CommonToken(VERBATIM_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
STRIKE_INLINE : '+' ~('+' | AWSF) .*
(
~AWSF '+' (
WSF { emit(new CommonToken(STRIKE_INLINE, $text)); debug("matched code STRIKE_INLINE :" + $text); }
| NL { emit(new CommonToken(STRIKE_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
ITALIC_INLINE : '/' ~('/' | AWSF) .*
(
~AWSF '/' (
WSF { emit(new CommonToken(ITALIC_INLINE, $text)); debug("matched code ITALIC_INLINE :" + $text); }
| NL { emit(new CommonToken(ITALIC_INLINE, $text)); emit(new CommonToken(NL)); }
)
| NL { emit(new CommonToken(NWS, $text)); emit(new CommonToken(NL)); }
) ;
// end generated code
LINK_URL : '[[' ~('['|']')* ']]' ;
LINK_URL_DESC : '[[' ~('['|']')* '][' ~('['|']')* ']]' ;
fragment
AWSF : WSF | NL ;
fragment
NL : '\n' ;
LE : '\n' ;
HEADER_STAR : s='*' '*'* WSF ;
OL_START : ('0' .. '9')+ '.' WSF ;
UL_START : ('-' | '+' | '*') WSF ;
COL_START : ':' WSF ;
SHARP_SETTING : '#+' WORDF ':' WSF ;
WORD_NWS : WORDF (~ AWSF)* ;
NWS : (~ AWSF)+ {debug("mateched nws " + $text);} ;
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2003 The FFmpeg project
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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 FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_VP3DATA_H
#define AVCODEC_VP3DATA_H
#include <stdint.h>
#include <stdlib.h>
/* these coefficients dequantize intraframe Y plane coefficients
* (note: same as JPEG) */
static const int8_t vp31_intra_y_dequant[64] = {
16, 11, 10, 16, 24, 40, 51, 61,
12, 12, 14, 19, 26, 58, 60, 55,
14, 13, 16, 24, 40, 57, 69, 56,
14, 17, 22, 29, 51, 87, 80, 62,
18, 22, 37, 58, 68, 109, 103, 77,
24, 35, 55, 64, 81, 104, 113, 92,
49, 64, 78, 87, 103, 121, 120, 101,
72, 92, 95, 98, 112, 100, 103, 99
};
/* these coefficients dequantize intraframe C plane coefficients
* (note: same as JPEG) */
static const int8_t vp31_intra_c_dequant[64] = {
17, 18, 24, 47, 99, 99, 99, 99,
18, 21, 26, 66, 99, 99, 99, 99,
24, 26, 56, 99, 99, 99, 99, 99,
47, 66, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99
};
/* these coefficients dequantize interframe coefficients (all planes) */
static const int8_t vp31_inter_dequant[64] = {
16, 16, 16, 20, 24, 28, 32, 40,
16, 16, 20, 24, 28, 32, 40, 48,
16, 20, 24, 28, 32, 40, 48, 64,
20, 24, 28, 32, 40, 48, 64, 64,
24, 28, 32, 40, 48, 64, 64, 64,
28, 32, 40, 48, 64, 64, 64, 96,
32, 40, 48, 64, 64, 64, 96, 128,
40, 48, 64, 64, 64, 96, 128, 128
};
static const uint8_t vp31_dc_scale_factor[64] = {
220, 200, 190, 180, 170, 170, 160, 160,
150, 150, 140, 140, 130, 130, 120, 120,
110, 110, 100, 100, 90, 90, 90, 80,
80, 80, 70, 70, 70, 60, 60, 60,
60, 50, 50, 50, 50, 40, 40, 40,
40, 40, 30, 30, 30, 30, 30, 30,
30, 20, 20, 20, 20, 20, 20, 20,
20, 10, 10, 10, 10, 10, 10, 10
};
static const uint32_t vp31_ac_scale_factor[64] = {
500, 450, 400, 370, 340, 310, 285, 265,
245, 225, 210, 195, 185, 180, 170, 160,
150, 145, 135, 130, 125, 115, 110, 107,
100, 96, 93, 89, 85, 82, 75, 74,
70, 68, 64, 60, 57, 56, 52, 50,
49, 45, 44, 43, 40, 38, 37, 35,
33, 32, 30, 29, 28, 25, 24, 22,
21, 19, 18, 17, 15, 13, 12, 10
};
static const uint8_t vp31_filter_limit_values[64] = {
30, 25, 20, 20, 15, 15, 14, 14,
13, 13, 12, 12, 11, 11, 10, 10,
9, 9, 8, 8, 7, 7, 7, 7,
6, 6, 6, 6, 5, 5, 5, 5,
4, 4, 4, 4, 3, 3, 3, 3,
2, 2, 2, 2, 2, 2, 2, 2,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
static const uint16_t superblock_run_length_vlc_table[34][2] = {
{ 0, 1 },
{ 4, 3 }, { 5, 3 },
{ 0xC, 4 }, { 0xD, 4 },
{ 0x38, 6 }, { 0x39, 6 }, { 0x3A, 6 }, { 0x3B, 6 },
{ 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 },
{ 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 },
{ 0x3E0, 10 }, { 0x3E1, 10 }, { 0x3E2, 10 }, { 0x3E3, 10 },
{ 0x3E4, 10 }, { 0x3E5, 10 }, { 0x3E6, 10 }, { 0x3E7, 10 },
{ 0x3E8, 10 }, { 0x3E9, 10 }, { 0x3EA, 10 }, { 0x3EB, 10 },
{ 0x3EC, 10 }, { 0x3ED, 10 }, { 0x3EE, 10 }, { 0x3EF, 10 },
{ 0x3F, 6 } /* this last VLC is a special case for reading 12 more
* bits from stream and adding the value 34 */
};
static const uint16_t fragment_run_length_vlc_table[30][2] = {
/* 1 -> 2 */
{ 0x0, 2 }, { 0x1, 2 },
/* 3 -> 4 */
{ 0x4, 3 }, { 0x5, 3 },
/* 5 -> 6 */
{ 0xC, 4 }, { 0xD, 4 },
/* 7 -> 10 */
{ 0x38, 6 }, { 0x39, 6 },
{ 0x3A, 6 }, { 0x3B, 6 },
/* 11 -> 14 */
{ 0x78, 7 }, { 0x79, 7 },
{ 0x7A, 7 }, { 0x7B, 7 },
/* 15 -> 30 */
{ 0x1F0, 9 }, { 0x1F1, 9 }, { 0x1F2, 9 }, { 0x1F3, 9 },
{ 0x1F4, 9 }, { 0x1F5, 9 }, { 0x1F6, 9 }, { 0x1F7, 9 },
{ 0x1F8, 9 }, { 0x1F9, 9 }, { 0x1FA, 9 }, { 0x1FB, 9 },
{ 0x1FC, 9 }, { 0x1FD, 9 }, { 0x1FE, 9 }, { 0x1FF, 9 }
};
static const uint8_t mode_code_vlc_table[8][2] = {
{ 0, 1 }, { 2, 2 },
{ 6, 3 }, { 14, 4 },
{ 30, 5 }, { 62, 6 },
{ 126, 7 }, { 127, 7 }
};
static const uint8_t motion_vector_vlc_table[63][2] = {
{ 0, 3 },
{ 1, 3 },
{ 2, 3 },
{ 6, 4 }, { 7, 4 },
{ 8, 4 }, { 9, 4 },
{ 40, 6 }, { 41, 6 }, { 42, 6 }, { 43, 6 },
{ 44, 6 }, { 45, 6 }, { 46, 6 }, { 47, 6 },
{ 96, 7 }, { 97, 7 }, { 98, 7 }, { 99, 7 },
{ 100, 7 }, { 101, 7 }, { 102, 7 }, { 103, 7 },
{ 104, 7 }, { 105, 7 }, { 106, 7 }, { 107, 7 },
{ 108, 7 }, { 109, 7 }, { 110, 7 }, { 111, 7 },
{ 0xE0, 8 }, { 0xE1, 8 }, { 0xE2, 8 }, { 0xE3, 8 },
{ 0xE4, 8 }, { 0xE5, 8 }, { 0xE6, 8 }, { 0xE7, 8 },
{ 0xE8, 8 }, { 0xE9, 8 }, { 0xEA, 8 }, { 0xEB, 8 },
{ 0xEC, 8 }, { 0xED, 8 }, { 0xEE, 8 }, { 0xEF, 8 },
{ 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 },
{ 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 },
{ 0xF8, 8 }, { 0xF9, 8 }, { 0xFA, 8 }, { 0xFB, 8 },
{ 0xFC, 8 }, { 0xFD, 8 }, { 0xFE, 8 }, { 0xFF, 8 }
};
static const int8_t motion_vector_table[63] = {
0, 1, -1,
2, -2,
3, -3,
4, -4, 5, -5, 6, -6, 7, -7,
8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15,
16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23,
24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
};
static const int8_t fixed_motion_vector_table[64] = {
0, 0, 1, -1, 2, -2, 3, -3,
4, -4, 5, -5, 6, -6, 7, -7,
8, -8, 9, -9, 10, -10, 11, -11,
12, -12, 13, -13, 14, -14, 15, -15,
16, -16, 17, -17, 18, -18, 19, -19,
20, -20, 21, -21, 22, -22, 23, -23,
24, -24, 25, -25, 26, -26, 27, -27,
28, -28, 29, -29, 30, -30, 31, -31
};
/* only tokens 0..6 indicate eob runs */
static const uint8_t eob_run_base[7] = {
1, 2, 3, 4, 8, 16, 0
};
static const uint8_t eob_run_get_bits[7] = {
0, 0, 0, 2, 3, 4, 12
};
static const uint8_t zero_run_base[32] = {
0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */
0, 0, /* 7..8 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */
1, 2, 3, 4, 5, /* 23..27 */
6, 10, 1, 2 /* 28..31 */
};
static const uint8_t zero_run_get_bits[32] = {
0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */
3, 6, /* 7..8 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */
0, 0, 0, 0, 0, /* 23..27 */
2, 3, 0, 1 /* 28..31 */
};
static const uint8_t coeff_get_bits[32] = {
0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */
0, 0, 0, 0, 0, 0, /* 7..12 use constant coeffs */
1, 1, 1, 1, /* 13..16 are constants but still need sign bit */
2, 3, 4, 5, 6,10, /* 17..22, for reading large coeffs */
1, 1, 1, 1, 1, 1, 1, /* 23..29 are constants but still need sign bit */
2, 2 /* 30..31 */
};
static const int16_t coeff_table_token_7_8[1] = { 0 };
static const int16_t coeff_table_token_9[1] = { 1 };
static const int16_t coeff_table_token_10[1] = { -1 };
static const int16_t coeff_table_token_11[1] = { 2 };
static const int16_t coeff_table_token_12[1] = { -2 };
static const int16_t coeff_table_token_13[2] = { 3, -3 };
static const int16_t coeff_table_token_14[2] = { 4, -4 };
static const int16_t coeff_table_token_15[2] = { 5, -5 };
static const int16_t coeff_table_token_16[2] = { 6, -6 };
static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 };
static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 };
static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 };
static const int16_t coeff_table_token_17[4] = {
7, 8, -7, -8
};
static const int16_t coeff_table_token_18[8] = {
9, 10, 11, 12, -9, -10, -11, -12
};
static const int16_t coeff_table_token_19[16] = {
13, 14, 15, 16, 17, 18, 19, 20, -13, -14, -15, -16, -17, -18, -19, -20
};
static const int16_t coeff_table_token_20[32] = {
21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36,
-21, -22, -23, -24, -25, -26, -27, -28,
-29, -30, -31, -32, -33, -34, -35, -36
};
static const int16_t coeff_table_token_21[64] = {
37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68,
-37, -38, -39, -40, -41, -42, -43, -44,
-45, -46, -47, -48, -49, -50, -51, -52,
-53, -54, -55, -56, -57, -58, -59, -60,
-61, -62, -63, -64, -65, -66, -67, -68
};
static const int16_t coeff_table_token_22[1024] = {
69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132,
133, 134, 135, 136, 137, 138, 139, 140,
141, 142, 143, 144, 145, 146, 147, 148,
149, 150, 151, 152, 153, 154, 155, 156,
157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172,
173, 174, 175, 176, 177, 178, 179, 180,
181, 182, 183, 184, 185, 186, 187, 188,
189, 190, 191, 192, 193, 194, 195, 196,
197, 198, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 212,
213, 214, 215, 216, 217, 218, 219, 220,
221, 222, 223, 224, 225, 226, 227, 228,
229, 230, 231, 232, 233, 234, 235, 236,
237, 238, 239, 240, 241, 242, 243, 244,
245, 246, 247, 248, 249, 250, 251, 252,
253, 254, 255, 256, 257, 258, 259, 260,
261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 276,
277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308,
309, 310, 311, 312, 313, 314, 315, 316,
317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332,
333, 334, 335, 336, 337, 338, 339, 340,
341, 342, 343, 344, 345, 346, 347, 348,
349, 350, 351, 352, 353, 354, 355, 356,
357, 358, 359, 360, 361, 362, 363, 364,
365, 366, 367, 368, 369, 370, 371, 372,
373, 374, 375, 376, 377, 378, 379, 380,
381, 382, 383, 384, 385, 386, 387, 388,
389, 390, 391, 392, 393, 394, 395, 396,
397, 398, 399, 400, 401, 402, 403, 404,
405, 406, 407, 408, 409, 410, 411, 412,
413, 414, 415, 416, 417, 418, 419, 420,
421, 422, 423, 424, 425, 426, 427, 428,
429, 430, 431, 432, 433, 434, 435, 436,
437, 438, 439, 440, 441, 442, 443, 444,
445, 446, 447, 448, 449, 450, 451, 452,
453, 454, 455, 456, 457, 458, 459, 460,
461, 462, 463, 464, 465, 466, 467, 468,
469, 470, 471, 472, 473, 474, 475, 476,
477, 478, 479, 480, 481, 482, 483, 484,
485, 486, 487, 488, 489, 490, 491, 492,
493, 494, 495, 496, 497, 498, 499, 500,
501, 502, 503, 504, 505, 506, 507, 508,
509, 510, 511, 512, 513, 514, 515, 516,
517, 518, 519, 520, 521, 522, 523, 524,
525, 526, 527, 528, 529, 530, 531, 532,
533, 534, 535, 536, 537, 538, 539, 540,
541, 542, 543, 544, 545, 546, 547, 548,
549, 550, 551, 552, 553, 554, 555, 556,
557, 558, 559, 560, 561, 562, 563, 564,
565, 566, 567, 568, 569, 570, 571, 572,
573, 574, 575, 576, 577, 578, 579, 580,
-69, -70, -71, -72, -73, -74, -75, -76,
-77, -78, -79, -80, -81, -82, -83, -84,
-85, -86, -87, -88, -89, -90, -91, -92,
-93, -94, -95, -96, -97, -98, -99, -100,
-101, -102, -103, -104, -105, -106, -107, -108,
-109, -110, -111, -112, -113, -114, -115, -116,
-117, -118, -119, -120, -121, -122, -123, -124,
-125, -126, -127, -128, -129, -130, -131, -132,
-133, -134, -135, -136, -137, -138, -139, -140,
-141, -142, -143, -144, -145, -146, -147, -148,
-149, -150, -151, -152, -153, -154, -155, -156,
-157, -158, -159, -160, -161, -162, -163, -164,
-165, -166, -167, -168, -169, -170, -171, -172,
-173, -174, -175, -176, -177, -178, -179, -180,
-181, -182, -183, -184, -185, -186, -187, -188,
-189, -190, -191, -192, -193, -194, -195, -196,
-197, -198, -199, -200, -201, -202, -203, -204,
-205, -206, -207, -208, -209, -210, -211, -212,
-213, -214, -215, -216, -217, -218, -219, -220,
-221, -222, -223, -224, -225, -226, -227, -228,
-229, -230, -231, -232, -233, -234, -235, -236,
-237, -238, -239, -240, -241, -242, -243, -244,
-245, -246, -247, -248, -249, -250, -251, -252,
-253, -254, -255, -256, -257, -258, -259, -260,
-261, -262, -263, -264, -265, -266, -267, -268,
-269, -270, -271, -272, -273, -274, -275, -276,
-277, -278, -279, -280, -281, -282, -283, -284,
-285, -286, -287, -288, -289, -290, -291, -292,
-293, -294, -295, -296, -297, -298, -299, -300,
-301, -302, -303, -304, -305, -306, -307, -308,
-309, -310, -311, -312, -313, -314, -315, -316,
-317, -318, -319, -320, -321, -322, -323, -324,
-325, -326, -327, -328, -329, -330, -331, -332,
-333, -334, -335, -336, -337, -338, -339, -340,
-341, -342, -343, -344, -345, -346, -347, -348,
-349, -350, -351, -352, -353, -354, -355, -356,
-357, -358, -359, -360, -361, -362, -363, -364,
-365, -366, -367, -368, -369, -370, -371, -372,
-373, -374, -375, -376, -377, -378, -379, -380,
-381, -382, -383, -384, -385, -386, -387, -388,
-389, -390, -391, -392, -393, -394, -395, -396,
-397, -398, -399, -400, -401, -402, -403, -404,
-405, -406, -407, -408, -409, -410, -411, -412,
-413, -414, -415, -416, -417, -418, -419, -420,
-421, -422, -423, -424, -425, -426, -427, -428,
-429, -430, -431, -432, -433, -434, -435, -436,
-437, -438, -439, -440, -441, -442, -443, -444,
-445, -446, -447, -448, -449, -450, -451, -452,
-453, -454, -455, -456, -457, -458, -459, -460,
-461, -462, -463, -464, -465, -466, -467, -468,
-469, -470, -471, -472, -473, -474, -475, -476,
-477, -478, -479, -480, -481, -482, -483, -484,
-485, -486, -487, -488, -489, -490, -491, -492,
-493, -494, -495, -496, -497, -498, -499, -500,
-501, -502, -503, -504, -505, -506, -507, -508,
-509, -510, -511, -512, -513, -514, -515, -516,
-517, -518, -519, -520, -521, -522, -523, -524,
-525, -526, -527, -528, -529, -530, -531, -532,
-533, -534, -535, -536, -537, -538, -539, -540,
-541, -542, -543, -544, -545, -546, -547, -548,
-549, -550, -551, -552, -553, -554, -555, -556,
-557, -558, -559, -560, -561, -562, -563, -564,
-565, -566, -567, -568, -569, -570, -571, -572,
-573, -574, -575, -576, -577, -578, -579, -580
};
static const int16_t *const coeff_tables[32] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
coeff_table_token_7_8,
coeff_table_token_7_8,
coeff_table_token_9,
coeff_table_token_10,
coeff_table_token_11,
coeff_table_token_12,
coeff_table_token_13,
coeff_table_token_14,
coeff_table_token_15,
coeff_table_token_16,
coeff_table_token_17,
coeff_table_token_18,
coeff_table_token_19,
coeff_table_token_20,
coeff_table_token_21,
coeff_table_token_22,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_30,
coeff_table_token_31
};
static const uint16_t dc_bias[16][32][2] = {
{ /* DC bias table 0 */
{ 0x2D, 6 },
{ 0x26, 7 },
{ 0x166, 9 },
{ 0x4E, 8 },
{ 0x2CE, 10 },
{ 0x59E, 11 },
{ 0x27D, 11 },
{ 0x8, 5 },
{ 0x4F9, 12 },
{ 0xF, 4 },
{ 0xE, 4 },
{ 0x1B, 5 },
{ 0x6, 4 },
{ 0x8, 4 },
{ 0x5, 4 },
{ 0x1A, 5 },
{ 0x15, 5 },
{ 0x7, 4 },
{ 0xC, 4 },
{ 0x1, 3 },
{ 0x0, 3 },
{ 0x9, 4 },
{ 0x17, 5 },
{ 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},
{ 0x19, 5 },
{ 0x38, 6 }
},
{ /* AC bias group 2, table 8 */
{ 0x16, 5 },
{ 0x50, 7 },
{ 0x172, 9 },
{ 0x2E7, 10 },
{ 0x1732, 13 },
{ 0x2E67, 14 },
{ 0x2E66, 14 },
{ 0x6, 4 },
{ 0x51, 7 },
{ 0x1, 3 },
{ 0x0, 3 },
{ 0xD, 4 },
{ 0xC, 4 },
{ 0x9, 4 },
{ 0x1C, 5 },
{ 0x9, 5 },
{ 0x1C, 6 },
{ 0x1D, 6 },
{ 0x5D, 7 },
{ 0xB8, 8 },
{ 0x5CD, 11 },
{ 0x1731, 13 },
{ 0x1730, 13 },
{ 0xF, 4 },
{ 0x5, 4 },
{ 0xF, 5 },
{ 0x8, 5 },
{ 0x29, 6 },
{ 0x1D, 5 },
{ 0x2F, 6 },
{ 0x8, 4 },
{ 0x15, 5 }
},
{ /* AC bias group 2, table 9 */
{ 0x9, 4 },
{ 0x21, 6 },
{ 0x40, 7 },
{ 0xAD, 8 },
{ 0x2B0, 10 },
{ 0x1589, 13 },
{ 0x1588, 13 },
{ 0x1C, 5 },
{ 0x5F, 7 },
{ 0x0, 3 },
{ 0xF, 4 },
{ 0xD, 4 },
{ 0xC, 4 },
{ 0x6, 4 },
{ 0x11, 5 },
{ 0x2A, 6 },
{ 0x57, 7 },
{ 0x5E, 7 },
{ 0x41, 7 },
{ 0x159, 9 },
{ 0x563, 11 },
{ 0x158B, 13 },
{ 0x158A, 13 },
{ 0x1, 3 },
{ 0x5, 4 },
{ 0x14, 5 },
{ 0x3B, 6 },
{ 0x2E, 6 },
{ 0x4, 4 },
{ 0x3A, 6 },
{ 0x7, 4 },
{ 0x16, 5 }
},
{ /* AC bias group 2, table 10 */
{ 0xE, 4 },
{ 0x7, 5 },
{ 0x46, 7 },
{ 0x45, 7 },
{ 0x64, 9 },
{ 0x32A, 12 },
{ 0x657, 13 },
{ 0x18, 5 },
{ 0xD, 6 },
{ 0x0, 3 },
{ 0xF, 4 },
{ 0xA, 4 },
{ 0xB, 4 },
{ 0x1A, 5 },
{ 0x36, 6 },
{ 0x47, 7 },
{ 0x44, 7 },
{ 0x18, 7 },
{ 0x33, 8 },
{ 0xCB, 10 },
{ 0x656, 13 },
{ 0x329, 12 },
{ 0x328, 12 },
{ 0x2, 3 },
{ 0x6, 4 },
{ 0x19, 5 },
{ 0xE, 5 },
{ 0x37, 6 },
{ 0x9, 4 },
{ 0xF, 5 },
{ 0x2, 4 },
{ 0x10, 5 }
},
{ /* AC bias group 2, table 11 */
{ 0x3, 3 },
{ 0x18, 5 },
{ 0x23, 6 },
{ 0x77, 7 },
{ 0x194, 9 },
{ 0x1956, 13 },
{ 0x32AF, 14 },
{ 0x3A, 6 },
{ 0x76, 7 },
{ 0x2, 3 },
{ 0x1, 3 },
{ 0x1F, 5 },
{ 0x1E, 5 },
{ 0x14, 5 },
{ 0x22, 6 },
{ 0x64, 7 },
{ 0x197, 9 },
{ 0x196, 9 },
{ 0x32B, 10 },
{ 0x654, 11 },
{ 0x32AE, 14 },
{ 0x1955, 13 },
{ 0x1954, 13 },
{ 0x0, 3 },
{ 0x9, 4 },
{ 0x1C, 5 },
{ 0x15, 5 },
{ 0x10, 5 },
{ 0xD, 4 },
{ 0x17, 5 },
{ 0x16, 5 },
{ 0x33, 6 }
},
{ /* AC bias group 2, table 12 */
{ 0x5, 3 },
{ 0x6, 4 },
{ 0x3E, 6 },
{ 0x10, 5 },
{ 0x48, 7 },
{ 0x93F, 12 },
{ 0x24FA, 14 },
{ 0x32, 6 },
{ 0x67, 7 },
{ 0x2, 3 },
{ 0x1, 3 },
{ 0x1B, 5 },
{ 0x1E, 5 },
{ 0x34, 6 },
{ 0x66, 7 },
{ 0x92, 8 },
{ 0x126, 9 },
{ 0x24E, 10 },
{ 0x49E, 11 },
{ 0x49F7, 15 },
{ 0x49F6, 15 },
{ 0x24F9, 14 },
{ 0x24F8, 14 },
{ 0x0, 3 },
{ 0x7, 4 },
{ 0x18, 5 },
{ 0x11, 5 },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 0xBC, 8 },
{ 0x53, 9 },
{ 0x4, 3 },
{ 0x2, 3 },
{ 0x16, 5 },
{ 0x15, 5 },
{ 0x15, 7 },
{ 0x50, 9 },
{ 0xA4, 10 },
{ 0x294, 12 },
{ 0x52B, 13 },
{ 0x52A, 13 },
{ 0x52D, 13 },
{ 0x52C, 13 },
{ 0x52F, 13 },
{ 0x52E, 13 },
{ 0xE, 4 },
{ 0x1A, 5 },
{ 0x4, 5 },
{ 0x28, 6 },
{ 0x29, 6 },
{ 0xF, 4 },
{ 0xB, 6 },
{ 0x5F, 7 },
{ 0xBD, 8 }
}
};
static const uint16_t ac_bias_2[16][32][2] = {
{ /* AC bias group 3, table 0 */
{ 0x3, 4 },
{ 0x9, 6 },
{ 0xD0, 8 },
{ 0x1A3, 9 },
{ 0x344, 10 },
{ 0xD14, 12 },
{ 0x1A2B, 13 },
{ 0x4, 4 },
{ 0x15, 7 },
{ 0x0, 3 },
{ 0xF, 4 },
{ 0xB, 4 },
{ 0xC, 4 },
{ 0xE, 4 },
{ 0x9, 4 },
{ 0x1B, 5 },
{ 0xA, 5 },
{ 0x14, 5 },
{ 0xD, 5 },
{ 0x2A, 6 },
{ 0x14, 7 },
{ 0x68B, 11 },
{ 0x1A2A, 13 },
{ 0x8, 4 },
{ 0xB, 5 },
{ 0x2B, 6 },
{ 0xB, 6 },
{ 0x69, 7 },
{ 0x35, 6 },
{ 0x8, 6 },
{ 0x7, 4 },
{ 0xC, 5 }
},
{ /* AC bias group 3, table 1 */
{ 0xA, 4 },
{ 0x3C, 6 },
{ 0x32, 7 },
{ 0x30, 7 },
{ 0xC5, 9 },
{ 0x621, 12 },
{ 0x620, 12 },
{ 0x1F, 5 },
{ 0x33, 7 },
{ 0x1, 3 },
{ 0x0, 3 },
{ 0xE, 4 },
{ 0xD, 4 },
{ 0xC, 4 },
{ 0x4, 4 },
{ 0xD, 5 },
{ 0x26, 6 },
{ 0x27, 6 },
{ 0x14, 6 },
{ 0x63, 8 },
{ 0x189, 10 },
{ 0x623, 12 },
{ 0x622, 12 },
{ 0xB, 4 },
{ 0x12, 5 },
{ 0x3D, 6 },
{ 0x22, 6 },
{ 0x15, 6 },
{ 0xB, 5 },
{ 0x23, 6 },
{ 0x7, 4 },
{ 0x10, 5 }
},
{ /* AC bias group 3, table 2 */
{ 0xF, 4 },
{ 0xC, 5 },
{ 0x43, 7 },
{ 0x10, 6 },
{ 0x44, 8 },
{ 0x114, 10 },
{ 0x455, 12 },
{ 0x18, 5 },
{ 0x23, 7 },
{ 0x1, 3 },
{ 0x0, 3 },
{ 0xE, 4 },
{ 0xD, 4 },
{ 0x9, 4 },
{ 0x19, 5 },
{ 0x9, 5 },
{ 0x17, 6 },
{ 0x16, 6 },
{ 0x42, 7 },
{ 0x8B, 9 },
{ 0x454, 12 },
{ 0x457, 12 },
{ 0x456, 12 },
{ 0xB, 4 },
{ 0x15, 5 },
{ 0xA, 5 },
{ 0x29, 6 },
{ 0x20, 6 },
{ 0xD, 5 },
{ 0x28, 6 },
{ 0x7, 4 },
{ 0x11, 5 }
},
{ /* AC bias group 3, table 3 */
{ 0x1, 3 },
{ 0x1A, 5 },
{ 0x29, 6 },
{ 0x2A, 6 },
{ 0xA0, 8 },
{ 0x285, 10 },
{ 0x1425, 13 },
{ 0x2, 5 },
{ 0x0, 7 },
{ 0x2, 3 },
{ 0x3, 3 },
{ 0xC, 4 },
{ 0xB, 4 },
{ 0x8, 4 },
{ 0x12, 5 },
{ 0x1, 6 },
{ 0x51, 7 },
{ 0x1, 7 },
{ 0x143, 9 },
{ 0x508, 11 },
{ 0x1424, 13 },
{ 0x1427, 13 },
{ 0x1426, 13 },
{ 0xF, 4 },
{ 0x1C, 5 },
{ 0x3, 5 },
{ 0x37, 6 },
{ 0x2B, 6 },
{ 0x13, 5 },
{ 0x36, 6 },
{ 0x1D, 5 },
{ 0x1, 5 }
},
{ /* AC bias group 3, table 4 */
{ 0x4, 3 },
{ 0x1F, 5 },
{ 0x3D, 6 },
{ 0x6, 5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 4 },
{ 0x9, 5 },
{ 0x1D, 6 },
{ 0x1F, 6 },
{ 0x11, 6 },
{ 0x5, 4 },
{ 0x1, 3 },
{ 0x43, 8 },
{ 0x42, 8 }
},
{ /* AC bias group 3, table 14 */
{ 0x4, 3 },
{ 0xD, 4 },
{ 0x7, 4 },
{ 0x2, 3 },
{ 0x14, 5 },
{ 0x16C, 9 },
{ 0x16D1, 13 },
{ 0x2DF, 10 },
{ 0x16E, 9 },
{ 0x0, 2 },
{ 0x7, 3 },
{ 0x2C, 6 },
{ 0x2B, 6 },
{ 0x2DE, 10 },
{ 0x16D0, 13 },
{ 0x16D3, 13 },
{ 0x16D2, 13 },
{ 0x2DB5, 14 },
{ 0x2DB4, 14 },
{ 0x2DB7, 14 },
{ 0x2DB6, 14 },
{ 0x16D9, 13 },
{ 0x16D8, 13 },
{ 0xC, 5 },
{ 0x2A, 6 },
{ 0x5A, 7 },
{ 0x1B, 6 },
{ 0x1A, 6 },
{ 0x17, 5 },
{ 0xC, 4 },
{ 0x5B7, 11 },
{ 0x5B5, 11 }
},
{ /* AC bias group 3, table 15 */
{ 0x2, 2 },
{ 0xF, 4 },
{ 0x1C, 5 },
{ 0xC, 4 },
{ 0x3B, 6 },
{ 0x1AC, 9 },
{ 0x1AD8, 13 },
{ 0x35B3, 14 },
{ 0x35B2, 14 },
{ 0x1, 2 },
{ 0x0, 2 },
{ 0x69, 7 },
{ 0x68, 7 },
{ 0x35BD, 14 },
{ 0x35BC, 14 },
{ 0x35BF, 14 },
{ 0x35BE, 14 },
{ 0x35B9, 14 },
{ 0x35B8, 14 },
{ 0x35BB, 14 },
{ 0x35BA, 14 },
{ 0x35B5, 14 },
{ 0x35B4, 14 },
{ 0x1A9, 9 },
{ 0x1A8, 9 },
{ 0x35A, 10 },
{ 0xD7, 8 },
{ 0xD5, 8 },
{ 0x3A, 6 },
{ 0x1B, 5 },
{ 0x35B7, 14 },
{ 0x35B6, 14 }
}
};
static const uint16_t ac_bias_3[16][32][2] = {
{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 },
{ 0xAF, 8 },
{ 0x2BB, 10 },
{ 0x15D4, 13 },
{ 0x15D7, 13 },
{ 0x15D6, 13 },
{ 0x15D1, 13 },
{ 0x15D0, 13 },
{ 0x15D3, 13 },
{ 0x15D2, 13 },
{ 0xB, 4 },
{ 0x19, 5 },
{ 0xD, 5 },
{ 0x3E, 6 },
{ 0x31, 6 },
{ 0x7, 4 },
{ 0x5, 4 },
{ 0x3D, 6 },
{ 0x30, 6 }
},
{ /* AC bias group 4, table 3 */
{ 0x5, 3 },
{ 0x8, 4 },
{ 0x1A, 5 },
{ 0x0, 4 },
{ 0x36, 6 },
{ 0x11, 8 },
{ 0x106, 12 },
{ 0xA, 7 },
{ 0x6E, 7 },
{ 0x2, 3 },
{ 0x3, 3 },
{ 0x3, 4 },
{ 0x2, 4 },
{ 0x6F, 7 },
{ 0x21, 9 },
{ 0x20F, 13 },
{ 0x20E, 13 },
{ 0x101, 12 },
{ 0x100, 12 },
{ 0x103, 12 },
{ 0x102, 12 },
{ 0x105, 12 },
{ 0x104, 12 },
{ 0xC, 4 },
{ 0x1E, 5 },
{ 0x3, 5 },
{ 0x3E, 6 },
{ 0x3F, 6 },
{ 0x9, 4 },
{ 0xE, 4 },
{ 0xB, 7 },
{ 0x9, 7 }
},
{ /* AC bias group 4, table 4 */
{ 0x2, 3 },
{ 0xE, 4 },
{ 0x1E, 5 },
{ 0xC, 4 },
{ 0x1F, 5 },
{ 0x6E, 7 },
{ 0xAD, 10 },
{ 0xAF, 10 },
{ 0x14, 7 },
{ 0x4, 3 },
{ 0x3, 3 },
{ 0x1A, 5 },
{ 0x17, 5 },
{ 0x2A, 8 },
{ 0x576, 13 },
{ 0xAEF, 14 },
{ 0xAEE, 14 },
{ 0x571, 13 },
{ 0x570, 13 },
{ 0x573, 13 },
{ 0x572, 13 },
{ 0x575, 13 },
{ 0x574, 13 },
{ 0x3, 4 },
{ 0x16, 5 },
{ 0x4, 5 },
{ 0x36, 6 },
{ 0xB, 6 },
{ 0xA, 4 },
{ 0x0, 3 },
{ 0x6F, 7 },
{ 0xAC, 10 }
},
{ /* AC bias group 4, table 5 */
{ 0x4, 3 },
{ 0x5, 4 },
{ 0x3, 3 },
{ 0x1, 3 },
{ 0x4, 4 },
{ 0x2F, 6 },
{ 0x526, 11 },
{ 0x1495, 13 },
{ 0xA6, 8 },
{ 0x7, 3 },
{ 0x6, 3 },
{ 0x2D, 6 },
{ 0x2C, 6 },
{ 0x1494, 13 },
{ 0x1497, 13 },
{ 0x1496, 13 },
{ 0x1491, 13 },
{ 0x1490, 13 },
{ 0x1493, 13 },
{ 0x1492, 13 },
{ 0x293D, 14 },
{ 0x293C, 14 },
{ 0x293F, 14 },
{ 0x0, 3 },
{ 0x28, 6 },
{ 0xA5, 8 },
{ 0x148, 9 },
{ 0xA7, 8 },
{ 0x2E, 6 },
{ 0x15, 5 },
{ 0xA4E, 12 },
{ 0x293E, 14 }
},
{ /* AC bias group 4, table 6 */
{ 0x4, 3 },
{ 0x5, 4 },
{ 0x3, 3 },
{ 0x1, 3 },
{ 0x4, 4 },
{ 0x2F, 6 },
{ 0x526, 11 },
{ 0x1495, 13 },
{ 0xA6, 8 },
{ 0x7, 3 },
{ 0x6, 3 },
{ 0x2D, 6 },
{ 0x2C, 6 },
{ 0x1494, 13 },
{ 0x1497, 13 },
{ 0x1496, 13 },
{ 0x1491, 13 },
{ 0x1490, 13 },
{ 0x1493, 13 },
{ 0x1492, 13 },
{ 0x293D, 14 },
{ 0x293C, 14 },
{ 0x293F, 14 },
{ 0x0, 3 },
{ 0x28, 6 },
{ 0xA5, 8 },
{ 0x148, 9 },
{ 0xA7, 8 },
{ 0x2E, 6 },
{ 0x15, 5 },
{ 0xA4E, 12 },
{ 0x293E, 14 }
},
{ /* AC bias group 4, table 7 */
{ 0x4, 3 },
{ 0x5, 4 },
{ 0x3, 3 },
{ 0x1, 3 },
{ 0x4, 4 },
{ 0x2F, 6 },
{ 0x526, 11 },
{ 0x1495, 13 },
{ 0xA6, 8 },
{ 0x7, 3 },
{ 0x6, 3 },
{ 0x2D, 6 },
{ 0x2C, 6 },
{ 0x1494, 13 },
{ 0x1497, 13 },
{ 0x1496, 13 },
{ 0x1491, 13 },
{ 0x1490, 13 },
{ 0x1493, 13 },
{ 0x1492, 13 },
{ 0x293D, 14 },
{ 0x293C, 14 },
{ 0x293F, 14 },
{ 0x0, 3 },
{ 0x28, 6 },
{ 0xA5, 8 },
{ 0x148, 9 },
{ 0xA7, 8 },
{ 0x2E, 6 },
{ 0x15, 5 },
{ 0xA4E, 12 },
{ 0x293E, 14 }
},
{ /* AC bias group 4, table 8 */
{ 0x3, 3 },
{ 0x11, 5 },
{ 0x20, 6 },
{ 0x74, 7 },
{ 0x10D, 9 },
{ 0x863, 12 },
{ 0x860, 12 },
{ 0xA, 5 },
{ 0x75, 7 },
{ 0x1, 3 },
{ 0x0, 3 },
{ 0xB, 4 },
{ 0xA, 4 },
{ 0x18, 5 },
{ 0x38, 6 },
{ 0x42, 7 },
{ 0x10F, 9 },
{ 0x10E, 9 },
{ 0x219, 10 },
{ 0x10C3, 13 },
{ 0x10C2, 13 },
{ 0x10C5, 13 },
{ 0x10C4, 13 },
{ 0xF, 4 },
{ 0x4, 4 },
{ 0x19, 5 },
{ 0xB, 5 },
{ 0x39, 6 },
{ 0x9, 4 },
{ 0x1B, 5 },
{ 0x1A, 5 },
{ 0x3B, 6 }
},
{ /* AC bias group 4, table 9 */
{ 0x5, 3 },
{ 0x1, 4 },
{ 0x3E, 6 },
{ 0x1, 5 },
{ 0xE2, 8 },
{ 0x1C6F, 13 },
{ 0x38D9, 14 },
{ 0x39, 6 },
{ 0x1F, 6 },
{ 0x2, 3 },
{ 0x1, 3 },
{ 0x9, 4 },
{ 0x8, 4 },
{ 0x0, 5 },
{ 0x70, 7 },
{ 0x1C7, 9 },
{ 0x38C, 10 },
{ 0x71A, 11 },
{ 0x38D8, 14 },
{ 0x38DB, 14 },
{ 0x38DA, 14 },
{ 0x38DD, 14 },
{ 0x38DC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, 4 },
{ 0x5, 4 },
{ 0x9, 4 },
{ 0x33, 6 },
{ 0x193, 9 },
{ 0x192C, 13 },
{ 0x61, 8 },
{ 0x31, 7 },
{ 0x0, 2 },
{ 0x7, 3 },
{ 0x10, 5 },
{ 0x11, 5 },
{ 0xC8, 8 },
{ 0x192F, 13 },
{ 0x325B, 14 },
{ 0x325A, 14 },
{ 0x1929, 13 },
{ 0x1928, 13 },
{ 0x192B, 13 },
{ 0x192A, 13 },
{ 0x325D, 14 },
{ 0x325C, 14 },
{ 0x18, 5 },
{ 0x1A, 6 },
{ 0x1B, 6 },
{ 0x65, 7 },
{ 0x19, 6 },
{ 0x4, 4 },
{ 0x7, 4 },
{ 0x60, 8 },
{ 0x324, 10 }
},
{ /* AC bias group 4, table 13 */
{ 0x6, 3 },
{ 0x0, 3 },
{ 0x2, 4 },
{ 0xF, 4 },
{ 0x39, 6 },
{ 0x1D9, 9 },
{ 0x1D82, 13 },
{ 0x761, 11 },
{ 0x3BE, 10 },
{ 0x1, 2 },
{ 0x2, 2 },
{ 0xF, 6 },
{ 0xE, 6 },
{ 0x762, 11 },
{ 0x3B07, 14 },
{ 0x3B06, 14 },
{ 0x3B1D, 14 },
{ 0x3B1C, 14 },
{ 0x3B1F, 14 },
{ 0x3B1E, 14 },
{ 0x3B19, 14 },
{ 0x3B18, 14 },
{ 0x3B1B, 14 },
{ 0x38, 6 },
{ 0x1DE, 9 },
{ 0xED, 8 },
{ 0x3BF, 10 },
{ 0xEE, 8 },
{ 0x3A, 6 },
{ 0x6, 5 },
{ 0xEC0, 12 },
{ 0x3B1A, 14 }
},
{ /* AC bias group 4, table 14 */
{ 0x0, 2 },
{ 0x2, 3 },
{ 0xF, 5 },
{ 0x6, 4 },
{ 0x1C, 6 },
{ 0x1D0, 10 },
{ 0xE8C, 13 },
{ 0x1D1B, 14 },
{ 0x1D1A, 14 },
{ 0x3, 2 },
{ 0x2, 2 },
{ 0xEA, 9 },
{ 0xE9, 9 },
{ 0xE89, 13 },
{ 0xE88, 13 },
{ 0xE8B, 13 },
{ 0xE8A, 13 },
{ 0x1D65, 14 },
{ 0x1D64, 14 },
{ 0x1D67, 14 },
{ 0x1D66, 14 },
{ 0x1D61, 14 },
{ 0x1D60, 14 },
{ 0x3AD, 11 },
{ 0x1D63, 14 },
{ 0x1D62, 14 },
{ 0x1D1D, 14 },
{ 0x1D1C, 14 },
{ 0x3B, 7 },
{ 0x1D7, 10 },
{ 0x1D1F, 14 },
{ 0x1D1E, 14 }
},
{ /* AC bias group 4, table 15 */
{ 0x2, 2 },
{ 0xF, 4 },
{ 0x1C, 5 },
{ 0xC, 4 },
{ 0x3B, 6 },
{ 0x1AC, 9 },
{ 0x1AD8, 13 },
{ 0x35B3, 14 },
{ 0x35B2, 14 },
{ 0x1, 2 },
{ 0x0, 2 },
{ 0x69, 7 },
{ 0x68, 7 },
{ 0x35BD, 14 },
{ 0x35BC, 14 },
{ 0x35BF, 14 },
{ 0x35BE, 14 },
{ 0x35B9, 14 },
{ 0x35B8, 14 },
{ 0x35BB, 14 },
{ 0x35BA, 14 },
{ 0x35B5, 14 },
{ 0x35B4, 14 },
{ 0x1A9, 9 },
{ 0x1A8, 9 },
{ 0x35A, 10 },
{ 0xD7, 8 },
{ 0xD5, 8 },
{ 0x3A, 6 },
{ 0x1B, 5 },
{ 0x35B7, 14 },
{ 0x35B6, 14 }
}
};
#endif /* AVCODEC_VP3DATA_H */
| {
"pile_set_name": "Github"
} |
// WARNING
//
// This file has been generated automatically by Xamarin Studio to store outlets and
// actions made in the UI designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
using System.CodeDom.Compiler;
namespace MessagesExtension
{
[Register ("IceCreamOutlineCell")]
partial class IceCreamOutlineCell
{
void ReleaseDesignerOutlets ()
{
}
}
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
//
#import <AppKit/NSImageCell.h>
@interface UACSeparatorImageCell : NSImageCell
{
}
- (BOOL)isAccessibilityElement;
@end
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Configurations;
using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.BusinessLogic;
using Microsoft.ServiceBus.Messaging;
namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.EventProcessor.WebJob.Processors
{
public class DeviceAdministrationProcessorFactory : IEventProcessorFactory
{
private readonly IDeviceLogic _deviceLogic;
private readonly IConfigurationProvider _configurationProvider;
readonly ConcurrentDictionary<string, DeviceAdministrationProcessor> eventProcessors = new ConcurrentDictionary<string, DeviceAdministrationProcessor>();
readonly ConcurrentQueue<DeviceAdministrationProcessor> closedProcessors = new ConcurrentQueue<DeviceAdministrationProcessor>();
public DeviceAdministrationProcessorFactory(IDeviceLogic deviceLogic, IConfigurationProvider configurationProvider)
{
_deviceLogic = deviceLogic;
_configurationProvider = configurationProvider;
}
public int ActiveProcessors
{
get { return this.eventProcessors.Count; }
}
public int TotalMessages
{
get
{
var amount = this.eventProcessors.Select(p => p.Value.TotalMessages).Sum();
amount += this.closedProcessors.Select(p => p.TotalMessages).Sum();
return amount;
}
}
public IEventProcessor CreateEventProcessor(PartitionContext context)
{
var processor = new DeviceAdministrationProcessor(_deviceLogic, _configurationProvider);
processor.ProcessorClosed += this.ProcessorOnProcessorClosed;
this.eventProcessors.TryAdd(context.Lease.PartitionId, processor);
return processor;
}
public Task WaitForAllProcessorsInitialized(TimeSpan timeout)
{
return this.WaitForAllProcessorsCondition(p => p.IsInitialized, timeout);
}
public Task WaitForAllProcessorsClosed(TimeSpan timeout)
{
return this.WaitForAllProcessorsCondition(p => p.IsClosed, timeout);
}
public async Task WaitForAllProcessorsCondition(Func<DeviceAdministrationProcessor, bool> predicate, TimeSpan timeout)
{
TimeSpan sleepInterval = TimeSpan.FromSeconds(2);
while(!this.eventProcessors.Values.All(predicate))
{
if (timeout > sleepInterval)
{
timeout = timeout.Subtract(sleepInterval);
}
else
{
throw new TimeoutException("Condition not satisfied within expected timeout.");
}
await Task.Delay(sleepInterval);
}
}
public void ProcessorOnProcessorClosed(object sender, EventArgs eventArgs)
{
var processor = sender as DeviceAdministrationProcessor;
if (processor != null)
{
this.eventProcessors.TryRemove(processor.Context.Lease.PartitionId, out processor);
this.closedProcessors.Enqueue(processor);
}
}
}
}
| {
"pile_set_name": "Github"
} |
{
"name": "Meltwater News US1, Inc.",
"displayName": "Meltwater News US1",
"properties": [
"meltwaternews.com"
]
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.megabits.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
| {
"pile_set_name": "Github"
} |
function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty : false,
unusedTokens : [],
unusedInput : [],
overflow : -2,
charsLeftOver : 0,
nullInput : false,
invalidMonth : null,
invalidFormat : false,
userInvalidated : false,
iso : false,
parsedDateParts : [],
meridiem : null,
rfc2822 : false,
weekdayMismatch : false
};
}
export default function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://search.maven.org/artifact/org.ogema.tools/ogema-console-scripting</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/ognl/ognl</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/biz.lermitage.oga/oga-maven-plugin</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/io.umehara/ogmapper</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.smartrplace.analysis/ogema-backup-parser</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.smartrplace.tools/ogema-timer-utils</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.tools/ogema-fileinstall</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.apps/ogema-simulations</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.messaging/ogema-messaging</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.widgets/ogema-js-bundle</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.widgets/ogema-gui-api</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.widgets/ogema-widgets</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.tests/ogema-exam-security2</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.ref-impl/ogema-exam-security</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.ref-impl/ogema-exam-base2</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.drivers/ogema-drivers</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.ref-impl/ogema-security-manager</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.tools/ogema-tools</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.ref-impl/ogema-exam-base</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.ref-impl/ogema-logger</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.apps/ogema-apps</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema.core/ogema-core</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.ogema/ogema</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/io.github.soc/ogc-tools-gml-jts</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/com.nikialeksey/og</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-parent</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-spring-boot-starter-sms</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-sms-cloudhopper</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-spring-boot-starter-email</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-template-thymeleaf</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-spring-boot-starter-all</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-sms-ovh</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-sms-smsglobal</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-spring-boot-autoconfigure</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-email-sendgrid</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-template-freemarker</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-all</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-test-utils</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-core</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-email-javamail</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/fr.sii.ogham/ogham-spring</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-schemas-scripts</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-dtd-parent</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-schema-parent</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-schemas</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-schemas-project</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/com.github.sebhoss.bom/ognl-bom</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.orbisgis/ogc-custom</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/me.shakiba.og4j/og4j</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jopendocument/ognl-engine</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-tools-gml-jts</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/org.jvnet.ogc/ogc-tools</loc>
</url>
<url>
<loc>https://search.maven.org/artifact/opensymphony/ognl</loc>
</url>
</urlset>
| {
"pile_set_name": "Github"
} |
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "abstract_read_only_operator.hpp"
#include "import_export/file_type.hpp"
#include "storage/dictionary_segment.hpp"
#include "storage/reference_segment.hpp"
#include "storage/run_length_segment.hpp"
#include "storage/value_segment.hpp"
#include "utils/assert.hpp"
namespace opossum {
/*
* This operator writes a table into a file.
* Supportes file types are .csv and Opossum .bin files.
* For .csv files, a CSV config is added, which is located in the <filename>.json file.
* Documentation of the file formats can be found in BinaryWriter and CsvWriter header files.
*/
class Export : public AbstractReadOnlyOperator {
public:
/**
* @param in Operator wrapping the table.
* @param filename Path to the output file.
* @param file_type Optional. Type indicating the file format. If not present, it is guessed by the filename.
*/
explicit Export(const std::shared_ptr<const AbstractOperator>& in, const std::string& filename,
const FileType& file_type = FileType::Auto);
const std::string& name() const final;
protected:
/**
* Executes the export operator
* @return The table that was also the input
*/
std::shared_ptr<const Table> _on_execute() final;
std::shared_ptr<AbstractOperator> _on_deep_copy(
const std::shared_ptr<AbstractOperator>& copied_left_input,
const std::shared_ptr<AbstractOperator>& copied_right_input) const override;
void _on_set_parameters(const std::unordered_map<ParameterID, AllTypeVariant>& parameters) override;
private:
// Path of the binary file
const std::string _filename;
FileType _file_type;
};
} // namespace opossum
| {
"pile_set_name": "Github"
} |
import gunicorn.app.base
from gunicorn.six import iteritems
class FalconGunicorn(gunicorn.app.base.BaseApplication):
'''Utility to deploy falcon.API on gunicorn'''
def __init__(self, app, options=None):
'''Constructor
Args:
app (falcon.API): a routed falcon API
options (dict): a set of options for gunicorn (e.g. workers, port, etc)
'''
self.options = options or {}
self.application = app
super(FalconGunicorn, self).__init__()
def load_config(self):
config = dict([(key, value) for key, value in iteritems(self.options)
if key in self.cfg.settings and value is not None])
for key, value in iteritems(config):
self.cfg.set(key.lower(), value)
def load(self):
return self.application
| {
"pile_set_name": "Github"
} |
librsaref.so is a demonstration dynamic engine that does RSA
operations using the old RSAref 2.0 implementation.
To make proper use of this engine, you must download RSAref 2.0
(search the web for rsaref.tar.Z for example) and unpack it in this
directory, so you'll end up having the subdirectories "install" and
"source" among others.
To build, do the following:
make
This will list a number of available targets to choose from. Most of
them are architecture-specific. The exception is "gnu" which is to be
used on systems where GNU ld and gcc have been installed in such a way
that gcc uses GNU ld to link together programs and shared libraries.
The make file assumes you use gcc. To change that, just reassign CC:
make CC=cc
The result is librsaref.so, which you can copy to any place you wish.
| {
"pile_set_name": "Github"
} |
pragma solidity ^0.4.20;
import "./BazaarItemListing.sol";
contract ItemListing /* is WorkbenchBase('BazaarItemListing', 'ItemListing') */
{
enum StateType { ItemAvailable, ItemSold }
StateType public State;
address public Seller;
address public InstanceBuyer;
address public ParentContract;
string public ItemName;
int public ItemPrice;
address public PartyA;
address public PartyB;
function ItemListing() public {}
function AddItem(string itemName, int itemPrice, address seller, address parentContractAddress, address partyA, address partyB) public {
Seller = seller;
ParentContract = parentContractAddress;
ItemName = itemName;
ItemPrice = itemPrice;
PartyA = partyA;
PartyB = partyB;
State = StateType.ItemAvailable;
// ContractCreated();
}
function BuyItem() public
{
InstanceBuyer = msg.sender;
// ensure that the buyer is not the seller
if (Seller == InstanceBuyer) {
revert();
}
Bazaar bazaar = Bazaar(ParentContract);
// check Buyer's balance
bool b = bazaar.HasBalance(InstanceBuyer, ItemPrice);
if (!b) {
revert();
}
// indicate item bought by updating seller and buyer balances
bazaar.UpdateBalance(Seller, InstanceBuyer, ItemPrice);
State = StateType.ItemSold;
// ContractUpdated('BuyItem');
}
}
import "./A__BazaarItemListing_Workbench.sol";
| {
"pile_set_name": "Github"
} |
{
"name": "allow silent update",
"version": "1.0",
"manifest_version": 2,
"permissions": [
"http://www.google.com/"
]
}
| {
"pile_set_name": "Github"
} |
---
redirect_url: /aspnet/core/mvc/views/overview
--- | {
"pile_set_name": "Github"
} |
/**
* 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.hdfs.tools.offlineImageViewer;
import java.io.IOException;
import java.util.LinkedList;
/**
* File size distribution visitor.
*
* <h3>Description.</h3>
* This is the tool for analyzing file sizes in the namespace image.
* In order to run the tool one should define a range of integers
* <tt>[0, maxSize]</tt> by specifying <tt>maxSize</tt> and a <tt>step</tt>.
* The range of integers is divided into segments of size <tt>step</tt>:
* <tt>[0, s<sub>1</sub>, ..., s<sub>n-1</sub>, maxSize]</tt>,
* and the visitor calculates how many files in the system fall into
* each segment <tt>[s<sub>i-1</sub>, s<sub>i</sub>)</tt>.
* Note that files larger than <tt>maxSize</tt> always fall into
* the very last segment.
*
* <h3>Input.</h3>
* <ul>
* <li><tt>filename</tt> specifies the location of the image file;</li>
* <li><tt>maxSize</tt> determines the range <tt>[0, maxSize]</tt> of files
* sizes considered by the visitor;</li>
* <li><tt>step</tt> the range is divided into segments of size step.</li>
* </ul>
*
* <h3>Output.</h3>
* The output file is formatted as a tab separated two column table:
* Size and NumFiles. Where Size represents the start of the segment,
* and numFiles is the number of files form the image which size falls in
* this segment.
*/
class FileDistributionVisitor extends TextWriterImageVisitor {
final private LinkedList<ImageElement> elemS = new LinkedList<ImageElement>();
private final static long MAX_SIZE_DEFAULT = 0x2000000000L; // 1/8 TB = 2^37
private final static int INTERVAL_DEFAULT = 0x200000; // 2 MB = 2^21
private int[] distribution;
private long maxSize;
private int step;
private int totalFiles;
private int totalDirectories;
private int totalBlocks;
private long totalSpace;
private long maxFileSize;
private FileContext current;
private boolean inInode = false;
/**
* File or directory information.
*/
private static class FileContext {
String path;
long fileSize;
int numBlocks;
int replication;
}
public FileDistributionVisitor(String filename,
long maxSize,
int step) throws IOException {
super(filename, false);
this.maxSize = (maxSize == 0 ? MAX_SIZE_DEFAULT : maxSize);
this.step = (step == 0 ? INTERVAL_DEFAULT : step);
long numIntervals = this.maxSize / this.step;
if(numIntervals >= Integer.MAX_VALUE)
throw new IOException("Too many distribution intervals " + numIntervals);
this.distribution = new int[1 + (int)(numIntervals)];
this.totalFiles = 0;
this.totalDirectories = 0;
this.totalBlocks = 0;
this.totalSpace = 0;
this.maxFileSize = 0;
}
@Override
void start() throws IOException {}
@Override
void finish() throws IOException {
// write the distribution into the output file
write("Size\tNumFiles\n");
for(int i = 0; i < distribution.length; i++)
write(((long)i * step) + "\t" + distribution[i] + "\n");
System.out.println("totalFiles = " + totalFiles);
System.out.println("totalDirectories = " + totalDirectories);
System.out.println("totalBlocks = " + totalBlocks);
System.out.println("totalSpace = " + totalSpace);
System.out.println("maxFileSize = " + maxFileSize);
super.finish();
}
@Override
void leaveEnclosingElement() throws IOException {
ImageElement elem = elemS.pop();
if(elem != ImageElement.INODE &&
elem != ImageElement.INODE_UNDER_CONSTRUCTION)
return;
inInode = false;
if(current.numBlocks < 0) {
totalDirectories ++;
return;
}
totalFiles++;
totalBlocks += current.numBlocks;
totalSpace += current.fileSize * current.replication;
if(maxFileSize < current.fileSize)
maxFileSize = current.fileSize;
int high;
if(current.fileSize > maxSize)
high = distribution.length-1;
else
high = (int)Math.ceil((double)current.fileSize / step);
distribution[high]++;
if(totalFiles % 1000000 == 1)
System.out.println("Files processed: " + totalFiles
+ " Current: " + current.path);
}
@Override
void visit(ImageElement element, String value) throws IOException {
if(inInode) {
switch(element) {
case INODE_PATH:
current.path = (value.equals("") ? "/" : value);
break;
case REPLICATION:
current.replication = Integer.valueOf(value);
break;
case NUM_BYTES:
current.fileSize += Long.valueOf(value);
break;
default:
break;
}
}
}
@Override
void visitEnclosingElement(ImageElement element) throws IOException {
elemS.push(element);
if(element == ImageElement.INODE ||
element == ImageElement.INODE_UNDER_CONSTRUCTION) {
current = new FileContext();
inInode = true;
}
}
@Override
void visitEnclosingElement(ImageElement element,
ImageElement key, String value) throws IOException {
elemS.push(element);
if(element == ImageElement.INODE ||
element == ImageElement.INODE_UNDER_CONSTRUCTION)
inInode = true;
else if(element == ImageElement.BLOCKS)
current.numBlocks = Integer.parseInt(value);
}
}
| {
"pile_set_name": "Github"
} |
package org.zstack.test.integration.storage.primary.ceph
import org.springframework.http.HttpEntity
import org.zstack.core.db.Q
import org.zstack.header.core.progress.TaskProgressVO
import org.zstack.header.volume.VolumeConstant
import org.zstack.sdk.AddCephPrimaryStorageAction
import org.zstack.sdk.ImageInventory
import org.zstack.sdk.VmInstanceInventory
import org.zstack.sdk.VolumeInventory
import org.zstack.storage.ceph.primary.CephPrimaryStorageBase
import org.zstack.test.integration.storage.CephEnv
import org.zstack.test.integration.storage.StorageTest
import org.zstack.testlib.EnvSpec
import org.zstack.testlib.SubCase
import org.zstack.utils.gson.JSONObjectUtil
/**
* Created by heathhose on 17-3-22.
*/
class CephStorageOneVmAndImageCase extends SubCase{
def description = """
1. use ceph for primary storage and backup storage
2. create a vm
3. create an image from the vm's root volume
confirm the volume created successfully
"""
EnvSpec env
@Override
void setup() {
useSpring(StorageTest.springSpec)
}
@Override
void environment() {
env = CephEnv.CephStorageOneVmEnv()
}
@Override
void test() {
env.create {
createImageFromRootVolume()
testCreateWithNoCephx()
testSyncVolumeActualSize()
}
}
void createImageFromRootVolume(){
VmInstanceInventory vm = env.inventoryByName("test-vm")
stopVmInstance {
uuid = vm.uuid
sessionId = loginAsAdmin().uuid
}
long count = Q.New(TaskProgressVO.class).count()
ImageInventory img = createRootVolumeTemplateFromRootVolume {
name = "template"
rootVolumeUuid = vm.getRootVolumeUuid()
sessionId = loginAsAdmin().uuid
}
assert count < Q.New(TaskProgressVO.class).count()
assert VolumeConstant.VOLUME_FORMAT_RAW == img.getFormat()
}
void testCreateWithNoCephx() {
def fsid = "8ff218d9-f525-435f-8a40-3618d1772a64"
def nocephx = false
env.simulator(CephPrimaryStorageBase.GET_FACTS) { HttpEntity<String> e, EnvSpec spec ->
def rsp = new CephPrimaryStorageBase.GetFactsRsp()
rsp.fsid = fsid
rsp.monAddr = "127.0.0.2"
rsp.success = true
return rsp
}
env.simulator(CephPrimaryStorageBase.INIT_PATH) { HttpEntity<String> e, EnvSpec spec ->
def cmd = JSONObjectUtil.toObject(e.body, CephPrimaryStorageBase.InitCmd.class)
nocephx = cmd.nocephx
def rsp = new CephPrimaryStorageBase.InitRsp()
rsp.success = true
rsp.fsid = fsid
rsp.totalCapacity = 400000000
rsp.availableCapacity = 400000000
return rsp
}
AddCephPrimaryStorageAction action = new AddCephPrimaryStorageAction()
action.name = "ceph-primary-new"
action.monUrls = ["root:password@127.0.0.2"]
action.rootVolumePoolName = "rootPool"
action.dataVolumePoolName = "dataPool"
action.imageCachePoolName = "cachePool"
action.systemTags = [ "ceph::nocephx" ]
action.zoneUuid = env.inventoryByName("zone").uuid
action.sessionId = adminSession()
AddCephPrimaryStorageAction.Result res = action.call()
assert res != null
assert nocephx
assert res.error == null
}
void testSyncVolumeActualSize(){
VmInstanceInventory vm = env.inventoryByName("test-vm") as VmInstanceInventory
env.simulator(CephPrimaryStorageBase.GET_VOLUME_SIZE_PATH) {
def rsp = new CephPrimaryStorageBase.GetVolumeSizeRsp()
rsp.size = 0
return rsp
}
env.simulator(CephPrimaryStorageBase.CREATE_SNAPSHOT_PATH) {
def rsp = new CephPrimaryStorageBase.CreateSnapshotRsp()
rsp.size = 0
return rsp
}
createVolumeSnapshot {
volumeUuid = vm.rootVolumeUuid
name = "test_snap"
}
def vol1 = syncVolumeSize {
uuid = vm.rootVolumeUuid
} as VolumeInventory
def vol2 = syncVolumeSize {
uuid = vm.rootVolumeUuid
} as VolumeInventory
assert vol1.actualSize == vol2.actualSize
}
@Override
void clean() {
env.delete()
}
}
| {
"pile_set_name": "Github"
} |
//========== Typography ==========//
// headings
h1, h2, h3 {
@apply font-bold leading-tight mt-0 mb-6 text-purple-900;
}
.page-title {
@apply text-4xl mb-4;
@screen md {
@apply text-6xl mb-6;
}
}
.page-subtitle {
@apply text-2xl mb-10 font-light text-gray-600;
@screen md {
@apply text-4xl;
}
}
// content
.content {
// paragraph
p {
@apply mb-8;
}
}
| {
"pile_set_name": "Github"
} |
Pricing models
==============
Per-period pricing
------------------
This is the simplest form of subscription pricing. The subscriber pays a fixed
amount every single period (ex: $29/month). Setting up a per-period pricing
consists of creating a ``Plan`` with a ``period`` (``HOURLY``, ``DAILY``,
``WEEKLY``, ``MONTHLY``, ``YEARLY``) and a positive ``period_amount``.
Example fixtures for a $29/month::
{
"fields": {
"slug": "indie",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Indie",
"organization": 2,
"is_active": 1.
"period_amount": 2900,
"period_type": 4
},
"model": "saas.Plan", "pk": 1
}
The ``organization`` field is set to reference the plan provider; here
``Organization`` with ``pk == 2``. The plan is also marked to be available
on the pricing page (``is_active == 1``) such that user can subscribe
to the plan.
The ``period_amount`` is to set as an integer amount of cents, ``2900`` in this
case, while the ``period_type`` is set to ``4`` which is the enum value for
``Plan.MONTHLY``.
On the initial payment, when a user subscribes to the plan through the checkout
workflow, ``Organization.checkout`` will be called to create the initial charge
and the ``Subscription`` record.
Later on whenever the subscription is about to expire, the renewals management
command will call ``extend_subscriptions`` to extend the subscription by one
period, then call ``create_charges_for_balance`` to charge the period amount
to the card on file.
Per-period pricing with setup fee
---------------------------------
It is sometimes necessary to charge a one-time setup fee, maybe because
a human needs to be involved to setup a physical space (in case of a co-working
office) or send a device (in case of an IoT service).
Example fixtures for a $29/month + a one-time $10 setup fee::
{
"fields": {
"slug": "indie",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Indie",
"organization": 2,
"is_active": 1,
"period_amount": 2900,
"period_type": 4,
**"setup_amount": 1000**
},
"model": "saas.Plan", "pk": 1
}
The ``setup_amount`` (in cents) is automatically added as a one-time charge
on the initial payment.
Per-period pricing with custom periods
--------------------------------------
You might be selling online Continuous Education Units (CEUs) that are valid
for a period of 2 years. Either it is a 2-year period, or a quarter
(3-month period), there are pricing models that align naturally with business
cycles that fall outside the monthly/yearly dichotomy.
For these cases, it makes sense to define a ``period_length`` which a value
grater than 1.
Example fixtures for a $29 per 2-year plan::
{
"fields": {
"slug": "indie",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Indie",
"organization": 2,
"is_active": 1,
"period_amount": 2900,
**"period_length": 2,**
"period_type": 5
},
"model": "saas.Plan", "pk": 1
}
Per-period pricing with discount for advance payments
-----------------------------------------------------
Software-as-a-Service (SaaS) is a relationship business. It makes sense
to incentivize subscribers to pay in advance by offering discounts.
You can specify ``advance_discounts`` on a plan. When you do so, the checkout
workflow will automatically present the option to pay for a multiple periods
in advance to the customer.
Example fixtures for a $29/month and a 20% discount if paid yearly::
{
"fields": {
"slug": "indie",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Indie",
"organization": 2,
"is_active": 1,
"period_amount": 2900,
"period_type": 4,
**"advance_discounts": [{
"discount_type": "percentage",
"amount": 2000,
"length": 12
}]**
},
"model": "saas.Plan", "pk": 1
}
Quota pricing
-------------
In some cases, the business model requires to charge base on usage (HTTP
requests, Gigabytes, messages, telephony minutes).
To implement a 3 Part Tariff (3PT) - fixed base, included quota, additional
charges for over quota - we associate a ``UseCharge`` instance to a ``Plan``.
Example fixtures for a $29/month, includes 100 "free" messages,
$0.15 per message afterwards::
{
"fields": {
"slug": "indie",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Indie",
"organization": 2,
"is_active": 1,
"period_amount": 2900,
"period_type": 4
},
"model": "saas.Plan", "pk": 1
}
{
"fields": {
"slug": "messages",
"created_at": "2019-01-01T00:00:00-00:00",
"title": "Per message",
"plan": 1,
"use_amount": 15,
"quota": 100
},
"model": "saas.UseCharge", "pk": 1
}
The functions ``new_use_charge`` and ``record_use_charge`` are the backbone
to implement quota pricing. Each time an ``UseCharge`` event occurs, call
``record_use_charge`` passing a subscription object and a use_charge object.
``record_use_charge`` will take care of recording the event into the transaction
ledger, applying the "free" quota limit as required.
Later on the :doc:`renewals command<periodic-tasks>` will recognize the revenue
for the over-quota usage and generate the appropriate invoices.
Marketplace transaction fee
---------------------------
If you are using a :doc:`Stripe processor backend<backends>`, it is possible
to setup a marketplace with a broker and multiple providers, collecting
a `broker fee <https://stripe.com/docs/connect/direct-charges#collecting-fees>`_
on transaction between subscribers and providers.
To setup a 10% broker fee, update your settings.py as such::
SAAS = {
'BROKER': {
'FEE_PERCENTAGE': 1000,
}
}
This will set the ``broker_fee_amount`` field on each ``Plan`` created.
When a ``Charge`` is created for an initial or renewed subscription,
the ``broker_fee_amount`` is applied.
Group buy
---------
The payer is not always the subscriber for a SaaS product. It often happens
in enterprise software, but with an increasingly mobile workforce, it often
the case that a contractor will bring his account while the employer will fit
the bill.
In our previous professional certification e-learning example
(`Per-period pricing with custom periods`_), a clinic pays for its staff
to take the online class, the account and completion certificate belongs
to the nurse (i.e. subscriber). This is implemented through a
"Group buy" feature.
To turn on the "Group buy" feature, set ``is_bulk_buyer`` to ``True``
in an ``Organization`` object::
{
"fields": {
"slug": "xia",
"created_at": "2019-01-01T00:00:00-00:00",
"full_name": "Xia Lee",
"processor": 1,
"is_active": 1,
**"is_bulk_buyer": true**
},
"model": "saas.Organization", "pk": 3
}
When a profile with ``is_bulk_buyer == True`` goes through the checkout
workflow, :ref:`steps are added<group_buy>` to allow the user to pay
a subscription on behalf of someone else.
When payment occurs, instead of creating a ``Subscription`` object
for the payer, a one-time ``Coupon`` is mechanically created. The final
subscriber can use that coupon at checkout to zero-out the balance due.
| {
"pile_set_name": "Github"
} |
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2013 Square, 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.squareup.wire.schema.internal.parser
import com.squareup.wire.Syntax
import com.squareup.wire.Syntax.PROTO_3
import com.squareup.wire.schema.Field
import com.squareup.wire.schema.Field.Label.REQUIRED
import com.squareup.wire.schema.Location
import com.squareup.wire.schema.internal.MAX_TAG_VALUE
/** Basic parser for `.proto` schema declarations. */
class ProtoParser internal constructor(
private val location: Location,
data: CharArray
) {
private val reader: SyntaxReader = SyntaxReader(data, location)
private val publicImports = mutableListOf<String>()
private val imports = mutableListOf<String>()
private val nestedTypes = mutableListOf<TypeElement>()
private val services = mutableListOf<ServiceElement>()
private val extendsList = mutableListOf<ExtendElement>()
private val options = mutableListOf<OptionElement>()
/** The number of declarations defined in the current file. */
private var declarationCount = 0
/** The syntax of the file, or null if none is defined. */
private var syntax: Syntax? = null
/** Output package name, or null if none yet encountered. */
private var packageName: String? = null
/** The current package name + nested type names, separated by dots. */
private var prefix = ""
fun readProtoFile(): ProtoFileElement {
while (true) {
val documentation = reader.readDocumentation()
if (reader.exhausted()) {
return ProtoFileElement(
location = location,
packageName = packageName,
syntax = syntax,
imports = imports,
publicImports = publicImports,
types = nestedTypes,
services = services,
extendDeclarations = extendsList,
options = options
)
}
when (val declaration = readDeclaration(documentation, Context.FILE)) {
is TypeElement -> {
val duplicate = nestedTypes.find { it.name == declaration.name }
if (duplicate != null) {
error("${declaration.name} (${declaration.location}) is already defined at " +
"${duplicate.location}")
}
nestedTypes.add(declaration)
}
is ServiceElement -> {
val duplicate = services.find { it.name == declaration.name }
if (duplicate != null) {
error("${declaration.name} (${declaration.location}) is already defined at " +
"${duplicate.location}")
}
services.add(declaration)
}
is OptionElement -> options.add(declaration)
is ExtendElement -> extendsList.add(declaration)
}
}
}
private fun readDeclaration(documentation: String, context: Context): Any? {
val index = declarationCount++
// Skip unnecessary semicolons, occasionally used after a nested message declaration.
if (reader.peekChar(';')) return null
val location = reader.location()
val label = reader.readWord()
return when {
label == "package" -> {
reader.expect(context.permitsPackage(), location) { "'package' in $context" }
reader.expect(packageName == null, location) { "too many package names" }
packageName = reader.readName()
prefix = "$packageName."
reader.require(';')
null
}
label == "import" -> {
reader.expect(context.permitsImport(), location) { "'import' in $context" }
when (val importString = reader.readString()) {
"public" -> publicImports.add(reader.readString())
else -> imports.add(importString)
}
reader.require(';')
null
}
label == "syntax" -> {
reader.expect(context.permitsSyntax(), location) { "'syntax' in $context" }
reader.require('=')
reader.expect(index == 0, location) {
"'syntax' element must be the first declaration in a file"
}
val syntaxString = reader.readQuotedString()
try {
syntax = Syntax[syntaxString]
} catch (e: IllegalArgumentException) {
throw reader.unexpected(e.message!!, location)
}
reader.require(';')
null
}
label == "option" -> {
OptionReader(reader).readOption('=').also {
reader.require(';')
}
}
label == "reserved" -> readReserved(location, documentation)
label == "message" -> readMessage(location, documentation)
label == "enum" -> readEnumElement(location, documentation)
label == "service" -> readService(location, documentation)
label == "extend" -> readExtend(location, documentation)
label == "rpc" -> {
reader.expect(context.permitsRpc(), location) { "'rpc' in $context" }
readRpc(location, documentation)
}
label == "oneof" -> {
reader.expect(context.permitsOneOf(), location) { "'oneof' must be nested in message" }
readOneOf(documentation)
}
label == "extensions" -> {
reader.expect(context.permitsExtensions(), location) { "'extensions' must be nested" }
readExtensions(location, documentation)
}
context == Context.MESSAGE || context == Context.EXTEND -> {
readField(documentation, location, label)
}
context == Context.ENUM -> {
readEnumConstant(documentation, location, label)
}
else -> throw reader.unexpected("unexpected label: $label", location)
}
}
/** Reads a message declaration. */
private fun readMessage(
location: Location,
documentation: String
): MessageElement {
val name = reader.readName()
val fields = mutableListOf<FieldElement>()
val oneOfs = mutableListOf<OneOfElement>()
val nestedTypes = mutableListOf<TypeElement>()
val extensions = mutableListOf<ExtensionsElement>()
val options = mutableListOf<OptionElement>()
val reserveds = mutableListOf<ReservedElement>()
val groups = mutableListOf<GroupElement>()
val previousPrefix = prefix
prefix = "$prefix$name."
reader.require('{')
while (true) {
val nestedDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
when (val declared = readDeclaration(nestedDocumentation, Context.MESSAGE)) {
is FieldElement -> fields.add(declared)
is OneOfElement -> oneOfs.add(declared)
is GroupElement -> groups.add(declared)
is TypeElement -> nestedTypes.add(declared)
is ExtensionsElement -> extensions.add(declared)
is OptionElement -> options.add(declared)
// Extend declarations always add in a global scope regardless of nesting.
is ExtendElement -> extendsList.add(declared)
is ReservedElement -> reserveds.add(declared)
}
}
prefix = previousPrefix
return MessageElement(
location = location,
name = name,
documentation = documentation,
nestedTypes = nestedTypes,
options = options,
reserveds = reserveds,
fields = fields,
oneOfs = oneOfs,
extensions = extensions,
groups = groups
)
}
/** Reads an extend declaration. */
private fun readExtend(location: Location, documentation: String): ExtendElement {
val name = reader.readName()
val fields = mutableListOf<FieldElement>()
reader.require('{')
while (true) {
val nestedDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
when (val declared = readDeclaration(nestedDocumentation, Context.EXTEND)) {
is FieldElement -> fields.add(declared)
// TODO: add else clause to catch unexpected declarations.
}
}
return ExtendElement(
location = location,
name = name,
documentation = documentation,
fields = fields
)
}
/** Reads a service declaration and returns it. */
private fun readService(location: Location, documentation: String): ServiceElement {
val name = reader.readName()
val rpcs = mutableListOf<RpcElement>()
val options = mutableListOf<OptionElement>()
reader.require('{')
while (true) {
val rpcDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
when (val declared = readDeclaration(rpcDocumentation, Context.SERVICE)) {
is RpcElement -> rpcs.add(declared)
is OptionElement -> options.add(declared)
// TODO: add else clause to catch unexpected declarations.
}
}
return ServiceElement(
location = location,
name = name,
documentation = documentation,
rpcs = rpcs,
options = options
)
}
/** Reads an enumerated type declaration and returns it. */
private fun readEnumElement(
location: Location,
documentation: String
): EnumElement {
val name = reader.readName()
val constants = mutableListOf<EnumConstantElement>()
val options = mutableListOf<OptionElement>()
reader.require('{')
while (true) {
val valueDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
when (val declared = readDeclaration(valueDocumentation, Context.ENUM)) {
is EnumConstantElement -> constants.add(declared)
is OptionElement -> options.add(declared)
// TODO: add else clause to catch unexpected declarations.
}
}
return EnumElement(location, name, documentation, options, constants)
}
private fun readField(documentation: String, location: Location, word: String): Any {
val label: Field.Label?
val type: String
when (word) {
"required" -> {
reader.expect(syntax != PROTO_3, location) {
"'required' label forbidden in proto3 field declarations"
}
label = REQUIRED
type = reader.readDataType()
}
"optional" -> {
label = Field.Label.OPTIONAL
type = reader.readDataType()
}
"repeated" -> {
label = Field.Label.REPEATED
type = reader.readDataType()
}
else -> {
reader.expect(syntax == PROTO_3 ||
(word == "map" && reader.peekChar() == '<'), location) {
"unexpected label: $word"
}
label = null
type = reader.readDataType(word)
}
}
reader.expect(!type.startsWith("map<") || label == null, location) {
"'map' type cannot have label"
}
return when (type) {
"group" -> readGroup(location, documentation, label)
else -> readField(location, documentation, label, type)
}
}
/** Reads an field declaration and returns it. */
private fun readField(
location: Location,
documentation: String,
label: Field.Label?,
type: String
): FieldElement {
var documentation = documentation
val name = reader.readName()
reader.require('=')
val tag = reader.readInt()
// Mutable copy to extract the default value, and add packed if necessary.
val options: MutableList<OptionElement> = OptionReader(reader).readOptions().toMutableList()
val defaultValue = stripDefault(options)
val jsonName = stripJsonName(options)
reader.require(';')
documentation = reader.tryAppendTrailingDocumentation(documentation)
return FieldElement(
location = location,
label = label,
type = type,
name = name,
defaultValue = defaultValue,
jsonName = jsonName,
tag = tag,
documentation = documentation,
options = options.toList()
)
}
/** Defaults aren't options. */
private fun stripDefault(options: MutableList<OptionElement>): String? {
return stripValue("default", options)
}
/** `json_name` isn't an option. */
private fun stripJsonName(options: MutableList<OptionElement>): String? {
return stripValue("json_name", options)
}
/**
* This finds an option named [name], removes, and returns it.
* Returns null if no [name] option is present.
*/
private fun stripValue(name: String, options: MutableList<OptionElement>): String? {
var result: String? = null
val i = options.iterator()
while (i.hasNext()) {
val element = i.next()
if (element.name == name) {
i.remove()
result = element.value.toString()
}
}
return result
}
private fun readOneOf(documentation: String): OneOfElement {
val name = reader.readName()
val fields = mutableListOf<FieldElement>()
val groups = mutableListOf<GroupElement>()
reader.require('{')
while (true) {
val nestedDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
val location = reader.location()
when (val type = reader.readDataType()) {
"group" -> groups.add(readGroup(location, nestedDocumentation, null))
else -> fields.add(readField(location, nestedDocumentation, null, type))
}
}
return OneOfElement(
name = name,
documentation = documentation,
fields = fields,
groups = groups
)
}
private fun readGroup(
location: Location,
documentation: String,
label: Field.Label?
): GroupElement {
val name = reader.readWord()
reader.require('=')
val tag = reader.readInt()
val fields = mutableListOf<FieldElement>()
reader.require('{')
while (true) {
val nestedDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
val fieldLocation = reader.location()
val fieldLabel = reader.readWord()
when (val field = readField(nestedDocumentation, fieldLocation, fieldLabel)) {
is FieldElement -> fields.add(field)
else -> throw reader.unexpected("expected field declaration, was $field")
}
}
return GroupElement(
label = label,
location = location,
name = name,
tag = tag,
documentation = documentation,
fields = fields
)
}
/** Reads a reserved tags and names list like "reserved 10, 12 to 14, 'foo';". */
private fun readReserved(location: Location, documentation: String): ReservedElement {
var documentation = documentation
val values = mutableListOf<Any>()
loop@ while (true) {
when (reader.peekChar()) {
'"', '\'' -> values.add(reader.readQuotedString())
else -> {
val tagStart = reader.readInt()
when (reader.peekChar()) {
',', ';' -> values.add(tagStart)
else -> {
reader.expect(reader.readWord() == "to", location) { "expected ',', ';', or 'to'" }
val tagEnd = reader.readInt()
values.add(tagStart..tagEnd)
}
}
}
}
when (reader.readChar()) {
';' -> break@loop
',' -> continue@loop
else -> throw reader.unexpected("expected ',' or ';'")
}
}
reader.expect(values.isNotEmpty(), location) {
"'reserved' must have at least one field name or tag"
}
documentation = reader.tryAppendTrailingDocumentation(documentation)
return ReservedElement(
location = location,
documentation = documentation,
values = values
)
}
/** Reads extensions like "extensions 101;" or "extensions 101 to max;". */
private fun readExtensions(
location: Location,
documentation: String
): ExtensionsElement {
val values = mutableListOf<Any>()
loop@ while (true) {
val start = reader.readInt()
when (reader.peekChar()) {
',', ';' -> values.add(start)
else -> {
reader.expect(reader.readWord() == "to", location) { "expected ',', ';' or 'to'" }
val end = when (val s = reader.readWord()) {
"max" -> MAX_TAG_VALUE
else -> s.toInt()
}
values.add(start..end)
}
}
when (reader.readChar()) {
';' -> break@loop
',' -> continue@loop
else -> throw reader.unexpected("expected ',' or ';'")
}
}
return ExtensionsElement(
location = location,
documentation = documentation,
values = values
)
}
/** Reads an enum constant like "ROCK = 0;". The label is the constant name. */
private fun readEnumConstant(
documentation: String, location: Location, label: String
): EnumConstantElement {
var documentation = documentation
reader.require('=')
val tag = reader.readInt()
val options = OptionReader(reader).readOptions()
reader.require(';')
documentation = reader.tryAppendTrailingDocumentation(documentation)
return EnumConstantElement(
location = location,
name = label,
tag = tag,
documentation = documentation,
options = options
)
}
/** Reads an rpc and returns it. */
private fun readRpc(location: Location, documentation: String): RpcElement {
val name = reader.readName()
reader.require('(')
var requestStreaming = false
val requestType = when (val word = reader.readWord()) {
"stream" -> reader.readDataType().also { requestStreaming = true }
else -> reader.readDataType(word)
}
reader.require(')')
reader.expect(reader.readWord() == "returns", location) { "expected 'returns'" }
reader.require('(')
var responseStreaming = false
val responseType = when (val word = reader.readWord()) {
"stream" -> reader.readDataType().also { responseStreaming = true }
else -> reader.readDataType(word)
}
reader.require(')')
val options = mutableListOf<OptionElement>()
if (reader.peekChar('{')) {
while (true) {
val rpcDocumentation = reader.readDocumentation()
if (reader.peekChar('}')) break
when (val declared = readDeclaration(rpcDocumentation, Context.RPC)) {
is OptionElement -> options.add(declared)
// TODO: add else clause to catch unexpected declarations.
}
}
} else {
reader.require(';')
}
return RpcElement(
location = location,
name = name,
documentation = documentation,
requestType = requestType,
responseType = responseType,
requestStreaming = requestStreaming,
responseStreaming = responseStreaming,
options = options
)
}
internal enum class Context {
FILE,
MESSAGE,
ENUM,
RPC,
EXTEND,
SERVICE;
fun permitsPackage() = this == FILE
fun permitsSyntax() = this == FILE
fun permitsImport() = this == FILE
fun permitsExtensions() = this != FILE
fun permitsRpc() = this == SERVICE
fun permitsOneOf() = this == MESSAGE
}
companion object {
/** Parse a named `.proto` schema. */
fun parse(location: Location, data: String): ProtoFileElement {
// TODO Migrate to data.toCharArray() once stable in common code.
val chars = CharArray(data.length, data::get)
return ProtoParser(location, chars).readProtoFile()
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.spring.nohttp.file;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import static org.assertj.core.api.Assertions.*;
/**
* @author Rob Winch
*/
public class FileUtilsTest {
@Rule
public TemporaryFolder temp = new TemporaryFolder();
private String text = "This is the text\nwith a newline";
@Test
public void readWrite() throws IOException {
File file = this.temp.newFile();
FileUtils.writeTextTo(this.text, file);
assertThat(FileUtils.readTextFrom(file)).isEqualTo(this.text);
}
@Test
public void readTextFromWhenNullThenIllegalArgumentException() {
assertThatCode(() -> FileUtils.readTextFrom(null))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("file cannot be null");
}
@Test
public void readTextFromWhenDirThenIllegalArgumentException() {
assertThatCode(() -> FileUtils.readTextFrom(this.temp.newFolder()))
.isInstanceOf(IllegalArgumentException.class)
.hasCauseInstanceOf(IOException.class);
}
@Test
public void writeTextToWhenNullThenIllegalArgumentException() {
assertThatCode(() -> FileUtils.writeTextTo(this.text, null))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("file cannot be null");
}
@Test
public void writeTextFromWhenDirThenIllegalArgumentException() {
assertThatCode(() -> FileUtils.writeTextTo(this.text, this.temp.newFolder()))
.isInstanceOf(IllegalArgumentException.class)
.hasCauseInstanceOf(IOException.class);
}
@Test
public void writeTextFromWhenTextNullIllegalArgumentException() {
assertThatCode(() -> FileUtils.writeTextTo(null, this.temp.newFile()))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("text cannot be null");
}
} | {
"pile_set_name": "Github"
} |
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION', null),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| While using one of the framework's cache driven session backends you may
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores".
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE', null),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you if it can not be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
];
| {
"pile_set_name": "Github"
} |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export class Node<T> {
readonly data: T;
readonly incoming = new Map<string, Node<T>>();
readonly outgoing = new Map<string, Node<T>>();
constructor(data: T) {
this.data = data;
}
}
export class Graph<T> {
private readonly _nodes = new Map<string, Node<T>>();
constructor(private readonly _hashFn: (element: T) => string) {
// empty
}
roots(): Node<T>[] {
const ret: Node<T>[] = [];
for (let node of this._nodes.values()) {
if (node.outgoing.size === 0) {
ret.push(node);
}
}
return ret;
}
insertEdge(from: T, to: T): void {
const fromNode = this.lookupOrInsertNode(from);
const toNode = this.lookupOrInsertNode(to);
fromNode.outgoing.set(this._hashFn(to), toNode);
toNode.incoming.set(this._hashFn(from), fromNode);
}
removeNode(data: T): void {
const key = this._hashFn(data);
this._nodes.delete(key);
for (let node of this._nodes.values()) {
node.outgoing.delete(key);
node.incoming.delete(key);
}
}
lookupOrInsertNode(data: T): Node<T> {
const key = this._hashFn(data);
let node = this._nodes.get(key);
if (!node) {
node = new Node(data);
this._nodes.set(key, node);
}
return node;
}
lookup(data: T): Node<T> | undefined {
return this._nodes.get(this._hashFn(data));
}
isEmpty(): boolean {
return this._nodes.size === 0;
}
toString(): string {
let data: string[] = [];
for (let [key, value] of this._nodes) {
data.push(`${key}, (incoming)[${[...value.incoming.keys()].join(', ')}], (outgoing)[${[...value.outgoing.keys()].join(',')}]`);
}
return data.join('\n');
}
}
| {
"pile_set_name": "Github"
} |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!310 &1
UnityConnectSettings:
m_ObjectHideFlags: 0
m_Enabled: 0
m_TestMode: 0
m_TestEventUrl:
m_TestConfigUrl:
CrashReportingSettings:
m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
m_Enabled: 0
m_CaptureEditorExceptions: 1
UnityPurchasingSettings:
m_Enabled: 0
m_TestMode: 0
UnityAnalyticsSettings:
m_Enabled: 0
m_InitializeOnStartup: 1
m_TestMode: 0
m_TestEventUrl:
m_TestConfigUrl:
UnityAdsSettings:
m_Enabled: 0
m_InitializeOnStartup: 1
m_TestMode: 0
m_EnabledPlatforms: 4294967295
m_IosGameId:
m_AndroidGameId:
PerformanceReportingSettings:
m_Enabled: 0
| {
"pile_set_name": "Github"
} |
package p1
private abstract class ProjectDef(val autoPlugins: Any) extends ProjectDefinition
sealed trait ResolvedProject extends ProjectDefinition {
def autoPlugins: Any
}
sealed trait ProjectDefinition {
private[p1] def autoPlugins: Any
}
object Test {
// was "error: value autoPlugins in class ProjectDef of type Any cannot override final member"
new ProjectDef(null) with ResolvedProject
}
| {
"pile_set_name": "Github"
} |
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\Localization;
class KlGlTest extends LocalizationTestCase
{
const LOCALE = 'kl_GL'; // Kalaallisut
const CASES = [
// Carbon::parse('2018-01-04 00:00:00')->addDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Tomorrow at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'arfininngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'sapaat at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'ataasinngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'marlunngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'pingasunngorneq at 00:00',
// Carbon::parse('2018-01-05 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-05 00:00:00'))
'sisamanngorneq at 00:00',
// Carbon::parse('2018-01-06 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-06 00:00:00'))
'tallimanngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'marlunngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'pingasunngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'sisamanngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'tallimanngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'arfininngorneq at 00:00',
// Carbon::now()->subDays(2)->calendar()
'Last sapaat at 20:49',
// Carbon::parse('2018-01-04 00:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Yesterday at 22:00',
// Carbon::parse('2018-01-04 12:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 12:00:00'))
'Today at 10:00',
// Carbon::parse('2018-01-04 00:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Today at 02:00',
// Carbon::parse('2018-01-04 23:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 23:00:00'))
'Tomorrow at 01:00',
// Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'marlunngorneq at 00:00',
// Carbon::parse('2018-01-08 00:00:00')->subDay()->calendar(Carbon::parse('2018-01-08 00:00:00'))
'Yesterday at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Yesterday at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Last marlunngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Last ataasinngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Last sapaat at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Last arfininngorneq at 00:00',
// Carbon::parse('2018-01-04 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))
'Last tallimanngorneq at 00:00',
// Carbon::parse('2018-01-03 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-03 00:00:00'))
'Last sisamanngorneq at 00:00',
// Carbon::parse('2018-01-02 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-02 00:00:00'))
'Last pingasunngorneq at 00:00',
// Carbon::parse('2018-01-07 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))
'Last tallimanngorneq at 00:00',
// Carbon::parse('2018-01-01 00:00:00')->isoFormat('Qo Mo Do Wo wo')
'1st 1st 1st 1st 1st',
// Carbon::parse('2018-01-02 00:00:00')->isoFormat('Do wo')
'2nd 1st',
// Carbon::parse('2018-01-03 00:00:00')->isoFormat('Do wo')
'3rd 1st',
// Carbon::parse('2018-01-04 00:00:00')->isoFormat('Do wo')
'4th 1st',
// Carbon::parse('2018-01-05 00:00:00')->isoFormat('Do wo')
'5th 1st',
// Carbon::parse('2018-01-06 00:00:00')->isoFormat('Do wo')
'6th 1st',
// Carbon::parse('2018-01-07 00:00:00')->isoFormat('Do wo')
'7th 1st',
// Carbon::parse('2018-01-11 00:00:00')->isoFormat('Do wo')
'11th 2nd',
// Carbon::parse('2018-02-09 00:00:00')->isoFormat('DDDo')
'40th',
// Carbon::parse('2018-02-10 00:00:00')->isoFormat('DDDo')
'41st',
// Carbon::parse('2018-04-10 00:00:00')->isoFormat('DDDo')
'100th',
// Carbon::parse('2018-02-10 00:00:00', 'Europe/Paris')->isoFormat('h:mm a z')
'12:00 am CET',
// Carbon::parse('2018-02-10 00:00:00')->isoFormat('h:mm A, h:mm a')
'12:00 AM, 12:00 am',
// Carbon::parse('2018-02-10 01:30:00')->isoFormat('h:mm A, h:mm a')
'1:30 AM, 1:30 am',
// Carbon::parse('2018-02-10 02:00:00')->isoFormat('h:mm A, h:mm a')
'2:00 AM, 2:00 am',
// Carbon::parse('2018-02-10 06:00:00')->isoFormat('h:mm A, h:mm a')
'6:00 AM, 6:00 am',
// Carbon::parse('2018-02-10 10:00:00')->isoFormat('h:mm A, h:mm a')
'10:00 AM, 10:00 am',
// Carbon::parse('2018-02-10 12:00:00')->isoFormat('h:mm A, h:mm a')
'12:00 PM, 12:00 pm',
// Carbon::parse('2018-02-10 17:00:00')->isoFormat('h:mm A, h:mm a')
'5:00 PM, 5:00 pm',
// Carbon::parse('2018-02-10 21:30:00')->isoFormat('h:mm A, h:mm a')
'9:30 PM, 9:30 pm',
// Carbon::parse('2018-02-10 23:00:00')->isoFormat('h:mm A, h:mm a')
'11:00 PM, 11:00 pm',
// Carbon::parse('2018-01-01 00:00:00')->ordinal('hour')
'0th',
// Carbon::now()->subSeconds(1)->diffForHumans()
'1 sikunti matuma siorna',
// Carbon::now()->subSeconds(1)->diffForHumans(null, false, true)
'1s matuma siorna',
// Carbon::now()->subSeconds(2)->diffForHumans()
'2 sikuntit matuma siorna',
// Carbon::now()->subSeconds(2)->diffForHumans(null, false, true)
'2s matuma siorna',
// Carbon::now()->subMinutes(1)->diffForHumans()
'1 minutsi matuma siorna',
// Carbon::now()->subMinutes(1)->diffForHumans(null, false, true)
'1m matuma siorna',
// Carbon::now()->subMinutes(2)->diffForHumans()
'2 minutsit matuma siorna',
// Carbon::now()->subMinutes(2)->diffForHumans(null, false, true)
'2m matuma siorna',
// Carbon::now()->subHours(1)->diffForHumans()
'1 tiimi matuma siorna',
// Carbon::now()->subHours(1)->diffForHumans(null, false, true)
'1h matuma siorna',
// Carbon::now()->subHours(2)->diffForHumans()
'2 tiimit matuma siorna',
// Carbon::now()->subHours(2)->diffForHumans(null, false, true)
'2h matuma siorna',
// Carbon::now()->subDays(1)->diffForHumans()
'1 ulloq matuma siorna',
// Carbon::now()->subDays(1)->diffForHumans(null, false, true)
'1d matuma siorna',
// Carbon::now()->subDays(2)->diffForHumans()
'2 ullut matuma siorna',
// Carbon::now()->subDays(2)->diffForHumans(null, false, true)
'2d matuma siorna',
// Carbon::now()->subWeeks(1)->diffForHumans()
'1 sap. ak. matuma siorna',
// Carbon::now()->subWeeks(1)->diffForHumans(null, false, true)
'1w matuma siorna',
// Carbon::now()->subWeeks(2)->diffForHumans()
'2 sap. ak. matuma siorna',
// Carbon::now()->subWeeks(2)->diffForHumans(null, false, true)
'2w matuma siorna',
// Carbon::now()->subMonths(1)->diffForHumans()
'qaammat 1 matuma siorna',
// Carbon::now()->subMonths(1)->diffForHumans(null, false, true)
'1mo matuma siorna',
// Carbon::now()->subMonths(2)->diffForHumans()
'qaammatit 2 matuma siorna',
// Carbon::now()->subMonths(2)->diffForHumans(null, false, true)
'2mos matuma siorna',
// Carbon::now()->subYears(1)->diffForHumans()
'ukioq 1 matuma siorna',
// Carbon::now()->subYears(1)->diffForHumans(null, false, true)
'1yr matuma siorna',
// Carbon::now()->subYears(2)->diffForHumans()
'ukiut 2 matuma siorna',
// Carbon::now()->subYears(2)->diffForHumans(null, false, true)
'2yrs matuma siorna',
// Carbon::now()->addSecond()->diffForHumans()
'1 sikunti from now',
// Carbon::now()->addSecond()->diffForHumans(null, false, true)
'1s from now',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now())
'1 sikunti after',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)
'1s after',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond())
'1 sikunti before',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond(), false, true)
'1s before',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true)
'1 sikunti',
// Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true, true)
'1s',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true)
'2 sikuntit',
// Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)
'2s',
// Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)
'1s from now',
// Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)
'1 minutsi 1 sikunti',
// Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)
'2yrs 3mos 1d 1s',
// Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)
'ukiut 3 from now',
// Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)
'5mos matuma siorna',
// Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)
'2yrs 3mos 1d 1s matuma siorna',
// Carbon::now()->addWeek()->addHours(10)->diffForHumans(null, true, false, 2)
'1 sap. ak. 10 tiimit',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'1 sap. ak. 6 ullut',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)
'1 sap. ak. 6 ullut',
// Carbon::now()->addWeek()->addDays(6)->diffForHumans(["join" => true, "parts" => 2])
'1 sap. ak. and 6 ullut from now',
// Carbon::now()->addWeeks(2)->addHour()->diffForHumans(null, true, false, 2)
'2 sap. ak. 1 tiimi',
// Carbon::now()->addHour()->diffForHumans(["aUnit" => true])
'tiimi from now',
// CarbonInterval::days(2)->forHumans()
'2 ullut',
// CarbonInterval::create('P1DT3H')->forHumans(true)
'1d 3h',
];
}
| {
"pile_set_name": "Github"
} |
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="../../../paper-styles/paper-styles.html">
<link rel="import" href="../../neon-animatable-behavior.html">
<link rel="import" href="../../neon-animation-runner-behavior.html">
<link rel="import" href="animated-grid.html">
<dom-module id="full-page">
<style>
:host {
background: black;
visibility: hidden;
@apply(--layout-vertical);
}
.toolbar {
background: #9c27b0;
height: 72px;
z-index: 1;
@apply(--shadow-elevation-2dp);
}
animated-grid {
height: calc(100% - 72px);
@apply(--layout-flex);
}
</style>
<template>
<div id="toolbar" class="toolbar"></div>
<animated-grid id="grid"></animated-grid>
</template>
</dom-module>
<script>
Polymer({
is: 'full-page',
behaviors: [
Polymer.NeonAnimatableBehavior,
Polymer.NeonAnimationRunnerBehavior
],
properties: {
animationConfig: {
type: Object,
value: function() {
return {
'entry': [{
name: 'slide-down-animation',
node: this.$.toolbar
}, {
animatable: this.$.grid,
type: 'entry'
}]
};
}
}
},
show: function() {
this.style.visibility = 'visible';
this.playAnimation('entry');
}
});
</script>
| {
"pile_set_name": "Github"
} |
/*****************************************************************
* 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
*
* 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 org.apache.cayenne.modeler.editor.datanode;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import org.apache.cayenne.configuration.PasswordEncoding;
import org.apache.cayenne.conn.DataSourceInfo;
import org.apache.cayenne.modeler.Application;
import org.apache.cayenne.modeler.util.JTextFieldUndoable;
import com.jgoodies.forms.builder.PanelBuilder;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;
public class PasswordEncoderView extends JPanel {
protected JComboBox passwordEncoder;
protected JComboBox passwordLocation;
protected JTextField passwordKey;
protected JTextField passwordSource;
protected JLabel passwordSourceLabel;
private static final String PASSWORD_CLASSPATH = "Classpath Search (File System)";
private static final String PASSWORD_EXECUTABLE = "Executable Program";
private static final String PASSWORD_MODEL = "Cayenne Model";
private static final String PASSWORD_URL = "URL (file:, http:, etc)";
private static final Object[] PASSWORD_LOCATIONS = new Object[] {
DataSourceInfo.PASSWORD_LOCATION_MODEL,
DataSourceInfo.PASSWORD_LOCATION_CLASSPATH,
DataSourceInfo.PASSWORD_LOCATION_EXECUTABLE,
DataSourceInfo.PASSWORD_LOCATION_URL
};
private static final Map<String, String> passwordSourceLabels = new TreeMap<String, String>();
static {
passwordSourceLabels.put(DataSourceInfo.PASSWORD_LOCATION_MODEL, PASSWORD_MODEL);
passwordSourceLabels.put(
DataSourceInfo.PASSWORD_LOCATION_CLASSPATH,
PASSWORD_CLASSPATH);
passwordSourceLabels.put(
DataSourceInfo.PASSWORD_LOCATION_EXECUTABLE,
PASSWORD_EXECUTABLE);
passwordSourceLabels.put(DataSourceInfo.PASSWORD_LOCATION_URL, PASSWORD_URL);
}
final class PasswordLocationRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(
JList list,
Object object,
int arg2,
boolean arg3,
boolean arg4) {
if (object != null)
object = passwordSourceLabels.get(object);
else
object = PASSWORD_MODEL;
return super.getListCellRendererComponent(list, object, arg2, arg3, arg4);
}
}
public PasswordEncoderView() {
this.passwordEncoder = Application.getWidgetFactory().createUndoableComboBox();
this.passwordLocation = Application.getWidgetFactory().createUndoableComboBox();
this.passwordSource = new JTextFieldUndoable();
this.passwordKey = new JTextFieldUndoable();
// init combo box choices
passwordEncoder.setModel(new DefaultComboBoxModel(
PasswordEncoding.standardEncoders));
passwordEncoder.setEditable(true);
passwordLocation = Application.getWidgetFactory().createUndoableComboBox();
passwordLocation.setRenderer(new PasswordLocationRenderer());
DefaultComboBoxModel passwordLocationModel = new DefaultComboBoxModel(
PASSWORD_LOCATIONS);
passwordLocation.setModel(passwordLocationModel);
CellConstraints cc = new CellConstraints();
FormLayout layout = new FormLayout(
"right:80dlu, 3dlu, fill:50dlu, 3dlu, fill:74dlu, 3dlu, fill:70dlu", // Columns
"p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p"); // Rows
PanelBuilder builder = new PanelBuilder(layout);
builder.setDefaultDialogBorder();
builder.addSeparator("Encoder", cc.xywh(1, 1, 7, 1));
builder.addLabel("Password Encoder:", cc.xy(1, 11));
builder.add(passwordEncoder, cc.xywh(3, 11, 5, 1));
builder.addLabel("Password Encoder Key:", cc.xy(1, 13));
builder.add(passwordKey, cc.xywh(3, 13, 5, 1));
builder.addLabel("Note: Cayenne supplied encoders do not use a key.", cc.xywh(
3,
15,
5,
1));
builder.addLabel("Password Location:", cc.xy(1, 17));
builder.add(passwordLocation, cc.xywh(3, 17, 5, 1));
passwordSourceLabel = builder.addLabel("Password Source:", cc.xy(1, 19));
builder.add(passwordSource, cc.xywh(3, 19, 5, 1));
this.setLayout(new BorderLayout());
this.add(builder.getPanel(), BorderLayout.CENTER);
}
/**
* @return the passwordEncoder
*/
public JComboBox getPasswordEncoder() {
return passwordEncoder;
}
/**
* @return the passwordLocation
*/
public JComboBox getPasswordLocation() {
return passwordLocation;
}
/**
* @return the passwordKey
*/
public JTextField getPasswordKey() {
return passwordKey;
}
/**
* @return the passwordSource
*/
public JTextField getPasswordSource() {
return passwordSource;
}
/**
* @return the passwordLocationLabel
*/
public JLabel getPasswordSourceLabel() {
return passwordSourceLabel;
}
}
| {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: eb01df5e478e34f058662188cbb4cbf2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
<?php
namespace Illuminate\Database;
use Illuminate\Database\Schema\PostgresBuilder;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as DoctrineDriver;
use Illuminate\Database\Query\Processors\PostgresProcessor;
use Illuminate\Database\Query\Grammars\PostgresGrammar as QueryGrammar;
use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar;
class PostgresConnection extends Connection
{
/**
* Get the default query grammar instance.
*
* @return \Illuminate\Database\Query\Grammars\PostgresGrammar
*/
protected function getDefaultQueryGrammar()
{
return $this->withTablePrefix(new QueryGrammar);
}
/**
* Get a schema builder instance for the connection.
*
* @return \Illuminate\Database\Schema\PostgresBuilder
*/
public function getSchemaBuilder()
{
if (is_null($this->schemaGrammar)) {
$this->useDefaultSchemaGrammar();
}
return new PostgresBuilder($this);
}
/**
* Get the default schema grammar instance.
*
* @return \Illuminate\Database\Schema\Grammars\PostgresGrammar
*/
protected function getDefaultSchemaGrammar()
{
return $this->withTablePrefix(new SchemaGrammar);
}
/**
* Get the default post processor instance.
*
* @return \Illuminate\Database\Query\Processors\PostgresProcessor
*/
protected function getDefaultPostProcessor()
{
return new PostgresProcessor;
}
/**
* Get the Doctrine DBAL driver.
*
* @return \Doctrine\DBAL\Driver\PDOPgSql\Driver
*/
protected function getDoctrineDriver()
{
return new DoctrineDriver;
}
}
| {
"pile_set_name": "Github"
} |
[Variables]
Wifi_X=658
;Left, Right or Center
Wifi_Anchor = Left
Wifi_Width=(#Font_Size#*4)
[Metadata]
Name=Fedina\\Wifi
Author=reddit.com/u/khanhas
Description=Display Wifi SSID.
[WifiAnchor]
Measure=String
String = #Wifi_Anchor#
IfMatch = Center|center|Middle|middle
IfMatchAction = [!SetOption WifiShape X "(#Bar_OffsetX#+#*Wifi_X*#-#Wifi_Width#/2)"]
IfMatch2 = Right|right
IfMatchAction2 = [!SetOption WifiShape X "(#Bar_OffsetX#+#*Wifi_X*#-#Wifi_Width#)"]
[WifiSSID]
Measure=Plugin
Plugin=WiFiStatus
WiFiInfoType=SSID
[WifiQuality]
Measure=Plugin
Plugin=WiFiStatus
WiFiInfoType=Quality
[WifiShape]
Meter=Shape
X=(#Bar_OffsetX#+#Wifi_X#)
Y=#Bar_OffsetY#
Shape=Rectangle 0,0,#Wifi_Width#,#Bar_Height# | StrokeWidth 0 | Extend Color
Color = Fill Color [ColorMeasureScript:GetColor('#Color_Scheme3#', '#Color_Scheme4#', 'side to middle', #Wifi_X#)]
DynamicVariables=1
ToolTipText=SSID: [WifiSSID]#CRLF#Quality: [WifiQuality]%
[WifiIcon]
Meter=String
Text=
FontFace=Material Icons
FontSize=(#Font_Size#*15/14)
FontColor=#Color_Scheme2#
AntiAlias=1
StringAlign=CenterCenter
X=([WifiShape:X] + [WifiShape:W]/2)
Y=(#Bar_OffsetY#+#Bar_Height#/2)
DynamicVariables=1
InlineSetting=GradientColor | 90 | #Color_Scheme2# ; 0 | #Color_Scheme2# ; ([WifiQuality]/100) | #Color_Scheme2#50 ; ([WifiQuality]/100)
| {
"pile_set_name": "Github"
} |
{
"response": {
"status": "not_banned",
"link": "http://vk.com/"
}
} | {
"pile_set_name": "Github"
} |
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location /shiny {
# Host the directory of Shiny Apps stored in this directory
site_dir /var/www/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
| {
"pile_set_name": "Github"
} |
package me.jbusdriver.mvp.presenter
import me.jbusdriver.mvp.ActressCollectContract
import me.jbusdriver.mvp.bean.ActressInfo
class ActressCollectPresenterImpl : BaseAbsCollectPresenter<ActressCollectContract.ActressCollectView, ActressInfo>(),
ActressCollectContract.ActressCollectPresenter {
override fun lazyLoad() {
onFirstLoad()
}
} | {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
//
#import <objc/NSObject.h>
@class NSMutableDictionary, NSMutableSet;
@interface LWPAMManager : NSObject
{
NSMutableSet *_serviceNames;
NSMutableDictionary *_pamHandles;
}
@property(retain) NSMutableDictionary *pamHandles; // @synthesize pamHandles=_pamHandles;
@property(retain) NSMutableSet *serviceNames; // @synthesize serviceNames=_serviceNames;
- (void)_endServiceNamed:(id)arg1 withError:(int)arg2;
- (void)_beginServiceNamed:(id)arg1;
- (void)closeWithError:(int)arg1;
- (void)close;
- (void)preload;
- (void)addServiceName:(id)arg1;
- (struct pam_handle *)serviceWithName:(id)arg1;
- (void)dealloc;
- (id)init;
@end
| {
"pile_set_name": "Github"
} |
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ugrep", "ugrep.vcxproj", "{63166CEB-02CC-472C-B3B7-E6C559939BDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Debug|Win32.ActiveCfg = Debug|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Debug|Win32.Build.0 = Debug|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Debug|x64.ActiveCfg = Debug|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Debug|x64.Build.0 = Debug|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Release|Win32.ActiveCfg = Release|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Release|Win32.Build.0 = Release|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Release|x64.ActiveCfg = Release|Win32
{63166CEB-02CC-472C-B3B7-E6C559939BDA}.Release|x64.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
| {
"pile_set_name": "Github"
} |
using UnityEngine;
using System.Collections;
public class ToLua_System_Type
{
}
| {
"pile_set_name": "Github"
} |
//
// BasePopupViewController.swift
// PopupWindow
//
// Created by Shinji Hayashi on 2018/02/08.
// Copyright © 2018年 shin884. All rights reserved.
//
import UIKit
open class BasePopupViewController: UIViewController {
private var item: PopupItem?
private var isShowedPopupView: Bool = false
private var isOrientationDidChange: Bool = false
private let blurSpaceView = PopupContainerView()
private var safeAreaInsets: UIEdgeInsets {
if #available(iOS 11.0, *) {
return view.safeAreaInsets
} else {
return .zero
}
}
public var canTapDismiss: Bool {
return item?.popupOption.canTapDismiss ?? false
}
override open func loadView() {
super.loadView()
configurePopupContainerView()
}
override open func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
guard let item = item else { return }
if isShowedPopupView { return }
isShowedPopupView = true
configureBlurSpaceView()
makePopupView(with: item)
showPopupView(duration: item.popupOption.duration, curve: item.popupOption.easing, delayFactor: 0.0)
}
override open func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
guard let item = item, isOrientationDidChange else { return }
item.view.frame = updatePopupViewFrame(with: item)
blurSpaceView.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)
convertShape(with: item)
isOrientationDidChange = false
}
override open func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
isOrientationDidChange = true
}
private func configurePopupContainerView() {
view = PopupContainerView()
view.backgroundColor = .clear
}
private func configureBlurSpaceView() {
blurSpaceView.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height)
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.tapPopupContainerView(_:)))
blurSpaceView.addGestureRecognizer(tapGestureRecognizer)
blurSpaceView.backgroundColor = .clear
view.addSubview(blurSpaceView)
}
@objc open func tapPopupContainerView(_ gestureRecognizer: UITapGestureRecognizer) {
// Processing when PopupContainerView is tapped
// For example dismiss processing
}
public func configurePopupItem(_ popupItem: PopupItem) {
if isShowedPopupView { return }
item = popupItem
}
public func makePopupView(with popupItem: PopupItem) {
let viewWidth = view.frame.width - popupItem.popupOption.margin * 2
let x = viewWidth > popupItem.maxWidth ? (view.frame.width - popupItem.maxWidth) / 2 : view.frame.origin.x + popupItem.popupOption.margin
let width = viewWidth > popupItem.maxWidth ? popupItem.maxWidth : viewWidth
let height = calcHeight(with: popupItem)
switch popupItem.popupOption.direction {
case .top:
popupItem.view.frame = CGRect(x: x, y: -popupItem.height, width: width, height: height)
case .bottom:
popupItem.view.frame = CGRect(x: x , y: view.frame.height - safeAreaInsets.bottom, width: width, height: height)
}
item = popupItem
convertShape(with: popupItem)
view.addSubview(popupItem.view)
}
public func replacePopupView(with popupItem: PopupItem) {
guard let item = item else { return }
item.view.removeFromSuperview()
popupItem.view.frame = updatePopupViewFrame(with: popupItem)
(popupItem.view as? PopupViewContainable)?.containerView.alpha = 0.0
view.addSubview(popupItem.view)
self.item = popupItem
addBlur(with: popupItem)
convertShape(with: popupItem)
let animator = UIViewPropertyAnimator(duration: 0.3, curve: .linear)
animator.addAnimations() {
(popupItem.view as? PopupViewContainable)?.containerView.alpha = 1.0
}
animator.startAnimation()
}
public func showPopupView(duration: TimeInterval, curve: Easing, delayFactor: CGFloat) {
let animator = Animator(duration: duration, easing: curve)
animator.addAnimations({ [weak self] in
guard let me = self, let item = me.item else { return }
item.view.frame = me.updatePopupViewFrame(with: item)
}, delayFactor: delayFactor)
animator.startAnimation()
let backgroundAnimator = Animator(duration: duration, easing: curve)
backgroundAnimator.addAnimations({ [weak self] in
guard let me = self, let item = me.item else { return }
me.addBlur(with: item)
}, delayFactor: delayFactor)
backgroundAnimator.startAnimation()
}
public func transformPopupView(duration: TimeInterval, curve: Easing, popupItem: PopupItem, completion: @escaping ((UIViewAnimatingPosition) -> Void)) {
let animator = Animator(duration: duration, easing: curve)
animator.addAnimations() { [weak self] in
guard let me = self, let item = me.item else { return }
me.addBlur(with: popupItem)
item.view.frame = me.updatePopupViewFrame(with: popupItem)
item.view.mask?.frame = CGRect(origin: .zero, size: me.updatePopupViewFrame(with: popupItem).size)
(item.view as? PopupViewContainable)?.containerView.alpha = 0
}
animator.addCompletion() { position in
completion(position)
}
animator.startAnimation()
}
public func dismissPopupView(duration: TimeInterval, curve: Easing, delayFactor: CGFloat = 0.0, direction: PopupViewDirection, completion: @escaping ((UIViewAnimatingPosition) -> Void)) {
let animator = Animator(duration: duration, easing: curve)
animator.addAnimations({ [weak self] in
guard let me = self, let item = me.item else { return }
me.view.backgroundColor = .clear
switch direction {
case .top: item.view.frame.origin.y = -item.view.frame.height
case .bottom: item.view.frame.origin.y = me.view.bounds.height
}
}, delayFactor: delayFactor)
animator.addCompletion() { position in
PopupWindowManager.shared.changeKeyWindow(rootViewController: nil)
completion(position)
}
animator.startAnimation()
}
private func updatePopupViewFrame(with popupItem: PopupItem) -> CGRect {
let viewWidth = view.frame.width - popupItem.popupOption.margin * 2
let x = viewWidth > popupItem.maxWidth ? (view.frame.width - popupItem.maxWidth) / 2 : view.frame.origin.x + popupItem.popupOption.margin
let y = calcPositionY(with: popupItem)
let width = viewWidth > popupItem.maxWidth ? popupItem.maxWidth : viewWidth
let height = calcHeight(with: popupItem)
return CGRect(x: x, y: y, width: width, height: height)
}
private func calcHeight(with popupItem: PopupItem) -> CGFloat {
let deviceOrientation: UIDeviceOrientation = UIDevice.current.orientation
if let _ = popupItem.landscapeSize, deviceOrientation.isLandscape {
return calcLandscapeHeight(with: popupItem)
} else {
return calcPortraitHeight(with: popupItem)
}
}
private func calcLandscapeHeight(with popupItem: PopupItem) -> CGFloat {
if UIDevice.current.userInterfaceIdiom == .pad {
return calcPortraitHeight(with: popupItem)
}
guard let landscapeSize = popupItem.landscapeSize else { return popupItem.height }
switch (popupItem.popupOption.viewType, popupItem.popupOption.direction) {
case (.toast, .top): return landscapeSize.height + safeAreaInsets.top
case (.toast, .bottom): return landscapeSize.height + safeAreaInsets.bottom
default: return landscapeSize.height
}
}
private func calcPortraitHeight(with popupItem: PopupItem) -> CGFloat {
switch (popupItem.popupOption.viewType, popupItem.popupOption.direction) {
case (.toast, .top): return popupItem.height + safeAreaInsets.top
case (.toast, .bottom): return popupItem.height + safeAreaInsets.bottom
default: return popupItem.height
}
}
private func calcPositionY(with popupItem: PopupItem) -> CGFloat {
if UIDevice.current.userInterfaceIdiom == .pad {
return calcPortraitPositionY(with: popupItem)
}
let deviceOrientation: UIDeviceOrientation = UIDevice.current.orientation
if let _ = popupItem.landscapeSize, deviceOrientation.isLandscape {
return calcLandscapePositionY(with: popupItem)
} else {
return calcPortraitPositionY(with: popupItem)
}
}
private func calcLandscapePositionY(with popupItem: PopupItem) -> CGFloat {
guard let landscapeSize = popupItem.landscapeSize else { return 0 }
switch (popupItem.popupOption.viewType, popupItem.popupOption.direction) {
case (.toast, .top): return view.frame.origin.y
case (.toast, .bottom): return view.frame.height - landscapeSize.height - safeAreaInsets.bottom
case (.card, .top): return popupItem.popupOption.margin + view.frame.origin.y + safeAreaInsets.top
case (.card, .bottom): return view.frame.height - landscapeSize.height - popupItem.popupOption.margin - safeAreaInsets.bottom
}
}
private func calcPortraitPositionY(with popupItem: PopupItem) -> CGFloat {
switch (popupItem.popupOption.viewType, popupItem.popupOption.direction) {
case (.toast, .top): return view.frame.origin.y
case (.toast, .bottom): return view.frame.height - popupItem.height - safeAreaInsets.bottom
case (.card, .top): return popupItem.popupOption.margin + view.frame.origin.y + safeAreaInsets.top
case (.card, .bottom): return view.frame.height - popupItem.height - popupItem.popupOption.margin - safeAreaInsets.bottom
}
}
private func convertShape(with popupItem: PopupItem) {
popupItem.view.convertShape(shape: popupItem.popupOption.shapeType)
}
private func addBlur(with popupItem: PopupItem) {
if popupItem.popupOption.hasBlur {
view.backgroundColor = UIColor.black.withAlphaComponent(0.8)
(view as? PopupContainerView)?.isAbleToTouchLower = false
blurSpaceView.isAbleToTouchLower = false
} else {
view.backgroundColor = UIColor.clear
(view as? PopupContainerView)?.isAbleToTouchLower = true
blurSpaceView.gestureRecognizers?.removeAll()
blurSpaceView.isAbleToTouchLower = true
}
}
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.