answer stringlengths 15 1.25M |
|---|
<?php
final class <API key> extends Phobject {
const REPOSITORY_TYPE_GIT = 'git';
const REPOSITORY_TYPE_SVN = 'svn';
const <API key> = 'hg';
public static function <API key>() {
$map = self::<API key>();
return ipull($map, 'name');
}
public static function <API key>($type) {
$spec = self::<API key>($type);
return idx($spec, 'name', pht('Unknown ("%s")', $type));
}
public static function <API key>($type) {
$map = self::<API key>();
return idx($map, $type, array());
}
public static function <API key>() {
return array(
self::REPOSITORY_TYPE_GIT => array(
'name' => pht('Git'),
'icon' => 'fa-git',
'create.header' => pht('Create Git Repository'),
'create.subheader' => pht('Create a new Git repository.'),
),/*
self::<API key> => array(
'name' => pht('Mercurial'),
'icon' => 'fa-code-fork',
'create.header' => pht('Create Mercurial Repository'),
'create.subheader' => pht('Create a new Mercurial repository.'),
),*/
self::REPOSITORY_TYPE_SVN => array(
'name' => pht('Subversion'),
'icon' => 'fa-database',
'create.header' => pht('Create Subversion Repository'),
'create.subheader' => pht('Create a new Subversion repository.'),
),
);
}
} |
@charset 'UTF-8';
@import url('http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,300italic,400italic');
@import url('font-awesome.min.css');
/* Basic */
/* Table */
/* Form */
/* Section/Article */
/* Image */
/* Button */
/* List */
/* Icons */
/* Nav */
/* Panels */
/* Footer */ |
package com.kv.structural.bridge;
public class Street extends AbstractRoad {
public void run() {
super.run();
aCar.run();
System.out.println("");
}
} |
package ${package}.conf;
import ${package}.dao.ItemDao;
import com.google.inject.Inject;
import fathom.conf.Fathom;
import fathom.exception.FathomException;
import fathom.realm.Account;
import fathom.rest.RoutesModule;
import fathom.rest.security.AuthConstants;
import fathom.rest.security.CSRFHandler;
import fathom.rest.security.<API key>;
import fathom.rest.security.Form<API key>;
import fathom.rest.security.LogoutHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Routes extends RoutesModule {
private final Logger log = LoggerFactory.getLogger(Routes.class);
@Inject
Form<API key> form<API key>;
@Inject
ItemDao dao;
@Inject
Fathom ftm;
@Override
protected void setup() {
/*
* Setup classpath resource handlers
*/
<API key>().named("webjars resource route");
<API key>().named("public resource route");
/*
* Define a resource exclusion regular expression.
* This ensures that we don't waste time processing
* the resource routes registered above.
*/
final String appFilter = <API key>();
/*
* Register a handler that binds some values to use on GET requests
*/
GET(appFilter, (ctx) -> {
// sets some response headers
ctx.setHeader("app-name", getSettings().getApplicationName());
ctx.setHeader("app-version", getSettings().<API key>());
ctx.setHeader("fathom-mode", getSettings().getMode().toString());
// put some values for the template engine or downstream handlers
ctx.setLocal("appName", getSettings().getApplicationName());
ctx.setLocal("appVersion", getSettings().<API key>());
ctx.setLocal("bootDate", ftm.getBootDate());
Account account = ctx.getSession(AuthConstants.ACCOUNT_ATTRIBUTE);
if (account != null) {
ctx.setLocal(AuthConstants.ACCOUNT_ATTRIBUTE, account);
}
ctx.next();
}).named("response header & bindings filter");
/*
* Create a form authentication handler and guard for the "secure" routes
*/
ALL("/login", form<API key>);
ALL("/logout", new LogoutHandler());
/*
* Register an CSRF token generator and validator.
*/
ALL("/ui/?.*", new CSRFHandler()).named("CSRF handler");
/*
* Create a form authentication guard for secure routes.
* In the absence of an authenticated session, the browser is redirected
* to the login url.
*/
<API key> guard = new <API key>("/login");
GET("/ui/?.*", guard);
POST("/ui/?.*", guard);
/*
* Root page
*/
GET("/", (ctx) -> {
ctx.setLocal("items", dao.getAll());
ctx.render("index");
}).named("root page");
/*
* Discover and add controllers
*/
addControllers();
/*
* Add some ignore path definitions
*/
getRouter().ignorePaths("/favicon.ico");
}
} |
<?php
/*
* DTOAN
* author : Pham Duy Toan
* Email : ghostkissboy12@gmail.com
*/
class AdminUserIdentity extends UserIdentity {
public $_id;
public $applicationId = BE;
private $status = 1;
public $role_id;
protected $_isAdmin = false;
const <API key> = 35;
const <API key> = 4;
public function authenticate() {
$record = Users::model()->findByAttributes(array('email' => $this->username,
'application_id' => $this->applicationId,
));
if ($record === null) {
$this->errorCode = self::<API key>;
} else if (trim($record->password_hash) != md5(trim($this->password))) {
$this->errorCode = self::<API key>;
} else if ($record->status == 0) {
$this->errorCode = self::<API key>;
} else {
$this->_id = $record->id;
$this->role_id = $record->role_id;
$this->_isAdmin = true;
$this->errorCode = self::ERROR_NONE;
Yii::app()->session['LOGGED_USER'] = $record;
}
return !$this->errorCode;
}
public function getId() {
return $this->_id;
}
public function getRoleId() {
return $this->role_id;
}
} |
// <auto-generated>
// :2.0.50727.8745
// </auto-generated>
namespace MsgPack.Serialization.<API key> {
[System.CodeDom.Compiler.<API key>("MsgPack.Serialization.CodeDomSerializers.<API key>", "0.9.0.0")]
[System.Diagnostics.<API key>()]
public class MsgPack_Serialization_PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionPropertySerializer : MsgPack.Serialization.<API key><MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty> {
private MsgPack.Serialization.<API key><System.Collections.Generic.IDictionary<string, string>> _serializer0;
private System.Collections.Generic.IList<System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>> _packOperationList;
private System.Collections.Generic.IDictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>> _packOperationTable;
private System.Collections.Generic.IDictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, bool>> _nullCheckersTable;
private System.Action<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, System.Collections.Generic.IDictionary<string, string>> <API key>;
private System.Collections.Generic.IList<string> _memberNames;
private System.Collections.Generic.IList<System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>> <API key>;
private System.Collections.Generic.IDictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>> <API key>;
public MsgPack_Serialization_PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionPropertySerializer(MsgPack.Serialization.<API key> context) :
base(context, (MsgPack.Serialization.<API key>.PackTo | MsgPack.Serialization.<API key>.UnpackFrom)) {
MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema);
System.Collections.Generic.Dictionary<string, System.Type> typeMap0 = default(System.Collections.Generic.Dictionary<string, System.Type>);
typeMap0 = new System.Collections.Generic.Dictionary<string, System.Type>(2);
typeMap0 = new System.Collections.Generic.Dictionary<string, System.Type>(2);
typeMap0.Add("0", typeof(System.Collections.Generic.Dictionary<string, string>));
typeMap0.Add("1", typeof(System.Collections.Generic.SortedDictionary<string, string>));
schema0 = MsgPack.Serialization.PolymorphismSchema.<API key>(typeof(System.Collections.Generic.IDictionary<string, string>), typeMap0, null, null);
this._serializer0 = context.GetSerializer<System.Collections.Generic.IDictionary<string, string>>(schema0);
System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>[] packOperationList = default(System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>[]);
packOperationList = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>[1];
packOperationList[0] = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>(this.<API key>);
this._packOperationList = packOperationList;
System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>> packOperationTable = default(System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>>);
packOperationTable = new System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>>(1);
packOperationTable["<API key>"] = new System.Action<MsgPack.Packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>(this.<API key>);
this._packOperationTable = packOperationTable;
System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, bool>> nullCheckerTable = default(System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, bool>>);
nullCheckerTable = new System.Collections.Generic.Dictionary<string, System.Func<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, bool>>(1);
nullCheckerTable["<API key>"] = new System.Func<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, bool>(this.<API key>);
this._nullCheckersTable = nullCheckerTable;
System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>[] unpackOperationList = default(System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>[]);
unpackOperationList = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>[1];
unpackOperationList[0] = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>(this.<API key>);
this.<API key> = unpackOperationList;
System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>> <API key> = default(System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>>);
<API key> = new System.Collections.Generic.Dictionary<string, System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>>(1);
<API key>["<API key>"] = new System.Action<MsgPack.Unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, int, int>(this.<API key>);
this.<API key> = <API key>;
this._memberNames = new string[] {
"<API key>"};
this.<API key> = new System.Action<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, System.Collections.Generic.IDictionary<string, string>>(this.<API key>);
}
private void <API key>(MsgPack.Packer packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty objectTree) {
this._serializer0.PackTo(packer, objectTree.<API key>);
}
private bool <API key>(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty objectTree) {
return (objectTree.<API key> == null);
}
protected internal override void PackToCore(MsgPack.Packer packer, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty objectTree) {
MsgPack.Serialization.<API key><MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty> <API key> = default(MsgPack.Serialization.<API key><MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>);
<API key>.Packer = packer;
<API key>.Target = objectTree;
<API key>.Operations = this._packOperationList;
MsgPack.Serialization.PackToMapParameters<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty> <API key> = default(MsgPack.Serialization.PackToMapParameters<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>);
<API key>.Packer = packer;
<API key>.Target = objectTree;
<API key>.Operations = this._packOperationTable;
<API key>.<API key> = this.OwnerContext;
<API key>.NullCheckers = this._nullCheckersTable;
if ((this.OwnerContext.SerializationMethod == MsgPack.Serialization.SerializationMethod.Array)) {
MsgPack.Serialization.PackHelpers.PackToArray(ref <API key>);
}
else {
MsgPack.Serialization.PackHelpers.PackToMap(ref <API key>);
}
}
private void <API key>(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty unpackingContext, System.Collections.Generic.IDictionary<string, string> unpackedValue) {
System.Collections.Generic.IDictionary<string, string> existent = default(System.Collections.Generic.IDictionary<string, string>);
existent = unpackingContext.<API key>;
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, string>> enumerator = unpackedValue.GetEnumerator();
System.Collections.Generic.KeyValuePair<string, string> current;
try {
for (
; enumerator.MoveNext();
) {
current = enumerator.Current;
existent.Add(current.Key, current.Value);
}
}
finally {
enumerator.Dispose();
}
}
private void <API key>(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty unpackingContext, int indexOfItem, int itemsCount) {
MsgPack.Serialization.<API key><MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, System.Collections.Generic.IDictionary<string, string>> <API key> = default(MsgPack.Serialization.<API key><MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty, System.Collections.Generic.IDictionary<string, string>>);
<API key>.Unpacker = unpacker;
<API key>.UnpackingContext = unpackingContext;
<API key>.Serializer = this._serializer0;
<API key>.ItemsCount = itemsCount;
<API key>.Unpacked = indexOfItem;
<API key>.TargetObjectType = typeof(System.Collections.Generic.IDictionary<string, string>);
<API key>.MemberName = "<API key>";
<API key>.NilImplication = MsgPack.Serialization.NilImplication.MemberDefault;
<API key>.DirectRead = null;
<API key>.Setter = this.<API key>;
MsgPack.Serialization.UnpackHelpers.<API key>(ref <API key>);
}
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker) {
MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty);
result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty();
if (unpacker.IsArrayHeader) {
return MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>(), this._memberNames, this.<API key>);
}
else {
return MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity<MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty>(), this.<API key>);
}
}
}
} |
#include <stdint.h>
#include <linux/i2c-dev.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/i2c.h>
#define MPL3115A2_ADDRESS (0x60) // 1100000
#define <API key> (0x00)
#define <API key> 0x02
#define <API key> 0x04
#define <API key> 0x08
#define <API key> (0x01)
#define <API key> (0x02)
#define <API key> (0x03)
#define <API key> (0x04)
#define <API key> (0x05)
#define <API key> (0x06)
#define <API key> (0x07)
#define <API key> (0x08)
#define <API key> (0x09)
#define <API key> (0x0A)
#define <API key> (0x0B)
#define MPL3115A2_WHOAMI (0x0C)
#define <API key> 0x13
#define <API key> 0x01
#define <API key> 0x02
#define <API key> 0x04
#define MPL3115A2_CTRL_REG1 (0x26)
#define <API key> 0x01
#define <API key> 0x02
#define <API key> 0x04
#define <API key> 0x00
#define <API key> 0x08
#define <API key> 0x10
#define <API key> 0x18
#define <API key> 0x20
#define <API key> 0x28
#define <API key> 0x30
#define <API key> 0x38
#define <API key> 0x40
#define <API key> 0x80
#define <API key> 0x00
#define MPL3115A2_CTRL_REG2 (0x27)
#define MPL3115A2_CTRL_REG3 (0x28)
#define MPL3115A2_CTRL_REG4 (0x29)
#define MPL3115A2_CTRL_REG5 (0x2A)
#define <API key> (0x12)
void begin(int file);
void get_current_temp(int file);
void <API key>(int file);
int set_register(int file, uint8_t addr, uint8_t reg, uint8_t value);
static int get_i2c_register(int file, unsigned char addr, unsigned char reg, unsigned char *value);
// void get_min_temp(float* temp);
// void get_min_pressure(float* pressure);
// void get_max_temp(float* temp);
// void get_max_temp(float* temp);
// void <API key>(char tunit);
// void fix_pressure_units(char punit); |
# Lint as: python3
"""Unit tests for dmiparse."""
import os
import dmiparse
from google3.pyglib import resources
from google3.testing.pybase import googletest
TEST_PATH = 'google3/third_party/py/dmiparse/test_data'
class DmiParserTest(googletest.TestCase):
def setUp(self):
super(DmiParserTest, self).setUp()
data_path = os.path.join(TEST_PATH, '<API key>.txt')
self.data_file = resources.GetResourceFilename(data_path)
def <API key>(self):
with self.assertRaises(FileNotFoundError):
dmiparse.DmiParser('').parse()
def <API key>(self):
records, _ = dmiparse.DmiParser(self.data_file).parse()
self.assertLen(records, 4)
self.assertIn('0x0002', records)
self.assertIn('0x0125', records)
self.assertIn('0x0126', records)
def <API key>(self):
records, _ = dmiparse.DmiParser(self.data_file).parse()
self.assertIn('0x0002', records)
base_board_record = records['0x0002']
self.assertEqual('0x0002', base_board_record.handle_id)
self.assertEqual(2, base_board_record.type_id)
self.assertLen(base_board_record.props, 9)
self.assertIn('Product Name', base_board_record.props)
self.assertEqual('Magnesium', base_board_record.props['Product Name'].val)
self.assertEqual([], base_board_record.props['Product Name'].items)
self.assertIn('Version', base_board_record.props)
self.assertEqual('1234567890', base_board_record.props['Version'].val)
self.assertEqual([], base_board_record.props['Version'].items)
self.assertIn('UUID', base_board_record.props)
self.assertEqual('<API key>',
base_board_record.props['UUID'].val)
self.assertEqual([], base_board_record.props['UUID'].items)
self.assertIn('Location In Chassis', base_board_record.props)
self.assertEqual('Riser1',
base_board_record.props['Location In Chassis'].val)
self.assertEqual([], base_board_record.props['Location In Chassis'].items)
self.assertIn('Chassis Handle', base_board_record.props)
self.assertEqual('0x0003', base_board_record.props['Chassis Handle'].val)
self.assertEqual([], base_board_record.props['Chassis Handle'].items)
self.assertIn('MAC Address', base_board_record.props)
self.assertEqual('00:1b:83:15:a3:24',
base_board_record.props['MAC Address'].val)
self.assertEqual([], base_board_record.props['MAC Address'].items)
self.assertIn('Contained Object Handles', base_board_record.props)
self.assertEqual('5',
base_board_record.props['Contained Object Handles'].val)
self.assertEqual(['0x009A', '0x009B', '0x009C', '0x009D', '0x009E'],
base_board_record.props['Contained Object Handles'].items)
self.assertIn('Characteristics', base_board_record.props)
self.assertEqual('', base_board_record.props['Characteristics'].val)
self.assertEqual([
'PCI is supported', 'BIOS is upgradeable', 'ACPI is supported',
'UEFI is supported'
], base_board_record.props['Characteristics'].items)
def <API key>(self):
records, _ = dmiparse.DmiParser(self.data_file).parse()
self.assertIn('0x0058', records)
oem_specific_record = records['0x0058']
self.assertIn('Strings', oem_specific_record.props)
self.assertEqual([
'WLYDCRB.86B.WR.64.2019.19.3.03.1837', '0. 0. 0', '4:2.1.21', 'N/A',
'FRU: Ver 1.21', 'N/A', 'N/A'
], oem_specific_record.props['Strings'].items)
def <API key>(self):
_, groups = dmiparse.DmiParser(self.data_file).parse()
self.assertIn(2, groups)
self.assertEqual(['0x0002'], groups[2])
self.assertIn(14, groups)
self.assertEqual(['0x0125', '0x0126'], groups[14])
if __name__ == '__main__':
googletest.main() |
/* $NetBSD: init.c,v 1.1.1.4 2014/05/28 09:58:51 tron Exp $ */
/* $OpenLDAP$ */
#include "perl_back.h"
#include "../config.h"
#ifdef PERL_SYS_INIT3
#include <ac/unistd.h> /* maybe get environ */
extern char **environ;
#endif
static void perl_back_xs_init LDAP_P((<API key>));
EXT void boot_DynaLoader LDAP_P((<API key>));
PerlInterpreter *PERL_INTERPRETER = NULL;
<API key> <API key>;
int
<API key>(
BackendInfo *bi
)
{
char *embedding[] = { "", "-e", "0", NULL }, **argv = embedding;
int argc = 3;
#ifdef PERL_SYS_INIT3
char **env = environ;
#else
char **env = NULL;
#endif
bi->bi_open = NULL;
bi->bi_config = 0;
bi->bi_close = perl_back_close;
bi->bi_destroy = 0;
bi->bi_db_init = perl_back_db_init;
bi->bi_db_config = perl_back_db_config;
bi->bi_db_open = perl_back_db_open;
bi->bi_db_close = 0;
bi->bi_db_destroy = <API key>;
bi->bi_op_bind = perl_back_bind;
bi->bi_op_unbind = 0;
bi->bi_op_search = perl_back_search;
bi->bi_op_compare = perl_back_compare;
bi->bi_op_modify = perl_back_modify;
bi->bi_op_modrdn = perl_back_modrdn;
bi->bi_op_add = perl_back_add;
bi->bi_op_delete = perl_back_delete;
bi->bi_op_abandon = 0;
bi->bi_extended = 0;
bi->bi_chk_referrals = 0;
bi->bi_connection_init = 0;
bi-><API key> = 0;
/* injecting code from perl_back_open, because using fonction reference (bi->bi_open) is not functional */
Debug( LDAP_DEBUG_TRACE, "perl backend open\n", 0, 0, 0 );
if( PERL_INTERPRETER != NULL ) {
Debug( LDAP_DEBUG_ANY, "perl backend open: already opened\n",
0, 0, 0 );
return 1;
}
<API key>( &<API key> );
#ifdef PERL_SYS_INIT3
PERL_SYS_INIT3(&argc, &argv, &env);
#endif
PERL_INTERPRETER = perl_alloc();
perl_construct(PERL_INTERPRETER);
#ifdef <API key>
PL_exit_flags |= <API key>;
#endif
perl_parse(PERL_INTERPRETER, perl_back_xs_init, argc, argv, env);
perl_run(PERL_INTERPRETER);
return perl_back_init_cf( bi );
}
int
perl_back_db_init(
BackendDB *be,
ConfigReply *cr
)
{
be->be_private = (PerlBackend *) ch_malloc( sizeof(PerlBackend) );
memset( be->be_private, '\0', sizeof(PerlBackend));
((PerlBackend *)be->be_private)-><API key> = 0;
Debug( LDAP_DEBUG_TRACE, "perl backend db init\n", 0, 0, 0 );
be->be_cf_ocs = be->bd_info->bi_cf_ocs;
return 0;
}
int
perl_back_db_open(
BackendDB *be,
ConfigReply *cr
)
{
int count;
int return_code;
PerlBackend *perl_back = (PerlBackend *) be->be_private;
<API key>( &<API key> );
{
dSP; ENTER; SAVETMPS;
PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
PUTBACK;
count = call_method("init", G_SCALAR);
SPAGAIN;
if (count != 1) {
croak("Big trouble in perl_back_db_open\n");
}
return_code = POPi;
PUTBACK; FREETMPS; LEAVE;
}
<API key>( &<API key> );
return return_code;
}
static void
perl_back_xs_init(<API key>)
{
char *file = __FILE__;
dXSUB_SYS;
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
}
#if SLAPD_PERL == SLAPD_MOD_DYNAMIC
/* conditionally define the init_module() function */
<API key>( perl )
#endif /* SLAPD_PERL == SLAPD_MOD_DYNAMIC */ |
DEBUG = True
<API key> = 'sqlite:///../instance/pa-hotness.db' |
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" />
<link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/>
<link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/>
<!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]-->
<style type="text/css" media="all">
@import url('../../../../../style.css');
@import url('../../../../../tree.css');
</style>
<script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script>
<script src="../../../../../package-nodes-tree.js" type="text/javascript"></script>
<script src="../../../../../clover-tree.js" type="text/javascript"></script>
<script src="../../../../../clover.js" type="text/javascript"></script>
<script src="../../../../../clover-descriptions.js" type="text/javascript"></script>
<script src="../../../../../cloud.js" type="text/javascript"></script>
<title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title>
</head>
<body>
<div id="page">
<header id="header" role="banner">
<nav class="aui-header <API key>" role="navigation">
<div class="aui-header-inner">
<div class="aui-header-primary">
<h1 id="logo" class="aui-header-logo <API key>">
<a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a>
</h1>
</div>
<div class="<API key>">
<ul class="aui-nav">
<li id="system-help-menu">
<a class="aui-nav-link" title="Open online documentation" target="_blank"
href="http://openclover.org/documentation">
<span class="aui-icon aui-icon-small aui-iconfont-help"> Help</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="aui-page-panel">
<div class="<API key>">
<div class="aui-page-panel-nav <API key>">
<div class="<API key>" style="margin-bottom: 20px;">
<div class="<API key>">
<a href="http://cardatechnologies.com" target="_top">
<div class="aui-avatar aui-avatar-large aui-avatar-project">
<div class="aui-avatar-inner">
<img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/>
</div>
</div>
</a>
</div>
<div class="<API key>" >
<h1>
<a href="http://cardatechnologies.com" target="_top">
ABA Route Transit Number Validator 1.0.1-SNAPSHOT
</a>
</h1>
</div>
</div>
<nav class="aui-navgroup <API key>">
<div class="aui-navgroup-inner">
<ul class="aui-nav">
<li class="">
<a href="../../../../../dashboard.html">Project overview</a>
</li>
</ul>
<div class="aui-nav-heading <API key>">
<strong>Packages</strong>
</div>
<div class="aui-nav project-packages">
<form method="get" action="#" class="aui <API key>">
<input type="text" autocomplete="off" class="package-filter text"
placeholder="Type to filter packages..." name="package-filter" id="package-filter"
title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/>
</form>
<p class="<API key> hidden">
<small>No results found.</small>
</p>
<div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator">
<div class="<API key>"></div>
<div class="<API key>"></div>
</div>
</div>
</div>
</nav> </div>
<section class="<API key>">
<div class="<API key>">
<div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs">
<li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li>
<li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li>
<li><a href="<API key>.html">Class <API key></a></li>
</ol></div>
<h1 class="aui-h2-clover">
Test <API key>
</h1>
<table class="aui">
<thead>
<tr>
<th>Test</th>
<th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th>
<th><label title="When the test execution was started">Start time</label></th>
<th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th>
<th><label title="A failure or error message if the test is not successful.">Message</label></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=47992#src-47992" ><API key></a>
</td>
<td>
<span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span>
</td>
<td>
7 Aug 12:34:41
</td>
<td>
0.0 </td>
<td>
<div></div>
<div class="errorMessage"></div>
</td>
</tr>
</tbody>
</table>
<div> </div>
<table class="aui aui-table-sortable">
<thead>
<tr>
<th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th>
<th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/<API key>.html?id=25808#<API key>" title="<API key>" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=25808#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=25808#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a>
</td>
<td>
<span class="sortValue">0.29411766</span>29.4%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td>
</tr>
</tbody>
</table>
</div> <!-- class="<API key>" -->
<footer id="footer" role="contentinfo">
<section class="footer-body">
<ul>
<li>
Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1
on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT.
</li>
</ul>
<ul>
<li>OpenClover is free and open-source software. </li>
</ul>
</section>
</footer> </section> <!-- class="<API key>" -->
</div> <!-- class="<API key>" -->
</div> <!-- class="aui-page-panel" -->
</div> <!-- id="page" -->
</body>
</html> |
// <auto-generated/>
#nullable disable
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;
namespace Azure.ResourceManager.Network.Models
{
public partial class ExpressRoutePort : <API key>
{
void <API key>.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Etag != null)
{
writer.WritePropertyName("etag");
writer.WriteStringValue(Etag);
}
if (Identity != null)
{
writer.WritePropertyName("identity");
writer.WriteObjectValue(Identity);
}
if (Id != null)
{
writer.WritePropertyName("id");
writer.WriteStringValue(Id);
}
if (Name != null)
{
writer.WritePropertyName("name");
writer.WriteStringValue(Name);
}
if (Type != null)
{
writer.WritePropertyName("type");
writer.WriteStringValue(Type);
}
if (Location != null)
{
writer.WritePropertyName("location");
writer.WriteStringValue(Location);
}
if (Tags != null)
{
writer.WritePropertyName("tags");
writer.WriteStartObject();
foreach (var item in Tags)
{
writer.WritePropertyName(item.Key);
writer.WriteStringValue(item.Value);
}
writer.WriteEndObject();
}
writer.WritePropertyName("properties");
writer.WriteStartObject();
if (PeeringLocation != null)
{
writer.WritePropertyName("peeringLocation");
writer.WriteStringValue(PeeringLocation);
}
if (BandwidthInGbps != null)
{
writer.WritePropertyName("bandwidthInGbps");
writer.WriteNumberValue(BandwidthInGbps.Value);
}
if (<API key> != null)
{
writer.WritePropertyName("<API key>");
writer.WriteNumberValue(<API key>.Value);
}
if (Mtu != null)
{
writer.WritePropertyName("mtu");
writer.WriteStringValue(Mtu);
}
if (Encapsulation != null)
{
writer.WritePropertyName("encapsulation");
writer.WriteStringValue(Encapsulation.Value.ToString());
}
if (EtherType != null)
{
writer.WritePropertyName("etherType");
writer.WriteStringValue(EtherType);
}
if (AllocationDate != null)
{
writer.WritePropertyName("allocationDate");
writer.WriteStringValue(AllocationDate);
}
if (Links != null)
{
writer.WritePropertyName("links");
writer.WriteStartArray();
foreach (var item in Links)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
if (Circuits != null)
{
writer.WritePropertyName("circuits");
writer.WriteStartArray();
foreach (var item in Circuits)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
if (ProvisioningState != null)
{
writer.WritePropertyName("provisioningState");
writer.WriteStringValue(ProvisioningState.Value.ToString());
}
if (ResourceGuid != null)
{
writer.WritePropertyName("resourceGuid");
writer.WriteStringValue(ResourceGuid);
}
writer.WriteEndObject();
writer.WriteEndObject();
}
internal static ExpressRoutePort <API key>(JsonElement element)
{
string etag = default;
<API key> identity = default;
string id = default;
string name = default;
string type = default;
string location = default;
IDictionary<string, string> tags = default;
string peeringLocation = default;
int? bandwidthInGbps = default;
float? <API key> = default;
string mtu = default;
<API key>? encapsulation = default;
string etherType = default;
string allocationDate = default;
IList<ExpressRouteLink> links = default;
IList<SubResource> circuits = default;
ProvisioningState? provisioningState = default;
string resourceGuid = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("etag"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
etag = property.Value.GetString();
continue;
}
if (property.NameEquals("identity"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
identity = <API key>.<API key>(property.Value);
continue;
}
if (property.NameEquals("id"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
id = property.Value.GetString();
continue;
}
if (property.NameEquals("name"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
name = property.Value.GetString();
continue;
}
if (property.NameEquals("type"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
type = property.Value.GetString();
continue;
}
if (property.NameEquals("location"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
location = property.Value.GetString();
continue;
}
if (property.NameEquals("tags"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
Dictionary<string, string> dictionary = new Dictionary<string, string>();
foreach (var property0 in property.Value.EnumerateObject())
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
dictionary.Add(property0.Name, null);
}
else
{
dictionary.Add(property0.Name, property0.Value.GetString());
}
}
tags = dictionary;
continue;
}
if (property.NameEquals("properties"))
{
foreach (var property0 in property.Value.EnumerateObject())
{
if (property0.NameEquals("peeringLocation"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
peeringLocation = property0.Value.GetString();
continue;
}
if (property0.NameEquals("bandwidthInGbps"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
bandwidthInGbps = property0.Value.GetInt32();
continue;
}
if (property0.NameEquals("<API key>"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
<API key> = property0.Value.GetSingle();
continue;
}
if (property0.NameEquals("mtu"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
mtu = property0.Value.GetString();
continue;
}
if (property0.NameEquals("encapsulation"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
encapsulation = new <API key>(property0.Value.GetString());
continue;
}
if (property0.NameEquals("etherType"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
etherType = property0.Value.GetString();
continue;
}
if (property0.NameEquals("allocationDate"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
allocationDate = property0.Value.GetString();
continue;
}
if (property0.NameEquals("links"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
List<ExpressRouteLink> array = new List<ExpressRouteLink>();
foreach (var item in property0.Value.EnumerateArray())
{
if (item.ValueKind == JsonValueKind.Null)
{
array.Add(null);
}
else
{
array.Add(ExpressRouteLink.<API key>(item));
}
}
links = array;
continue;
}
if (property0.NameEquals("circuits"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
List<SubResource> array = new List<SubResource>();
foreach (var item in property0.Value.EnumerateArray())
{
if (item.ValueKind == JsonValueKind.Null)
{
array.Add(null);
}
else
{
array.Add(SubResource.<API key>(item));
}
}
circuits = array;
continue;
}
if (property0.NameEquals("provisioningState"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
provisioningState = new ProvisioningState(property0.Value.GetString());
continue;
}
if (property0.NameEquals("resourceGuid"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
resourceGuid = property0.Value.GetString();
continue;
}
}
continue;
}
}
return new ExpressRoutePort(id, name, type, location, tags, etag, identity, peeringLocation, bandwidthInGbps, <API key>, mtu, encapsulation, etherType, allocationDate, links, circuits, provisioningState, resourceGuid);
}
}
} |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
if sys.version_info >= (3, 0):
from unittest.mock import patch
else:
from mock import patch
from pyfakefs import <API key>
from shellfoundry.utilities.config.config_context import ConfigContext
from shellfoundry.utilities.config.<API key> import ConfigFileCreation
from shellfoundry.utilities.config.config_record import ConfigRecord
class TestConfigRecord(<API key>.TestCase):
def setUp(self):
self.setUpPyfakefs()
@patch(
"shellfoundry.utilities.config.<API key>.open", create=True
) # create=True to overcome the issue with builtin methods default fallback
@patch("shellfoundry.utilities.config.<API key>.click.echo")
def <API key>(self, echo_mock, open_mock):
# Arrange
cfg_path = "/quali/shellfoundry/global_config.yml"
open_mock.side_effect = [
IOError("Failed to create the file, maybe it is already exists")
]
# Act
cfg_creation = ConfigFileCreation()
# Assert
self.assertRaises(IOError, cfg_creation.create, cfg_path)
echo_mock.assert_any_call(
"Failed to create the file, maybe it is already exists"
)
echo_mock.assert_any_call("Failed to create config file")
@patch("shellfoundry.utilities.config.<API key>.open", create=True)
@patch("shellfoundry.utilities.config.<API key>.click.echo")
def <API key>(
self, echo_mock, open_mock
):
# Arrange
cfg_path = "/quali/shellfoundry/global_config.yml"
open_mock.side_effect = [
IOError("Failed to create the file, maybe it is already exists")
]
# Act
with patch(
"shellfoundry.utilities.config.<API key>.os.path.exists"
) as path_mock:
path_mock.side_effect = [False, True, True]
ConfigFileCreation().create(cfg_path)
# Assert
echo_mock.<API key>("Creating config file...")
@patch("shellfoundry.utilities.config.<API key>.click.echo")
def <API key>(self, echo_mock):
# Arrange
cfg_path = "/quali/shellfoundry/global_config.yml"
# Act
with patch(
"shellfoundry.utilities.config.<API key>.os.makedirs"
) as makedirs_mock:
makedirs_mock.side_effect = [
OSError("Failed to create the folders hierarchy")
]
self.assertRaises(OSError, ConfigFileCreation().create, cfg_path)
# Assert
echo_mock.assert_any_call("Failed to create config file")
@patch("shellfoundry.utilities.config.<API key>.click.echo")
def <API key>(self, echo_mock):
# Arrange
self.fs.create_file(
"/quali/shellfoundry/global_config.yml",
contents="""
install:
host: someaddress""",
)
# Act
with patch("shellfoundry.utilities.config.config_context.yaml") as yaml_mock:
yaml_mock.safe_load.side_effect = [Exception()]
context = ConfigContext("/quali/shellfoundry/global_config.yml")
record = ConfigRecord("key", "value")
record.save(context)
# Assert
echo_mock.<API key>("Failed to save key value")
file_content = self.fs.get_object(
"/quali/shellfoundry/global_config.yml"
).contents
import os
self.assertTrue(
file_content
== """
install:
host: someaddress""",
"Expected: {}{}Actual: {}".format(
"""
install:
host: someaddress""",
os.linesep,
file_content,
),
)
@patch("shellfoundry.utilities.config.<API key>.click.echo")
def <API key>(self, echo_mock):
# Arrange
self.fs.create_file(
"/quali/shellfoundry/global_config.yml",
contents="""
install:
host: someaddress""",
)
# Act
with patch("shellfoundry.utilities.config.config_context.yaml") as yaml_mock:
yaml_mock.safe_load.side_effect = [Exception()]
context = ConfigContext("/quali/shellfoundry/global_config.yml")
record = ConfigRecord("host")
record.delete(context)
# Assert
echo_mock.<API key>("Failed to delete key")
file_content = self.fs.get_object(
"/quali/shellfoundry/global_config.yml"
).contents
import os
self.assertTrue(
file_content
== """
install:
host: someaddress""",
"Expected: {}{}Actual: {}".format(
"""
install:
""",
os.linesep,
file_content,
),
) |
package cn.felord.wepay.ali.sdk.api.domain;
import cn.felord.wepay.ali.sdk.api.AlipayObject;
import cn.felord.wepay.ali.sdk.api.internal.mapping.ApiField;
/**
*
*
* @author auto create
* @version $Id: $Id
*/
public class <API key> extends AlipayObject {
private static final long serialVersionUID = <API key>;
/**
*
2130
*/
@ApiField("amount")
private String amount;
/**
*
5
50000memoremark
1
2
3
4
5
6
7
8
9
10
*/
@ApiField("memo")
private String memo;
@ApiField("out_biz_no")
private String outBizNo;
@ApiField("payee_account_name")
private String payeeAccountName;
/**
*
1
2
*/
@ApiField("payee_account_type")
private String payeeAccountType;
/**
* 32/16
*/
@ApiField("payee_bank_code")
private String payeeBankCode;
@ApiField("payee_card_no")
private String payeeCardNo;
/**
* 100/50
*/
@ApiField("<API key>")
private String payeeInstBranchName;
/**
* 40/20
*/
@ApiField("payee_inst_city")
private String payeeInstCity;
/**
* 30/15
*/
@ApiField("payee_inst_name")
private String payeeInstName;
/**
* 20/10
*/
@ApiField("payee_inst_province")
private String payeeInstProvince;
/**
* 100/50
*/
@ApiField("payer_real_name")
private String payerRealName;
/**
* 100/50
50000memoremark
*/
@ApiField("remark")
private String remark;
/**
*
T0
T1
*/
@ApiField("time_liness")
private String timeLiness;
/**
* <p>Getter for the field <code>amount</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getAmount() {
return this.amount;
}
/**
* <p>Setter for the field <code>amount</code>.</p>
*
* @param amount a {@link java.lang.String} object.
*/
public void setAmount(String amount) {
this.amount = amount;
}
/**
* <p>Getter for the field <code>memo</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getMemo() {
return this.memo;
}
/**
* <p>Setter for the field <code>memo</code>.</p>
*
* @param memo a {@link java.lang.String} object.
*/
public void setMemo(String memo) {
this.memo = memo;
}
/**
* <p>Getter for the field <code>outBizNo</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getOutBizNo() {
return this.outBizNo;
}
/**
* <p>Setter for the field <code>outBizNo</code>.</p>
*
* @param outBizNo a {@link java.lang.String} object.
*/
public void setOutBizNo(String outBizNo) {
this.outBizNo = outBizNo;
}
/**
* <p>Getter for the field <code>payeeAccountName</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeAccountName() {
return this.payeeAccountName;
}
/**
* <p>Setter for the field <code>payeeAccountName</code>.</p>
*
* @param payeeAccountName a {@link java.lang.String} object.
*/
public void setPayeeAccountName(String payeeAccountName) {
this.payeeAccountName = payeeAccountName;
}
/**
* <p>Getter for the field <code>payeeAccountType</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeAccountType() {
return this.payeeAccountType;
}
/**
* <p>Setter for the field <code>payeeAccountType</code>.</p>
*
* @param payeeAccountType a {@link java.lang.String} object.
*/
public void setPayeeAccountType(String payeeAccountType) {
this.payeeAccountType = payeeAccountType;
}
/**
* <p>Getter for the field <code>payeeBankCode</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeBankCode() {
return this.payeeBankCode;
}
/**
* <p>Setter for the field <code>payeeBankCode</code>.</p>
*
* @param payeeBankCode a {@link java.lang.String} object.
*/
public void setPayeeBankCode(String payeeBankCode) {
this.payeeBankCode = payeeBankCode;
}
/**
* <p>Getter for the field <code>payeeCardNo</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeCardNo() {
return this.payeeCardNo;
}
/**
* <p>Setter for the field <code>payeeCardNo</code>.</p>
*
* @param payeeCardNo a {@link java.lang.String} object.
*/
public void setPayeeCardNo(String payeeCardNo) {
this.payeeCardNo = payeeCardNo;
}
/**
* <p>Getter for the field <code>payeeInstBranchName</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String <API key>() {
return this.payeeInstBranchName;
}
/**
* <p>Setter for the field <code>payeeInstBranchName</code>.</p>
*
* @param payeeInstBranchName a {@link java.lang.String} object.
*/
public void <API key>(String payeeInstBranchName) {
this.payeeInstBranchName = payeeInstBranchName;
}
/**
* <p>Getter for the field <code>payeeInstCity</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeInstCity() {
return this.payeeInstCity;
}
/**
* <p>Setter for the field <code>payeeInstCity</code>.</p>
*
* @param payeeInstCity a {@link java.lang.String} object.
*/
public void setPayeeInstCity(String payeeInstCity) {
this.payeeInstCity = payeeInstCity;
}
/**
* <p>Getter for the field <code>payeeInstName</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayeeInstName() {
return this.payeeInstName;
}
/**
* <p>Setter for the field <code>payeeInstName</code>.</p>
*
* @param payeeInstName a {@link java.lang.String} object.
*/
public void setPayeeInstName(String payeeInstName) {
this.payeeInstName = payeeInstName;
}
/**
* <p>Getter for the field <code>payeeInstProvince</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String <API key>() {
return this.payeeInstProvince;
}
/**
* <p>Setter for the field <code>payeeInstProvince</code>.</p>
*
* @param payeeInstProvince a {@link java.lang.String} object.
*/
public void <API key>(String payeeInstProvince) {
this.payeeInstProvince = payeeInstProvince;
}
/**
* <p>Getter for the field <code>payerRealName</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getPayerRealName() {
return this.payerRealName;
}
/**
* <p>Setter for the field <code>payerRealName</code>.</p>
*
* @param payerRealName a {@link java.lang.String} object.
*/
public void setPayerRealName(String payerRealName) {
this.payerRealName = payerRealName;
}
/**
* <p>Getter for the field <code>remark</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getRemark() {
return this.remark;
}
/**
* <p>Setter for the field <code>remark</code>.</p>
*
* @param remark a {@link java.lang.String} object.
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* <p>Getter for the field <code>timeLiness</code>.</p>
*
* @return a {@link java.lang.String} object.
*/
public String getTimeLiness() {
return this.timeLiness;
}
/**
* <p>Setter for the field <code>timeLiness</code>.</p>
*
* @param timeLiness a {@link java.lang.String} object.
*/
public void setTimeLiness(String timeLiness) {
this.timeLiness = timeLiness;
}
} |
package uk.gov.phe.erdst.sc.awag.service.extractor;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import uk.gov.phe.erdst.sc.awag.datamodel.Assessment;
import uk.gov.phe.erdst.sc.awag.datamodel.AssessmentReason;
import uk.gov.phe.erdst.sc.awag.shared.test.TestConstants;
@Test(groups = {TestConstants.<API key>})
public class <API key> extends <API key>
{
@Override
@BeforeMethod
public void setUp() throws Exception
{
super.setUp();
}
@Override
protected Class<?> getTestEntityClass()
{
return AssessmentReason.class;
}
@Test
public void <API key>()
{
super.testWithIdentical();
}
@Test
public void <API key>()
{
super.testWithDifferent();
}
// CS:OFF: MagicNumber
@Test(timeOut = 1000L)
public void testWithNullReason()
{
super.testWithNull();
}
// CS:ON
@Override
protected Assessment <API key>(Long reasonId, String reasonName)
{
Assessment assessment = new Assessment();
AssessmentReason reason = new AssessmentReason();
reason.setId(reasonId);
reason.setName(reasonName);
assessment.setReason(reason);
return assessment;
}
@Override
protected void nullifyTestEntity(Assessment assessment)
{
assessment.setReason(null);
}
} |
# AUTOGENERATED FILE
FROM balenalib/<API key>:jessie-build
ENV NODE_VERSION 10.23.1
ENV YARN_VERSION 1.22.4
RUN for key in \
<API key> \
; do \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
done \
&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$<API key>.tar.gz" \
&& echo "<SHA256-like> node-v$<API key>.tar.gz" | sha256sum -c - \
&& tar -xzf "node-v$<API key>.tar.gz" -C /usr/local --strip-components=1 \
&& rm "node-v$<API key>.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt/yarn \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& npm config set unsafe-perm true -g --unsafe-perm \ |
img {
max-width: 110%;
height: auto;
}
.clearfix {
clear: both;
}
.rowcolor {
background-color: #CCCCCC;
}
.padall {
padding: 10px;
}
.icon {
font-size: 23px;
color: #197BB5;
}
/* for fixed navbar */
body
{
padding-top: 50px;
}
.index-header
{
width: 100%;
padding-bottom:20px;
padding-top:30px;
font-size: 24px;
color: white;
background-color: #2bacf5;
margin-bottom: 30px;
}
.index-header h1
{
font-size: 60px;
line-height: 1;
}
#footer {
background-color:#2bacf5;
width:100%;
color:white;
}
#footer a, #footer a:visited {
color:white;
}
#footer a:active, #footer a:hover, #footer a:focus {
color:white;
text-decoration:underline;
}
/* Bootstrap overrides */
#main_navbar.navbar-default
{
background-color: #2bacf5;
border-color: #1778dc;
color: white;
}
#main_navbar.navbar-default .navbar-brand,
#main_navbar.navbar-default .navbar-brand:hover,
#main_navbar.navbar-default .navbar-brand:active,
#main_navbar.navbar-default .navbar-brand:focus
{
color: white;
font-weight: bold;
}
#main_navbar.navbar-default .navbar-toggle
{
color: white;
background-color: #2bacf5;
border-color: white;
}
#main_navbar.navbar-default .navbar-toggle .icon-bar
{
background-color: white;
}
#main_navbar.navbar-default .navbar-toggle:hover,
#main_navbar.navbar-default .navbar-toggle:active,
#main_navbar.navbar-default .navbar-toggle:focus
{
color: #F58723;
background-color: white;
}
#main_navbar.navbar-default .navbar-toggle:hover .icon-bar,
#main_navbar.navbar-default .navbar-toggle:active .icon-bar,
#main_navbar.navbar-default .navbar-toggle:focus .icon-bar
{
background-color: #2bacf5;
}
#main_navbar.navbar-default .navbar-nav > li > a,
#main_navbar.navbar-default .navbar-nav > li > a:visited,
#main_navbar.navbar-default .navbar-nav > li > a:active,
#main_navbar.navbar-default .navbar-nav > li > a:focus
{
color: white;
}
#main_navbar.navbar-default .navbar-nav > li > a:hover
{
color: white;
}
#main_navbar.navbar-default .navbar-nav > .active > a,
#main_navbar.navbar-default .navbar-nav > .active > a:hover,
#main_navbar.navbar-default .navbar-nav > .active > a:focus
{
background-color: #2bacf5;
color: white;
}
.pagination li a,
.pagination li a:hover,
.pagination li a:visited,
.pagination li a:active,
.pagination li a:focus
{
color: #555;
}
.pagination .active,
.pagination .active a,
.pagination .active a:hover,
.pagination .active a:visited,
.pagination .active a:active,
.pagination .active a:focus
{
background-color: #2bacf5;
border-color: #F58723;
color: white;
}
.pb-template a, .pb-template a:visited
{
color: #444444;
}
.pb-template a:active, .pb-template a:hover, .pb-template a:focus
{
color: #222222;
text-decoration: none;
}
.pb-callout
{
width: 100%;
background-color: rgba(245, 135, 35, 0.10);
border-left: 3px #F58723 solid;
padding: 15px 10px 15px 10px;
color: #343434;
} |
# AUTOGENERATED FILE
FROM balenalib/up-squared-alpine:3.11-build
# remove several traces of python
RUN apk del python*
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
# point Python at a system-provided certificate database. Otherwise, we might hit <API key>.
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
ENV PYTHON_VERSION 3.5.10
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.0.1
ENV SETUPTOOLS_VERSION 56.0.0
RUN set -x \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.<API key>.1.tar.gz" \
&& echo "<SHA256-like> Python-$PYTHON_VERSION.<API key>.1.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.<API key>.1.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.<API key>.1.tar.gz" \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/<SHA1-like>/get-pip.py" \
&& echo "<SHA256-like> get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv
ENV PYTHON_DBUS_VERSION 1.2.8
# install dbus-python dependencies
RUN apk add --no-cache \
dbus-dev \
dbus-glib-dev
# install dbus-python
RUN set -x \
&& mkdir -p /usr/src/dbus-python \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
&& gpg --verify dbus-python.tar.gz.asc \
&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
&& rm dbus-python.tar.gz* \
&& cd /usr/src/dbus-python \
&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
&& make -j$(nproc) \
&& make install -j$(nproc) \
&& cd / \
&& rm -rf /usr/src/dbus-python
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -sf pip3 pip \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
&& ln -sf idle3 idle \
&& ln -sf pydoc3 pydoc \
&& ln -sf python3 python \
&& ln -sf python3-config python-config
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/<SHA1-like>/scripts/assets/tests/test-stack@python.sh" \
&& echo "Running test-stack@python" \
&& chmod +x test-stack@python.sh \
&& bash test-stack@python.sh \
&& rm -rf test-stack@python.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https:
RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& ln -f /bin/sh /bin/sh.real \
&& ln -f /bin/sh-shim /bin/sh |
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=type.P24.html">
</head>
<body>
<p>Redirecting to <a href="type.P24.html">type.P24.html</a>...</p>
<script>location.replace("type.P24.html" + location.search + location.hash);</script>
</body>
</html> |
import React from "react"
import {Spring, config} from "react-spring"
import "./style.scss"
class SkillItem extends React.Component {
render() {
let {
name,
level,
index
} = this.props
// console.log("skillitem:",this.props)
return (
<div className="skill-item">
<div className="skill-name">
{name}
</div>
<SkillBar level={level} index={index}/>
</div>
)
}
}
const SkillBar = ({level, index}) => {
// console.log("moving to :",level)
return (
<div className="skill-bar">
<Spring
from={{ width: '0%' }}
to={{ width: `${level}%` }}
config={config.slow}
delay={index*100}
>
{
(props) => (
<div style={props} className="skill-bar-inside">
</div>
)
}
</Spring>
<p>{`${level}%`}</p>
</div>
)
}
export default SkillItem |
#ifndef <API key>
#define <API key>
struct wine_preload_info
{
void *addr;
size_t size;
};
#endif /* <API key> */ |
var authModule = angular.module('authModule',['ngRoute'])
authModule.service("AuthService", function(){
function url_base64_decode(str){
return window.atob(str)
}
this.url_base64_decode = url_base64_decode
})
authModule.controller('AuthCtrl', function($scope, $http, $window, AuthService){
$scope.user = {username: '', password: ''}
$scope.isAuthenticated = false
$scope.submit = function (){
$http
.post('login', $scope.user)
.then(function (response, status, headers, config){
$window.sessionStorage.token = response.data.token;
$scope.isAthenticated = true;
$scope.message = "Success! Loading application";
$window.location.href = '/index'
})
.catch(function(response, status, headers, config){
delete $window.sessionStorage.token;
$scope.isAuthenticated = false;
$scope.message = response.data;
})
}
$scope.logout = function() {
$scope.isAuthenticated = false;
alert("loggedOut!")
}
});
authModule.factory("authInterceptor", function($rootScope, $q, $window){
return {
request: function(config){
config.headers = config.headers || {};
if ($window.sessionStorage.token){
config.headers.Authorization = 'Bearer ' + $window.sessionStorage.token;
}
return config;
},
responseError: function(rejection){
if (rejection.status === 401){
//Manage common 401 actions
}
return $q.reject(rejection);
}
};
});
authModule.config(function ($httpProvider){
$httpProvider.interceptors.push('authInterceptor');
});
authModule.config(['$interpolateProvider', function($interpolateProvider) {
$interpolateProvider.startSymbol('{a');
$interpolateProvider.endSymbol('a}');
}]); |
package com.jetbrains.jsonSchema.impl;
import com.intellij.codeInsight.AutoPopupController;
import com.intellij.codeInsight.completion.*;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.<API key>;
import com.intellij.ide.DataManager;
import com.intellij.internal.statistic.UsageTrigger;
import com.intellij.json.psi.JsonStringLiteral;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.<API key>;
import com.intellij.openapi.editor.SelectionModel;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.Consumer;
import com.intellij.util.ObjectUtils;
import com.intellij.util.containers.ContainerUtil;
import com.jetbrains.jsonSchema.extension.JsonLikePsiWalker;
import com.jetbrains.jsonSchema.extension.<API key>;
import com.jetbrains.jsonSchema.extension.SchemaType;
import com.jetbrains.jsonSchema.extension.adapters.JsonPropertyAdapter;
import com.jetbrains.jsonSchema.ide.JsonSchemaService;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.util.*;
/**
* @author Irina.Chernushina on 10/1/2015.
*/
public class <API key> extends <API key> {
private static final String BUILTIN_USAGE_KEY = "json.schema.builtin.completion";
private static final String SCHEMA_USAGE_KEY = "json.schema.schema.completion";
private static final String USER_USAGE_KEY = "json.schema.user.completion";
@Override
public void <API key>(@NotNull <API key> parameters, @NotNull CompletionResultSet result) {
final PsiElement position = parameters.getPosition();
final VirtualFile file = PsiUtilCore.getVirtualFile(position);
if (file == null) return;
final JsonSchemaService service = JsonSchemaService.Impl.get(position.getProject());
final JsonSchemaObject rootSchema = service.getSchemaObject(file);
if (rootSchema == null) return;
updateStat(service.getSchemaProvider(rootSchema.getSchemaFile()));
doCompletion(parameters, result, rootSchema);
}
public static void doCompletion(@NotNull final <API key> parameters,
@NotNull final CompletionResultSet result,
@NotNull final JsonSchemaObject rootSchema) {
final PsiElement completionPosition = parameters.getOriginalPosition() != null ? parameters.getOriginalPosition() :
parameters.getPosition();
new Worker(rootSchema, parameters.getPosition(), completionPosition, result).work();
result.stopHere();
}
@TestOnly
public static List<LookupElement> <API key>(@NotNull final JsonSchemaObject schema,
@NotNull final PsiElement position, @NotNull final PsiElement originalPosition) {
final List<LookupElement> result = new ArrayList<>();
new Worker(schema, position, originalPosition, element -> result.add(element)).work();
return result;
}
private static void updateStat(@Nullable <API key> provider) {
if (provider == null) return;
final SchemaType schemaType = provider.getSchemaType();
if (SchemaType.schema.equals(schemaType)) {
UsageTrigger.trigger(SCHEMA_USAGE_KEY);
} else if (SchemaType.embeddedSchema.equals(schemaType)) {
UsageTrigger.trigger(BUILTIN_USAGE_KEY);
} else if (SchemaType.userSchema.equals(schemaType)) {
UsageTrigger.trigger(USER_USAGE_KEY);
}
}
private static class Worker {
@NotNull private final JsonSchemaObject myRootSchema;
@NotNull private final PsiElement myPosition;
@NotNull private final PsiElement myOriginalPosition;
@NotNull private final Consumer<LookupElement> myResultConsumer;
private final boolean myWrapInQuotes;
private final boolean <API key>;
// we need this set to filter same-named suggestions (they can be suggested by several matching schemes)
private final Set<LookupElement> myVariants;
private final JsonLikePsiWalker myWalker;
public Worker(@NotNull JsonSchemaObject rootSchema, @NotNull PsiElement position,
@NotNull PsiElement originalPosition, @NotNull final Consumer<LookupElement> resultConsumer) {
myRootSchema = rootSchema;
myPosition = position;
myOriginalPosition = originalPosition;
myResultConsumer = resultConsumer;
myVariants = new HashSet<>();
myWalker = JsonLikePsiWalker.getWalker(myPosition, myRootSchema);
myWrapInQuotes = myWalker != null && myWalker.isNameQuoted() && !(position.getParent() instanceof JsonStringLiteral);
<API key> = position.getParent() instanceof JsonStringLiteral;
}
public void work() {
if (myWalker == null) return;
final PsiElement checkable = myWalker.goUpToCheckable(myPosition);
if (checkable == null) return;
final boolean isName = myWalker.isName(checkable);
final List<<API key>.Step> position = myWalker.findPosition(checkable, isName, !isName);
if (position == null || position.isEmpty() && !isName) return;
final Collection<JsonSchemaObject> schemas = new JsonSchemaResolver(myRootSchema, false, position).resolve();
// too long here, refactor further
schemas.forEach(schema -> {
if (isName) {
final boolean insertComma = myWalker.<API key>(myPosition);
final boolean hasValue = myWalker.isPropertyWithValue(myPosition.getParent().getParent());
final Collection<String> properties = myWalker.<API key>(myOriginalPosition);
final JsonPropertyAdapter adapter = myWalker.<API key>(myOriginalPosition);
final Map<String, JsonSchemaObject> schemaProperties = schema.getProperties();
schemaProperties.keySet().stream()
.filter(name -> !properties.contains(name) || adapter != null && name.equals(adapter.getName()))
.forEach(name -> addPropertyVariant(name, schemaProperties.get(name), hasValue, insertComma));
}
else {
suggestValues(schema);
}
});
for (LookupElement variant : myVariants) {
myResultConsumer.consume(variant);
}
}
private void suggestValues(JsonSchemaObject schema) {
<API key>(schema.getAnyOf());
<API key>(schema.getOneOf());
<API key>(schema.getAllOf());
if (schema.getEnum() != null) {
for (Object o : schema.getEnum()) {
addValueVariant(o.toString(), null);
}
}
else {
final JsonSchemaType type = schema.getType();
if (type != null) {
suggestByType(schema, type);
} else if (schema.getTypeVariants() != null) {
for (JsonSchemaType schemaType : schema.getTypeVariants()) {
suggestByType(schema, schemaType);
}
}
}
}
private void suggestByType(JsonSchemaObject schema, JsonSchemaType type) {
if (JsonSchemaType._boolean.equals(type)) {
<API key>(type);
} else if (JsonSchemaType._string.equals(type)) {
<API key>(schema);
} else if (JsonSchemaType._null.equals(type)) {
addValueVariant("null", null);
}
}
private void <API key>(JsonSchemaObject schema) {
Object defaultValue = schema.getDefault();
String defaultValueString = defaultValue == null ? null : defaultValue.toString();
if (!StringUtil.isEmpty(defaultValueString)) {
String quotedValue = defaultValueString;
if (!StringUtil.isQuotedString(quotedValue)) {
quotedValue = StringUtil.wrapWithDoubleQuote(quotedValue);
}
addValueVariant(quotedValue, null);
}
}
private void <API key>(List<JsonSchemaObject> list) {
if (list != null && list.size() > 0) {
for (JsonSchemaObject schemaObject : list) {
suggestValues(schemaObject);
}
}
}
private void <API key>(JsonSchemaType type) {
if (JsonSchemaType._boolean.equals(type)) {
addValueVariant("true", null);
addValueVariant("false", null);
}
}
private void addValueVariant(@NotNull String key, @SuppressWarnings("SameParameterValue") @Nullable final String description) {
<API key> builder = <API key>.create(!myWrapInQuotes ? StringUtil.unquoteString(key) : key);
if (description != null) {
builder = builder.withTypeText(description);
}
myVariants.add(builder);
}
private void addPropertyVariant(@NotNull String key, @NotNull JsonSchemaObject jsonSchemaObject, boolean hasValue, boolean insertComma) {
jsonSchemaObject = ObjectUtils.coalesce(ContainerUtil.getFirstItem(new JsonSchemaResolver(jsonSchemaObject).resolve()),
jsonSchemaObject);
key = !myWrapInQuotes ? key : StringUtil.wrapWithDoubleQuote(key);
<API key> builder = <API key>.create(key);
final String typeText = StringUtil.<API key>(jsonSchemaObject.getDocumentation(true));
if (!StringUtil.isEmptyOrSpaces(typeText)) {
builder = builder.withTypeText(typeText, true);
}
final JsonSchemaType type = jsonSchemaObject.getType();
final List<Object> values = jsonSchemaObject.getEnum();
if (type != null || !ContainerUtil.isEmpty(values) || jsonSchemaObject.getDefault() != null) {
builder = builder.withInsertHandler(<API key>(jsonSchemaObject, hasValue, insertComma));
} else if (!hasValue) {
builder = builder.withInsertHandler(<API key>(false, insertComma));
}
myVariants.add(builder);
}
private InsertHandler<LookupElement> <API key>(@SuppressWarnings("SameParameterValue") boolean hasValue,
boolean insertComma) {
return new InsertHandler<LookupElement>() {
@Override
public void handleInsert(InsertionContext context, LookupElement item) {
ApplicationManager.getApplication().<API key>();
Editor editor = context.getEditor();
Project project = context.getProject();
if (<API key>(context, editor, hasValue)) return;
// inserting longer string for proper formatting
final String stringToInsert = ": 1" + (insertComma ? "," : "");
<API key>.insertStringAtCaret(editor, stringToInsert, false, true, 2);
<API key>(context, stringToInsert.length());
final int offset = editor.getCaretModel().getOffset();
context.getDocument().deleteString(offset, offset + 1);
PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());
AutoPopupController.getInstance(context.getProject()).<API key>(context.getEditor(), null);
}
};
}
@NotNull
private InsertHandler<LookupElement> <API key>(@NotNull JsonSchemaObject jsonSchemaObject,
final boolean hasValue,
boolean insertComma) {
JsonSchemaType type = jsonSchemaObject.getType();
final List<Object> values = jsonSchemaObject.getEnum();
if (type == null && values != null && !values.isEmpty()) type = detectType(values);
final Object defaultValue = jsonSchemaObject.getDefault();
final String <API key> = defaultValue == null || defaultValue instanceof JsonSchemaObject ? null :
(defaultValue instanceof String ? "\"" + defaultValue + "\"" :
String.valueOf(defaultValue));
JsonSchemaType finalType = type;
return new InsertHandler<LookupElement>() {
@Override
public void handleInsert(InsertionContext context, LookupElement item) {
ApplicationManager.getApplication().<API key>();
Editor editor = context.getEditor();
Project project = context.getProject();
String stringToInsert;
final String comma = insertComma ? "," : "";
if (<API key>(context, editor, hasValue)) return;
if (finalType != null) {
switch (finalType) {
case _object:
stringToInsert = ":{}" + comma;
<API key>.insertStringAtCaret(editor, stringToInsert, false, true, 2);
PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());
<API key>(context, stringToInsert.length());
EditorActionHandler handler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
handler.execute(editor, editor.getCaretModel().getCurrentCaret(),
DataManager.getInstance().getDataContext(editor.getContentComponent()));
break;
case _boolean:
String value = String.valueOf(Boolean.TRUE.toString().equals(<API key>));
stringToInsert = ":" + value + comma;
SelectionModel model = editor.getSelectionModel();
<API key>.insertStringAtCaret(editor, stringToInsert, false, true, stringToInsert.length() - comma.length());
<API key>(context, stringToInsert.length());
int start = editor.getSelectionModel().getSelectionStart();
model.setSelection(start - value.length(), start);
AutoPopupController.getInstance(context.getProject()).<API key>(context.getEditor(), null);
break;
case _array:
stringToInsert = ":[]" + comma;
<API key>.insertStringAtCaret(editor, stringToInsert, false, true, 2);
<API key>(context, stringToInsert.length());
break;
case _string:
case _integer:
<API key>(context, editor, <API key>, values, finalType, comma);
break;
default:
}
}
else {
<API key>(context, editor, <API key>, values, null, comma);
}
}
};
}
private boolean <API key>(InsertionContext context, Editor editor, boolean hasValue) {
if (<API key>) {
int offset = editor.getCaretModel().getOffset();
PsiElement element = context.getFile().findElementAt(offset);
int tailOffset = context.getTailOffset();
int guessEndOffset = tailOffset + 1;
if (element != null) {
int endOffset = element.getTextRange().getEndOffset();
if (endOffset > tailOffset) {
context.getDocument().deleteString(tailOffset, endOffset - 1);
}
}
if (hasValue) {
return true;
}
editor.getCaretModel().moveToOffset(guessEndOffset);
} else editor.getCaretModel().moveToOffset(context.getTailOffset());
return false;
}
@Nullable
private static JsonSchemaType detectType(List<Object> values) {
JsonSchemaType type = null;
for (Object value : values) {
JsonSchemaType newType = null;
if (value instanceof Integer) newType = JsonSchemaType._integer;
if (type != null && !type.equals(newType)) return null;
type = newType;
}
return type;
}
}
public static void <API key>(InsertionContext context,
Editor editor,
String defaultValue,
List<Object> values,
JsonSchemaType type, String comma) {
final boolean isNumber = type != null && (JsonSchemaType._integer.equals(type) || JsonSchemaType._number.equals(type)) ||
type == null && (defaultValue != null &&
!StringUtil.isQuotedString(defaultValue) || values != null && ContainerUtil.and(values, v -> !(v instanceof String)));
boolean hasValues = !ContainerUtil.isEmpty(values);
boolean hasDefaultValue = !StringUtil.isEmpty(defaultValue);
String stringToInsert = ":" + (hasDefaultValue ? defaultValue : (isNumber ? "" : "\"\"")) + comma;
<API key>.insertStringAtCaret(editor, stringToInsert, false, true, 1);
if (!isNumber || hasDefaultValue) {
SelectionModel model = editor.getSelectionModel();
int caretStart = model.getSelectionStart();
int newOffset = caretStart + (hasDefaultValue ? defaultValue.length() : 1);
if (hasDefaultValue && !isNumber) newOffset
model.setSelection(isNumber ? caretStart : (caretStart + 1), newOffset);
editor.getCaretModel().moveToOffset(newOffset);
}
<API key>(context, stringToInsert.length());
if (hasValues) {
AutoPopupController.getInstance(context.getProject()).<API key>(context.getEditor(), null);
}
}
public static void <API key>(@NotNull InsertionContext context, int offset) {
Project project = context.getProject();
PsiDocumentManager.getInstance(project).commitDocument(context.getDocument());
CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project);
codeStyleManager.reformatText(context.getFile(), context.getStartOffset(), context.getTailOffset() + offset);
}
} |
package com.didichuxing.doraemonkit.config;
import com.didichuxing.doraemonkit.constant.SharedPrefsKey;
import com.didichuxing.doraemonkit.util.DoKitSPUtil;
public class GlobalConfig {
/**
*
*
* @param isRunning
*/
public static void setAppHealth(boolean isRunning) {
try {
DoKitSPUtil.putBoolean(SharedPrefsKey.APP_HEALTH, isRunning);
} catch (Exception e) {
}
}
/**
* app
*/
public static boolean getAppHealth() {
try {
return DoKitSPUtil.getBoolean(SharedPrefsKey.APP_HEALTH, false);
} catch (Exception e) {
return false;
}
}
} |
describe <API key>::TextualSummary do
include ApplicationHelper
let(:zone) { EvmSpecHelper.local_miq_server.zone }
let(:automation_provider) { FactoryBot.create(:<API key>, :name => "ansibletest", :url => "test", :zone => zone) }
it "#textual_provider" do
manager = ManageIQ::Providers::AnsibleTower::AutomationManager.find_by(:provider_id => automation_provider.id)
@record = FactoryBot.create(:ansible_tower_job, :<API key> => manager)
expect(textual_provider[:image]).to eq("svg/vendor-ansible.svg")
expect(textual_provider[:link]).to eq("/ems_automation/show/#{manager.id}")
end
include_examples "textual_group", "Relationships", %i(provider service parameters status)
include_examples "textual_group", "Properties", %i(name description type status status_reason)
end |
package org.devocative.wickomp.grid;
import org.apache.wicket.<API key>;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.core.request.handler.<API key>;
import org.apache.wicket.core.util.lang.PropertyResolver;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.IRequestParameters;
import org.devocative.adroit.ObjectUtil;
import org.devocative.wickomp.<API key>;
import org.devocative.wickomp.WDefaults;
import org.devocative.wickomp.<API key>;
import org.devocative.wickomp.WebUtil;
import org.devocative.wickomp.data.RObject;
import org.devocative.wickomp.data.RObjectList;
import org.devocative.wickomp.grid.column.OColumn;
import org.devocative.wickomp.grid.column.OColumnList;
import org.devocative.wickomp.grid.column.OPropertyColumn;
import org.devocative.wickomp.grid.column.link.OAjaxLinkColumn;
import org.devocative.wickomp.grid.column.link.OLinkColumn;
import org.devocative.wickomp.grid.toolbar.OAjaxLinkButton;
import org.devocative.wickomp.grid.toolbar.OButton;
import org.devocative.wickomp.grid.toolbar.OLinkButton;
import org.devocative.wickomp.opt.OStyle;
import org.devocative.wickomp.wrcs.FontAwesomeBehavior;
import org.devocative.wickomp.wrcs.HeaderBehavior;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.beans.PropertyDescriptor;
import java.util.*;
public abstract class WBaseGrid<T> extends <API key> {
public static final String URL_PARAM_PAGE_NO = "page";
public static final String URL_PARAM_PAGE_SIZE = "rows";
public static final String URL_PARAM_ID = "$id";
public static final String <API key> = "$tp";
public static final String <API key> = "$cn";
public static final String <API key> = "$cr";
public static final String CLICK_FROM_CELL = "cl";
public static final String CLICK_FROM_BUTTON = "bt";
private static final long serialVersionUID = -<API key>;
private static final String TOOLBAR_HTML_CLASS = "w-grid-tbar";
protected static final Logger logger = LoggerFactory.getLogger(WBaseGrid.class);
private final OBaseGrid<T> options;
private <API key> <API key> = WDefaults.<API key>();
private IDataSource<T> dataSource;
private IGridDataSource<T> gridDataSource;
private <API key><T> gridAsyncDataSource;
private <API key><T> footerDataSource;
private boolean <API key> = true;
private boolean automaticColumns = false;
private boolean <API key> = false;
private boolean assertDuplicateKey = true;
protected Integer pageSize, pageNum;
protected final List<WSortField> sortFieldList = new ArrayList<>();
protected final Map<String, IModel<T>> pageData = new HashMap<>();
protected WBaseGrid(String id, OBaseGrid<T> options, IGridDataSource<T> gridDataSource) {
super(id, options);
this.dataSource = gridDataSource;
this.gridDataSource = gridDataSource;
this.options = options;
}
protected WBaseGrid(String id, OBaseGrid<T> options, <API key><T> gridAsyncDataSource) {
super(id, options);
this.dataSource = gridAsyncDataSource;
this.gridAsyncDataSource = gridAsyncDataSource;
this.options = options;
}
public OBaseGrid<T> getOptions() {
return options;
}
public Integer getPageSize() {
return pageSize;
}
public Integer getPageNum() {
return pageNum;
}
public List<WSortField> getSortFieldList() {
return sortFieldList;
}
public WBaseGrid<T> <API key>(<API key> <API key>) {
this.<API key> = <API key>;
return this;
}
public WBaseGrid<T> setFooterDataSource(<API key><T> footerDataSource) {
this.footerDataSource = footerDataSource;
options.setShowFooter(true);
return this;
}
public WBaseGrid<T> <API key>(boolean <API key>) {
this.<API key> = <API key>;
return this;
}
public WBaseGrid<T> setAutomaticColumns(boolean automaticColumns) {
this.automaticColumns = automaticColumns;
return this;
}
public WBaseGrid<T> <API key>(boolean <API key>) {
this.<API key> = <API key>;
return this;
}
public WBaseGrid<T> <API key>(boolean assertDuplicateKey) {
this.assertDuplicateKey = assertDuplicateKey;
return this;
}
public WBaseGrid<T> loadData(AjaxRequestTarget target) {
if (<API key>()) {
if (options.getUrl() == null) {
options.setUrl(getCallbackURL());
target.appendJavaScript(String.format("$('#%s').%s('updateUrl',\"%s\");",
getMarkupId(), getJQueryFunction(), getCallbackURL()));
}
target.appendJavaScript(String.format("$('#%s').%s('resetData');",
getMarkupId(), getJQueryFunction()));
} else {
throw new <API key>("WBaseGrid is disabled: " + getId());
}
return this;
}
public WBaseGrid<T> makeVisible(AjaxRequestTarget target) {
if (!isVisible()) {
setVisible(true);
target.add(this);
}
return this;
}
public WBaseGrid<T> pushData(<API key> handler, List<T> list) {
return pushData(handler, list, -1, null);
}
public WBaseGrid<T> pushData(<API key> handler, List<T> list, long count) {
return pushData(handler, list, count, null);
}
public WBaseGrid<T> pushData(<API key> handler, List<T> list, long count, List footer) {
if (<API key>()) {
if (<API key>) {
/*
* '<API key>' of 'pushData' is different from getGridPage():
* 1. no need to count++
* 2. list size must be validated against 'pageSize' and extra records must be omitted
*/
count = (pageNum - 1) * pageSize + list.size();
if (list.size() > pageSize) {
list = list.subList(0, pageSize);
}
}
RGridPage gridPage = createRGridPage(list, count);
if (options.hasFooter()) {
if (footer != null) {
gridPage.setFooter(getGridFooter(footer));
} else {
gridPage.setFooter(new ArrayList<>());
}
}
String script = createClientScript(gridPage);
logger.debug("WBaseGrid.pushData(): {}", script);
handler.appendJavaScript(script);
} else {
throw new <API key>("WBaseGrid is disabled: " + getId());
}
return this;
}
public WBaseGrid<T> pushError(<API key> handler, Exception e) {
if (<API key>()) {
RGridPage gridPage = new RGridPage();
gridPage.setTotal((long) pageNum * pageSize);
gridPage.setRows(new RObjectList());
gridPage.setError(<API key>.handleMessage(this, e));
String script = createClientScript(gridPage);
logger.debug("WBaseGrid.pushError(): {}", script);
handler.appendJavaScript(script);
} else {
throw new <API key>("WBaseGrid is disabled: " + getId());
}
return this;
}
@Override
protected void onInitialize() {
super.onInitialize();
if (options.getColumns() == null) {
options.setColumns(new OColumnList<>());
}
int i = 0;
for (OColumn<T> column : options.getColumns().getAllColumns()) {
if (column.getField() == null) {
column
.setField("f" + (i++))
.setDummyField(true);
}
}
options.getColumns().validate();
pageNum = 1;
pageSize = options.getPageSize();
add(new FontAwesomeBehavior());
add(new HeaderBehavior("main/wGrid.js").setNeedEasyUI(true));
if (gridDataSource == null && gridAsyncDataSource == null) {
throw new <API key>("WBaseGrid without datasource: " + getId());
}
if (gridDataSource != null && gridAsyncDataSource != null) {
throw new <API key>("WBaseGrid has both dataSource & asyncDataSource: " + getId());
}
}
@Override
protected void onBeforeRender() {
super.onBeforeRender();
// It should be called in onBeforeRender, not worked in onInitialize, causing StalePageException
if (!<API key>()) {
options.setUrl(null);
}
/*
The following is set by IHtmlId & ICallbackUrl
else {
options.setUrl(getCallbackURL());
}
options.setHtmlId(getMarkupId());
*/
for (int i = 0; i < options.getToolbarButtons().size(); i++) {
OButton<T> button = options.getToolbarButtons().get(i);
button.init(getCallbackURL(), i, options.getHtmlId());
}
}
@Override
protected void onRequest() {
try {
processRequest();
} catch (Exception e) {
logger.warn("Grid.onRequest: id={}", getId(), e);
RGridPage result = new RGridPage();
result.setError(<API key>.handleMessage(this, e));
sendJSONResponse(WebUtil.toJson(result));
}
}
@Override
protected void onAfterRender() {
super.onAfterRender();
if (isVisible()) {
createToolbar();
}
}
protected final RGridPage getGridPage() {
RGridPage result = null;
if (gridDataSource != null) {
List<T> data = gridDataSource.list(pageNum, pageSize, sortFieldList);
long count;
if (data.size() < pageSize || <API key>) {
count = (pageNum - 1) * pageSize + data.size();
//TODO the plus-one must be detected by requesting one more item from data source!
if (<API key> && data.size() == pageSize) {
count++;
}
} else {
count = gridDataSource.count();
}
result = createRGridPage(data, count);
if (options.hasFooter() && footerDataSource != null) {
result.setFooter(getGridFooter(footerDataSource.footer(data)));
}
} else {
gridAsyncDataSource.asyncList(pageNum, pageSize, sortFieldList);
}
return result;
}
protected final RGridPage createRGridPage(List<T> data, long count) {
RGridPage result = new RGridPage();
if (data != null) {
result.setRows(createRObjectList(data));
} else {
result.setRows(new RObjectList());
}
result.setTotal(count);
return result;
}
protected RObjectList createRObjectList(List<T> data) {
pageData.clear();
RObjectList objectList = new RObjectList();
<API key>(data, objectList);
return objectList;
}
protected List<RObject> getGridFooter(List<?> footerData) {
List<RObject> footer = new ArrayList<>();
if (footerData != null) {
List<OColumn<T>> columns = options.getColumns().getAllColumns();
for (Object bean : footerData) {
RObject rObject = new RObject();
for (int colNo = 0; colNo < columns.size(); colNo++) {
OColumn<T> column = columns.get(colNo);
if (column.isHasFooter() && column.isVisible()) {
String url = String.format("%s&%s=%s&%s=%s", getCallbackURL(), <API key>, colNo,
<API key>, CLICK_FROM_CELL);
rObject.addProperty(column.getField(), column.footerCellValue(bean, colNo, url));
}
}
footer.add(rObject);
}
}
return footer;
}
protected void handleRowsById(String id) {
}
protected void <API key>(T bean, RObject rObject) {
}
protected void onColumnReorder(List<String> columns) {
}
protected final void <API key>(List<T> list, RObjectList page) {
if (automaticColumns && !list.isEmpty()) {
<API key>(list.get(0));
}
List<OColumn<T>> columns = options.getColumns().getAllColumns();
for (int rowNo = 0; rowNo < list.size(); rowNo++) {
T bean = list.get(rowNo);
RObject rObject = new RObject();
String id = String.valueOf(rowNo);
if (options.getIdField() != null) {
Object idValue = PropertyResolver.getValue(options.getIdField(), bean);
if (idValue == null) {
throw new RuntimeException(String.format("Null value for id: idField=[%s] bean=[%s]",
options.getIdField(), bean));
}
id = idValue.toString();
rObject.addProperty(options.getIdField(), id);
}
pageData.put(id, dataSource.model(bean));
if (options.getRowStyler() != null) {
OStyle rowStyle = options.getRowStyler().doStyle(bean, id);
rObject.addProperty("$style", rowStyle);
}
for (int colNo = 0; colNo < columns.size(); colNo++) {
OColumn<T> column = columns.get(colNo);
if (column.onCellRender(bean, id)) {
String url = String.format("%s&%s=%s&%s=%s&%s=%s", getCallbackURL(), URL_PARAM_ID, id,
<API key>, colNo, <API key>, CLICK_FROM_CELL);
rObject.addProperty(column.getField(), column.cellValue(bean, id, colNo, url));
if (column.getCellStyler() != null) {
OStyle cellStyle = column.getCellStyler().doStyle(bean, id);
rObject.addProperty(column.getField() + "$style", cellStyle);
}
}
}
<API key>(bean, rObject);
try {
page.addRObject(id, rObject);
} catch (<API key> e) {
logger.error("WGrid (id={}) duplicate key, msg={}", getId(), e.getMessage());
if (assertDuplicateKey) {
throw e;
}
}
}
}
private void processRequest() {
if (!<API key>()) {
return;
}
IRequestParameters getParams = getRequest().getQueryParameters();
IRequestParameters postParams = getRequest().getPostParameters();
/*
NOTE: EasyUI POST params = rows, page, id, sort, order
*/
final int pageSize = postParams.getParameterValue(URL_PARAM_PAGE_SIZE).toInt(options.getPageSize());
final int pageNum = postParams.getParameterValue(URL_PARAM_PAGE_NO).toInt(1);
/*
NOTE: idByPost vs idByGet
idByPost: sent by EasyUI TreeGrid for expanded node
idByGet: sent by a custom link in the cell
*/
final String idByGet = getParams.getParameterValue(URL_PARAM_ID).toOptionalString();
final String idByPost = postParams.getParameterValue("id").toOptionalString();
final String sortList = postParams.getParameterValue("sort").toOptionalString();
final String orderList = postParams.getParameterValue("order").toOptionalString();
final String clickType = getParams.getParameterValue(<API key>).toString();
final Integer colNo = getParams.getParameterValue(<API key>).toOptionalInteger();
final String columnReorder = getParams.getParameterValue(<API key>).toOptionalString();
logger.debug("WBaseGrid.onRequest:\n\tpageSize=[{}], pageNum=[{}], sort=[{}], order=[{}], idByPost=[{}]\n\tclickType=[{}] idByGet=[{}] colNo=[{}]",
pageSize, pageNum, sortList, orderList, idByPost, clickType, idByGet, colNo);
if (CLICK_FROM_CELL.equals(clickType)) {// click from cell (per row)
if (idByGet == null) {
throw new RuntimeException("Null id parameter!");
}
if (colNo == null) {
throw new RuntimeException("Null colNo parameter!");
}
handleCellLinkClick(idByGet, colNo);
} else if (CLICK_FROM_BUTTON.equals(clickType)) {// click from button in toolbar
if (colNo == null) {
throw new RuntimeException("Null button index parameter!");
}
<API key>(colNo);
} else if (columnReorder != null) {
logger.debug("Column Reorder: {}", columnReorder);
String[] columns = columnReorder.split("[,]");
onColumnReorder(Arrays.asList(columns));
sendEmptyResponse();
} else if (idByPost != null && idByPost.length() > 0) {
handleRowsById(idByPost);
} else {
this.pageSize = pageSize;
this.pageNum = pageNum;
if (sortList != null && orderList != null) {
updateSortFieldList(sortList.split(","), orderList.split(","));
} else {
sortFieldList.clear();
}
logger.debug("WBaseGrid: SortFields = {}", sortFieldList);
RGridPage result = getGridPage();
if (gridDataSource != null) {
sendJSONResponse(WebUtil.toJson(result));
} else {
sendJSONResponse("");
}
}
}
private void createToolbar() {
List<OButton<T>> toolbarButtons = options.getToolbarButtons();
if (!toolbarButtons.isEmpty()) {
StringBuilder builder = new StringBuilder();
builder
.append(String.format("<div id=\"%s-tb\" class=\"%s\"", getMarkupId(), TOOLBAR_HTML_CLASS));
if (<API key>) {
builder
.append(" style=\"visibility:hidden\"");
}
builder.append("><table><tr>");
for (OButton<T> button : toolbarButtons) {
button.setGrid(this);
builder.append("<td>").append(button.getHTMLContent()).append("</td>");
//button.setGrid(null);
}
builder
.append("</tr></table></div>");
getResponse().write(builder.toString());
}
}
private void <API key>(Integer colNo) {
OButton<T> button = options.getToolbarButtons().get(colNo);
button.setGrid(this);
//try {
if (button instanceof OLinkButton) {
OLinkButton<T> linkButton = (OLinkButton<T>) button;
linkButton.onClick();
} else if (button instanceof OAjaxLinkButton) {
AjaxRequestTarget target = createAjaxResponse();
OAjaxLinkButton<T> ajaxLinkButton = (OAjaxLinkButton<T>) button;
ajaxLinkButton.onClick(target);
} else {
throw new RuntimeException("Invalid request from button click");
}
/*} finally {
button.setGrid(null);
}*/
}
private void handleCellLinkClick(String id, Integer colNo) {
IModel<T> rowModel = pageData.get(id);
OColumn<T> column = options.getColumns().getAllColumns().get(colNo);
if (column instanceof OLinkColumn) {
OLinkColumn<T> linkColumn = (OLinkColumn<T>) column;
linkColumn.onClick(rowModel);
} else if (column instanceof OAjaxLinkColumn) {
AjaxRequestTarget target = createAjaxResponse();
OAjaxLinkColumn<T> ajaxLinkColumn = (OAjaxLinkColumn<T>) column;
try {
ajaxLinkColumn.onClick(target, rowModel);
} catch (Exception e) {
logger.error("handleCellLinkClick", e);
ajaxLinkColumn.onException(target, e, rowModel);
}
} else {
throw new RuntimeException("Invalid request from cell click: " + column.getField());
}
}
private void updateSortFieldList(String[] sortList, String[] orderList) {
sortFieldList.clear();
final OColumnList<T> columns = options.getColumns();
for (int i = 0; i < sortList.length; i++) {
final String field = sortList[i];
final String sortField = columns.findByField(field).getSortField();
sortFieldList.add(new WSortField(sortField, orderList[i]));
}
}
private String createClientScript(RGridPage gridPage) {
StringBuilder result = new StringBuilder();
if (automaticColumns) {
result.append(String.format("$('#%s').%s('updateColumns', {columns:%s});",
getMarkupId(), getJQueryFunction(), WebUtil.toJson(options.getColumns())));
}
result.append(String.format("$('#%s').%s('loadData', %s);",
getMarkupId(), getJQueryFunction(), WebUtil.toJson(gridPage)));
// NOTE: setting URL must be set after loadData, otherwise it sends a request by loadData and fetches data twice
if (options.getUrl() == null) {
options.setUrl(getCallbackURL());
result.append(String.format("$('#%s').%s('updateUrl', \"%s\");",
getMarkupId(), getJQueryFunction(), getCallbackURL()));
}
return result.toString();
}
private void <API key>(T sample) {
OColumnList<T> columns = options.getColumns();
columns.clear();
if (sample instanceof Map) {
Map map = (Map) sample;
for (Object key : map.keySet()) {
String prop = key.toString();
columns.add(new OPropertyColumn<>(new Model<>(prop), prop));
}
} else {
PropertyDescriptor[] descriptors = ObjectUtil.<API key>(sample, false);
for (PropertyDescriptor pd : descriptors) {
String prop = pd.getName();
if ("class".equals(prop)) {
continue;
}
columns.add(new OPropertyColumn<>(new Model<>(prop), prop));
}
}
}
} |
2018-03-04
* [erroneousboat/slack-term (2,196s/73f)](https://github.com/erroneousboat/slack-term) : Slack client for your terminal
* [RadhiFadlillah/shiori (915s/38f)](https://github.com/RadhiFadlillah/shiori) : Simple bookmark manager built with Go
* [golang/go (38,535s/5,215f)](https://github.com/golang/go) : The Go programming language
* [ethereum/go-ethereum (14,747s/4,490f)](https://github.com/ethereum/go-ethereum) : Official Go implementation of the Ethereum protocol
* [bettercap/bettercap (1,514s/119f)](https://github.com/bettercap/bettercap) : The state of the art network attack and monitoring framework.
* [getlantern/lantern (32,771s/7,818f)](https:
* [kubernetes/kubernetes (33,189s/11,718f)](https://github.com/kubernetes/kubernetes) : Production-Grade Container Scheduling and Management
* [golang/vgo (577s/14f)](https://github.com/golang/vgo) : [mirror] Versioned Go Prototype
* [nzoschke/gofaas (153s/0f)](https://github.com/nzoschke/gofaas) : A boilerplate Go and AWS Lambda app. Demonstrates an expert configuration of 10+ AWS services to support running Go <API key> (FaaS).
* [zricethezav/gitleaks (2,925s/135f)](https://github.com/zricethezav/gitleaks) : Searches full repo history for secrets and keys
* [containous/traefik (13,475s/1,307f)](https:
* [avelino/awesome-go (28,335s/3,647f)](https://github.com/avelino/awesome-go) : A curated list of awesome Go frameworks, libraries and software
* [mholt/caddy (16,152s/1,213f)](https://github.com/mholt/caddy) : Fast, cross-platform HTTP/2 web server with automatic HTTPS
* [gin-gonic/gin (15,358s/1,785f)](https://github.com/gin-gonic/gin) : Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
* [google/gops (2,302s/134f)](https://github.com/google/gops) : A tool to list and diagnose Go processes currently running on your system
* [dearplain/goloader (25s/0f)](https://github.com/dearplain/goloader) : a golang dynamic loader
* [prometheus/prometheus (15,024s/1,843f)](https://github.com/prometheus/prometheus) : The Prometheus monitoring system and time series database.
* [bcicen/grmon (354s/7f)](https://github.com/bcicen/grmon) : Command line monitoring for goroutines
* [fatedier/frp (10,146s/1,835f)](https://github.com/fatedier/frp) : A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
* [kubernetes/helm (4,358s/1,532f)](https://github.com/kubernetes/helm) : The Kubernetes Package Manager
* [v2ray/v2ray-core (7,021s/1,459f)](https://github.com/v2ray/v2ray-core) : A platform for building proxies to bypass network restrictions.
* [spf13/cobra (6,646s/556f)](https://github.com/spf13/cobra) : A Commander for modern Go CLI interactions
* [peterbourgon/caspaxos (51s/1f)](https://github.com/peterbourgon/caspaxos) : A Go implementation of the CASPaxos protocol
* [syncthing/syncthing (19,579s/1,653f)](https://github.com/syncthing/syncthing) : Open Source Continuous File Synchronization
* [yeasy/blockchain_guide (3,374s/1,014f)](https://github.com/yeasy/blockchain_guide) : Introduce blockchain related technologies, from theory to practice with bitcoin, ethereum and hyperledger.
# python
* [Zeta36/chess-alpha-zero (505s/119f)](https://github.com/Zeta36/chess-alpha-zero) : Chess reinforcement learning by AlphaGo Zero methods.
* [merrychap/shellen (285s/31f)](https://github.com/merrychap/shellen) : Interactive shellcoding environment to easily craft shellcodes
* [asciinema/asciinema (3,792s/260f)](https://github.com/asciinema/asciinema) : Terminal session recorder
* [kennethreitz/twitter-scraper (530s/29f)](https://github.com/kennethreitz/twitter-scraper) : Scrape the Twitter Frontend API without authentication.
* [Netflix/security_monkey (2,333s/445f)](https://github.com/Netflix/security_monkey) : Security Monkey
* [tensorflow/models (29,095s/16,094f)](https://github.com/tensorflow/models) : Models and examples built with TensorFlow
* [chinese-poetry/chinese-poetry (6,978s/834f)](https://github.com/chinese-poetry/chinese-poetry) : , , 5.526. 156421050
* [ray-project/ray (2,047s/305f)](https://github.com/ray-project/ray) : A high-performance distributed execution engine
* [keras-team/keras (26,229s/9,564f)](https://github.com/keras-team/keras) : Deep Learning for humans
* [vinta/awesome-python (46,210s/8,952f)](https://github.com/vinta/awesome-python) : A curated list of awesome Python frameworks, libraries, software and resources
* [zalandoresearch/pt-dilate-rnn (71s/5f)](https://github.com/zalandoresearch/pt-dilate-rnn) : Dilated RNNs in pytorch
* [Viralmaniar/Passhunt (133s/19f)](https://github.com/Viralmaniar/Passhunt) : Passhunt is a simple tool for searching of default credentials for network devices, web applications and more. Search through 523 vendors and their 2084 default passwords.
* [rg3/youtube-dl (34,431s/6,318f)](https://github.com/rg3/youtube-dl) : Command-line program to download videos from YouTube.com and other video sites
* [jhjacobsen/pytorch-i-revnet (82s/4f)](https://github.com/jhjacobsen/pytorch-i-revnet) : i-RevNet Pytorch Code
* [minimaxir/<API key> (23,206s/931f)](https://github.com/minimaxir/<API key>) : The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.
* [toddmotto/public-apis (33,913s/3,180f)](https://github.com/toddmotto/public-apis) : A collective list of public JSON APIs for use in web development.
* [bitcoinbook/bitcoinbook (8,159s/2,147f)](https://github.com/bitcoinbook/bitcoinbook) : Mastering Bitcoin 2nd Edition - Programming the Open Blockchain
* [instacart/lore (324s/20f)](https://github.com/instacart/lore) : Lore makes machine learning approachable for Software Engineers and maintainable for Machine Learning Researchers
* [NVIDIA/FastPhotoStyle (6,418s/365f)](https://github.com/NVIDIA/FastPhotoStyle) : Style transfer, deep learning, feature transform
* [scikit-learn/scikit-learn (26,174s/13,229f)](https://github.com/scikit-learn/scikit-learn) : scikit-learn: machine learning in Python
* [pypa/pipenv (9,119s/518f)](https://github.com/pypa/pipenv) : Python Development Workflow for Humans.
* [deepfakes/faceswap (4,110s/1,016f)](https://github.com/deepfakes/faceswap) : Non official project based on original /r/Deepfakes thread. Many thanks to him!
* [josephmisiti/<API key> (30,944s/7,561f)](https://github.com/josephmisiti/<API key>) : A curated list of awesome Machine Learning frameworks, libraries and software.
* [donnemartin/<API key> (23,779s/2,988f)](https://github.com/donnemartin/<API key>) : Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
* [pytorch/pytorch (12,668s/2,675f)](https://github.com/pytorch/pytorch) : Tensors and Dynamic neural networks in Python with strong GPU acceleration |
package org.camunda.feel.interpreter.impl
import org.scalatest.{FlatSpec, Matchers}
import org.camunda.feel.syntaxtree._
/**
* @author Philipp Ossler
*/
class <API key>
extends FlatSpec
with Matchers
with FeelIntegrationTest {
"A number" should "add to '4'" in {
eval("2+4") should be(ValNumber(6))
}
it should "add to '4' and '6'" in {
eval("2+4+6") should be(ValNumber(12))
}
it should "add to not-a-number" in {
eval("2 + true") should be(ValNull)
eval("false + 3") should be(ValNull)
}
it should "subtract from '2'" in {
eval("4-2") should be(ValNumber(2))
}
it should "subtract to not-a-number" in {
eval("2 - true") should be(ValNull)
eval("false - 3") should be(ValNull)
}
it should "add and subtract" in {
eval("2+4-3+1") should be(ValNumber(4))
}
it should "multiply by '3'" in {
eval("3*3") should be(ValNumber(9))
}
it should "multiply to not-a-number" in {
eval("2 * true") should be(ValNull)
eval("false * 3") should be(ValNull)
}
it should "divide by '4'" in {
eval("8/4") should be(ValNumber(2))
}
it should "be null if divide by zero" in {
eval("2 / 0") should be(ValNull)
}
it should "divide to not-a-number" in {
eval("2 / true") should be(ValNull)
eval("false / 3") should be(ValNull)
}
it should "multiply and divide" in {
eval("3*4/2*5") should be(ValNumber(30))
}
it should "exponentiate by '3'" in {
eval("2**3") should be(ValNumber(8))
}
it should "exponentiate twice" in {
// all operators are left associative
eval("2**2**3") should be(ValNumber(64))
}
it should "exponentiate by '3.1'" in {
eval("2**3.1") should be(ValNumber(8.574187700290345))
}
it should "negate" in {
eval("-2") should be(ValNumber(-2))
}
it should "negate and multiply" in {
eval("2 * -3") should be(ValNumber(-6))
}
it should "add and multiply" in {
eval("2 + 3 * 4") should be(ValNumber(14))
eval("2 * 3 + 4") should be(ValNumber(10))
}
it should "multiply and exponentiate" in {
eval("2**3 * 4") should be(ValNumber(32))
eval("3 * 4**2") should be(ValNumber(48))
}
it should "compare with '='" in {
eval("x=2", Map("x" -> 2)) should be(ValBoolean(true))
eval("x=2", Map("x" -> 3)) should be(ValBoolean(false))
eval("(x * 2) = 4", Map("x" -> 2)) should be(ValBoolean(true))
eval("(x * 2) = 4", Map("x" -> 3)) should be(ValBoolean(false))
eval("x = -1", Map("x" -> -1)) should be(ValBoolean(true))
eval("x = -1", Map("x" -> 1)) should be(ValBoolean(false))
}
it should "compare with '!='" in {
eval("x!=2", Map("x" -> 2)) should be(ValBoolean(false))
eval("x!=2", Map("x" -> 3)) should be(ValBoolean(true))
}
it should "compare with '<'" in {
eval("x<2", Map("x" -> 1)) should be(ValBoolean(true))
eval("x<2", Map("x" -> 2)) should be(ValBoolean(false))
}
it should "compare with '<='" in {
eval("x<=2", Map("x" -> 2)) should be(ValBoolean(true))
eval("x<=2", Map("x" -> 3)) should be(ValBoolean(false))
}
it should "compare with '>'" in {
eval("x>2", Map("x" -> 2)) should be(ValBoolean(false))
eval("x>2", Map("x" -> 3)) should be(ValBoolean(true))
}
it should "compare with '>='" in {
eval("x>=2", Map("x" -> 2)) should be(ValBoolean(true))
eval("x>=2", Map("x" -> 1)) should be(ValBoolean(false))
}
it should "compare with null" in {
eval("2 = null") should be(ValBoolean(false))
eval("null = 2") should be(ValBoolean(false))
eval("null != 2") should be(ValBoolean(true))
eval("2 > null") should be(ValBoolean(false))
eval("null < 2") should be(ValBoolean(false))
eval("null in < 2") should be(ValBoolean(false))
eval("null in (2..4)") should be(ValBoolean(false))
}
it should "compare with 'between _ and _'" in {
eval("x between 2 and 4", Map("x" -> 1)) should be(ValBoolean(false))
eval("x between 2 and 4", Map("x" -> 2)) should be(ValBoolean(true))
eval("x between 2 and 4", Map("x" -> 3)) should be(ValBoolean(true))
eval("x between 2 and 4", Map("x" -> 4)) should be(ValBoolean(true))
eval("x between 2 and 4", Map("x" -> 5)) should be(ValBoolean(false))
}
it should "compare with 'in'" in {
eval("x in < 2", Map("x" -> 1)) should be(ValBoolean(true))
eval("x in < 2", Map("x" -> 2)) should be(ValBoolean(false))
eval("x in (2 .. 4)", Map("x" -> 3)) should be(ValBoolean(true))
eval("x in (2 .. 4)", Map("x" -> 4)) should be(ValBoolean(false))
eval("x in (2,4,6)", Map("x" -> 4)) should be(ValBoolean(true))
eval("x in (2,4,6)", Map("x" -> 5)) should be(ValBoolean(false))
eval("3 in (2 .. 4)") should be(ValBoolean(true))
eval("4 in (2 .. 4)") should be(ValBoolean(false))
}
it should "be null if nAn" in {
eval("x", Map("x" -> Double.NaN)) should be(ValNull)
}
it should "be null if infinity" in {
eval("x", Map("x" -> Double.PositiveInfinity)) should be(ValNull)
eval("x", Map("x" -> Double.NegativeInfinity)) should be(ValNull)
}
} |
package org.swtk.commons.dict.wordnet.indexbyname.instance.t.e.w; import java.util.ArrayList; import java.util.Collection; import java.util.Map; import java.util.TreeMap; import org.swtk.common.dict.dto.wordnet.IndexNoun; import com.trimc.blogger.commons.utils.GsonUtils; public final class <API key> { private static Map<String, Collection<IndexNoun>> map = new TreeMap<String, Collection<IndexNoun>>(); static { add("{\"term\":\"tewkesbury\", \"synsetCount\":1, \"upperType\":\"NOUN\", \"ids\":[\"01299782\"]}");
} private static void add(final String JSON) { IndexNoun indexNoun = GsonUtils.toObject(JSON, IndexNoun.class); Collection<IndexNoun> list = (map.containsKey(indexNoun.getTerm())) ? map.get(indexNoun.getTerm()) : new ArrayList<IndexNoun>(); list.add(indexNoun); map.put(indexNoun.getTerm(), list); } public static Collection<IndexNoun> get(final String TERM) { return map.get(TERM); } public static boolean has(final String TERM) { return map.containsKey(TERM); } public static Collection<String> terms() { return map.keySet(); } } |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>20170529</title>
<link href="https://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">
<style>
body { font-family: 'Rubik', sans-serif; font-size: large; background: #eee; }
p { margin-bottom: 0.01%; line-height: 120% }
ol { padding-bottom: 0.1%; padding-top: 0.1%; }
</style>
</head>
<body lang="he" dir="rtl">
<ol>
<li>
<p dir="rtl" align="right">
<span>ע"פ חוק המריחואנה החדש, כמה גרמים של קנאביס שיימצאו על אדם ייחשבו לשימוש עצמי ולכן לא יובילו אוטומטית לרישום פלילי?</span><br/>
<span>עד 15 גרם.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מיהו יוֹרְגוֹס קִירִיאקוֹס פָּנַאיוֹטוּ?</span><br/>
<span>הזמר ג'ורג' מייקל שהלך לעולמו בסוף שנת 2016.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>באיזו שנה כבשה האימפריה העות'מאנית את קונסטנטינופול והביאה לסופה של האימפריה הביזנטית?</span><br/>
<span>1453</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מה פירוש המילה "שטוז"?</span><br/>
<span>המילה "שטוז" היא הלחם של "שטות" ו"חרוז" ומתארת משחק מילים שהומצא ע"י הסופרת דתיה בן דור. לדוגמא - "פעם חזיר התחפש ליצחק שמיר, פעם שיפוד התחלק על תפוד, פעם ארנב סטר לכוכב".</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>בישראל, איפה ממוקמת המועצה האזורית עמק המעיינות?</span><br/>
<span>באזור בקעת בית שאן.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>כיצד מכינים מי סוכר?</span><br/>
<span>כדי להמיס את הסוכר ולהפוך אותו לנוזלי, יש להרתיח תחילה מים ולפזר את הסוכר לתוכם לאט, תוך כדי ערבוב.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מתי הונהג לראשונה הלוח הגרגוריאני?</span><br/>
<span>בשנת 1582. הונהג בצו של האפיפיור גרגוריוס ה-13, בהתבסס על הלוח היוליאני של יוליוס קיסר.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מיהי ד"ר מרים (מיקי) הרן?</span><br/>
<span>יו"ר המועצה לצרכנות, לשעבר מנכ"ל המשרד לאיכות הסביבה ואישתו הראשונה של בנימין נתניהו. לפני שהתגרשו, לזוג נולדה בת בשם נועה.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מי היה ברנרד מיידוף?</span><br/>
<span>ברוקר אמריקאי שהורשע בהונאת פונזי בהיקף של כ-65 מיליארד דולר. בגין מעשיו גזר עליו בית המשפט 150 שנות מאסר.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>ב"פזמון ליקינתון" מאת לאה גולדברג, מה ההמשך לשורה הראשונה לַיְלָה לַיְלָה מִסְתַּכֶּלֶת הַלְּבָנָה?</span><br/>
<span>בַּפְּרָחִים אֲשֶׁר הֵנֵצּוּ בַּגִּנָּה.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מדוע נקבע יום הפועלים הבינלאומי ל-1 במאי?</span><br/>
<span>בעקבות מהומות היימרקט בשיקגו ב-1 במאי 1866. המהומות פרצו עקב שביתה שערכו האיגודים המקצועיים בארה"ב להגבלת יום העבודה ל-8 שעות.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>באיזה סרט נשאלה השאלה "מי הם עשרת הצדיקים שהובטח להם עוד בחייהם להכנס לגן עדן?"</span><br/>
<span>בסרט "חגיגה בסנוקר", הרב שמש שואל את גבריאל (המתחפש לעזריאל).</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>ומי הם עשרת הצדיקים שהובטח להם עוד בחייהם להכנס לגן עדן?</span><br/>
<span>חנוך, אליהו, משיח בן דוד (בכבודו ובעצמו), אליעזר עבד אברהם ,חירם מלך צור, עבד מלך כושי, יעבץ בנו של רבי יהודה הנשיא, בתיה בת פרעה, סרח בת אשר ורבי יהושע בן לוי.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מהו מדבר צל גשם?</span><br/>
<span>תופעת טבע מטאורלוגית, בה נוצר מדבר למרגלות רכס הרים גשום, אשר כמות המשקעים בו נמוכה יחסית לכמות הגשם בצידו השני של הרכס. מדבר יהודה הוא כזה.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מהו מקצוע הבורסקאות?</span><br/>
<span>עיבוד ושימור עור חיות.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מתי נבנתה כיפת הסלע שבירושלים?</span><br/>
<span>שנת 691 לספירה. מאז התמוטטה, נבנתה מחדש ב-1023 לספירה ועברה עוד מספר שיפוצים נרחבים וחיזוקים לאורך השנים, כולל ציפוי בזהב בשנת 1961.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מה עשה לי הארווי אוסוולד ב22 לנובמבר, שנת 1963?</span><br/>
<span>התנקש בג'ון קנדי, נשיא ארה"ב. זאת לפחות לפי הגירסה הרשמית של ממשלת ארה"ב.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>כמה שנים כבר משודרת סידרת הטלוויזיה המצויירת "הסימפסונים"?</span><br/>
<span>כמעט 30 שנה. עלתה לאוויר כפינה בתוכנית אחרת בחודש אפריל 1987 והפכה לתוכנית עצמאית בחודש דצמבר 1987.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>באיזה ספר מופיעה דמות בשם "החתול צ'שייר"?</span><br/>
<span>"הרפתקאות אליס בארץ הפלאות" מאת לואיס קרול.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>באיזה שם מוכר יותר שאול התרסי?</span><br/>
<span>פאולוס השליח או פאולוס מתרסוס - אחד מהחשובים בשליחי ישו.</span>
</p>
</li>
<li>
<p dir="rtl" align="right">
<span>מי כונתה "הבתולה מאורליאן"?</span><br/>
<span>ז'אן דארק.</span>
</p>
</li>
</ol>
</body>
</html> |
export interface PluginManifest {
name: string,
version: string,
author?: string,
server_main: string,
client_main: string,
path: string
}
export const <API key> = {
necessary: {
name: 'string',
version: 'string',
server_main: 'string',
client_main: 'string'
},
optional: {
author: 'string'
}
} |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0) on Fri Feb 01 09:13:24 EST 2013 -->
<title>Uses of Package org.drip.feed.loader</title>
<meta name="date" content="2013-02-01">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package org.drip.feed.loader";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/feed/loader/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<h1 title="Uses of Package org.drip.feed.loader" class="title">Uses of Package<br>org.drip.feed.loader</h1>
</div>
<div class="contentContainer">No usage of org.drip.feed.loader</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/feed/loader/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html> |
package citrixadc
import (
"github.com/citrix/adc-nitro-go/resource/config/cs"
"github.com/citrix/adc-nitro-go/service"
"github.com/hashicorp/terraform/helper/schema"
"fmt"
"log"
"net/url"
"strings"
)
func <API key>() *schema.Resource {
return &schema.Resource{
SchemaVersion: 1,
Create: <API key>,
Read: <API key>,
Delete: <API key>,
Importer: &schema.ResourceImporter{
State: schema.<API key>,
},
Schema: map[string]*schema.Schema{
"bindpoint": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"<API key>": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"invoke": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Computed: true,
ForceNew: true,
},
"labelname": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"labeltype": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"policyname": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"priority": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
Computed: true,
ForceNew: true,
},
"targetlbvserver": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
},
}
}
func <API key>(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] citrixadc-provider: In <API key>")
client := meta.(*<API key>).client
name := d.Get("name").(string)
policyname := d.Get("policyname").(string)
bindingId := fmt.Sprintf("%s,%s", name, policyname)
<API key> := cs.<API key>{
Bindpoint: d.Get("bindpoint").(string),
<API key>: d.Get("<API key>").(string),
Invoke: d.Get("invoke").(bool),
Labelname: d.Get("labelname").(string),
Labeltype: d.Get("labeltype").(string),
Name: d.Get("name").(string),
Policyname: d.Get("policyname").(string),
Priority: d.Get("priority").(int),
Targetlbvserver: d.Get("targetlbvserver").(string),
}
_, err := client.AddResource(service.<API key>.Type(), name, &<API key>)
if err != nil {
return err
}
d.SetId(bindingId)
err = <API key>(d, meta)
if err != nil {
log.Printf("[ERROR] netscaler-provider: ?? we just created this <API key> but we can't read it ?? %s", bindingId)
return nil
}
return nil
}
func <API key>(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] citrixadc-provider: In <API key>")
client := meta.(*<API key>).client
bindingId := d.Id()
idSlice := strings.SplitN(bindingId, ",", 2)
name := idSlice[0]
policyname := idSlice[1]
log.Printf("[DEBUG] citrixadc-provider: Reading <API key> state %s", bindingId)
findParams := service.FindParams{
ResourceType: "<API key>",
ResourceName: name,
<API key>: 258,
}
dataArr, err := client.<API key>(findParams)
// Unexpected error
if err != nil {
log.Printf("[DEBUG] citrixadc-provider: Error during <API key> %s", err.Error())
return err
}
// Resource is missing
if len(dataArr) == 0 {
log.Printf("[DEBUG] citrixadc-provider: <API key> returned empty array")
log.Printf("[WARN] citrixadc-provider: Clearing <API key> state %s", bindingId)
d.SetId("")
return nil
}
// Iterate through results to find the one with the right id
foundIndex := -1
for i, v := range dataArr {
if v["policyname"].(string) == policyname {
foundIndex = i
break
}
}
// Resource is missing
if foundIndex == -1 {
log.Printf("[DEBUG] citrixadc-provider: <API key> policyname not found in array")
log.Printf("[WARN] citrixadc-provider: Clearing <API key> state %s", bindingId)
d.SetId("")
return nil
}
// Fallthrough
data := dataArr[foundIndex]
d.Set("bindpoint", data["bindpoint"])
d.Set("<API key>", data["<API key>"])
d.Set("invoke", data["invoke"])
d.Set("labelname", data["labelname"])
d.Set("labeltype", data["labeltype"])
d.Set("name", data["name"])
d.Set("policyname", data["policyname"])
d.Set("priority", data["priority"])
d.Set("targetlbvserver", data["targetlbvserver"])
return nil
}
func <API key>(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] citrixadc-provider: In <API key>")
client := meta.(*<API key>).client
bindingId := d.Id()
idSlice := strings.SplitN(bindingId, ",", 2)
name := idSlice[0]
policyname := idSlice[1]
argsMap := make(map[string]string)
argsMap["policyname"] = url.QueryEscape(policyname)
if v, ok := d.GetOk("bindpoint"); ok {
argsMap["bindpoint"] = url.QueryEscape(v.(string))
}
if v, ok := d.GetOk("priority"); ok {
argsMap["priority"] = url.QueryEscape(fmt.Sprintf("%v", v))
}
err := client.<API key>(service.<API key>.Type(), name, argsMap)
if err != nil {
return err
}
d.SetId("")
return nil
} |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Thu Dec 05 05:02:11 MST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.config.elytron.JaspiConfiguration (BOM: * : All 2.6.0.Final API)</title>
<meta name="date" content="2019-12-05">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.wildfly.swarm.config.elytron.JaspiConfiguration (BOM: * : All 2.6.0.Final API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.6.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/elytron/class-use/JaspiConfiguration.html" target="_top">Frames</a></li>
<li><a href="JaspiConfiguration.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.wildfly.swarm.config.elytron.JaspiConfiguration" class="title">Uses of Class<br>org.wildfly.swarm.config.elytron.JaspiConfiguration</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config">org.wildfly.swarm.config</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.elytron">org.wildfly.swarm.config.elytron</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a> in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> that return <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></code></td>
<td class="colLast"><span class="typeNameLabel">Elytron.ElytronResources.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Elytron.ElytronResources.html
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> that return types with arguments of type <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a>></code></td>
<td class="colLast"><span class="typeNameLabel">Elytron.ElytronResources.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Elytron.ElytronResources.html#jaspiConfigurations--">jaspiConfigurations</a></span>()</code>
<div class="block">Get the list of JaspiConfiguration resources</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/Elytron.html" title="type parameter in Elytron">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Elytron.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Elytron.html#<API key>.wildfly.swarm.config.elytron.JaspiConfiguration-">jaspiConfiguration</a></span>(<a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a> value)</code>
<div class="block">Add the JaspiConfiguration object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Method parameters in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with type arguments of type <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/Elytron.html" title="type parameter in Elytron">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Elytron.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Elytron.html
<div class="block">Add all JaspiConfiguration objects to this subresource</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.elytron">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a> in <a href="../../../../../../org/wildfly/swarm/config/elytron/package-summary.html">org.wildfly.swarm.config.elytron</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../../../org/wildfly/swarm/config/elytron/package-summary.html">org.wildfly.swarm.config.elytron</a> with type parameters of type <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a><T extends <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a><T>></span></code>
<div class="block">Resource containing the JASPI ServerAuthModule configuration for the servlet
profile.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a><T extends <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a><T>></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a><T extends <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a>></span></code> </td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/elytron/package-summary.html">org.wildfly.swarm.config.elytron</a> that return <a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">JaspiConfiguration</a></code></td>
<td class="colLast"><span class="typeNameLabel"><API key>.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html#get--">get</a></span>()</code>
<div class="block">Constructed instance of JaspiConfiguration resource</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/elytron/JaspiConfiguration.html" title="class in org.wildfly.swarm.config.elytron">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.6.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/elytron/class-use/JaspiConfiguration.html" target="_top">Frames</a></li>
<li><a href="JaspiConfiguration.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html> |
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" />
<link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/>
<link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/>
<!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]-->
<style type="text/css" media="all">
@import url('../../../../../style.css');
@import url('../../../../../tree.css');
</style>
<script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script>
<script src="../../../../../package-nodes-tree.js" type="text/javascript"></script>
<script src="../../../../../clover-tree.js" type="text/javascript"></script>
<script src="../../../../../clover.js" type="text/javascript"></script>
<script src="../../../../../clover-descriptions.js" type="text/javascript"></script>
<script src="../../../../../cloud.js" type="text/javascript"></script>
<title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title>
</head>
<body>
<div id="page">
<header id="header" role="banner">
<nav class="aui-header <API key>" role="navigation">
<div class="aui-header-inner">
<div class="aui-header-primary">
<h1 id="logo" class="aui-header-logo <API key>">
<a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a>
</h1>
</div>
<div class="<API key>">
<ul class="aui-nav">
<li id="system-help-menu">
<a class="aui-nav-link" title="Open online documentation" target="_blank"
href="http://openclover.org/documentation">
<span class="aui-icon aui-icon-small aui-iconfont-help"> Help</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="aui-page-panel">
<div class="<API key>">
<div class="aui-page-panel-nav <API key>">
<div class="<API key>" style="margin-bottom: 20px;">
<div class="<API key>">
<a href="http://cardatechnologies.com" target="_top">
<div class="aui-avatar aui-avatar-large aui-avatar-project">
<div class="aui-avatar-inner">
<img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/>
</div>
</div>
</a>
</div>
<div class="<API key>" >
<h1>
<a href="http://cardatechnologies.com" target="_top">
ABA Route Transit Number Validator 1.0.1-SNAPSHOT
</a>
</h1>
</div>
</div>
<nav class="aui-navgroup <API key>">
<div class="aui-navgroup-inner">
<ul class="aui-nav">
<li class="">
<a href="../../../../../dashboard.html">Project overview</a>
</li>
</ul>
<div class="aui-nav-heading <API key>">
<strong>Packages</strong>
</div>
<div class="aui-nav project-packages">
<form method="get" action="#" class="aui <API key>">
<input type="text" autocomplete="off" class="package-filter text"
placeholder="Type to filter packages..." name="package-filter" id="package-filter"
title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/>
</form>
<p class="<API key> hidden">
<small>No results found.</small>
</p>
<div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator">
<div class="<API key>"></div>
<div class="<API key>"></div>
</div>
</div>
</div>
</nav> </div>
<section class="<API key>">
<div class="<API key>">
<div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs">
<li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li>
<li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li>
<li><a href="<API key>.html">Class <API key></a></li>
</ol></div>
<h1 class="aui-h2-clover">
Test <API key>
</h1>
<table class="aui">
<thead>
<tr>
<th>Test</th>
<th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th>
<th><label title="When the test execution was started">Start time</label></th>
<th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th>
<th><label title="A failure or error message if the test is not successful.">Message</label></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=10072#src-10072" ><API key></a>
</td>
<td>
<span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span>
</td>
<td>
7 Aug 12:33:58
</td>
<td>
0.0 </td>
<td>
<div></div>
<div class="errorMessage"></div>
</td>
</tr>
</tbody>
</table>
<div> </div>
<table class="aui aui-table-sortable">
<thead>
<tr>
<th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th>
<th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/<API key>.html?id=35742#<API key>" title="<API key>" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=35742#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=35742#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a>
</td>
<td>
<span class="sortValue">0.29411766</span>29.4%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td>
</tr>
</tbody>
</table>
</div> <!-- class="<API key>" -->
<footer id="footer" role="contentinfo">
<section class="footer-body">
<ul>
<li>
Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1
on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT.
</li>
</ul>
<ul>
<li>OpenClover is free and open-source software. </li>
</ul>
</section>
</footer> </section> <!-- class="<API key>" -->
</div> <!-- class="<API key>" -->
</div> <!-- class="aui-page-panel" -->
</div> <!-- id="page" -->
</body>
</html> |
package org.jetbrains.plugins.scala.lang.dfa.invocationInfo.tests
import org.jetbrains.plugins.scala.lang.dfa.invocationInfo.<API key>
import org.jetbrains.plugins.scala.lang.dfa.invocationInfo.arguments.Argument.PassByValue
class <API key> extends <API key> {
def <API key>(): Unit = {
val sugaredSyntax = "element :: someList"
val desugaredSyntax = "someList.::(element)"
val code = (invocationSyntax: String) =>
s"""
|def main(): Int = {
| val element = 22
| val someList = List(3, 9, 10)
| val newList = ${markerStart}${invocationSyntax}${markerEnd}
| newList.head
|}
|""".stripMargin
for ((invocationSyntax, <API key>) <- List((sugaredSyntax, true), (desugaredSyntax, false))) {
val invocationInfo = <API key>(code(invocationSyntax))
val expectedArgCount = 1 + 1
val <API key> = List("element")
val <API key> = List("x")
val <API key> = (1 to expectedArgCount).map(_ => PassByValue).toList
val <API key> = (0 until expectedArgCount - 1).toList
<API key>(invocationInfo, "List
<API key>(invocationInfo, expectedArgCount, <API key>,
<API key>, <API key>, <API key>,
isRightAssociative = <API key>)
<API key>(invocationInfo, "someList")
}
}
def <API key>(): Unit = {
val sugaredSyntax = "\"World\" &: hello"
val desugaredSyntax = "hello.&:(\"World\")"
val code = (invocationSyntax: String) =>
s"""
|object Test {
| case class AndWrapper(wrapped: String) {
| def &:(other: String): String = wrapped + other
| }
|
| def main(): String = {
| val hello = AndWrapper("Hello ")
| ${markerStart}${invocationSyntax}${markerEnd}
| }
|}
|""".stripMargin
for ((invocationSyntax, <API key>) <- List((sugaredSyntax, true), (desugaredSyntax, false))) {
val invocationInfo = <API key>(code(invocationSyntax))
val expectedArgCount = 1 + 1
val <API key> = List("\"World\"")
val <API key> = List("other")
val <API key> = (1 to expectedArgCount).map(_ => PassByValue).toList
val <API key> = (0 until expectedArgCount - 1).toList
<API key>(invocationInfo, "AndWrapper
<API key>(invocationInfo, expectedArgCount, <API key>,
<API key>, <API key>, <API key>,
isRightAssociative = <API key>)
<API key>(invocationInfo, "hello")
}
}
def <API key>(): Unit = {
val sugaredSyntax = "el1 :: 444 :: 2 :: el2 :: 0 :: someList"
val desugaredSyntax = "someList.::(0).::(el2).::(2).::(444).::(el1)"
val code = (invocationSyntax: String) =>
s"""
|def main(): Int = {
| val el1 = 7
| val el2 = 50
| val someList = List(2, 3, 8)
| val newList = ${markerStart}${invocationSyntax}${markerEnd}
| newList.head
|}
|""".stripMargin
for ((invocationSyntax, sugared) <- List((sugaredSyntax, true), (desugaredSyntax, false))) {
val invocationInfo = <API key>(code(invocationSyntax))
val expectedArgCount = 1 + 1
val <API key> = List("el1")
val <API key> = List("x")
val <API key> = (1 to expectedArgCount).map(_ => PassByValue).toList
val <API key> = (0 until expectedArgCount - 1).toList
<API key>(invocationInfo, "List
<API key>(invocationInfo, expectedArgCount, <API key>,
<API key>, <API key>, <API key>,
isRightAssociative = sugared)
<API key>(invocationInfo, if (sugared) "444 :: 2 :: el2 :: 0 :: someList"
else "someList.::(0).::(el2).::(2).::(444)")
}
}
} |
package ch.papers.<API key>.ui;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.Random;
import ch.papers.<API key>.R;
public class <API key> extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = new AuthenticationView(this.getContext(), new byte[]{(byte) new Random().nextInt(), (byte) new Random().nextInt(),
(byte) new Random().nextInt(), (byte) new Random().nextInt(),
(byte) new Random().nextInt(), (byte) new Random().nextInt(),
(byte) new Random().nextInt(), (byte) new Random().nextInt()});
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getActivity().<API key>()
.beginTransaction()
.detach(<API key>.this)
.attach(<API key>.this)
.commit();
}
});
this.getActivity().setTitle(R.string.authview);
return view;
}
public static Fragment newInstance() {
return new <API key>();
}
} |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace CoolNameGenerator.Helper
{
<summary>Enumerable extensions.</summary>
public static class <API key>
{
<summary>Gets the types of the specified objects.</summary>
<returns>The types.</returns>
<param name="objects">The objects.</param>
public static Type[] GetTypes(this IEnumerable objects)
{
var typeList = new List<Type>();
if (objects != null)
{
foreach (var @object in objects)
{
if (@object == null)
typeList.Add(null);
else
typeList.Add(@object.GetType());
}
}
return typeList.ToArray();
}
<summary>
Iterates in the collection calling the action for each item.
</summary>
<param name="self">The enumerable it self.</param>
<param name="action">The each action.</param>
<typeparam name="T">The 1st type parameter.</typeparam>
public static void Each<T>(this IEnumerable<T> self, Action<T> action)
{
foreach (var obj in self)
action(obj);
}
<summary>
Iterates in the collection calling the action for each item using index.
</summary>
<param name="self">The enumerable it self.</param>
<param name="action">The each action.</param>
<typeparam name="T">The 1st type parameter.</typeparam>
public static void Each<T>(this IEnumerable<T> self, Action<T, int> action)
{
var list = self.ToList();
for (var index = 0; index < list.Count; ++index)
action(list[index], index);
}
<summary>
Iterates in the collection calling the action for each item and concatenating the result.
</summary>
<returns>The string.</returns>
<param name="self">The enumerable it self.</param>
<param name="function">The ToString function.</param>
<typeparam name="T">The 1st type parameter.</typeparam>
public static string ToString<T>(this IEnumerable<T> self, Func<T, object> function)
{
var result = new StringBuilder();
self.Each(i => result.Append(function(i)));
return result.ToString();
}
<summary>
Iterates in the collection calling the action for each item using String.Format.
</summary>
<returns>The string.</returns>
<param name="self">The enumerable it self.</param>
<param name="format">The string format.</param>
<typeparam name="T">The 1st type parameter.</typeparam>
public static string ToString<T>(this IEnumerable<T> self, string format)
{
return self.ToString(i => (object) string.Format(CultureInfo.InvariantCulture, format, (object) i));
}
}
} |
CREATE EXTERNAL TABLE IF NOT EXISTS filecounts (
word STRING,
num INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION '/output/pride';
CREATE TABLE IF NOT EXISTS orccounts (
word STRING,
num INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS ORC;
INSERT OVERWRITE TABLE orccounts SELECT * FROM filecounts;
SELECT * FROM orccounts
ORDER BY num DESC
LIMIT 25; |
// CTApiProxy.h
// CLNetWorking
#import <Foundation/Foundation.h>
#import "CLURLResponse.h"
typedef void(^AXCallback) (CLURLResponse *response);
@interface CTApiProxy : NSObject
+(instancetype)sharedInstance;
-(NSInteger)callGETWithParams:(NSDictionary *)params serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName success:(AXCallback)success fail:(AXCallback)fail;
-(NSInteger)callPOSTWithParams:(NSDictionary *)params serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName success:(AXCallback)success fail:(AXCallback)fail;
-(NSInteger)callPUTWithParams:(NSDictionary *)params serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName success:(AXCallback)success fail:(AXCallback)fail;
-(NSInteger)<API key>:(NSDictionary *)params serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName success:(AXCallback)success fail:(AXCallback)fail;
-(NSNumber *)callApiWithRequest:(NSURLRequest *)request success:(AXCallback)success fail:(AXCallback)fail;
-(NSInteger)<API key>:(NSDictionary *)params serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName success:(AXCallback)success fail:(AXCallback)fail;
-(void)<API key>:(NSNumber *)requestID;
-(void)<API key>:(NSArray *)requestIDList;
@end |
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.7) on Sat May 22 15:56:10 CEST 2021 -->
<title>DbContext.RetrieveMethod (Fluent JDBC library 0.2.2-SNAPSHOT API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-05-22">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]
<script type="text/javascript" src="../../jquery/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DbContext.RetrieveMethod (Fluent JDBC library 0.2.2-SNAPSHOT API)";
}
}
catch(err) {
}
var data = {"i0":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../";
var <API key> = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<div class="topNav"><a id="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DbContext.RetrieveMethod.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="<API key>">
<li><a href="../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
</a></div>
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
</script>
</nav>
</header>
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.fluentjdbc</a></div>
<h2 title="Interface DbContext.RetrieveMethod" class="title">Interface DbContext.RetrieveMethod<KEY,​ENTITY></h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="DbContext.html" title="class in org.fluentjdbc">DbContext</a></dd>
</dl>
<dl>
<dt>Functional Interface:</dt>
<dd>This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.</dd>
</dl>
<hr>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html?is-external=true" title="class or interface in java.lang" class="externalLink">@FunctionalInterface</a>
public static interface <span class="typeNameLabel">DbContext.RetrieveMethod<KEY,​ENTITY></span></pre>
<div class="block">Functional interface used to populate the query. Called on when a retrieved value is not in
the cache. Like <a href="https:
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="DbContext.RetrieveMethod.html" title="type parameter in DbContext.RetrieveMethod">ENTITY</a>></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#retrieve(KEY)">retrieve</a></span>​(<a href="DbContext.RetrieveMethod.html" title="type parameter in DbContext.RetrieveMethod">KEY</a> key)</code></th>
<td class="colLast"> </td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
</a>
<h3>Method Detail</h3>
<a id="retrieve(java.lang.Object)">
</a><a id="retrieve(KEY)">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>retrieve</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html?is-external=true" title="class or interface in java.util" class="externalLink">Optional</a><<a href="DbContext.RetrieveMethod.html" title="type parameter in DbContext.RetrieveMethod">ENTITY</a>> retrieve​(<a href="DbContext.RetrieveMethod.html" title="type parameter in DbContext.RetrieveMethod">KEY</a> key)</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<div class="bottomNav"><a id="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DbContext.RetrieveMethod.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="<API key>">
<li><a href="../../allclasses.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
</a></div>
</nav>
<p class="legalCopy"><small>Copyright &
</footer>
</body>
</html> |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Cats.Data.UnitWork;
using Cats.Models;
namespace Cats.Services.Common
{
public class <API key> : <API key>
{
private readonly IUnitOfWork _unitOfWork;
public <API key>(IUnitOfWork unitOfWork)
{
this._unitOfWork = unitOfWork;
}
#region Implementation of IDisposable
<summary>
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
</summary>
<filterpriority>2</filterpriority>
public void Dispose()
{
_unitOfWork.Dispose();
}
#endregion
#region Implementation of <API key>
public bool <API key>(<API key> <API key>)
{
_unitOfWork.<API key>.Add(<API key>);
_unitOfWork.Save();
return true;
}
public bool <API key>(<API key> <API key>)
{
if (<API key> == null) return false;
_unitOfWork.<API key>.Delete(<API key>);
_unitOfWork.Save();
return true;
}
public bool DeleteById(int id)
{
var entity = _unitOfWork.<API key>.FindById(id);
if (entity == null) return false;
_unitOfWork.<API key>.Delete(entity);
_unitOfWork.Save();
return true;
}
public bool <API key>(<API key> <API key>)
{
_unitOfWork.<API key>.Edit(<API key>);
_unitOfWork.Save();
return true;
}
public <API key> FindById(int id)
{
return _unitOfWork.<API key>.FindById(id);
}
public List<<API key>> <API key>()
{
return _unitOfWork.<API key>.GetAll();
}
public List<<API key>> FindBy(Expression<Func<<API key>, bool>> predicate)
{
return _unitOfWork.<API key>.FindBy(predicate);
}
public IEnumerable<<API key>> Get(Expression<Func<<API key>, bool>> filter = null, Func<IQueryable<<API key>>, IOrderedQueryable<<API key>>> orderBy = null, string includeProperties = "")
{
return _unitOfWork.<API key>.Get(filter, orderBy, includeProperties);
}
#endregion
}
} |
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using InsurgenceData;
using Newtonsoft.Json;
namespace AdminSite.Models
{
public class Trade
{
public DateTime Date { get; set; }
public string User1 { get; set; }
public string User2 { get; set; }
public GamePokemon Pokemon1 { get; set; }
public GamePokemon Pokemon2 { get; set; }
public int Id { get; set; }
}
public class WonderTrade
{
public uint Id { get; set; }
public DateTime Date { get; set; }
public string User { get; set; }
public GamePokemon Pokemon { get; set; }
}
public enum PokemonGender
{
Male,
Female,
Genderless
}
public enum Nature
{
Hardy,
Lonely,
Brave,
Adamant,
Naughty,
Bold,
Docile,
Relaxed,
Impish,
Lax,
Timid,
Hasty,
Serious,
Jolly,
Naive,
Modest,
Mild,
Quiet,
Bashful,
Rash,
Calm,
Gentle,
Sassy,
Careful,
Quirky
}
} |
#!/bin/python3
if __name__ == '__main__':
a = int(input())
b = int(input())
print(a
print(a / b) |
This directory is for helper servers available for use with Cloudprober.
Cloudprober itself is a prober daemon with primary purpose to run probes but
since it runs on all of our probing VMs, it provides a perfect platform to run
servers that can act as the backend for probes that need to access something on
cloud. |
using FluentCassandra.Apache.Cassandra;
using FluentCassandra.Thrift.Transport;
using System;
using System.Diagnostics;
using System.IO;
namespace FluentCassandra.Operations
{
public abstract class Operation<TResult>
{
private int _executionCount;
public Operation()
{
_executionCount = 0;
HasError = false;
}
public CassandraContext Context { get; set; }
public CassandraSession Session { get; set; }
public bool HasError { get; protected set; }
public <API key> Error { get; protected set; }
public virtual bool TryExecute(out TResult result)
{
if (_executionCount > Session.ConnectionBuilder.MaxRetries)
{
result = default(TResult);
return !HasError;
}
_executionCount++;
try
{
result = Execute();
// HasError needs to be reset to false incase a retry happens
HasError = false;
Error = null;
}
catch (<API key> exc)
{
ExceptionOccurred(new <API key>(exc));
result = default(TResult);
}
catch (<API key> exc)
{
ExceptionOccurred(new <API key>(exc));
result = default(TResult);
}
catch (<API key> exc)
{
ExceptionOccurred(new <API key>(exc));
result = default(TResult);
}
catch (<API key> exc)
{
Session.<API key>(exc);
<API key>(new <API key>(exc), out result);
}
catch (TimeoutException exc)
{
<API key>(new <API key>(exc), out result);
}
catch (TimedOutException exc)
{
<API key>(new <API key>(exc), out result);
}
catch (TTransportException exc)
{
Session.<API key>(exc);
<API key>(new <API key>(exc), out result);
}
catch (IOException exc)
{
Session.<API key>(exc);
<API key>(new <API key>(exc), out result);
}
catch (NotFoundException exc)
{
<API key>(new <API key>(exc), out result);
}
catch (Exception exc)
{
ExceptionOccurred(new <API key>(exc));
result = default(TResult);
}
return !HasError;
}
private void <API key>(<API key> exc, out TResult result)
{
ExceptionOccurred(exc);
TryExecute(out result);
}
private void ExceptionOccurred(<API key> exc)
{
Debug.WriteLine(exc);
HasError = true;
Error = exc;
}
public abstract TResult Execute();
}
} |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Fri Jun 16 09:55:16 MST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.container.util.XmlWriter.Element (Public javadocs 2017.6.1 API)</title>
<meta name="date" content="2017-06-16">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.wildfly.swarm.container.util.XmlWriter.Element (Public javadocs 2017.6.1 API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.6.1</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/container/util/class-use/XmlWriter.Element.html" target="_top">Frames</a></li>
<li><a href="XmlWriter.Element.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.wildfly.swarm.container.util.XmlWriter.Element" class="title">Uses of Class<br>org.wildfly.swarm.container.util.XmlWriter.Element</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.container.util">org.wildfly.swarm.container.util</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.container.util">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a> in <a href="../../../../../../org/wildfly/swarm/container/util/package-summary.html">org.wildfly.swarm.container.util</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/container/util/package-summary.html">org.wildfly.swarm.container.util</a> that return <a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></code></td>
<td class="colLast"><span class="typeNameLabel">XmlWriter.Element.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></code></td>
<td class="colLast"><span class="typeNameLabel">XmlWriter.Element.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></code></td>
<td class="colLast"><span class="typeNameLabel">XmlWriter.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.html
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">XmlWriter.Element</a></code></td>
<td class="colLast"><span class="typeNameLabel">XmlWriter.Element.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/container/util/XmlWriter.Element.html" title="class in org.wildfly.swarm.container.util">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.6.1</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/container/util/class-use/XmlWriter.Element.html" target="_top">Frames</a></li>
<li><a href="XmlWriter.Element.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html> |
package com.mateuszkoslacz.moviper.rxsample.viper.view.activity;
import android.support.v7.widget.RecyclerView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.mateuszkoslacz.moviper.rxsample.BuildConfig;
import com.mateuszkoslacz.moviper.rxsample.R;
import com.mateuszkoslacz.moviper.rxsample.viper.entity.User;
import com.mateuszkoslacz.moviper.rxsample.viper.presenter.ListingPresenter;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.Robolectric;
import org.robolectric.<API key>;
import org.robolectric.annotation.Config;
import org.robolectric.util.ActivityController;
import java.util.Arrays;
import io.reactivex.observers.TestObserver;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@RunWith(<API key>.class)
@Config(constants = BuildConfig.class, sdk = 21)
public class ListingActivityTest {
@Mock
private ListingPresenter mListingPresenter;
private ListingActivity mListingActivity;
private RecyclerView mRecyclerView;
private ProgressBar mProgressBar;
private TextView mErrorTextView;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
ActivityController<ListingActivity> <API key> =
Robolectric.buildActivity(ListingActivity.class);
mListingActivity = <API key>.get();
mListingActivity.setPresenter(mListingPresenter);
<API key>.create().start().resume().visible().get();
mErrorTextView = (TextView) mListingActivity.findViewById(R.id.errorView);
mProgressBar = (ProgressBar) mListingActivity.findViewById(R.id.loadingView);
mRecyclerView = (RecyclerView) mListingActivity.findViewById(R.id.recycler_view);
}
@Test
public void testActivity() throws Exception {
TestObserver<User> testSubscriber = TestObserver.create();
mListingActivity.getUserClicks().subscribe(testSubscriber);
User user = new User();
mListingActivity.onUserClick(user);
testSubscriber.assertNoErrors();
testSubscriber.assertNotComplete();
testSubscriber.assertValueSet(Arrays.asList(user));
}
@Test
public void <API key>() throws Exception {
assertNotNull("Error textview could not be found", mErrorTextView);
assertNotNull("Progressbar could not be found", mProgressBar);
assertNotNull("content could not be found", mRecyclerView);
}
@Test
public void testShowError() throws Exception {
mListingActivity.showError(new Exception("Test message"));
assertFalse("Loading indicator is visible", mProgressBar.isShown());
assertFalse("content is visible", mRecyclerView.isShown());
assertTrue("Error textview is not visible", mErrorTextView.isShown());
assertEquals("Error textview hasn't got proper message",
"Test message", mErrorTextView.getText().toString());
}
@Test
public void testShowLoading() throws Exception {
mListingActivity.showLoading();
assertTrue("Loading indicator is not visible", mProgressBar.isShown());
assertFalse("content is visible", mRecyclerView.isShown());
assertFalse("Error textview is visible", mErrorTextView.isShown());
}
@Test
public void testShowContent() throws Exception {
mListingActivity.showContent();
assertFalse("Loading indicator is visible", mProgressBar.isShown());
assertTrue("content is not visible", mRecyclerView.isShown());
assertFalse("Error textview is visible", mErrorTextView.isShown());
}
@Test
public void testSetContent() throws Exception {
User user1 = new User();
User user2 = new User();
User user3 = new User();
user1.setLogin("first");
user2.setLogin("second");
user3.setLogin("third");
mListingActivity.setUserList(Arrays.asList(user1, user2, user3));
mListingActivity.showContent();
TextView userLoginTextView = (TextView) mRecyclerView.<API key>(0)
.itemView.findViewById(R.id.login);
assertEquals("user item doesn't display correct user login",
"first", userLoginTextView.getText().toString());
}
@Test
public void testContentClicks() throws Exception {
User user1 = new User();
User user2 = new User();
User user3 = new User();
user1.setLogin("first");
user2.setLogin("second");
user3.setLogin("third");
TestObserver<User> testSubscriber = TestObserver.create();
mListingActivity.getUserClicks().subscribe(testSubscriber);
mListingActivity.setUserList(Arrays.asList(user1, user2, user3));
mListingActivity.showContent();
mRecyclerView.<API key>(0).itemView.performClick();
// workaround robolectric recyclerView issue
mRecyclerView.measure(0, 0);
mRecyclerView.layout(0, 0, 100, 1000);
testSubscriber.assertNoErrors();
testSubscriber.assertNotComplete();
testSubscriber.assertValueSet(Arrays.asList(user1));
}
} |
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" />
<link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/>
<link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/>
<!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]-->
<style type="text/css" media="all">
@import url('../../../../../style.css');
@import url('../../../../../tree.css');
</style>
<script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script>
<script src="../../../../../package-nodes-tree.js" type="text/javascript"></script>
<script src="../../../../../clover-tree.js" type="text/javascript"></script>
<script src="../../../../../clover.js" type="text/javascript"></script>
<script src="../../../../../clover-descriptions.js" type="text/javascript"></script>
<script src="../../../../../cloud.js" type="text/javascript"></script>
<title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title>
</head>
<body>
<div id="page">
<header id="header" role="banner">
<nav class="aui-header <API key>" role="navigation">
<div class="aui-header-inner">
<div class="aui-header-primary">
<h1 id="logo" class="aui-header-logo <API key>">
<a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a>
</h1>
</div>
<div class="<API key>">
<ul class="aui-nav">
<li id="system-help-menu">
<a class="aui-nav-link" title="Open online documentation" target="_blank"
href="http://openclover.org/documentation">
<span class="aui-icon aui-icon-small aui-iconfont-help"> Help</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="aui-page-panel">
<div class="<API key>">
<div class="aui-page-panel-nav <API key>">
<div class="<API key>" style="margin-bottom: 20px;">
<div class="<API key>">
<a href="http://cardatechnologies.com" target="_top">
<div class="aui-avatar aui-avatar-large aui-avatar-project">
<div class="aui-avatar-inner">
<img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/>
</div>
</div>
</a>
</div>
<div class="<API key>" >
<h1>
<a href="http://cardatechnologies.com" target="_top">
ABA Route Transit Number Validator 1.0.1-SNAPSHOT
</a>
</h1>
</div>
</div>
<nav class="aui-navgroup <API key>">
<div class="aui-navgroup-inner">
<ul class="aui-nav">
<li class="">
<a href="../../../../../dashboard.html">Project overview</a>
</li>
</ul>
<div class="aui-nav-heading <API key>">
<strong>Packages</strong>
</div>
<div class="aui-nav project-packages">
<form method="get" action="#" class="aui <API key>">
<input type="text" autocomplete="off" class="package-filter text"
placeholder="Type to filter packages..." name="package-filter" id="package-filter"
title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/>
</form>
<p class="<API key> hidden">
<small>No results found.</small>
</p>
<div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator">
<div class="<API key>"></div>
<div class="<API key>"></div>
</div>
</div>
</div>
</nav> </div>
<section class="<API key>">
<div class="<API key>">
<div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs">
<li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li>
<li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li>
<li><a href="<API key>.html">Class <API key></a></li>
</ol></div>
<h1 class="aui-h2-clover">
Test <API key>
</h1>
<table class="aui">
<thead>
<tr>
<th>Test</th>
<th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th>
<th><label title="When the test execution was started">Start time</label></th>
<th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th>
<th><label title="A failure or error message if the test is not successful.">Message</label></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=16792#src-16792" ><API key></a>
</td>
<td>
<span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span>
</td>
<td>
7 Aug 12:34:38
</td>
<td>
0.0 </td>
<td>
<div></div>
<div class="errorMessage"></div>
</td>
</tr>
</tbody>
</table>
<div> </div>
<table class="aui aui-table-sortable">
<thead>
<tr>
<th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th>
<th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=1507#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a>
</td>
<td>
<span class="sortValue">0.7352941</span>73.5%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="73.5% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:73.5%"></div></div></div> </td>
</tr>
</tbody>
</table>
</div> <!-- class="<API key>" -->
<footer id="footer" role="contentinfo">
<section class="footer-body">
<ul>
<li>
Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1
on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT.
</li>
</ul>
<ul>
<li>OpenClover is free and open-source software. </li>
</ul>
</section>
</footer> </section> <!-- class="<API key>" -->
</div> <!-- class="<API key>" -->
</div> <!-- class="aui-page-panel" -->
</div> <!-- id="page" -->
</body>
</html> |
# 1.0.1 (January 15, 2019)
## Bug fixes / Improvements
* [[`e90f410556`](https://github.com/webhintio/hint/commit/<SHA1-like>)] - Fix: Improve feedback when config is invalid (by [`Jesus David García Gomez`](https://github.com/sarvaje) / see also: [`
# 1.0.0 (January 2, 2019) |
package cats.scalatest
import org.scalatest.OptionValues
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
abstract class TestBase extends AnyWordSpec with Matchers with OptionValues {
val thisRecord = "I will not buy this record, it is scratched."
val thisTobacconist = "Ah! I will not buy this tobacconist's, it is scratched."
val hovercraft = "Yes, cigarettes. My hovercraft is full of eels."
final val isJS = 1.0.toString() == "1"
final val isJVM = !isJS
/**
* Shamelessly swiped from Scalatest.
*/
final def thisLineNumber: Int = {
val st = Thread.currentThread.getStackTrace
if (!st(2).getMethodName.contains("thisLineNumber"))
st(2).getLineNumber
else
st(3).getLineNumber
}
} |
package com.arcao.trackables.data.service;
import android.content.SharedPreferences;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.arcao.geocaching.api.GeocachingApi;
import com.arcao.geocaching.api.data.DeviceInfo;
import com.arcao.geocaching.api.data.UserProfile;
import com.arcao.geocaching.api.data.type.MemberType;
import com.arcao.geocaching.api.exception.<API key>;
import org.scribe.model.Token;
import org.scribe.model.Verifier;
import org.scribe.oauth.OAuthService;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import rx.Observable;
import timber.log.Timber;
@Singleton
public class AccountService {
private static final String PREF__USER_NAME = "USER_NAME";
private static final String PREF__ACCESS_TOKEN = "ACCESS_TOKEN";
private static final String PREF__MEMBER_TYPE = "MEMBER_TYPE";
private static final String PREF__AVATAR_URL = "AVATAR_URL";
private static final String <API key> = "OAUTH_TOKEN_%s";
private final SharedPreferences mSharedPreferences;
private final GeocachingApi geocachingApi;
private final Provider<OAuthService> <API key>;
private final Provider<DeviceInfo> deviceInfoProvider;
@Inject
public AccountService(@Named("<API key>") SharedPreferences mSharedPreferences,
GeocachingApi geocachingApi, Provider<OAuthService> <API key>,
Provider<DeviceInfo> deviceInfoProvider) {
this.mSharedPreferences = mSharedPreferences;
this.geocachingApi = geocachingApi;
this.<API key> = <API key>;
this.deviceInfoProvider = deviceInfoProvider;
login();
}
private void login() {
try {
if (isAccount())
geocachingApi.openSession(getAccessToken());
} catch (<API key> e) {
Timber.e(e.getMessage(), e);
}
}
public void logout() {
geocachingApi.closeSession();
mSharedPreferences.edit()
.remove(PREF__USER_NAME)
.remove(PREF__ACCESS_TOKEN)
.remove(PREF__MEMBER_TYPE)
.remove(PREF__AVATAR_URL)
.apply();
}
public boolean isAccount() {
return getMemberType() != MemberType.Guest;
}
@Nullable
public String getUserName() {
return mSharedPreferences.getString(PREF__USER_NAME, null);
}
@Nullable
public String getAvatarUrl() {
return mSharedPreferences.getString(PREF__AVATAR_URL, null);
}
@NonNull
public MemberType getMemberType() {
if (getUserName() == null || getAccessToken() == null)
return MemberType.Guest;
return MemberType.getById(mSharedPreferences.getInt(PREF__MEMBER_TYPE, MemberType.Guest.getId()));
}
public Observable<String> startOAuthLogin() {
return Observable.create(subscriber -> {
OAuthService oAuthService = <API key>.get();
Token requestToken = oAuthService.getRequestToken();
<API key>(requestToken);
String authUrl = oAuthService.getAuthorizationUrl(requestToken);
Timber.i("AuthorizationUrl: " + authUrl);
subscriber.onNext(authUrl);
subscriber.onCompleted();
});
}
public Observable<Void> finishOAuthLogin(String verifier) {
return Observable.create(subscriber -> {
try {
OAuthService oAuthService = <API key>.get();
Token request<API key>();
Token accessToken = oAuthService.getAccessToken(requestToken, new Verifier(verifier));
// get account name
geocachingApi.openSession(accessToken.getToken());
UserProfile userProfile = geocachingApi.getYourUserProfile(false, false, false, false, false, false, deviceInfoProvider.get());
// add account
if (isAccount()) {
logout();
}
addAccount(
userProfile.getUser().getUserName(),
geocachingApi.getSession(),
userProfile.getUser().getAvatarUrl(),
userProfile.getUser().getMemberType()
);
<API key>();
login();
subscriber.onCompleted();
} catch (Exception e) {
subscriber.onError(e);
}
});
}
private void addAccount(@NonNull String userName, @NonNull String accessToken, @Nullable String avatarUrl, @NonNull MemberType memberType) {
mSharedPreferences.edit()
.putString(PREF__USER_NAME, userName)
.putString(PREF__ACCESS_TOKEN, accessToken)
.putString(PREF__AVATAR_URL, avatarUrl)
.putInt(PREF__MEMBER_TYPE, memberType.getId())
.apply();
}
private void <API key>(@NonNull Token token) {
mSharedPreferences.edit()
.putString(String.format(<API key>, 0), token.getToken())
.putString(String.format(<API key>, 1), token.getSecret())
.putString(String.format(<API key>, 2), token.getRawResponse())
.apply();
}
private void <API key>() {
mSharedPreferences.edit()
.remove(String.format(<API key>, 0))
.remove(String.format(<API key>, 1))
.remove(String.format(<API key>, 2))
.apply();
}
@NonNull
private <API key>() {
String <API key>.getString(String.format(<API key>, 0), "");
String <API key>.getString(String.format(<API key>, 1), "");
String rawResponse = mSharedPreferences.getString(String.format(<API key>, 2), "");
return new Token(token, secret, rawResponse);
}
@Nullable
private String getAccessToken() {
return mSharedPreferences.getString(PREF__ACCESS_TOKEN, null);
}
} |
package e2e
import (
"bytes"
"os"
"os/exec"
"strings"
"testing"
)
type TestShellCmdRunner struct {
// binary to invoke
// Example: "func", "kn", "kubectl", "/usr/bin/sh"
Binary string
// Binary args to append before actual args. Examples:
// when 'kn' binary binaryArgs should be ["func"]
BinaryArgs []string
// Run commands from Dir
SourceDir string
// Indicates shell should dump command line args during execution
ShouldDumpCmdLine bool
// Indicates shell should dump
ShouldDumpOnSuccess bool
// Environment variable to be used with the command
Env []string
// Boolean
T *testing.T
}
// TestShellCmdResult stored command result
type TestShellCmdResult struct {
Stdout string
Stderr string
Error error
}
func (r TestShellCmdResult) Dump(t *testing.T) {
if r.Stdout != "" {
t.Log(r.Stdout)
}
if r.Stderr != "" {
t.Log(r.Stderr)
}
}
func NewKnFuncShellCli(t *testing.T) *TestShellCmdRunner {
knfunc := TestShellCmdRunner{}
knfunc.T = t
if IsUseKnFunc() {
knfunc.Binary = "kn"
knfunc.BinaryArgs = []string{"func"}
} else {
knfunc.Binary = GetFuncBinaryPath()
if knfunc.Binary == "" {
t.Log("'func' binary not defined. Please set E2E_FUNC_BIN_PATH environment variable prior to run this test")
t.FailNow()
}
}
cmd := knfunc.Exec()
if cmd.Error != nil {
t.FailNow()
}
knfunc.ShouldDumpCmdLine = true
return &knfunc
}
func (f *TestShellCmdRunner) WithEnv(envKey string, envValue string) *TestShellCmdRunner {
env := envKey + "=" + envValue
f.Env = append(f.Env, env)
return f
}
func (f *TestShellCmdRunner) FromDir(dir string) *TestShellCmdRunner {
f.SourceDir = dir
return f
}
// Exec invokes go exec library and runs a shell command combining the binary args with args from method signature
func (f *TestShellCmdRunner) Exec(args ...string) TestShellCmdResult {
finalArgs := f.BinaryArgs
if finalArgs == nil {
finalArgs = args
} else if args != nil {
finalArgs = append(finalArgs, args...)
}
if f.ShouldDumpCmdLine {
f.T.Log(f.Binary, strings.Join(finalArgs, " "))
}
var stderr bytes.Buffer
var stdout bytes.Buffer
cmd := exec.Command(f.Binary, finalArgs...)
cmd.Stderr = &stderr
cmd.Stdout = &stdout
if f.SourceDir != "" {
cmd.Dir = f.SourceDir
}
cmd.Env = append(os.Environ(), f.Env...)
err := cmd.Run()
result := TestShellCmdResult{
Stdout: stdout.String(),
Stderr: stderr.String(),
Error: err,
}
if err == nil && f.ShouldDumpOnSuccess {
f.T.Log(result.Stdout)
}
if err != nil {
f.T.Log(err.Error())
f.T.Log(result.Stderr)
}
return result
} |
<!DOCTYPE html PUBLIC "-
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>PMD 5.5.1 Reference Package net.sourceforge.pmd.lang.java.rule.migrating</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="style" />
</head>
<body>
<div class="overview">
<ul>
<li>
<a href="../../../../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<h2>Package net.sourceforge.pmd.lang.java.rule.migrating</h2>
<table class="summary">
<thead>
<tr>
<th>Class Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="MigratingRulesTest.html" target="classFrame">MigratingRulesTest</a>
</td>
</tr>
</tbody>
</table>
<div class="overview">
<ul>
<li>
<a href="../../../../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<hr />
<div id="footer">
Copyright &
</div>
</body>
</html> |
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.RectF;
import android.net.Uri.Builder;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public final class dik
extends mca
implements dij, diw, gpq, lee
{
boolean Z;
int a;
boolean aa;
int ab = -1;
did ac;
final dha ad = new cye(this, this.bp);
RecyclerView ae;
private git af;
private Bundle ag;
private dhd ah;
private jov ai;
private dia aj;
private final cw<Cursor> ak = new dio(this);
private final cw<dih> al = new dip(this);
private aep am;
private final jpe an;
String b;
jyy c;
gzj d;
public dik()
{
new gpk(this, this.bp, this);
this.an = new dil(this);
}
public final View a(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
View localView = LayoutInflater.from(this.bn).inflate(efj.AV, paramViewGroup, false);
this.ae = ((RecyclerView)localView.findViewById(ehr.O));
int i = efj.v(this.bn, efj.K(this.bn).widthPixels);
this.am = new aep(this.bn, i);
this.am.a = new die(this.ac, i);
this.ae.a(this.am);
this.ae.a(this.ac);
return localView;
}
public final void a(int paramInt1, int paramInt2, Intent paramIntent)
{
if (paramInt2 != -1) {
return;
}
switch (paramInt1)
{
}
for (;;)
{
super.a(paramInt1, paramInt2, paramIntent);
return;
if (paramIntent != null)
{
byte[] arrayOfByte = paramIntent.getByteArrayExtra("data");
if (arrayOfByte != null)
{
bor localbor = new bor(this.bn, this.a, arrayOfByte);
gzj localgzj4 = this.d;
localgzj4.d.a(localbor, false);
localgzj4.b(localbor);
continue;
if (paramIntent != null)
{
RectF localRectF = (RectF)paramIntent.getParcelableExtra("coordinates");
int i = paramIntent.getIntExtra("<API key>", 0);
if (paramInt1 == 109) {}
for (boolean bool = true;; bool = false)
{
if (!paramIntent.hasExtra("photo_id")) {
break label223;
}
long l = paramIntent.getLongExtra("photo_id", 0L);
boh localboh = new boh(this.a, this.b, String.valueOf(l), localRectF, i, bool);
gzj localgzj3 = this.d;
localgzj3.d.a(localboh, false);
localgzj3.b(localboh);
break;
}
label223:
if (paramIntent.hasExtra("tile_id"))
{
String str2 = paramIntent.getStringExtra("tile_id");
bog localbog = new bog(this.a, this.b, str2, localRectF, i, bool);
gzj localgzj2 = this.d;
localgzj2.d.a(localbog, false);
localgzj2.b(localbog);
}
else
{
String str1 = paramIntent.getStringExtra("photo_url");
if (str1 != null)
{
boq localboq = new boq(this.a, this.b, str1, localRectF);
gzj localgzj1 = this.d;
localgzj1.d.a(localboq, false);
localgzj1.b(localboq);
}
}
}
}
}
}
}
public final void a(Bundle paramBundle)
{
super.a(paramBundle);
d(true);
this.b = this.m.getString("gaia_id");
this.a = this.af.c();
this.ac = new did(this.bn);
this.ai.a(ehr.af, this.an);
this.aj = new dia(f());
if (paramBundle != null)
{
this.aa = paramBundle.getBoolean("is_first_load");
this.Z = paramBundle.getBoolean("<API key>");
this.ac.e = paramBundle.getString("tagline");
this.ac.b(paramBundle.getInt("<API key>"), paramBundle.getInt("<API key>"));
this.ac.a(paramBundle.getStringArrayList("<API key>"));
this.ab = paramBundle.getInt("<API key>", -1);
}
for (;;)
{
this.d.a("editProfileTask", new diq(this)).a("<API key>", new diu(this)).a("<API key>", new dis(this)).a("<API key>", new dir(this)).a("<API key>", new dit(this)).a("getPhotoTask", new din(this)).a("getCoverPhotoTask", new dim(this));
return;
this.aa = true;
}
}
public final void a(gpr paramgpr)
{
paramgpr.b(ehr.P);
paramgpr.c(ehr.P).setEnabled(true);
}
public final void a(String paramString, boolean paramBoolean)
{
if (paramBoolean)
{
did localdid3 = this.ac;
localdid3.h.add(paramString);
localdid3.a.b();
}
for (;;)
{
did localdid2 = this.ac;
if (localdid2.c != null)
{
localdid2.g = 1;
localdid2.c(-1 + dig.b);
}
return;
did localdid1 = this.ac;
localdid1.h.remove(paramString);
localdid1.a.b();
}
}
@TargetApi(21)
public final void a(tp paramtp)
{
paramtp.b(aw.B);
paramtp.c(true);
if (Build.VERSION.SDK_INT >= 21) {
paramtp.a(0.0F);
}
}
public final void a(boolean paramBoolean)
{
did localdid = this.ac;
if (paramBoolean) {}
for (int i = 2;; i = 3)
{
localdid.f = i;
localdid.c(-1 + dig.b);
return;
}
}
public final boolean a(MenuItem paramMenuItem)
{
int i = paramMenuItem.getItemId();
quq localquq;
did localdid1;
quo[] arrayOfquo;
qut localqut;
did localdid2;
int k;
int j;
if (i == ehr.P)
{
localquq = new quq();
localquq.b = this.ac.g;
localquq.c = this.ac.f;
localdid1 = this.ac;
if (localdid1.c == null)
{
arrayOfquo = null;
localquq.a = arrayOfquo;
localqut = new qut();
localqut.a = this.ac.b().trim();
localdid2 = this.ac;
if ((localdid2.d == null) || (!localdid2.d.moveToFirst())) {
break label707;
}
k = localdid2.d.getInt(localdid2.d.<API key>("<API key>"));
j = localdid2.d.getInt(localdid2.d.<API key>("<API key>"));
}
}
for (;;)
{
String str1;
label184:
int m;
if (localdid2.j.b == null)
{
str1 = "";
if ((k == localdid2.f) && (j == localdid2.g) && (TextUtils.equals(str1, localdid2.b())) && (localdid2.i.equals(localdid2.h))) {
break label589;
}
m = 1;
label238:
if (m == 0) {
break label595;
}
jzf localjzf = new jzf(this.a, this.b, localquq, null, null, localqut, this.ac.k.b);
gzj localgzj = this.d;
localgzj.d.a(localjzf, false);
localgzj.b(localjzf);
}
for (;;)
{
mbf localmbf1 = this.bn;
gxr localgxr1 = new gxr();
gxq localgxq1 = new gxq(pka.c);
localgxr1.b.add(localgxq1);
new gwz(4, localgxr1.a(this.bn)).b(localmbf1);
return true;
localdid1.i.clear();
ArrayList localArrayList = new ArrayList();
localdid1.c.moveToPosition(-1);
if (localdid1.c.moveToNext())
{
String str2 = localdid1.c.getString(localdid1.c.<API key>("square_id"));
if (TextUtils.isEmpty(localdid1.c.getString(localdid1.c.<API key>("is_visible")))) {
localdid1.i.add(str2);
}
qus localqus = new qus();
localqus.b = str2;
quo localquo = new quo();
if (!localdid1.h.contains(str2)) {}
for (boolean bool = true;; bool = false)
{
localquo.a = Boolean.valueOf(bool);
localquo.a(qus.a, localqus);
localArrayList.add(localquo);
break;
}
}
arrayOfquo = (quo[])localArrayList.toArray(new quo[localArrayList.size()]);
break;
str1 = localdid2.j.b;
break label184;
label589:
m = 0;
break label238;
label595:
Intent localIntent = new Intent();
localIntent.putExtra("should_refresh_data", false);
f().setResult(-1, localIntent);
f().finish();
}
if (i == 16908332)
{
mbf localmbf2 = this.bn;
gxr localgxr2 = new gxr();
gxq localgxq2 = new gxq(pka.b);
localgxr2.b.add(localgxq2);
new gwz(4, localgxr2.a(this.bn)).b(localmbf2);
return true;
}
return false;
label707:
j = 0;
k = 0;
}
}
public final void b(tp paramtp) {}
public final void b(boolean paramBoolean)
{
int i = 2;
did localdid2;
if (paramBoolean)
{
this.ac.h.clear();
localdid2 = this.ac;
if (localdid2.c != null)
{
localdid2.a(i, localdid2.c.getCount());
if (!paramBoolean) {
break label167;
}
}
}
for (;;)
{
localdid2.g = i;
localdid2.c(-1 + dig.b);
return;
did localdid1 = this.ac;
if (localdid1.c == null) {
break;
}
localdid1.c.moveToPosition(-1);
ArrayList localArrayList = new ArrayList();
while (localdid1.c.moveToNext()) {
localArrayList.add(localdid1.c.getString(localdid1.c.<API key>("square_id")));
}
localdid1.h.clear();
localdid1.h.addAll(localArrayList);
break;
label167:
i = 3;
}
}
protected final void c(Bundle paramBundle)
{
super.c(paramBundle);
mbb localmbb = this.bo;
localmbb.a(lee.class, this);
localmbb.a(diw.class, this);
localmbb.a(dij.class, this);
localmbb.a(dha.class, this.ad);
this.af = ((git)this.bo.a(git.class));
this.ag = ((gvj)this.bo.a(gvj.class)).a();
this.d = ((gzj)this.bo.a(gzj.class));
this.c = ((jyy)this.bo.a(jyy.class));
this.ai = ((jov)this.bo.a(jov.class));
this.ah = ((dhd)this.bo.a(dhd.class));
}
public final void d(Bundle paramBundle)
{
super.d(paramBundle);
cv localcv = k();
localcv.a(1, null, this.ak);
localcv.a(2, null, this.al);
}
public final void e(Bundle paramBundle)
{
super.e(paramBundle);
paramBundle.putBoolean("is_first_load", this.aa);
paramBundle.putBoolean("<API key>", this.Z);
paramBundle.putString("tagline", this.ac.b());
paramBundle.putInt("<API key>", this.ac.g);
paramBundle.putInt("<API key>", this.ac.f);
paramBundle.putStringArrayList("<API key>", new ArrayList(this.ac.h));
paramBundle.putInt("<API key>", this.am.j());
}
public final void v()
{
this.Z = false;
dgz localdgz = this.ah.e().a(aI_().getString(aw.h));
bp localbp = f();
Intent localIntent = efj.b("camera-photo.jpg");
int i = localbp.getPackageManager().<API key>(localIntent, 65536).size();
boolean bool = false;
if (i > 0) {
bool = true;
}
localdgz.a(bool).b(true).a().a(h(), "change_photo");
}
public final void w()
{
boolean bool = true;
this.Z = bool;
dgz localdgz = this.ah.e().a(aI_().getString(aw.i));
bp localbp = f();
Intent localIntent = efj.b("camera-photo.jpg");
if (localbp.getPackageManager().<API key>(localIntent, 65536).size() > 0) {}
for (;;)
{
localdgz.a(bool).a().a(h(), "change_photo");
return;
bool = false;
}
}
public final void x()
{
gjb localgjb = this.af.f();
Uri.Builder localBuilder = new Uri.Builder().scheme("https").authority("aboutme.google.com");
Boolean localBoolean = this.ac.l.b;
if (localBoolean == null) {}
for (boolean bool = false;; bool = localBoolean.booleanValue())
{
if ((bool) || (this.ac.c()))
{
localBuilder.<API key>("referer", "gplus_android");
localBuilder.<API key>("pageId", this.b);
}
dhg localdhg = new dhg();
localdhg.a = localBuilder.build();
localdhg.b = localgjb.b("account_name");
Intent localIntent = new Intent("android.intent.action.VIEW", localdhg.a());
ay.a(f(), localIntent, this.ag);
return;
}
}
public final void y()
{
this.aj.a();
}
} |
# <API key>
## Properties
Name | Type | Description | Notes
**kind** | **str** | | [optional]
**path** | **str** | | [optional]
[[Back to Model list]](../README.md#<API key>) [[Back to API list]](../README.md#<API key>) [[Back to README]](../README.md) |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_60-ea) on Mon Jun 27 14:13:42 EDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.ejb3.service.<API key> (WildFly Swarm: Public javadocs 1.0.0.Final API)</title>
<meta name="date" content="2016-06-27">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.wildfly.swarm.config.ejb3.service.<API key> (WildFly Swarm: Public javadocs 1.0.0.Final API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 1.0.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/wildfly/swarm/config/ejb3/service/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Interface org.wildfly.swarm.config.ejb3.service.<API key>" class="title">Uses of Interface<br>org.wildfly.swarm.config.ejb3.service.<API key></h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service"><API key></a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.ejb3">org.wildfly.swarm.config.ejb3</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.ejb3">
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service"><API key></a> in <a href="../../../../../../../org/wildfly/swarm/config/ejb3/package-summary.html">org.wildfly.swarm.config.ejb3</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/ejb3/package-summary.html">org.wildfly.swarm.config.ejb3</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service"><API key></a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/ejb3/TimerService.html" title="type parameter in TimerService">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">TimerService.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/ejb3/TimerService.html#fileDataStore-org.wildfly.swarm.config.ejb3.service.<API key>-">fileDataStore</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service"><API key></a> supplier)</code>
<div class="block">Install a supplied FileDataStore object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../org/wildfly/swarm/config/ejb3/service/<API key>.html" title="interface in org.wildfly.swarm.config.ejb3.service">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 1.0.0.Final</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/wildfly/swarm/config/ejb3/service/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html> |
# AUTOGENERATED FILE
FROM balenalib/<API key>:stretch-build
# remove several traces of debian python
RUN apt-get purge -y python.*
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --batch --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
ENV PYTHON_VERSION 3.6.15
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.3.1
ENV SETUPTOOLS_VERSION 60.5.4
RUN set -x \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.<API key>.2.tar.gz" \
&& echo "<SHA256-like> Python-$PYTHON_VERSION.<API key>.2.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.<API key>.2.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.<API key>.2.tar.gz" \
&& ldconfig \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/<SHA1-like>/get-pip.py" \
&& echo "<SHA256-like> get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv
ENV PYTHON_DBUS_VERSION 1.2.18
# install dbus-python dependencies
RUN apt-get update && apt-get install -y --<API key> \
libdbus-1-dev \
libdbus-glib-1-dev \ |
<?php
require_once(dirname(__FILE__) . "/../autoload.inc.php");
class RP_fileLseekInp extends RODSPacket
{
public function __construct($fileInx = -1, $offset = 0, $whence = 0)
{
$packlets = array("fileInx" => $fileInx, "offset" => $offset,
'whence' => $whence);
parent::__construct("fileLseekInp_PI", $packlets);
}
} |
package org.oep.core.dossiermgt.service.http;
public class <API key> {
} |
package example.repo;
import example.model.Customer553;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface <API key> extends CrudRepository<Customer553, Long> {
List<Customer553> findByLastName(String lastName);
} |
<?php
define('OPERADOR','Operador');
define('OPERADOR_NOMBRE','Nombre');
define('OPERADOR_SIGLA','Sigla');
define('ERROR_OPERADOR','** Debe Seleccionar un operador');
define('<API key>', 'Numero del Contrato');
define('<API key>', 'Valor del Contrato');
?> |
package springing;
public interface Knight {
void embarkOnQuest();
} |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Sat Oct 03 23:38:16 EDT 2015 -->
<title><API key> (btutillib 1.4 API)</title>
<meta name="date" content="2015-10-03">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="<API key> (btutillib 1.4 API)";
}
}
catch(err) {
}
var methods = {"i0":10,"i1":9,"i2":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/devpaul/bluetoothutillib/broadcasts/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<div class="subTitle">com.devpaul.bluetoothutillib.broadcasts</div>
<h2 title="Class <API key>" class="title">Class <API key></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>android.content.BroadcastReceiver</li>
<li>
<ul class="inheritance">
<li>com.devpaul.bluetoothutillib.broadcasts.<API key></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel"><API key></span>
extends android.content.BroadcastReceiver</pre>
<div class="block">Created by Paul Tsouchlos</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><API key>.BroadcastCallback</a></span></code>
<div class="block">Interface for this view.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.android.content.BroadcastReceiver">
</a>
<h3>Nested classes/interfaces inherited from class android.content.BroadcastReceiver</h3>
<code>android.content.BroadcastReceiver.PendingResult</code></li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html#<API key>.devpaul.bluetoothutillib.broadcasts.<API key>.BroadcastCallback-"><API key></a></span>(<a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><API key>.BroadcastCallback</a> callback)</code>
<div class="block"><API key> listens for if bluetooth is enabled.</div>
</td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.summary">
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html#onReceive-android.content.Context-android.content.Intent-">onReceive</a></span>(android.content.Context context,
android.content.Intent intent)</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html" title="class in com.devpaul.bluetoothutillib.broadcasts"><API key></a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html#register-android.content.Context-com.devpaul.bluetoothutillib.broadcasts.<API key>.BroadcastCallback-">register</a></span>(android.content.Context c,
<a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><API key>.BroadcastCallback</a> callback)</code>
<div class="block">Helper method to register this receiver and return it for future unregister.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html#<API key>.content.Context-android.content.BroadcastReceiver-">safeUnregister</a></span>(android.content.Context c,
android.content.BroadcastReceiver receiver)</code>
<div class="block">Helper method to unregister the receiver.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.android.content.BroadcastReceiver">
</a>
<h3>Methods inherited from class android.content.BroadcastReceiver</h3>
<code>abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, <API key>, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
</a>
<h3>Constructor Detail</h3>
<a name="<API key>.devpaul.bluetoothutillib.broadcasts.<API key>.BroadcastCallback-">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4><API key></h4>
<pre>public <API key>(<a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><API key>.BroadcastCallback</a> callback)</pre>
<div class="block"><API key> listens for if bluetooth is enabled.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - the callback to notify when bluetooth is enabled.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.detail">
</a>
<h3>Method Detail</h3>
<a name="onReceive-android.content.Context-android.content.Intent-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>onReceive</h4>
<pre>public void onReceive(android.content.Context context,
android.content.Intent intent)</pre>
<dl>
<dt><span class="<API key>">Specified by:</span></dt>
<dd><code>onReceive</code> in class <code>android.content.BroadcastReceiver</code></dd>
</dl>
</li>
</ul>
<a name="register-android.content.Context-com.devpaul.bluetoothutillib.broadcasts.<API key>.BroadcastCallback-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre>public static <a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.html" title="class in com.devpaul.bluetoothutillib.broadcasts"><API key></a> register(android.content.Context c,
<a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><API key>.BroadcastCallback</a> callback)</pre>
<div class="block">Helper method to register this receiver and return it for future unregister.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - the context.</dd>
<dd><code>callback</code> - the callback to notify when bluetooth is enabled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an instance of the <API key></dd>
</dl>
</li>
</ul>
<a name="<API key>.content.Context-android.content.BroadcastReceiver-">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>safeUnregister</h4>
<pre>public static void safeUnregister(android.content.Context c,
android.content.BroadcastReceiver receiver)</pre>
<div class="block">Helper method to unregister the receiver. Prevents an illegal arguments exception</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - the context where the receiver was registered.</dd>
<dd><code>receiver</code> - the receiver that was previously registered.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../com/devpaul/bluetoothutillib/broadcasts/<API key>.BroadcastCallback.html" title="interface in com.devpaul.bluetoothutillib.broadcasts"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/devpaul/bluetoothutillib/broadcasts/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
</a></div>
</body>
</html> |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <memory>
#include <iomanip>
#include <numeric>
#include <functional>
#include <new>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <climits>
#include <cctype>
#include <ctime>
#define REP(i, n) for(int (i) = 0; i < n; i++)
#define FOR(i, a, n) for(int (i) = a; i < n; i++)
#define FORR(i, a, n) for(int (i) = a; i <= n; i++)
#define for_each(q, s) for(typeof(s.begin()) q=s.begin(); q!=s.end(); q++)
#define sz(n) n.size()
#define pb(n) push_back(n)
#define all(n) n.begin(), n.end()
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; }
int in() { int x; scanf("%d", &x); return x; }
using namespace std;
typedef long long Int;
typedef unsigned uint;
int A, B;
int main(void) {
for ( ; scanf("%d%d", &A, &B) == 2; ) {
printf("%d\n", A + B);
}
return 0;
} |
<?php
namespace Arhitect\View\Adapter;
use Arhitect\Contract\Configuration;
use Arhitect\Contract\ServiceManager;
use Arhitect\Contract\View;
/**
* Class ViewAdapter
*
* @package Arhitect\View\Adapter
*/
class ViewAdapter implements View
{
/**
* @var \Twig_Environment
*/
private $twig;
/**
* @param Configuration $configuration
* @param ServiceManager $serviceManager
*/
public function __construct(Configuration $configuration, ServiceManager $serviceManager)
{
if (!$configuration->get('twig', null)) {
return;
}
$cachePath = $configuration->getApplicationPath() .
DIRECTORY_SEPARATOR .
'storage' .
DIRECTORY_SEPARATOR .
'cache' . DIRECTORY_SEPARATOR;
$options = [];
if ($configuration->get('cache.config.enabled', false)) {
$options[ 'cache' ] = $cachePath;
}
$paths = $configuration->get('twig.paths', []);
foreach ($paths as $offset => $path) {
$paths[ $offset ] = dirname($configuration->getApplicationPath()) .
DIRECTORY_SEPARATOR .
'src' .
DIRECTORY_SEPARATOR .
$path;
}
$loader = new \<API key>($paths);
$this->twig = new \Twig_Environment(
$loader,
$options + $configuration->get('twig.options', [])
);
if (isset($configuration->get('twig.options', [])[ 'debug' ]) && $configuration->get(
'twig.options',
[]
)[ 'debug' ]
) {
$this->twig->addExtension(new \<API key>());
}
foreach ($configuration->get('twig.helpers', []) as $functionName => $helperClass) {
$func = new \Twig_SimpleFunction(
$functionName, function () use ($helperClass, $serviceManager) {
$instance = $serviceManager->load($helperClass);
return <API key>($instance, func_get_args());
}
);
$this->twig->addFunction($func);
}
foreach ($configuration->get('twig.filters', []) as $functionName => $helperClass) {
$func = new \Twig_SimpleFilter(
$functionName, function () use ($helperClass, $serviceManager) {
$instance = $serviceManager->load($helperClass);
return <API key>($instance, func_get_args());
}
);
$this->twig->addFilter($func);
}
}
/**
* @param $name
* @param array $arguments
*
* @return string
*/
public function render($name, array $arguments = [])
{
return $this->twig->render($name, $arguments);
}
} |
import tornado.web
import tornado.gen
import json
import io
import logging
from mickey.basehandler import BaseHandler
from mickey.groups import GroupMgrMgr, MickeyGroup
class AcceptInviteHandler(BaseHandler):
@tornado.web.asynchronous
@tornado.gen.coroutine
def post(self):
data = json.loads(self.request.body.decode("utf-8"))
groupid = data.get("groupid", "")
logging.info("begin to add members to group %s" % groupid)
if not groupid:
logging.error("invalid request")
self.set_status(403)
self.finish()
return
group = yield GroupMgrMgr.getgroup(groupid)
if not group:
logging.error("group %s does not exist" % groupid)
self.set_status(404)
self.finish()
return
rst_code = yield group.add_realmember(self.p_userid)
self.set_status(rst_code)
self.finish() |
namespace Societatis.HAL.Converters
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using Societatis.Misc;
<summary>
Json converter for HAL relation collections.
</summary>
public class <API key> : JsonConverter
{
public override bool CanRead => false;
public override bool CanWrite => true;
<summary>
Provides a value indicating whether the specified object type can be converted with the current
<see cref="JsonConverter" />. Returns true if <see cref="IRelationCollection<T>" /> can be assigned from it.
</summary>
<param name="objectType">The type to convert.</param>
<returns><c>true</c> if the specified type can be converted. Otherwise; <c>false</c>.</returns>
public override bool CanConvert(Type objectType)
{
bool canConvert = false;
if (objectType != null)
{
var objectTypeInfo = objectType.GetTypeInfo();
var genericParameter = objectTypeInfo.<API key>(typeof(IRelationCollection<>))?.SingleOrDefault();
canConvert = objectTypeInfo.IsOfGenericType(typeof(IRelationCollection<>))
&& genericParameter != null
&& !genericParameter.IsGenericParameter;
}
return canConvert;
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
throw new <API key>();
}
<summary>
Writes the JSON representation of the object.
</summary>
<param name="writer">The <see cref="JsonWriter" /> to write to.</param>
<param name="value">The value.</param>
<param name="serializer">The calling serializer.</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.ThrowIfNull(nameof(writer));
serializer.ThrowIfNull(nameof(serializer));
if (value == null)
{
writer.WriteNull();
return;
}
var valueType = value.GetType();
if (!this.CanConvert(valueType))
{
throw new ArgumentException($"Cannot write type '{valueType.FullName}', because it is not a '{typeof(IRelationCollection<>).FullName}'");
}
var genericArgumentType = valueType.GetTypeInfo().<API key>(typeof(IRelationCollection<>)).SingleOrDefault();
if (genericArgumentType == null)
{
throw new ArgumentException($"No generic argument type found for interface {typeof(IRelationCollection<>).Name}.");
}
var relationTypeInfo = typeof(IRelation<>).MakeGenericType(genericArgumentType).GetTypeInfo();
var relationProperty = relationTypeInfo.GetDeclaredProperty(nameof(IRelation<dynamic>.Relation));
var isSingularProperty = relationTypeInfo.GetDeclaredProperty(nameof(IRelation<dynamic>.IsSingular));
var itemsProperty = relationTypeInfo.GetDeclaredProperty(nameof(IRelation<dynamic>.Items));
writer.WriteStartObject();
foreach (var relation in (value as IEnumerable))
{
writer.WritePropertyName((string)relationProperty.GetValue(relation));
var items = (IEnumerable)itemsProperty.GetValue(relation);
if ((bool)isSingularProperty.GetValue(relation))
{
var item = items.Cast<object>().SingleOrDefault();
serializer.Serialize(writer, item);
}
else
{
serializer.Serialize(writer, items);
}
}
writer.WriteEndObject();
}
}
} |
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" />
<link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/>
<link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/>
<!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]-->
<style type="text/css" media="all">
@import url('../../../../../style.css');
@import url('../../../../../tree.css');
</style>
<script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script>
<script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script>
<script src="../../../../../package-nodes-tree.js" type="text/javascript"></script>
<script src="../../../../../clover-tree.js" type="text/javascript"></script>
<script src="../../../../../clover.js" type="text/javascript"></script>
<script src="../../../../../clover-descriptions.js" type="text/javascript"></script>
<script src="../../../../../cloud.js" type="text/javascript"></script>
<title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title>
</head>
<body>
<div id="page">
<header id="header" role="banner">
<nav class="aui-header <API key>" role="navigation">
<div class="aui-header-inner">
<div class="aui-header-primary">
<h1 id="logo" class="aui-header-logo <API key>">
<a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a>
</h1>
</div>
<div class="<API key>">
<ul class="aui-nav">
<li id="system-help-menu">
<a class="aui-nav-link" title="Open online documentation" target="_blank"
href="http://openclover.org/documentation">
<span class="aui-icon aui-icon-small aui-iconfont-help"> Help</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="aui-page-panel">
<div class="<API key>">
<div class="aui-page-panel-nav <API key>">
<div class="<API key>" style="margin-bottom: 20px;">
<div class="<API key>">
<a href="http://cardatechnologies.com" target="_top">
<div class="aui-avatar aui-avatar-large aui-avatar-project">
<div class="aui-avatar-inner">
<img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/>
</div>
</div>
</a>
</div>
<div class="<API key>" >
<h1>
<a href="http://cardatechnologies.com" target="_top">
ABA Route Transit Number Validator 1.0.1-SNAPSHOT
</a>
</h1>
</div>
</div>
<nav class="aui-navgroup <API key>">
<div class="aui-navgroup-inner">
<ul class="aui-nav">
<li class="">
<a href="../../../../../dashboard.html">Project overview</a>
</li>
</ul>
<div class="aui-nav-heading <API key>">
<strong>Packages</strong>
</div>
<div class="aui-nav project-packages">
<form method="get" action="#" class="aui <API key>">
<input type="text" autocomplete="off" class="package-filter text"
placeholder="Type to filter packages..." name="package-filter" id="package-filter"
title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/>
</form>
<p class="<API key> hidden">
<small>No results found.</small>
</p>
<div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator">
<div class="<API key>"></div>
<div class="<API key>"></div>
</div>
</div>
</div>
</nav> </div>
<section class="<API key>">
<div class="<API key>">
<div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs">
<li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li>
<li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li>
<li><a href="<API key>.html">Class <API key></a></li>
</ol></div>
<h1 class="aui-h2-clover">
Test <API key>
</h1>
<table class="aui">
<thead>
<tr>
<th>Test</th>
<th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th>
<th><label title="When the test execution was started">Start time</label></th>
<th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th>
<th><label title="A failure or error message if the test is not successful.">Message</label></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=19947#src-19947" ><API key></a>
</td>
<td>
<span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span>
</td>
<td>
7 Aug 12:44:35
</td>
<td>
0.0 </td>
<td>
<div></div>
<div class="errorMessage"></div>
</td>
</tr>
</tbody>
</table>
<div> </div>
<table class="aui aui-table-sortable">
<thead>
<tr>
<th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th>
<th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/<API key>.html?id=22805#<API key>" title="<API key>" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=22805#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a>
</td>
<td>
<span class="sortValue">0.5714286</span>57.1%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td>
</tr>
<tr>
<td>
<span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span>
  <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=22805#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a>
</td>
<td>
<span class="sortValue">0.29411766</span>29.4%
</td>
<td class="align-middle" style="width: 100%" colspan="3">
<div>
<div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td>
</tr>
</tbody>
</table>
</div> <!-- class="<API key>" -->
<footer id="footer" role="contentinfo">
<section class="footer-body">
<ul>
<li>
Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1
on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT.
</li>
</ul>
<ul>
<li>OpenClover is free and open-source software. </li>
</ul>
</section>
</footer> </section> <!-- class="<API key>" -->
</div> <!-- class="<API key>" -->
</div> <!-- class="aui-page-panel" -->
</div> <!-- id="page" -->
</body>
</html> |
<div class="p-h-md p-v bg-white box-shadow pos-rlt">
<div class="pull-right hidden-xs w">
<div class="input-group">
<span class="input-group-btn">
<button type="submit" class="btn btn-sm no-bg btn-icon no-shadow no-padder"><i class="ti-search"></i></button>
</span>
<input type="text" class="form-control input-sm no-bg no-border" placeholder="Search...">
</div>
</div>
<h3 class="no-margin">Welcome</h3>
</div>
<div class="p-md">
<div class="row">
<div class="col-sm-4">
<div class="panel b-light">
<div class="panel-heading p-v-xs p-h-sm">
<span class="pull-right">80%</span>
Total Earnings
</div>
<div class="progress progress-xxxs no-margin no-radius bg-white">
<div class="progress-bar bg-light" style="width:80%"></div>
</div>
<div class="panel-body p-sm">
<div class="pull-left pull-none-sm p-h text-center m-r-xs">
<div class="inline">
<div ui-jp="easyPieChart" ui-options="{
percent:80,
lineWidth: 5,
trackColor: '#fff',
barColor: '{{app.color.light}}',
scaleColor: '#fff',
size: 65,
lineCap: 'butt',
color: '{{app.color.success}}',
animate: 3000
}">
<div class="text-white">
80%
</div>
</div>
</div>
</div>
<div class="clear">
<div class="text-2x font-bold">432,000</div>
<small class="text-muted">Caculated in 19:30 Thu</small>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel b-light">
<div class="panel-heading p-v-xs p-h-sm">
<span class="pull-right">20%</span>
New Visits
</div>
<div class="progress progress-xxxs no-margin no-radius bg-white">
<div class="progress-bar bg-light" style="width:20%"></div>
</div>
<div class="panel-body p-sm">
<div class="pull-left pull-none-sm p-h text-center m-r-xs">
<div ui-jp="easyPieChart" ui-options="{
percent:20,
lineWidth: 5,
trackColor: '{{app.color.light}}',
barColor: '{{app.color.info}}',
scaleColor: '#fff',
size: 65,
lineCap: 'butt',
color: '{{app.color.inverse}}',
animate: 3000
}">
<div class="text-white">
20%
</div>
</div>
</div>
<div class="clear">
<div class="text-2x font-bold">386,000</div>
<small class="text-muted">Peaked at 14:30 Mon</small>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel b-light">
<div class="panel-heading p-v-xs p-h-sm">
<span class="pull-right">50%</span>
Helpdesk
</div>
<div class="progress progress-xxxs no-margin no-radius bg-white">
<div class="progress-bar bg-light no-radius" style="width:50%"></div>
</div>
<div class="panel-body p-sm">
<div class="pull-left pull-none-sm p-h text-center m-r-xs">
<div ui-jp="easyPieChart" ui-options="{
percent: 50,
lineWidth: 28,
trackColor: '#fff',
barColor: '{{app.color.info}}',
scaleColor: '#fff',
size: 65,
lineCap: 'butt',
rotate: 90,
animate: 5000
}">
<div class="text-black">
50%
</div>
</div>
</div>
<div class="clear">
<div class="text-2x font-bold">96,000</div>
<small class="text-dk">Questions scheduled</small>
</div>
</div>
</div>
</div>
</div>
<div class="row" ng-controller="ChartCtrl">
<div class="col-md-8">
<div class="panel b-light">
<div class="panel-heading">
<label class="ui-switch bg-inverse pull-right" ng-init="showData=true">
<input type="checkbox" ng-model="showData">
<i></i>
</label>
<span>Sell monitor</span> <i class="fa fa-caret-up text-success"></i><span class="text-xs text-muted m-l-xs">1.5%</span>
</div>
<div class="panel-body">
<div ui-jp="plot" ui-refresh="showData" ui-options="
[
{
data: {{plot_line}},
points: { show: true, radius: 4, lineWidth: 3, fillColor: 'rgba(18,147,204,0.5)'},
lines: { show: true, lineWidth: 0, fill: 0.5, fillColor: 'rgba(18,147,204,0.5)' },
color:'#fff'
},
{
data: {{plot_line_3}},
points: { show: true, radius: 4, lineWidth: 3, fillColor: 'rgba(166,107,238,0.5)'},
lines: { show: true, lineWidth: 0, fill: 0.5, fillColor: 'rgba(166,107,238,0.5)' },
color:'#fff'
}
],
{
series: { shadowSize: 0 },
xaxis: { show: true, font: { color: '#ccc' }, position: 'bottom' },
yaxis:{ show: true, font: { color: '#ccc' }},
grid: { hoverable: true, clickable: true, borderWidth: 0, color: '#ccc' },
tooltip: true,
tooltipOpts: { content: '%x.0 is %y.4', defaultTheme: false, shifts: { x: 0, y: -40 } }
}
" style="height:240px" >
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel b-light">
<div class="panel-heading">
<a href=""></a>
Total revenue of this month
</div>
<div style="margin: 0 -2px">
<div ui-jp="plot" ui-options="
[
{ data: {{plot_line_1}}, points: { show: true, radius: 0}, splines: { show: true, tension: 0.45, lineWidth: 1, fill: 0.2 } },
{ data: {{plot_line_2}}, points: { show: true, radius: 0}, splines: { show: true, tension: 0.45, lineWidth: 1, fill: 1 } }
],
{
colors: ['{{app.color.success}}', '{{app.color.inverse}}'],
series: { shadowSize: 3 },
xaxis: { show: false, font: { color: '#ccc' }, position: 'bottom' },
yaxis:{ show: false, font: { color: '#ccc' }},
grid: { hoverable: true, clickable: true, borderWidth: 0, color: '#ccc' },
tooltip: true,
tooltipOpts: { content: '%x.0 is %y.4', defaultTheme: false, shifts: { x: 0, y: -40 } }
}
" style="height:175px" >
</div>
</div>
<div class="panel-footer bg-inverse no-b-t">
<div class="box">
<div class="box-col p-md">
<span class="text-xl text-lt">$30,343 <i class="fa fa-caret-up text-muted"></i></span>
</div>
<div class="box-col text-right p-md w-xs">
<div ng-init="data1=[60,40]" ui-jp="sparkline" ui-options="{{data1}}, {type:'pie', height:35, sliceColors:['{{app.color.dark}}','#fff']}" class="sparkline inline"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box b-a bg-white m-b" ng-controller="VectorMapCtrl">
<div class="col-md-8">
<div class="panel-heading b-b b-light">World Market</div>
<div class="panel-body">
<p class="m-b-lg text-muted">Many maps of the world, world regions, countries and cities are available for download from <a href="http:
<div class="m-b-lg" style="height:240px;" ui-jp="vectorMap" ui-options="{
map: 'world_mill_en',
markers: {{world_markers}},
normalizeFunction: 'polynomial',
backgroundColor: '#fff',
regionsSelectable: true,
markersSelectable: true,
regionStyle: {
initial: {
fill: '{{app.color.light}}'
},
hover: {
fill: '{{app.color.info}}',
stroke: '#fff'
},
},
markerStyle: {
initial: {
fill: '{{app.color.info}}',
stroke: '#fff'
},
hover: {
fill: '{{app.color.primary}}',
stroke: '#fff'
}
},
series: {
markers: [{
attribute: 'fill',
scale: ['{{app.color.primary}}','{{app.color.inverse}}', '{{app.color.success}}'],
values: {{cityAreaData}}
},{
attribute: 'r',
scale: [5, 20],
values: {{cityAreaData}}
}]
}
}" >
</div>
</div>
</div>
<div class="col-md-4 b-l no-border-sm">
<div class="panel-heading b-b b-light">Infomation</div>
<div class="list-group no-border no-radius">
<div class="list-group-item">
<span class="pull-right">293,200</span>
<i class="fa fa-fw fa-circle text-info"></i>
Vatican City
</div>
<div class="list-group-item">
<span class="pull-right">203,000</span>
<i class="fa fa-fw fa-circle text-success"></i>
San Marino
</div>
<div class="list-group-item">
<span class="pull-right">180,230</span>
<i class="fa fa-fw fa-circle text-inverse"></i>
Marshall Islands
</div>
<div class="list-group-item">
<span class="pull-right">130,100</span>
<i class="fa fa-fw fa-circle text-inverse-lt"></i>
Maldives
</div>
<div class="list-group-item">
<span class="pull-right">98,000</span>
<i class="fa fa-fw fa-circle text-primary"></i>
Palau
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h5 class="no-margin m-b">Members</h5>
<ul class="list-group list-group-md">
<li class="list-group-item">
<a href class="pull-left w-thumb m-r b-b b-b-2x b-success"><img src="images/a1.jpg" class="img-responsive"></a>
<div class="clear">
<a href class="font-bold block">Jonathan Doe</a>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</li>
<li class="list-group-item">
<a href class="pull-left w-thumb m-r b-b b-b-2x b-success"><img src="images/a2.jpg" class="img-responsive"></a>
<div class="clear">
<a href class="font-bold block">Jack Michale</a>
Sectetur adipiscing elit
</div>
</li>
<li class="list-group-item">
<a href class="pull-left w-thumb m-r b-b b-b-2x b-warning"><img src="images/a3.jpg" class="img-responsive"></a>
<div class="clear">
<a href class="font-bold block">Jessi</a>
Sectetur adipiscing elit
</div>
</li>
<li class="list-group-item">
<a href class="pull-left w-thumb m-r b-b b-b-2x"><img src="images/a4.jpg" class="img-responsive"></a>
<div class="clear">
<a href class="font-bold block">Sodake</a>
Vestibulum ullamcorper sodales nisi nec condimentum
</div>
</li>
</ul>
</div>
<div class="col-sm-6">
<h5 class="no-margin m-b">Feeds</h5>
<div class="list-group list-group-gap">
<a href class="list-group-item b-l-inverse">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</a>
<a href class="list-group-item b-l-success">
Morbi id neque quam. Aliquam sollicitudin venenatis ipsum ac feugia
</a>
<a href class="list-group-item b-l-dark">
Vestibulum ullamcorper sodales nisi nec condimentum
</a>
<a href class="list-group-item b-l-warning">
Sollicitudin venenatis ipsum ac
</a>
<a href class="list-group-item b-l-info">
Donec eleifend condimentum nisl eu consectetur. Integer eleifend
</a>
<a href class="list-group-item b-l-primary">
Lectus arcu malesuada sem
</a>
</div>
</div>
</div>
</div> |
"""The airvisual component."""
import asyncio
from datetime import timedelta
from math import ceil
from pyairvisual import CloudAPI, NodeSamba
from pyairvisual.errors import (
AirVisualError,
InvalidKeyError,
KeyExpiredError,
NodeProError,
)
from homeassistant.config_entries import SOURCE_REAUTH
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_API_KEY,
CONF_IP_ADDRESS,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_PASSWORD,
CONF_SHOW_ON_MAP,
CONF_STATE,
)
from homeassistant.core import callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client, config_validation as cv
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
<API key>,
UpdateFailed,
)
from .const import (
CONF_CITY,
CONF_COUNTRY,
CONF_GEOGRAPHIES,
<API key>,
DATA_COORDINATOR,
DOMAIN,
<API key>,
<API key>,
<API key>,
LOGGER,
)
PLATFORMS = ["air_quality", "sensor"]
DATA_LISTENER = "listener"
DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
<API key> = timedelta(minutes=1)
CONFIG_SCHEMA = cv.deprecated(DOMAIN)
@callback
def <API key>(geography_dict):
"""Generate a unique ID from a geography dict."""
if not geography_dict:
return
if CONF_CITY in geography_dict:
return ", ".join(
(
geography_dict[CONF_CITY],
geography_dict[CONF_STATE],
geography_dict[CONF_COUNTRY],
)
)
return ", ".join(
(str(geography_dict[CONF_LATITUDE]), str(geography_dict[CONF_LONGITUDE]))
)
@callback
def <API key>(hass, api_key, num_consumers):
"""Get a leveled scan interval for a particular cloud API key.
This will shift based on the number of active consumers, thus keeping the user
under the monthly API limit.
"""
# Assuming 10,000 calls per month and a "smallest possible month" of 28 days; note
# that we give a buffer of 1500 API calls for any drift, restarts, etc.:
<API key> = ceil(1 / (8500 / 28 / 24 / 60 / num_consumers))
LOGGER.debug(
"Leveling API key usage (%s): %s consumers, %s minutes between updates",
api_key,
num_consumers,
<API key>,
)
return timedelta(minutes=<API key>)
@callback
def <API key>(hass, api_key):
"""Get all <API key> objects related to a particular API key."""
coordinators = []
for entry_id, coordinator in hass.data[DOMAIN][DATA_COORDINATOR].items():
config_entry = hass.config_entries.async_get_entry(entry_id)
if config_entry.data.get(CONF_API_KEY) == api_key:
coordinators.append(coordinator)
return coordinators
@callback
def <API key>(hass, api_key):
"""Sync the update interval for geography-based data coordinators (by API key)."""
coordinators = <API key>(hass, api_key)
if not coordinators:
return
update_interval = <API key>(
hass, api_key, len(coordinators)
)
for coordinator in coordinators:
LOGGER.debug(
"Updating interval for coordinator: %s, %s",
coordinator.name,
update_interval,
)
coordinator.update_interval = update_interval
async def async_setup(hass, config):
"""Set up the AirVisual component."""
hass.data[DOMAIN] = {DATA_COORDINATOR: {}, DATA_LISTENER: {}}
return True
@callback
def <API key>(hass, config_entry):
"""Ensure that geography config entries have appropriate properties."""
entry_updates = {}
if not config_entry.unique_id:
# If the config entry doesn't already have a unique ID, set one:
entry_updates["unique_id"] = config_entry.data[CONF_API_KEY]
if not config_entry.options:
# If the config entry doesn't already have any options set, set defaults:
entry_updates["options"] = {CONF_SHOW_ON_MAP: True}
if config_entry.data.get(<API key>) not in [
<API key>,
<API key>,
]:
# If the config entry data doesn't contain an integration type that we know
# about, infer it from the data we have:
entry_updates["data"] = {**config_entry.data}
if CONF_CITY in config_entry.data:
entry_updates["data"][
<API key>
] = <API key>
else:
entry_updates["data"][
<API key>
] = <API key>
if not entry_updates:
return
hass.config_entries.async_update_entry(config_entry, **entry_updates)
@callback
def <API key>(hass, config_entry):
"""Ensure that Node/Pro config entries have appropriate properties."""
entry_updates = {}
if <API key> not in config_entry.data:
# If the config entry data doesn't contain the integration type, add it:
entry_updates["data"] = {
**config_entry.data,
<API key>: <API key>,
}
if not entry_updates:
return
hass.config_entries.async_update_entry(config_entry, **entry_updates)
async def async_setup_entry(hass, config_entry):
"""Set up AirVisual as config entry."""
if CONF_API_KEY in config_entry.data:
<API key>(hass, config_entry)
websession = aiohttp_client.<API key>(hass)
cloud_api = CloudAPI(config_entry.data[CONF_API_KEY], session=websession)
async def async_update_data():
"""Get new data from the API."""
if CONF_CITY in config_entry.data:
api_coro = cloud_api.air_quality.city(
config_entry.data[CONF_CITY],
config_entry.data[CONF_STATE],
config_entry.data[CONF_COUNTRY],
)
else:
api_coro = cloud_api.air_quality.nearest_city(
config_entry.data[CONF_LATITUDE],
config_entry.data[CONF_LONGITUDE],
)
try:
return await api_coro
except (InvalidKeyError, KeyExpiredError):
matching_flows = [
flow
for flow in hass.config_entries.flow.async_progress()
if flow["context"]["source"] == SOURCE_REAUTH
and flow["context"]["unique_id"] == config_entry.unique_id
]
if not matching_flows:
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN,
context={
"source": SOURCE_REAUTH,
"unique_id": config_entry.unique_id,
},
data=config_entry.data,
)
)
return {}
except AirVisualError as err:
raise UpdateFailed(f"Error while retrieving data: {err}") from err
coordinator = <API key>(
hass,
LOGGER,
name=<API key>(config_entry.data),
# We give a placeholder update interval in order to create the coordinator;
# then, below, we use the coordinator's presence (along with any other
# coordinators using the same API key) to calculate an actual, leveled
# update interval:
update_interval=timedelta(minutes=5),
update_method=async_update_data,
)
<API key>(
hass, config_entry.data[CONF_API_KEY]
)
# Only geography-based entries have options:
hass.data[DOMAIN][DATA_LISTENER][
config_entry.entry_id
] = config_entry.add_update_listener(async_reload_entry)
else:
<API key>(hass, config_entry)
async def async_update_data():
"""Get new data from the API."""
try:
async with NodeSamba(
config_entry.data[CONF_IP_ADDRESS], config_entry.data[CONF_PASSWORD]
) as node:
return await node.<API key>()
except NodeProError as err:
raise UpdateFailed(f"Error while retrieving data: {err}") from err
coordinator = <API key>(
hass,
LOGGER,
name="Node/Pro data",
update_interval=<API key>,
update_method=async_update_data,
)
await coordinator.async_refresh()
if not coordinator.last_update_success:
raise ConfigEntryNotReady
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
for platform in PLATFORMS:
hass.async_create_task(
hass.config_entries.<API key>(config_entry, platform)
)
return True
async def async_migrate_entry(hass, config_entry):
"""Migrate an old config entry."""
version = config_entry.version
LOGGER.debug("Migrating from version %s", version)
# 1 -> 2: One geography per config entry
if version == 1:
version = config_entry.version = 2
# Update the config entry to only include the first geography (there is always
# guaranteed to be at least one):
geographies = list(config_entry.data[CONF_GEOGRAPHIES])
first_geography = geographies.pop(0)
first_id = <API key>(first_geography)
hass.config_entries.async_update_entry(
config_entry,
unique_id=first_id,
title=f"Cloud API ({first_id})",
data={CONF_<TwitterConsumerkey>.data[CONF_API_KEY], **first_geography},
)
# For any geographies that remain, create a new config entry for each one:
for geography in geographies:
if CONF_LATITUDE in geography:
source = "geography_by_coords"
else:
source = "geography_by_name"
hass.async_create_task(
hass.config_entries.flow.async_init(
DOMAIN,
context={"source": source},
data={CONF_<TwitterConsumerkey>.data[CONF_API_KEY], **geography},
)
)
LOGGER.info("Migration to version %s successful", version)
return True
async def async_unload_entry(hass, config_entry):
"""Unload an AirVisual config entry."""
unload_ok = all(
await asyncio.gather(
*[
hass.config_entries.<API key>(config_entry, platform)
for platform in PLATFORMS
]
)
)
if unload_ok:
hass.data[DOMAIN][DATA_COORDINATOR].pop(config_entry.entry_id)
remove_listener = hass.data[DOMAIN][DATA_LISTENER].pop(config_entry.entry_id)
remove_listener()
if (
config_entry.data[<API key>]
== <API key>
):
# Re-calculate the update interval period for any remaining consumers of
# this API key:
<API key>(
hass, config_entry.data[CONF_API_KEY]
)
return unload_ok
async def async_reload_entry(hass, config_entry):
"""Handle an options update."""
await hass.config_entries.async_reload(config_entry.entry_id)
class AirVisualEntity(CoordinatorEntity):
"""Define a generic AirVisual entity."""
def __init__(self, coordinator):
"""Initialize."""
super().__init__(coordinator)
self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
self._icon = None
self._unit = None
@property
def <API key>(self):
"""Return the device state attributes."""
return self._attrs
@property
def icon(self):
"""Return the icon."""
return self._icon
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return self._unit
async def async_added_to_hass(self):
"""Register callbacks."""
@callback
def update():
"""Update the state."""
self.<API key>()
self.<API key>()
self.async_on_remove(self.coordinator.async_add_listener(update))
self.<API key>()
@callback
def <API key>(self):
"""Update the entity from the latest data."""
raise NotImplementedError |
import java.util.*;
public class Main {
static final int MAX = 1000000000;
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int h = sc.nextInt();
int[][] b = new int[h+2][w+2];
int[][] l = new int[h+2][w+2];
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
b[i][j] = sc.nextInt();
}
}
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
l[i][j] = MAX;
}
}
while(true){
boolean end = true;
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
if(l[i][j]>b[i][j]){
if(l[i][j]>l[i-1][j]){
l[i][j] = Math.max(l[i-1][j], b[i][j]);
end = false;
}
if(l[i][j]>l[i+1][j]){
l[i][j] = Math.max(l[i+1][j], b[i][j]);
end = false;
}
if(l[i][j]>l[i][j-1]){
l[i][j] = Math.max(l[i][j-1], b[i][j]);
end = false;
}
if(l[i][j]>l[i][j+1]){
l[i][j] = Math.max(l[i][j+1], b[i][j]);
end = false;
}
}
}
}
if(end) break;
for(int j=w;j>=1;j
for(int i=h;i>=1;i
if(l[i][j]>b[i][j]){
if(l[i][j]>l[i-1][j]){
l[i][j] = Math.max(l[i-1][j], b[i][j]);
end = false;
}
if(l[i][j]>l[i+1][j]){
l[i][j] = Math.max(l[i+1][j], b[i][j]);
end = false;
}
if(l[i][j]>l[i][j-1]){
l[i][j] = Math.max(l[i][j-1], b[i][j]);
end = false;
}
if(l[i][j]>l[i][j+1]){
l[i][j] = Math.max(l[i][j+1], b[i][j]);
end = false;
}
}
}
}
if(end) break;
}
long sum = 0;
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
sum += l[i][j] - b[i][j];
}
}
System.out.println(sum);
}
} |
FROM alpine:3.12
MAINTAINER Frank Celler <info@arangodb.com>
ENV ARANGO_VERSION 3.7.16
ENV ARANGO_URL https://download.arangodb.com/arangodb37/DEBIAN/amd64
ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
ENV <API key> ${ARANGO_PACKAGE_URL}.asc
# see
RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn && \
yarn global add foxx-cli && \
apk del yarn && \
gpg --batch --keyserver keys.openpgp.org --recv-keys <API key> && \
mkdir /<API key>.d && \
cd /tmp && \
wget ${<API key>} && \
wget ${ARANGO_PACKAGE_URL} && \
gpg --verify ${ARANGO_PACKAGE}.asc && \
ar x ${ARANGO_PACKAGE} data.tar.gz && \
tar -C / -x -z -f data.tar.gz && \
sed -ri \
-e 's!127\.0\.0\.1!0.0.0.0!g' \
-e 's!^(file\s*=\s*).*!\1 -!' \
-e 's!^\s*uid\s*=.*!!' \
/etc/arangodb3/arangod.conf && \
chgrp -R 0 /var/lib/arangodb3 /var/lib/arangodb3-apps && \
chmod -R 775 /var/lib/arangodb3 /var/lib/arangodb3-apps && \
rm -f /usr/bin/foxx && \
rm -f ${ARANGO_PACKAGE}* data.tar.gz && \
apk del gnupg
# Note that Openshift runs containers by default with a random UID and GID 0.
# We need that the database and apps directory are writable for this config.
ENV GLIBCXX_FORCE_NEW=1
# retain the database directory and the Foxx Application directory
VOLUME ["/var/lib/arangodb3", "/var/lib/arangodb3-apps"]
COPY docker-entrypoint.sh /entrypoint.sh
COPY docker-foxx.sh /usr/bin/foxx
ENTRYPOINT ["/entrypoint.sh"]
# standard port
EXPOSE 8529
CMD ["arangod"] |
#include "v3p_f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
extern double erfc();
double derfc_(x) doublereal *x;
#else
extern double erfc(double);
double derfc_(doublereal *x)
#endif
{
return( erfc(*x) );
}
#ifdef __cplusplus
}
#endif |
package middleware
import (
"fmt"
"reflect"
"sort"
"strconv"
"strings"
"go-common/library/log"
)
const (
//TypeMiddleAll
TypeMiddleAll = int8(0)
//TypeMiddleEncode
TypeMiddleEncode = int8(1)
//TypeMiddleDecode
TypeMiddleDecode = int8(2)
)
//Aggregate
type Aggregate struct {
Hitn string `json:"hitn"` //name.
Hitv string `json:"hitv"`
Mapn string `json:"mapn"` //hitname
Mapv string `json:"mapv"`
Delimiter string `json:"delimiter"`
Order int64 `json:"order"`
Type int8 `json:"type"`
}
func (f *Aggregate) Process(data interface{}, encode bool) {
var (
field, fieldm reflect.Value
fieldExist, hited bool
)
defer func() {
if errs := recover(); errs != nil {
log.Error("Aggregate Process error(%+v)", errs)
}
}()
hitn := f.Hitn
hitv := strings.Split(f.Hitv, f.Delimiter)
mapn := f.Mapn
mapv := f.Mapv
if !encode {
hitn = f.Mapn
hitv = strings.Split(f.Mapv, f.Delimiter)
mapn = f.Hitn
mapv = f.Hitv
}
//check fields exist
fv := reflect.ValueOf(data)
if field, fieldExist = getFieldByName(fv, hitn); !fieldExist {
log.Warn("no field for hit(%s) data(%+v)", hitn, data)
return
}
if mapn == hitn {
fieldm = field
} else if fieldm, fieldExist = getFieldByName(fv, mapn); !fieldExist || !fieldm.CanSet() {
log.Warn("no field for map(%s) data(%+v)", mapn, data)
return
}
fieldv := fmt.Sprintf("%v", field.Interface())
for _, hit := range hitv {
if fieldv == hit {
hited = true
break
}
}
if !hited {
return
}
log.Info("got hit field(%s) value(%s) config(%+v)", hitn, fieldv, f)
switch fieldm.Kind() {
case reflect.String:
fieldm.SetString(mapv)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
vv, err := strconv.ParseInt(mapv, 10, 64)
if err != nil {
log.Error("strconv.ParseInt(%s) error(%v)", mapv, err)
return
}
fieldm.SetInt(vv)
default:
log.Warn("not support field.kind(%s) for field(%s)", fieldm.Kind().String(), mapn)
}
}
//getFieldByName struct
func getFieldByName(v reflect.Value, name string) (res reflect.Value, ok bool) {
tp := v.Type()
if tp.Kind() == reflect.Ptr {
v = v.Elem()
tp = tp.Elem()
}
if tp.Kind() != reflect.Struct || !v.IsValid() {
return
}
for i := 0; i < tp.NumField(); i++ {
fn := strings.ToLower(tp.Field(i).Name)
if fn == name {
res = v.Field(i)
ok = true
return
}
if vres, vok := getFieldByName(v.Field(i), name); vok {
ok = vok
res = vres
return
}
}
return
}
//MiddleAggregate
type MiddleAggregate struct {
Cfg []*Aggregate
Encode bool
}
//Process handle multi aggregate logists
func (m *MiddleAggregate) Process(data interface{}) {
cfgs := []*Aggregate{}
for _, item := range m.Cfg {
if item.Type == TypeMiddleAll || (m.Encode && item.Type == TypeMiddleEncode) || (!m.Encode && item.Type == TypeMiddleDecode) {
cfgs = append(cfgs, item)
}
}
if len(cfgs) == 0 {
return
}
sort.Sort(AggregateArr(cfgs))
for _, item := range cfgs {
item.Process(data, m.Encode)
}
}
//AggregateArr arr
type AggregateArr []*Aggregate
//Len .
func (f AggregateArr) Len() int {
return len(f)
}
//Less .
func (f AggregateArr) Less(i, j int) bool {
return f[i].Order < f[j].Order
}
//Swap .
func (f AggregateArr) Swap(i, j int) {
f[i], f[j] = f[j], f[i]
} |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_05) on Thu Sep 11 15:40:10 CEST 2014 -->
<title>Overview</title>
<meta name="date" content="2014-09-11">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Overview";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li class="navBarCell1Rev">Overview</li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?overview-summary.html" target="_top">Frames</a></li>
<li><a href="overview-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="contentContainer">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Packages table, listing packages, and an explanation">
<caption><span>Packages</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="org/bencodej/package-summary.html">org.bencodej</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="org/bencodej/exception/package-summary.html">org.bencodej.exception</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li class="navBarCell1Rev">Overview</li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?overview-summary.html" target="_top">Frames</a></li>
<li><a href="overview-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
</body>
</html> |
#include "TorEnclave_t.h"
#define REPLAYCACHE_PRIVATE
#include "orconfig.h"
#include "or.h"
#include "replaycache.h"
#include "test.h"
static const char *test_buffer =
"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed do eiusmod"
" tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim"
" veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea"
" commodo consequat. Duis aute irure dolor in reprehenderit in voluptate"
" velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint"
" occaecat cupidatat non proident, sunt in culpa qui officia deserunt"
" mollit anim id est laborum.";
static void
<API key>(void)
{
replaycache_t *r = NULL;
r = replaycache_new(600, 300);
test_assert(r != NULL);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
/* Negative horizon should fail */
r = replaycache_new(-600, 300);
test_assert(r == NULL);
/* Negative interval should get adjusted to zero */
r = replaycache_new(600, -300);
test_assert(r != NULL);
test_eq(r->scrub_interval, 0);
replaycache_free(r);
/* Negative horizon and negative interval should still fail */
r = replaycache_new(-600, -300);
test_assert(r == NULL);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_free(NULL);
/* Assert that we're here without horrible death */
test_assert(1);
done:
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
r = replaycache_new(600, 300);
test_assert(r != NULL);
result =
<API key>(1200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
/* poke the bad-parameter error case too */
result =
<API key>(1200, NULL, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
r = replaycache_new(600, 300);
test_assert(r != NULL);
result =
<API key>(1200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
result =
<API key>(1300, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 1);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
r = replaycache_new(600, 300);
test_assert(r != NULL);
result =
<API key>(1200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
result =
<API key>(1300, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 1);
result =
<API key>(3000, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
time_t elapsed;
r = replaycache_new(600, 300);
test_assert(r != NULL);
result =
<API key>(1200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
result =
<API key>(1300, r, test_buffer,
strlen(test_buffer), &elapsed);
test_eq(result, 1);
test_eq(elapsed, 100);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
r = replaycache_new(0, 0);
test_assert(r != NULL);
result =
<API key>(1200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
result =
<API key>(1300, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 1);
result =
<API key>(3000, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 1);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
r = replaycache_new(600, 300);
test_assert(r != NULL);
/* Set up like in <API key>() */
result =
<API key>(100, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 0);
result =
<API key>(200, r, test_buffer,
strlen(test_buffer), NULL);
test_eq(result, 1);
/*
* Poke a few <API key>() error cases that
* can't happen through <API key>()
*/
/* Null cache */
<API key>(300, NULL);
/* Assert we're still here */
test_assert(1);
/* Make sure we hit the aging-out case too */
<API key>(1500, r);
/* Assert that we aged it */
test_eq(digestmap_size(r->digests_seen), 0);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
int result;
time_t elapsed = 0;
r = replaycache_new(600, 300);
test_assert(r != NULL);
/* Set up like in <API key>() */
result =
<API key>(100, r, test_buffer,
strlen(test_buffer), &elapsed);
test_eq(result, 0);
/* elapsed should still be 0, since it wasn't written */
test_eq(elapsed, 0);
result =
<API key>(200, r, test_buffer,
strlen(test_buffer), &elapsed);
test_eq(result, 1);
/* elapsed should be the time since the last hit */
test_eq(elapsed, 100);
/*
* Now let's turn the clock back to get coverage on the cache entry from the
* future <API key> case.
*/
result =
<API key>(150, r, test_buffer,
strlen(test_buffer), &elapsed);
/* We should still get a hit */
test_eq(result, 1);
/* ...but it shouldn't let us see a negative elapsed time */
test_eq(elapsed, 0);
done:
if (r) replaycache_free(r);
return;
}
static void
<API key>(void)
{
replaycache_t *r = NULL;
/*
* Negative so we fail if <API key>() doesn't
* write to elapsed.
*/
time_t elapsed = -1;
int result;
/* Test the realtime as well as *_internal() entry points */
r = replaycache_new(600, 300);
test_assert(r != NULL);
/* This should miss */
result =
<API key>(r, test_buffer, strlen(test_buffer));
test_eq(result, 0);
/* This should hit */
result =
<API key>(r, test_buffer, strlen(test_buffer));
test_eq(result, 1);
/* This should hit and return a small elapsed time */
result =
<API key>(r, test_buffer,
strlen(test_buffer), &elapsed);
test_eq(result, 1);
test_assert(elapsed >= 0);
test_assert(elapsed <= 5);
/* Scrub it to exercise that entry point too */
<API key>(r);
done:
if (r) replaycache_free(r);
return;
}
#define REPLAYCACHE_LEGACY(name) \
{ #name, legacy_test_helper, 0, &legacy_setup, test_replaycache_ ## name }
struct testcase_t replaycache_tests[] = {
REPLAYCACHE_LEGACY(alloc),
REPLAYCACHE_LEGACY(badalloc),
REPLAYCACHE_LEGACY(free_null),
REPLAYCACHE_LEGACY(miss),
REPLAYCACHE_LEGACY(hit),
REPLAYCACHE_LEGACY(age),
REPLAYCACHE_LEGACY(elapsed),
REPLAYCACHE_LEGACY(noexpire),
REPLAYCACHE_LEGACY(scrub),
REPLAYCACHE_LEGACY(future),
REPLAYCACHE_LEGACY(realtime),
END_OF_TESTCASES
}; |
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gentellela Alela! | </title>
<!-- Bootstrap -->
<link th:href="@{./res/vendors/bootstrap/dist/css/bootstrap.min.css}" rel="stylesheet">
<!-- Font Awesome -->
<link th:href="@{./res/vendors/font-awesome/css/font-awesome.min.css}" rel="stylesheet">
<!-- NProgress -->
<link th:href="@{./res/vendors/nprogress/nprogress.css}" rel="stylesheet">
<!-- Animate.css -->
<link th:href="@{./res/vendors/animate.css/animate.min.css}" rel="stylesheet">
<!-- Custom Theme Style -->
<link th:href="@{./res/build/css/custom.min.css}" rel="stylesheet">
</head>
<body class="login">
<div>
<a class="hiddenanchor" id="signup"></a>
<a class="hiddenanchor" id="signin"></a>
<div class="login_wrapper">
<div class="animate form login_form">
<section class="login_content">
<form th:action="@{/login}" method="post">
<h1>Login Form</h1>
<p th:if="${loginError}">Invalid username and password.</p>
<p th:if="${param.logout}">You have been logged out.</p>
<div>
<input id="username" name="username" type="text" class="form-control" placeholder="Username" required="" />
</div>
<div>
<input id="username" name="password" type="password" class="form-control" placeholder="Password" required="" />
</div>
<div>
<button type="submit" name="submit" class="btn btn-default submit">Log in</button>
<a class="reset_pass" href="#">Lost your password?</a>
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</div>
<div class="clearfix"></div>
<div class="separator">
<p class="change_link">New to site?
<a href="#signup" class="to_register"> Create Account </a>
</p>
<div class="clearfix"></div>
<br />
<div>
<h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
<p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p>
</div>
</div>
</form>
</section>
</div>
<div id="register" class="animate form registration_form">
<section class="login_content">
<form>
<h1>Create Account</h1>
<div>
<input type="text" class="form-control" placeholder="Username" required="" />
</div>
<div>
<input type="email" class="form-control" placeholder="Email" required="" />
</div>
<div>
<input type="password" class="form-control" placeholder="Password" required="" />
</div>
<div>
<a class="btn btn-default submit" href="index.html">Submit</a>
</div>
<div class="clearfix"></div>
<div class="separator">
<p class="change_link">Already a member ?
<a href="#signin" class="to_register"> Log in </a>
</p>
<div class="clearfix"></div>
<br />
<div>
<h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
<p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p>
</div>
</div>
</form>
</section>
</div>
</div>
</div>
</body>
</html> |
<?php
return array (
'<strong>Create</strong> new group' => '',
'<strong>Edit</strong> group' => '',
'Delete' => '',
'Description' => '',
'Group name' => '',
'Ldap DN' => '',
'Save' => '',
); |
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Threading;
using System.Web.Mvc;
using WebMatrix.WebData;
using OdeToFoodGit.Models;
namespace OdeToFoodGit.Filters
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class <API key> : <API key>
{
private static <API key> _initializer;
private static object _initializerLock = new object();
private static bool _isInitialized;
public override void OnActionExecuting(<API key> filterContext)
{
// Ensure ASP.NET Simple Membership is initialized only once per app start
LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock);
}
private class <API key>
{
public <API key>()
{
Database.SetInitializer<UsersContext>(null);
try
{
using (var context = new UsersContext())
{
if (!context.Database.Exists())
{
// Create the SimpleMembership database without Entity Framework migration schema
((<API key>)context).ObjectContext.CreateDatabase();
}
}
WebSecurity.<API key>("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
}
catch (Exception ex)
{
throw new <API key>("The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588", ex);
}
}
}
}
} |
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
namespace TupleGeo.Resources.IconLibraries.FamFamFam.Objects.Bells {
using System;
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
// This class was auto-generated by the <API key>
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.<API key>("System.Resources.Tools.<API key>", "4.0.0.0")]
[global::System.Diagnostics.<API key>()]
[global::System.Runtime.CompilerServices.<API key>()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.<API key>("Microsoft.Performance", "CA1811:<API key>")]
internal Resources() {
}
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
[global::System.ComponentModel.<API key>(global::System.ComponentModel.<API key>.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TupleGeo.Resources.IconLibraries.FamFamFam.Objects.Bells.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
[global::System.ComponentModel.<API key>(global::System.ComponentModel.<API key>.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap Bell {
get {
object obj = ResourceManager.GetObject("Bell", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap BellAdd {
get {
object obj = ResourceManager.GetObject("BellAdd", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap BellDelete {
get {
object obj = ResourceManager.GetObject("BellDelete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap BellError {
get {
object obj = ResourceManager.GetObject("BellError", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap BellGo {
get {
object obj = ResourceManager.GetObject("BellGo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
<summary>
Looks up a localized resource of type System.Drawing.Bitmap.
</summary>
public static System.Drawing.Bitmap BellLink {
get {
object obj = ResourceManager.GetObject("BellLink", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
} |
package org.visallo.core.model.search;
import org.vertexium.VertexiumObject;
public abstract class <API key> extends SearchResults implements AutoCloseable {
@Override
public void close() throws Exception {
}
public abstract Iterable<? extends VertexiumObject> getVertexiumObjects();
} |
using System.IO;
using System.Collections;
namespace PclUnit.Constraints.Pieces
{
<summary>
MessageWriter is the abstract base for classes that write
constraint descriptions and messages in some form. The
class has separate methods for writing various components
of a message, allowing implementations to tailor the
presentation as needed.
</summary>
public abstract class MessageWriter : StringWriter
{
<summary>
Construct a MessageWriter given a culture
</summary>
public MessageWriter() : base( System.Globalization.CultureInfo.InvariantCulture ) { }
<summary>
Abstract method to get the max line length
</summary>
public abstract int MaxLineLength { get; set; }
<summary>
Method to write single line message with optional args, usually
written to precede the general failure message.
</summary>
<param name="message">The message to be written</param>
<param name="args">Any arguments used in formatting the message</param>
public void WriteMessageLine(string message, params object[] args)
{
WriteMessageLine(0, message, args);
}
<summary>
Method to write single line message with optional args, usually
written to precede the general failure message, at a givel
indentation level.
</summary>
<param name="level">The indentation level of the message</param>
<param name="message">The message to be written</param>
<param name="args">Any arguments used in formatting the message</param>
public abstract void WriteMessageLine(int level, string message, params object[] args);
<summary>
Display Expected and Actual lines for a constraint. This
is called by MessageWriter's default implementation of
WriteMessageTo and provides the generic two-line display.
</summary>
<param name="constraint">The constraint that failed</param>
public abstract void DisplayDifferences(Constraint constraint);
<summary>
Display Expected and Actual lines for given values. This
method may be called by constraints that need more control over
the display of actual and expected values than is provided
by the default implementation.
</summary>
<param name="expected">The expected value</param>
<param name="actual">The actual value causing the failure</param>
public abstract void DisplayDifferences(object expected, object actual);
<summary>
Display Expected and Actual lines for given values, including
a tolerance value on the Expected line.
</summary>
<param name="expected">The expected value</param>
<param name="actual">The actual value causing the failure</param>
<param name="tolerance">The tolerance within which the test was made</param>
public abstract void DisplayDifferences(object expected, object actual, Tolerance tolerance);
<summary>
Display the expected and actual string values on separate lines.
If the mismatch parameter is >=0, an additional line is displayed
line containing a caret that points to the mismatch point.
</summary>
<param name="expected">The expected string value</param>
<param name="actual">The actual string value</param>
<param name="mismatch">The point at which the strings don't match or -1</param>
<param name="ignoreCase">If true, case is ignored in locating the point where the strings differ</param>
<param name="clipping">If true, the strings should be clipped to fit the line</param>
public abstract void <API key>(string expected, string actual, int mismatch, bool ignoreCase, bool clipping);
<summary>
Writes the text for a connector.
</summary>
<param name="connector">The connector.</param>
public abstract void WriteConnector(string connector);
<summary>
Writes the text for a predicate.
</summary>
<param name="predicate">The predicate.</param>
public abstract void WritePredicate(string predicate);
<summary>
Writes the text for an expected value.
</summary>
<param name="expected">The expected value.</param>
public abstract void WriteExpectedValue(object expected);
<summary>
Writes the text for a modifier
</summary>
<param name="modifier">The modifier.</param>
public abstract void WriteModifier(string modifier);
<summary>
Writes the text for an actual value.
</summary>
<param name="actual">The actual value.</param>
public abstract void WriteActualValue(object actual);
<summary>
Writes the text for a generalized value.
</summary>
<param name="val">The value.</param>
public abstract void WriteValue(object val);
<summary>
Writes the text for a collection value,
starting at a particular point, to a max length
</summary>
<param name="collection">The collection containing elements to write.</param>
<param name="start">The starting point of the elements to write</param>
<param name="max">The maximum number of elements to write</param>
public abstract void <API key>(IEnumerable collection, int start, int max);
}
} |
package com.kanven.schedual.transport.test;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.<API key>;
import io.netty.channel.<API key>;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.<API key>;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
public class Client {
public static void main(String[] args) throws <API key> {
EventLoopGroup group = new NioEventLoopGroup();
try {
Bootstrap bootstrap = new Bootstrap();
bootstrap.group(group).channel(NioSocketChannel.class)
.option(ChannelOption.TCP_NODELAY, true)
.handler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel channel)
throws Exception {
channel.pipeline()
.addLast(new <API key>(1024))
.addLast(new StringDecoder())
.addLast(new StringEncoder())
.addLast(
new <API key>() {
private BlockingQueue<String> queue = new ArrayBlockingQueue<String>(
20);
{
new StringQueue().start();
}
class StringQueue extends
Thread {
private int count = 1;
@Override
public void run() {
while (true) {
if (count <= 20) {
try {
String content = "count"
+ count;
System.out
.println(content);
queue.put(content);
} catch (<API key> e1) {
// TODO
// Auto-generated
// catch
// block
e1.printStackTrace();
}
if (count == 10) {
try {
Thread.sleep(5000L);
} catch (<API key> e) {
e.printStackTrace();
}
}
++count;
} else {
break;
}
}
}
}
@Override
public void channelActive(
final <API key> ctx)
throws Exception {
while (true) {
String str = queue
.take();
String content = str
+ System.getProperty("line.separator");
System.out
.println("==="
+ content);
ctx.writeAndFlush(content);
}
}
@Override
public void channelRead(
<API key> ctx,
Object msg)
throws Exception {
System.out.println("msg:"
+ msg);
}
@Override
public void channelReadComplete(
<API key> ctx)
throws Exception {
super.channelReadComplete(ctx);
ctx.flush();
}
@Override
public void exceptionCaught(
<API key> ctx,
Throwable cause)
throws Exception {
super.exceptionCaught(ctx,
cause);
ctx.close();
}
});
}
});
ChannelFuture future = bootstrap.connect("127.0.0.1", 8090).sync();
future.channel().closeFuture().sync();
} finally {
group.shutdownGracefully();
}
}
} |
# AUTOGENERATED FILE
FROM balenalib/amd64-alpine:3.11-build
# remove several traces of python
RUN apk del python*
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
# point Python at a system-provided certificate database. Otherwise, we might hit <API key>.
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
ENV PYTHON_VERSION 3.9.4
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.0.1
ENV SETUPTOOLS_VERSION 56.0.0
RUN set -x \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.<API key>.1.tar.gz" \
&& echo "<SHA256-like> Python-$PYTHON_VERSION.<API key>.1.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.<API key>.1.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.<API key>.1.tar.gz" \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/<SHA1-like>/get-pip.py" \
&& echo "<SHA256-like> get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv
ENV PYTHON_DBUS_VERSION 1.2.8
# install dbus-python dependencies
RUN apk add --no-cache \
dbus-dev \
dbus-glib-dev
# install dbus-python
RUN set -x \
&& mkdir -p /usr/src/dbus-python \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
&& gpg --verify dbus-python.tar.gz.asc \
&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
&& rm dbus-python.tar.gz* \
&& cd /usr/src/dbus-python \
&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
&& make -j$(nproc) \
&& make install -j$(nproc) \
&& cd / \
&& rm -rf /usr/src/dbus-python
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -sf pip3 pip \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
&& ln -sf idle3 idle \
&& ln -sf pydoc3 pydoc \
&& ln -sf python3 python \
&& ln -sf python3-config python-config
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/<SHA1-like>/scripts/assets/tests/test-stack@python.sh" \
&& echo "Running test-stack@python" \
&& chmod +x test-stack@python.sh \
&& bash test-stack@python.sh \
&& rm -rf test-stack@python.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https:
RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& ln -f /bin/sh /bin/sh.real \
&& ln -f /bin/sh-shim /bin/sh |
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt_private.h"
/**
@file dsa_free.c
DSA implementation, free a DSA key, Tom St Denis
*/
#ifdef LTC_MDSA
/**
Free a DSA key
@param key The key to free from memory
*/
void dsa_free(dsa_key *key)
{
LTC_ARGCHKVD(key != NULL);
mp_cleanup_multi(&key->y, &key->x, &key->q, &key->g, &key->p, NULL);
key->type = key->qord = 0;
}
#endif
/* ref: HEAD -> develop */
/* git commit: <SHA1-like> */
/* commit time: 2018-10-15 10:51:17 +0200 */ |
/**
* Attribute updater
* @param {String} tag the tag to watch
* @param {Function} updater a function taking a trace and an object, that sets in the object the proper attributes according to the trace
*/
function AttributeUpdater( tag, updater ){
this.tag = tag;
this.update = updater;
} |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_32) on Tue Jun 18 11:08:47 PDT 2013 -->
<TITLE>
<API key> (AWS SDK for Java - 1.4.7)
</TITLE>
<META NAME="date" CONTENT="2013-06-18">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../JavaDoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="<API key> (AWS SDK for Java - 1.4.7)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<span id="feedback_section"><h3>Did this page help you?</h3> <a id="feedback_yes" target="_blank">Yes</a> <a id="feedback_no" target="_blank">No</a> <a id="go_cti" target="_blank">Tell us about it...</a></span>
<script type="text/javascript">
var javadoc_root_name = "/javadoc/";
var javadoc_path = location.href.substring(0, location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length);
var file_path = location.href.substring(location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length);
var feedback_yes_url = javadoc_path + "javadoc-resources/feedbackyes.html?topic_id=";
var feedback_no_url = javadoc_path + "javadoc-resources/feedbackno.html?topic_id=";
var <API key> = "https://aws-portal.amazon.com/gp/aws/<API key>/documentation/aws_doc_feedback_04?service_name=Java-Ref&file_name=";
if(file_path != "overview-frame.html") {
var file_name = file_path.replace(/[/.]/g, '_');
document.getElementById("feedback_yes").setAttribute("href", feedback_yes_url + file_name);
document.getElementById("feedback_no").setAttribute("href", feedback_no_url + file_name);
document.getElementById("go_cti").setAttribute("href", <API key> + file_name);
} else {
// hide the header in overview-frame page
document.getElementById("feedback_section").innerHTML = "";
}
</script>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><B>PREV CLASS</B></A>
<A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/amazonaws/services/opsworks/model/<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<H2>
<FONT SIZE="-1">
com.amazonaws.services.opsworks.model</FONT>
<BR>
Class <API key></H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../com/amazonaws/<API key>.html" title="class in com.amazonaws">com.amazonaws.<API key></A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.amazonaws.services.opsworks.model.<API key></B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B><API key></B><DT>extends <A HREF="../../../../../com/amazonaws/<API key>.html" title="class in com.amazonaws"><API key></A><DT>implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>
<P>
Container for the parameters to the <A HREF="../../../../../com/amazonaws/services/opsworks/AWSOpsWorks.html#<API key>(com.amazonaws.services.opsworks.model.<API key>)"><CODE><API key> operation</CODE></A>.
<p>
Describes load-based auto scaling configurations for specified layers.
</p>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../com/amazonaws/services/opsworks/AWSOpsWorks.html#<API key>(com.amazonaws.services.opsworks.model.<API key>)"><CODE>AWSOpsWorks.<API key>(<API key>)</CODE></A>,
<A HREF="../../../../../serialized-form.html#com.amazonaws.services.opsworks.model.<API key>">Serialized Form</A></DL>
<HR>
<P>
<A NAME="constructor_summary"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html#<API key>()"><API key></A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="method_summary"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http:
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html#getLayerIds()">getLayerIds</A></B>()</CODE>
<BR>
An array of layer IDs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html
<BR>
An array of layer IDs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html#toString()">toString</A></B>()</CODE>
<BR>
Returns a string representation of this object; useful for testing and
debugging.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><API key></A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html
<BR>
An array of layer IDs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><API key></A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html
<BR>
An array of layer IDs.</TD>
</TR>
</TABLE>
<A NAME="<API key>.amazonaws.<API key>"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="<API key>">
<TH ALIGN="left"><B>Methods inherited from class com.amazonaws.<A HREF="../../../../../com/amazonaws/<API key>.html" title="class in com.amazonaws"><API key></A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../com/amazonaws/<API key>.html#<API key>()"><API key></A>, <A HREF="../../../../../com/amazonaws/<API key>.html#<API key>()"><API key></A>, <A HREF="../../../../../com/amazonaws/<API key>.html#<API key>()"><API key></A>, <A HREF="../../../../../com/amazonaws/<API key>.html#<API key>(com.amazonaws.auth.AWSCredentials)"><API key></A></CODE></TD>
</TR>
</TABLE>
<A NAME="<API key>.lang.Object"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="<API key>">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true
</TR>
</TABLE>
<P>
<A NAME="constructor_detail"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="<API key>()"></A><H3>
<API key></H3>
<PRE>
public <B><API key></B>()</PRE>
<DL>
</DL>
<A NAME="method_detail"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getLayerIds()"></A><H3>
getLayerIds</H3>
<PRE>
public <A HREF="http:
<DL>
<DD>An array of layer IDs.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>An array of layer IDs.</DL>
</DD>
</DL>
<HR>
<A NAME="setLayerIds(java.util.Collection)"></A><H3>
setLayerIds</H3>
<PRE>
public void <B>setLayerIds</B>(<A HREF="http:
<DL>
<DD>An array of layer IDs.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layerIds</CODE> - An array of layer IDs.</DL>
</DD>
</DL>
<HR>
<A NAME="withLayerIds(java.lang.String...)"></A><H3>
withLayerIds</H3>
<PRE>
public <A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><API key></A> <B>withLayerIds</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... layerIds)</PRE>
<DL>
<DD>An array of layer IDs.
<p>
Returns a reference to this object so that method calls can be chained together.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layerIds</CODE> - An array of layer IDs.
<DT><B>Returns:</B><DD>A reference to this updated object so that method calls can be chained
together.</DL>
</DD>
</DL>
<HR>
<A NAME="withLayerIds(java.util.Collection)"></A><H3>
withLayerIds</H3>
<PRE>
public <A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><API key></A> <B>withLayerIds</B>(<A HREF="http:
<DL>
<DD>An array of layer IDs.
<p>
Returns a reference to this object so that method calls can be chained together.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layerIds</CODE> - An array of layer IDs.
<DT><B>Returns:</B><DD>A reference to this updated object so that method calls can be chained
together.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns a string representation of this object; useful for testing and
debugging.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>A string representation of this object.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang"><CODE>Object.toString()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> obj)</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<script src="http://aws.amazon.com/js/urchin.js" type="text/javascript"></script>
<script type="text/javascript">urchinTracker();</script>
<!
More info available at http:
<script language="JavaScript" type="text/javascript" src="https:
<script language="JavaScript" type="text/javascript">
<!
// Documentation Service Name
s.prop66='AWS SDK for Java';
s.eVar66='D=c66';
// Documentation Guide Name
s.prop65='API Reference';
s.eVar65='D=c65';
var s_code=s.t();if(s_code)document.write(s_code)
</script>
<script language="JavaScript" type="text/javascript">
<!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
</script>
<noscript>
<img src="http://amazonwebservices.d2.sc.omtrdc.net/b/ss/awsamazondev/1/H.25.2--NS/0" height="1" width="1" border="0" alt="" />
</noscript>
<!--/DO NOT REMOVE/-->
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><B>PREV CLASS</B></A>
<A HREF="../../../../../com/amazonaws/services/opsworks/model/<API key>.html" title="class in com.amazonaws.services.opsworks.model"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/amazonaws/services/opsworks/model/<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
Copyright &
</BODY>
</HTML> |
__Description__: If a `state` is declared and the user does not specify a auxiliary state within the `state` object or any properties yet they define an `non` object then it should generate both a `on` and `non` `state` `transition` for said `non`
__Notes__
+ You need to use the `not` notation if you wish to do this
+ Assumes whatever properties defined are meant to be `on` `state` properties
+ I recommend you always define an auxiliary `state`, `on`, `non`, `common` and avoid using this method |
package com.samurai.smartoffloading;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.samurai.connectionclass.<API key>;
import com.samurai.connectionclass.ConnectionQuality;
import com.samurai.connectionclass.<API key>;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.samurai.connectionclass.*;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
public class <API key> extends Activity {
private static final String TAG = "<API key>";
private <API key> <API key>;
private <API key> <API key>;
private <API key> mListener;
private TextView mTextView;
private View mRunningBar;
private String mURL = "http://connectionclass.parseapp.com/m100_hubble_4060.jpg";
private int mTries = 0;
private ConnectionQuality mConnectionClass = ConnectionQuality.UNKNOWN;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
<API key> = <API key>.getInstance();
<API key> = <API key>.getInstance();
findViewById(R.id.test_btn).setOnClickListener(testButtonClicked);
mTextView = (TextView)findViewById(R.id.connection_class);
mTextView.setText(<API key>.<API key>().toString());
mRunningBar = findViewById(R.id.runningBar);
mRunningBar.setVisibility(View.GONE);
mListener = new <API key>();
}
@Override
protected void onPause() {
super.onPause();
<API key>.remove(mListener);
}
@Override
protected void onResume() {
super.onResume();
<API key>.register(mListener);
}
/**
* Listener to update the UI upon connectionclass change.
*/
private class <API key>
implements <API key>.<API key> {
@Override
public void <API key>(ConnectionQuality bandwidthState) {
mConnectionClass = bandwidthState;
// runOnUiThread(new Runnable() {
// @Override
// public void run() {
// mTextView.setText(mConnectionClass.toString());
}
@Override
public void <API key>(double averageRate){
int iBandwidthRate = (int)averageRate;
final String sBandwidthRate = Integer.toString(iBandwidthRate)+" Kbps";
runOnUiThread(new Runnable() {
@Override
public void run() {
mTextView.setText(sBandwidthRate);
}
});
}
}
private final View.OnClickListener testButtonClicked = new View.OnClickListener() {
@Override
public void onClick(View v) {
new DownloadImage().execute(mURL);
}
};
/**
* AsyncTask for handling downloading and making calls to the timer.
*/
private class DownloadImage extends AsyncTask<String, Void, Void> {
@Override
protected void onPreExecute() {
<API key>.startSampling();
mRunningBar.setVisibility(View.VISIBLE);
}
@Override
protected Void doInBackground(String... url) {
String imageURL = url[0];
try {
// Open a stream to download the image from our URL.
InputStream input = new URL(imageURL).openStream();
try {
byte[] buffer = new byte[1024];
// Do some busy waiting while the stream is open.
while (input.read(buffer) != -1) {
}
} finally {
input.close();
}
} catch (IOException e) {
Log.e(TAG, "Error while downloading image.");
}
return null;
}
@Override
protected void onPostExecute(Void v) {
<API key>.stopSampling();
// Retry for up to 10 times until we find a ConnectionClass.
if (mConnectionClass == ConnectionQuality.UNKNOWN && mTries < 10) {
mTries++;
new DownloadImage().execute(mURL);
}
if (!<API key>.isSampling()) {
mRunningBar.setVisibility(View.GONE);
}
}
}
} |
require 'sequel'
require 'csv'
input = File.read ARGV[0]
messages = CSV.parse(input, headers: true)
row_hash = messages[0].to_h
lower_row = {}
row_hash.each_pair do |k, v|
lower_row[k.downcase] = v
end
lower_row.delete('<API key>')
lower_row['action'] ||= 'test'
lower_row['encryption'] ||= 'none'
lower_row['localfilename'] ||= 'v2message.txt'
lower_row['service'] ||= 'service'
DB = Sequel.connect(adapter: 'postgres', host: 'localhost', database: 'cbr', user: 'cbr', password: 'cbr', port: '8888')
DB[:message_inq].insert(lower_row) |
package com.example.com.freetimes;
import org.litepal.crud.DataSupport;
public class Event extends DataSupport{
private String thing;
private int month;
private int day;
private boolean isEveryday=false;
private int happen_hour;
private int happen_minus;
public Event(){}
public Event(String thing,int month,int day,int happen_hour,int happen_minus){
this.thing=thing;
this.month=month;
this.day=day;
this.happen_hour=happen_hour;
this.happen_minus=happen_minus;
}
public void setHappen_hour(int happen_hour) {
this.happen_hour = happen_hour;
}
public void setHappen_minus(int happen_minus) {
this.happen_minus = happen_minus;
}
public void setThing(String thing) {
this.thing = thing;
}
public void setDay(int day) {this.day = day;}
public void setMonth(int month) {
this.month = month;
}
public void setIsEveryday(boolean everyday) {
isEveryday = everyday;
}
public String getThing() {
return thing;
}
public int getDay() {return day;}
public int getHappen_hour() {
return happen_hour;
}
public int getHappen_minus() {
return happen_minus;
}
public int getMonth() {
return month;
}
public boolean getIsEveryday() {
return isEveryday;
}
} |
#!/usr/bin/env python3 -tt
"""
Utility methods for strings.
"""
class StringTool:
def __init__(self):
pass
def clean_string(self, a_string):
# delete double quote
string_cleaned = a_string.replace('"', '')
# delete unusual quote
string_cleaned = string_cleaned.replace('`', '')
# delete trailing quote. Use space and other punctuation to help recognize it.
string_cleaned = string_cleaned.replace("' ", " ")
string_cleaned = string_cleaned.replace("';", ";")
string_cleaned = string_cleaned.replace("':", ":")
string_cleaned = string_cleaned.replace("',", ",")
string_cleaned = string_cleaned.replace("'.", ".")
string_cleaned = string_cleaned.replace("'?", "?")
string_cleaned = string_cleaned.replace("'!", "!")
string_cleaned = string_cleaned.replace("'\n", "\n")
# delete leading quote. Use space and other punctuation to help recognize it.
string_cleaned = string_cleaned.replace(" '", " ")
string_cleaned = string_cleaned.replace("-'", "-")
# replace other punctuation with space to avoid accidentally joining words
string_cleaned = string_cleaned.replace('\n', ' ')
string_cleaned = string_cleaned.replace('(', ' ')
string_cleaned = string_cleaned.replace(')', ' ')
string_cleaned = string_cleaned.replace('-', ' ')
string_cleaned = string_cleaned.replace('_', ' ')
string_cleaned = string_cleaned.replace(';', ' ')
string_cleaned = string_cleaned.replace(':', ' ')
string_cleaned = string_cleaned.replace(',', ' ')
string_cleaned = string_cleaned.replace('.', ' ')
string_cleaned = string_cleaned.replace('?', ' ')
string_cleaned = string_cleaned.replace('!', ' ')
return string_cleaned |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon May 01 08:43:56 MST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.management.PropertySupplier (Public javadocs 2017.5.0 API)</title>
<meta name="date" content="2017-05-01">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.wildfly.swarm.config.management.PropertySupplier (Public javadocs 2017.5.0 API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.5.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/management/class-use/PropertySupplier.html" target="_top">Frames</a></li>
<li><a href="PropertySupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Interface org.wildfly.swarm.config.management.PropertySupplier" class="title">Uses of Interface<br>org.wildfly.swarm.config.management.PropertySupplier</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.management">org.wildfly.swarm.config.management</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.management.security_realm">org.wildfly.swarm.config.management.security_realm</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.management">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a> in <a href="../../../../../../org/wildfly/swarm/config/management/package-summary.html">org.wildfly.swarm.config.management</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/management/package-summary.html">org.wildfly.swarm.config.management</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/management/LdapConnection.html" title="type parameter in LdapConnection">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">LdapConnection.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/management/LdapConnection.html#property-org.wildfly.swarm.config.management.PropertySupplier-">property</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a> supplier)</code>
<div class="block">Install a supplied Property object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.management.security_realm">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a> in <a href="../../../../../../org/wildfly/swarm/config/management/security_realm/package-summary.html">org.wildfly.swarm.config.management.security_realm</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/management/security_realm/package-summary.html">org.wildfly.swarm.config.management.security_realm</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/management/security_realm/PlugInAuthorization.html" title="type parameter in PlugInAuthorization">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">PlugInAuthorization.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/management/security_realm/PlugInAuthorization.html#property-org.wildfly.swarm.config.management.PropertySupplier-">property</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a> supplier)</code>
<div class="block">Install a supplied Property object to the list of subresources</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/management/security_realm/<API key>.html" title="type parameter in <API key>">T</a></code></td>
<td class="colLast"><span class="typeNameLabel"><API key>.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/management/security_realm/<API key>.html#property-org.wildfly.swarm.config.management.PropertySupplier-">property</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">PropertySupplier</a> supplier)</code>
<div class="block">Install a supplied Property object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/management/PropertySupplier.html" title="interface in org.wildfly.swarm.config.management">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.5.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/management/class-use/PropertySupplier.html" target="_top">Frames</a></li>
<li><a href="PropertySupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html> |
// Vendored from Go:
// - stringCut is vendored from `go` 1.18+ stdlib since not available in earlier releases.
// see https://github.com/golang/go/blob/<SHA1-like>/src/strings/strings.go#L1177-L1186
// - splitQuoted is from https://github.com/golang/go/blob/<SHA1-like>/src/go/build/build.go#L1787-L1846
package main
import (
"errors"
"strings"
"unicode"
)
// Cut slices s around the first instance of sep,
// returning the text before and after sep.
// The found result reports whether sep appears in s.
// If sep does not appear in s, cut returns s, "", false.
func stringsCut(s, sep string) (before, after string, found bool) {
if i := strings.Index(s, sep); i >= 0 {
return s[:i], s[i+len(sep):], true
}
return s, "", false
}
// splitQuoted splits the string s around each instance of one or more consecutive
// white space characters while taking into account quotes and escaping, and
// returns an array of substrings of s or an empty list if s contains only white space.
// Single quotes and double quotes are recognized to prevent splitting within the
// quoted region, and are removed from the resulting substrings. If a quote in s
// isn't closed err will be set and r will have the unclosed argument as the
// last element. The backslash is used for escaping.
// For example, the following string:
// a b:"c d" 'e''f' "g\""
// Would be parsed as:
// []string{"a", "b:c d", "ef", `g"`}
func splitQuoted(s string) (r []string, err error) {
var args []string
arg := make([]rune, len(s))
escaped := false
quoted := false
quote := '\x00'
i := 0
for _, rune := range s {
switch {
case escaped:
escaped = false
case rune == '\\':
escaped = true
continue
case quote != '\x00':
if rune == quote {
quote = '\x00'
continue
}
case rune == '"' || rune == '\'':
quoted = true
quote = rune
continue
case unicode.IsSpace(rune):
if quoted || i > 0 {
quoted = false
args = append(args, string(arg[:i]))
i = 0
}
continue
}
arg[i] = rune
i++
}
if quoted || i > 0 {
args = append(args, string(arg[:i]))
}
if quote != 0 {
err = errors.New("unclosed quote")
} else if escaped {
err = errors.New("unfinished escaping")
}
return args, err
} |
class Encode {
// TODO
public static toHtml(val: string): string {
return String(Encode.toSafe(val))
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, '&
.replace(/</g, '<')
.replace(/>/g, '>');
}
public static toHtmlAttr(val: string): string {
return Encode.toHtml(val);
}
public static toJS(val: string): string {
return val || '';
}
public static toUrl(val: string): string {
return Encode.toSafe(val);
}
public static toSafe(val: string): string {
return val || '';
}
}
export = Encode; |
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Apache Solr 5.2.1 Documentation</title>
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
</head>
<body>
<div>
<a href="http://lucene.apache.org/solr/"><img src="images/solr.svg" style="width:210px; margin:22px 0px 7px 20px; border:none;" title="Apache Solr Logo" alt="Solr"></a>
<div style="z-index:100;position:absolute;top:25px;left:226px">
<span style="font-size: x-small">TM</span>
</div>
</div>
<h1>Apache Solr<span style="vertical-align: top; font-size: x-small">TM</span> 5.2.1 Documentation</h1>
<p>Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project.
Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering,
database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable,
providing distributed search and index replication, and it powers the search and navigation features of many
of the world's largest internet sites.</p>
<p>Solr is written in Java and runs as a standalone full-text search server within a servlet container such as
Jetty. Solr uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like
HTTP/XML and JSON APIs that make it easy to use from virtually any programming language. Solr's powerful external
configuration allows it to be tailored to almost any type of application without Java coding, and it has an extensive
plugin architecture when more advanced customization is required.</p>
<p>
This is the official documentation for <b>Apache Solr 5.2.1</b>.
</p>
<h2>Reference Documents</h2>
<ul>
<li>
<a href="http://wiki.apache.org/solr">Wiki</a>: Additional documentation, especially focused on using Solr.</li>
<li>
<a href="changes/Changes.html">Changes</a>: List of changes in this release.</li>
<li>
<a href="SYSTEM_REQUIREMENTS.html">System Requirements</a>: Minimum and supported Java versions.</li>
<li>
<a href="quickstart.html">Solr Quick Start</a>: This document covers the basics of running Solr using an example schema, and some sample data.</li>
<li>
<a href="http://lucene.apache.org/core/5_2_1/index.html">Lucene Documentation</a>
</li>
</ul>
<h2>API Javadocs</h2>
<ul>
<li style="font-size:larger; margin-bottom:.5em;">
<b><a href="solr-core/index.html">solr-core</a>: </b>Solr Core</li>
<li>
<b><a href="solr-solrj/index.html">solr-solrj</a>: </b>Solrj - Solr Java Client</li>
<li>
<b><a href="<API key>/index.html"><API key></a>: </b>Additional analysis components</li>
<li>
<b><a href="solr-analytics/index.html">solr-analytics</a>: </b>Analytics Package</li>
<li>
<b><a href="solr-clustering/index.html">solr-clustering</a>: </b>Clustering Integraton</li>
<li>
<b><a href="<API key>/index.html"><API key></a>: </b>Data Import Handler</li>
<li>
<b><a href="<API key>/index.html"><API key></a>: </b>Data Import Handler Extras</li>
<li>
<b><a href="solr-cell/index.html">solr-cell</a>: </b>Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF.</li>
<li>
<b><a href="solr-langid/index.html">solr-langid</a>: </b>Language Identifier contrib for extracting language from a document being indexed</li>
<li>
<b><a href="solr-map-reduce/index.html">solr-map-reduce</a>: </b>Solr map-reduce index construction.</li>
<li>
<b><a href="<API key>/index.html"><API key></a>: </b>Solr Cell Morphline commands.</li>
<li>
<b><a href="<API key>/index.html"><API key></a>: </b>Solr Morphlines commands.</li>
<li>
<b><a href="solr-uima/index.html">solr-uima</a>: </b>Solr Integration with UIMA for extracting metadata from arbitrary (text) fields and enrich document with features extracted from UIMA types (language, sentences, concepts, named entities, etc.)</li>
<li>
<b><a href="solr-velocity/index.html">solr-velocity</a>: </b>Solr Velocity Response Writer</li>
<li>
<b><a href="solr-test-framework/index.html">solr-test-framework</a>: </b>Solr Test Framework</li>
</ul>
</body>
</html> |
# Halomonas halocynthiae Romanenko et al., 2002 SPECIES
# Status
ACCEPTED
# According to
The Catalogue of Life, 3rd January 2011
# Published in
Romanenko et al. . 2002. Halomonas halocynthiae sp. nov. , isolated from the marine ascidian Halocynthia aurantium. International Journal of Systematic and Evolutionary Microbiology 52 (5): 1767-1772
# Original name
null
Remarks
null |
package com.weygo.weygophone.pages.order.commit;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;
import com.alibaba.fastjson.JSON;
import com.weygo.common.base.JHResponse;
import com.weygo.common.tools.JHAdaptScreenUtils;
import com.weygo.common.tools.JHStringUtils;
import com.weygo.common.tools.network.JHRequestError;
import com.weygo.common.tools.network.JHResponseCallBack;
import com.weygo.common.widget.JHBasePopupWindow;
import com.weygo.weygophone.R;
import com.weygo.weygophone.base.WGTitleActivity;
import com.weygo.weygophone.common.WGConstants;
import com.weygo.weygophone.common.widget.<API key>;
import com.weygo.weygophone.common.widget.WGOptionPickerView;
import com.weygo.weygophone.common.widget.WGWeightFloatView;
import com.weygo.weygophone.pages.address.edit.model.WGAddress;
import com.weygo.weygophone.pages.address.list.<API key>;
import com.weygo.weygophone.pages.address.list.model.WGAddressListData;
import com.weygo.weygophone.pages.coupon.<API key>;
import com.weygo.weygophone.pages.coupon.model.WGActiveCouponData;
import com.weygo.weygophone.pages.coupon.model.WGCoupon;
import com.weygo.weygophone.pages.goodDetail.<API key>;
import com.weygo.weygophone.pages.integral.useIntegral.<API key>;
import com.weygo.weygophone.pages.integral.useIntegral.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.adapter.<API key>;
import com.weygo.weygophone.pages.order.commit.model.<API key>;
import com.weygo.weygophone.pages.order.commit.model.WGCommitOrderDetail;
import com.weygo.weygophone.pages.order.commit.model.WGCommitOrderPay;
import com.weygo.weygophone.pages.order.commit.model.WGOrderExpireGood;
import com.weygo.weygophone.pages.order.commit.model.WGOverHeightDetail;
import com.weygo.weygophone.pages.order.commit.model.<API key>;
import com.weygo.weygophone.pages.order.commit.model.WGSettlementDate;
import com.weygo.weygophone.pages.order.commit.model.<API key>;
import com.weygo.weygophone.pages.order.commit.model.WGSettlementTime;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.request.WGOverHeightRequest;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.request.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.model.response.<API key>;
import com.weygo.weygophone.pages.order.commit.widget.<API key>;
import com.weygo.weygophone.pages.order.commit.widget.<API key>;
import com.weygo.weygophone.pages.order.commit.widget.<API key>;
import com.weygo.weygophone.pages.order.list.model.WGOrderGoodItem;
import com.weygo.weygophone.pages.pay.paySuccess.<API key>;
import com.weygo.weygophone.pages.pay.paySuccess.model.WGPaySuccessData;
import com.weygo.weygophone.pages.pay.payWeb.WGPayWebActivity;
import com.weygo.weygophone.pages.receipt.WGReceiptActivity;
import com.weygo.weygophone.pages.receipt.model.WGReceipt;
import java.util.ArrayList;
import java.util.List;
import cn.qqtheme.framework.picker.OptionPicker;
public class <API key> extends WGTitleActivity {
RecyclerView mRecyclerView;
<API key> mAdapter;
WGCommitOrderDetail mData;
<API key> mFooterView;
<API key> mExpireView;
<API key> mOverWeightView;
WGWeightFloatView mWeightFloatPopView;
JHBasePopupWindow mWindow;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<API key>();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 0 && data != null) {
Bundle bundle = data.getExtras();
if (bundle != null) {
if (resultCode == WGConstants.<API key>) {
WGReceipt receipt = (WGReceipt) bundle.getSerializable(WGConstants.WGIntentDataKey);
mData.receipt = receipt;
refreshUI();
}
else if (resultCode == WGConstants.<API key>) {
WGActiveCouponData couponData = (WGActiveCouponData) bundle.getSerializable(WGConstants.WGIntentDataKey);
mData.coupon = couponData.coupon;
mData.consumePrice = couponData.price;
refreshUI();
}
else if (resultCode == WGConstants.<API key>) {
WGAddress address = (WGAddress) bundle.getSerializable(WGConstants.WGIntentDataKey);
mData.address = address;
<API key>();
}
else if (resultCode == WGConstants.<API key>) {
<API key> integral = (<API key>) bundle.getSerializable(WGConstants.WGIntentDataKey);
mData.useIntegration = integral.use;
mData.consumePrice = integral.price;
refreshUI();
}
}
else {
if (resultCode == WGConstants.<API key>) {
mData.receipt = null;
refreshUI();
}
}
}
}
@Override
public void initContentView() {
setContentView(R.layout.<API key>);
}
@Override
public void initSubView() {
super.initSubView();
mNavigationBar.setTitle(R.string.CommitOrder_Title);
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new <API key>(this, mData);
mAdapter.setListener(new <API key>.OnItemListener() {
@Override
public void onAddress(WGAddress address) {
handleAddress();
}
@Override
public void onReceipt(WGReceipt receipt) {
handleReceipt();
}
@Override
public void onDeliverDate(<API key> data) {
handleDeliverDate();
}
@Override
public void onDeliverTime(<API key> data) {
handleDeliverTime();
}
@Override
public void onPayMethod(WGCommitOrderPay data) {
handlePayMethod();
}
@Override
public void onIntegral(WGCommitOrderDetail data) {
handleIntegral();
}
@Override
public void onCoupon(WGCoupon data) {
handleCoupon();
}
@Override
public void onGoodItem(WGOrderGoodItem item) {
handleGood(item);
}
@Override
public void onLookMore(WGCommitOrderDetail data) {
handleLookMore();
}
@Override
public void onItemClick(View view, int position) {
}
});
mRecyclerView.setAdapter(mAdapter);
mFooterView = (<API key>) findViewById(R.id.footerView);
mFooterView.setVisibility(View.INVISIBLE);
mFooterView.setListener(new <API key>.OnItemListener() {
@Override
public void onCommit() {
touchCommitBtn();
}
});
}
public void touchCommitBtn() {
if (enableConfirm()) {
loadCommitOrder();
}
}
boolean enableConfirm() {
if (mData != null && JHStringUtils.isNullOrEmpty(mData.minPriceTips)) {
return true;
}
return false;
}
void showExpireGood(WGOrderExpireGood expireGood) {
mExpireView = (<API key>) getLayoutInflater()
.inflate(R.layout.<API key>, null);
mExpireView.setGoods(expireGood.goods);
mWindow = new JHBasePopupWindow(mExpireView,
JHAdaptScreenUtils.devicePixelWidth(this),
JHAdaptScreenUtils.devicePixelHeight(this));
mExpireView.setPopupWindow(mWindow);
mExpireView.setListener(new <API key>.OnItemListener() {
@Override
public void onOk() {
handleChangeTime();
}
@Override
public void onNo() {
<API key>();
}
});
mWindow.setFocusable(false);
mWindow.setOutsideTouchable(false);
mWindow.showAtLocation(mExpireView, Gravity.CENTER, 0, 0);
}
void showOverWeightGood(List<WGOverHeightDetail> overHeightDetail) {
mOverWeightView = (<API key>) getLayoutInflater()
.inflate(R.layout.<API key>, null);
mOverWeightView.setGoods(overHeightDetail);
mWindow = new JHBasePopupWindow(mOverWeightView,
JHAdaptScreenUtils.devicePixelWidth(this),
JHAdaptScreenUtils.devicePixelHeight(this));
mOverWeightView.setPopupWindow(mWindow);
mOverWeightView.setListener(new <API key>.OnItemListener() {
@Override
public void onDeleteAll() {
<API key>();
}
@Override
public void onConfirm(List<WGOverHeightDetail> overWeightList) {
loadOverHeightReset(overWeightList);
}
});
mWindow.setFocusable(false);
mWindow.setOutsideTouchable(false);
mWindow.showAtLocation(mOverWeightView, Gravity.CENTER, 0, 0);
}
@Override
public boolean dispatchTouchEvent(MotionEvent event){
if(mWindow!=null&&mWindow.isShowing()){
return false;
}
return super.dispatchTouchEvent(event);
}
void handleChangeTime() {
mData.deliverTime.currentDateId = null;
mData.deliverTime.currentTimeId = null;
refreshUI();
}
void <API key>() {
<API key>();
}
void refreshUI() {
mAdapter.setData(mData);
mFooterView.showWithData(mData);
mFooterView.setVisibility(View.VISIBLE);
}
void handleAddress() {
Intent intent = new Intent(<API key>.this, <API key>.class);
if (mData != null && mData.address != null) {
Bundle bundle = new Bundle();
WGAddressListData item = new WGAddressListData();
item.addressId = mData.address.addressId;
item.canUse = true;
bundle.putSerializable(WGConstants.WGIntentDataKey, item);
intent.putExtras(bundle);
}
<API key>(intent, 0);
}
void handleDeliverDate() {
List<String> list = new ArrayList();
List<WGSettlementDate> times = mData.deliverTime.deliverTimes;
int index = 0;
for (int num = 0; num < times.size(); ++num) {
WGSettlementDate item = times.get(num);
list.add(item.week + " " + item.date);
if (mData.deliverTime.currentDateId != null) {
if (item.id.equals(mData.deliverTime.currentDateId)) {
index = num;
}
}
}
if (list.size() > 0) {
WGOptionPickerView picker = new WGOptionPickerView(this, list);
picker.<API key>(new OptionPicker.<API key>() {
@Override
public void onOptionPicked(int index, String item) {
<API key>(index, item);
}
});
picker.setSelectedIndex(index);
picker.show();
}
}
void <API key>(int index, String title) {
WGSettlementDate item = mData.deliverTime.deliverTimes.get(index);
mData.deliverTime.currentDateId = item.id;
mData.deliverTime.currentTimeId = mData.deliverTime.getDefaultTimeId();
<API key>();
refreshUI();
}
void handleDeliverTime() {
List<WGSettlementTime> times = mData.deliverTime.getCurrentTimes();
int index = 0;
List<String> list = new ArrayList();
for (int num = 0; num < times.size(); ++num) {
WGSettlementTime item = times.get(num);
list.add(item.time);
if (mData.deliverTime.currentTimeId != null) {
if (item.id.equals(mData.deliverTime.currentTimeId)) {
index = num;
}
}
}
if (list.size() > 0) {
WGOptionPickerView picker = new WGOptionPickerView(this, list);
picker.<API key>(new OptionPicker.<API key>() {
@Override
public void onOptionPicked(int index, String item) {
<API key>(index, item);
}
});
picker.setSelectedIndex(index);
picker.show();
}
}
void <API key>(int index, String title) {
WGSettlementTime item = mData.deliverTime.getCurrentTimes().get(index);
mData.deliverTime.currentTimeId = item.id;
<API key>();
refreshUI();
}
void handlePayMethod() {
int index = 0;
List<String> list = new ArrayList();
List<<API key>> payMethods = mData.payMothod.payMethods;
for (int num = 0; num < payMethods.size(); ++num) {
<API key> item = payMethods.get(num);
list.add(item.name);
if (item.id.equals(mData.payMothod.currentPayId)) {
index = num;
}
}
if (list.size() > 0) {
WGOptionPickerView picker = new WGOptionPickerView(this, list);
picker.<API key>(new OptionPicker.<API key>() {
@Override
public void onOptionPicked(int index, String item) {
<API key>(index, item);
}
});
picker.setSelectedIndex(index);
picker.show();
}
}
void <API key>(int index, String title) {
<API key> item = mData.payMothod.payMethods.get(index);
mData.payMothod.currentPayId = item.id;
refreshUI();
}
void handleIntegral() {
Intent intent = new Intent(<API key>.this, <API key>.class);
<API key>(intent, 0);
}
void handleLookMore() {
mWeightFloatPopView = (WGWeightFloatView) getLayoutInflater()
.inflate(R.layout.<API key>, null);
mWindow = new JHBasePopupWindow(mWeightFloatPopView,
JHAdaptScreenUtils.devicePixelWidth(this),
JHAdaptScreenUtils.devicePixelHeight(this));
mWeightFloatPopView.setPopupWindow(mWindow);
mWeightFloatPopView.showWithData(mData.tip);
mWindow.showAtLocation(mWeightFloatPopView, Gravity.CENTER, 0, 0);
}
void handleGood(WGOrderGoodItem item) {
Intent intent = new Intent(this, <API key>.class);
Bundle bundle = new Bundle();
bundle.putSerializable(WGConstants.WGIntentDataKey, item.id);
intent.putExtras(bundle);
startActivity(intent);
}
void handleCoupon() {
Intent intent = new Intent(<API key>.this, <API key>.class);
if (mData != null) {
Bundle bundle = new Bundle();
bundle.putSerializable(WGConstants.WGIntentDataKey1, true);
if (mData.coupon != null) {
bundle.putSerializable(WGConstants.WGIntentDataKey, mData.coupon);
}
intent.putExtras(bundle);
<API key>(intent, 0);
}
}
void handleReceipt() {
Intent intent = new Intent(<API key>.this, WGReceiptActivity.class);
if (mData != null && mData.receipt != null) {
Bundle bundle = new Bundle();
bundle.putSerializable(WGConstants.WGIntentDataKey, mData.receipt);
intent.putExtras(bundle);
}
<API key>(intent, 0);
}
void <API key>() {
<API key> request = new <API key>();
if (mData != null && mData.address != null) {
request.addressId = mData.address.addressId;
}
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
mData = new WGCommitOrderDetail();
mData.<API key>(response.data);
refreshUI();
WGOrderExpireGood expireGood = response.data.expireGood;
if (expireGood != null) {
expireGood.canChangeTime = false;
showExpireGood(expireGood);
}
else {
if (response != null) {
if (response.data != null) {
if (response.data.overHeightDetail != null &&
response.data.overHeightDetail.size() > 0) {
showOverWeightGood(response.data.overHeightDetail);
}
}
}
}
}
else {
showWarning(response.message);
}
}
void <API key>() {
<API key> request = new <API key>();
request.timeId = mData.deliverTime.currentTimeId;
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
if (response.data != null &&
response.data.expireGood != null) {
response.data.expireGood.canChangeTime = true;
showExpireGood(response.data.expireGood);
refreshUI();
}
}
else {
showWarning(response.message);
}
}
void <API key>() {
<API key> request = new <API key>();
request.timeId = mData.deliverTime.currentTimeId;
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
mExpireView.dismiss();
<API key>();
}
else {
showWarning(response.message);
}
}
void loadCommitOrder() {
<API key> request = new <API key>();
request.addressId = mData.address.addressId;
WGReceipt receipt = mData.receipt;
if (receipt != null) {
request.useBilling = 1;
request.billingCompanyName = receipt.companyName;
request.billingCountry = receipt.countryId;
request.billingPhone = receipt.phone;
request.billingAddress = receipt.address;
request.billingCivico = receipt.civico;
request.billingCity = receipt.city;
request.billingCap = receipt.cap;
request.billingProvince = receipt.province;
request.billingTaxCode = receipt.taxCode;
}
request.useBilling = 0;
<API key> time = mData.deliverTime;
request.deliverDate = time.currentDateId;
request.deliverTime = time.currentTimeId;
WGCommitOrderPay pay = mData.payMothod;
request.payMethod = pay.currentPayId;
request.comments = mData.remark;
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
if (JHStringUtils.isNullOrEmpty(response.data.action)) {
if (JHStringUtils.isNullOrEmpty(response.data.orderId)) {
Log.e("==commitorder==", " orderId ");
Toast.makeText(getBaseContext(), response.message, Toast.LENGTH_LONG);
try {
Thread.sleep(2000);
} catch (<API key> e) {
e.printStackTrace();
}
finish();
}
else {
Log.e("==commitorder==", "");
Intent intent = new Intent(<API key>.this, <API key>.class);
if (response != null && response.data != null) {
Bundle bundle = new Bundle();
bundle.putSerializable(WGConstants.WGIntentDataKey, response.data.orderId);
intent.putExtras(bundle);
}
startActivity(intent);
}
}
else {
//PayWeb
Intent intent = new Intent(<API key>.this, WGPayWebActivity.class);
if (response != null && response.data != null) {
Bundle bundle = new Bundle();
bundle.putSerializable(WGConstants.WGIntentDataKey, response.data);
intent.putExtras(bundle);
}
startActivity(intent);
}
}
else if (response.overWeight()) {
<API key>();
}
else if (response.hasExpireGood()) {
<API key>();
}
else if (response.belowMinPrice()) {
showWarning(response.message);
}
else {
showWarning(response.message);
}
}
void <API key>() {
WGOverHeightRequest request = new WGOverHeightRequest();
request.addressId = "" + mData.address.addressId;
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
if (response.data != null) {
mData.deliverTime.resetWithTimes(response.data.deliverTimes);
mData.minPriceTips = response.data.minPriceTips;
mData.consumePrice = response.data.price;
refreshUI();
WGOrderExpireGood expireGood = response.data.expireGood;
if (expireGood != null) {
expireGood.canChangeTime = false;
showExpireGood(expireGood);
}
else {
if (response.data.overWeight != null && response.data.overWeight.size() > 0) {
showOverWeightGood(response.data.overWeight);
}
}
}
}
else {
showWarning(response.message);
}
}
void <API key>() {
<API key> request = new <API key>();
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
<API key>();
mOverWeightView.dismiss();
}
else {
showWarning(response.message);
}
}
void loadOverHeightReset(List<WGOverHeightDetail> list) {
<API key> request = new <API key>();
StringBuilder idBuilder = new StringBuilder();
StringBuilder countBuilder = new StringBuilder();
WGOverHeightDetail detail = list.get(0);
for (<API key> item : detail.goods) {
idBuilder.append(item.shopCartId);
idBuilder.append(",");
countBuilder.append(item.goodCount);
countBuilder.append(",");
}
if (idBuilder.length() > 0) {
idBuilder.deleteCharAt(idBuilder.length()-1);
countBuilder.deleteCharAt(countBuilder.length()-1);
}
request.goodIds = idBuilder.toString();
request.goodCounts = countBuilder.toString();
this.postAsyn(request, <API key>.class, new JHResponseCallBack() {
@Override
public void onSuccess(JHResponse result) {
<API key>((<API key>) result);
}
@Override
public void onFailure(JHRequestError error) {
Log.e("onFailure", error.toString());
}
});
}
void <API key>(<API key> response) {
Log.e("onSuccess", JSON.toJSONString(response));
if (response.success()) {
<API key>();
mOverWeightView.dismiss();
}
else {
showWarning(response.message);
}
}
} |
// Fig. 8.19: hugeint1.cpp
// HugeInt member-function and friend-function definitions.
#include <cctype> // isdigit function prototype
#include <cstring> // strlen function prototype
#include "hugeint1.h" // HugeInt class definition
// default constructor; conversion constructor that converts
// a long integer into a HugeInt object
HugeInt::HugeInt( long value )
{
// initialize array to zero
for ( int i = 0; i <= 29; i++ )
integer[ i ] = 0;
// place digits of argument into array
for ( int j = 29; value != 0 && j >= 0; j
integer[ j ] = value % 10;
value /= 10;
} // end for
} // end HugeInt default/conversion constructor
// conversion constructor that converts a character string
// representing a large integer into a HugeInt object
HugeInt::HugeInt( const char *string )
{
// initialize array to zero
for ( int i = 0; i <= 29; i++ )
integer[ i ] = 0;
// place digits of argument into array
int length = strlen( string );
for ( int j = 30 - length, k = 0; j <= 29; j++, k++ )
if ( isdigit( string[ k ] ) )
integer[ j ] = string[ k ] - '0';
} // end HugeInt conversion constructor
// addition operator; HugeInt + HugeInt
HugeInt HugeInt::operator+( const HugeInt &op2 )
{
HugeInt temp; // temporary result
int carry = 0;
for ( int i = 29; i >= 0; i
temp.integer[ i ] =
integer[ i ] + op2.integer[ i ] + carry;
// determine whether to carry a 1
if ( temp.integer[ i ] > 9 ) {
temp.integer[ i ] %= 10; // reduce to 0-9
carry = 1;
} // end if
// no carry
else
carry = 0;
}
return temp; // return copy of temporary object
} // end function operator+
// addition operator; HugeInt + int
HugeInt HugeInt::operator+( int op2 )
{
// convert op2 to a HugeInt, then invoke
// operator+ for two HugeInt objects
return *this + HugeInt( op2 );
} // end function operator+
// addition operator;
// HugeInt + string that represents large integer value
HugeInt HugeInt::operator+( const char *op2 )
{
// convert op2 to a HugeInt, then invoke
// operator+ for two HugeInt objects
return *this + HugeInt( op2 );
} // end operator+
// overloaded output operator
ostream& operator<<( ostream &output, const HugeInt &num )
{
int i;
for ( i = 0; ( num.integer[ i ] == 0 ) && ( i <= 29 ); i++ )
; // skip leading zeros
if ( i == 30 )
output << 0;
else
for ( ; i <= 29; i++ )
output << num.integer[ i ];
return output;
} // end function operator<< |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.