answer
stringlengths 15
1.25M
|
|---|
<html>
<head>
</head>
<body>
<p>A package allowing calculations on windows of latitude and longitude.
The goal is to allow you to specify a window and be able to test whether
or not LatLng points lie within the window.</p>
</body>
</html>
|
<?php
return array (
'<strong>Latest</strong> activities' => '<strong>Лента</strong> активности',
'There are no activities yet.' => 'Пока ничего нет',
);
|
package com.nike.wingtips.apache.httpclient.util;
import com.nike.wingtips.Span;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
import org.apache.http.HttpRequest;
import org.apache.http.RequestLine;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.UUID;
import static com.nike.wingtips.TraceHeaders.PARENT_SPAN_ID;
import static com.nike.wingtips.TraceHeaders.SPAN_ID;
import static com.nike.wingtips.TraceHeaders.TRACE_ID;
import static com.nike.wingtips.TraceHeaders.TRACE_SAMPLED;
import static com.nike.wingtips.http.<API key>.<API key>;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.<API key>;
/**
* Tests the functionality of {@link <API key>}.
*
* @author Nic Munroe
*/
@RunWith(DataProviderRunner.class)
public class <API key> {
private HttpRequest requestMock;
private RequestLine requestLineMock;
@Before
public void beforeMethod() {
requestMock = mock(HttpRequest.class);
requestLineMock = mock(RequestLine.class);
doReturn(requestLineMock).when(requestMock).getRequestLine();
}
@Test
public void code_coverage_hoops() {
// jump!
new <API key>();
}
@DataProvider(value = {
"true | true",
"true | false",
"false | true",
"false | false"
}, splitBy = "\\|")
@Test
public void <API key>(
boolean requestIsNull, boolean spanIsNull
) {
// given
if (requestIsNull)
requestMock = null;
Span spanSpy = (spanIsNull)
? null
: spy(Span.newBuilder(UUID.randomUUID().toString(), Span.SpanPurpose.CLIENT)
.withParentSpanId(UUID.randomUUID().toString())
.build());
// when
<API key>.<API key>(requestMock, spanSpy);
// then
if (requestIsNull || spanIsNull) {
if (requestMock != null)
<API key>(requestMock);
if (spanSpy != null)
<API key>(spanSpy);
}
else {
verify(requestMock).setHeader(TRACE_ID, spanSpy.getTraceId());
verify(requestMock).setHeader(SPAN_ID, spanSpy.getSpanId());
verify(requestMock)
.setHeader(TRACE_SAMPLED, <API key>(spanSpy.isSampleable()));
verify(requestMock).setHeader(PARENT_SPAN_ID, spanSpy.getParentSpanId());
}
}
@DataProvider(value = {
"true",
"false"
})
@Test
public void <API key>(
boolean sampleable
) {
// given
Span span = Span.newBuilder("foo", Span.SpanPurpose.CLIENT)
.withSampleable(sampleable)
.build();
// when
<API key>.<API key>(requestMock, span);
// then
verify(requestMock)
.setHeader(TRACE_SAMPLED, <API key>(span.isSampleable()));
}
@DataProvider(value = {
"true",
"false"
})
@Test
public void propagateTracingHeaders_only_sends_parent_span_id_header_if_parent_span_id_exists(
boolean parentSpanIdExists
) {
// given
String parentSpanId = (parentSpanIdExists) ? UUID.randomUUID().toString() : null;
Span span = Span.newBuilder("foo", Span.SpanPurpose.CLIENT)
.withParentSpanId(parentSpanId)
.build();
// when
<API key>.<API key>(requestMock, span);
// then
if (parentSpanIdExists) {
verify(requestMock).setHeader(PARENT_SPAN_ID, parentSpanId);
}
else {
verify(requestMock, never()).setHeader(eq(PARENT_SPAN_ID), anyString());
}
}
@DataProvider(value = {
"someHttpMethod | <API key>",
"null | <API key>",
" | <API key>",
"[whitespace] | <API key>",
}, splitBy = "\\|")
@Test
public void <API key>(String httpMethod, String expectedResult) {
// given
if ("[whitespace]".equals(httpMethod)) {
httpMethod = " \n\r\t ";
}
doReturn(httpMethod).when(requestLineMock).getMethod();
// when
String result = <API key>.<API key>(requestMock);
// then
assertThat(result).isEqualTo(expectedResult);
}
}
|
// NOTE: This file was generated by the ServiceGenerator.
// API:
// Admin Directory API (admin/directory_v1)
// Description:
// The Admin SDK Directory API lets you view and manage enterprise resources
// such as users and groups, administrative notifications, security features,
// and more.
// Documentation:
#import "<API key>.h"
#import "GTLRDirectoryQuery.h"
#import "<API key>.h"
|
#include <sys/__assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <sys/printk.h>
#include <sys/util.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <zephyr/types.h>
#include <data/json.h>
struct token {
enum json_tokens type;
char *start;
char *end;
};
struct lexer {
void *(*state)(struct lexer *lexer);
char *start;
char *pos;
char *end;
struct token token;
};
struct json_obj {
struct lexer lexer;
};
struct json_obj_key_value {
const char *key;
size_t key_len;
struct token value;
};
static bool lexer_consume(struct lexer *lexer, struct token *token,
enum json_tokens empty_token)
{
if (lexer->token.type == empty_token) {
return false;
}
*token = lexer->token;
lexer->token.type = empty_token;
return true;
}
static bool lexer_next(struct lexer *lexer, struct token *token)
{
while (lexer->state) {
if (lexer_consume(lexer, token, JSON_TOK_NONE)) {
return true;
}
lexer->state = lexer->state(lexer);
}
return lexer_consume(lexer, token, JSON_TOK_EOF);
}
static void *lexer_json(struct lexer *lexer);
static void emit(struct lexer *lexer, enum json_tokens token)
{
lexer->token.type = token;
lexer->token.start = lexer->start;
lexer->token.end = lexer->pos;
lexer->start = lexer->pos;
}
static int next(struct lexer *lexer)
{
if (lexer->pos >= lexer->end) {
lexer->pos = lexer->end + 1;
return '\0';
}
return *lexer->pos++;
}
static void ignore(struct lexer *lexer)
{
lexer->start = lexer->pos;
}
static void backup(struct lexer *lexer)
{
lexer->pos
}
static int peek(struct lexer *lexer)
{
int chr = next(lexer);
backup(lexer);
return chr;
}
static void *lexer_string(struct lexer *lexer)
{
ignore(lexer);
while (true) {
int chr = next(lexer);
if (chr == '\0') {
emit(lexer, JSON_TOK_ERROR);
return NULL;
}
if (chr == '\\') {
switch (next(lexer)) {
case '"':
case '\\':
case '/':
case 'b':
case 'f':
case 'n':
case 'r':
case 't':
continue;
case 'u':
if (!isxdigit(next(lexer))) {
goto error;
}
if (!isxdigit(next(lexer))) {
goto error;
}
if (!isxdigit(next(lexer))) {
goto error;
}
if (!isxdigit(next(lexer))) {
goto error;
}
break;
default:
goto error;
}
}
if (chr == '"') {
backup(lexer);
emit(lexer, JSON_TOK_STRING);
next(lexer);
ignore(lexer);
return lexer_json;
}
}
error:
emit(lexer, JSON_TOK_ERROR);
return NULL;
}
static int accept_run(struct lexer *lexer, const char *run)
{
for (; *run; run++) {
if (next(lexer) != *run) {
return -EINVAL;
}
}
return 0;
}
static void *lexer_boolean(struct lexer *lexer)
{
backup(lexer);
switch (next(lexer)) {
case 't':
if (!accept_run(lexer, "rue")) {
emit(lexer, JSON_TOK_TRUE);
return lexer_json;
}
break;
case 'f':
if (!accept_run(lexer, "alse")) {
emit(lexer, JSON_TOK_FALSE);
return lexer_json;
}
break;
}
emit(lexer, JSON_TOK_ERROR);
return NULL;
}
static void *lexer_null(struct lexer *lexer)
{
if (accept_run(lexer, "ull") < 0) {
emit(lexer, JSON_TOK_ERROR);
return NULL;
}
emit(lexer, JSON_TOK_NULL);
return lexer_json;
}
static void *lexer_number(struct lexer *lexer)
{
while (true) {
int chr = next(lexer);
if (isdigit(chr) || chr == '.') {
continue;
}
backup(lexer);
emit(lexer, JSON_TOK_NUMBER);
return lexer_json;
}
}
static void *lexer_json(struct lexer *lexer)
{
while (true) {
int chr = next(lexer);
switch (chr) {
case '\0':
emit(lexer, JSON_TOK_EOF);
return NULL;
case '}':
case '{':
case '[':
case ']':
case ',':
case ':':
emit(lexer, (enum json_tokens)chr);
return lexer_json;
case '"':
return lexer_string;
case 'n':
return lexer_null;
case 't':
case 'f':
return lexer_boolean;
case '-':
if (isdigit(peek(lexer))) {
return lexer_number;
}
__fallthrough;
default:
if (isspace(chr)) {
ignore(lexer);
continue;
}
if (isdigit(chr)) {
return lexer_number;
}
emit(lexer, JSON_TOK_ERROR);
return NULL;
}
}
}
static void lexer_init(struct lexer *lexer, char *data, size_t len)
{
lexer->state = lexer_json;
lexer->start = data;
lexer->pos = data;
lexer->end = data + len;
lexer->token.type = JSON_TOK_NONE;
}
static int obj_init(struct json_obj *json, char *data, size_t len)
{
struct token token;
lexer_init(&json->lexer, data, len);
if (!lexer_next(&json->lexer, &token)) {
return -EINVAL;
}
if (token.type != <API key>) {
return -EINVAL;
}
return 0;
}
static int element_token(enum json_tokens token)
{
switch (token) {
case <API key>:
case JSON_TOK_LIST_START:
case JSON_TOK_STRING:
case JSON_TOK_NUMBER:
case JSON_TOK_TRUE:
case JSON_TOK_FALSE:
return 0;
default:
return -EINVAL;
}
}
static int obj_next(struct json_obj *json,
struct json_obj_key_value *kv)
{
struct token token;
if (!lexer_next(&json->lexer, &token)) {
return -EINVAL;
}
/* Match end of object or next key */
switch (token.type) {
case JSON_TOK_OBJECT_END:
kv->key = NULL;
kv->key_len = 0;
kv->value = token;
return 0;
case JSON_TOK_COMMA:
if (!lexer_next(&json->lexer, &token)) {
return -EINVAL;
}
if (token.type != JSON_TOK_STRING) {
return -EINVAL;
}
__fallthrough;
case JSON_TOK_STRING:
kv->key = token.start;
kv->key_len = (size_t)(token.end - token.start);
break;
default:
return -EINVAL;
}
/* Match : after key */
if (!lexer_next(&json->lexer, &token)) {
return -EINVAL;
}
if (token.type != JSON_TOK_COLON) {
return -EINVAL;
}
/* Match value */
if (!lexer_next(&json->lexer, &kv->value)) {
return -EINVAL;
}
return element_token(kv->value.type);
}
static int arr_next(struct json_obj *json, struct token *value)
{
if (!lexer_next(&json->lexer, value)) {
return -EINVAL;
}
if (value->type == JSON_TOK_LIST_END) {
return 0;
}
if (value->type == JSON_TOK_COMMA) {
if (!lexer_next(&json->lexer, value)) {
return -EINVAL;
}
}
return element_token(value->type);
}
static int decode_num(const struct token *token, int32_t *num)
{
/* FIXME: strtod() is not available in newlib/minimal libc,
* so using strtol() here.
*/
char *endptr;
char prev_end;
prev_end = *token->end;
*token->end = '\0';
errno = 0;
*num = strtol(token->start, &endptr, 10);
*token->end = prev_end;
if (errno != 0) {
return -errno;
}
if (endptr != token->end) {
return -EINVAL;
}
return 0;
}
static bool equivalent_types(enum json_tokens type1, enum json_tokens type2)
{
if (type1 == JSON_TOK_TRUE || type1 == JSON_TOK_FALSE) {
return type2 == JSON_TOK_TRUE || type2 == JSON_TOK_FALSE;
}
return type1 == type2;
}
static int obj_parse(struct json_obj *obj,
const struct json_obj_descr *descr, size_t descr_len,
void *val);
static int arr_parse(struct json_obj *obj,
const struct json_obj_descr *elem_descr,
size_t max_elements, void *field, void *val);
static int decode_value(struct json_obj *obj,
const struct json_obj_descr *descr,
struct token *value, void *field, void *val)
{
if (!equivalent_types(value->type, descr->type)) {
return -EINVAL;
}
switch (descr->type) {
case <API key>:
return obj_parse(obj, descr->object.sub_descr,
descr->object.sub_descr_len,
field);
case JSON_TOK_LIST_START:
return arr_parse(obj, descr->array.element_descr,
descr->array.n_elements, field, val);
case JSON_TOK_FALSE:
case JSON_TOK_TRUE: {
bool *v = field;
*v = value->type == JSON_TOK_TRUE;
return 0;
}
case JSON_TOK_NUMBER: {
int32_t *num = field;
return decode_num(value, num);
}
case JSON_TOK_STRING: {
char **str = field;
*value->end = '\0';
*str = value->start;
return 0;
}
default:
return -EINVAL;
}
}
static ptrdiff_t get_elem_size(const struct json_obj_descr *descr)
{
switch (descr->type) {
case JSON_TOK_NUMBER:
return sizeof(int32_t);
case JSON_TOK_STRING:
return sizeof(char *);
case JSON_TOK_TRUE:
case JSON_TOK_FALSE:
return sizeof(bool);
case JSON_TOK_LIST_START:
return descr->array.n_elements * get_elem_size(descr->array.element_descr);
case <API key>: {
ptrdiff_t total = 0;
size_t i;
for (i = 0; i < descr->object.sub_descr_len; i++) {
ptrdiff_t s = get_elem_size(&descr->object.sub_descr[i]);
total += ROUND_UP(s, 1 << descr->align_shift);
}
return total;
}
default:
return -EINVAL;
}
}
static int arr_parse(struct json_obj *obj,
const struct json_obj_descr *elem_descr,
size_t max_elements, void *field, void *val)
{
ptrdiff_t elem_size = get_elem_size(elem_descr);
void *last_elem = (char *)field + elem_size * max_elements;
size_t *elements = (size_t *)((char *)val + elem_descr->offset);
struct token value;
__ASSERT_NO_MSG(elem_size > 0);
*elements = 0;
while (!arr_next(obj, &value)) {
if (value.type == JSON_TOK_LIST_END) {
return 0;
}
if (field == last_elem) {
return -ENOSPC;
}
if (decode_value(obj, elem_descr, &value, field, val) < 0) {
return -EINVAL;
}
(*elements)++;
field = (char *)field + elem_size;
}
return -EINVAL;
}
static int obj_parse(struct json_obj *obj, const struct json_obj_descr *descr,
size_t descr_len, void *val)
{
struct json_obj_key_value kv;
int32_t decoded_fields = 0;
size_t i;
int ret;
while (!obj_next(obj, &kv)) {
if (kv.value.type == JSON_TOK_OBJECT_END) {
return decoded_fields;
}
for (i = 0; i < descr_len; i++) {
void *decode_field = (char *)val + descr[i].offset;
/* Field has been decoded already, skip */
if (decoded_fields & (1 << i)) {
continue;
}
/* Check if it's the i-th field */
if (kv.key_len != descr[i].field_name_len) {
continue;
}
if (memcmp(kv.key, descr[i].field_name,
descr[i].field_name_len)) {
continue;
}
/* Store the decoded value */
ret = decode_value(obj, &descr[i], &kv.value,
decode_field, val);
if (ret < 0) {
return ret;
}
decoded_fields |= 1<<i;
break;
}
}
return -EINVAL;
}
int json_obj_parse(char *payload, size_t len,
const struct json_obj_descr *descr, size_t descr_len,
void *val)
{
struct json_obj obj;
int ret;
__ASSERT_NO_MSG(descr_len < (sizeof(ret) * CHAR_BIT - 1));
ret = obj_init(&obj, payload, len);
if (ret < 0) {
return ret;
}
return obj_parse(&obj, descr, descr_len, val);
}
static char escape_as(char chr)
{
switch (chr) {
case '"':
return '"';
case '\\':
return '\\';
case '\b':
return 'b';
case '\f':
return 'f';
case '\n':
return 'n';
case '\r':
return 'r';
case '\t':
return 't';
}
return 0;
}
static int <API key>(const char *str,
json_append_bytes_t append_bytes,
void *data)
{
const char *cur;
int ret = 0;
for (cur = str; ret == 0 && *cur; cur++) {
char escaped = escape_as(*cur);
if (escaped) {
char bytes[2] = { '\\', escaped };
ret = append_bytes(bytes, 2, data);
} else {
ret = append_bytes(cur, 1, data);
}
}
return ret;
}
size_t <API key>(const char *str, size_t len)
{
size_t escaped_len = len;
size_t pos;
for (pos = 0; pos < len; pos++) {
if (escape_as(str[pos])) {
escaped_len++;
}
}
return escaped_len;
}
ssize_t json_escape(char *str, size_t *len, size_t buf_size)
{
char *next; /* Points after next character to escape. */
char *dest; /* Points after next place to write escaped character. */
size_t escaped_len = <API key>(str, *len);
if (escaped_len == *len) {
/*
* If no escape is necessary, there is nothing to do.
*/
return 0;
}
if (escaped_len >= buf_size) {
return -ENOMEM;
}
/*
* By walking backwards in the buffer from the end positions
* of both the original and escaped strings, we avoid using
* extra space. Characters in the original string are
* overwritten only after they have already been escaped.
*/
str[escaped_len] = '\0';
for (next = &str[*len], dest = &str[escaped_len]; next != str;) {
char next_c = *(--next);
char escape = escape_as(next_c);
if (escape) {
*(--dest) = escape;
*(--dest) = '\\';
} else {
*(--dest) = next_c;
}
}
*len = escaped_len;
return 0;
}
static int encode(const struct json_obj_descr *descr, const void *val,
json_append_bytes_t append_bytes, void *data);
static int arr_encode(const struct json_obj_descr *elem_descr,
const void *field, const void *val,
json_append_bytes_t append_bytes, void *data)
{
ptrdiff_t elem_size = get_elem_size(elem_descr);
/*
* NOTE: Since an element descriptor's offset isn't meaningful
* (array elements occur at multiple offsets in `val'), we use
* its space in elem_descr to store the offset to the field
* containing the number of elements.
*/
size_t n_elem = *(size_t *)((char *)val + elem_descr->offset);
size_t i;
int ret;
ret = append_bytes("[", 1, data);
if (ret < 0) {
return ret;
}
for (i = 0; i < n_elem; i++) {
/*
* Though "field" points at the next element in the
* array which we need to encode, the value in
* elem_descr->offset is actually the offset of the
* length field in the "parent" struct containing the
* array.
*
* To patch things up, we lie to encode() about where
* the field is by exactly the amount it will offset
* it. This is a size optimization for struct
* json_obj_descr: the alternative is to keep a
* separate field next to element_descr which is an
* offset to the length field in the parent struct,
* but that would add a size_t to every descriptor.
*/
ret = encode(elem_descr, (char *)field - elem_descr->offset,
append_bytes, data);
if (ret < 0) {
return ret;
}
if (i < n_elem - 1) {
ret = append_bytes(",", 1, data);
if (ret < 0) {
return ret;
}
}
field = (char *)field + elem_size;
}
return append_bytes("]", 1, data);
}
static int str_encode(const char **str, json_append_bytes_t append_bytes,
void *data)
{
int ret;
ret = append_bytes("\"", 1, data);
if (ret < 0) {
return ret;
}
ret = <API key>(*str, append_bytes, data);
if (!ret) {
return append_bytes("\"", 1, data);
}
return ret;
}
static int num_encode(const int32_t *num, json_append_bytes_t append_bytes,
void *data)
{
char buf[3 * sizeof(int32_t)];
int ret;
ret = snprintk(buf, sizeof(buf), "%d", *num);
if (ret < 0) {
return ret;
}
if (ret >= (int)sizeof(buf)) {
return -ENOMEM;
}
return append_bytes(buf, (size_t)ret, data);
}
static int bool_encode(const bool *value, json_append_bytes_t append_bytes,
void *data)
{
if (*value) {
return append_bytes("true", 4, data);
}
return append_bytes("false", 5, data);
}
static int encode(const struct json_obj_descr *descr, const void *val,
json_append_bytes_t append_bytes, void *data)
{
void *ptr = (char *)val + descr->offset;
switch (descr->type) {
case JSON_TOK_FALSE:
case JSON_TOK_TRUE:
return bool_encode(ptr, append_bytes, data);
case JSON_TOK_STRING:
return str_encode(ptr, append_bytes, data);
case JSON_TOK_LIST_START:
return arr_encode(descr->array.element_descr, ptr,
val, append_bytes, data);
case <API key>:
return json_obj_encode(descr->object.sub_descr,
descr->object.sub_descr_len,
ptr, append_bytes, data);
case JSON_TOK_NUMBER:
return num_encode(ptr, append_bytes, data);
default:
return -EINVAL;
}
}
int json_obj_encode(const struct json_obj_descr *descr, size_t descr_len,
const void *val, json_append_bytes_t append_bytes,
void *data)
{
size_t i;
int ret;
ret = append_bytes("{", 1, data);
if (ret < 0) {
return ret;
}
for (i = 0; i < descr_len; i++) {
ret = str_encode((const char **)&descr[i].field_name,
append_bytes, data);
if (ret < 0) {
return ret;
}
ret = append_bytes(":", 1, data);
if (ret < 0) {
return ret;
}
ret = encode(&descr[i], val, append_bytes, data);
if (ret < 0) {
return ret;
}
if (i < descr_len - 1) {
ret = append_bytes(",", 1, data);
if (ret < 0) {
return ret;
}
}
}
return append_bytes("}", 1, data);
}
int json_arr_encode(const struct json_obj_descr *descr, const void *val,
json_append_bytes_t append_bytes, void *data)
{
void *ptr = (char *)val + descr->offset;
return arr_encode(descr->array.element_descr, ptr, val, append_bytes,
data);
}
struct appender {
char *buffer;
size_t used;
size_t size;
};
static int append_bytes_to_buf(const char *bytes, size_t len, void *data)
{
struct appender *appender = data;
if (len >= appender->size - appender->used) {
return -ENOMEM;
}
memcpy(appender->buffer + appender->used, bytes, len);
appender->used += len;
appender->buffer[appender->used] = '\0';
return 0;
}
int json_obj_encode_buf(const struct json_obj_descr *descr, size_t descr_len,
const void *val, char *buffer, size_t buf_size)
{
struct appender appender = { .buffer = buffer, .size = buf_size };
return json_obj_encode(descr, descr_len, val, append_bytes_to_buf,
&appender);
}
int json_arr_encode_buf(const struct json_obj_descr *descr, const void *val,
char *buffer, size_t buf_size)
{
struct appender appender = { .buffer = buffer, .size = buf_size };
return json_arr_encode(descr, val, append_bytes_to_buf, &appender);
}
static int measure_bytes(const char *bytes, size_t len, void *data)
{
ssize_t *total = data;
*total += (ssize_t)len;
ARG_UNUSED(bytes);
return 0;
}
ssize_t <API key>(const struct json_obj_descr *descr,
size_t descr_len, const void *val)
{
ssize_t total = 0;
int ret;
ret = json_obj_encode(descr, descr_len, val, measure_bytes, &total);
if (ret < 0) {
return ret;
}
return total;
}
|
#include <Inventor/SoLists.h>
#include <Inventor/nodes/SoCamera.h>
#include <Inventor/nodes/SoComplexity.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoDrawStyle.h>
#include <Inventor/nodes/SoEnvironment.h>
#include <Inventor/nodes/SoFont.h>
#include <Inventor/nodes/SoLightModel.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/nodes/SoMaterialBinding.h>
#include <Inventor/nodes/SoMatrixTransform.h>
#include <Inventor/nodes/SoNormal.h>
#include <Inventor/nodes/SoNormalBinding.h>
#include <Inventor/nodes/<API key>.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/nodes/SoShapeHints.h>
#include <Inventor/nodes/SoTexture2.h>
#include <Inventor/nodes/SoTexture2Transform.h>
#include <Inventor/nodes/<API key>.h>
#include <Inventor/nodes/<API key>.h>
#include "IfAssert.h"
#include "IfShape.h"
// Constructor.
IfShape::IfShape()
{
// Level 1:
camera = NULL;
// Level 2:
lights = NULL;
clipPlanes = NULL;
environment = NULL;
lightModel = NULL;
// Level 3:
texture = NULL;
// Level 4:
drawStyle = NULL;
shapeHints = NULL;
material = NULL;
other = NULL;
// Level 5:
complexity = NULL;
coords = NULL;
font = NULL;
materialBinding = NULL;
normals = NULL;
normalBinding = NULL;
profileCoords = NULL;
profiles = NULL;
texCoords = NULL;
texCoordBinding = NULL;
// IfShape:
shape = NULL;
transform.makeIdentity();
textureTransforms = NULL;
differenceLevel = -1;
differenceCode = NONE;
dontFlatten = FALSE;
}
// Destructor.
IfShape::~IfShape()
{
clearNodes();
}
// This compares two IfShape instances and returns the first level
// (1-5) at which they differ, a comparison code (-1, 0, or +1)
// to indicate the result, and a more specific difference code.
int
IfShape::compare(const IfShape *s1, const IfShape *s2,
int &level, DifferenceCode &diffCode)
{
// The first two macros are used to make quick comparisons between
// nodes that are unlikely to differ from one shape to the
// next. They just compare node pointers for equality. Nodes that
// are compared by examining values in fields are handled
// specially, using the other macros.
#define COMPARE_NODES(node, code) \
if (s1->node != s2->node) { \
diffCode = code; \
return s2->node - s1->node; \
}
#define COMPARE_LISTS(list, code) \
if (s1->list != s2->list) { \
int c = compareLists(s1->list, s2->list); \
if (c != 0) { \
diffCode = code; \
return c; \
} \
}
#define <API key>(node, code) \
if (s1->node == NULL) { \
diffCode = code; \
return -1; \
} \
if (s2->node == NULL) { \
diffCode = code; \
return 1; \
}
#define COMPARE_INT_FIELDS(node, field, code) \
if (s1->node->field.getValue() != s2->node->field.getValue()) { \
diffCode = code; \
return ((int) s2->node->field.getValue() - \
(int) s1->node->field.getValue()); \
}
#define <API key>(node, field, code) \
if (s1->node->field.getValue() != s2->node->field.getValue()) { \
int c = compareFloats(s1->node->field.getValue(), \
s2->node->field.getValue()); \
if (c != 0) { \
diffCode = code; \
return c; \
} \
}
#define <API key>(node, field, code) \
if (s1->node->field.getNum() != s2->node->field.getNum()) \
return s2->node->field.getNum() - s1->node->field.getNum(); \
if (s1->node->field.getNum() == 1) { \
int c = compareFloats(s1->node->field[0], s2->node->field[0]); \
if (c != 0) { \
diffCode = code; \
return c; \
} \
} \
else { \
diffCode = code; \
return s2->node - s1->node; \
}
#define <API key>(node, field, code) \
if (s1->node->field.getNum() != s2->node->field.getNum()) \
return s2->node->field.getNum() - s1->node->field.getNum(); \
if (s1->node->field.getNum() == 1) { \
int c = compareColors(s1->node->field[0], s2->node->field[0]); \
if (c != 0) { \
diffCode = code; \
return c; \
} \
} \
else { \
diffCode = code; \
return s2->node - s1->node; \
}
level = 1;
COMPARE_NODES(camera, CAMERA);
level = 2;
COMPARE_LISTS(lights, LIGHTS);
COMPARE_LISTS(clipPlanes, CLIP_PLANES);
COMPARE_NODES(environment, ENVIRONMENT);
COMPARE_NODES(lightModel, LIGHT_MODEL);
level = 3;
// Comparing textures uses the file names if they are set
if (s1->texture != s2->texture) {
<API key>(texture, TEXTURE);
const SbString &name1 = s1->texture->filename.getValue();
const SbString &name2 = s2->texture->filename.getValue();
// If no names, use the texture nodes themselves
if (! name1)
return s2->texture - s1->texture;
int c = strcmp(name1.getString(), name2.getString());
if (c != 0)
return c;
}
level = 4;
// Comparing draw style tests the values in the nodes
if (s1->drawStyle != s2->drawStyle) {
<API key>(drawStyle, DRAW_STYLE);
COMPARE_INT_FIELDS(drawStyle, style, DRAW_STYLE);
<API key>(drawStyle, pointSize, DRAW_STYLE);
<API key>(drawStyle, lineWidth, DRAW_STYLE);
COMPARE_INT_FIELDS(drawStyle, linePattern, DRAW_STYLE);
}
// Comparing shape hints tests the values in the nodes
if (s1->shapeHints != s2->shapeHints) {
<API key>(shapeHints, SHAPE_HINTS);
COMPARE_INT_FIELDS(shapeHints, vertexOrdering, SHAPE_HINTS);
COMPARE_INT_FIELDS(shapeHints, shapeType, SHAPE_HINTS);
COMPARE_INT_FIELDS(shapeHints, faceType, SHAPE_HINTS);
<API key>(shapeHints, creaseAngle, SHAPE_HINTS);
}
COMPARE_LISTS(other, OTHER);
// Comparing materials tests the values in the nodes if there is
// only one material in each.
// NOTE: the material comparison has to come last within this
// level so that the IfMerger stuff works properly.
if (s1->material != s2->material) {
<API key>(material, MATERIAL);
<API key>(material, ambientColor, MATERIAL);
<API key>(material, diffuseColor, MATERIAL);
<API key>(material, specularColor, MATERIAL);
<API key>(material, emissiveColor, MATERIAL);
<API key>(material, shininess, MATERIAL);
<API key>(material, transparency, MATERIAL);
}
// If nothing else differs, the shape must. We usually consider
// them to be the same in this case. However, if the shape is not
// really a shape (it may be a File or similar node), we need to
// make sure it is not "flattened" later on. To indicate this, we
// return a level 5 difference. (We can still return that they are
// the same, since the difference matters only after they have
// been sorted, when the levels are computed for real.)
if (s1->dontFlatten || s2->dontFlatten) {
level = 5;
return 0;
}
// If we got here, they're the same, except for the
// shape. Consider them to be the same, even though they actually
// differ at Level 5.
level = 0;
return 0;
#undef COMPARE_NODES
#undef COMPARE_LISTS
}
// Compares two node lists for equality.
int
IfShape::compareLists(const SoNodeList *l1, const SoNodeList *l2)
{
if (l1 == NULL)
return -1;
if (l2 == NULL)
return 1;
if (l1->getLength() != l2->getLength())
return l2->getLength() - l1->getLength();
for (int i = 0; i < l1->getLength(); i++)
if ((*l1)[i] != (*l2)[i])
return (*l2)[i] - (*l2)[i];
return 0;
}
// Compares two floating point numbers for equality.
int
IfShape::compareFloats(float f1, float f2)
{
if (f1 < f2)
return -1;
else if (f1 > f2)
return 1;
else
return 0;
}
// Compares two colors for equality.
int
IfShape::compareColors(const SbColor &c1, const SbColor &c2)
{
for (int i = 0; i < 3; i++) {
if (c1[i] < c2[i])
return -1;
else if (c1[i] > c2[i])
return 1;
}
return 0;
}
// Adds the appropriate nodes for the given level to the given
// group node.
void
IfShape::addNodesForLevel(SoGroup *group, int level)
{
#define ADD_NODE(n) if (n != NULL) group->addChild(n)
#define ADD_LIST(l) if (l != NULL) { \
for (i = 0; i < (*l).getLength(); i++) \
group->addChild((*l)[i]); \
}
int i;
ASSERT(level > 0 && level <= 5);
switch (level) {
case 1:
ADD_NODE(camera);
break;
case 2:
ADD_LIST(lights);
ADD_LIST(clipPlanes);
ADD_NODE(environment);
ADD_NODE(lightModel);
break;
case 3:
ADD_NODE(texture);
break;
case 4:
ADD_NODE(drawStyle);
ADD_NODE(shapeHints);
ADD_NODE(material);
ADD_LIST(other);
break;
case 5:
// For level 5, we add each set of nodes under its own
// separator
{
SoSeparator *sep = new SoSeparator;
group->addChild(sep);
group = sep;
}
ADD_NODE(complexity);
ADD_NODE(coords);
ADD_NODE(font);
ADD_NODE(materialBinding);
ADD_NODE(normals);
ADD_NODE(normalBinding);
ADD_NODE(profileCoords);
ADD_LIST(profiles);
ADD_NODE(texCoords);
ADD_NODE(texCoordBinding);
// Handle matrices specially
if (transform != SbMatrix::identity()) {
SoMatrixTransform *xf = new SoMatrixTransform;
group->addChild(xf);
xf->matrix = transform;
}
ADD_LIST(textureTransforms);
ADD_NODE(shape);
break;
default:
fprintf(stderr, "Error in IfShape::addNodesForLevel(level %d)\n", level);
}
#undef ADD_NODE
#undef ADD_LIST
}
// Unref's non-NULL node pointers.
void
IfShape::clearNodes()
{
#define CLEAR_NODE(name) if (name != NULL) { name->unref(); name = NULL; }
#define CLEAR_LIST(name) if (name != NULL) { delete name; name = NULL; }
CLEAR_NODE(camera);
CLEAR_NODE(environment);
CLEAR_NODE(lightModel);
CLEAR_NODE(texture);
CLEAR_NODE(drawStyle);
CLEAR_NODE(shapeHints);
CLEAR_NODE(material);
CLEAR_NODE(complexity);
CLEAR_NODE(coords);
CLEAR_NODE(font);
CLEAR_NODE(materialBinding);
CLEAR_NODE(normals);
CLEAR_NODE(normalBinding);
CLEAR_NODE(profileCoords);
CLEAR_NODE(texCoords);
CLEAR_NODE(texCoordBinding);
CLEAR_NODE(shape);
CLEAR_LIST(lights);
CLEAR_LIST(clipPlanes);
CLEAR_LIST(other);
CLEAR_LIST(profiles);
#undef CLEAR_NODE
#undef CLEAR_LIST
}
|
#import <UIKit/UIKit.h>
#import "<API key>.h"
@interface <API key> : <API key>
@property(strong, nonatomic) IBOutlet UILabel *threadTitle;
@end
|
package com.oneandone.snmpman;
import org.kohsuke.args4j.CmdLineParser;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
public class <API key> {
@Test
public void testGetAgents() throws Exception {
final CommandLineOptions commandLineOptions = new CommandLineOptions();
final CmdLineParser cmdLineParser = new CmdLineParser(commandLineOptions);
cmdLineParser.parseArgument("-c", "src/test/resources/configuration/configuration.yaml");
assertEquals(commandLineOptions.<API key>().getName(), "configuration.yaml");
assertTrue(commandLineOptions.<API key>().exists());
assertTrue(commandLineOptions.<API key>().isFile());
}
@Test
public void testHelp() throws Exception {
final CommandLineOptions commandLineOptions = new CommandLineOptions();
final CmdLineParser cmdLineParser = new CmdLineParser(commandLineOptions);
cmdLineParser.parseArgument("-h");
assertTrue(commandLineOptions.isShowHelp());
}
}
|
package srpc
import (
"crypto/tls"
"github.com/Symantec/Dominator/lib/connpool"
)
func newClientResource(network, address string) *ClientResource {
clientResource := &ClientResource{
network: network,
address: address,
}
clientResource.<API key>.clientResource = clientResource
rp := connpool.GetResourcePool()
clientResource.resource = rp.Create(&clientResource.<API key>)
return clientResource
}
func (cr *ClientResource) getHTTP(tlsConfig *tls.Config,
cancelChannel <-chan struct{}, dialer connpool.Dialer) (*Client, error) {
cr.<API key>.tlsConfig = tlsConfig
cr.<API key>.dialer = dialer
if err := cr.resource.Get(cancelChannel); err != nil {
return nil, err
}
cr.inUse = true
clientMetricsMutex.Lock()
<API key>++
clientMetricsMutex.Unlock()
return cr.client, nil
}
func (client *Client) put() {
client.resource.resource.Put()
if client.resource.inUse {
clientMetricsMutex.Lock()
<API key>
clientMetricsMutex.Unlock()
client.resource.inUse = false
}
}
func (pcr *<API key>) Allocate() error {
cr := pcr.clientResource
client, err := dialHTTP(cr.network, cr.address, pcr.tlsConfig, pcr.dialer)
if err != nil {
return err
}
cr.client = client
client.resource = cr
return nil
}
func (pcr *<API key>) Release() error {
cr := pcr.clientResource
err := cr.client.conn.Close()
cr.client = nil
return err
}
|
package com.mapswithme.maps.search;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.support.annotation.AttrRes;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.text.<API key>;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mapswithme.HotelUtils;
import com.mapswithme.maps.R;
import com.mapswithme.maps.bookmarks.data.FeatureId;
import com.mapswithme.maps.routing.RoutingController;
import com.mapswithme.maps.ugc.UGC;
import com.mapswithme.util.Graphics;
import com.mapswithme.util.ThemeUtils;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.Utils;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import static com.mapswithme.maps.search.SearchResult.<API key>;
import static com.mapswithme.maps.search.SearchResult.TYPE_RESULT;
import static com.mapswithme.maps.search.SearchResult.TYPE_SUGGEST;
import static com.mapswithme.util.Constants.Rating.<API key>;
class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.<API key>>
{
private final SearchFragment mSearchFragment;
@Nullable
private SearchResult[] mResults;
@NonNull
private final FilteredHotelIds mFilteredHotelIds = new FilteredHotelIds();
private final Drawable <API key>;
static abstract class <API key> extends RecyclerView.ViewHolder
{
<API key>(@NonNull View itemView)
{
super(itemView);
}
abstract void bind(@NonNull SearchResult result, int position);
}
private static abstract class <API key> extends <API key>
{
SearchResult mResult;
// Position within search results
int mOrder;
<API key>(@NonNull View view)
{
super(view);
if (view instanceof TextView)
{
int tintAttr = getTintAttr();
if (tintAttr != 0)
Graphics.tint((TextView)view, tintAttr);
}
view.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
processClick(mResult, mOrder);
}
});
}
@Override
void bind(@NonNull SearchResult result, int order)
{
mResult = result;
mOrder = order;
TextView titleView = getTitleView();
String title = mResult.name;
if (TextUtils.isEmpty(title))
{
SearchResult.Description description = mResult.description;
title = description != null
? Utils.<API key>(titleView.getContext(), description.featureType)
: "";
}
<API key> builder = new <API key>(title);
if (mResult.highlightRanges != null)
{
final int size = mResult.highlightRanges.length / 2;
int index = 0;
for (int i = 0; i < size; i++)
{
final int start = mResult.highlightRanges[index++];
final int len = mResult.highlightRanges[index++];
builder.setSpan(new StyleSpan(Typeface.BOLD), start, start + len, Spanned.<API key>);
}
}
if (titleView != null)
titleView.setText(builder);
}
@AttrRes int getTintAttr()
{
return R.attr.colorAccent;
}
abstract TextView getTitleView();
abstract void processClick(SearchResult result, int order);
}
private static class FilteredHotelIds
{
@NonNull
private final SparseArray<Set<FeatureId>> mFilteredHotelIds = new SparseArray<>();
void put(@BookingFilter.Type int type, @NonNull FeatureId[] hotelsId)
{
mFilteredHotelIds.put(type, new HashSet<>(Arrays.asList(hotelsId)));
}
boolean contains(@BookingFilter.Type int type, @NonNull FeatureId id)
{
Set<FeatureId> ids = mFilteredHotelIds.get(type);
return ids != null && ids.contains(id);
}
}
private class SuggestViewHolder extends <API key>
{
SuggestViewHolder(@NonNull View view)
{
super(view);
}
@Override
TextView getTitleView()
{
return (TextView) itemView;
}
@Override
void processClick(SearchResult result, int order)
{
mSearchFragment.setQuery(result.suggestion);
}
}
private class ResultViewHolder extends <API key>
{
@NonNull
final View mFrame;
@NonNull
final TextView mName;
@NonNull
final View mClosedMarker;
@NonNull
final View mPopularity;
@NonNull
final TextView mDescription;
@NonNull
final TextView mRegion;
@NonNull
final TextView mDistance;
@NonNull
final TextView mPriceCategory;
@NonNull
final View mSale;
@Override
int getTintAttr()
{
return 0;
}
// FIXME: Better format based on result type
private CharSequence formatDescription(SearchResult result, boolean isHotelAvailable)
{
String localizedType = Utils.<API key>(mFrame.getContext(),
result.description.featureType);
final <API key> res = new <API key>(localizedType);
final <API key> tail = new <API key>();
int stars = result.description.stars;
if (stars > 0 || result.description.rating != <API key> || isHotelAvailable)
{
if (stars > 0)
{
tail.append(" • ");
tail.append(HotelUtils.formatStars(stars, itemView.getResources()));
}
if (result.description.rating != <API key>)
{
Resources rs = itemView.getResources();
String s = rs.getString(R.string.<API key>,
UGC.nativeFormatRating(result.description.rating));
tail
.append(" • ")
.append(colorizeString(s, rs.getColor(R.color.base_green)));
}
if (isHotelAvailable)
{
Resources rs = itemView.getResources();
String s = itemView.getResources().getString(R.string.hotel_available);
if (tail.length() > 0)
tail.append(" • ");
tail.append(colorizeString(s, rs.getColor(R.color.base_green)));
}
}
else if (!TextUtils.isEmpty(result.description.airportIata))
{
tail.append(" • " + result.description.airportIata);
}
else
{
if (!TextUtils.isEmpty(result.description.brand))
{
tail.append(" • " + Utils.getLocalizedBrand(mFrame.getContext(), result.description.brand));
}
if (!TextUtils.isEmpty(result.description.cuisine))
{
tail.append(" • " + result.description.cuisine);
}
}
res.append(tail);
return res;
}
@NonNull
private CharSequence colorizeString(@NonNull String str, @ColorInt int color)
{
final <API key> sb = new <API key>(str);
sb.setSpan(new ForegroundColorSpan(color),
0, sb.length(), Spanned.<API key>);
return sb;
}
ResultViewHolder(@NonNull View view)
{
super(view);
mFrame = view;
mName = view.findViewById(R.id.title);
mClosedMarker = view.findViewById(R.id.closed);
mPopularity = view.findViewById(R.id.popular_rating_view);
mDescription = view.findViewById(R.id.description);
mRegion = view.findViewById(R.id.region);
mDistance = view.findViewById(R.id.distance);
mPriceCategory = view.findViewById(R.id.price_category);
mSale = view.findViewById(R.id.sale);
mClosedMarker.<API key>(<API key>);
}
@Override
TextView getTitleView()
{
return mName;
}
@Override
void bind(@NonNull SearchResult result, int order)
{
super.bind(result, order);
setBackground();
// TODO: Support also "Open Now" mark.
UiUtils.showIf(isClosedVisible(), mClosedMarker);
boolean isHotelAvailable = mResult.isHotel &&
mFilteredHotelIds.contains(BookingFilter.TYPE_AVAILABILITY,
mResult.description.featureId);
UiUtils.showIf(isPopularVisible(), mPopularity);
UiUtils.<API key>(mDescription, formatDescription(mResult, isHotelAvailable));
UiUtils.<API key>(mRegion, mResult.description.region);
UiUtils.<API key>(mDistance, mResult.description.distance);
UiUtils.<API key>(mPriceCategory, mResult.description.pricing);
boolean hasDeal = mResult.isHotel &&
mFilteredHotelIds.contains(BookingFilter.TYPE_DEALS,
mResult.description.featureId);
UiUtils.showIf(hasDeal, mSale);
}
private boolean isClosedVisible()
{
boolean isClosed = mResult.description.openNow == SearchResult.OPEN_NOW_NO;
if (!isClosed)
return false;
boolean isNotPopular = mResult.getPopularity().getType() == Popularity.Type.NOT_POPULAR;
return isNotPopular || !mResult.description.<API key>;
}
private boolean isPopularVisible()
{
boolean isNotPopular = mResult.getPopularity().getType() == Popularity.Type.NOT_POPULAR;
if (isNotPopular)
return false;
boolean isClosed = mResult.description.openNow == SearchResult.OPEN_NOW_NO;
return !isClosed || mResult.description.<API key>;
}
private void setBackground()
{
Context context = mSearchFragment.getActivity();
@AttrRes
int itemBg = ThemeUtils.getResource(context, R.attr.clickableBackground);
int bottomPad = mFrame.getPaddingBottom();
int topPad = mFrame.getPaddingTop();
int rightPad = mFrame.getPaddingRight();
int leftPad = mFrame.getPaddingLeft();
mFrame.<API key>(<API key>() ? <API key>() : itemBg);
// On old Android (4.1) after setting the view background the previous paddings
// are discarded for unknown reasons, that's why restoring the previous paddings is needed.
mFrame.setPadding(leftPad, topPad, rightPad, bottomPad);
}
@DrawableRes
int <API key>()
{
return R.color.<API key>;
}
boolean <API key>()
{
return mResult.isHotel &&
mFilteredHotelIds.contains(BookingFilter.TYPE_AVAILABILITY,
mResult.description.featureId);
}
@Override
void processClick(SearchResult result, int order)
{
mSearchFragment.<API key>(result, order);
}
}
private class <API key> extends ResultViewHolder
{
<API key>(@NonNull View view)
{
super(view);
}
@Override
boolean <API key>()
{
return true;
}
@Override
@DrawableRes
int <API key>()
{
@DrawableRes
int resId = ThemeUtils.isNightTheme() ? R.drawable.<API key>
: R.drawable.<API key>;
return resId;
}
}
SearchAdapter(SearchFragment fragment)
{
mSearchFragment = fragment;
<API key> = fragment.getResources().getDrawable(ThemeUtils.isNightTheme() ? R.drawable.<API key>
: R.drawable.<API key>);
}
@Override
public <API key> onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
{
final LayoutInflater inflater = LayoutInflater.from(parent.getContext());
switch (viewType)
{
case TYPE_SUGGEST:
return new SuggestViewHolder(inflater.inflate(R.layout.item_search_suggest, parent, false));
case TYPE_RESULT:
return new ResultViewHolder(inflater.inflate(R.layout.item_search_result, parent, false));
case <API key>:
return new <API key>(inflater.inflate(R.layout.item_search_result, parent, false));
default:
throw new <API key>("Unhandled view type given");
}
}
@Override
public void onBindViewHolder(@NonNull <API key> holder, int position)
{
holder.bind(mResults[position], position);
}
@Override
public int getItemViewType(int position)
{
return mResults[position].type;
}
boolean showPopulateButton()
{
return (!RoutingController.get().isWaitingPoiPick() &&
mResults != null &&
mResults.length > 0 &&
mResults[0].type != TYPE_SUGGEST);
}
@Override
public long getItemId(int position)
{
return position;
}
@Override
public int getItemCount()
{
int res = 0;
if (mResults == null)
return res;
res += mResults.length;
return res;
}
public void clear()
{
refreshData(null);
}
void refreshData(@Nullable SearchResult[] results)
{
mResults = results;
<API key>();
}
void setFilteredHotels(@BookingFilter.Type int type, @NonNull FeatureId[] hotelsId)
{
mFilteredHotelIds.put(type, hotelsId);
<API key>();
}
}
|
using UnityEditor;
using UnityEngine;
using System;
using System.Reflection;
namespace PlayFab.PfEditor
{
public class <API key> : UnityEditor.Editor
{
private const int buttonWidth = 150;
public static bool IsPubSubPresent { get { return <API key>(); } }
public static void DrawPackagesMenu()
{
#if <API key>
var labelStyle = new GUIStyle(PlayFabEditorHelper.uiStyle.GetStyle("label"));
if (Environment.Version.Major < 4)
{
EditorGUILayout.LabelField(" PersistentSockets is only supported with dot Net 4\n\n Please change your Project build settings", labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth));
}
else if (!IsPubSubPresent)
{
<API key>();
GUILayout.BeginHorizontal();
GUILayout.Label(" PubSub: ");
if (GUILayout.Button("Install From GitHub", PlayFabEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32)))
{
string <API key> = "";
if (<API key>(out <API key>))
{
EditorUtility.DisplayDialog("Newtonsoft is already installed.",
"Please delete your version of Netwonsoft.json.dll in \n\n" + <API key> + " \n and retry the install.\n\n Compiler conflicts will occur if this package is installed and Newtonsoft already exists.", "Continue", "Cancel");
}
else
{
ImportPubSubSDK();
}
}
GUILayout.EndHorizontal();
}
else
{
EditorGUILayout.LabelField(" PersistentSockets is Installed", labelStyle, GUILayout.MinWidth(EditorGUIUtility.currentViewWidth));
}
#endif
}
private static void <API key>()
{
GUILayout.BeginHorizontal();
GUILayout.Label(" PUBSUB IS IN PRIVATE PREVIEW.");
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label(" If you are a Professional or Enterprise tier customer and wish to try this feature out, Please contact devrel@playfab.com for more information.");
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label(" User MUST be currently signed into GitHub (with their default browser) to successfully install the unitypackage");
GUILayout.EndHorizontal();
}
public static void ImportPubSubSDK()
{
var link = "https://api.playfab.com/downloads/unity-signalr";
System.Diagnostics.Process.Start(link);
}
public static bool <API key>(out string path)
{
var allAssemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in allAssemblies)
{
if (assembly.FullName.Contains("Newtonsoft.Json"))
{
path = assembly.Location;
return true;
}
foreach (var eachType in assembly.GetTypes())
{
if (eachType.Name.Contains("Newtonsoft"))
{
path = assembly.Location;
return true;
}
}
}
path = "N/A";
return false;
}
// TODO: move this function to a shared location
// and CACHE the results so we don't need to loop multiple times.
public static bool <API key>()
{
var allAssemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in allAssemblies)
{
foreach (var eachType in assembly.GetTypes())
{
if (eachType.Name.Contains("PubSub"))
{
return true;
}
}
}
return false;
}
}
}
|
package org.opensplice.mobile.dev.main.group
import org.opensplice.mobile.dev.common.DDSIdentifier
import org.opensplice.mobile.dev.group.stable.StableGroupProposer
import org.opensplice.mobile.dev.paxos.proposer.ProposerImpl.Default._
class SGProposer(identifier: DDSIdentifier) extends GroupManager {
override def manageCommand(commands: List[String]) {
}
override def manageArgs(args: List[String]) {
args match {
case Nil => {
Some(StableGroupProposer(identifier))
}
case "-aq" :: value :: tail => {
val valueInt = value.toInt
println("Acceptor Quorum: %d".format(valueInt))
Some(StableGroupProposer(identifier, valueInt))
}
case _ => {
println("Paxos Proposer Usage:\n" +
"none create standard proposer\n" +
"-aq <value> create a proposer with value as acceptor quorum ")
}
}
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Tue May 19 17:41:51 PDT 2009 -->
<TITLE>
Overview List (Guice 2.0 Core API)
</TITLE>
<META NAME="date" CONTENT="2009-05-19">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TH ALIGN="left" NOWRAP><FONT size="+1" CLASS="FrameTitleFont">
<B></B></FONT></TH>
</TR>
</TABLE>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="allclasses-frame.html" target="packageFrame"><b>Core</b></A> <a href='<API key>.html'>Show Extensions</a> </FONT>
<P>
<FONT size="+1" CLASS="FrameHeadingFont">
Packages</FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/package-frame.html" target="packageFrame">com.google.inject</A></FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/binder/package-frame.html" target="packageFrame">com.google.inject.binder</A></FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/matcher/package-frame.html" target="packageFrame">com.google.inject.matcher</A></FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/name/package-frame.html" target="packageFrame">com.google.inject.name</A></FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/spi/package-frame.html" target="packageFrame">com.google.inject.spi</A></FONT>
<BR>
<FONT CLASS="FrameItemFont"><A HREF="com/google/inject/util/package-frame.html" target="packageFrame">com.google.inject.util</A></FONT>
<BR>
</TD>
</TR>
</TABLE>
<P>
</BODY>
</HTML>
|
'use strict';
var should = require('should');
var CompletionChecker = function (max, callback) {
this.ncom = 0;
this.tocom = max;
this.Completed = function () {
this.ncom++;
if (this.ncom >= this.tocom) {
callback();
}
};
};
var compareDocuments = function (doc1, doc2, ignoredFields) {
if (ignoredFields === undefined || ignoredFields === null) {
ignoredFields = ['uuidv4'];
}
var equal = true;
if (doc1 === undefined && doc2 === undefined || doc1 === null && doc2 === null) {
return true;
}
if (!doc1 || !doc2) {
return false;
}
if (Array.isArray(doc1) && Array.isArray(doc2)) {
if (doc1.length === doc2.length) {
doc1.every(function (subObj) {
// Check array elements
var founded = false;
doc2.some(function (subObj2) {
if (compareDocuments(subObj, subObj2)) {
founded = true;
return founded;
}
});
equal = founded;
return founded;
});
} else {
equal = false;
}
} else {
Object.keys(doc1).forEach(function (key) {
if (equal === false) {
return;
}
if (ignoredFields.indexOf(key) !== -1) {
equal = true;
return;
}
var val = doc1[key];
if (val instanceof Date) {
val = val.toISOString();
}
if (typeof (val) !== typeof ({}) && typeof (val) !== typeof ([])) {
if (typeof (val) === typeof ('string')) {
var val2 = doc2[key];
if (val2 instanceof Date) {
val2 = val2.toISOString();
}
if (val === val2) {
equal = true;
return;
}
try {
equal = compareDocuments(JSON.parse(val), JSON.parse(val2));
return;
} catch (exception) {
console.log('ERROR COMPARING "' + key + '" VALUES: ', val, ' (', typeof (val), ') AND ', val2, ' (', typeof (val), ')');
equal = false;
return;
}
}
if (val !== doc2[key]) {
console.log('ERROR COMPARING "' + key + '" VALUES: ', val, ' (', typeof (val), ') AND ', doc2[key], ' (', typeof (val), ')');
equal = false;
}
if (typeof (val) !== typeof (doc2[key])) {
console.log('ERROR COMPARING "' + key + '" TYPES: ', val, ' AND ', doc2[key]);
equal = false;
}
} else {
equal = compareDocuments(val, doc2[key], ignoredFields);
}
return equal;
});
}
return equal;
};
module.exports = {
compareDocuments: compareDocuments,
CompletionChecker: CompletionChecker,
collectionComparer: function (db, name, data, callback, ignoredFields) {
db.collection(name).find({}, function (err, result) {
result.count().then(function (size) {
var checker = new CompletionChecker(size, callback);
should(size).equal(data[name].length);
if (size === 0) {
callback();
return;
}
result.forEach(function (o1) {
if (o1 === null) {
return;
}
var found = false;
data[name].forEach(function (o2) {
if (o1._id.toString() === o2._id.toString()) {
found = true;
should(compareDocuments(o1, o2, ignoredFields)).equal(true);
}
});
should(found).equal(true);
checker.Completed();
});
});
});
}
};
|
# Hosting multiple organizations
The vast majority of Zulip servers host just a single organization.
This article documents what's involved in hosting multiple Zulip
organizations on a single server.
Throughout this article, we'll assume you're working on a zulip server
with hostname `zulip.example.com`.
## Subdomains
Zulip's approach for supporting multiple organizations on a single
Zulip server is for each organization to be hosted on its own
subdomain. E.g. you'd have `org1.zulip.example.com` and
`org2.zulip.example.com`.
Web security standards mean that one subdomain per organization is
required to support a use logging into multiple organizations on a
server at the same time.
When you want to create a new organization, you need to do a few
things:
* If you're using Zulip older than 1.7, you'll need to set
`<API key>=True` in your `/etc/zulip/settings.py`
file. That setting is the default in 1.7 and later.
* Make sure you have SSL certificates for all of the subdomains you're
going to use. If you're using
[our LetsEncrypt instructions](ssl-certificates.html), it's easy to
just specify multiple subdomains in your certificate request.
* If necessary, modify your `nginx` configuration to use your new
certificates.
* Use `./manage.py <API key>` again to create your
new organization. Review
[the install instructions](prod-install.html) if you need a
refresher on how this works.
For servers hosting a large number of organizations, like
[zulipchat.com](https://zulipchat.com), one can set
`<API key> = True` in `/etc/zulip/settings.py` so that
the homepage for the server is a copy of the Zulip homepage.
The root domain
Most Zulip servers host a single Zulip organization on the root domain
(i.e. `zulip.example.com`). The way this is implemented internally
involves the organization having the empty string (`''`) as its
"subdomain". You can mix having an organization on the root domain
and some others on subdomains (e.g. `it.zulip.example.com`).
|
package mono.com.google.maps.android.clustering;
public class <API key>
extends java.lang.Object
implements
mono.android.IGCUserPeer,
com.google.maps.android.clustering.ClusterManager.<API key>
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"<API key>:(Lcom/google/maps/android/clustering/Cluster;)V:<API key>:Android.Gms.Maps.Utils.Clustering.ClusterManager/<API key>, Google.Maps.Utils.Droid\n" +
"";
mono.android.Runtime.register ("Android.Gms.Maps.Utils.Clustering.ClusterManager+<API key>, Google.Maps.Utils.Droid", <API key>.class, __md_methods);
}
public <API key> ()
{
super ();
if (getClass () == <API key>.class)
mono.android.TypeManager.Activate ("Android.Gms.Maps.Utils.Clustering.ClusterManager+<API key>, Google.Maps.Utils.Droid", "", this, new java.lang.Object[] { });
}
public void <API key> (com.google.maps.android.clustering.Cluster p0)
{
<API key> (p0);
}
private native void <API key> (com.google.maps.android.clustering.Cluster p0);
private java.util.ArrayList refList;
public void <API key> (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void <API key> ()
{
if (refList != null)
refList.clear ();
}
}
|
from .views import PageView
from django.urls import path
urlpatterns = [
path('<path:path>/', PageView.as_view(), name='page_detail'),
]
|
Mcp4261
A C++ object to control the Microchip MCP4261 Digital Potentiometer. For the Arduino Platform.
Introduction
Mcp4261 is a simple object which allows your Arduino to control the MCP4261 digital potentiometer, to set wiper positions etc. To use, we just wire up the SPI bus and instantiate a new object. The chip powers up with the wiper state as per the value stored in its non-volatile (EEPROM) memory. This library may also work with other MCP digital potentiometer devices, and/or other AVR microcontroller devices after some tweaking. This library was tested on Arduino UNO.
Features
* Generally fast SPI operation (tested up to 8Mhz)
* Generic example (works with all 328P Arduinos)
* Requires only very minor modifications for Arduino MEGA.
* Can instantiate multiple Mcp4261 objects, each with unique slave select
* Very simple interface and very few configuration
* Works with other devices in this series (see below the Compatability section)
* Individual wiper commands and dual wiper commands as this is a dual (2-channel) potentiometer
* Read/write the potentiometer values as either the nearest rounded wiper resistance (in ohms), or wiper position (0-256).
Requirements
* [MCP4261 Product Datasheet](ww1.microchip.com/downloads/en/DeviceDoc/22059b.pdf)*
* [The Spi Library by Cam Thompson](http:
\* Sorry, but the previous series of Microchip Digital Potentiometers (any with a total of 5 digits in their name eg 42100) had a very different command syntax and arent supported. They are listed on Page 29 of [the previous MCP 4Xxxx Data Sheet](http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf).
\! Download Cam Thompson's Spi library from the link above. There are several similarly-named versions of this SPI library. The version that comes with the Arduino IDE (`SPI.h`) isn't going to work.
Getting Started
Pretty much everything is explained within the example sketch file. Open Mcp4261Example.pde in Arduino IDE and upload it to your microcontroller device. Check that all of the SPI interface pins are connected OK for your device.
Dreamcat4
Compatibility
This library is broadly compatible with the other devices in this series. They are: Microchip MCP4131, MCP4132, MCP4231, MCP4232, MCP4141, MCP4142, MCP4241, MCP4242, MCP4151, MCP4152, MCP4251, MCP4252, MCP4161, MCP4162, MCP4261, MCP4262. Just adjust these lines in the header file as appropriate
const static bool non_volatile = true;
const static unsigned int resolution = resolution_8bit;
Credit
* Mcp4261 Version 1 - By Dreamcat4.
|
package cn.nowdo.cloud.base.wx.model;
import com.google.gson.annotations.Expose;
public class Scene {
@Expose
private Long scene_id;
public Long getScene_id() {
return this.scene_id;
}
public void setScene_id(Long scene_id) {
this.scene_id = scene_id;
}
}
|
//using Cats.Web.Adminstration.ViewModelBinder;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Cats.Models.Hubs;
using Cats.Services.Hub;
using Cats.Areas.Settings.Models.ViewModels;
using Cats.Areas.Settings.ViewModelBinder;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
namespace Cats.Areas.Settings.Controllers
{
[Authorize]
public class CommodityController : Controller
{
private readonly ICommodityService _commodityService;
private readonly <API key> <API key>;
public CommodityController(<API key> <API key>,ICommodityService commodityService)
{
_commodityService = commodityService;
<API key> = <API key>;
}
// GET: /Commodity/
public ActionResult Index()
{
if (TempData["error"] != null)
{
ViewData["error"] = TempData["error"].ToString();
}
ViewData["Commodities"] = _commodityService.GetAllCommodity().Where(c=>c.ParentID == null);
ViewData["CommodityTypes"] = <API key>.GetAllCommodityType();
return View();
}
public ActionResult Commodity_Read([DataSourceRequest]DataSourceRequest request)
{
var commodities = _commodityService.GetAllCommodity().Where(c=>c.ParentID != null).ToList();
var <API key> = <API key>.<API key>(commodities);
return Json(<API key>.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
// Post: /CommodityType/Commodity_Create
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Commodity_Create([DataSourceRequest] DataSourceRequest request, CommodityViewModel commodityViewModel)
{
if (commodityViewModel != null && ModelState.IsValid)
{
var commodity = <API key>.BindCommodity(commodityViewModel);
_commodityService.AddCommodity(commodity);
}
return Json(new[] { commodityViewModel }.ToDataSourceResult(request, ModelState));
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Commodity_Update([DataSourceRequest] DataSourceRequest request, CommodityViewModel commodityViewModel)
{
if (commodityViewModel != null && ModelState.IsValid)
{
var target = _commodityService.FindById(commodityViewModel.CommodityID);
target.ParentID = commodityViewModel.ParentID;
target.Name = commodityViewModel.Name;
target.NameAM = commodityViewModel.NameAM;
target.LongName = commodityViewModel.LongName;
// var commodity = <API key>.BindCommodity(commodityViewModel, target);
_commodityService.EditCommodity(target);
}
return Json(new[] { commodityViewModel }.ToDataSourceResult(request, ModelState));
}
//[AcceptVerbs(HttpVerbs.Post)]
//public ActionResult Commodity_Destroy([DataSourceRequest] DataSourceRequest request,
// CommodityViewModel commodityViewModel)
// if (commodityViewModel != null)
// _commodityService.DeleteById(commodityViewModel.CommodityID);
// return Json(ModelState.ToDataSourceResult());
public ActionResult Commodity_Destroy(int id)
{
var commodity = _commodityService.FindById(id);
try
{
_commodityService.DeleteCommodity(commodity);
TempData["error"] = "Commodity is Deleted!";
return RedirectToAction("Index");
}
catch (Exception e)
{
TempData["error"] = "Unable to delete commodity. This commodity is being used by the system.";
}
return RedirectToAction("Index");
}
}
}
|
package com.vmware.lmock.clauses;
import com.vmware.lmock.checker.OccurrenceChecker;
/**
* Defines clauses that allow to specify occurrences schemes.
*
* <p>
* Because such clauses can be cascaded, the implementer must define the related
* class as <code>T</code>.
* </p>
* @param <T>
* the class implementing this interface (e.g. expectation)
*/
public interface <API key><T> {
/**
* Defines an occurrences scheme.
*
* @param occurrences
* the occurrences scheme.
* @return The item under construction.
*/
public T occurs(OccurrenceChecker occurrences);
/**
* An alias to an exact number of occurrences.
*
* @param n
* the exact number of expected occurrences.
* @return The item under construction.
*/
public T occurs(int n);
}
|
package Google::Ads::AdWords::v201409::<API key>;
use strict;
use warnings;
__PACKAGE__-><API key>(1);
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201409' };
our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;
sub __get_attr_class {
return $XML_ATTRIBUTE_CLASS;
}
use base qw(Google::Ads::AdWords::v201409::Operation);
# Variety: sequence
use Class::Std::Fast::Storable constructor => 'none';
use base qw(Google::Ads::SOAP::Typelib::ComplexType);
{ # BLOCK to scope variables
my %operator_of :ATTR(:get<operator>);
my %Operation__Type_of :ATTR(:get<Operation__Type>);
my %operand_of :ATTR(:get<operand>);
__PACKAGE__->_factory(
[ qw( operator
Operation__Type
operand
) ],
{
'operator' => \%operator_of,
'Operation__Type' => \%Operation__Type_of,
'operand' => \%operand_of,
},
{
'operator' => 'Google::Ads::AdWords::v201409::Operator',
'Operation__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'operand' => 'Google::Ads::AdWords::v201409::AdGroupAdLabel',
},
{
'operator' => 'operator',
'Operation__Type' => 'Operation.Type',
'operand' => 'operand',
}
);
} # end BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201409::<API key>
=head1 DESCRIPTION
Perl data type class for the XML Schema defined complexType
<API key> from the namespace https://adwords.google.com/api/adwords/cm/v201409.
Operations for adding/removing labels from AdGroupAds.
=head2 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * operand
=back
=head1 METHODS
=head2 new
Constructor. The following data structure may be passed to new():
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
|
<a href="http://github.com/angular/angular.js/tree/v1.2.5/src/ngMock/angular-mocks.js
<div><span class="hint">API in module <code ng:non-bindable="">ng</code>
</span>
</div>
</h1>
<div><h2 id="description">Description</h2>
<div class="description"><div class="<API key>"><p><em>NOTE</em>: this is not an injectable instance, just a globally available function.</p>
<p>Method for serializing common angular objects (scope, elements, etc..) into strings, useful for
debugging.</p>
<p>This method is also available on window, where it can be used to display objects on debug
console.</p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage"><pre class="prettyprint linenums">angular.mock.dump(object);</pre>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>object</td><td><a href="" class="label type-hint type-hint-object">*</a></td><td><div class="<API key>"><ul>
<li>any object to turn into string.</li>
</ul>
</div></td></tr></tbody></table><h4 id="usage_returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="<API key>"><p>a serialized string of the argument</p>
</div></td></tr></table></div>
</div>
|
Loading Component View
===
**Loading Component View** is a customizable Android component for long background tasks.
With this component you can define several phases with associated frames and the component will be showing the frames.
The use is very easy: update the component with the name of the phase, the text to show and the percentage (referenced to 100).
You can also define the mode (blocking/not blocking). In **blocking mode**, the phases will show all frames even if the long task has finished. In **not blocking mode**, when a new phased arrives, the phase before is finished automatically.
In addition, you're allowed to customize the millis between frames and the default image (for phases without backgroundImages). All of this from the constructor of the handler.
##Screenshots
 {
Map<String, LinkedList<Integer>> retMap = new HashMap<String, LinkedList<Integer>>();
LinkedList<Integer> tempResourceList = new LinkedList<Integer>();
//This phase only displays the default frame
retMap.put("PHASE1, null);
tempResourceList = new LinkedList<Integer>();
tempResourceList.add(R.drawable.scene01);
tempResourceList.add(R.drawable.scene02);
//This phase has two frames
retMap.put("PHASE2", tempResourceList);
retMap.put("PHASE3", null);
return retMap;
}
* The handler receives an <API key> for things to do before and after all phases (for example, hide/show other views etc.)
* In your activity/fragment, define a handler (**<API key>**) which will notify the updates to the view. For example:
<API key> = (<API key>) rootView.findViewById(R.id.<API key>);
//"this" implements <API key>
<API key> = new <API key>(<API key>, getAnimations(), this);
Use
* Whenever you want to update the animation, just call the **update** method of the defined handler:
//This will show frames for phase 1, the text "Running phase 1"
//and the progress of the progressBar will be 0%
context.updateProgressBar("PHASE1", "Running phase 1", 0);
* To finish animations, call the updateMethod with percentage > 100%, or call finishComponent().
* see [LICENSE](https:
## Contact
# Developer/Company
* e-mail: juan.aguilar.guisado@gmail.com
* Twitter: [@juaagugui](https://twitter.com/juaagugui)
* Linkedin: [Juan Aguilar Guisado](http://es.linkedin.com/in/juanaguilarguisado)
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sat Mar 18 18:54:07 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package org.apache.guacamole.net.event.listener (guacamole-ext 0.9.12-incubating API)</title>
<meta name="date" content="2017-03-18">
<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 Package org.apache.guacamole.net.event.listener (guacamole-ext 0.9.12-incubating 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>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-all.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/apache/guacamole/net/event/listener/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.apache.guacamole.net.event.listener" class="title">Uses of Package<br>org.apache.guacamole.net.event.listener</h1>
</div>
<div class="contentContainer">No usage of org.apache.guacamole.net.event.listener</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</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-all.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/apache/guacamole/net/event/listener/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>
<p class="legalCopy"><small>Copyright &
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','
ga('create', 'UA-75289145-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
|
export interface User {
email: string;
password: string;
confirmPassword?: string;
}
|
// This source file is part of the Swift.org open source project
#ifndef <API key>
#define <API key>
#include "swift/Basic/LLVM.h"
#include "llvm/IR/Function.h"
#include <string>
namespace swift {
struct <API key> {
The path to which we should emit an Objective-C header for the module.
Currently only makes sense when the compiler has whole module knowledge.
The modes for which it makes sense incuide both WMO and the "merge
modules" job that happens after the normal compilation jobs. That's where
the header is emitted in single-file mode, since it needs whole-module
information.
\sa swift::printAsObjC
std::string <API key>;
The path to which we should emit a serialized module.
It is valid whenever there are any inputs.
This binary format is used to describe the interface of a module when
imported by client source code. The swiftmodule format is described in
docs/Serialization.md.
\sa swift::serialize
std::string ModuleOutputPath;
The path to which we should emit a module source information file.
It is valid whenever there are any inputs.
This binary format stores source locations and other information about the
declarations in a module.
\sa swift::serialize
std::string <API key>;
The path to which we should emit a module documentation file.
It is valid whenever there are any inputs.
This binary format stores doc comments and other information about the
declarations in a module.
\sa swift::serialize
std::string ModuleDocOutputPath;
The path to which we should output a Make-style dependencies file.
It is valid whenever there are any inputs.
Swift's compilation model means that Make-style dependencies aren't
well-suited to model fine-grained dependencies. See docs/Driver.md for
more information.
\sa <API key>
std::string <API key>;
The path to which we should output a Swift "reference dependencies" file.
It is valid whenever there are any inputs.
"Reference dependencies" track dependencies on a more fine-grained level
than just "this file depends on that file". With Swift's "implicit
visibility" within a module, that becomes very important for any sort of
incremental build. These files are consumed by the Swift driver to decide
whether a source file needs to be recompiled during a build. See
docs/DependencyAnalysis.md for more information.
\sa swift::<API key>
\sa DependencyGraph
std::string <API key>;
Path to a file which should contain serialized diagnostics for this
frontend invocation.
This uses the same serialized diagnostics format as Clang, for tools that
want machine-parseable diagnostics. There's a bit more information on
how clients might use this in docs/Driver.md.
\sa swift::<API key>::createConsumer
std::string <API key>;
The path to which we should output fix-its as source edits.
This is a JSON-based format that is used by the migrator, but is not
really vetted for anything else.
\sa swift::writeEditsInJson
std::string FixItsOutputPath;
The path to which we should output a loaded module trace file.
It is valid whenever there are any inputs.
The file is appended to, and consists of line-delimited JSON objects,
where each line is of the form `{ "name": NAME, "target": TARGET,
"swiftmodules": [PATH, PATH, ...] }`, representing the (real-path) PATHs
to each .swiftmodule that was loaded while building module NAME for target
TARGET. This format is subject to arbitrary change, however.
std::string <API key>;
The path to which we should output a TBD file.
"TBD" stands for "text-based dylib". It's a YAML-based format that
describes the public ABI of a library, which clients can link against
without having an actual dynamic library binary.
Only makes sense when the compiler has whole-module knowledge.
\sa swift::writeTBDFile
std::string TBDPath;
The path to which we should emit a module interface, which can
be used by a client source file to import this module.
This format is similar to the binary format used for #ModuleOutputPath,
but is intended to be stable across compiler versions.
Currently only makes sense when the compiler has whole-module knowledge.
\sa swift::emitSwiftInterface
std::string <API key>;
The path to which we should emit a private module interface.
The private module interface contains all SPI decls and attributes.
\sa <API key>
std::string <API key>;
The path to which we should emit module summary file.
std::string <API key>;
The output path to generate ABI baseline.
std::string <API key>;
The output path of Swift semantic info for this module.
std::string <API key>;
The output path for YAML optimization record file.
std::string YAMLOptRecordPath;
The output path for bitstream optimization record file.
std::string <API key>;
<API key>() = default;
<API key>(const <API key> &) = default;
Apply a given function for each existing (non-empty string) supplementary output
void forEachSetOutput(llvm::function_ref<void(const std::string&)> fn) const {
if (!<API key>.empty())
fn(<API key>);
if (!ModuleOutputPath.empty())
fn(ModuleOutputPath);
if (!<API key>.empty())
fn(<API key>);
if (!ModuleDocOutputPath.empty())
fn(ModuleDocOutputPath);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
if (!FixItsOutputPath.empty())
fn(FixItsOutputPath);
if (!<API key>.empty())
fn(<API key>);
if (!TBDPath.empty())
fn(TBDPath);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
if (!YAMLOptRecordPath.empty())
fn(YAMLOptRecordPath);
if (!<API key>.empty())
fn(<API key>);
if (!<API key>.empty())
fn(<API key>);
}
bool empty() const {
return <API key>.empty() && ModuleOutputPath.empty() &&
ModuleDocOutputPath.empty() && <API key>.empty() &&
<API key>.empty() &&
<API key>.empty() && <API key>.empty() &&
TBDPath.empty() && <API key>.empty() &&
<API key>.empty() && <API key>.empty() &&
<API key>.empty() &&
YAMLOptRecordPath.empty() && <API key>.empty();
}
};
} // namespace swift
#endif // <API key>
|
require 'net/http'
require_relative 'resource/sparql_reader'
require_relative 'resource/resource_url_reader'
module BELParser
module Resource
<API key> = 'http://resources.openbel.org/sparql'
READER_LOCK = Mutex.new
private_constant :READER_LOCK
RESOLVE_URI_LOCK = Mutex.new
private_constant :RESOLVE_URI_LOCK
URISTRING_PATTERN = /^URIString *= *(.*)$/
private_constant :URISTRING_PATTERN
@default_uri_reader = SPARQLReader.new(<API key>, false)
@default_url_reader = ResourceURLReader.new
def self.default_uri_reader
READER_LOCK.synchronize do
@default_uri_reader
end
end
def self.default_uri_reader=(uri_reader)
READER_LOCK.synchronize do
@default_uri_reader = uri_reader
end
end
def self.default_url_reader
READER_LOCK.synchronize do
@default_url_reader
end
end
def self.default_url_reader=(url_reader)
READER_LOCK.synchronize do
@default_url_reader = url_reader
end
end
# Resolves the URI String from the annotation or namespace resource.
# The resource must contain a _URIString=..._ property.
# @param [#to_s] resource_url the resource URL to resolve the URI from
# @return [String] the resource URI specified in the resource
def self.resolve_uri(resource_url)
resource_url = resource_url.to_s
RESOLVE_URI_LOCK.synchronize do
@uri_hash ||= {}
return @uri_hash[resource_url] if @uri_hash.key?(resource_url)
end
uri = URI(resource_url)
request = Net::HTTP::Get.new(uri)
request['Range'] = 'bytes=0-5000'
resource_uri = nil
http = Net::HTTP.new(uri.hostname, uri.port)
http.request(request) do |response|
response.read_body do |chunk|
uristring = chunk.lines.detect { |l| l =~ URISTRING_PATTERN }
if uristring
resource_uri = uristring.match(URISTRING_PATTERN)[1]
break
end
end
end
RESOLVE_URI_LOCK.synchronize do
@uri_hash ||= {}
@uri_hash[resource_url] = resource_uri
end
resource_uri
end
end
end
|
package quickfix.field;
import quickfix.StringField;
public class NoLegSecurityAltID extends StringField
{
static final long serialVersionUID = 20050617;
public static final int FIELD = 604;
public NoLegSecurityAltID()
{
super(604);
}
public NoLegSecurityAltID(String data)
{
super(604, data);
}
}
|
package org.http4s
package scalatags
import cats.effect.IO
import org.http4s.Status.Ok
import _root_.scalatags.Text
import cats.data.NonEmptyList
import org.http4s.headers.`Content-Type`
class ScalatagsSpec extends Http4sSpec {
private val testCharsets = NonEmptyList.of(
Charset.`ISO-8859-1`,
Charset.fromString("Windows-1251").yolo,
Charset.fromString("GB2312").yolo,
Charset.fromString("Shift-JIS").yolo,
Charset.fromString("Windows-1252").yolo
)
private def testBody() = {
import Text.all
all.div()(
all.p()(all.raw("this is my testBody"))
)
}
"TypedTag encoder" should {
"return Content-Type text/html with proper charset" in {
testCharsets.forall { implicit cs =>
val headers = EntityEncoder[IO, Text.TypedTag[String]].headers
headers.get(`Content-Type`) must_== Some(`Content-Type`(MediaType.text.html, Some(cs)))
}
}
"render the body" in {
val resp = Response[IO](Ok).withEntity(testBody())
EntityDecoder.text[IO].decode(resp, strict = false).value.unsafeRunSync must beRight(
"<div><p>this is my testBody</p></div>")
}
}
}
|
#!/usr/bin/env python
"""Small tool for copying android icons from <API key> repo to specified android gradle module.
It copies all density versions of png files to appropriate res subdirectories.
Usage:
picon.py add <category> <name> [-i <path>] [-o <path>] [-c <color>] [-s <size>]
picon.py rem <name> [-o <path>] [-c <color>] [-s <size>]
picon.py (-h | --help)
picon.py (-v | --version)
Options:
-c, --color <color> Which color version to use (black or white or all) [default: all]
-s, --size <size> Which size to use (number in dp units or 'all') [default: all]
-i, --input <path> Path where local copy of <API key> repo is located [default: /media/data/android_big/<API key>]
-o, --output <path> Path of top android module directory where icons will be copied [default: /home/marek/code/android/MyBlocks/myres]
-h, --help Show help screen.
-v, --version Show version.
Commands:
add: copy new icon from <API key> repo to android module
rem: remove all versions of given icon from android module
"""
VERSION='0.1.0'
try:
from docopt import docopt
except ImportError:
print 'This script needs a "docopt" module (http://docopt.org)'
raise
from shutil import copyfile
from os import remove
from os import mkdir
from os.path import join
from os.path import isdir
densities = [
"mdpi",
"hdpi",
"xhdpi",
"xxhdpi",
"xxxhdpi",
]
def add(category, name, color, size, inp, outp):
if color == "all":
add(category, name, "black", size, inp, outp)
add(category, name, "white", size, inp, outp)
return
if size == "all":
add(category, name, color, "18", inp, outp)
add(category, name, color, "24", inp, outp)
add(category, name, color, "36", inp, outp)
add(category, name, color, "48", inp, outp)
return
name = name + "_" + color + "_" + size + "dp.png"
for density in densities:
idir = join(inp, category, "drawable-" + density)
odir = join(outp, "src", "main", "res", "drawable-" + density)
if not isdir(odir):
mkdir(odir)
copyfile(join(idir, name), join(odir, name))
def rem(name, color, size, outp):
if color == "all":
rem(name, "black", size, outp)
rem(name, "white", size, outp)
return
if size == "all":
rem(name, color, "18", outp)
rem(name, color, "24", outp)
rem(name, color, "36", outp)
rem(name, color, "48", outp)
return
name = name + "_" + color + "_" + size + "dp.png"
for density in densities:
ofile = join(outp, "src", "main", "res", "drawable-" + density, name)
try:
remove(ofile)
except OSError:
print "Can not remove:", ofile
def main():
argdict = docopt(__doc__, version=VERSION)
if argdict["add"]:
add(argdict["<category>"], argdict["<name>"], argdict["--color"], argdict["--size"], argdict["--input"], argdict["--output"])
elif argdict["rem"]:
rem(argdict["<name>"], argdict["--color"], argdict["--size"], argdict["--output"])
if __name__ == '__main__':
main()
|
call ..\..\env\set-env-rs.bat && %~dp0\start-cmd.bat
|
using System.Reflection;
[assembly: AssemblyTitle("NGauge.CodeContracts.Tests")]
[assembly: AssemblyDescription("")]
[assembly: <API key>("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
|
package com.siberiadante.utilsample.activity.util;
import android.os.Bundle;
import android.widget.TextView;
import com.siberiadante.androidutil.util.SDCacheUtil;
import com.siberiadante.utilsample.R;
import com.siberiadante.utilsample.activity.base.BaseActivity;
import butterknife.BindView;
public class SDCacheUtilActivity extends BaseActivity {
@BindView(R.id.tv_content)
TextView tvContent;
@Override
public int setLayoutId() {
return R.layout.<API key>;
}
@Override
public void initView(Bundle savedInstanceState) {
actionBar.setTitle("SDCacheUtil");
final StringBuilder builder = new StringBuilder();
String totalCacheSize = null;
try {
totalCacheSize = SDCacheUtil.getTotalCacheSize();
} catch (Exception e) {
e.printStackTrace();
}
builder.append("APP").append(totalCacheSize);
tvContent.setText(builder);
}
}
|
/**
* \file
* \brief Structs to hold tranmission data loaded straight from XML (URDF).
* \author Dave Coleman
*/
#ifndef <API key>
#define <API key>
// C++ standard
#include <vector>
#include <string>
// TinyXML
#include <tinyxml.h>
namespace <API key>
{
/**
* \brief Contains semantic info about a given joint loaded from XML (URDF)
*/
struct JointInfo
{
std::string name_;
std::vector<std::string> <API key>;
std::string role_;
std::string xml_element_;
};
/**
* \brief Contains semantic info about a given actuator loaded from XML (URDF)
*/
struct ActuatorInfo
{
std::string name_;
std::vector<std::string> <API key>;
std::string xml_element_;
};
/**
* \brief Contains semantic info about a given transmission loaded from XML (URDF)
*/
struct TransmissionInfo
{
std::string name_;
std::string type_;
std::vector<JointInfo> joints_;
std::vector<ActuatorInfo> actuators_;
};
} // namespace
#endif
|
containerd is built with OCI support and with support for advanced features provided by `runc`.
We depend on a specific runc version when dealing with advanced features. You should have a specific build for development. The current supported runc commit is:
RUNC_COMMIT = <SHA1-like>
## building
apparmor
bash
make BUILDTAGS='seccomp apparmor' && sudo make install
selinux
bash
make BUILDTAGS='seccomp selinux' && sudo make install
After an official runc release we will start pinning containerd support to a specific version but various development and testing features may require a newer runc version than the latest release. If you encounter any runtime errors, please make sure your runc is in sync with the commit/tag provided in this document.
|
package dotty.tools
package dotc
package transform
import core._
import Scopes.newScope
import Contexts._, Symbols._, Types._, Flags._, Decorators._, StdNames._, Constants._
import MegaPhase._
import SymUtils._
import NullOpsDecorator._
import ast.untpd
/** Expand SAM closures that cannot be represented by the JVM as lambdas to anonymous classes.
* These fall into five categories
*
* 1. Partial function closures, we need to generate isDefinedAt and applyOrElse methods for these.
* 2. Closures implementing non-trait classes
* 3. Closures implementing classes that inherit from a class other than Object
* (a lambda cannot not be a run-time subtype of such a class)
* 4. Closures that implement traits which run initialization code.
* 5. Closures that get synthesized abstract methods in the transformation pipeline. These methods can be
* (1) superaccessors, (2) outer references, (3) accessors for fields.
*
* However, implicit function types do not count as SAM types.
*/
object ExpandSAMs:
val name: String = "expandSAMs"
val description: String = "expand SAM closures to anonymous classes"
/** Is the SAMType `cls` also a SAM under the rules of the platform? */
def isPlatformSam(cls: ClassSymbol)(using Context): Boolean =
ctx.platform.isSam(cls)
def needsWrapperClass(tpe: Type)(using Context): Boolean =
tpe.classSymbol match
case cls: ClassSymbol => !isPlatformSam(cls) || cls == defn.<API key>
case _ => false
class ExpandSAMs extends MiniPhase:
import ast.tpd._
override def phaseName: String = ExpandSAMs.name
override def description: String = ExpandSAMs.description
override def transformBlock(tree: Block)(using Context): Tree = tree match {
case Block(stats @ (fn: DefDef) :: Nil, Closure(_, fnRef, tpt)) if fnRef.symbol == fn.symbol =>
tpt.tpe match {
case NoType =>
tree // it's a plain function
case tpe if defn.<API key>(tpe) =>
tree
case tpe @ SAMType(_) if tpe.isRef(defn.<API key>) =>
val tpe1 = checkRefinements(tpe, fn)
toPartialFunction(tree, tpe1)
case tpe @ SAMType(_) if ExpandSAMs.isPlatformSam(tpe.classSymbol.asClass) =>
checkRefinements(tpe, fn)
tree
case tpe =>
val tpe1 = checkRefinements(tpe.stripNull, fn)
val Seq(samDenot) = tpe1.possibleSamMethods
cpy.Block(tree)(stats,
AnonClass(tpe1 :: Nil, fn.symbol.asTerm :: Nil, samDenot.symbol.asTerm.name :: Nil))
}
case _ =>
tree
}
/** A partial function literal:
*
* ```
* val x: PartialFunction[A, B] = { case C1 => E1; ...; case Cn => En }
* ```
*
* which desugars to:
*
* ```
* val x: PartialFunction[A, B] = {
* def $anonfun(x: A): B = x match { case C1 => E1; ...; case Cn => En }
* closure($anonfun: PartialFunction[A, B])
* }
* ```
*
* is expanded to an anomymous class:
*
* ```
* val x: PartialFunction[A, B] = {
* class $anon extends <API key>[A, B] {
* final def isDefinedAt(x: A): Boolean = x match {
* case C1 => true
* ...
* case Cn => true
* case _ => false
* }
*
* final def applyOrElse[A1 <: A, B1 >: B](x: A1, default: A1 => B1): B1 = x match {
* case C1 => E1
* ...
* case Cn => En
* case _ => default(x)
* }
* }
*
* new $anon
* }
* ```
*/
private def toPartialFunction(tree: Block, tpe: Type)(using Context): Tree = {
val closureDef(anon @ DefDef(_, List(List(param)), _, _)) = tree
// The right hand side from which to construct the partial function. This is always a Match.
// If the original rhs is already a Match (possibly in braces), return that.
// Otherwise construct a match `x match case _ => rhs` where `x` is the parameter of the closure.
def partialFunRHS(tree: Tree): Match = tree match
case m: Match => m
case Block(Nil, expr) => partialFunRHS(expr)
case _ =>
Match(ref(param.symbol),
CaseDef(untpd.Ident(nme.WILDCARD).withType(param.symbol.info), EmptyTree, tree) :: Nil)
val pfRHS = partialFunRHS(anon.rhs)
val anonSym = anon.symbol
val anonTpe = anon.tpe.widen
val parents = List(
defn.<API key>.typeRef.appliedTo(anonTpe.firstParamTypes.head, anonTpe.resultType),
defn.SerializableType)
val pfSym = <API key>(anonSym.owner, tpnme.ANON_CLASS, Synthetic | Final, parents, coord = tree.span)
def overrideSym(sym: Symbol) = sym.copy(
owner = pfSym,
flags = Synthetic | Method | Final | Override,
info = tpe.memberInfo(sym),
coord = tree.span).asTerm.entered
val isDefinedAtFn = overrideSym(defn.<API key>)
val applyOrElseFn = overrideSym(defn.<API key>)
def translateMatch(tree: Match, pfParam: Symbol, cases: List[CaseDef], defaultValue: Tree)(using Context) = {
val selector = tree.selector
val selectorTpe = selector.tpe.widen
val defaultSym = newSymbol(pfParam.owner, nme.WILDCARD, Synthetic | Case, selectorTpe)
val defaultCase =
CaseDef(
Bind(defaultSym, Underscore(selectorTpe)),
EmptyTree,
defaultValue)
val unchecked = selector.annotated(New(ref(defn.UncheckedAnnot.typeRef)))
cpy.Match(tree)(unchecked, cases :+ defaultCase)
.subst(param.symbol :: Nil, pfParam :: Nil)
// Needed because a partial function can be written as:
// param => param match { case "foo" if foo(param) => param }
// And we need to update all references to 'param'
}
def isDefinedAtRhs(paramRefss: List[List[Tree]])(using Context) = {
val tru = Literal(Constant(true))
def translateCase(cdef: CaseDef) =
cpy.CaseDef(cdef)(body = tru).changeOwner(anonSym, isDefinedAtFn)
val paramRef = paramRefss.head.head
val defaultValue = Literal(Constant(false))
translateMatch(pfRHS, paramRef.symbol, pfRHS.cases.map(translateCase), defaultValue)
}
def applyOrElseRhs(paramRefss: List[List[Tree]])(using Context) = {
val List(paramRef, defaultRef) = paramRefss(1)
def translateCase(cdef: CaseDef) =
cdef.changeOwner(anonSym, applyOrElseFn)
val defaultValue = defaultRef.select(nme.apply).appliedTo(paramRef)
translateMatch(pfRHS, paramRef.symbol, pfRHS.cases.map(translateCase), defaultValue)
}
val constr = newConstructor(pfSym, Synthetic, Nil, Nil).entered
val isDefinedAtDef = <API key>(DefDef(isDefinedAtFn, isDefinedAtRhs(_)(using ctx.withOwner(isDefinedAtFn))))
val applyOrElseDef = <API key>(DefDef(applyOrElseFn, applyOrElseRhs(_)(using ctx.withOwner(applyOrElseFn))))
val pfDef = ClassDef(pfSym, DefDef(constr), List(isDefinedAtDef, applyOrElseDef))
cpy.Block(tree)(pfDef :: Nil, New(pfSym.typeRef, Nil))
}
private def checkRefinements(tpe: Type, tree: Tree)(using Context): Type = tpe.dealias match {
case RefinedType(parent, name, _) =>
if (name.isTermName && tpe.member(name).symbol.ownersIterator.isEmpty) // if member defined in the refinement
report.error("Lambda does not define " + name, tree.srcPos)
checkRefinements(parent, tree)
case tpe =>
tpe
}
end ExpandSAMs
|
package com.xqbase.bn.specific;
import com.xqbase.bn.generic.GenericDatumReader;
import com.xqbase.bn.schema.Schema;
/**
* {@link com.xqbase.bn.io.DatumReader} for generated Java objects.
*
* @author Tony He
*/
public class SpecificDatumReader<T> extends GenericDatumReader<T> {
public SpecificDatumReader(Schema schema) {
super(schema);
}
}
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto
package com.google.devtools.clouderrorreporting.v1beta1;
/**
* <pre>
* Specifies criteria for filtering a subset of service contexts.
* The fields in the filter correspond to the fields in `ServiceContext`.
* Only exact, case-sensitive matches are supported.
* If a field is unset or empty, it matches arbitrary values.
* </pre>
*
* Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.<API key>}
*/
public final class <API key> extends
com.google.protobuf.GeneratedMessageV3 implements
// @@<API key>(message_implements:google.devtools.clouderrorreporting.v1beta1.<API key>)
<API key> {
// Use <API key>.newBuilder() to construct.
private <API key>(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private <API key>() {
service_ = "";
version_ = "";
resourceType_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private <API key>(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws com.google.protobuf.<API key> {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 18: {
java.lang.String s = input.<API key>();
service_ = s;
break;
}
case 26: {
java.lang.String s = input.<API key>();
version_ = s;
break;
}
case 34: {
java.lang.String s = input.<API key>();
resourceType_ = s;
break;
}
}
}
} catch (com.google.protobuf.<API key> e) {
throw e.<API key>(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.<API key>(
e).<API key>(this);
} finally {
<API key>();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.internal_static_google_devtools_clouderrorreporting_v1beta1_ServiceContextFilter_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
<API key>() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.internal_static_google_devtools_clouderrorreporting_v1beta1_ServiceContextFilter_fieldAccessorTable
.<API key>(
com.google.devtools.clouderrorreporting.v1beta1.<API key>.class, com.google.devtools.clouderrorreporting.v1beta1.<API key>.Builder.class);
}
public static final int <API key> = 2;
private volatile java.lang.Object service_;
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int <API key> = 3;
private volatile java.lang.Object version_;
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int <API key> = 4;
private volatile java.lang.Object resourceType_;
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public java.lang.String getResourceType() {
java.lang.Object ref = resourceType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceType_ = s;
return s;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public com.google.protobuf.ByteString
<API key>() {
java.lang.Object ref = resourceType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte <API key> = -1;
public final boolean isInitialized() {
byte isInitialized = <API key>;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
<API key> = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getServiceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, service_);
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_);
}
if (!<API key>().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceType_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getServiceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, service_);
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_);
}
if (!<API key>().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceType_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.devtools.clouderrorreporting.v1beta1.<API key>)) {
return super.equals(obj);
}
com.google.devtools.clouderrorreporting.v1beta1.<API key> other = (com.google.devtools.clouderrorreporting.v1beta1.<API key>) obj;
boolean result = true;
result = result && getService()
.equals(other.getService());
result = result && getVersion()
.equals(other.getVersion());
result = result && getResourceType()
.equals(other.getResourceType());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + <API key>().hashCode();
hash = (37 * hash) + <API key>;
hash = (53 * hash) + getService().hashCode();
hash = (37 * hash) + <API key>;
hash = (53 * hash) + getVersion().hashCode();
hash = (37 * hash) + <API key>;
hash = (53 * hash) + getResourceType().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.<API key> {
return PARSER.parseFrom(data);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.<API key> extensionRegistry)
throws com.google.protobuf.<API key> {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(byte[] data)
throws com.google.protobuf.<API key> {
return PARSER.parseFrom(data);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
byte[] data,
com.google.protobuf.<API key> extensionRegistry)
throws com.google.protobuf.<API key> {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
java.io.InputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input, extensionRegistry);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input, extensionRegistry);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input);
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.<API key>(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.devtools.clouderrorreporting.v1beta1.<API key> prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Specifies criteria for filtering a subset of service contexts.
* The fields in the filter correspond to the fields in `ServiceContext`.
* Only exact, case-sensitive matches are supported.
* If a field is unset or empty, it matches arbitrary values.
* </pre>
*
* Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.<API key>}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@<API key>(builder_implements:google.devtools.clouderrorreporting.v1beta1.<API key>)
com.google.devtools.clouderrorreporting.v1beta1.<API key> {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.internal_static_google_devtools_clouderrorreporting_v1beta1_ServiceContextFilter_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
<API key>() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.internal_static_google_devtools_clouderrorreporting_v1beta1_ServiceContextFilter_fieldAccessorTable
.<API key>(
com.google.devtools.clouderrorreporting.v1beta1.<API key>.class, com.google.devtools.clouderrorreporting.v1beta1.<API key>.Builder.class);
}
// Construct using com.google.devtools.clouderrorreporting.v1beta1.<API key>.newBuilder()
private Builder() {
<API key>();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
<API key>();
}
private void <API key>() {
if (com.google.protobuf.GeneratedMessageV3
.<API key>) {
}
}
public Builder clear() {
super.clear();
service_ = "";
version_ = "";
resourceType_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
<API key>() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.internal_static_google_devtools_clouderrorreporting_v1beta1_ServiceContextFilter_descriptor;
}
public com.google.devtools.clouderrorreporting.v1beta1.<API key> <API key>() {
return com.google.devtools.clouderrorreporting.v1beta1.<API key>.getDefaultInstance();
}
public com.google.devtools.clouderrorreporting.v1beta1.<API key> build() {
com.google.devtools.clouderrorreporting.v1beta1.<API key> result = buildPartial();
if (!result.isInitialized()) {
throw <API key>(result);
}
return result;
}
public com.google.devtools.clouderrorreporting.v1beta1.<API key> buildPartial() {
com.google.devtools.clouderrorreporting.v1beta1.<API key> result = new com.google.devtools.clouderrorreporting.v1beta1.<API key>(this);
result.service_ = service_;
result.version_ = version_;
result.resourceType_ = resourceType_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.devtools.clouderrorreporting.v1beta1.<API key>) {
return mergeFrom((com.google.devtools.clouderrorreporting.v1beta1.<API key>)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.devtools.clouderrorreporting.v1beta1.<API key> other) {
if (other == com.google.devtools.clouderrorreporting.v1beta1.<API key>.getDefaultInstance()) return this;
if (!other.getService().isEmpty()) {
service_ = other.service_;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
if (!other.getResourceType().isEmpty()) {
resourceType_ = other.resourceType_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws java.io.IOException {
com.google.devtools.clouderrorreporting.v1beta1.<API key> parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.<API key> e) {
parsedMessage = (com.google.devtools.clouderrorreporting.v1beta1.<API key>) e.<API key>();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object service_ = "";
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public Builder setService(
java.lang.String value) {
if (value == null) {
throw new <API key>();
}
service_ = value;
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
* </pre>
*
* <code>optional string service = 2;</code>
*/
public Builder setServiceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new <API key>();
}
<API key>(value);
service_ = value;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new <API key>();
}
version_ = value;
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
* </pre>
*
* <code>optional string version = 3;</code>
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new <API key>();
}
<API key>(value);
version_ = value;
onChanged();
return this;
}
private java.lang.Object resourceType_ = "";
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public java.lang.String getResourceType() {
java.lang.Object ref = resourceType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public com.google.protobuf.ByteString
<API key>() {
java.lang.Object ref = resourceType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public Builder setResourceType(
java.lang.String value) {
if (value == null) {
throw new <API key>();
}
resourceType_ = value;
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public Builder clearResourceType() {
resourceType_ = getDefaultInstance().getResourceType();
onChanged();
return this;
}
/**
* <pre>
* [Optional] The exact value to match against
* [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
* </pre>
*
* <code>optional string resource_type = 4;</code>
*/
public Builder <API key>(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new <API key>();
}
<API key>(value);
resourceType_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@<API key>(builder_scope:google.devtools.clouderrorreporting.v1beta1.<API key>)
}
// @@<API key>(class_scope:google.devtools.clouderrorreporting.v1beta1.<API key>)
private static final com.google.devtools.clouderrorreporting.v1beta1.<API key> DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.devtools.clouderrorreporting.v1beta1.<API key>();
}
public static com.google.devtools.clouderrorreporting.v1beta1.<API key> getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<<API key>>
PARSER = new com.google.protobuf.AbstractParser<<API key>>() {
public <API key> parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.<API key> extensionRegistry)
throws com.google.protobuf.<API key> {
return new <API key>(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<<API key>> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<<API key>> getParserForType() {
return PARSER;
}
public com.google.devtools.clouderrorreporting.v1beta1.<API key> <API key>() {
return DEFAULT_INSTANCE;
}
}
|
(function( window, undefined ) {
kendo.cultures["quz-PE"] = {
name: "quz-PE",
numberFormat: {
pattern: ["-n"],
decimals: 2,
",": ",",
".": ".",
groupSize: [3],
percent: {
pattern: ["-%n","%n"],
decimals: 2,
",": ",",
".": ".",
groupSize: [3],
symbol: "%"
},
currency: {
pattern: ["$ -n","$ n"],
decimals: 2,
",": ",",
".": ".",
groupSize: [3],
symbol: "S/."
}
},
calendars: {
standard: {
days: {
names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch\u0027 askachaw","Illapachaw","k\u0027uychichaw"],
namesAbbr: ["int","kil","ati","quy","Ch\u0027","Ill","k\u0027u"],
namesShort: ["d","k","a","m","h","b","k"]
},
months: {
names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq\u0027a","Kapaq Raymi",""],
namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
},
AM: ["a.m.","a.m.","A.M."],
PM: ["p.m.","p.m.","P.M."],
patterns: {
d: "dd/MM/yyyy",
D: "dddd, dd' de 'MMMM' de 'yyyy",
F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
g: "dd/MM/yyyy hh:mm tt",
G: "dd/MM/yyyy hh:mm:ss tt",
m: "MMMM dd",
M: "MMMM dd",
s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
t: "hh:mm tt",
T: "hh:mm:ss tt",
u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
y: "MMMM' de 'yyyy",
Y: "MMMM' de 'yyyy"
},
"/": "/",
":": ":",
firstDay: 0
}
}
}
})(this);
|
package org.vertexium.event;
import org.vertexium.Graph;
import org.vertexium.Vertex;
public class <API key> extends GraphEvent {
private final Vertex vertex;
private final Object data;
public <API key>(Graph graph, Vertex vertex, Object data) {
super(graph);
this.vertex = vertex;
this.data = data;
}
public Vertex getVertex() {
return vertex;
}
public Object getData() {
return data;
}
@Override
public String toString() {
return "<API key>{vertex=" + vertex + '}';
}
@Override
public int hashCode() {
return getVertex().hashCode();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof <API key>)) {
return false;
}
<API key> other = (<API key>) obj;
return getVertex().equals(other.getVertex());
}
}
|
import { <API key> } from './<API key>;
import { QueryStringUtils } from './query_string_utils';
import { RevokeTokenRequest } from './<API key>';
import { TokenRequest } from './token_request';
import { TokenResponse } from './token_response';
import { Requestor } from './xhr';
/**
* Represents an interface which can make a token request.
*/
export interface TokenRequestHandler {
/**
* Performs the token request, given the service configuration.
*/
performTokenRequest(configuration: <API key>, request: TokenRequest): Promise<TokenResponse>;
<API key>(configuration: <API key>, request: RevokeTokenRequest): Promise<boolean>;
}
/**
* The default token request handler.
*/
export declare class <API key> implements TokenRequestHandler {
readonly requestor: Requestor;
readonly utils: QueryStringUtils;
constructor(requestor?: Requestor, utils?: QueryStringUtils);
private isTokenResponse;
<API key>(configuration: <API key>, request: RevokeTokenRequest): Promise<boolean>;
performTokenRequest(configuration: <API key>, request: TokenRequest): Promise<TokenResponse>;
}
|
// <API key>: Apache-2.0 WITH LLVM-exception
#include "InputFiles.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"
using namespace llvm;
using namespace llvm::object;
using namespace llvm::support::endian;
using namespace llvm::ELF;
using namespace lld;
using namespace lld::elf;
namespace {
class RISCV final : public TargetInfo {
public:
RISCV();
uint32_t calcEFlags() const override;
void writeGotHeader(uint8_t *buf) const override;
void writeGotPlt(uint8_t *buf, const Symbol &s) const override;
void writePltHeader(uint8_t *buf) const override;
void writePlt(uint8_t *buf, const Symbol &sym,
uint64_t pltEntryAddr) const override;
RelType getDynRel(RelType type) const override;
RelExpr getRelExpr(RelType type, const Symbol &s,
const uint8_t *loc) const override;
void relocate(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
};
} // end anonymous namespace
const uint64_t dtpOffset = 0x800;
enum Op {
ADDI = 0x13,
AUIPC = 0x17,
JALR = 0x67,
LD = 0x3003,
LW = 0x2003,
SRLI = 0x5013,
SUB = 0x40000033,
};
enum Reg {
X_RA = 1,
X_T0 = 5,
X_T1 = 6,
X_T2 = 7,
X_T3 = 28,
};
static uint32_t hi20(uint32_t val) { return (val + 0x800) >> 12; }
static uint32_t lo12(uint32_t val) { return val & 4095; }
static uint32_t itype(uint32_t op, uint32_t rd, uint32_t rs1, uint32_t imm) {
return op | (rd << 7) | (rs1 << 15) | (imm << 20);
}
static uint32_t rtype(uint32_t op, uint32_t rd, uint32_t rs1, uint32_t rs2) {
return op | (rd << 7) | (rs1 << 15) | (rs2 << 20);
}
static uint32_t utype(uint32_t op, uint32_t rd, uint32_t imm) {
return op | (rd << 7) | (imm << 12);
}
RISCV::RISCV() {
copyRel = R_RISCV_COPY;
noneRel = R_RISCV_NONE;
pltRel = R_RISCV_JUMP_SLOT;
relativeRel = R_RISCV_RELATIVE;
iRelativeRel = R_RISCV_IRELATIVE;
if (config->is64) {
symbolicRel = R_RISCV_64;
tlsModuleIndexRel = <API key>;
tlsOffsetRel = <API key>;
tlsGotRel = R_RISCV_TLS_TPREL64;
} else {
symbolicRel = R_RISCV_32;
tlsModuleIndexRel = <API key>;
tlsOffsetRel = <API key>;
tlsGotRel = R_RISCV_TLS_TPREL32;
}
gotRel = symbolicRel;
// .got[0] = _DYNAMIC
gotBaseSymInGotPlt = false;
gotHeaderEntriesNum = 1;
// .got.plt[0] = _dl_runtime_resolve, .got.plt[1] = link_map
<API key> = 2;
pltHeaderSize = 32;
pltEntrySize = 16;
ipltEntrySize = 16;
}
static uint32_t getEFlags(InputFile *f) {
if (config->is64)
return cast<ObjFile<ELF64LE>>(f)->getObj().getHeader().e_flags;
return cast<ObjFile<ELF32LE>>(f)->getObj().getHeader().e_flags;
}
uint32_t RISCV::calcEFlags() const {
// If there are only binary input files (from -b binary), use a
// value of 0 for the ELF header flags.
if (objectFiles.empty())
return 0;
uint32_t target = getEFlags(objectFiles.front());
for (InputFile *f : objectFiles) {
uint32_t eflags = getEFlags(f);
if (eflags & EF_RISCV_RVC)
target |= EF_RISCV_RVC;
if ((eflags & EF_RISCV_FLOAT_ABI) != (target & EF_RISCV_FLOAT_ABI))
error(toString(f) +
": cannot link object files with different floating-point ABI");
if ((eflags & EF_RISCV_RVE) != (target & EF_RISCV_RVE))
error(toString(f) +
": cannot link object files with different EF_RISCV_RVE");
}
return target;
}
void RISCV::writeGotHeader(uint8_t *buf) const {
if (config->is64)
write64le(buf, mainPart->dynamic->getVA());
else
write32le(buf, mainPart->dynamic->getVA());
}
void RISCV::writeGotPlt(uint8_t *buf, const Symbol &s) const {
if (config->is64)
write64le(buf, in.plt->getVA());
else
write32le(buf, in.plt->getVA());
}
void RISCV::writePltHeader(uint8_t *buf) const {
// 1: auipc t2, %pcrel_hi(.got.plt)
// sub t1, t1, t3
// l[wd] t3, %pcrel_lo(1b)(t2); t3 = _dl_runtime_resolve
// addi t1, t1, -pltHeaderSize-12; t1 = &.plt[i] - &.plt[0]
// addi t0, t2, %pcrel_lo(1b)
// srli t1, t1, (rv64?1:2); t1 = &.got.plt[i] - &.got.plt[0]
// l[wd] t0, Wordsize(t0); t0 = link_map
// jr t3
uint32_t offset = in.gotPlt->getVA() - in.plt->getVA();
uint32_t load = config->is64 ? LD : LW;
write32le(buf + 0, utype(AUIPC, X_T2, hi20(offset)));
write32le(buf + 4, rtype(SUB, X_T1, X_T1, X_T3));
write32le(buf + 8, itype(load, X_T3, X_T2, lo12(offset)));
write32le(buf + 12, itype(ADDI, X_T1, X_T1, -target->pltHeaderSize - 12));
write32le(buf + 16, itype(ADDI, X_T0, X_T2, lo12(offset)));
write32le(buf + 20, itype(SRLI, X_T1, X_T1, config->is64 ? 1 : 2));
write32le(buf + 24, itype(load, X_T0, X_T0, config->wordsize));
write32le(buf + 28, itype(JALR, 0, X_T3, 0));
}
void RISCV::writePlt(uint8_t *buf, const Symbol &sym,
uint64_t pltEntryAddr) const {
// 1: auipc t3, %pcrel_hi(f@.got.plt)
// l[wd] t3, %pcrel_lo(1b)(t3)
// jalr t1, t3
// nop
uint32_t offset = sym.getGotPltVA() - pltEntryAddr;
write32le(buf + 0, utype(AUIPC, X_T3, hi20(offset)));
write32le(buf + 4, itype(config->is64 ? LD : LW, X_T3, X_T3, lo12(offset)));
write32le(buf + 8, itype(JALR, X_T1, X_T3, 0));
write32le(buf + 12, itype(ADDI, 0, 0, 0));
}
RelType RISCV::getDynRel(RelType type) const {
return type == target->symbolicRel ? type
: static_cast<RelType>(R_RISCV_NONE);
}
RelExpr RISCV::getRelExpr(const RelType type, const Symbol &s,
const uint8_t *loc) const {
switch (type) {
case R_RISCV_NONE:
return R_NONE;
case R_RISCV_32:
case R_RISCV_64:
case R_RISCV_HI20:
case R_RISCV_LO12_I:
case R_RISCV_LO12_S:
case R_RISCV_RVC_LUI:
return R_ABS;
case R_RISCV_ADD8:
case R_RISCV_ADD16:
case R_RISCV_ADD32:
case R_RISCV_ADD64:
case R_RISCV_SET6:
case R_RISCV_SET8:
case R_RISCV_SET16:
case R_RISCV_SET32:
case R_RISCV_SUB6:
case R_RISCV_SUB8:
case R_RISCV_SUB16:
case R_RISCV_SUB32:
case R_RISCV_SUB64:
return R_RISCV_ADD;
case R_RISCV_JAL:
case R_RISCV_BRANCH:
case R_RISCV_PCREL_HI20:
case R_RISCV_RVC_BRANCH:
case R_RISCV_RVC_JUMP:
case R_RISCV_32_PCREL:
return R_PC;
case R_RISCV_CALL:
case R_RISCV_CALL_PLT:
return R_PLT_PC;
case R_RISCV_GOT_HI20:
return R_GOT_PC;
case <API key>:
case <API key>:
return R_RISCV_PC_INDIRECT;
case R_RISCV_TLS_GD_HI20:
return R_TLSGD_PC;
case <API key>:
config->hasStaticTlsModel = true;
return R_GOT_PC;
case R_RISCV_TPREL_HI20:
case <API key>:
case <API key>:
return R_TLS;
case R_RISCV_RELAX:
case R_RISCV_TPREL_ADD:
return R_NONE;
case R_RISCV_ALIGN:
// Not just a hint; always padded to the worst-case number of NOPs, so may
// not currently be aligned, and without linker relaxation support we can't
// delete NOPs to realign.
errorOrWarn(getErrorLocation(loc) + "relocation R_RISCV_ALIGN requires "
"unimplemented linker relaxation; recompile with -mno-relax");
return R_NONE;
default:
error(getErrorLocation(loc) + "unknown relocation (" + Twine(type) +
") against symbol " + toString(s));
return R_NONE;
}
}
// Extract bits V[Begin:End], where range is inclusive, and Begin must be < 63.
static uint32_t extractBits(uint64_t v, uint32_t begin, uint32_t end) {
return (v & ((1ULL << (begin + 1)) - 1)) >> end;
}
void RISCV::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
const unsigned bits = config->wordsize * 8;
switch (rel.type) {
case R_RISCV_32:
write32le(loc, val);
return;
case R_RISCV_64:
write64le(loc, val);
return;
case R_RISCV_RVC_BRANCH: {
checkInt(loc, static_cast<int64_t>(val) >> 1, 8, rel);
checkAlignment(loc, val, 2, rel);
uint16_t insn = read16le(loc) & 0xE383;
uint16_t imm8 = extractBits(val, 8, 8) << 12;
uint16_t imm4_3 = extractBits(val, 4, 3) << 10;
uint16_t imm7_6 = extractBits(val, 7, 6) << 5;
uint16_t imm2_1 = extractBits(val, 2, 1) << 3;
uint16_t imm5 = extractBits(val, 5, 5) << 2;
insn |= imm8 | imm4_3 | imm7_6 | imm2_1 | imm5;
write16le(loc, insn);
return;
}
case R_RISCV_RVC_JUMP: {
checkInt(loc, static_cast<int64_t>(val) >> 1, 11, rel);
checkAlignment(loc, val, 2, rel);
uint16_t insn = read16le(loc) & 0xE003;
uint16_t imm11 = extractBits(val, 11, 11) << 12;
uint16_t imm4 = extractBits(val, 4, 4) << 11;
uint16_t imm9_8 = extractBits(val, 9, 8) << 9;
uint16_t imm10 = extractBits(val, 10, 10) << 8;
uint16_t imm6 = extractBits(val, 6, 6) << 7;
uint16_t imm7 = extractBits(val, 7, 7) << 6;
uint16_t imm3_1 = extractBits(val, 3, 1) << 3;
uint16_t imm5 = extractBits(val, 5, 5) << 2;
insn |= imm11 | imm4 | imm9_8 | imm10 | imm6 | imm7 | imm3_1 | imm5;
write16le(loc, insn);
return;
}
case R_RISCV_RVC_LUI: {
int64_t imm = SignExtend64(val + 0x800, bits) >> 12;
checkInt(loc, imm, 6, rel);
if (imm == 0) {
write16le(loc, (read16le(loc) & 0x0F83) | 0x4000);
} else {
uint16_t imm17 = extractBits(val + 0x800, 17, 17) << 12;
uint16_t imm16_12 = extractBits(val + 0x800, 16, 12) << 2;
write16le(loc, (read16le(loc) & 0xEF83) | imm17 | imm16_12);
}
return;
}
case R_RISCV_JAL: {
checkInt(loc, static_cast<int64_t>(val) >> 1, 20, rel);
checkAlignment(loc, val, 2, rel);
uint32_t insn = read32le(loc) & 0xFFF;
uint32_t imm20 = extractBits(val, 20, 20) << 31;
uint32_t imm10_1 = extractBits(val, 10, 1) << 21;
uint32_t imm11 = extractBits(val, 11, 11) << 20;
uint32_t imm19_12 = extractBits(val, 19, 12) << 12;
insn |= imm20 | imm10_1 | imm11 | imm19_12;
write32le(loc, insn);
return;
}
case R_RISCV_BRANCH: {
checkInt(loc, static_cast<int64_t>(val) >> 1, 12, rel);
checkAlignment(loc, val, 2, rel);
uint32_t insn = read32le(loc) & 0x1FFF07F;
uint32_t imm12 = extractBits(val, 12, 12) << 31;
uint32_t imm10_5 = extractBits(val, 10, 5) << 25;
uint32_t imm4_1 = extractBits(val, 4, 1) << 8;
uint32_t imm11 = extractBits(val, 11, 11) << 7;
insn |= imm12 | imm10_5 | imm4_1 | imm11;
write32le(loc, insn);
return;
}
// auipc + jalr pair
case R_RISCV_CALL:
case R_RISCV_CALL_PLT: {
int64_t hi = SignExtend64(val + 0x800, bits) >> 12;
checkInt(loc, hi, 20, rel);
if (isInt<20>(hi)) {
relocateNoSym(loc, R_RISCV_PCREL_HI20, val);
relocateNoSym(loc + 4, <API key>, val);
}
return;
}
case R_RISCV_GOT_HI20:
case R_RISCV_PCREL_HI20:
case R_RISCV_TLS_GD_HI20:
case <API key>:
case R_RISCV_TPREL_HI20:
case R_RISCV_HI20: {
uint64_t hi = val + 0x800;
checkInt(loc, SignExtend64(hi, bits) >> 12, 20, rel);
write32le(loc, (read32le(loc) & 0xFFF) | (hi & 0xFFFFF000));
return;
}
case <API key>:
case <API key>:
case R_RISCV_LO12_I: {
uint64_t hi = (val + 0x800) >> 12;
uint64_t lo = val - (hi << 12);
write32le(loc, (read32le(loc) & 0xFFFFF) | ((lo & 0xFFF) << 20));
return;
}
case <API key>:
case <API key>:
case R_RISCV_LO12_S: {
uint64_t hi = (val + 0x800) >> 12;
uint64_t lo = val - (hi << 12);
uint32_t imm11_5 = extractBits(lo, 11, 5) << 25;
uint32_t imm4_0 = extractBits(lo, 4, 0) << 7;
write32le(loc, (read32le(loc) & 0x1FFF07F) | imm11_5 | imm4_0);
return;
}
case R_RISCV_ADD8:
*loc += val;
return;
case R_RISCV_ADD16:
write16le(loc, read16le(loc) + val);
return;
case R_RISCV_ADD32:
write32le(loc, read32le(loc) + val);
return;
case R_RISCV_ADD64:
write64le(loc, read64le(loc) + val);
return;
case R_RISCV_SUB6:
*loc = (*loc & 0xc0) | (((*loc & 0x3f) - val) & 0x3f);
return;
case R_RISCV_SUB8:
*loc -= val;
return;
case R_RISCV_SUB16:
write16le(loc, read16le(loc) - val);
return;
case R_RISCV_SUB32:
write32le(loc, read32le(loc) - val);
return;
case R_RISCV_SUB64:
write64le(loc, read64le(loc) - val);
return;
case R_RISCV_SET6:
*loc = (*loc & 0xc0) | (val & 0x3f);
return;
case R_RISCV_SET8:
*loc = val;
return;
case R_RISCV_SET16:
write16le(loc, val);
return;
case R_RISCV_SET32:
case R_RISCV_32_PCREL:
write32le(loc, val);
return;
case <API key>:
write32le(loc, val - dtpOffset);
break;
case <API key>:
write64le(loc, val - dtpOffset);
break;
case R_RISCV_RELAX:
return; // Ignored (for now)
default:
llvm_unreachable("unknown relocation");
}
}
TargetInfo *elf::getRISCVTargetInfo() {
static RISCV target;
return ⌖
}
|
package org.locationtech.geowave.core.geotime.store.query;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
public class ScaledTemporalRange implements Serializable {
private static final long serialVersionUID = 1L;
private static long MILLIS_PER_DAY = 86400000;
private static long DEFAULT_TIME_RANGE = 365L * MILLIS_PER_DAY; // one year
private Date startTime = null;
private Date endTime = null;
// Default to lat bounds
private double minVal = 0.0;
private double maxVal = 180.0;
private long timeRange = DEFAULT_TIME_RANGE;
private double timeScale;
private final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
public ScaledTemporalRange() {
updateTimeScale();
}
public void setTimeRange(final Date startTime, final Date endTime) {
this.startTime = startTime;
this.endTime = endTime;
updateTimeScale();
}
public void setTimeRange(final long millis) {
timeRange = millis;
startTime = null;
endTime = null;
updateTimeScale();
}
public void setValueRange(final double minVal, final double maxVal) {
this.minVal = minVal;
this.maxVal = maxVal;
updateTimeScale();
}
public void setTimeScale(final double timeScale) {
this.timeScale = timeScale;
}
private void updateTimeScale() {
timeScale = (maxVal - minVal) / getTimeRangeMillis();
}
public double getTimeScale() {
return timeScale;
}
public long getTimeRangeMillis() {
if ((startTime == null) || (endTime == null)) {
return timeRange;
}
return endTime.getTime() - startTime.getTime();
}
public double timeToValue(final Date time) {
final long deltaTime = time.getTime() - getTimeMin();
return minVal + (deltaTime * timeScale);
}
public Date valueToTime(final double timeVal) {
final long timeMillis = (long) (timeVal / timeScale) + getTimeMin();
cal.setTimeInMillis(timeMillis);
return cal.getTime();
}
private long getTimeMin() {
if (startTime != null) {
return startTime.getTime();
}
return 0L;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(final Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(final Date endTime) {
this.endTime = endTime;
}
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: ZendeskAPI::SuspendedTicket
— Documentation by YARD 0.8.5.2
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '../';
framesUrl = "../frames.html#!" + escape(window.location.href);
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div id="header">
<div id="menu">
<a href="../_index.html">Index (S)</a> »
<span class='title'><span class='object_link'><a href="../ZendeskAPI.html" title="ZendeskAPI (module)">ZendeskAPI</a></span></span>
»
<span class="title">SuspendedTicket</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="../method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="../file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: ZendeskAPI::SuspendedTicket
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName"><span class='object_link'><a href="ReadResource.html" title="ZendeskAPI::ReadResource (class)">ReadResource</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="Data.html" title="ZendeskAPI::Data (class)">Data</a></span></li>
<li class="next"><span class='object_link'><a href="DataResource.html" title="ZendeskAPI::DataResource (class)">DataResource</a></span></li>
<li class="next"><span class='object_link'><a href="ReadResource.html" title="ZendeskAPI::ReadResource (class)">ReadResource</a></span></li>
<li class="next">ZendeskAPI::SuspendedTicket</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2">Includes:</dt>
<dd class="r2"><span class='object_link'><a href="Destroy.html" title="ZendeskAPI::Destroy (module)">Destroy</a></span></dd>
<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">lib/zendesk_api/resources.rb</dd>
</dl>
<div class="clear"></div>
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#association (instance method)">- (ZendeskAPI::Association) <strong>association</strong> </a>
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#association (method)">Data</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>The association.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#attributes (instance method)">- (Hash) <strong>attributes</strong> </a>
(also: #to_param)
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>The resource's attributes.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#error (instance method)">- (Object) <strong>error</strong> </a>
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="DataResource.html#<API key>" title="ZendeskAPI::DataResource#error (method)">DataResource</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute error.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#error_message (instance method)">- (Object) <strong>error_message</strong> </a>
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="DataResource.html#<API key>" title="ZendeskAPI::DataResource#error_message (method)">DataResource</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute error_message.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#errors (instance method)">- (Array) <strong>errors</strong> </a>
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#errors (method)">Data</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>The last received errors.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#response (instance method)">- (Object) <strong>response</strong> </a>
</span>
<span class="note title not_defined_here">
inherited
from <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#response (method)">Data</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>Place to dump the last response.</p>
</div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#destroy (instance method)">- (Object) <strong>destroy</strong> </a>
</span>
<span class="note title not_defined_here">
included
from <span class='object_link'><a href="Destroy.html#<API key>" title="ZendeskAPI::Destroy#destroy (method)">Destroy</a></span>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#destroy%21-instance_method" title="#destroy! (instance method)">- (Boolean) <strong>destroy!</strong> </a>
</span>
<span class="note title not_defined_here">
included
from <span class='object_link'><a href="Destroy.html#destroy%21-instance_method" title="ZendeskAPI::Destroy#destroy! (method)">Destroy</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>If this resource hasn't already been deleted, then do so.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#destroyed%3F-instance_method" title="#destroyed? (instance method)">- (Boolean) <strong>destroyed?</strong> </a>
</span>
<span class="note title not_defined_here">
included
from <span class='object_link'><a href="Destroy.html#destroyed%3F-instance_method" title="ZendeskAPI::Destroy#destroyed? (method)">Destroy</a></span>
</span>
<span class="summary_desc"><div class='inline'>
<p>Has this object been deleted?.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#<API key>" title="#recover (instance method)">- (Boolean) <strong>recover</strong>(options = {}) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Recovers this suspended ticket to an actual ticket.</p>
</div></span>
</li>
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#initialize (method)">ZendeskAPI::Data</a></span></p>
</div>
<div id="<API key>" class="method_details_list">
<h2>Dynamic Method Handling</h2>
<p class="notice super">
This class handles dynamic methods through the <tt>method_missing</tt> method
in the class <span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#method_missing (method)">ZendeskAPI::Data</a></span>
</p>
</div>
<div id="<API key>" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="association=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="<API key>">
- (<tt><span class='object_link'>ZendeskAPI::Association</span></tt>) <strong>association</strong>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#association (method)">Data</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>The association</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'>ZendeskAPI::Association</span></tt>)</span>
—
<div class='inline'>
<p>The association</p>
</div>
</li>
</ul>
</div>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Hash</tt>) <strong>attributes</strong> <span class="extras">(readonly)</span>
<span class="aliases">Also known as:
<span class="names"><span id='<API key>'>to_param</span></span>
</span>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>The resource's attributes</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Hash</tt>)</span>
—
<div class='inline'>
<p>The resource's attributes</p>
</div>
</li>
</ul>
</div>
</div>
<span id="error=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Object</tt>) <strong>error</strong>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="DataResource.html#<API key>" title="ZendeskAPI::DataResource#error (method)">DataResource</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute error</p>
</div>
</div>
<div class="tags">
</div>
</div>
<span id="error_message=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Object</tt>) <strong>error_message</strong>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="DataResource.html#<API key>" title="ZendeskAPI::DataResource#error_message (method)">DataResource</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute error_message</p>
</div>
</div>
<div class="tags">
</div>
</div>
<span id="errors=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Array</tt>) <strong>errors</strong>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#errors (method)">Data</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>The last received errors</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array</tt>)</span>
—
<div class='inline'>
<p>The last received errors</p>
</div>
</li>
</ul>
</div>
</div>
<span id="response=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Object</tt>) <strong>response</strong>
<span class="not_defined_here">
Originally defined in class
<span class='object_link'><a href="Data.html#<API key>" title="ZendeskAPI::Data#response (method)">Data</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>Place to dump the last response</p>
</div>
</div>
<div class="tags">
</div>
</div>
</div>
<div id="<API key>" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="<API key>">
- (<tt>Object</tt>) <strong>destroy</strong>
<span class="not_defined_here">
Originally defined in module
<span class='object_link'><a href="Destroy.html#<API key>" title="ZendeskAPI::Destroy#destroy (method)">Destroy</a></span>
</span>
</h3>
</div>
<div class="method_details ">
<h3 class="signature " id="destroy!-instance_method">
- (<tt>Boolean</tt>) <strong>destroy!</strong>
<span class="not_defined_here">
Originally defined in module
<span class='object_link'><a href="Destroy.html#destroy%21-instance_method" title="ZendeskAPI::Destroy#destroy! (method)">Destroy</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>If this resource hasn't already been deleted, then do so.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
—
<div class='inline'>
<p>Successful?</p>
</div>
</li>
</ul>
</div>
</div>
<div class="method_details ">
<h3 class="signature " id="destroyed?-instance_method">
- (<tt>Boolean</tt>) <strong>destroyed?</strong>
<span class="not_defined_here">
Originally defined in module
<span class='object_link'><a href="Destroy.html#destroyed%3F-instance_method" title="ZendeskAPI::Destroy#destroyed? (method)">Destroy</a></span>
</span>
</h3><div class="docstring">
<div class="discussion">
<p>Has this object been deleted?</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div>
</div>
<div class="method_details ">
<h3 class="signature " id="<API key>">
- (<tt>Boolean</tt>) <strong>recover</strong>(options = {})
</h3><div class="docstring">
<div class="discussion">
<p>Recovers this suspended ticket to an actual ticket</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>options</span>
<span class='type'>(<tt>Hash</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
—
<div class='inline'>
<p>Options to pass to the request</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
—
<div class='inline'>
<p>Success of this call</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
268</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 268</span>
<span class='id identifier rubyid_put'>put</span> <span class='symbol'>:recover</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Wed May 15 18:59:34 2013 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.5.2 (ruby-1.9.3).
</div>
</body>
</html>
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_27) on Sun Mar 03 16:17:11 CET 2013 -->
<TITLE>
ch.unifr.pai.twice.widgets.mpproxy.shared
</TITLE>
<META NAME="date" CONTENT="2013-03-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameTitleFont">
<A HREF="../../../../../../../ch/unifr/pai/twice/widgets/mpproxy/shared/package-summary.html" target="classFrame">ch.unifr.pai.twice.widgets.mpproxy.shared</A></FONT>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
Classes</FONT>
<FONT CLASS="FrameItemFont">
<BR>
<A HREF="Constants.html" title="class in ch.unifr.pai.twice.widgets.mpproxy.shared" target="classFrame">Constants</A>
<BR>
<A HREF="Rewriter.html" title="class in ch.unifr.pai.twice.widgets.mpproxy.shared" target="classFrame">Rewriter</A>
<BR>
<A HREF="URLParser.html" title="class in ch.unifr.pai.twice.widgets.mpproxy.shared" target="classFrame">URLParser</A></FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|
package shared
import (
"fmt"
"io"
"io/ioutil"
"net"
"github.com/gorilla/websocket"
)
func RFC3493Dialer(network, address string) (net.Conn, error) {
host, port, err := net.SplitHostPort(address)
if err != nil {
return nil, err
}
addrs, err := net.LookupHost(host)
if err != nil {
return nil, err
}
for _, a := range addrs {
c, err := net.Dial(network, net.JoinHostPort(a, port))
if err != nil {
continue
}
return c, err
}
return nil, fmt.Errorf("Unable to connect to: " + address)
}
func IsLoopback(iface *net.Interface) bool {
return int(iface.Flags&net.FlagLoopback) > 0
}
func WebsocketSendStream(conn *websocket.Conn, r io.Reader) chan bool {
ch := make(chan bool)
if r == nil {
close(ch)
return ch
}
go func(conn *websocket.Conn, r io.Reader) {
in := ReaderToChannel(r)
for {
buf, ok := <-in
if !ok {
break
}
w, err := conn.NextWriter(websocket.BinaryMessage)
if err != nil {
Debugf("Got error getting next writer %s", err)
break
}
_, err = w.Write(buf)
w.Close()
if err != nil {
Debugf("Got err writing %s", err)
break
}
}
closeMsg := websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")
conn.WriteMessage(websocket.CloseMessage, closeMsg)
ch <- true
}(conn, r)
return ch
}
func WebsocketRecvStream(w io.WriteCloser, conn *websocket.Conn) chan bool {
ch := make(chan bool)
go func(w io.WriteCloser, conn *websocket.Conn) {
for {
mt, r, err := conn.NextReader()
if mt == websocket.CloseMessage {
Debugf("Got close message for reader")
break
}
if err != nil {
Debugf("Got error getting next reader %s, %s", err, w)
break
}
buf, err := ioutil.ReadAll(r)
if err != nil {
Debugf("Got error writing to writer %s", err)
break
}
if w == nil {
continue
}
i, err := w.Write(buf)
if i != len(buf) {
Debugf("Didn't write all of buf")
break
}
if err != nil {
Debugf("Error writing buf %s", err)
break
}
}
ch <- true
}(w, conn)
return ch
}
// WebsocketMirror allows mirroring a reader to a websocket and taking the
// result and writing it to a writer.
func WebsocketMirror(conn *websocket.Conn, w io.WriteCloser, r io.Reader) chan bool {
done := make(chan bool, 2)
go func(conn *websocket.Conn, w io.WriteCloser) {
for {
mt, r, err := conn.NextReader()
if mt == websocket.CloseMessage {
Debugf("Got close message for reader")
break
}
if err != nil {
Debugf("Got error getting next reader %s, %s", err, w)
break
}
buf, err := ioutil.ReadAll(r)
if err != nil {
Debugf("Got error writing to writer %s", err)
break
}
i, err := w.Write(buf)
if i != len(buf) {
Debugf("Didn't write all of buf")
break
}
if err != nil {
Debugf("Error writing buf %s", err)
break
}
}
done <- true
w.Close()
}(conn, w)
go func(conn *websocket.Conn, r io.Reader) {
in := ReaderToChannel(r)
for {
buf, ok := <-in
if !ok {
done <- true
conn.WriteMessage(websocket.CloseMessage, []byte{})
conn.Close()
return
}
w, err := conn.NextWriter(websocket.BinaryMessage)
if err != nil {
Debugf("Got error getting next writer %s", err)
break
}
_, err = w.Write(buf)
w.Close()
if err != nil {
Debugf("Got err writing %s", err)
break
}
}
closeMsg := websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")
conn.WriteMessage(websocket.CloseMessage, closeMsg)
done <- true
}(conn, r)
return done
}
|
package org.ovirt.engine.ui.webadmin.section.main.view.tab.storage;
import org.ovirt.engine.core.common.businessentities.StorageDomainStatus;
import org.ovirt.engine.core.common.businessentities.storage_domains;
import org.ovirt.engine.ui.uicommonweb.UICommand;
import org.ovirt.engine.ui.uicommonweb.models.storage.<API key>;
import org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel;
import org.ovirt.engine.ui.webadmin.idhandler.ElementIdHandler;
import org.ovirt.engine.ui.webadmin.section.main.presenter.tab.storage.<API key>;
import org.ovirt.engine.ui.webadmin.section.main.view.<API key>;
import org.ovirt.engine.ui.webadmin.uicommon.model.<API key>;
import org.ovirt.engine.ui.webadmin.widget.action.<API key>;
import org.ovirt.engine.ui.webadmin.widget.table.column.EnumColumn;
import org.ovirt.engine.ui.webadmin.widget.table.column.<API key>;
import org.ovirt.engine.ui.webadmin.widget.table.column.<API key>;
import com.google.gwt.core.client.GWT;
import com.google.inject.Inject;
public class <API key> extends <API key><storage_domains, storage_domains, StorageListModel, <API key>>
implements <API key>.ViewDef {
interface ViewIdHandler extends ElementIdHandler<<API key>> {
ViewIdHandler idHandler = GWT.create(ViewIdHandler.class);
}
@Inject
public <API key>(<API key><storage_domains, StorageListModel, <API key>> modelProvider) {
super(modelProvider);
ViewIdHandler.idHandler.generateAndSetIds(this);
initTable();
initWidget(getTable());
}
void initTable() {
getTable().addColumn(new <API key>(), "", "30px");
<API key><storage_domains> nameColumn = new <API key><storage_domains>() {
@Override
public String getValue(storage_domains object) {
return object.<API key>();
}
};
getTable().addColumn(nameColumn, "Name");
<API key><storage_domains> domainStatusColumn =
new EnumColumn<storage_domains, StorageDomainStatus>() {
@Override
protected StorageDomainStatus getRawValue(storage_domains object) {
return object.getstatus();
}
};
getTable().addColumn(domainStatusColumn, "Domain Status in Data-Center", "300px");
getTable().addActionButton(new <API key><storage_domains>("Attach") {
@Override
protected UICommand resolveCommand() {
return getDetailModel().getAttachCommand();
}
});
getTable().addActionButton(new <API key><storage_domains>("Detach") {
@Override
protected UICommand resolveCommand() {
return getDetailModel().getDetachCommand();
}
});
getTable().addActionButton(new <API key><storage_domains>("Activate") {
@Override
protected UICommand resolveCommand() {
return getDetailModel().getActivateCommand();
}
});
getTable().addActionButton(new <API key><storage_domains>("Maintenance") {
@Override
protected UICommand resolveCommand() {
return getDetailModel().<API key>();
}
});
}
}
|
package io.enmasse.systemtest.shared.standard.clients.proton.python;
import io.enmasse.systemtest.bases.clients.<API key>;
import io.enmasse.systemtest.bases.shared.ITestSharedStandard;
import io.enmasse.systemtest.messagingclients.proton.python.<API key>;
import io.enmasse.systemtest.messagingclients.proton.python.PythonClientSender;
import org.junit.jupiter.api.Test;
class <API key> extends <API key> implements ITestSharedStandard {
@Test
void testBasicMessage() throws Exception {
doBasicMessageTest(new PythonClientSender(), new <API key>());
}
}
|
# coding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from textwrap import dedent
from pants.backend.jvm.targets.java_library import JavaLibrary
from pants.backend.jvm.tasks.checkstyle import Checkstyle
from pants.base.exceptions import TaskError
from pants.build_graph.address import Address
from pants_test.jvm.<API key> import NailgunTaskTestBase
from pants_test.task_test_base import ensure_cached
class CheckstyleTest(NailgunTaskTestBase):
"""Tests for the class Checkstyle."""
<API key> = dedent("""
<module name="FileTabCharacter"/>
""")
<API key> = dedent("""
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.suppression.file}"/>
</module>
""")
<API key> = dedent("""
public class HelloMain {
public static void main(String[] args) throws IOException {
System.out.println("A test.");
}
}
""")
<API key> = dedent("""
public class HelloMain {
public static void main(String[] args) throws IOException {
\tSystem.out.println("A test.");
}
}
""")
@classmethod
def task_type(cls):
return Checkstyle
def _create_context(self, rules_xml=(), properties=None, target_roots=None):
return self.context(
options={
self.options_scope: {
'bootstrap_tools': ['//:checkstyle'],
'configuration': self._create_config_file(rules_xml),
'properties': properties or {},
}
},
target_roots=target_roots)
def _create_config_file(self, rules_xml=()):
return self.create_file(
relpath='coding_style.xml',
contents=dedent(
def <API key>(self, suppresses_xml=()):
return self.create_file(
relpath='suppression.xml',
contents=dedent(
def _create_target(self, name, test_java_source):
rel_dir = os.path.join('src/java', name)
self.create_file(relpath=os.path.join(rel_dir, '{name}.java'.format(name=name)),
contents=test_java_source)
return self.make_target(Address(spec_path=rel_dir, target_name=name).spec,
JavaLibrary,
sources=['{}.java'.format(name)])
# Test section
@ensure_cached(Checkstyle, <API key>=1)
def <API key>(self):
no_tab = self._create_target('no_tab', self.<API key>)
context = self._create_context(rules_xml=[self.<API key>],
target_roots=[no_tab])
self.<API key>(context=context)
self.execute(context)
@ensure_cached(Checkstyle, <API key>=0)
def <API key>(self):
with_tab = self._create_target('with_tab', self.<API key>)
context = self._create_context(rules_xml=[self.<API key>],
target_roots=[with_tab])
# add a tab in the source to trigger the tab check rule to fail.
self.<API key>(context=context)
with self.assertRaises(TaskError):
self.execute(context)
def test_suppressions(self):
# For this test, we:
# - add 3 java files, 2 with tabs, 1 without.
# - add 2 suppression rules against those 2 java files with tabs,
# so we can test the logic of suppression.
suppression_file = self.<API key>(
[
'<suppress files=".*with_tab_1\.java" checks=".*" />',
'<suppress files=".*with_tab_2\.java" checks=".*" />',
])
no_tab = self._create_target('no_tab', self.<API key>)
with_tab_1 = self._create_target('with_tab_1', self.<API key>)
with_tab_2 = self._create_target('with_tab_2', self.<API key>)
context = self._create_context(
rules_xml=[
self.<API key>,
self.<API key>
],
properties={
'checkstyle.suppression.file': suppression_file,
},
target_roots=[no_tab, with_tab_1, with_tab_2])
self.<API key>(context=context)
self.execute(context)
|
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
PieChart (.\TargetData.ps1) "A PieChart"
|
package com.elastisys.scale.cloudpool.azure.lab;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.elastisys.scale.cloudpool.azure.driver.client.impl.ApiUtils;
import com.elastisys.scale.cloudpool.azure.driver.config.AzureApiAccess;
import com.elastisys.scale.commons.json.types.TimeInterval;
import com.microsoft.azure.management.Azure;
import com.microsoft.azure.management.compute.Disk;
import com.microsoft.rest.LogLevel;
public class DeleteDisk extends BaseLabProgram {
private static final Logger LOG = LoggerFactory.getLogger(DeleteDisk.class);
/** TODO: set resource group name to operate on */
private static final String resourceGroup = "itest";
/** TODO: set the name of the disk within the resource group to delete. */
private static final String diskName = "<API key>";
public static void main(String[] args) {
AzureApiAccess apiAccess = new AzureApiAccess(SUBSCRIPTION_ID, AZURE_AUTH,
new TimeInterval(10L, TimeUnit.SECONDS), new TimeInterval(10L, TimeUnit.SECONDS), LogLevel.BASIC);
Azure api = ApiUtils.acquireApiClient(apiAccess);
Disk disk = api.disks().getByResourceGroup(resourceGroup, diskName);
LOG.debug("found disk {}", disk.id());
api.disks().deleteById(disk.id());
LOG.debug("disk deleted", disk.id());
}
}
|
package org.waveprotocol.wave.model.id;
import junit.framework.TestCase;
/**
* Tests for wavelet name.
*
*
* @author anorth@google.com (Alex North)
*/
public class WaveletNameTest extends TestCase {
public void <API key>() {
try {
WaveletName.of(null, new WaveletId("example.com", "id"));
fail("Expected NPE from wavelet name with null wave id");
} catch (<API key> expected) {
}
try {
WaveletName.of(new WaveId("example.com", "id"), null);
fail("Expected NPE from wavelet name with null wavelet id");
} catch (<API key> expected) {
}
}
public void testOfToString() throws Exception {
final WaveId waveId = new WaveId("example.com", "w+abcd1234");
final WaveletId waveletId = new WaveletId("acmewave.com", "conv+blah");
WaveletName name = WaveletName.of(waveId, waveletId);
String expected =
"[WaveId:example.com!w+abcd1234]/[WaveletId:acmewave.com!conv+blah]";
assertEquals(expected, name.toString());
}
}
|
#include "arch.h"
#include "fp_FP256BN.h"
namespace FP256BN {
/* Curve FP512BN - Pairing friendly BN curve */
/* ISO curve */
#if CHUNK==16
#error Not supported
#endif
#if CHUNK==32
using namespace B256_28;
// Base Bits= 28
const BIG Modulus= {0xED33013,0x292DDBA,0x80A82D3,0x65FB129,0x49F0CDC,0x5EEE71A,0xD46E5F2,0xFFFCF0C,0xFFFFFFF,0xF};
const BIG R2modp= {0x3B9F8B,0xEDE3363,0xFEC54E8,0x92FFEE9,0x3C55F79,0x13C1C06,0xC0123FA,0xA12F2EA,0xE559B2A,0x8};
const chunk MConst= 0x537E5E5;
const BIG Fra= {0xF943106,0x760328A,0xAB28F74,0x71511E3,0x7CF39A1,0x8DDB086,0x52D1A6E,0xCA786F3,0xD617662,0x3};
const BIG Frb= {0xF3EFF0D,0xB32AB2F,0xD57F35E,0xF4A9F45,0xCCFD33A,0xD113693,0x819CB83,0x3584819,0x29E899D,0xC};
#endif
#if CHUNK==64
using namespace B256_56;
// Base Bits= 56
const BIG Modulus= {0x292DDBAED33013L,0x65FB12980A82D3L,0x5EEE71A49F0CDCL,0xFFFCF0CD46E5F2L,0xFFFFFFFFL};
const BIG R2modp= {0xEDE336303B9F8BL,0x92FFEE9FEC54E8L,0x13C1C063C55F79L,0xA12F2EAC0123FAL,0x8E559B2AL};
const chunk MConst= 0x6C964E0537E5E5L;
const BIG Fra= {0x760328AF943106L,0x71511E3AB28F74L,0x8DDB0867CF39A1L,0xCA786F352D1A6EL,0x3D617662L};
const BIG Frb= {0xB32AB2FF3EFF0DL,0xF4A9F45D57F35EL,0xD113693CCFD33AL,0x3584819819CB83L,0xC29E899DL};
#endif
}
|
var assign = require('lodash').assign;
describe('programmatic use', function () {
this.timeout(120000);
var containsChrome = function(string) {
return /chrome/i.test(string);
};
var testInstall = function(done, rawOptions, callback) {
var selenium = require('../');
// Capture the log output
var log = '';
var logger = function(message) {
log += message;
};
var options = assign({ logger: logger }, rawOptions);
selenium.install(options, function(err) {
if (err) {
done(err);
return;
}
if (callback(log) !== false) {
done();
}
});
};
var testStart = function(done, options, callback) {
var selenium = require('../');
selenium.start(options, function(err, cp) {
if (err) {
done(err);
return;
}
cp.kill();
if (callback(cp) !== false) {
done();
}
});
};
it('should install', function(done) {
testInstall(done, {}, function(log) {
if (!containsChrome(log)) {
done(new Error('Chrome driver should be installed'));
return false;
}
});
});
it('should install with the given drivers', function(done) {
testInstall(done, { drivers: {} }, function(log) {
if (containsChrome(log)) {
done(new Error('Chrome driver should not be installed'));
return false;
}
});
});
it('should start', function(done) {
testStart(done, {}, function(cp) {
if (cp.spawnargs && !cp.spawnargs.some(containsChrome)) {
done(new Error('Chrome driver should be loaded'));
return false;
}
});
});
it('should start with custom seleniumArgs', function(done) {
testStart(done, { seleniumArgs: ['-port', '12345'] }, function(cp) {
if (cp.spawnargs && !cp.spawnargs.some(containsChrome)) {
done(new Error('Chrome driver should be loaded'));
return false;
}
});
});
it('should start with the given drivers', function(done) {
testStart(done, { drivers: {} }, function(cp) {
if (cp.spawnargs && cp.spawnargs.some(containsChrome)) {
done(new Error('Chrome driver should not be loaded'));
return false;
}
});
});
it('should start and merge drivers', function(done) {
var options = { drivers: { chrome: {} } };
testStart(done, options, function(cp) {
if (cp.spawnargs && !cp.spawnargs.some(containsChrome)) {
done(new Error('Chrome driver should be loaded'));
return false;
}
});
});
it('can listen to stderr', function(done) {
var selenium = require('../');
selenium.start(function(err, cp) {
if (err) {
done(err);
return;
}
cp.stderr.once('data', function() {
cp.kill();
done();
});
});
});
});
|
local helpers = require "spec.helpers"
local utils = require "kong.tools.utils"
local function acl_cache_key(api_id, username)
return "ldap_auth_cache:" .. api_id .. ":" .. username
end
local ldap_host_aws = "ec2-54-172-82-117.compute-1.amazonaws.com"
describe("Plugin: ldap-auth (access)", function()
local client, client_admin, api2, plugin2
setup(function()
helpers.run_migrations()
local api1 = assert(helpers.dao.apis:insert {
name = "test-ldap",
hosts = { "ldap.com" },
upstream_url = "http://mockbin.com"
})
api2 = assert(helpers.dao.apis:insert {
name = "test-ldap2",
hosts = { "ldap2.com" },
upstream_url = "http://mockbin.com"
})
local api3 = assert(helpers.dao.apis:insert {
name = "test-ldap3",
hosts = { "ldap3.com" },
upstream_url = "http://mockbin.com"
})
local api4 = assert(helpers.dao.apis:insert {
name = "test-ldap4",
hosts = { "ldap4.com" },
upstream_url = "http://mockbin.com"
})
local anonymous_user = assert(helpers.dao.consumers:insert {
username = "no-body"
})
assert(helpers.dao.plugins:insert {
api_id = api1.id,
name = "ldap-auth",
config = {
ldap_host = ldap_host_aws,
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid"
}
})
plugin2 = assert(helpers.dao.plugins:insert {
api_id = api2.id,
name = "ldap-auth",
config = {
ldap_host = ldap_host_aws,
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid",
hide_credentials = true,
cache_ttl = 2,
}
})
assert(helpers.dao.plugins:insert {
api_id = api3.id,
name = "ldap-auth",
config = {
ldap_host = ldap_host_aws,
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid",
anonymous = anonymous_user.id,
}
})
assert(helpers.dao.plugins:insert {
api_id = api4.id,
name = "ldap-auth",
config = {
ldap_host = "ec2-54-210-29-167.compute-1.amazonaws.com",
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid",
cache_ttl = 2,
anonymous = utils.uuid(), -- non existing consumer
}
})
assert(helpers.start_kong())
end)
teardown(function()
helpers.stop_kong()
end)
before_each(function()
client = helpers.proxy_client()
client_admin = helpers.admin_client()
end)
after_each(function()
if client then client:close() end
end)
it("returns 'invalid credentials' and www-authenticate header when the credential is missing", function()
local r = assert(client:send {
method = "GET",
path = "/get",
headers = {
host = "ldap.com"
}
})
assert.response(r).has.status(401)
local value = assert.response(r).has.header("www-authenticate")
assert.are.equal('LDAP realm="kong"', value)
local json = assert.response(r).has.jsonbody()
assert.equal("Unauthorized", json.message)
end)
it("returns 'invalid credentials' when credential value is in wrong format in authorization header", function()
local r = assert(client:send {
method = "GET",
path = "/get",
headers = {
host = "ldap.com",
authorization = "abcd"
}
})
assert.response(r).has.status(403)
local json = assert.response(r).has.jsonbody()
assert.equal("Invalid authentication credentials", json.message)
end)
it("returns 'invalid credentials' when credential value is in wrong format in proxy-authorization header", function()
local r = assert(client:send {
method = "GET",
path = "/get",
headers = {
host = "ldap.com",
["proxy-authorization"] = "abcd"
}
})
assert.response(r).has.status(403)
local json = assert.response(r).has.jsonbody()
assert.equal("Invalid authentication credentials", json.message)
end)
it("returns 'invalid credentials' when credential value is missing in authorization header", function()
local r = assert(client:send {
method = "GET",
path = "/get",
headers = {
host = "ldap.com",
authorization = "ldap "
}
})
assert.response(r).has.status(403)
local json = assert.response(r).has.jsonbody()
assert.equal("Invalid authentication credentials", json.message)
end)
it("passes if credential is valid in post request", function()
local r = assert(client:send {
method = "POST",
path = "/request",
body = {},
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password"),
["content-type"] = "application/<API key>",
}
})
assert.response(r).has.status(200)
end)
it("passes if credential is valid and starts with space in post request", function()
local r = assert(client:send {
method = "POST",
path = "/request",
headers = {
host = "ldap.com",
authorization = " ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
end)
it("passes if signature type indicator is in caps and credential is valid in post request", function()
local r = assert(client:send {
method = "POST",
path = "/request",
headers = {
host = "ldap.com",
authorization = "LDAP " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
end)
it("passes if credential is valid in get request", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
local value = assert.request(r).has.header("<API key>")
assert.are.equal("einstein", value)
assert.request(r).has_not.header("<API key>")
end)
it("authorization fails if credential does has no password encoded in get request", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:")
}
})
assert.response(r).has.status(403)
end)
it("authorization fails if credential has multiple encoded usernames or passwords separated by ':' in get request", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:<API key>)
}
})
assert.response(r).has.status(403)
end)
it("does not pass if credential is invalid in get request", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:wrong_password")
}
})
assert.response(r).has.status(403)
end)
it("does not hide credential sent along with authorization header to upstream server", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
local value = assert.request(r).has.header("authorization")
assert.equal("ldap " .. ngx.encode_base64("einstein:password"), value)
end)
it("hides credential sent along with authorization header to upstream server", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap2.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
assert.request(r).has.no.header("authorization")
end)
it("caches LDAP Auth Credential", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap2.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
-- Check that cache is populated
local cache_key = acl_cache_key(api2.id, "einstein")
helpers.wait_until(function()
local res = assert(client_admin:send {
method = "GET",
path = "/cache/" .. cache_key
})
res:read_body()
return res.status == 200
end)
-- Check that cache is invalidated
helpers.wait_until(function()
local res = client_admin:send {
method = "GET",
path = "/cache/" .. cache_key
}
res:read_body()
--if res.status ~= 404 then
-- ngx.sleep( plugin2.config.cache_ttl / 5 )
--end
return res.status == 404
end, plugin2.config.cache_ttl + 10)
end)
describe("config.anonymous", function()
it("works with right credentials and anonymous", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap3.com",
authorization = "ldap " .. ngx.encode_base64("einstein:password")
}
})
assert.response(r).has.status(200)
local value = assert.request(r).has.header("<API key>")
assert.are.equal("einstein", value)
assert.request(r).has_not.header("<API key>")
end)
it("works with wrong credentials and anonymous", function()
local r = assert(client:send {
method = "GET",
path = "/request",
headers = {
host = "ldap3.com"
}
})
assert.response(r).has.status(200)
local value = assert.request(r).has.header("<API key>")
assert.are.equal("true", value)
value = assert.request(r).has.header("x-consumer-username")
assert.equal('no-body', value)
end)
it("errors when anonymous user doesn't exist", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "ldap4.com"
}
})
assert.response(res).has.status(500)
end)
end)
end)
describe("Plugin: ldap-auth (access)", function()
local client, user1, anonymous
setup(function()
local api1 = assert(helpers.dao.apis:insert {
name = "api-1",
hosts = { "logical-and.com" },
upstream_url = "http://mockbin.org/request"
})
assert(helpers.dao.plugins:insert {
api_id = api1.id,
name = "ldap-auth",
config = {
ldap_host = ldap_host_aws,
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid",
}
})
assert(helpers.dao.plugins:insert {
name = "key-auth",
api_id = api1.id
})
anonymous = assert(helpers.dao.consumers:insert {
username = "Anonymous"
})
user1 = assert(helpers.dao.consumers:insert {
username = "Mickey"
})
local api2 = assert(helpers.dao.apis:insert {
name = "api-2",
hosts = { "logical-or.com" },
upstream_url = "http://mockbin.org/request"
})
assert(helpers.dao.plugins:insert {
api_id = api2.id,
name = "ldap-auth",
config = {
ldap_host = ldap_host_aws,
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid",
anonymous = anonymous.id,
}
})
assert(helpers.dao.plugins:insert {
name = "key-auth",
api_id = api2.id,
config = {
anonymous = anonymous.id
}
})
assert(helpers.dao.keyauth_credentials:insert {
key = "Mouse",
consumer_id = user1.id
})
assert(helpers.start_kong())
client = helpers.proxy_client()
end)
teardown(function()
if client then client:close() end
helpers.stop_kong()
end)
describe("multiple auth without anonymous, logical AND", function()
it("passes with all credentials provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-and.com",
["apikey"] = "Mouse",
["Authorization"] = "ldap " .. ngx.encode_base64("einstein:password"),
}
})
assert.response(res).has.status(200)
assert.request(res).has.no.header("<API key>")
end)
it("fails 401, with only the first credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-and.com",
["apikey"] = "Mouse",
}
})
assert.response(res).has.status(401)
end)
it("fails 401, with only the second credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-and.com",
["Authorization"] = "ldap " .. ngx.encode_base64("einstein:password"),
}
})
assert.response(res).has.status(401)
end)
it("fails 401, with no credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-and.com",
}
})
assert.response(res).has.status(401)
end)
end)
describe("multiple auth with anonymous, logical OR", function()
it("passes with all credentials provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-or.com",
["apikey"] = "Mouse",
["Authorization"] = "ldap " .. ngx.encode_base64("einstein:password"),
}
})
assert.response(res).has.status(200)
assert.request(res).has.no.header("<API key>")
local id = assert.request(res).has.header("x-consumer-id")
assert.not_equal(id, anonymous.id)
assert(id == user1.id)
end)
it("passes with only the first credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-or.com",
["apikey"] = "Mouse",
}
})
assert.response(res).has.status(200)
assert.request(res).has.no.header("<API key>")
local id = assert.request(res).has.header("x-consumer-id")
assert.not_equal(id, anonymous.id)
assert.equal(user1.id, id)
end)
it("passes with only the second credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-or.com",
["Authorization"] = "ldap " .. ngx.encode_base64("einstein:password"),
}
})
assert.response(res).has.status(200)
assert.request(res).has.no.header("<API key>")
local id = assert.request(res).has.header("<API key>")
assert.equal("einstein", id)
end)
it("passes with no credential provided", function()
local res = assert(client:send {
method = "GET",
path = "/request",
headers = {
["Host"] = "logical-or.com",
}
})
assert.response(res).has.status(200)
assert.request(res).has.header("<API key>")
local id = assert.request(res).has.header("x-consumer-id")
assert.equal(id, anonymous.id)
end)
end)
end)
|
#ifndef <API key>
#define <API key>
enum FBHyperlinkType {
HYPERLINK_NONE = 0,
HYPERLINK_INTERNAL = 1,
HYPERLINK_EXTERNAL = 2,
//HYPERLINK_BOOK = 3,
};
#endif /* <API key> */
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_60) on Tue Aug 26 20:50:06 PDT 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>org.apache.solr.response Class Hierarchy (Solr 4.10.0 API)</title>
<meta name="date" content="2014-08-26">
<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="org.apache.solr.response Class Hierarchy (Solr 4.10.0 API)";
}
</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>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/solr/request/package-tree.html">Prev</a></li>
<li><a href="../../../../org/apache/solr/response/transform/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/solr/response/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.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 class="title">Hierarchy For Package org.apache.solr.response</h1>
<span class="strong">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.<a href="http://download.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="strong">Object</span></a>
<ul>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="class in org.apache.solr.response"><span class="strong"><API key></span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="interface in org.apache.solr.response"><API key></a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.Resolver.html" title="class in org.apache.solr.response"><span class="strong"><API key>.Resolver</span></a> (implements org.apache.solr.common.util.<a href="../../../../../solr-solrj/org/apache/solr/common/util/JavaBinCodec.ObjectResolver.html?is-external=true" title="class or interface in org.apache.solr.common.util">JavaBinCodec.ObjectResolver</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/CSVResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">CSVResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/JSONResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">JSONResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/PHPResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">PHPResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="class in org.apache.solr.response"><span class="strong"><API key></span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="class in org.apache.solr.response"><span class="strong"><API key></span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/RawResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">RawResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="interface in org.apache.solr.response"><API key></a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/ResponseWriterUtil.html" title="class in org.apache.solr.response"><span class="strong">ResponseWriterUtil</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/ResultContext.html" title="class in org.apache.solr.response"><span class="strong">ResultContext</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/RubyResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">RubyResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="class in org.apache.solr.response"><span class="strong"><API key></span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/SolrQueryResponse.html" title="class in org.apache.solr.response"><span class="strong">SolrQueryResponse</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="class in org.apache.solr.response"><span class="strong"><API key></span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.DoubleAsc.html" title="class in org.apache.solr.response"><span class="strong"><API key>.DoubleAsc</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.DoubleDesc.html" title="class in org.apache.solr.response"><span class="strong"><API key>.DoubleDesc</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.FieldWriter.html" title="class in org.apache.solr.response"><span class="strong"><API key>.FieldWriter</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.FloatAsc.html" title="class in org.apache.solr.response"><span class="strong"><API key>.FloatAsc</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.FloatDesc.html" title="class in org.apache.solr.response"><span class="strong"><API key>.FloatDesc</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.PriorityQueue.html" title="class in org.apache.solr.response"><span class="strong"><API key>.PriorityQueue</span></a><T></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/TextResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">TextResponseWriter</span></a>
<ul>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/SchemaXmlWriter.html" title="class in org.apache.solr.response"><span class="strong">SchemaXmlWriter</span></a></li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/XMLWriter.html" title="class in org.apache.solr.response"><span class="strong">XMLWriter</span></a></li>
</ul>
</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/XMLResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">XMLResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/XSLTResponseWriter.html" title="class in org.apache.solr.response"><span class="strong">XSLTResponseWriter</span></a> (implements org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response">QueryResponseWriter</a>)</li>
</ul>
</li>
</ul>
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
<ul>
<li type="circle">java.lang.<a href="http://download.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang"><span class="strong">Comparable</span></a><T>
<ul>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.SortValue.html" title="interface in org.apache.solr.response"><span class="strong"><API key>.SortValue</span></a></li>
</ul>
</li>
<li type="circle">org.apache.solr.util.plugin.<a href="../../../../org/apache/solr/util/plugin/<API key>.html" title="interface in org.apache.solr.util.plugin"><span class="strong"><API key></span></a>
<ul>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/QueryResponseWriter.html" title="interface in org.apache.solr.response"><span class="strong">QueryResponseWriter</span></a>
<ul>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.html" title="interface in org.apache.solr.response"><span class="strong"><API key></span></a></li>
</ul>
</li>
</ul>
</li>
<li type="circle">org.apache.solr.response.<a href="../../../../org/apache/solr/response/<API key>.IntComp.html" title="interface in org.apache.solr.response"><span class="strong"><API key>.IntComp</span></a></li>
</ul>
</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>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/solr/request/package-tree.html">Prev</a></li>
<li><a href="../../../../org/apache/solr/response/transform/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/solr/response/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.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>
<i>Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.</i>
<script src='../../../../prettify.js' type='text/javascript'></script>
<script type='text/javascript'>
(function(){
var oldonload = window.onload;
if (typeof oldonload != 'function') {
window.onload = prettyPrint;
} else {
window.onload = function() {
oldonload();
prettyPrint();
}
}
})();
</script>
</small></p>
</body>
</html>
|
// <API key>.hpp
#ifndef <API key>
#define <API key>
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/push_options.hpp>
#include <boost/asio/detail/push_options.hpp>
#include <cstddef>
#include <boost/config.hpp>
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/time_traits.hpp>
#include <boost/asio/detail/<API key>.hpp>
#include <boost/asio/detail/epoll_reactor.hpp>
#include <boost/asio/detail/kqueue_reactor.hpp>
#include <boost/asio/detail/select_reactor.hpp>
#include <boost/asio/detail/service_base.hpp>
#include <boost/asio/detail/win_iocp_io_service.hpp>
namespace boost {
namespace asio {
Default service implementation for a timer.
template <typename TimeType,
typename TimeTraits = boost::asio::time_traits<TimeType> >
class <API key>
#if defined(<API key>)
: public boost::asio::io_service::service
#else
: public boost::asio::detail::service_base<
<API key><TimeType, TimeTraits> >
#endif
{
public:
#if defined(<API key>)
The unique service identifier.
static boost::asio::io_service::id id;
#endif
The time traits type.
typedef TimeTraits traits_type;
The time type.
typedef typename traits_type::time_type time_type;
The duration type.
typedef typename traits_type::duration_type duration_type;
private:
// The type of the platform-specific implementation.
#if defined(BOOST_ASIO_HAS_IOCP)
typedef detail::<API key><
traits_type, detail::win_iocp_io_service> service_impl_type;
#elif defined(<API key>)
typedef detail::<API key><
traits_type, detail::epoll_reactor<false> > service_impl_type;
#elif defined(<API key>)
typedef detail::<API key><
traits_type, detail::kqueue_reactor<false> > service_impl_type;
#elif defined(<API key>)
typedef detail::<API key><
traits_type, detail::dev_poll_reactor<false> > service_impl_type;
#else
typedef detail::<API key><
traits_type, detail::select_reactor<false> > service_impl_type;
#endif
public:
The implementation type of the deadline timer.
#if defined(<API key>)
typedef <API key> implementation_type;
#else
typedef typename service_impl_type::implementation_type implementation_type;
#endif
Construct a new timer service for the specified io_service.
explicit <API key>(boost::asio::io_service& io_service)
: boost::asio::detail::service_base<
<API key><TimeType, TimeTraits> >(io_service),
service_impl_(boost::asio::use_service<service_impl_type>(io_service))
{
}
Destroy all user-defined handler objects owned by the service.
void shutdown_service()
{
}
Construct a new timer implementation.
void construct(implementation_type& impl)
{
service_impl_.construct(impl);
}
Destroy a timer implementation.
void destroy(implementation_type& impl)
{
service_impl_.destroy(impl);
}
Cancel any asynchronous wait operations associated with the timer.
std::size_t cancel(implementation_type& impl, boost::system::error_code& ec)
{
return service_impl_.cancel(impl, ec);
}
Get the expiry time for the timer as an absolute time.
time_type expires_at(const implementation_type& impl) const
{
return service_impl_.expires_at(impl);
}
Set the expiry time for the timer as an absolute time.
std::size_t expires_at(implementation_type& impl,
const time_type& expiry_time, boost::system::error_code& ec)
{
return service_impl_.expires_at(impl, expiry_time, ec);
}
Get the expiry time for the timer relative to now.
duration_type expires_from_now(const implementation_type& impl) const
{
return service_impl_.expires_from_now(impl);
}
Set the expiry time for the timer relative to now.
std::size_t expires_from_now(implementation_type& impl,
const duration_type& expiry_time, boost::system::error_code& ec)
{
return service_impl_.expires_from_now(impl, expiry_time, ec);
}
// Perform a blocking wait on the timer.
void wait(implementation_type& impl, boost::system::error_code& ec)
{
service_impl_.wait(impl, ec);
}
// Start an asynchronous wait on the timer.
template <typename WaitHandler>
void async_wait(implementation_type& impl, WaitHandler handler)
{
service_impl_.async_wait(impl, handler);
}
private:
// The service that provides the platform-specific implementation.
service_impl_type& service_impl_;
};
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
#endif // <API key>
|
package org.locationtech.geowave.core.store.cli.store;
import java.util.Map;
import java.util.Map.Entry;
import org.locationtech.geowave.core.cli.annotations.GeowaveOperation;
import org.locationtech.geowave.core.cli.api.OperationParams;
import org.locationtech.geowave.core.cli.api.<API key>;
import org.locationtech.geowave.core.store.GeoWaveStoreFinder;
import org.locationtech.geowave.core.store.<API key>;
import com.beust.jcommander.Parameters;
@GeowaveOperation(name = "listplugins", parentOperation = StoreSection.class)
@Parameters(commandDescription = "List supported data store types")
public class <API key> extends <API key><String> {
@Override
public void execute(final OperationParams params) {
params.getConsole().println(computeResults(params));
}
@Override
public String computeResults(final OperationParams params) {
final StringBuilder builder = new StringBuilder();
builder.append("Available datastores currently registered:\n");
final Map<String, <API key>> dataStoreFactories =
GeoWaveStoreFinder.<API key>();
for (final Entry<String, <API key>> <API key> : dataStoreFactories.entrySet()) {
final <API key> dataStoreFactory = <API key>.getValue();
final String desc =
dataStoreFactory.getDescription() == null ? "no description"
: dataStoreFactory.getDescription();
builder.append(String.format("%n %s:%n %s%n", dataStoreFactory.getType(), desc));
}
return builder.toString();
}
}
|
// WARNING: this file is generated and will be overwritten
// Generated on Mon May 12 2014 10:36:47 GMT-0700 (PDT)
// if you're checking out this file, you should check us out too.
/**
* JSC implementation for Foundation/NSRunLoop
*/
@import JavaScriptCore;
@import UIKit;
#import <hyperloop.h>
#import <<API key>.h>
@import Foundation;
// export typdefs we use
typedef id (*<API key>)(id,SEL,...);
// export methods we use
extern Class <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern JSValueRef <API key>(JSContextRef,CFRunLoopRef *);
extern JSValueRef <API key>(JSContextRef,Class);
extern JSValueRef <API key>(JSContextRef,NSArray *);
extern JSValueRef <API key>(JSContextRef,NSDate *);
extern JSValueRef <API key>(JSContextRef,NSMethodSignature *);
extern JSValueRef <API key>(JSContextRef,NSRunLoop *);
extern JSValueRef <API key>(JSContextRef,NSSet *);
extern JSValueRef <API key>(JSContextRef,NSString *);
extern JSValueRef <API key>(JSContextRef,bool);
extern JSValueRef <API key>(JSContextRef,<API key>);
extern JSValueRef <API key>(JSContextRef,int);
extern NSArray * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern NSDate * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern NSPort * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern NSString * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern NSTimer * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern SEL <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern id <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern int <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern struct _NSZone * <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
extern unsigned int <API key>(JSContextRef,JSValueRef,JSValueRef*,bool*);
|
package com.sxt.tonglian;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import com.sxt.base.utils.HttpClientUtil;
import com.sxt.tonglian.dto.PayQueryRequestDto;
import com.sxt.tonglian.dto.PayQueryResponseDto;
import com.sxt.util.StringUtil;
/**
*
* @author
* @date2016119 10:20:07
*
*/
public class PayQuery {
public static List<PayQueryResponseDto> payQuery(PayQueryRequestDto dto) throws Exception {
String xmlStr = loadXml(dto);
String xml = singlePaySignature(xmlStr);
String result = HttpClientUtil.httpsPost(TLConstants.TL_URL, xml);
if (verify(result)) {
return parseXml(result);
} else {
return null;
}
}
/**
* xml
* @param singlePay
* @return
*/
private static String loadXml(PayQueryRequestDto dto) {
StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"GBK\"?><AIPG>");
StringBuffer infoXml = new StringBuffer("<INFO>");
infoXml.append("<TRX_CODE>200004</TRX_CODE>");
infoXml.append("<VERSION>03</VERSION>");
infoXml.append("<DATA_TYPE>2</DATA_TYPE>");
infoXml.append("<REQ_SN></REQ_SN>");
infoXml.append("<USER_NAME>" + TLConstants.TL_USER_NAME + "</USER_NAME>");
infoXml.append("<USER_PASS>" + TLConstants.TL_USER_PASS + "</USER_PASS>");
infoXml.append("<SIGNED_MSG></SIGNED_MSG>");
infoXml.append("</INFO>");
StringBuffer qtransreqXml = new StringBuffer();
qtransreqXml.append("<QTRANSREQ>");
qtransreqXml.append("<MERCHANT_ID>200004</MERCHANT_ID>");
qtransreqXml.append("<QUERY_SN>" + dto.getReqSn() + "</QUERY_SN>");
qtransreqXml.append("<STATUS>2</STATUS>");
qtransreqXml.append("<TYPE>1</TYPE>");
qtransreqXml.append("<START_DAY></START_DAY>");
qtransreqXml.append("<END_DAY></END_DAY>");
qtransreqXml.append("</QTRANSREQ>");
xml.append(infoXml);
xml.append(qtransreqXml);
xml.append("</AIPG>");
return xml.toString();
}
/**
* xml
* @param xml
* @return
* @throws Exception
*/
private static String singlePaySignature(String xml) throws Exception {
String info = null;
info = xml.replace("<SIGNED_MSG></SIGNED_MSG>", "");
String encryptInfo = SignatureUtil.SignMsg(info);
// xml
return xml.replace("<SIGNED_MSG></SIGNED_MSG>", "<SIGNED_MSG>" + encryptInfo + "</SIGNED_MSG>");
}
/**
*
* @param xml
* @return
* @throws Exception
*/
private static boolean verify(String xml) throws Exception {
int startIndex = xml.indexOf("<SIGNED_MSG>");
int endIndex = xml.indexOf("</SIGNED_MSG>");
String ciphertext = xml.substring(startIndex + 12, endIndex);
String plaintext = xml.substring(0, startIndex) + xml.substring(endIndex + 13, xml.length());
return SignatureUtil.VerifyMsg(ciphertext, plaintext);
}
/**
* xml
* @param xml
* @return
* @throws DocumentException
*/
@SuppressWarnings("unchecked")
private static List<PayQueryResponseDto> parseXml(String xml) throws DocumentException {
// stringxml
Document document = DocumentHelper.parseText(xml);
Element root = (Element) document.getRootElement();
Integer dateType = 2;
String trxCode = "", version = "", reqSn = "", retCode = "", errMsg = "";
List<PayQueryResponseDto> payQueryList = new ArrayList<PayQueryResponseDto>();
for (Iterator<Element> iterator = root.elementIterator(); iterator.hasNext();) {
Element ele = (Element) iterator.next();
if ("INFO".equals(ele.getName())) {
for (Iterator<Element> iterator2 = ele.elementIterator(); iterator2.hasNext();) {
Element childEle = (Element) iterator2.next();
if ("TRX_CODE".equals(childEle.getName())) {
trxCode = childEle.getTextTrim();
} else if ("VERSION".equals(childEle.getName())) {
version = childEle.getTextTrim();
} else if ("DATA_TYPE".equals(childEle.getName())) {
dateType = Integer.valueOf(childEle.getTextTrim());
} else if ("REQ_SN".equals(childEle.getName())) {
reqSn = childEle.getTextTrim();
} else if ("RET_CODE".equals(childEle.getName())) {
retCode = childEle.getTextTrim();
} else if ("ERR_MSG".equals(childEle.getName())) {
errMsg = childEle.getTextTrim();
}
}
} else if ("QTRANSRSP".equals(ele.getName())) {
for (Iterator<Element> iterator2 = ele.elementIterator(); iterator2.hasNext();) {
Element childEle = (Element) iterator2.next();
if ("QTDETAIL".equals(childEle.getName())) {
PayQueryResponseDto dto = new PayQueryResponseDto();
dto.setTrxCode(trxCode); dto.setVersion(version);
dto.setDateType(dateType); dto.setReqSn(reqSn);
dto.setRetCode(retCode); dto.setErrMsg(errMsg);
for (Iterator<Element> iterator3 = childEle.elementIterator(); iterator3.hasNext();) {
Element childEle2 = (Element) iterator3.next();
if ("BATCHID".equals(childEle2.getName())) {
dto.setBatchId(childEle2.getTextTrim());
} else if ("SN".equals(childEle2.getName())) {
dto.setSn(childEle2.getTextTrim());
} else if ("TRXDIR".equals(childEle2.getName())) {
dto.setTrxdir(childEle2.getTextTrim());
} else if ("SETTDAY".equals(childEle2.getName())) {
dto.setSettday(childEle2.getTextTrim());
} else if ("FINTIME".equals(childEle2.getName())) {
dto.setFintime(childEle2.getTextTrim());
} else if ("SUBMITTIME".equals(childEle2.getName())) {
dto.setSubmitTime(childEle2.getTextTrim());
} else if ("ACCOUNT_NO".equals(childEle2.getName())) {
dto.setAccountNo(childEle2.getTextTrim());
} else if ("ACCOUNT_NAME".equals(childEle2.getName())) {
dto.setAccountName(childEle2.getTextTrim());
} else if ("AMOUNT".equals(childEle2.getName())) {
dto.setAmount(StringUtil.isEmpty(childEle2.getTextTrim()) ? 0l :
Long.valueOf(childEle2.getTextTrim()));
} else if ("CUST_USERID".equals(childEle2.getName())) {
dto.setCustUserId(childEle2.getTextTrim());
} else if ("REMARK".equals(childEle2.getName())) {
dto.setRemark(childEle2.getTextTrim());
} else if ("RET_CODE".equals(childEle2.getName())) {
dto.setRetCode2(childEle2.getTextTrim());
} else if ("ERR_MSG".equals(childEle2.getName())) {
dto.setErrMsg2(childEle2.getTextTrim());
}
}
payQueryList.add(dto);
}
}
}
}
if (payQueryList.size() == 0) {
if (StringUtil.isNotEmpty(retCode)) {
PayQueryResponseDto dto = new PayQueryResponseDto();
dto.setTrxCode(trxCode); dto.setVersion(version);
dto.setDateType(dateType); dto.setReqSn(reqSn);
dto.setRetCode(retCode); dto.setErrMsg(errMsg);
payQueryList.add(dto);
return payQueryList;
} else {
return null;
}
} else {
return payQueryList;
}
}
/**
*
* @param code
* @return
*/
public static String codeConvertResult(String code) {
if (StringUtil.isEmpty(code)) {
return null;
}
if ("0000".equals(code) || "4000".equals(code)) {
return "success";
} else if ("2000".equals(code) || "0003".equals(code)
|| "2001".equals(code) || "2003".equals(code)
|| "2005".equals(code) || "2007".equals(code)
|| "2008".equals(code) || "0014".equals(code)) {
return "process";
} else {
return "fail";
}
}
public static void main(String[] args) throws Exception {
PayQueryRequestDto dto = new PayQueryRequestDto();
dto.setReqSn("<API key>");
List<PayQueryResponseDto> list = payQuery(dto);
System.out.println(list.size());
}
}
|
/* $NetBSD: pickmode.c,v 1.4 2011/04/09 20:53:39 christos Exp $ */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pickmode.c,v 1.4 2011/04/09 20:53:39 christos Exp $");
#include <sys/param.h>
#include <dev/videomode/videomode.h>
#include "opt_videomode.h"
#ifdef PICKMODE_DEBUG
#define DPRINTF printf
#else
#define DPRINTF while (0) printf
#endif
const struct videomode *
<API key>(int width, int height, int dotclock)
{
const struct videomode *this, *best = NULL;
int i;
DPRINTF("%s: looking for %d x %d at up to %d kHz\n", __func__, width,
height, dotclock);
for (i = 0; i < videomode_count; i++) {
this = &videomode_list[i];
if ((this->hdisplay != width) || (this->vdisplay != height) ||
(this->dot_clock > dotclock))
continue;
if (best != NULL) {
if (this->dot_clock > best->dot_clock)
best = this;
} else
best = this;
}
if (best != NULL)
DPRINTF("found %s\n", best->name);
return best;
}
const struct videomode *
pick_mode_by_ref(int width, int height, int refresh)
{
const struct videomode *this, *best = NULL;
int mref, closest = 1000, i, diff;
DPRINTF("%s: looking for %d x %d at up to %d Hz\n", __func__, width,
height, refresh);
for (i = 0; i < videomode_count; i++) {
this = &videomode_list[i];
mref = this->dot_clock * 1000 / (this->htotal * this->vtotal);
diff = abs(mref - refresh);
if ((this->hdisplay != width) || (this->vdisplay != height))
continue;
DPRINTF("%s in %d hz, diff %d\n", this->name, mref, diff);
if (best != NULL) {
if (diff < closest) {
best = this;
closest = diff;
}
} else {
best = this;
closest = diff;
}
}
if (best != NULL)
DPRINTF("found %s %d\n", best->name, best->dot_clock);
return best;
}
static inline void
swap_modes(struct videomode *left, struct videomode *right)
{
struct videomode temp;
temp = *left;
*left = *right;
*right = temp;
}
/*
* Sort modes by refresh rate, aspect ratio (*), then resolution.
* Preferred mode or largest mode is first in the list and other modes
* are sorted on closest match to that mode.
* (*) Note that the aspect ratio calculation treats "close" aspect ratios
* (within 12.5%) as the same for this purpose.
*/
#define DIVIDE(x, y) (((x) + ((y) / 2)) / (y))
void
sort_modes(struct videomode *modes, struct videomode **preferred, int nmodes)
{
int aspect, refresh, hbest, vbest, abest, atemp, rbest, rtemp;
int i, j;
struct videomode *mtemp = NULL;
if (nmodes < 2)
return;
if (*preferred != NULL) {
/* Put the preferred mode first in the list */
aspect = (*preferred)->hdisplay * 100 / (*preferred)->vdisplay;
refresh = DIVIDE(DIVIDE((*preferred)->dot_clock * 1000,
(*preferred)->htotal), (*preferred)->vtotal);
if (*preferred != modes) {
swap_modes(*preferred, modes);
*preferred = modes;
}
} else {
/*
* Find the largest horizontal and vertical mode and put that
* first in the list. Preferred refresh rate is taken from
* the first mode of this size.
*/
hbest = 0;
vbest = 0;
for (i = 0; i < nmodes; i++) {
if (modes[i].hdisplay > hbest) {
hbest = modes[i].hdisplay;
vbest = modes[i].vdisplay;
mtemp = &modes[i];
} else if (modes[i].hdisplay == hbest &&
modes[i].vdisplay > vbest) {
vbest = modes[i].vdisplay;
mtemp = &modes[i];
}
}
aspect = mtemp->hdisplay * 100 / mtemp->vdisplay;
refresh = DIVIDE(DIVIDE(mtemp->dot_clock * 1000,
mtemp->htotal), mtemp->vtotal);
if (mtemp != modes)
swap_modes(mtemp, modes);
}
/* Sort other modes by refresh rate, aspect ratio, then resolution */
for (j = 1; j < nmodes - 1; j++) {
rbest = 1000;
abest = 1000;
hbest = 0;
vbest = 0;
for (i = j; i < nmodes; i++) {
rtemp = abs(refresh -
DIVIDE(DIVIDE(modes[i].dot_clock * 1000,
modes[i].htotal), modes[i].vtotal));
atemp = (modes[i].hdisplay * 100 / modes[i].vdisplay);
if (rtemp < rbest) {
rbest = rtemp;
mtemp = &modes[i];
}
if (rtemp == rbest) {
/* Treat "close" aspect ratios as identical */
if (abs(abest - atemp) > (abest / 8) &&
abs(aspect - atemp) < abs(aspect - abest)) {
abest = atemp;
mtemp = &modes[i];
}
if (atemp == abest ||
abs(abest - atemp) <= (abest / 8)) {
if (modes[i].hdisplay > hbest) {
hbest = modes[i].hdisplay;
mtemp = &modes[i];
}
if (modes[i].hdisplay == hbest &&
modes[i].vdisplay > vbest) {
vbest = modes[i].vdisplay;
mtemp = &modes[i];
}
}
}
}
if (mtemp != &modes[j])
swap_modes(mtemp, &modes[j]);
}
}
|
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace DbgEng
{
[ComImport, Guid("<API key>"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IDebugBreakpoint2 : IDebugBreakpoint
{
#pragma warning disable CS0108 // XXX hides inherited member. This is COM default.
#region IDebugBreakpoint
uint GetId();
void GetType(
[Out] out uint BreakType,
[Out] out uint ProcType);
[return: MarshalAs(UnmanagedType.Interface)]
IDebugClient GetAdder();
uint GetFlags();
void AddFlags(
[In] uint Flags);
void RemoveFlags(
[In] uint Flags);
void SetFlags(
[In] uint Flags);
ulong GetOffset();
void SetOffset(
[In] ulong Offset);
void GetDataParameters(
[Out] out uint Size,
[Out] out uint AccessType);
void SetDataParameters(
[In] uint Size,
[In] uint AccessType);
uint GetPassCount();
void SetPassCount(
[In] uint Count);
uint GetCurrentPassCount();
uint GetMatchThreadId();
void SetMatchThreadId(
[In] uint Thread);
void GetCommand(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] uint BufferSize,
[Out] out uint CommandSize);
void SetCommand(
[In, MarshalAs(UnmanagedType.LPStr)] string Command);
void GetOffsetExpression(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] uint BufferSize,
[Out] out uint ExpressionSize);
void SetOffsetExpression(
[In, MarshalAs(UnmanagedType.LPStr)] string Expression);
<API key> GetParameters();
#endregion
#pragma warning restore CS0108 // XXX hides inherited member. This is COM default.
void GetCommandWide(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] uint BufferSize,
[Out] out uint CommandSize);
void SetCommandWide(
[In, MarshalAs(UnmanagedType.LPWStr)] string Command);
void <API key>(
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder Buffer,
[In] uint BufferSize,
[Out] out uint ExpressionSize);
void <API key>(
[In, MarshalAs(UnmanagedType.LPWStr)] string Expression);
}
}
|
package com.github.zhongl.hs4j.kit.annotations;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
* {@link Columns}
*
* @author <a href=mailto:zhong.lunfu@gmail.com>zhongl</a>
* @created 2011-6-2
*
*/
@Target(METHOD)
@Retention(RUNTIME)
public @interface Columns {
String[] value();
}
|
//! Connection pooling for a single MongoDB server.
use error::Error::{self, ArgumentError, OperationError};
use error::Result;
use Client;
use coll::options::FindOptions;
use command_type::CommandType;
use connstring::Host;
use cursor::Cursor;
use stream::{Stream, StreamConnector};
use wire_protocol::flags::OpQueryFlags;
use bson::{bson, doc};
use bufstream::BufStream;
use std::fmt;
use std::sync::{Arc, Condvar, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
pub static DEFAULT_POOL_SIZE: usize = 5;
Handles threaded connections to a MongoDB server.
#[derive(Clone)]
pub struct ConnectionPool {
The connection host.
pub host: Host,
// The socket pool.
inner: Arc<Mutex<Pool>>,
// A condition variable used for threads waiting for the pool
// to be repopulated with available connections.
wait_lock: Arc<Condvar>,
stream_connector: StreamConnector,
}
impl fmt::Debug for ConnectionPool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("ConnectionPool")
.field("host", &self.host)
.finish()
}
}
struct Pool {
The maximum number of concurrent connections allowed.
pub size: usize,
// The current number of open connections.
pub len: Arc<AtomicUsize>,
// The idle socket pool.
sockets: Vec<BufStream<Stream>>,
// The pool iteration. When a server monitor fails to execute ismaster,
// the connection pool is cleared and the iteration is incremented.
iteration: usize,
}
Holds an available socket, with logic to return the socket
to the connection pool when dropped.
pub struct PooledStream {
// This socket option will always be Some(stream) until it is
// returned to the pool using take().
socket: Option<BufStream<Stream>>,
// A reference to the pool that the stream was taken from.
pool: Arc<Mutex<Pool>>,
// A reference to the waiting condvar associated with the pool.
wait_lock: Arc<Condvar>,
// The pool iteration at the moment of extraction.
iteration: usize,
// Whether the handshake occurred successfully.
<API key>: bool,
}
impl PooledStream {
Returns a reference to the socket.
pub fn get_socket(&mut self) -> &mut BufStream<Stream> {
self.socket.as_mut().unwrap()
}
}
impl Drop for PooledStream {
fn drop(&mut self) {
// Don't add streams that couldn't successfully handshake to the pool.
if !self.<API key> {
return;
}
// Attempt to lock and return the socket to the pool,
// or give up if the pool lock has been poisoned.
if let Ok(mut locked) = self.pool.lock() {
if self.iteration == locked.iteration {
locked.sockets.push(self.socket.take().unwrap());
// Notify waiting threads that the pool has been repopulated.
self.wait_lock.notify_one();
}
}
}
}
impl ConnectionPool {
Returns a connection pool with a default size.
pub fn new(host: Host, connector: StreamConnector) -> ConnectionPool {
ConnectionPool::with_size(host, connector, DEFAULT_POOL_SIZE)
}
Returns a connection pool with a specified capped size.
pub fn with_size(host: Host, connector: StreamConnector, size: usize) -> ConnectionPool {
ConnectionPool {
host: host,
wait_lock: Arc::new(Condvar::new()),
inner: Arc::new(Mutex::new(Pool {
len: Arc::new(AtomicUsize::new(0)),
size: size,
sockets: Vec::with_capacity(size),
iteration: 0,
})),
stream_connector: connector,
}
}
Sets the maximum number of open connections.
pub fn set_size(&self, size: usize) -> Result<()> {
if size < 1 {
Err(ArgumentError(String::from(
"The connection pool size must be greater than zero.",
)))
} else {
let mut locked = self.inner.lock()?;
locked.size = size;
Ok(())
}
}
// Clear all open socket connections.
pub fn clear(&self) {
if let Ok(mut locked) = self.inner.lock() {
locked.iteration += 1;
locked.sockets.clear();
locked.len.store(0, Ordering::SeqCst);
}
}
Attempts to acquire a connected socket. If none are available and
the pool has not reached its maximum size, a new socket will connect.
Otherwise, the function will block until a socket is returned to the pool.
pub fn acquire_stream(&self, client: Client) -> Result<PooledStream> {
let mut locked = self.inner.lock()?;
if locked.size == 0 {
return Err(OperationError(String::from(
"The connection pool does not allow connections; increase the size of the pool.",
)));
}
loop {
// Acquire available existing socket
if let Some(stream) = locked.sockets.pop() {
return Ok(PooledStream {
socket: Some(stream),
pool: self.inner.clone(),
wait_lock: self.wait_lock.clone(),
iteration: locked.iteration,
<API key>: true,
});
}
// Attempt to make a new connection
let len = locked.len.load(Ordering::SeqCst);
if len < locked.size {
let socket = self.connect()?;
let mut stream = PooledStream {
socket: Some(socket),
pool: self.inner.clone(),
wait_lock: self.wait_lock.clone(),
iteration: locked.iteration,
<API key>: false,
};
self.handshake(client, &mut stream)?;
let _ = locked.len.fetch_add(1, Ordering::SeqCst);
return Ok(stream);
}
// Release lock and wait for pool to be repopulated
locked = self.wait_lock.wait(locked)?;
}
}
// Connects to a MongoDB server as defined by the initial configuration.
fn connect(&self) -> Result<BufStream<Stream>> {
match self.stream_connector.connect(
&self.host.host_name[..],
self.host.port,
) {
Ok(s) => Ok(BufStream::new(s)),
Err(e) => Err(Error::from(e)),
}
}
// This sends the client metadata to the server as described by the handshake spec.
fn handshake(&self, client: Client, stream: &mut PooledStream) -> Result<()> {
let mut options = FindOptions::new();
options.limit = Some(1);
options.batch_size = Some(1);
let flags = OpQueryFlags::with_find_options(&options);
Cursor::query_with_stream(
stream,
client,
String::from("local.$cmd"),
flags,
doc! {
"isMaster": 1i32,
"client": {
"driver": {
"name": ::DRIVER_NAME,
"version": env!("CARGO_PKG_VERSION"),
},
"os": {
"type": ::std::env::consts::OS,
"architecture": ::std::env::consts::ARCH
}
},
},
options,
CommandType::IsMaster,
false,
None,
)?;
stream.<API key> = true;
Ok(())
}
}
|
#home-header {
text-align: center;
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>zebkit.URI - zebkit</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/dune-light.css">
<link rel="stylesheet" href="../assets/css/main.light.css" id="site_styles">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc" style="padding-top:16px;">
<div class="yui3-g">
<table style="width:auto">
<tr style="background:none">
<td valign="top" align="left" >
<div id="sidebar" class="yui3-u">
<div id="classes" class="sidebox">
<div class="hd">
<h2 class="no-toc">All packages</h2>
</div>
<div class="bd">
<ul>
<li>
<a href="../classes/environment.html">environment</a>
</li>
<li>
<a href="../classes/zebkit.html">zebkit</a>
</li>
<li>
<a href="../classes/zebkit.data.html">zebkit.data</a>
</li>
<li>
<a href="../classes/zebkit.draw.html">zebkit.draw</a>
</li>
<li>
<a href="../classes/zebkit.io.html">zebkit.io</a>
</li>
<li>
<a href="../classes/zebkit.layout.html">zebkit.layout</a>
</li>
<li>
<a href="../classes/zebkit.ui.html">zebkit.ui</a>
</li>
<li>
<a href="../classes/zebkit.ui.date.html">zebkit.ui.date</a>
</li>
<li>
<a href="../classes/zebkit.ui.design.html">zebkit.ui.design</a>
</li>
<li>
<a href="../classes/zebkit.ui.event.html">zebkit.ui.event</a>
</li>
<li>
<a href="../classes/zebkit.ui.grid.html">zebkit.ui.grid</a>
</li>
<li>
<a href="../classes/zebkit.ui.tree.html">zebkit.ui.tree</a>
</li>
<li>
<a href="../classes/zebkit.ui.vk.html">zebkit.ui.vk</a>
</li>
<li>
<a href="../classes/zebkit.ui.web.html">zebkit.ui.web</a>
</li>
<li>
<a href="../classes/zebkit.util.html">zebkit.util</a>
</li>
<li>
<a href="../classes/zebkit.web.html">zebkit.web</a>
</li>
</ul>
</div>
</div>
<div id="classes" class="sidebox">
<div class="hd">
<table border="0" cellpadding="0" cellspecing="0">
<tr>
<td>
<h2 class="no-toc">All classes</h2>
</td>
<td>
<input id="search" style="width:95%;" type=text value=""/>
</td>
</tr>
</table>
</div>
<div class="bd">
<table id="allClasses" style="background:none;" border="0">
<tr class="classNameCell" className="zebkit.Class" name="allClassesItem">
<td>
<a href="../classes/zebkit.Class.html">zebkit.Class</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Class.zObject" name="allClassesItem">
<td>
<a href="../classes/zebkit.Class.zObject.html">zebkit.Class.zObject</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.DataModel" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.DataModel.html">zebkit.data.DataModel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.Item" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.Item.html">zebkit.data.Item</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.ListModel" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.ListModel.html">zebkit.data.ListModel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.Matrix" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.Matrix.html">zebkit.data.Matrix</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.SingleLineTxt" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.SingleLineTxt.html">zebkit.data.SingleLineTxt</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.Text" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.Text.html">zebkit.data.Text</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.TextEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.TextEvent.html">zebkit.data.TextEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.TextModel" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.TextModel.html">zebkit.data.TextModel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.data.TreeModel" name="allClassesItem">
<td>
<a href="../classes/zebkit.data.TreeModel.html">zebkit.data.TreeModel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.DoIt" name="allClassesItem">
<td>
<a href="../classes/zebkit.DoIt.html">zebkit.DoIt</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.ArrowView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.ArrowView.html">zebkit.draw.ArrowView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.BaseTextRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.BaseTextRender.html">zebkit.draw.BaseTextRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.BaseViewProvider" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.BaseViewProvider.html">zebkit.draw.BaseViewProvider</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Border" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Border.html">zebkit.draw.Border</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.CheckboxView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.CheckboxView.html">zebkit.draw.CheckboxView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.CompositeView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.CompositeView.html">zebkit.draw.CompositeView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.CutStringRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.CutStringRender.html">zebkit.draw.CutStringRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.DecoratedTextRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.DecoratedTextRender.html">zebkit.draw.DecoratedTextRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Dotted" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Dotted.html">zebkit.draw.Dotted</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Etched" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Etched.html">zebkit.draw.Etched</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.FunctionRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.FunctionRender.html">zebkit.draw.FunctionRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Gradient" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Gradient.html">zebkit.draw.Gradient</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Line" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Line.html">zebkit.draw.Line</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.PasswordText" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.PasswordText.html">zebkit.draw.PasswordText</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Pattern" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Pattern.html">zebkit.draw.Pattern</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.PentahedronShape" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.PentahedronShape.html">zebkit.draw.PentahedronShape</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Picture" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Picture.html">zebkit.draw.Picture</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Radial" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Radial.html">zebkit.draw.Radial</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.RadioView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.RadioView.html">zebkit.draw.RadioView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Raised" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Raised.html">zebkit.draw.Raised</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Render" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Render.html">zebkit.draw.Render</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.rgb" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.rgb.html">zebkit.draw.rgb</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.RoundBorder" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.RoundBorder.html">zebkit.draw.RoundBorder</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Shape" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Shape.html">zebkit.draw.Shape</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.StringRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.StringRender.html">zebkit.draw.StringRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.Sunken" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.Sunken.html">zebkit.draw.Sunken</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.TextRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.TextRender.html">zebkit.draw.TextRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.ThumbView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.ThumbView.html">zebkit.draw.ThumbView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.TitledBorder" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.TitledBorder.html">zebkit.draw.TitledBorder</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.ToggleView" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.ToggleView.html">zebkit.draw.ToggleView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.TriangleShape" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.TriangleShape.html">zebkit.draw.TriangleShape</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.View" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.View.html">zebkit.draw.View</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.ViewSet" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.ViewSet.html">zebkit.draw.ViewSet</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.draw.WrappedTextRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.draw.WrappedTextRender.html">zebkit.draw.WrappedTextRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Dummy" name="allClassesItem">
<td>
<a href="../classes/zebkit.Dummy.html">zebkit.Dummy</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Event" name="allClassesItem">
<td>
<a href="../classes/zebkit.Event.html">zebkit.Event</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.EventProducer" name="allClassesItem">
<td>
<a href="../classes/zebkit.EventProducer.html">zebkit.EventProducer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Font" name="allClassesItem">
<td>
<a href="../classes/zebkit.Font.html">zebkit.Font</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Interface" name="allClassesItem">
<td>
<a href="../classes/zebkit.Interface.html">zebkit.Interface</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.io.HTTP" name="allClassesItem">
<td>
<a href="../classes/zebkit.io.HTTP.html">zebkit.io.HTTP</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.io.JRPC" name="allClassesItem">
<td>
<a href="../classes/zebkit.io.JRPC.html">zebkit.io.JRPC</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.io.Service" name="allClassesItem">
<td>
<a href="../classes/zebkit.io.Service.html">zebkit.io.Service</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.io.XRPC" name="allClassesItem">
<td>
<a href="../classes/zebkit.io.XRPC.html">zebkit.io.XRPC</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.BorderLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.BorderLayout.html">zebkit.layout.BorderLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.Constraints" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.Constraints.html">zebkit.layout.Constraints</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.FlowLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.FlowLayout.html">zebkit.layout.FlowLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.GridLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.GridLayout.html">zebkit.layout.GridLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.Layout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.Layout.html">zebkit.layout.Layout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.Layoutable" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.Layoutable.html">zebkit.layout.Layoutable</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.ListLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.ListLayout.html">zebkit.layout.ListLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.PercentLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.PercentLayout.html">zebkit.layout.PercentLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.RasterLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.RasterLayout.html">zebkit.layout.RasterLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.layout.StackLayout" name="allClassesItem">
<td>
<a href="../classes/zebkit.layout.StackLayout.html">zebkit.layout.StackLayout</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Listeners" name="allClassesItem">
<td>
<a href="../classes/zebkit.Listeners.html">zebkit.Listeners</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Package" name="allClassesItem">
<td>
<a href="../classes/zebkit.Package.html">zebkit.Package</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.PathSearch" name="allClassesItem">
<td>
<a href="../classes/zebkit.PathSearch.html">zebkit.PathSearch</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ArrowButton" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ArrowButton.html">zebkit.ui.ArrowButton</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.BaseList" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.BaseList.html">zebkit.ui.BaseList</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.BoldLabel" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.BoldLabel.html">zebkit.ui.BoldLabel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.BorderPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.BorderPan.html">zebkit.ui.BorderPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Button" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Button.html">zebkit.ui.Button</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Checkbox" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Checkbox.html">zebkit.ui.Checkbox</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Checkbox.Box" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Checkbox.Box.html">zebkit.ui.Checkbox.Box</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.CollapsiblePan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.CollapsiblePan.html">zebkit.ui.CollapsiblePan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Combo" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Combo.html">zebkit.ui.Combo</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Combo.ComboPadPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Combo.ComboPadPan.html">zebkit.ui.Combo.ComboPadPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Combo.ContentPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Combo.ContentPan.html">zebkit.ui.Combo.ContentPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Combo.EditableContentPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Combo.EditableContentPan.html">zebkit.ui.Combo.EditableContentPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Combo.ReadonlyContentPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Combo.ReadonlyContentPan.html">zebkit.ui.Combo.ReadonlyContentPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.CompList" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.CompList.html">zebkit.ui.CompList</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.CompRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.CompRender.html">zebkit.ui.CompRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Cursor" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Cursor.html">zebkit.ui.Cursor</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.Calendar" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.Calendar.html">zebkit.ui.date.Calendar</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.Calendar.MonthsCombo" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.Calendar.MonthsCombo.html">zebkit.ui.date.Calendar.MonthsCombo</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.DateInputField" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.DateInputField.html">zebkit.ui.date.DateInputField</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.DateRangeInput" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.DateRangeInput.html">zebkit.ui.date.DateRangeInput</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.DateTextField" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.DateTextField.html">zebkit.ui.date.DateTextField</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.MonthDaysGrid" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.MonthDaysGrid.html">zebkit.ui.date.MonthDaysGrid</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.MonthDaysGrid.DayPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.MonthDaysGrid.DayPan.html">zebkit.ui.date.MonthDaysGrid.DayPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.date.PopupCalendarMix" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.date.PopupCalendarMix.html">zebkit.ui.date.PopupCalendarMix</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.design.FormTreeModel" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.design.FormTreeModel.html">zebkit.ui.design.FormTreeModel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.design.ShaperBorder" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.design.ShaperBorder.html">zebkit.ui.design.ShaperBorder</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.design.ShaperPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.design.ShaperPan.html">zebkit.ui.design.ShaperPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.DrawFocusMarker" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.DrawFocusMarker.html">zebkit.ui.DrawFocusMarker</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.Clipboard" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.Clipboard.html">zebkit.ui.event.Clipboard</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.CompEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.CompEvent.html">zebkit.ui.event.CompEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.CursorManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.CursorManager.html">zebkit.ui.event.CursorManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.EventManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.EventManager.html">zebkit.ui.event.EventManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.FocusEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.FocusEvent.html">zebkit.ui.event.FocusEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.FocusManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.FocusManager.html">zebkit.ui.event.FocusManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.KeyEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.KeyEvent.html">zebkit.ui.event.KeyEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.Manager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.Manager.html">zebkit.ui.event.Manager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.MenuEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.MenuEvent.html">zebkit.ui.event.MenuEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.PointerEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.PointerEvent.html">zebkit.ui.event.PointerEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.ShortcutEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.ShortcutEvent.html">zebkit.ui.event.ShortcutEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.ShortcutManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.ShortcutManager.html">zebkit.ui.event.ShortcutManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.<API key>" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.<API key>.html">zebkit.ui.event.<API key></a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.event.WinEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.event.WinEvent.html">zebkit.ui.event.WinEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.EvStatePan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.EvStatePan.html">zebkit.ui.EvStatePan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.FireEventRepeatedly" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.FireEventRepeatedly.html">zebkit.ui.FireEventRepeatedly</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.BaseCaption" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.BaseCaption.html">zebkit.ui.grid.BaseCaption</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.CaptionViewProvider" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.CaptionViewProvider.html">zebkit.ui.grid.CaptionViewProvider</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.CellSelectMode" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.CellSelectMode.html">zebkit.ui.grid.CellSelectMode</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.CellsVisibility" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.CellsVisibility.html">zebkit.ui.grid.CellsVisibility</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.ColSelectMode" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.ColSelectMode.html">zebkit.ui.grid.ColSelectMode</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.CompGridCaption" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.CompGridCaption.html">zebkit.ui.grid.CompGridCaption</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.CompGridCaption.TitlePan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.CompGridCaption.TitlePan.html">zebkit.ui.grid.CompGridCaption.TitlePan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.DefEditors" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.DefEditors.html">zebkit.ui.grid.DefEditors</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.DefViews" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.DefViews.html">zebkit.ui.grid.DefViews</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.Grid" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.Grid.html">zebkit.ui.grid.Grid</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.GridCaption" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.GridCaption.html">zebkit.ui.grid.GridCaption</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.GridStretchPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.GridStretchPan.html">zebkit.ui.grid.GridStretchPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.LeftCompGridCaption" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.LeftCompGridCaption.html">zebkit.ui.grid.LeftCompGridCaption</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.LeftGridCaption" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.LeftGridCaption.html">zebkit.ui.grid.LeftGridCaption</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.Metrics" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.Metrics.html">zebkit.ui.grid.Metrics</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.RowSelectMode" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.RowSelectMode.html">zebkit.ui.grid.RowSelectMode</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.grid.StrippedRows" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.grid.StrippedRows.html">zebkit.ui.grid.StrippedRows</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Group" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Group.html">zebkit.ui.Group</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.HostDecorativeViews" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.HostDecorativeViews.html">zebkit.ui.HostDecorativeViews</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ImageLabel" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ImageLabel.html">zebkit.ui.ImageLabel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ImagePan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ImagePan.html">zebkit.ui.ImagePan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Label" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Label.html">zebkit.ui.Label</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Line" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Line.html">zebkit.ui.Line</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.LinearRulerPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.LinearRulerPan.html">zebkit.ui.LinearRulerPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Link" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Link.html">zebkit.ui.Link</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.List" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.List.html">zebkit.ui.List</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.List.ViewProvider" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.List.ViewProvider.html">zebkit.ui.List.ViewProvider</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Menu" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Menu.html">zebkit.ui.Menu</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Menubar" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Menubar.html">zebkit.ui.Menubar</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.MenuItem" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.MenuItem.html">zebkit.ui.MenuItem</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.MobileScrollMan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.MobileScrollMan.html">zebkit.ui.MobileScrollMan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Panel" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Panel.html">zebkit.ui.Panel</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PassTextField" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PassTextField.html">zebkit.ui.PassTextField</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PointRulerPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PointRulerPan.html">zebkit.ui.PointRulerPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PointRulerPan.<API key>" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PointRulerPan.<API key>.html">zebkit.ui.PointRulerPan.<API key></a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PointRulerPan.PointsGenerator" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PointRulerPan.PointsGenerator.html">zebkit.ui.PointRulerPan.PointsGenerator</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PopupLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PopupLayer.html">zebkit.ui.PopupLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.PopupLayerMix" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.PopupLayerMix.html">zebkit.ui.PopupLayerMix</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Progress" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Progress.html">zebkit.ui.Progress</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Radiobox" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Radiobox.html">zebkit.ui.Radiobox</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.RootLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.RootLayer.html">zebkit.ui.RootLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.RootLayerMix" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.RootLayerMix.html">zebkit.ui.RootLayerMix</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.RulerPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.RulerPan.html">zebkit.ui.RulerPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.RulerPan.NumLabels" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.RulerPan.NumLabels.html">zebkit.ui.RulerPan.NumLabels</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.RulerPan.PercentageLabels" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.RulerPan.PercentageLabels.html">zebkit.ui.RulerPan.PercentageLabels</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Scroll" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Scroll.html">zebkit.ui.Scroll</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ScrollManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ScrollManager.html">zebkit.ui.ScrollManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ScrollPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ScrollPan.html">zebkit.ui.ScrollPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Slider" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Slider.html">zebkit.ui.Slider</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.SplitPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.SplitPan.html">zebkit.ui.SplitPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.StackPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.StackPan.html">zebkit.ui.StackPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.StatePan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.StatePan.html">zebkit.ui.StatePan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.StatusBarPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.StatusBarPan.html">zebkit.ui.StatusBarPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Tabs" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Tabs.html">zebkit.ui.Tabs</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Tabs.TabView" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Tabs.TabView.html">zebkit.ui.Tabs.TabView</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.TextArea" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.TextArea.html">zebkit.ui.TextArea</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.TextField" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.TextField.html">zebkit.ui.TextField</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.TextField.HintRender" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.TextField.HintRender.html">zebkit.ui.TextField.HintRender</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Toolbar" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Toolbar.html">zebkit.ui.Toolbar</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Tooltip" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Tooltip.html">zebkit.ui.Tooltip</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.TooltipManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.TooltipManager.html">zebkit.ui.TooltipManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.tree.BaseTree" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.tree.BaseTree.html">zebkit.ui.tree.BaseTree</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.tree.CompTree" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.tree.CompTree.html">zebkit.ui.tree.CompTree</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.tree.DefEditors" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.tree.DefEditors.html">zebkit.ui.tree.DefEditors</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.tree.DefViews" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.tree.DefViews.html">zebkit.ui.tree.DefViews</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.tree.Tree" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.tree.Tree.html">zebkit.ui.tree.Tree</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.ViewPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.ViewPan.html">zebkit.ui.ViewPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.CursorManager" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.CursorManager.html">zebkit.ui.web.CursorManager</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlCanvas" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlCanvas.html">zebkit.ui.web.HtmlCanvas</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlElement" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlElement.html">zebkit.ui.web.HtmlElement</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.<API key>" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.<API key>.html">zebkit.ui.web.<API key></a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlLayer.html">zebkit.ui.web.HtmlLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlLink" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlLink.html">zebkit.ui.web.HtmlLink</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlScrollContent" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlScrollContent.html">zebkit.ui.web.HtmlScrollContent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlTextArea" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlTextArea.html">zebkit.ui.web.HtmlTextArea</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlTextField" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlTextField.html">zebkit.ui.web.HtmlTextField</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlTextInput" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlTextInput.html">zebkit.ui.web.HtmlTextInput</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.HtmlWindow" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.HtmlWindow.html">zebkit.ui.web.HtmlWindow</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.PopupLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.PopupLayer.html">zebkit.ui.web.PopupLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.RootLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.RootLayer.html">zebkit.ui.web.RootLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.VideoPan" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.VideoPan.html">zebkit.ui.web.VideoPan</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.web.WinLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.web.WinLayer.html">zebkit.ui.web.WinLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.Window" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.Window.html">zebkit.ui.Window</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.WinLayer" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.WinLayer.html">zebkit.ui.WinLayer</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.ui.zCanvas" name="allClassesItem">
<td>
<a href="../classes/zebkit.ui.zCanvas.html">zebkit.ui.zCanvas</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.URI" name="allClassesItem">
<td>
<a href="../classes/zebkit.URI.html">zebkit.URI</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.util.Position" name="allClassesItem">
<td>
<a href="../classes/zebkit.util.Position.html">zebkit.util.Position</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.util.Position.Metric" name="allClassesItem">
<td>
<a href="../classes/zebkit.util.Position.Metric.html">zebkit.util.Position.Metric</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.util.SingleColPosition" name="allClassesItem">
<td>
<a href="../classes/zebkit.util.SingleColPosition.html">zebkit.util.SingleColPosition</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.util.TasksSet" name="allClassesItem">
<td>
<a href="../classes/zebkit.util.TasksSet.html">zebkit.util.TasksSet</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.util.TasksSet.Task" name="allClassesItem">
<td>
<a href="../classes/zebkit.util.TasksSet.Task.html">zebkit.util.TasksSet.Task</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.Clipboard" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.Clipboard.html">zebkit.web.Clipboard</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.KeyEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.KeyEvent.html">zebkit.web.KeyEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.KeyEventUninfier" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.KeyEventUninfier.html">zebkit.web.KeyEventUninfier</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.MouseWheelSupport" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.MouseWheelSupport.html">zebkit.web.MouseWheelSupport</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.PointerEvent" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.PointerEvent.html">zebkit.web.PointerEvent</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.web.PointerEventUnifier" name="allClassesItem">
<td>
<a href="../classes/zebkit.web.PointerEventUnifier.html">zebkit.web.PointerEventUnifier</a>
</td>
</tr>
<tr class="classNameCell" className="zebkit.Zson" name="allClassesItem">
<td>
<a href="../classes/zebkit.Zson.html">zebkit.Zson</a>
</td>
</tr>
</table>
</div>
</div>
<script>
var root = document.getElementById("allClasses");
document.getElementById("search").addEventListener('input', function(e) {
var items = document.getElementsByName("allClassesItem"),
value = this.value.trim().toLowerCase();
for(var i = 0; i < items.length; i++) {
var item = items[i];
if (value.length < 3 || item.getAttribute("className").toLowerCase().indexOf(value) >= 0) {
item.style.display = "block";
} else {
item.style.display = "none";
};
}
});
</script> </div>
</td>
<td valign="top" align="left">
<div id="main" class="yui3-u">
<div class="content">
<div class="hd">
<table width="100%">
<tr>
<td>
<strong>
Class
</strong>
<strong class="name"">
zebkit.URI
</strong>
</td>
<td align="right" valign="top">
<a href="../classes/zebkit.html">
<zebkit>
</a>
</td>
<tr>
</table>
</div>
<br/>
<div class="intro">
<p>URI class. Pass either a full uri (as a string or zebkit.URI) or number of an URI parts
(scheme, host, etc) to construct it.</p>
</div>
<strong>Constructor:</strong><a name="methods_zebkit.URI"></a>
<div class="method item">
<span class="foundat">
</span>
<strong class="name"><code>zebkit.URI</code> (<code>[uri], [scheme], [host], [port], [path], [qs]</code>)</strong>
<br/>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>[uri]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<p>an URI.</p>
</li>
<li>
<span class="name"><code>[scheme]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<p>a scheme.</p>
</li>
<li>
<span class="name"><code>[host]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<p>a host.</p>
</li>
<li>
<span class="name"><code>[port]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | Integer>
</strong>
<p>a port.</p>
</li>
<li>
<span class="name"><code>[path]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<p>a path.</p>
</li>
<li>
<span class="name"><code>[qs]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<p>a query string.</p>
</li>
</ul>
</div>
<br/>
<br/>
<div id="classdocs">
<ul>
<li>
<a href="#methods">
Methods
</a>
</li>
<li>
<a href="#attrs">
Attributes
</a>
</li>
</ul>
<div>
<div id="methods">
<div class="bd">
<br/>
<table border="0" style="width:auto;" cellpadding="2">
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
void
</span>
</td>
<td>
<b>
<a class="name" href="#methods_appendQS">appendQS (obj)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_getParent">getParent ( )</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_isAbsolute">isAbsolute ( )</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_isAbsolute">isAbsolute (u)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_isFilePath">isFilePath ( )</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_isURL">isURL (u)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_join">join (p)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_join">join (p)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_parseQS">parseQS (url, [decode])</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_relative">relative (base, path)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_relative">relative (to)</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
<strong> static </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_toQS">toQS (obj, [encode])</a>
</b>
</td>
</tr>
<tr style="background:none;">
<td>
<strong> public </strong>
</td>
<td>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
</td>
<td>
<b>
<a class="name" href="#methods_toString">toString ( )</a>
</b>
</td>
</tr>
</table>
<br/>
</div>
<table>
<tr>
<td><a name="methods_appendQS"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
void
</span>
<strong class="name"><code>appendQS</code> (<code>obj</code>)</strong>
<br/>
<p>Append the given parameters to a query string of the URI.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>obj</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>>
</strong>
<p>a dictionary of parameters to be appended to
the URL query string</p>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td><a name="methods_getParent"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</span>
<strong class="name"><code>getParent</code> (<code> </code>)</strong>
<br/>
<p>Get a parent URI.</p>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</span>
<p>a parent URI.</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_isAbsolute"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<strong class="name"><code>isAbsolute</code> (<code> </code>)</strong>
<br/>
<p>Test if the URI is absolute.</p>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<p>true if the URI is absolute.</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_isAbsolute"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<strong class="name"><code>isAbsolute</code> (<code>u</code>)</strong>
<br/>
<p>Test if the given string is absolute path or URI.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>u</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>an URI</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<p>true if the string is absolute path or URI.</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_isFilePath"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<strong class="name"><code>isFilePath</code> (<code> </code>)</strong>
<br/>
<p>Test if the given URL is file path.</p>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<p>true if the URL is file path</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_isURL"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<strong class="name"><code>isURL</code> (<code>u</code>)</strong>
<br/>
<p>Test if the given string is URL.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>u</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>a string to be checked.</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</span>
<p>true if the string is URL</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_join"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>join</code> (<code>p</code>)</strong>
<br/>
<p>Join the given paths</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>p</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<span class="name">
<abbr title="Denotes that this argument can contain (n) number">(*..n)</abbr>
</span>
<p>relative paths</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>a joined path as string</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_join"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>join</code> (<code>p</code>)</strong>
<br/>
<p>Join URI with the specified path</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>p</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<span class="name">
<abbr title="Denotes that this argument can contain (n) number">(*..n)</abbr>
</span>
<p>relative paths</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>an absolute URI</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_parseQS"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>>
</span>
<strong class="name"><code>parseQS</code> (<code>url, [decode]</code>)</strong>
<br/>
<p>Parse the specified query string of the given URI.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>url</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>an URI</p>
</li>
<li>
<span class="name"><code>[decode]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</strong>
<p>pass true if query string has to be decoded.</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>>
</span>
<p>a parsed query string as a dictionary of parameters</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_relative"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>relative</code> (<code>base, path</code>)</strong>
<br/>
<p>Get a relative path.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>base</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>a base path</p>
</li>
<li>
<span class="name"><code>path</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>a path</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>a relative path</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_relative"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>relative</code> (<code>to</code>)</strong>
<br/>
<p>Get an URI relative to the given URI.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>to</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/zebkit.URI.html" class="crosslink">zebkit.URI</a>>
</strong>
<p>an URI to that the relative URI has to be detected.</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>a relative URI</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_toQS"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<strong> static </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>toQS</code> (<code>obj, [encode]</code>)</strong>
<br/>
<p>Convert the given dictionary of parameters to a query string.</p>
<br/>
<strong>Parameters:</strong>
<ul class="params">
<li>
<span class="name"><code>obj</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>>
</strong>
<p>a dictionary of parameters</p>
</li>
<li>
<span class="name"><code>[encode]</code></span>
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>>
</strong>
<p>pass true if the parameters values have to be
encoded</p>
</li>
</ul>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>a query string built from parameters list</p>
</div>
</div>
</td>
</tr>
<tr>
<td><a name="methods_toString"></a>
<div class="method item">
<span class="foundat">
</span>
<strong> public </strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<strong class="name"><code>toString</code> (<code> </code>)</strong>
<br/>
<p>Serialize URI to its string representation.</p>
<br/>
<div class="returns">
<strong>
Returns:
</strong>
<span class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</span>
<p>an URI as a string.</p>
</div>
</div>
</td>
</tr>
</table>
</div>
<div id="attrs">
<br/>
<table>
<tr>
<td>
<a name="attrs_host"></a>
<div class="attrs item">
<strong> public </strong>
<img title="readonly" width="18" height="18" src="../assets/css/lock.png" />
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<strong class="name" style="color:orange;">
<code>host</code>
</strong>
<br>
<p>URI host.</p>
</div>
</td>
</tr>
<tr>
<td>
<a name="attrs_path"></a>
<div class="attrs item">
<strong> public </strong>
<img title="readonly" width="18" height="18" src="../assets/css/lock.png" />
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<strong class="name" style="color:orange;">
<code>path</code>
</strong>
<br>
<p>URI path.</p>
</div>
</td>
</tr>
<tr>
<td>
<a name="attrs_port"></a>
<div class="attrs item">
<strong> public </strong>
<img title="readonly" width="18" height="18" src="../assets/css/lock.png" />
<strong class="type">
<Integer>
</strong>
<strong class="name" style="color:orange;">
<code>port</code>
</strong>
<br>
<p>URI port number.</p>
</div>
</td>
</tr>
<tr>
<td>
<a name="attrs_qs"></a>
<div class="attrs item">
<strong> public </strong>
<img title="readonly" width="18" height="18" src="../assets/css/lock.png" />
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<strong class="name" style="color:orange;">
<code>qs</code>
</strong>
<br>
<p>URI query string.</p>
</div>
</td>
</tr>
<tr>
<td>
<a name="attrs_scheme"></a>
<div class="attrs item">
<strong> public </strong>
<img title="readonly" width="18" height="18" src="../assets/css/lock.png" />
<strong class="type">
<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a>>
</strong>
<strong class="name" style="color:orange;">
<code>scheme</code>
</strong>
<br>
<p>URI scheme (e.g. 'http', 'ftp', etc).</p>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/js/tabs.js"></script>
</body>
</html>
|
#ifndef __BAMBI_H__
#define __BAMBI_H__ 1
void quickSort(float numbers[], int array_size);
void q_sort(float numbers[], int left, int right);
void FirstRunCheck(int);
void GetNetTol();
//void CopyFile(std::string, std::string);
void CopyFile(char *, char *);
void LogLike(double *Cube, int *ndim, int *npars, double *lnew, void *context);
void bambi(int *ndata, int *ndim, double **BAMBIData, double *lowlike);
#endif
|
#include "<API key>.h"
#include "<API key>.h"
#include "<API key>.h"
#include "<API key>.h"
namespace pola {
namespace graphic {
<API key>::<API key>()
{
}
bool <API key>::<API key>( PUScriptCompiler* compiler, PUAbstractNode *node )
{
<API key>* prop = reinterpret_cast<<API key>*>(node);
PUEventHandler* evt = static_cast<PUEventHandler *>(prop->parent->context);
<API key>* handler = static_cast<<API key>*>(evt);
if (prop->name == token[<API key>])
{
// Property: force_emitter
if (<API key>(compiler, prop, token[<API key>], VAL_STRING))
{
std::string val;
if(getString(*prop->values.front(), &val))
{
handler->setForceEmitterName(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: number_of_particles
if (<API key>(compiler, prop, token[<API key>], VAL_UINT))
{
unsigned int val = 0;
if(getUInt(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: inherit_position
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler->setInheritPosition(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: inherit_direction
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler->setInheritDirection(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: inherit_orientation
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: <API key>
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[TOKEN_INHERIT_MASS])
{
// Property: inherit_mass
if (<API key>(compiler, prop, token[TOKEN_INHERIT_MASS], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler->setInheritMass(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: <API key>
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: inherit_colour
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler->setInheritColour(val);
return true;
}
}
}
else if (prop->name == token[TOKEN_INHERIT_WIDTH])
{
// Property: inherit_width
if (<API key>(compiler, prop, token[TOKEN_INHERIT_WIDTH], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[<API key>])
{
// Property: inherit_height
if (<API key>(compiler, prop, token[<API key>], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
else if (prop->name == token[TOKEN_INHERIT_DEPTH])
{
// Property: inherit_depth
if (<API key>(compiler, prop, token[TOKEN_INHERIT_DEPTH], VAL_BOOL))
{
bool val;
if(getBoolean(*prop->values.front(), &val))
{
handler-><API key>(val);
return true;
}
}
}
return false;
}
bool <API key>::<API key>( PUScriptCompiler* compiler, PUAbstractNode *node )
{
// No objects
return false;
}
} /* namespace graphic */
} /* namespace pola */
|
title: The Workspace
layout: tutorial
lprev: 100-prerequisites.html
lnext: 300-api.html
summary: Create and manage a bnd workspace
## What you will learn in this section
In this section you will learn what a bnd workspace is and how it relates to the Git and Eclipse workspaces. We will address naming and how to use a ready made enRoute workspace template from github to get all the settings we need in one go. At the end of this section you will have a new workspace.
Optionally, you can learn how Eclipse, Git, enRoute, and bnd workspaces relate to each other.
Before you start this section, make sure you've checked the [prerequisites](100-prerequisites.html) for enRoute on your platform.
{% include workspace.md %}
## How Does it Work?
It helps to understand how the workspace are layed out. An Eclipse workspace is a directory where Eclipse stores its metadata, e.g. the plugins persistent storage or the history. Though it can be used to also store the actual projects, it is in general not a good idea, especially if you use a source control system. EGit can actually become quite slow when you include the Git workspace.
Therefore, the best way to work with projects in Eclipse is to not store them in the Eclipse workspace folder but import them from another directory.
For bnd, a workspace is a directory with a `cnf` folder and a number of projects. This is a flat space; hated by many but it works quite well because it is very simple and hard to get wrong. Don't count on it changing so do not try to work around it, you'll regret it. The `cnf` folder contains a `build.bnd` file and a `ext` directory which together define the workspace properties.
A bnd workspace is like a module; it imports bundles (and JARs) from a repository and it exports bundles to the same or another repository. On the inside we have projects that are private to the workspace. The projects should be cohesive so that they can share information via the `cnf` project.
The Git workspace is a directory that has a `.git` sub directory. When used with bnd, the Git workspace and the bnd workspace overlap. That is, the bnd workspace is one Git workspace, projects do not have their own repositories.
|
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
from expedient.common.rpc4django.utils import rpc_url
from openflow.common.utils.OptinThemeManager import OptinThemeManager
OptinThemeManager.initialize()
admin.autodiscover()
urlpatterns = patterns('',
(r'^$', 'openflow.optin_manager.users.views.index'),
url(r'^dashboard$', 'openflow.optin_manager.users.views.dashboard', name="dashboard"),
url(r'^change_profile$', 'openflow.optin_manager.users.views.change_profile', name="change_profile"),
(r'^controls/', include('openflow.optin_manager.controls.urls')),
(r'^opts/', include('openflow.optin_manager.opts.urls')),
(r'^admin_manager/', include('openflow.optin_manager.admin_manager.urls')),
(r'^xmlrpc/', include('openflow.optin_manager.xmlrpc_server.urls')),
# For testing
(r'^dummyfv/', include('openflow.optin_manager.dummyfv.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^accounts/', include('registration.urls')),
# sfa
rpc_url(r'^xmlrpc/sfa/?$', name='optin_sfa'),
rpc_url(r'^xmlrpc/geni/3/?$', name='gapi3')
)
#static_file_tuple = (r'^%s/(?P<path>.*)$' % settings.MEDIA_URL[1:],
# 'django.views.static.serve',
# {'document_root': "%s" % settings.MEDIA_ROOT})
#static_js_tuple = (r'^%s/(?P<path>.*)$' % str(settings.MEDIA_URL[1:]+"/js/"),
# 'django.views.static.serve',
# {'document_root': "%s" % settings.MEDIA_ROOT})
#urlpatterns += patterns('',
# TODO: Serve static content, should be removed in production deployment
# serve from another domain to speed up connections (no cookies needed)
# url(*static_file_tuple, name="img_media"),
# url(*static_file_tuple, name="css_media"),
# url(*static_js_tuple, name="js_media"),)
def get_static_url(name, path=""):
static_file_tuple = (
r'^%s%s/(?P<path>.*)$' % (settings.MEDIA_URL[1:], path),
'django.views.static.serve',
{'document_root': "%s%s" % (settings.MEDIA_ROOT, path)})
return url(*static_file_tuple, name=name)
'''
Static content
'''
urlpatterns += patterns('',
get_static_url("img_media", "/default"),
get_static_url("css_media", "/default"),
get_static_url("js_media", "/default/js"),
)
'''
Static theme content
'''
img_theme_tuple = OptinThemeManager.getStaticThemeTuple("img_media")
css_theme_tuple = OptinThemeManager.getStaticThemeTuple("css_media")
js_theme_tuple = OptinThemeManager.getStaticThemeTuple("js_media")
urlpatterns += patterns('',
get_static_url(img_theme_tuple[0],img_theme_tuple[1]),
get_static_url(css_theme_tuple[0],css_theme_tuple[1]),
get_static_url(js_theme_tuple[0],js_theme_tuple[1]),
)
|
/**
* Generated with Acceleo
*/
package org.wso2.developerstudio.eclipse.gmf.esb.parts;
// Start of user code for imports
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.<API key>;
import org.eclipse.jface.viewers.ViewerFilter;
// End of user code
public interface <API key> {
/**
* Init the commentMediators
* @param current the current value
* @param containgFeature the feature where to navigate if necessary
* @param feature the feature to manage
*/
public void <API key>(<API key> settings);
/**
* Update the commentMediators
* @param newValue the commentMediators to update
*
*/
public void <API key>();
/**
* Adds the given filter to the commentMediators edition editor.
*
* @param filter
* a viewer filter
* @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
*
*/
public void <API key>(ViewerFilter filter);
/**
* Adds the given filter to the commentMediators edition editor.
*
* @param filter
* a viewer filter
* @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
*
*/
public void <API key>(ViewerFilter filter);
/**
* @return true if the given element is contained inside the commentMediators table
*
*/
public boolean <API key>(EObject element);
/**
* Returns the internationalized title text.
*
* @return the internationalized title text.
*
*/
public String getTitle();
// Start of user code for additional methods
// End of user code
}
|
py-excercises
==========
This is repository of Google Python Excercises taken from https://developers.google.com/edu/python/
|
package com.mit.dstore.entity;
import org.litepal.crud.DataSupport;
public class SellerMax extends DataSupport {
private int id;
private int SellerID = 0;
private int MessageID = 0;
private int GroupID = 0;
private String userNeima = "";
public SellerMax() {
super();
}
public int getSellerID() {
return SellerID;
}
public void setSellerID(int sellerID) {
SellerID = sellerID;
}
public int getMessageID() {
return MessageID;
}
public void setMessageID(int messageID) {
MessageID = messageID;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserNeima() {
return userNeima;
}
public void setUserNeima(String userNeima) {
this.userNeima = userNeima;
}
public int getGroupID() {
return GroupID;
}
public void setGroupID(int groupID) {
GroupID = groupID;
}
@Override
public String toString() {
return "SellerMax [id=" + id + ", SellerID=" + SellerID + ", MessageID=" + MessageID + ", GroupID=" + GroupID + ", userNeima=" + userNeima
+ "]";
}
public SellerMax(int id, int sellerID, int messageID, String userNeima) {
super();
this.id = id;
SellerID = sellerID;
MessageID = messageID;
this.userNeima = userNeima;
}
}
|
#ifndef <API key>
#define <API key>
/*!
\file
\brief class <API key>
*/
#include "<API key>.h"
#include "foundation/PxAssert.h"
namespace physx
{
namespace apex
{
<API key>
class NxApexRenderable;
class NxUserOpaqueMesh;
class <API key>;
class <API key>;
class <API key>;
class <API key>;
class <API key>;
/**
\brief Describes all the data that makes up a renderable resource
*/
class <API key>
{
public:
<API key>(void)
{
firstVertex = 0;
numVerts = 0;
indexBuffer = 0;
firstIndex = 0;
numIndices = 0;
boneBuffer = 0;
firstBone = 0;
numBones = 0;
instanceBuffer = 0;
firstInstance = 0;
numInstances = 0;
spriteBuffer = 0;
firstSprite = 0;
numSprites = 0;
visibleSpriteCount = 0;
material = 0;
submeshIndex = 0;
userRenderData = 0;
numVertexBuffers = 0;
vertexBuffers = NULL;
cullMode = NxRenderCullMode::CLOCKWISE;
primitives = <API key>::UNKNOWN;
opaqueMesh = NULL;
}
/**
\brief Checks if the resource is valid
*/
bool isValid(void) const
{
physx::PxU32 numFailed = 0;
if (numVertexBuffers >= 255)
{
numFailed++;
}
if (numIndices && !indexBuffer)
{
numFailed++;
}
if (numBones && !boneBuffer)
{
numFailed++;
}
if (numInstances && !instanceBuffer)
{
numFailed++;
}
if (numSprites && !spriteBuffer)
{
numFailed++;
}
PX_ASSERT(numFailed == 0);
return numFailed == 0;
}
public:
NxUserOpaqueMesh* opaqueMesh; //!< A user specified opaque mesh interface.
<API key>** vertexBuffers; //!< vertex buffers used when rendering this resource.
//!< there should be no overlap in semantics between any two VBs.
physx::PxU32 numVertexBuffers; //!< number of vertex buffers used when rendering this resource.
physx::PxU32 firstVertex; //!< First vertex to render
physx::PxU32 numVerts; //!< Number of vertices to render
<API key>* indexBuffer; //!< optional index buffer used when rendering this resource.
physx::PxU32 firstIndex; //!< First index to render
physx::PxU32 numIndices; //!< Number of indices to render
<API key>* boneBuffer; //!< optional bone buffer used for skinned meshes.
physx::PxU32 firstBone; //!< First bone to render
physx::PxU32 numBones; //!< Number of bones to render
<API key>* instanceBuffer; //!< optional instance buffer if rendering multiple instances of the same resource.
physx::PxU32 firstInstance; //!< First instance to render
physx::PxU32 numInstances; //!< Number of instances to render
<API key>* spriteBuffer; //!< optional sprite buffer if rendering sprites
physx::PxU32 firstSprite; //!< First sprite to render
physx::PxU32 numSprites; //!< Number of sprites to render
physx::PxU32 visibleSpriteCount; //!< If the sprite buffer is using the view direction modifier; this will represent the number of sprites visible in front of the camera (Not necessarily in the frustum but in front of the camera)
<API key>** surfaceBuffers; //!< optional surface buffer for transferring variable to texture
physx::PxU32 numSurfaceBuffers; //!< Number of surface buffers to render
physx::PxU32 widthSurfaceBuffers;//!< The surface buffer width
physx::PxU32 <API key>;//!< The surface buffer height
void* material; //!< user defined material used when rendering this resource.
physx::PxU32 submeshIndex; //!< the index of the submesh that render resource belongs to
//! user defined pointer originally passed in to NxApexRenderable::<API key>(..)
void* userRenderData;
NxRenderCullMode::Enum cullMode; //!< Triangle culling mode
<API key>::Enum primitives; //!< Rendering primitive type (triangle, line strip, etc)
};
PX_POP_PACK
}
} // end namespace physx::apex
#endif
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Contacts extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('aauth');
}
public function index()
{
//if admin
$this->view(null);
}
// view function for contacts return all contacts / and code success
public function view()
{
$result = new ArrayObject();
header('Content-Type: application/json');
$this->load->model("contacts_model");
$result["code"] = 'success';
$result["items"] = $this->contacts_model->getContacts();
echo json_encode($result);
}
// add function for contacts returns code of the add status
public function add()
{
$result = new ArrayObject();
header('Content-Type: application/json');
if($this->aauth->is_member('Admin', False))
{
$contacts = array(
'email' =>$this->input->post('email'),
'phone' =>$this->input->post('phone'),
'country' => $this->input->post('country'),
'city' => $this->input->post('city'),
'street' =>$this->input->post('street'),
'facebook' =>$this->input->post('facebook'),
'linkedin' => $this->input->post('linkedin'),
'twitter' => $this->input->post('twitter'),
'googleplus' => $this->input->post('googleplus'),
'dribble' => $this->input->post('dribble'),
);
$this->load->model("contacts_model");
$storedContacts = $this->contacts_model->addContacts($contacts);
if ($storedContacts){
$result['code'] = 'success';
}
else
{
$result['code'] = 'error';
$result['msgs'] = 'error happened';
}
}
else
{
$result['code'] = 'not_allowed';
}
echo json_encode($result);
}
// edit function for contacts returns a status code of the edit operation
public function edit()
{
$result = new ArrayObject();
header('Content-Type: application/json');
if ($this->aauth->is_member('Admin', FALSE))
{
$contacts = array(
'id' =>$this->input->post('id'),
'email' =>$this->input->post('email'),
'phone' =>$this->input->post('phone'),
'country' => $this->input->post('country'),
'city' => $this->input->post('city'),
'street' =>$this->input->post('street'),
'facebook' =>$this->input->post('facebook'),
'linkedin' => $this->input->post('linkedin'),
'twitter' => $this->input->post('twitter'),
'googleplus' => $this->input->post('googleplus'),
'dribble' => $this->input->post('dribble'),
);
$this->load->model("contacts_model");
$this->contacts_model->editContacts($contacts);
$result['code'] = 'sucess';
}
else
{
$result['code'] = 'not_allowed';
}
echo json_encode($result);
}
// delete function for contacts returns status code of the function
public function delete()
{
$id = $this->input->post('id');
$result = new ArrayObject();
header('Content-Type: application/json');
if ($this->aauth->is_member('Admin', FALSE))
{
$this->load->model("contacts_model");
$this->contacts_model->deleteContacts($id);
$result["code"]="success";
}
else
{
$result['code'] = 'not_allowed';
}
echo json_encode($result);
}
}
|
#include "asteriskcpp/manager/events/<API key>.h"
namespace asteriskcpp {
<API key>::<API key>(const std::string & values) :
QueueMemberEvent(values) {
}
<API key>::~<API key>() {
}
} /* namespace asteriskcpp */
|
define("ace/snippets/jssm", ["require", "exports", "module"], function (e, t, n) {
"use strict";
t.snippetText = undefined, t.scope = ""
});
(function () {
window.require(["ace/snippets/jssm"], function (m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link type="image/png" rel="icon" href="images/hitcomp-logo-16x16.png"/>
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Noto+Sans:400,400italic,700,700italic&subset=latin,latin-ext"/>
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"/>
<link type="text/css" rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>
<link type="text/css" rel="stylesheet" href="https://cdn.rawgit.com/Mottie/tablesorter/v2.17.8/css/theme.bootstrap.css"/>
<link type="text/css" rel="stylesheet" href="https://cdn.rawgit.com/silviomoreto/bootstrap-select/v1.6.5/dist/css/bootstrap-select.min.css"/>
<link type="text/css" rel="stylesheet" href="https://cdn.rawgit.com/davidstutz/<API key>/v0.9.12/dist/css/<API key>.css"/>
<link type="text/css" rel="stylesheet" href="styles/hitcomp.css"/>
<script type="text/javascript" src="http:
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/adrai/enum/v2.0.2/enum-2.0.2.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/alexei/sprintf.js/v0.7/src/sprintf.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/moment/moment/2.10.2/min/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/globalize.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.de.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.en-GB.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.en-US.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.es.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.fr.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jquery/globalize/v0.1.1/lib/cultures/globalize.culture.it.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/Mottie/tablesorter/v2.17.8/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/Mottie/tablesorter/v2.17.8/js/jquery.tablesorter.widgets.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jsoma/tabletop/v1.4.0/src/tabletop.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/silviomoreto/bootstrap-select/v1.6.5/dist/js/bootstrap-select.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/davidstutz/<API key>/v0.9.12/dist/js/<API key>.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/zachofalltrades/jquery.format/0.1.2/jquery.format.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/eligrey/Blob.js/master/Blob.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/eligrey/FileSaver.js/master/FileSaver.min.js"></script>
<script type="text/javascript" src="scripts/hitcomp-core.js"></script>
<script type="text/javascript" src="scripts/hitcomp-analytics.js"></script>
<script type="text/javascript" src="scripts/hitcomp-settings.js"></script>
<script type="text/javascript" src="scripts/hitcomp-ui.js"></script>
<script type="text/javascript" src="scripts/hitcomp-data.js"></script>
<script type="text/javascript" src="scripts/hitcomp-data-comps.js"></script>
<script type="text/javascript" src="scripts/hitcomp-data-roles.js"></script>
<script type="text/javascript" src="scripts/hitcomp.js"></script>
<title>HITCOMP - Health IT Competencies</title>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a href="#" class="navbar-brand">
<img src="images/hitcomp-logo-32x32.png" alt="HITCOMP Logo"/>
<strong>HITCOMP - Health IT Competencies</strong>
</a>
</div>
<ul class="nav navbar-nav nav-tabs" role="tablist">
<li class="active">
<a href="#content-home-tab" role="tab" data-toggle="tab">
<i class="fa fa-home"></i>
<strong>Home</strong>
</a>
</li>
<li>
<a href="#content-comps-tab" role="tab" data-toggle="tab">
<i class="fa fa-fw fa-tasks"></i>
<strong>Competencies</strong>
</a>
</li>
<li>
<a href="#content-roles-tab" role="tab" data-toggle="tab">
<i class="fa fa-fw fa-user-md"></i>
<strong>Roles</strong>
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<div class="btn-group btn-group-sm">
<button id="btn-settings" class="btn btn-default form-control navbar-btn" data-toggle="modal" data-target="#modal-settings"
disabled="disabled" type="button">
<i class="fa fa-fw fa-gears"></i>
Settings
</button>
</div>
</li>
<li class="dropdown">
<a class="link" data-toggle="dropdown">
<i class="fa fa-fw fa-info-circle"></i>
<strong>About</strong>
<span class="fa fa-fw fa-caret-down"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a role="menuitem" tabindex="-1" target="_blank" href="https://github.com/esacinc/hitcomp">
<i class="fa fa-fw fa-github"></i>
GitHub Repository
</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<div id="content" class="container-fluid">
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div id="content-tabs" class="tab-content">
<div id="content-home-tab" class="tab-pane fade in active content-tab">
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-data">
<h1>
<i class="fa fa-fw fa-info-circle"></i>
<strong>Introduction</strong>
</h1>
<h2><strong>Overview</strong></h2>
<p>
Both the United States and the European Union are currently working to encourage more effective use of information technology and
communication (ICT), in delivery of health services, including disease prevention and health promotion.
</p>
<p>
In order to accomplish this, as part of the Standards and Interoperability Framework (S&I Framework) of the US Office of the
National Coordinator of Health Information Technology (ONC-HIT), the US and EU (under the European Commission’s Directorate General
for Communication – DG Connect) collaborated and formed a Workforce Development Workgroup in August 2013. This workgroup was
founded as part of a formal Memorandum of Understanding between the US and EU signed in December 2010. This workgroup consisted of
a TransAtlantic community of public and private sector industry professionals; educators; eHealth, healthcare information technology
and informatics professionals; clinicians; and subject matter experts in information technology and communication in the healthcare
sector.
</p>
<p>
This community worked together to identify approaches to achieving common goals for achieving a robust supply of highly proficient
eHealth/health IT professionals and assuring health care, public health, and allied professional workforces have the eSkills needed
to make optimum use of their available eHealth/health information technology. Additionally, this work identifies, addresses and
bridges the gaps between competency and knowledge deficiencies among all staff in healthcare delivery, management, administration
and support to ensure universal application of ICT solutions in health services. The workgroup completed Phase I of its work in
May 2015.
</p>
<h2><strong>About HITCOMP</strong></h2>
<p>
HITCOMP is a searchable database designed for educators, workforce developers, current and future workforce members, eHealth
management, staffing experts and other interested parties in healthcare information technology/eHealth. The HITCOMP Tool and
Repository can be used to compile information on skills and competencies needed for a variety of healthcare roles, levels and
areas of knowledge. You can sort over 1000 competencies in five domains – Direct Patient Care, Administration, Informatics,
Engineering/IS/ICT and Research/Biomedicine. Competencies are associated with a particular level of skill (Baseline, Basic,
Intermediate, Advanced and Expert). Competencies are also mapped to over 250 health IT-impacted roles in Acute Care in each of the
five domains.
</p>
<p>
There are two types of queries you can perform within HITCOMP: role-based and competency-based. From the Competency tab, you can
perform a search from our database of competencies. With a competency search you can aggregate results by domain, by level, or
within 33 areas of competency. From the Roles tab, you can perform a search of eHealth impacted job roles in healthcare. You can
filter and sort your search by domain, by job type and service category, and by matching competency levels. You can also display
the equivalent role in five European languages (English UK, French, German, Italian and Spanish). A description of each role is
given. Finally, you can export your search results from either tab to a file for your own use.
</p>
<div id="<API key>" class="alert alert-info center-block" role="alert">
<a class="alert-link">
Detailed instructions are located here.
</a>
</div>
<h2><strong>Preamble</strong></h2>
<p>
The HITCOMP Tool and Repository is designed to complement workforce development initiatives. Although it is a stand-alone tool
that can be used by healthcare workers, students, employers, educators and eHealth industry professionals, it is not meant to
replace professional career development consultation, human resource management or formal instructional design.
</p>
<p>
There are several terminology schemes that are used throughout the tool and repository that may vary based on your region, location,
organization or personal experience. We have tried to utilize terms that are applicable and synonymous both in the United States
and throughout the European Union States, such as eHealth, health IT, and informatics; however, it would be impossible to include
all possible variations. Also, we have attempted to describe eHealth/health IT roles in a variety of languages used within the
European Union and throughout the world; however, we regret any errors we may have made in common usage or expression.
</p>
<h1>
<i class="fa fa-fw fa-book"></i>
<strong>Glossary</strong>
</h1>
<table>
<thead>
<tr>
<th class="header">
<i class="fa fa-fw fa-asterisk"></i>
<span class="content-text">Term</span>
</th>
<th class="header">
<i class="fa fa-fw fa-comments"></i>
<span class="content-text">Definition & Notes</span>
</th>
</tr>
</thead>
<tbody>
<tr data-field="competency">
<td>
<span class="content-text">
<strong>Competency</strong>
</span>
</td>
<td>
<span class="content-text">
The combination of observable and measurable abilities, skills and attributes that contribute to aggregated
knowledge, job performance and ultimately organizational success.
</span>
</td>
</tr>
<tr data-field="category">
<td>
<span class="content-text">
<strong>Competency Category</strong>
</span>
</td>
<td>
<span class="content-text">
One of 33 specialized areas of competency, from access, to care coordination, to documentation, to privacy and
security, to quality and safety, and others.
</span>
</td>
</tr>
<tr data-field="code">
<td>
<span class="content-text">
<strong>Competency Code</strong>
</span>
</td>
<td>
<span class="content-text">
A unique identifier for each HITCOMP competency. This code allows the competency to be referenced, mapped to other
programs and competencies, aligned with curricula, educational and training resources, etc.
</span>
</td>
</tr>
<tr data-field="level">
<td>
<span class="content-text">
<strong>Competency Level</strong>
</span>
</td>
<td>
<span class="content-text">
One of five grades of experience and skill for HIT competence and competencies, including:
<ul>
<li>
<strong>Baseline</strong>:
A foundation level upon which all other skills and competencies are based.
</li>
<li>
<strong>Basic</strong>:
An entry-level or beginning skill or competency level, equating to "understanding" and
"knowing" in Bloom's Taxonomy. Could potentially align with associate-level degree academic
programs or curricular competencies in eHealth/HIT.
</li>
<li>
<strong>Intermediate</strong>:
A mid-level incumbent skill or competency level, equating to "applying" and "analyzing"
in Bloom's Taxonomy. Could potentially align with <API key> level academic programs or
curricular competencies in eHealth/HIT.
</li>
<li>
<strong>Advanced</strong>:
A high-level incumbent skill or competency level, equating to "evaluating" and
"synthesizing" in Bloom's Taxonomy. Could potentially align with baccalaureate- to
master-degree level academic programs or curricular competencies in eHealth/HIT.
</li>
<li>
<strong>Expert</strong>:
The highest level of skill or competency level, also equating to "evaluating" and
"synthesizing" in Bloom's Taxonomy. Could potentially align with master- to
<API key> level academic programs or curricular competencies in eHealth/HIT.
</li>
</ul>
<i class="fa fa-fw fa-info-circle"></i>
<strong>Note/Disclaimer</strong>:
Levels do not correspond one-to-one to job progression or role levels and can vary by role, organization and
location.
</span>
</td>
</tr>
<tr data-field="domain">
<td>
<span class="content-text">
<strong>Domain</strong>
</span>
</td>
<td>
<span class="content-text">
One of five areas of health information technology focus areas, including Direct Patient Care (includes nursing,
medicine, allied health, etc.); Administration (includes health administration, finance, law, management, and
revenue); Engineering/Information Systems (includes engineering, information and computer technology [ICT],
information systems and information technology); Informatics (includes health informatics, clinical informatics,
nursing informatics, medical informatics, etc.); and Research/Biomedical (includes areas of focus in research,
development, biomedicine, etc.)
</span>
</td>
</tr>
<tr data-field="health-care-setting">
<td>
<span class="content-text">
<strong>Health Care Setting</strong>
</span>
</td>
<td>
<span class="content-text">
One of several environments for health care work, including acute care (also called inpatient places of service
[POS]), ambulatory care (includes primary and specialty care practices and clinics, also called outpatient POS),
skilled nursing facilities and rehabilitation, emergency medicine, surgical and operative theaters, etc.
</span>
</td>
</tr>
<tr data-field="role">
<td>
<span class="content-text">
<strong>Role</strong>
</span>
</td>
<td>
<span class="content-text">
One of over 250 job types in the acute care setting of health care, whose work could potentially touch
eHealth/health IT. The job roles include equivalent names in five major European languages, along with a
comprehensive description of each role.
</span>
</td>
</tr>
<tr data-field="serviceCategory">
<td>
<span class="content-text">
<strong>Role Service Category</strong>
</span>
</td>
<td>
<span class="content-text">
One of three types of primary acute care services: ancillary (allied health or non-direct patient care), nursing or
physician/provider/medical staff.
</span>
</td>
</tr>
<tr data-field="type">
<td>
<span class="content-text">
<strong>Role Type</strong>
</span>
</td>
<td>
<span class="content-text">
One of four categorical types of health care roles grouped into major job classifications of <API key>,
<API key>, professional or executive.
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="content-comps-tab" class="tab-pane fade content-tab">
<h1>
<i class="fa fa-fw fa-filter"></i>
<strong>Filter</strong>
</h1>
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-filter">
<form name="<API key>">
<div class="form-group">
<div class="input-group-sm">
<div class="btn-group btn-group-sm">
<button class="btn btn-default form-control" type="reset" data-toggle="tooltip" data-placement="top">
<i class="fa fa-fw fa-refresh"></i>
Reset
</button>
</div>
</div>
</div>
<hr/>
<div class="form-group">
<div class="input-group-sm" data-field="domain">
<label for="<API key>">
<i class="fa fa-fw fa-stethoscope"></i>
Domain
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="level">
<label for="<API key>">
<i class="fa fa-fw fa-signal"></i>
Level
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="category">
<label for="<API key>">
<i class="fa fa-fw fa-tags"></i>
Category
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
</form>
</div>
<h1>
<i class="fa fa-fw fa-table"></i>
<strong>
Data
<span class="content-selected">(<span></span> of <span></span> Selected)</span>
</strong>
</h1>
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-data">
<form name="<API key>">
<div class="input-group-sm">
<div class="btn-group btn-group-sm">
<div class="dropdown <API key>">
<button class="btn btn-default dropdown-toggle form-control" type="button" data-toggle="dropdown">
<i class="fa fa-fw fa-download"></i>
Export
<span class="fa fa-fw fa-caret-down"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="json">
<i class="fa fa-fw fa-file-code-o"></i>
JSON
</a>
</li>
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="xml">
<i class="fa fa-fw fa-file-code-o"></i>
XML
</a>
</li>
<li class="divider" role="presentation"></li>
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="csv">
<i class="fa fa-fw fa-file-excel-o"></i>
CSV
</a>
</li>
</ul>
</div>
</div>
</div>
</form>
<table>
<thead>
<tr>
<th class="header" data-field="domain">
<i class="fa fa-fw fa-stethoscope"></i>
<span class="content-text">Domain</span>
</th>
<th class="header" data-field="level">
<i class="fa fa-fw fa-signal"></i>
<span class="content-text">Level</span>
</th>
<th class="header" data-field="category">
<i class="fa fa-fw fa-tags"></i>
<span class="content-text">Category</span>
</th>
<th class="header" data-field="desc">
<i class="fa fa-fw fa-comments"></i>
<span class="content-text">Description</span>
</th>
<th class="header" data-field="code">
<i class="fa fa-fw fa-key"></i>
<span class="content-text">Code</span>
</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="content-roles-tab" class="tab-pane fade content-tab">
<h1>
<i class="fa fa-globe"></i>
<strong>Localization</strong>
</h1>
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-localize">
<form name="<API key>">
<div class="input-group-sm">
<label for="<API key>">
<i class="fa fa-fw fa-language"></i>
Language (Roles)
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="selectpicker input-sm form-control" data-field="lang">
<option value="en-US" data-icon="icon icon-flag icon-flag-us">English (US)</option>
<option value="en-GB" data-icon="icon icon-flag icon-flag-gb">English (UK)</option>
<option value="fr" data-icon="icon icon-flag icon-flag-fr">French</option>
<option value="de" data-icon="icon icon-flag icon-flag-de">German</option>
<option value="it" data-icon="icon icon-flag icon-flag-it">Italian</option>
<option value="es" data-icon="icon icon-flag icon-flag-es">Spanish</option>
</select>
</div>
</div>
</form>
</div>
<h1>
<i class="fa fa-fw fa-filter"></i>
<strong>Filter</strong>
</h1>
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-filter">
<form name="<API key>">
<div class="form-group">
<div class="input-group-sm">
<div class="btn-group btn-group-sm">
<button class="btn btn-default form-control" type="reset" data-toggle="tooltip" data-placement="top">
<i class="fa fa-fw fa-refresh"></i>
Reset
</button>
</div>
</div>
</div>
<hr/>
<div class="form-group">
<div class="input-group-sm" data-field="domain">
<label for="<API key>">
<i class="fa fa-fw fa-stethoscope"></i>
Domain
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="type">
<label for="<API key>">
<i class="fa fa-fw fa-tags"></i>
Type
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="level">
<label for="<API key>">
<i class="fa fa-fw fa-signal"></i>
Level
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="serviceCategory">
<label for="<API key>">
<i class="fa fa-fw fa-medkit"></i>
Service Category
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm" data-field="roles">
<label for="<API key>">
<i class="icon icon-flag icon-flag-us"></i>
Roles
</label>
<div class="btn-group btn-group-sm">
<select id="<API key>" class="multiselect" multiple="multiple"></select>
</div>
</div>
</div>
</form>
</div>
<h1>
<i class="fa fa-fw fa-table"></i>
<strong>
Data
<span class="content-selected">(<span></span> of <span></span> Selected)</span>
</strong>
</h1>
<div class="text-muted well well-sm content-loading">
<i class="fa fa-fw fa-spinner fa-spin"></i>
<strong><em>Loading</em></strong>
</div>
<div class="content-data">
<form name="<API key>">
<div class="input-group-sm">
<div class="btn-group btn-group-sm">
<div class="dropdown <API key>">
<button class="btn btn-default dropdown-toggle form-control" type="button" data-toggle="dropdown">
<i class="fa fa-fw fa-download"></i>
Export
<span class="fa fa-fw fa-caret-down"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="json">
<i class="fa fa-fw fa-file-code-o"></i>
JSON
</a>
</li>
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="xml">
<i class="fa fa-fw fa-file-code-o"></i>
XML
</a>
</li>
<li class="divider" role="presentation"></li>
<li role="presentation">
<a class="link" role="menuitem" tabindex="-1" data-export-format="csv">
<i class="fa fa-fw fa-file-excel-o"></i>
CSV
</a>
</li>
</ul>
</div>
</div>
</div>
</form>
<table>
<thead>
<tr>
<th class="header" data-field="domain">
<i class="fa fa-fw fa-stethoscope"></i>
<span class="content-text">Domain</span>
</th>
<th class="header" data-field="type">
<i class="fa fa-fw fa-tags"></i>
<span class="content-text">Type</span>
</th>
<th class="header" data-field="level">
<i class="fa fa-fw fa-signal"></i>
<span class="content-text">Level</span>
</th>
<th class="header" data-field="serviceCategory">
<i class="fa fa-fw fa-medkit"></i>
<span class="content-text">Service Category</span>
</th>
<th class="header" data-field="roles">
<i class="icon icon-flag icon-flag-us"></i>
<span class="content-text">Roles</span>
</th>
<th class="header" data-field="desc">
<i class="fa fa-fw fa-comments"></i>
<span class="content-text">Description</span>
</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<div id="modal-settings" class="fade modal" aria-labelledby="<API key>" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form class="form-inline" name="settings-form">
<div class="modal-header">
<button class="close" aria-label="Close" data-dismiss="modal" type="button"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="<API key>">
<i class="fa fa-fw fa-gears"></i>
<strong>Settings</strong>
</h4>
</div>
<div class="modal-body">
<h1>
<i class="fa fa-fw fa-tasks"></i>
<strong>Competencies Data</strong>
</h1>
<div class="form-group">
<div class="input-group-sm">
<label for="<API key>">
<i class="fa fa-fw fa-book"></i>
Sheet ID
</label>
<input id="<API key>" class="form-control <API key>"
aria-describedby="<API key>" type="text"/>
<div id="<API key>" class="help-block">
<i class="fa fa-fw fa-times"></i>
Invalid Google Docs spreadsheet ID.
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm">
<label for="<API key>">
<i class="fa fa-fw fa-hashtag"></i>
Sheet Name
</label>
<input id="<API key>" class="form-control"
aria-describedby="<API key>" type="text"/>
<div id="<API key>" class="help-block">
<i class="fa fa-fw fa-times"></i>
Invalid Google Docs spreadsheet sheet name.
</div>
</div>
</div>
<h1>
<i class="fa fa-fw fa-user-md"></i>
<strong>Roles Data</strong>
</h1>
<div class="form-group">
<div class="input-group-sm">
<label for="<API key>">
<i class="fa fa-fw fa-book"></i>
Sheet ID
</label>
<input id="<API key>" class="form-control <API key>"
aria-describedby="<API key>" type="text"/>
<div id="<API key>" class="help-block">
<i class="fa fa-fw fa-times"></i>
Invalid Google Docs spreadsheet ID.
</div>
</div>
</div>
<div class="form-group">
<div class="input-group-sm">
<label for="<API key>">
<i class="fa fa-fw fa-hashtag"></i>
Sheet Name
</label>
<input id="<API key>" class="form-control"
aria-describedby="<API key>"type="text"/>
<div id="<API key>" class="help-block">
<i class="fa fa-fw fa-times"></i>
Invalid Google Docs spreadsheet sheet name.
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="form-group">
<div class="input-group-sm">
<div class="btn-group btn-group-sm">
<button class="btn btn-default form-control" type="reset" data-toggle="tooltip" data-placement="top">
<i class="fa fa-fw fa-refresh"></i>
Reset
</button>
<button class="btn btn-default form-control" type="submit" data-toggle="tooltip" data-placement="top">
<i class="fa fa-fw fa-paper-plane-o"></i>
Submit & Reload
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
|
#!/bin/bash
# Run the python test in the django environment for scisheets
# $1 - file with extension or python path
filename=`echo $1 | sed "s/.py
cur_dir=`pwd`
BASEDIR=$(bash get_basedir.sh)
cd $BASEDIR/mysite
home_dir=`pwd`
null_str=""
rel_dir="${cur_dir/$home_dir/}"
py_path=`echo $rel_dir | sed "s/^\
py_path=`echo $py_path | sed "s/\
test_path=$py_path.$filename
echo "*** Testing $test_path"
python manage.py test $test_path
|
!function() {
function only_once(fn) {
var called = false;
return function() {
if (called) throw new Error("Callback was already called.");
called = true;
fn.apply(root, arguments);
};
}
var async = {};
var root, previous_async;
root = this;
null != root && (previous_async = root.async);
async.noConflict = function() {
root.async = previous_async;
return async;
};
var _toString = Object.prototype.toString;
var _isArray = Array.isArray || function(obj) {
return "[object Array]" === _toString.call(obj);
};
var _each = function(arr, iterator) {
if (arr.forEach) return arr.forEach(iterator);
for (var i = 0; i < arr.length; i += 1) iterator(arr[i], i, arr);
};
var _map = function(arr, iterator) {
if (arr.map) return arr.map(iterator);
var results = [];
_each(arr, function(x, i, a) {
results.push(iterator(x, i, a));
});
return results;
};
var _reduce = function(arr, iterator, memo) {
if (arr.reduce) return arr.reduce(iterator, memo);
_each(arr, function(x, i, a) {
memo = iterator(memo, x, i, a);
});
return memo;
};
var _keys = function(obj) {
if (Object.keys) return Object.keys(obj);
var keys = [];
for (var k in obj) obj.hasOwnProperty(k) && keys.push(k);
return keys;
};
if ("undefined" != typeof process && process.nextTick) {
async.nextTick = process.nextTick;
async.setImmediate = "undefined" != typeof setImmediate ? function(fn) {
setImmediate(fn);
} : async.nextTick;
} else if ("function" == typeof setImmediate) {
async.nextTick = function(fn) {
setImmediate(fn);
};
async.setImmediate = async.nextTick;
} else {
async.nextTick = function(fn) {
setTimeout(fn, 0);
};
async.setImmediate = async.nextTick;
}
async.each = function(arr, iterator, callback) {
function done(err) {
if (err) {
callback(err);
callback = function() {};
} else {
completed += 1;
completed >= arr.length && callback();
}
}
callback = callback || function() {};
if (!arr.length) return callback();
var completed = 0;
_each(arr, function(x) {
iterator(x, only_once(done));
});
};
async.forEach = async.each;
async.eachSeries = function(arr, iterator, callback) {
callback = callback || function() {};
if (!arr.length) return callback();
var completed = 0;
var iterate = function() {
iterator(arr[completed], function(err) {
if (err) {
callback(err);
callback = function() {};
} else {
completed += 1;
completed >= arr.length ? callback() : iterate();
}
});
};
iterate();
};
async.forEachSeries = async.eachSeries;
async.eachLimit = function(arr, limit, iterator, callback) {
var fn = _eachLimit(limit);
fn.apply(null, [ arr, iterator, callback ]);
};
async.forEachLimit = async.eachLimit;
var _eachLimit = function(limit) {
return function(arr, iterator, callback) {
callback = callback || function() {};
if (!arr.length || 0 >= limit) return callback();
var completed = 0;
var started = 0;
var running = 0;
!function replenish() {
if (completed >= arr.length) return callback();
while (limit > running && started < arr.length) {
started += 1;
running += 1;
iterator(arr[started - 1], function(err) {
if (err) {
callback(err);
callback = function() {};
} else {
completed += 1;
running -= 1;
completed >= arr.length ? callback() : replenish();
}
});
}
}();
};
};
var doParallel = function(fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
return fn.apply(null, [ async.each ].concat(args));
};
};
var doParallelLimit = function(limit, fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
return fn.apply(null, [ _eachLimit(limit) ].concat(args));
};
};
var doSeries = function(fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
return fn.apply(null, [ async.eachSeries ].concat(args));
};
};
var _asyncMap = function(eachfn, arr, iterator, callback) {
arr = _map(arr, function(x, i) {
return {
index: i,
value: x
};
});
if (callback) {
var results = [];
eachfn(arr, function(x, callback) {
iterator(x.value, function(err, v) {
results[x.index] = v;
callback(err);
});
}, function(err) {
callback(err, results);
});
} else eachfn(arr, function(x, callback) {
iterator(x.value, function(err) {
callback(err);
});
});
};
async.map = doParallel(_asyncMap);
async.mapSeries = doSeries(_asyncMap);
async.mapLimit = function(arr, limit, iterator, callback) {
return _mapLimit(limit)(arr, iterator, callback);
};
var _mapLimit = function(limit) {
return doParallelLimit(limit, _asyncMap);
};
async.reduce = function(arr, memo, iterator, callback) {
async.eachSeries(arr, function(x, callback) {
iterator(memo, x, function(err, v) {
memo = v;
callback(err);
});
}, function(err) {
callback(err, memo);
});
};
async.inject = async.reduce;
async.foldl = async.reduce;
async.reduceRight = function(arr, memo, iterator, callback) {
var reversed = _map(arr, function(x) {
return x;
}).reverse();
async.reduce(reversed, memo, iterator, callback);
};
async.foldr = async.reduceRight;
var _filter = function(eachfn, arr, iterator, callback) {
var results = [];
arr = _map(arr, function(x, i) {
return {
index: i,
value: x
};
});
eachfn(arr, function(x, callback) {
iterator(x.value, function(v) {
v && results.push(x);
callback();
});
}, function() {
callback(_map(results.sort(function(a, b) {
return a.index - b.index;
}), function(x) {
return x.value;
}));
});
};
async.filter = doParallel(_filter);
async.filterSeries = doSeries(_filter);
async.select = async.filter;
async.selectSeries = async.filterSeries;
var _reject = function(eachfn, arr, iterator, callback) {
var results = [];
arr = _map(arr, function(x, i) {
return {
index: i,
value: x
};
});
eachfn(arr, function(x, callback) {
iterator(x.value, function(v) {
v || results.push(x);
callback();
});
}, function() {
callback(_map(results.sort(function(a, b) {
return a.index - b.index;
}), function(x) {
return x.value;
}));
});
};
async.reject = doParallel(_reject);
async.rejectSeries = doSeries(_reject);
var _detect = function(eachfn, arr, iterator, main_callback) {
eachfn(arr, function(x, callback) {
iterator(x, function(result) {
if (result) {
main_callback(x);
main_callback = function() {};
} else callback();
});
}, function() {
main_callback();
});
};
async.detect = doParallel(_detect);
async.detectSeries = doSeries(_detect);
async.some = function(arr, iterator, main_callback) {
async.each(arr, function(x, callback) {
iterator(x, function(v) {
if (v) {
main_callback(true);
main_callback = function() {};
}
callback();
});
}, function() {
main_callback(false);
});
};
async.any = async.some;
async.every = function(arr, iterator, main_callback) {
async.each(arr, function(x, callback) {
iterator(x, function(v) {
if (!v) {
main_callback(false);
main_callback = function() {};
}
callback();
});
}, function() {
main_callback(true);
});
};
async.all = async.every;
async.sortBy = function(arr, iterator, callback) {
async.map(arr, function(x, callback) {
iterator(x, function(err, criteria) {
err ? callback(err) : callback(null, {
value: x,
criteria: criteria
});
});
}, function(err, results) {
if (err) return callback(err);
var fn = function(left, right) {
var a = left.criteria, b = right.criteria;
return b > a ? -1 : a > b ? 1 : 0;
};
callback(null, _map(results.sort(fn), function(x) {
return x.value;
}));
});
};
async.auto = function(tasks, callback) {
callback = callback || function() {};
var keys = _keys(tasks);
var remainingTasks = keys.length;
if (!remainingTasks) return callback();
var results = {};
var listeners = [];
var addListener = function(fn) {
listeners.unshift(fn);
};
var removeListener = function(fn) {
for (var i = 0; i < listeners.length; i += 1) if (listeners[i] === fn) {
listeners.splice(i, 1);
return;
}
};
var taskComplete = function() {
remainingTasks
_each(listeners.slice(0), function(fn) {
fn();
});
};
addListener(function() {
if (!remainingTasks) {
var theCallback = callback;
callback = function() {};
theCallback(null, results);
}
});
_each(keys, function(k) {
var task = _isArray(tasks[k]) ? tasks[k] : [ tasks[k] ];
var taskCallback = function(err) {
var args = Array.prototype.slice.call(arguments, 1);
args.length <= 1 && (args = args[0]);
if (err) {
var safeResults = {};
_each(_keys(results), function(rkey) {
safeResults[rkey] = results[rkey];
});
safeResults[k] = args;
callback(err, safeResults);
callback = function() {};
} else {
results[k] = args;
async.setImmediate(taskComplete);
}
};
var requires = task.slice(0, Math.abs(task.length - 1)) || [];
var ready = function() {
return _reduce(requires, function(a, x) {
return a && results.hasOwnProperty(x);
}, true) && !results.hasOwnProperty(k);
};
if (ready()) task[task.length - 1](taskCallback, results); else {
var listener = function() {
if (ready()) {
removeListener(listener);
task[task.length - 1](taskCallback, results);
}
};
addListener(listener);
}
});
};
async.retry = function(times, task, callback) {
var DEFAULT_TIMES = 5;
var attempts = [];
if ("function" == typeof times) {
callback = task;
task = times;
times = DEFAULT_TIMES;
}
times = parseInt(times, 10) || DEFAULT_TIMES;
var wrappedTask = function(wrappedCallback, wrappedResults) {
var retryAttempt = function(task, finalAttempt) {
return function(seriesCallback) {
task(function(err, result) {
seriesCallback(!err || finalAttempt, {
err: err,
result: result
});
}, wrappedResults);
};
};
while (times) attempts.push(retryAttempt(task, !(times -= 1)));
async.series(attempts, function(done, data) {
data = data[data.length - 1];
(wrappedCallback || callback)(data.err, data.result);
});
};
return callback ? wrappedTask() : wrappedTask;
};
async.waterfall = function(tasks, callback) {
callback = callback || function() {};
if (!_isArray(tasks)) {
var err = new Error("First argument to waterfall must be an array of functions");
return callback(err);
}
if (!tasks.length) return callback();
var wrapIterator = function(iterator) {
return function(err) {
if (err) {
callback.apply(null, arguments);
callback = function() {};
} else {
var args = Array.prototype.slice.call(arguments, 1);
var next = iterator.next();
args.push(next ? wrapIterator(next) : callback);
async.setImmediate(function() {
iterator.apply(null, args);
});
}
};
};
wrapIterator(async.iterator(tasks))();
};
var _parallel = function(eachfn, tasks, callback) {
callback = callback || function() {};
if (_isArray(tasks)) eachfn.map(tasks, function(fn, callback) {
fn && fn(function(err) {
var args = Array.prototype.slice.call(arguments, 1);
args.length <= 1 && (args = args[0]);
callback.call(null, err, args);
});
}, callback); else {
var results = {};
eachfn.each(_keys(tasks), function(k, callback) {
tasks[k](function(err) {
var args = Array.prototype.slice.call(arguments, 1);
args.length <= 1 && (args = args[0]);
results[k] = args;
callback(err);
});
}, function(err) {
callback(err, results);
});
}
};
async.parallel = function(tasks, callback) {
_parallel({
map: async.map,
each: async.each
}, tasks, callback);
};
async.parallelLimit = function(tasks, limit, callback) {
_parallel({
map: _mapLimit(limit),
each: _eachLimit(limit)
}, tasks, callback);
};
async.series = function(tasks, callback) {
callback = callback || function() {};
if (_isArray(tasks)) async.mapSeries(tasks, function(fn, callback) {
fn && fn(function(err) {
var args = Array.prototype.slice.call(arguments, 1);
args.length <= 1 && (args = args[0]);
callback.call(null, err, args);
});
}, callback); else {
var results = {};
async.eachSeries(_keys(tasks), function(k, callback) {
tasks[k](function(err) {
var args = Array.prototype.slice.call(arguments, 1);
args.length <= 1 && (args = args[0]);
results[k] = args;
callback(err);
});
}, function(err) {
callback(err, results);
});
}
};
async.iterator = function(tasks) {
var makeCallback = function(index) {
var fn = function() {
tasks.length && tasks[index].apply(null, arguments);
return fn.next();
};
fn.next = function() {
return index < tasks.length - 1 ? makeCallback(index + 1) : null;
};
return fn;
};
return makeCallback(0);
};
async.apply = function(fn) {
var args = Array.prototype.slice.call(arguments, 1);
return function() {
return fn.apply(null, args.concat(Array.prototype.slice.call(arguments)));
};
};
var _concat = function(eachfn, arr, fn, callback) {
var r = [];
eachfn(arr, function(x, cb) {
fn(x, function(err, y) {
r = r.concat(y || []);
cb(err);
});
}, function(err) {
callback(err, r);
});
};
async.concat = doParallel(_concat);
async.concatSeries = doSeries(_concat);
async.whilst = function(test, iterator, callback) {
test() ? iterator(function(err) {
if (err) return callback(err);
async.whilst(test, iterator, callback);
}) : callback();
};
async.doWhilst = function(iterator, test, callback) {
iterator(function(err) {
if (err) return callback(err);
var args = Array.prototype.slice.call(arguments, 1);
test.apply(null, args) ? async.doWhilst(iterator, test, callback) : callback();
});
};
async.until = function(test, iterator, callback) {
test() ? callback() : iterator(function(err) {
if (err) return callback(err);
async.until(test, iterator, callback);
});
};
async.doUntil = function(iterator, test, callback) {
iterator(function(err) {
if (err) return callback(err);
var args = Array.prototype.slice.call(arguments, 1);
test.apply(null, args) ? callback() : async.doUntil(iterator, test, callback);
});
};
async.queue = function(worker, concurrency) {
function _insert(q, data, pos, callback) {
q.started || (q.started = true);
_isArray(data) || (data = [ data ]);
if (0 == data.length) return async.setImmediate(function() {
q.drain && q.drain();
});
_each(data, function(task) {
var item = {
data: task,
callback: "function" == typeof callback ? callback : null
};
pos ? q.tasks.unshift(item) : q.tasks.push(item);
q.saturated && q.tasks.length === q.concurrency && q.saturated();
async.setImmediate(q.process);
});
}
void 0 === concurrency && (concurrency = 1);
var workers = 0;
var q = {
tasks: [],
concurrency: concurrency,
saturated: null,
empty: null,
drain: null,
started: false,
paused: false,
push: function(data, callback) {
_insert(q, data, false, callback);
},
kill: function() {
q.drain = null;
q.tasks = [];
},
unshift: function(data, callback) {
_insert(q, data, true, callback);
},
process: function() {
if (!q.paused && workers < q.concurrency && q.tasks.length) {
var task = q.tasks.shift();
q.empty && 0 === q.tasks.length && q.empty();
workers += 1;
var next = function() {
workers -= 1;
task.callback && task.callback.apply(task, arguments);
q.drain && q.tasks.length + workers === 0 && q.drain();
q.process();
};
var cb = only_once(next);
worker(task.data, cb);
}
},
length: function() {
return q.tasks.length;
},
running: function() {
return workers;
},
idle: function() {
return q.tasks.length + workers === 0;
},
pause: function() {
if (true === q.paused) return;
q.paused = true;
},
resume: function() {
if (false === q.paused) return;
q.paused = false;
for (var w = 1; w <= q.concurrency; w++) async.setImmediate(q.process);
}
};
return q;
};
async.priorityQueue = function(worker, concurrency) {
function _compareTasks(a, b) {
return a.priority - b.priority;
}
function _binarySearch(sequence, item, compare) {
var beg = -1, end = sequence.length - 1;
while (end > beg) {
var mid = beg + (end - beg + 1 >>> 1);
compare(item, sequence[mid]) >= 0 ? beg = mid : end = mid - 1;
}
return beg;
}
function _insert(q, data, priority, callback) {
q.started || (q.started = true);
_isArray(data) || (data = [ data ]);
if (0 == data.length) return async.setImmediate(function() {
q.drain && q.drain();
});
_each(data, function(task) {
var item = {
data: task,
priority: priority,
callback: "function" == typeof callback ? callback : null
};
q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
q.saturated && q.tasks.length === q.concurrency && q.saturated();
async.setImmediate(q.process);
});
}
var q = async.queue(worker, concurrency);
q.push = function(data, priority, callback) {
_insert(q, data, priority, callback);
};
delete q.unshift;
return q;
};
async.cargo = function(worker, payload) {
var working = false, tasks = [];
var cargo = {
tasks: tasks,
payload: payload,
saturated: null,
empty: null,
drain: null,
drained: true,
push: function(data, callback) {
_isArray(data) || (data = [ data ]);
_each(data, function(task) {
tasks.push({
data: task,
callback: "function" == typeof callback ? callback : null
});
cargo.drained = false;
cargo.saturated && tasks.length === payload && cargo.saturated();
});
async.setImmediate(cargo.process);
},
process: function process() {
if (working) return;
if (0 === tasks.length) {
cargo.drain && !cargo.drained && cargo.drain();
cargo.drained = true;
return;
}
var ts = "number" == typeof payload ? tasks.splice(0, payload) : tasks.splice(0, tasks.length);
var ds = _map(ts, function(task) {
return task.data;
});
cargo.empty && cargo.empty();
working = true;
worker(ds, function() {
working = false;
var args = arguments;
_each(ts, function(data) {
data.callback && data.callback.apply(null, args);
});
process();
});
},
length: function() {
return tasks.length;
},
running: function() {
return working;
}
};
return cargo;
};
var _console_fn = function(name) {
return function(fn) {
var args = Array.prototype.slice.call(arguments, 1);
fn.apply(null, args.concat([ function(err) {
var args = Array.prototype.slice.call(arguments, 1);
"undefined" != typeof console && (err ? console.error && console.error(err) : console[name] && _each(args, function(x) {
console[name](x);
}));
} ]));
};
};
async.log = _console_fn("log");
async.dir = _console_fn("dir");
async.memoize = function(fn, hasher) {
var memo = {};
var queues = {};
hasher = hasher || function(x) {
return x;
};
var memoized = function() {
var args = Array.prototype.slice.call(arguments);
var callback = args.pop();
var key = hasher.apply(null, args);
if (key in memo) async.nextTick(function() {
callback.apply(null, memo[key]);
}); else if (key in queues) queues[key].push(callback); else {
queues[key] = [ callback ];
fn.apply(null, args.concat([ function() {
memo[key] = arguments;
var q = queues[key];
delete queues[key];
for (var i = 0, l = q.length; l > i; i++) q[i].apply(null, arguments);
} ]));
}
};
memoized.memo = memo;
memoized.unmemoized = fn;
return memoized;
};
async.unmemoize = function(fn) {
return function() {
return (fn.unmemoized || fn).apply(null, arguments);
};
};
async.times = function(count, iterator, callback) {
var counter = [];
for (var i = 0; count > i; i++) counter.push(i);
return async.map(counter, iterator, callback);
};
async.timesSeries = function(count, iterator, callback) {
var counter = [];
for (var i = 0; count > i; i++) counter.push(i);
return async.mapSeries(counter, iterator, callback);
};
async.seq = function() {
var fns = arguments;
return function() {
var that = this;
var args = Array.prototype.slice.call(arguments);
var callback = args.pop();
async.reduce(fns, args, function(newargs, fn, cb) {
fn.apply(that, newargs.concat([ function() {
var err = arguments[0];
var nextargs = Array.prototype.slice.call(arguments, 1);
cb(err, nextargs);
} ]));
}, function(err, results) {
callback.apply(that, [ err ].concat(results));
});
};
};
async.compose = function() {
return async.seq.apply(null, Array.prototype.reverse.call(arguments));
};
var _applyEach = function(eachfn, fns) {
var go = function() {
var that = this;
var args = Array.prototype.slice.call(arguments);
var callback = args.pop();
return eachfn(fns, function(fn, cb) {
fn.apply(that, args.concat([ cb ]));
}, callback);
};
if (arguments.length > 2) {
var args = Array.prototype.slice.call(arguments, 2);
return go.apply(this, args);
}
return go;
};
async.applyEach = doParallel(_applyEach);
async.applyEachSeries = doSeries(_applyEach);
async.forever = function(fn, callback) {
function next(err) {
if (err) {
if (callback) return callback(err);
throw err;
}
fn(next);
}
next();
};
"undefined" != typeof module && module.exports ? module.exports = async : "undefined" != typeof define && define.amd ? define([], function() {
return async;
}) : root.async = async;
}();
|
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<!-- Standard Head Part -->
<head>
<title>NUnit - EqualConstraint</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-US">
<link rel="stylesheet" type="text/css" href="nunit.css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<!-- End Standard Head Part -->
<body>
<!-- Standard Header for NUnit.org -->
<div id="header">
<a id="logo" href="http:
<div id="nav">
<a href="http:
<a class="active" href="index.html">Documentation</a>
</div>
</div>
<!-- End of Header -->
<div id="content">
<h2>Equal Constraint (NUnit 2.4 / 2.5)</h2>
<p>An EqualConstraint is used to test whether an actual value
is equal to the expected value supplied in its constructor,
optionally within a specified tolerance.
<h4>Constructor</h4>
<div class="code"><pre>
EqualConstraint(object expected )
</pre></div>
<h4>Syntax</h4>
<div class="code"><pre>
Is.EqualTo( object expected )
</pre></div>
<h4>Modifiers</h4>
<div class="code"><pre>
IgnoreCase
AsCollection
NoClip
Within(object tolerance)
.Ulps
.Percent
.Days
.Hours
.Minutes
.Seconds
.Milliseconds
.Ticks
Using(IEqualityComparer comparer)
Using(IEqualityComparer<T> comparer)
Using(IComparer comparer)
Using<T>(IComparer<T> comparer)
Using<T>(Comparison<T> comparer)
</pre></div>
<h4>Comparing Numerics</h4>
<p>Numerics are compared based on their values. Different types
may be compared successfully if their values are equal.
<p>Using the <b>Within</b> modifier, numerics may be tested
for equality within a fixed or percent tolerance.
<div class="code"><pre>
Assert.That(2 + 2, Is.EqualTo(4.0));
Assert.That(2 + 2 == 4);
Assert.That(2 + 2, Is.Not.EqualTo(5));
Assert.That(2 + 2 != 5);
Assert.That( 5.0, Is.EqualTo( 5 );
Assert.That( 5.5, Is.EqualTo( 5 ).Within(0.075);
Assert.That( 5.5, Is.EqualTo( 5 ).Within(1.5).Percent;
</pre></div>
<h4>Comparing Floating Point Values</h4>
<p>Values of type float and double are normally compared using a tolerance
specified by the <b>Within</b> modifier. The special values PositiveInfinity,
NegativeInfinity and NaN compare
as equal to themselves.
<p>With version 2.5, floating-point values may be compared using a tolerance
in "Units in the Last Place" or ULPs. For certain types of numerical work,
this is safer than a fixed tolerance because it automatically compensates
for the added inaccuracy of larger numbers.
<div class="code" style="width: 42em"><pre>
Assert.That( 2.1 + 1.2, Is.EqualTo( 3.3 ).Within( .0005 );
Assert.That( double.PositiveInfinity, Is.EqualTo( double.PositiveInfinity ) );
Assert.That( double.NegativeInfinity, Is.EqualTo( double.NegativeInfinity ) );
Assert.That( double.NaN, Is.EqualTo( double.NaN ) );
Assert.That( 20000000000000004.0, Is.EqualTo(20000000000000000.0).Within(1).Ulps);
</pre></div>
<h4>Comparing Strings</h4>
<p>String comparisons normally respect case. The <b>IgnoreCase</b> modifier
causes the comparison to be case-insensitive. It may also be used when
comparing arrays or collections of strings.
<div class="code"><pre>
Assert.That( "Hello!", Is.Not.EqualTo( "HELLO!" ) );
Assert.That( "Hello!", Is.EqualTo( "HELLO!" ).IgnoreCase );
string[] expected = new string[] { "Hello", World" };
string[] actual = new string[] { "HELLO", "world" };
Assert.That( actual, Is.EqualTo( expected ).IgnoreCase;
</pre></div>
<h4>Comparing DateTimes and TimeSpans</h4>
<p><b>DateTimes</b> and <b>TimeSpans</b> may be compared either with or without
a tolerance. A tolerance is specified using <b>Within</b> with either a
<b>TimeSpan</b> as an argument or with a numeric value followed by a one of
the time conversion modifiers: <b>Days</b>, <b>Hours</b>, <b>Minutes</b>,
<b>Seconds</b>, <b>Milliseconds</b> or <b>Ticks</b>.
<div class="code"><pre>
DateTime now = DateTime.Now;
DateTime later = now + TimeSpan.FromHours(1.0);
Assert.That( now, Is.EqualTo(now) );
Assert.That( later. Is.EqualTo(now).Within(TimeSpan.FromHours(3.0);
Assert.That( later, Is.EqualTo(now).Within(3).Hours;
</pre></div>
<h4>Comparing Arrays and Collections</h4>
<p>Since version 2.2, NUnit has been able to compare two single-dimensioned arrays.
Beginning with version 2.4, multi-dimensioned arrays, nested arrays (arrays of arrays)
and collections may be compared. With version 2.5, any IEnumerable is supported.
Two arrays, collections or IEnumerables are considered equal if they have the
the same dimensions and if each of the corresponding elements is equal.</p>
<p>If you want to treat two arrays of different shapes as simple collections
for purposes of comparison, use the <b>AsCollection</b> modifier, which causes
the comparison to be made element by element, without regard for the rank or
dimensions of the array. Note that jagged arrays (arrays of arrays) do not
have a single underlying collection. The modifier would be applied
to each array separately, which has no effect in most cases.
<div class="code"><pre>
int[] i3 = new int[] { 1, 2, 3 };
double[] d3 = new double[] { 1.0, 2.0, 3.0 };
int[] iunequal = new int[] { 1, 3, 2 };
Assert.That(i3, Is.EqualTo(d3));
Assert.That(i3, Is.Not.EqualTo(iunequal));
int array2x2 = new int[,] { { 1, 2 } { 3, 4 } };
int array4 = new int[] { 1, 2, 3, 4 };
Assert.That( array2x2, Is.Not.EqualTo( array4 ) );
Assert.That( array2x2, Is.EqualTo( array4 ).AsCollection );
</pre></div>
<h4>Comparing Dictionaries</h4>
<p>Dictionaries implement <b>ICollection</b>, and NUnit has treated
them as collections since version 2.4. However, this did not
give useful results, since the dictionary entries had to be
in the same order for the comparison to succeed and the
underlying implementation had to be the same.
<p>Beginning with NUnit 2.5.6, NUnit has specific code for
comparing dictionaries. Two dictionaries are considered equal if
<ol>
<li>The list of keys is the same - without regard to ordering.
<li>The values associated with each key are equal.
</ol>
<p>You can use this capability to compare any two objects implementing
<b>IDictionary</b>. Generic and non-generic dictionaries (Hashtables)
may be successfully compared.
<h4>User-Specified Comparers</h4>
<p>If the default NUnit or .NET behavior for testing equality doesn't
meet your needs, you can supply a comparer of your own through the
<b>Using</b> modifier. When used with <b>EqualConstraint</b>, you
may supply an <b>IEqualityComparer</b>, <b>IEqualityComparer<T></b>,
<b>IComparer</b>, <b>IComparer<T></b>; or <b>Comparison<T></b>
as the argument to <b>Using</b>.
<div class="code"><pre>
Assert.That( myObj1, Is.EqualTo( myObj2 ).Using( myComparer ) );
</pre></div>
<h4>Notes</h4>
<ol>
<li><p>When checking the equality of user-defined classes, NUnit makes use
of the <b>Equals</b> override on the expected object. If you neglect to
override <b>Equals</b>, you can expect failures non-identical objects.
In particular, overriding <b>operator==</b> without overriding <b>Equals</b>
has no effect.
<li><p>The <b>Within</b> modifier was originally designed for use with floating point
values only. Beginning with NUnit 2.4, comparisons of <b>DateTime</b> values
may use a <b>TimeSpan</b> as a tolerance. Beginning with NUnit 2.4.2,
non-float numeric comparisons may also specify a tolerance.
<li><p>Beginning with NUnit 2.4.4, float and double comparisons for which no
tolerance is specified use a default, use the value of
<b>GlobalSettings.<API key></b>. If this is not
set, a tolerance of 0.0d is used.
<li><p>Prior to NUnit 2.2.3, comparison of two NaN values would always fail,
as specified by IEEE floating point standards. The new behavior, was
introduced after some discussion becuase it seems more useful in tests.
To avoid confusion, consider using <b>Is.NaN</b> where appropriate.
<li><p>When an equality test between two strings fails, the relevant portion of
of both strings is displayed in the error message, clipping the strings to
fit the length of the line as needed. Beginning with 2.4.4, this behavior
may be modified by use of the <b>NoClip</b> modifier on the constraint. In
addition, the maximum line length may be modified for all tests by setting
the value of <b>TextMessageWriter.MaximumLineLength</b> in the appropriate
level of setup.
<li><p>When used with arrays, collections or dictionaries, EqualConstraint
operates recursively. Any modifiers are saved and used as they apply to
individual items.
<li><p>A user-specified comparer will not be called by <b>EqualConstraint</b>
if either or both arguments are null. If both are null, the Constraint
succeeds. If only one is null, it fails.
<li><p>NUnit has special semantics for comparing <b>Streams</b> and
<b>DirectoryInfos</b>. For a <b>Stream</b>, the contents are compared.
For a <b>DirectoryInfo</b>, the first-level directory contents are compared.
</ol>
</div>
<!-- Submenu -->
<div id="subnav">
<ul>
<li><a href="index.html">NUnit 2.5.10</a></li>
<ul>
<li><a href="getStarted.html">Getting Started</a></li>
<li><a href="assertions.html">Assertions</a></li>
<li><a href="constraintModel.html">Constraints</a></li>
<ul>
<li id="current"><a href="equalConstraint.html">Equal Constraint</a></li>
<li><a href="sameasConstraint.html">SameAs Constraint</a></li>
<li><a href="<API key>.html">Condition Constraints</a></li>
<li><a href="<API key>.html">Comparison Constrants</a></li>
<li><a href="pathConstraints.html">Path Constraints</a></li>
<li><a href="typeConstraints.html">Type Constraints</a></li>
<li><a href="stringConstraints.html">String Constraints</a></li>
<li><a href="<API key>.html">Collection Constraints</a></li>
<li><a href="propertyConstraint.html">Property Constraint</a></li>
<li><a href="throwsConstraint.html">Throws Constraint</a></li>
<li><a href="compoundConstraints.html">Compound Constraints</a></li>
<li><a href="delayedConstraint.html">Delayed Constraint</a></li>
<li><a href="listMapper.html">List Mapper</a></li>
<li><a href="reusableConstraint.html">Reusable Constraint</a></li>
</ul>
<li><a href="attributes.html">Attributes</a></li>
<li><a href="runningTests.html">Running Tests</a></li>
<li><a href="extensibility.html">Extensibility</a></li>
<li><a href="releaseNotes.html">Release Notes</a></li>
<li><a href="samples.html">Samples</a></li>
<li><a href="license.html">License</a></li>
</ul>
</ul>
</div>
<!-- End of Submenu -->
<!-- Standard Footer for NUnit.org -->
<div id="footer">
Copyright © 2010 Charlie Poole. All Rights Reserved.
</div>
<!-- End of Footer -->
</body>
</html>
|
<# # Documentation {{{
.Synopsis
Installs .Net 3.5
[CmdletBinding(<API key>=$true)]
Param(
)
begin
{
Write-Output "Script started at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
$Now = Get-Date -Format 'yyyyMMddHHmmss'
}
process
{
function Show-Elapsed([Diagnostics.StopWatch] $watch)
{
$elapsed = ''
if ($watch.Elapsed.Days -gt 0) { $elapsed += " $($watch.Elapsed.Days) days" }
if ($watch.Elapsed.Hours -gt 0) { $elapsed += " $($watch.Elapsed.Hours) hours" }
if ($watch.Elapsed.Minutes -gt 0) { $elapsed += " $($watch.Elapsed.Minutes) minutes" }
if ($watch.Elapsed.Seconds -gt 0) { $elapsed += " $($watch.Elapsed.Seconds) seconds" }
return $elapsed
}
# Prerequisites: {{{
# Prerequisite: Powershell 3 {{{2
if($PSVersionTable.PSVersion.Major -lt 3)
{
Write-Error "Powershell version 3 or more recent is required"
Write-Output "Script ended at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Start-Sleep 2
exit 1
}
# Prerequisites }}}
Write-Output "Checking if .Net 4.5.2 or more is installed"
$dotnet_info = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -ErrorAction SilentlyContinue
if ($dotnet_info -eq $null -or $dotnet_info.Release -lt 379893)
{
if (Test-Path $env:USERPROFILE/mounted.info)
{
$SourceDriveLetter = Get-Content $env:USERPROFILE/mounted.info
Write-Verbose "Got drive letter from a previous mount: $SourceDriveLetter"
if (Test-Path "${SourceDriveLetter}\ThirdPartyInstalls\Microsoft\DotNET4.5.2\<API key>.exe")
{
Write-Output "Installing .Net 4.5.2 from the ISO ($SourceDriveLetter)"
& ${SourceDriveLetter}ThirdPartyInstalls\Microsoft\DotNET4.5.2\<API key>.exe /Passive /norestart /Log C:\Windows\Logs\dotnet-4.5.2.log.txt
Start-Sleep 60
Write-Output "Script ended at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Start-Sleep 5
exit
}
}
$install='<API key>.exe'
$source_url="https://download.microsoft.com/download/E/2/1/<API key>/$install"
$dest=Join-Path $env:TEMP $install
Write-Output "Downloading .Net 4.5.2"
#Start-BitsTransfer -Source $source_url -Destination $dest -ErrorAction Stop
(New-Object System.Net.WebClient).DownloadFile($source_url, $dest)
Write-Output "Installing .Net 4.5.2"
& ${env:TEMP}\<API key>.exe /Passive /norestart /Log C:\Windows\Logs\dotnet-4.5.2.log.txt
Start-Sleep 60
}
}
end
{
Write-Output "Script ended at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Start-Sleep 5
exit $LastExitCode
}
|
package distribution
import (
"fmt"
"sync"
"github.com/docker/distribution/reference"
"github.com/docker/distribution/registry/client/transport"
"github.com/docker/docker/distribution/metadata"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/image"
"github.com/docker/docker/image/v1"
"github.com/docker/docker/layer"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/system"
"github.com/docker/docker/registry"
"github.com/opencontainers/go-digest"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type v1Pusher struct {
v1IDService *metadata.V1IDService
endpoint registry.APIEndpoint
ref reference.Named
repoInfo *registry.RepositoryInfo
config *ImagePushConfig
session *registry.Session
}
func (p *v1Pusher) Push(ctx context.Context) error {
tlsConfig, err := p.config.RegistryService.TLSConfig(p.repoInfo.Index.Name)
if err != nil {
return err
}
// Adds Docker-specific headers as well as user-specified headers (metaHeaders)
tr := transport.NewTransport(
// TODO(tiborvass): was NoTimeout
registry.NewTransport(tlsConfig),
registry.Headers(dockerversion.DockerUserAgent(ctx), p.config.MetaHeaders)...,
)
client := registry.HTTPClient(tr)
v1Endpoint := p.endpoint.ToV1Endpoint(dockerversion.DockerUserAgent(ctx), p.config.MetaHeaders)
p.session, err = registry.NewSession(client, p.config.AuthConfig, v1Endpoint)
if err != nil {
// TODO(dmcgowan): Check if should fallback
return fallbackError{err: err}
}
if err := p.pushRepository(ctx); err != nil {
// TODO(dmcgowan): Check if should fallback
return err
}
return nil
}
// v1Image exposes the configuration, filesystem layer ID, and a v1 ID for an
// image being pushed to a v1 registry.
type v1Image interface {
Config() []byte
Layer() layer.Layer
V1ID() string
}
type v1ImageCommon struct {
layer layer.Layer
config []byte
v1ID string
}
func (common *v1ImageCommon) Config() []byte {
return common.config
}
func (common *v1ImageCommon) V1ID() string {
return common.v1ID
}
func (common *v1ImageCommon) Layer() layer.Layer {
return common.layer
}
// v1TopImage defines a runnable (top layer) image being pushed to a v1
// registry.
type v1TopImage struct {
v1ImageCommon
imageID image.ID
}
func newV1TopImage(imageID image.ID, img *image.Image, l layer.Layer, parent *v1DependencyImage) (*v1TopImage, error) {
v1ID := imageID.Digest().Hex()
parentV1ID := ""
if parent != nil {
parentV1ID = parent.V1ID()
}
config, err := v1.<API key>(img, v1ID, parentV1ID, false)
if err != nil {
return nil, err
}
return &v1TopImage{
v1ImageCommon: v1ImageCommon{
v1ID: v1ID,
config: config,
layer: l,
},
imageID: imageID,
}, nil
}
// v1DependencyImage defines a dependency layer being pushed to a v1 registry.
type v1DependencyImage struct {
v1ImageCommon
}
func <API key>(l layer.Layer, parent *v1DependencyImage) *v1DependencyImage {
v1ID := digest.Digest(l.ChainID()).Hex()
var config string
if parent != nil {
config = fmt.Sprintf(`{"id":"%s","parent":"%s"}`, v1ID, parent.V1ID())
} else {
config = fmt.Sprintf(`{"id":"%s"}`, v1ID)
}
return &v1DependencyImage{
v1ImageCommon: v1ImageCommon{
v1ID: v1ID,
config: []byte(config),
layer: l,
},
}
}
// Retrieve the all the images to be uploaded in the correct order
func (p *v1Pusher) getImageList() (imageList []v1Image, tagsByImage map[image.ID][]string, referencedLayers []PushLayer, err error) {
tagsByImage = make(map[image.ID][]string)
// Ignore digest references
if _, isCanonical := p.ref.(reference.Canonical); isCanonical {
return
}
tagged, isTagged := p.ref.(reference.NamedTagged)
if isTagged {
// Push a specific tag
var imgID image.ID
var dgst digest.Digest
dgst, err = p.config.ReferenceStore.Get(p.ref)
if err != nil {
return
}
imgID = image.IDFromDigest(dgst)
imageList, err = p.imageListForTag(imgID, nil, &referencedLayers)
if err != nil {
return
}
tagsByImage[imgID] = []string{tagged.Tag()}
return
}
imagesSeen := make(map[digest.Digest]struct{})
dependenciesSeen := make(map[layer.ChainID]*v1DependencyImage)
associations := p.config.ReferenceStore.ReferencesByName(p.ref)
for _, association := range associations {
if tagged, isTagged = association.Ref.(reference.NamedTagged); !isTagged {
// Ignore digest references.
continue
}
imgID := image.IDFromDigest(association.ID)
tagsByImage[imgID] = append(tagsByImage[imgID], tagged.Tag())
if _, present := imagesSeen[association.ID]; present {
// Skip generating image list for already-seen image
continue
}
imagesSeen[association.ID] = struct{}{}
imageListForThisTag, err := p.imageListForTag(imgID, dependenciesSeen, &referencedLayers)
if err != nil {
return nil, nil, nil, err
}
// append to main image list
imageList = append(imageList, imageListForThisTag...)
}
if len(imageList) == 0 {
return nil, nil, nil, fmt.Errorf("No images found for the requested repository / tag")
}
logrus.Debugf("Image list: %v", imageList)
logrus.Debugf("Tags by image: %v", tagsByImage)
return
}
func (p *v1Pusher) imageListForTag(imgID image.ID, dependenciesSeen map[layer.ChainID]*v1DependencyImage, referencedLayers *[]PushLayer) (imageListForThisTag []v1Image, err error) {
ics, ok := p.config.ImageStore.(*imageConfigStore)
if !ok {
return nil, fmt.Errorf("only image store images supported for v1 push")
}
img, err := ics.Store.Get(imgID)
if err != nil {
return nil, err
}
topLayerID := img.RootFS.ChainID()
if !system.IsOSSupported(img.OperatingSystem()) {
return nil, system.<API key>
}
pl, err := p.config.LayerStores[img.OperatingSystem()].Get(topLayerID)
*referencedLayers = append(*referencedLayers, pl)
if err != nil {
return nil, fmt.Errorf("failed to get top layer from image: %v", err)
}
// V1 push is deprecated, only support existing layerstore layers
lsl, ok := pl.(*storeLayer)
if !ok {
return nil, fmt.Errorf("only layer store layers supported for v1 push")
}
l := lsl.Layer
dependencyImages, parent := <API key>(l.Parent(), dependenciesSeen)
topImage, err := newV1TopImage(imgID, img, l, parent)
if err != nil {
return nil, err
}
imageListForThisTag = append(dependencyImages, topImage)
return
}
func <API key>(l layer.Layer, dependenciesSeen map[layer.ChainID]*v1DependencyImage) (imageListForThisTag []v1Image, parent *v1DependencyImage) {
if l == nil {
return nil, nil
}
imageListForThisTag, parent = <API key>(l.Parent(), dependenciesSeen)
if dependenciesSeen != nil {
if dependencyImage, present := dependenciesSeen[l.ChainID()]; present {
// This layer is already on the list, we can ignore it
// and all its parents.
return imageListForThisTag, dependencyImage
}
}
dependencyImage := <API key>(l, parent)
imageListForThisTag = append(imageListForThisTag, dependencyImage)
if dependenciesSeen != nil {
dependenciesSeen[l.ChainID()] = dependencyImage
}
return imageListForThisTag, dependencyImage
}
// createImageIndex returns an index of an image's layer IDs and tags.
func createImageIndex(images []v1Image, tags map[image.ID][]string) []*registry.ImgData {
var imageIndex []*registry.ImgData
for _, img := range images {
v1ID := img.V1ID()
if topImage, isTopImage := img.(*v1TopImage); isTopImage {
if tags, hasTags := tags[topImage.imageID]; hasTags {
// If an image has tags you must add an entry in the image index
// for each tag
for _, tag := range tags {
imageIndex = append(imageIndex, ®istry.ImgData{
ID: v1ID,
Tag: tag,
})
}
continue
}
}
// If the image does not have a tag it still needs to be sent to the
// registry with an empty tag so that it is associated with the repository
imageIndex = append(imageIndex, ®istry.ImgData{
ID: v1ID,
Tag: "",
})
}
return imageIndex
}
// <API key> checks the specified endpoint to see if an image exists
// and if it is absent then it sends the image id to the channel to be pushed.
func (p *v1Pusher) <API key>(wg *sync.WaitGroup, endpoint string, images chan v1Image, imagesToPush chan string) {
defer wg.Done()
for image := range images {
v1ID := image.V1ID()
truncID := stringid.TruncateID(image.Layer().DiffID().String())
if err := p.session.LookupRemoteImage(v1ID, endpoint); err != nil {
logrus.Errorf("Error in LookupRemoteImage: %s", err)
imagesToPush <- v1ID
progress.Update(p.config.ProgressOutput, truncID, "Waiting")
} else {
progress.Update(p.config.ProgressOutput, truncID, "Already exists")
}
}
}
func (p *v1Pusher) pushImageToEndpoint(ctx context.Context, endpoint string, imageList []v1Image, tags map[image.ID][]string, repo *registry.RepositoryData) error {
workerCount := len(imageList)
// start a maximum of 5 workers to check if images exist on the specified endpoint.
if workerCount > 5 {
workerCount = 5
}
var (
wg = &sync.WaitGroup{}
imageData = make(chan v1Image, workerCount*2)
imagesToPush = make(chan string, workerCount*2)
pushes = make(chan map[string]struct{}, 1)
)
for i := 0; i < workerCount; i++ {
wg.Add(1)
go p.<API key>(wg, endpoint, imageData, imagesToPush)
}
// start a go routine that consumes the images to push
go func() {
shouldPush := make(map[string]struct{})
for id := range imagesToPush {
shouldPush[id] = struct{}{}
}
pushes <- shouldPush
}()
for _, v1Image := range imageList {
imageData <- v1Image
}
// close the channel to notify the workers that there will be no more images to check.
close(imageData)
wg.Wait()
close(imagesToPush)
// wait for all the images that require pushes to be collected into a consumable map.
shouldPush := <-pushes
// finish by pushing any images and tags to the endpoint. The order that the images are pushed
// is very important that is why we are still iterating over the ordered list of imageIDs.
for _, img := range imageList {
v1ID := img.V1ID()
if _, push := shouldPush[v1ID]; push {
if _, err := p.pushImage(ctx, img, endpoint); err != nil {
// FIXME: Continue on error?
return err
}
}
if topImage, isTopImage := img.(*v1TopImage); isTopImage {
for _, tag := range tags[topImage.imageID] {
progress.Messagef(p.config.ProgressOutput, "", "Pushing tag for rev [%s] on {%s}", stringid.TruncateID(v1ID), endpoint+"repositories/"+reference.Path(p.repoInfo.Name)+"/tags/"+tag)
if err := p.session.PushRegistryTag(p.repoInfo.Name, v1ID, tag, endpoint); err != nil {
return err
}
}
}
}
return nil
}
// pushRepository pushes layers that do not already exist on the registry.
func (p *v1Pusher) pushRepository(ctx context.Context) error {
imgList, tags, referencedLayers, err := p.getImageList()
defer func() {
for _, l := range referencedLayers {
l.Release()
}
}()
if err != nil {
return err
}
imageIndex := createImageIndex(imgList, tags)
for _, data := range imageIndex {
logrus.Debugf("Pushing ID: %s with Tag: %s", data.ID, data.Tag)
}
// Register all the images in a repository with the registry
// If an image is not in this list it will not be associated with the repository
repoData, err := p.session.PushImageJSONIndex(p.repoInfo.Name, imageIndex, false, nil)
if err != nil {
return err
}
// push the repository to each of the endpoints only if it does not exist.
for _, endpoint := range repoData.Endpoints {
if err := p.pushImageToEndpoint(ctx, endpoint, imgList, tags, repoData); err != nil {
return err
}
}
_, err = p.session.PushImageJSONIndex(p.repoInfo.Name, imageIndex, true, repoData.Endpoints)
return err
}
func (p *v1Pusher) pushImage(ctx context.Context, v1Image v1Image, ep string) (checksum string, err error) {
l := v1Image.Layer()
v1ID := v1Image.V1ID()
truncID := stringid.TruncateID(l.DiffID().String())
jsonRaw := v1Image.Config()
progress.Update(p.config.ProgressOutput, truncID, "Pushing")
// General rule is to use ID for graph accesses and compatibilityID for
// calls to session.registry()
imgData := ®istry.ImgData{
ID: v1ID,
}
// Send the json
if err := p.session.<API key>(imgData, jsonRaw, ep); err != nil {
if err == registry.ErrAlreadyExists {
progress.Update(p.config.ProgressOutput, truncID, "Image already pushed, skipping")
return "", nil
}
return "", err
}
arch, err := l.TarStream()
if err != nil {
return "", err
}
defer arch.Close()
// don't care if this fails; best effort
size, _ := l.DiffSize()
// Send the layer
logrus.Debugf("rendered layer for %s of [%d] size", v1ID, size)
reader := progress.NewProgressReader(ioutils.NewCancelReadCloser(ctx, arch), p.config.ProgressOutput, size, truncID, "Pushing")
defer reader.Close()
checksum, checksumPayload, err := p.session.<API key>(v1ID, reader, ep, jsonRaw)
if err != nil {
return "", err
}
imgData.Checksum = checksum
imgData.ChecksumPayload = checksumPayload
// Send the checksum
if err := p.session.<API key>(imgData, ep); err != nil {
return "", err
}
if err := p.v1IDService.Set(v1ID, p.repoInfo.Index.Name, l.DiffID()); err != nil {
logrus.Warnf("Could not set v1 ID mapping: %v", err)
}
progress.Update(p.config.ProgressOutput, truncID, "Image successfully pushed")
return imgData.Checksum, nil
}
|
"""Django forms for models."""
# This don't work in appengine, we use djangoforms instead.
# from django.forms import ModelForm
from django import forms # DateField, DateTimeInput
from google.appengine.ext.db import djangoforms
import common
import models
VENDOR_SELECTIONS = (
'Home Depot',
'Kelly-Moore Paints',
'Palo Alto Hardware',
'Wisnom\'s ',
'Ocean Shore Hardware',
'AAA Rentals',
'San Mateo Rentals',
'Other (put name in Description)',
)
def DateField(label):
"""Helper to produce data fields for forms."""
return forms.DateField(
label=label, required=False,
help_text='mm/dd/yyyy',
widget=forms.DateTimeInput(attrs={'class':'input',
'size':'10'
},
format='%m/%d/%Y'
))
def <API key>():
return djangoforms.ModelChoiceField(
models.Captain,
models.Captain.all().order('name'))
def <API key>():
return djangoforms.ModelChoiceField(
models.NewSite,
models.NewSite.all().order('number'))
class CaptainForm(djangoforms.ModelForm):
class Meta:
model = models.Captain
exclude = ['modified', 'last_editor', 'last_welcome', 'search_prefixes']
class CaptainContactForm(djangoforms.ModelForm):
class Meta:
model = models.Captain
exclude = ['name', 'email', 'modified', 'last_editor', 'last_welcome',
'search_prefixes']
class NewSiteForm(djangoforms.ModelForm):
number = forms.CharField(
max_length=10,
help_text = '"10001DAL" reads: 2010, #001, Daly City')
street_number = forms.CharField(
max_length=100,
help_text = models.NewSite.street_number.help_text)
city_state_zip = forms.CharField(
max_length=100,
help_text = models.NewSite.city_state_zip.help_text)
jurisdiction_choice = djangoforms.ModelChoiceField(
models.Jurisdiction, query=models.Jurisdiction.all().order('name'),
label='Jurisdiction')
class Meta:
model = models.NewSite
exclude = ['search_prefixes', 'program', 'jurisdiction', 'year']
class CaptainSiteForm(djangoforms.ModelForm):
work_start = DateField('Work Start Date')
work_end = DateField('Work End Date')
class Meta:
# TODO: is this the wrong model!?? should be NewSite?
model = models.Site
exclude = ['number', 'name', 'applicant', 'sponsors',
'postal_address', 'search_prefixes']
class SiteCaptainSiteForm(djangoforms.ModelForm):
captain = <API key>()
class Meta:
model = models.SiteCaptain
exclude = ['site']
class StaffForm(djangoforms.ModelForm):
since = DateField('Since')
class Meta:
model = models.Staff
exclude = ['user', 'last_welcome']
class SupplierForm(djangoforms.ModelForm):
since = DateField('Since')
class Meta:
model = models.Supplier
exclude = ['user']
class SupplierFormSimple(djangoforms.ModelForm):
class Meta:
model = models.Supplier
fields = ['name', 'address', 'phone']
class OrderSheetForm(djangoforms.ModelForm):
class Meta:
model = models.OrderSheet
exclude = ['created']
class ItemForm(djangoforms.ModelForm):
class Meta:
model = models.Item
exclude = ['last_editor', 'created', 'modified', 'thumbnail']
class OrderForm(djangoforms.ModelForm):
initial = {'pickup_on': common.NRD}
site = <API key>()
class Meta:
model = models.Order
exclude = ['last_editor', 'created', 'created_by',
'modified', 'order_sheet',
'sub_total', 'sales_tax', 'grand_total', 'state',
'program']
class CaptainOrderForm(djangoforms.ModelForm):
pickup_on = DateField('Pickup On')
return_on = DateField('Return On')
class Meta:
model = models.Order
exclude = ['last_editor', 'created', 'created_by',
'modified', 'order_sheet',
'sub_total', 'sales_tax', 'grand_total', 'state',
'captain', 'site', 'program']
class NewOrderForm(djangoforms.ModelForm):
site = djangoforms.ModelChoiceField(
models.Site, widget=forms.HiddenInput)
order_sheet = djangoforms.ModelChoiceField(
models.OrderSheet, query=models.OrderSheet.all().order('name'))
class Meta:
model = models.Order
fields = ['site', 'order_sheet', 'program']
class DeliveryForm(djangoforms.ModelForm):
class Meta:
model = models.Delivery
exclude = ['site']
class PickupForm(djangoforms.ModelForm):
class Meta:
model = models.Pickup
exclude = ['site']
class RetrievalForm(djangoforms.ModelForm):
class Meta:
model = models.Retrieval
exclude = ['site']
class InventoryItemForm(djangoforms.ModelForm):
class Meta:
model = models.InventoryItem
exclude = ['last_editor', 'modified', 'item']
class SiteExpenseForm(djangoforms.ModelForm):
def __init__(self, *args, **kwargs):
staff = kwargs.pop('staff')
super(SiteExpenseForm, self).__init__(*args, **kwargs)
if staff:
self.fields['site'] = djangoforms.ModelChoiceField(
models.NewSite, models.NewSite.all().order('number'))
entity = kwargs.get('instance')
if entity:
site = entity.site
captains = [(sc.captain.key(), sc.captain.name)
for sc in site.sitecaptain_set]
captains.sort()
staff_captain = common.GetStaffCaptain()
captains.append((staff_captain.key(), staff_captain.name))
self.fields['captain'] = djangoforms.ModelChoiceField(
models.SiteCaptain,
choices=captains)
else:
self.fields['site'] = djangoforms.ModelChoiceField(
models.NewSite, widget=forms.HiddenInput)
self.fields['captain'] = djangoforms.ModelChoiceField(
models.Captain, widget=forms.HiddenInput)
class CheckRequestForm(SiteExpenseForm):
payment_date = forms.DateField(required=True)
name = forms.CharField(required=True, label='Payable To')
description = forms.CharField(
required=True, widget=forms.Textarea,
label=('Description '
'(Please include place of purchase and list of items purchased '
'and submit corresponding receipt.)')
)
class Meta:
model = models.CheckRequest
exclude = ['last_editor', 'modified', 'program']
class VendorReceiptForm(SiteExpenseForm):
purchase_date = forms.DateField(required=True)
supplier = djangoforms.ModelChoiceField(
models.Supplier,
query=models.Supplier.all().filter('active = ', 'Active').order('name'),
label="Vendor",
help_text="or add a new vendor using the form on the right")
amount = forms.FloatField(required=True)
class Meta:
model = models.VendorReceipt
exclude = ['last_editor', 'modified', 'program', 'vendor']
class InKindDonationForm(SiteExpenseForm):
donation_date = forms.DateField(required=True)
donor = forms.CharField(required=True)
donor_phone = forms.CharField(required=True)
description = forms.CharField(required=True, widget=forms.Textarea)
class Meta:
model = models.InKindDonation
exclude = ['last_editor', 'modified', 'program']
|
-- // CLOUD-57789 added clustertemplate
-- Migration SQL that makes the change goes here.
CREATE TABLE clustertemplate (
id bigint NOT NULL,
account character varying(255),
name character varying(255) NOT NULL,
template text,
owner character varying(255),
type character varying(255),
publicinaccount boolean NOT NULL
);
ALTER TABLE ONLY clustertemplate ADD CONSTRAINT <API key> PRIMARY KEY (id);
ALTER TABLE ONLY clustertemplate ADD CONSTRAINT <API key> UNIQUE (account, name);
CREATE SEQUENCE <API key> START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
-- //@UNDO
-- SQL to undo the change goes here.
DROP TABLE clustertemplate;
DROP SEQUENCE <API key>;
|
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package graphene.model.idl;
@SuppressWarnings("all")
/** Selectable services, returned by getServices() in various APIs */
@org.apache.avro.specific.AvroGenerated
public class G_Service extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"G_Service\",\"namespace\":\"graphene.model.idl\",\"doc\":\"Selectable services, returned by getServices() in various APIs\",\"fields\":[{\"name\":\"uid\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"unique id of this service\"},{\"name\":\"label\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"short human-readable description of service for display\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** unique id of this service */
private java.lang.String uid;
/** short human-readable description of service for display */
private java.lang.String label;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use <code>newBuilder()</code>.
*/
public G_Service() {}
/**
* All-args constructor.
*/
public G_Service(java.lang.String uid, java.lang.String label) {
this.uid = uid;
this.label = label;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return uid;
case 1: return label;
default: throw new org.apache.avro.<API key>("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: uid = (java.lang.String)value$; break;
case 1: label = (java.lang.String)value$; break;
default: throw new org.apache.avro.<API key>("Bad index");
}
}
/**
* Gets the value of the 'uid' field.
* unique id of this service */
public java.lang.String getUid() {
return uid;
}
/**
* Sets the value of the 'uid' field.
* unique id of this service * @param value the value to set.
*/
public void setUid(java.lang.String value) {
this.uid = value;
}
/**
* Gets the value of the 'label' field.
* short human-readable description of service for display */
public java.lang.String getLabel() {
return label;
}
/**
* Sets the value of the 'label' field.
* short human-readable description of service for display * @param value the value to set.
*/
public void setLabel(java.lang.String value) {
this.label = value;
}
/** Creates a new G_Service RecordBuilder */
public static graphene.model.idl.G_Service.Builder newBuilder() {
return new graphene.model.idl.G_Service.Builder();
}
/** Creates a new G_Service RecordBuilder by copying an existing Builder */
public static graphene.model.idl.G_Service.Builder newBuilder(graphene.model.idl.G_Service.Builder other) {
return new graphene.model.idl.G_Service.Builder(other);
}
/** Creates a new G_Service RecordBuilder by copying an existing G_Service instance */
public static graphene.model.idl.G_Service.Builder newBuilder(graphene.model.idl.G_Service other) {
return new graphene.model.idl.G_Service.Builder(other);
}
/**
* RecordBuilder for G_Service instances.
*/
public static class Builder extends org.apache.avro.specific.<API key><G_Service>
implements org.apache.avro.data.RecordBuilder<G_Service> {
private java.lang.String uid;
private java.lang.String label;
/** Creates a new Builder */
private Builder() {
super(graphene.model.idl.G_Service.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(graphene.model.idl.G_Service.Builder other) {
super(other);
if (isValidValue(fields()[0], other.uid)) {
this.uid = data().deepCopy(fields()[0].schema(), other.uid);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.label)) {
this.label = data().deepCopy(fields()[1].schema(), other.label);
fieldSetFlags()[1] = true;
}
}
/** Creates a Builder by copying an existing G_Service instance */
private Builder(graphene.model.idl.G_Service other) {
super(graphene.model.idl.G_Service.SCHEMA$);
if (isValidValue(fields()[0], other.uid)) {
this.uid = data().deepCopy(fields()[0].schema(), other.uid);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.label)) {
this.label = data().deepCopy(fields()[1].schema(), other.label);
fieldSetFlags()[1] = true;
}
}
/** Gets the value of the 'uid' field */
public java.lang.String getUid() {
return uid;
}
/** Sets the value of the 'uid' field */
public graphene.model.idl.G_Service.Builder setUid(java.lang.String value) {
validate(fields()[0], value);
this.uid = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'uid' field has been set */
public boolean hasUid() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'uid' field */
public graphene.model.idl.G_Service.Builder clearUid() {
uid = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'label' field */
public java.lang.String getLabel() {
return label;
}
/** Sets the value of the 'label' field */
public graphene.model.idl.G_Service.Builder setLabel(java.lang.String value) {
validate(fields()[1], value);
this.label = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'label' field has been set */
public boolean hasLabel() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'label' field */
public graphene.model.idl.G_Service.Builder clearLabel() {
label = null;
fieldSetFlags()[1] = false;
return this;
}
@Override
public G_Service build() {
try {
G_Service record = new G_Service();
record.uid = fieldSetFlags()[0] ? this.uid : (java.lang.String) defaultValue(fields()[0]);
record.label = fieldSetFlags()[1] ? this.label : (java.lang.String) defaultValue(fields()[1]);
return record;
} catch (Exception e) {
throw new org.apache.avro.<API key>(e);
}
}
}
}
|
/**
* Generated with Acceleo
*/
package org.wso2.developerstudio.eclipse.gmf.esb.parts.forms;
// Start of user code for imports
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.eef.runtime.api.component.<API key>;
import org.eclipse.emf.eef.runtime.api.notify.<API key>;
import org.eclipse.emf.eef.runtime.api.parts.<API key>;
import org.eclipse.emf.eef.runtime.impl.notify.<API key>;
import org.eclipse.emf.eef.runtime.part.impl.<API key>;
import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.<API key>;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.<API key>;
import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.<API key>;
import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.<API key>;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.wso2.developerstudio.eclipse.gmf.esb.parts.EsbViewsRepository;
import org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>;
import org.wso2.developerstudio.eclipse.gmf.esb.providers.EsbMessages;
// End of user code
public class <API key> extends <API key> implements <API key>, <API key> {
protected ReferencesTable commentMediators;
protected List<ViewerFilter> <API key> = new ArrayList<ViewerFilter>();
protected List<ViewerFilter> <API key> = new ArrayList<ViewerFilter>();
/**
* For {@link ISection} use only.
*/
public <API key>() { super(); }
/**
* Default constructor
* @param editionComponent the {@link <API key>} that manage this part
*
*/
public <API key>(<API key> editionComponent) {
super(editionComponent);
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.<API key>#
* createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*
*/
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
Form form = scrolledForm.getForm();
view = form.getBody();
GridLayout layout = new GridLayout();
layout.numColumns = 3;
view.setLayout(layout);
createControls(widgetFactory, view);
return scrolledForm;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.<API key>#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence <API key> = new <API key>(<API key>);
<API key>
.addStep(EsbViewsRepository.<API key>.Properties.class)
.addStep(EsbViewsRepository.<API key>.Properties.commentMediators);
composer = new PartComposer(<API key>) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == EsbViewsRepository.<API key>.Properties.class) {
return <API key>(widgetFactory, parent);
}
if (key == EsbViewsRepository.<API key>.Properties.commentMediators) {
return <API key>(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
protected Composite <API key>(FormToolkit widgetFactory, final Composite parent) {
Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
propertiesSection.setText(EsbMessages.<API key>);
GridData <API key> = new GridData(GridData.FILL_HORIZONTAL);
<API key>.horizontalSpan = 3;
propertiesSection.setLayoutData(<API key>);
Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
GridLayout <API key> = new GridLayout();
<API key>.numColumns = 3;
propertiesGroup.setLayout(<API key>);
propertiesSection.setClient(propertiesGroup);
return propertiesGroup;
}
/**
* @param container
*
*/
protected Composite <API key>(FormToolkit widgetFactory, Composite parent) {
this.commentMediators = new ReferencesTable(getDescription(EsbViewsRepository.<API key>.Properties.commentMediators, EsbMessages.<API key>), new <API key>() {
public void handleAdd() {
<API key>.<API key>(new <API key>(<API key>.this, EsbViewsRepository.<API key>.Properties.commentMediators, <API key>.COMMIT, <API key>.ADD, null, null));
commentMediators.refresh();
}
public void handleEdit(EObject element) {
<API key>.<API key>(new <API key>(<API key>.this, EsbViewsRepository.<API key>.Properties.commentMediators, <API key>.COMMIT, <API key>.EDIT, null, element));
commentMediators.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
<API key>.<API key>(new <API key>(<API key>.this, EsbViewsRepository.<API key>.Properties.commentMediators, <API key>.COMMIT, <API key>.MOVE, element, newIndex));
commentMediators.refresh();
}
public void handleRemove(EObject element) {
<API key>.<API key>(new <API key>(<API key>.this, EsbViewsRepository.<API key>.Properties.commentMediators, <API key>.COMMIT, <API key>.REMOVE, null, element));
commentMediators.refresh();
}
public void navigateTo(EObject element) { }
});
for (ViewerFilter filter : this.<API key>) {
this.commentMediators.addFilter(filter);
}
this.commentMediators.setHelpText(<API key>.getHelpContent(EsbViewsRepository.<API key>.Properties.commentMediators, EsbViewsRepository.FORM_KIND));
this.commentMediators.createControls(parent, widgetFactory);
this.commentMediators.<API key>(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
<API key>.<API key>(new <API key>(<API key>.this, EsbViewsRepository.<API key>.Properties.commentMediators, <API key>.CHANGE, <API key>.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData <API key> = new GridData(GridData.FILL_HORIZONTAL);
<API key>.horizontalSpan = 3;
this.commentMediators.setLayoutData(<API key>);
this.commentMediators.setLowerBound(0);
this.commentMediators.setUpperBound(-1);
commentMediators.setID(EsbViewsRepository.<API key>.Properties.commentMediators);
commentMediators.setEEFType("eef::<API key>"); //$NON-NLS-1$
// Start of user code for <API key>
// End of user code
return parent;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.notify.<API key>#<API key>(org.eclipse.emf.eef.runtime.api.notify.<API key>)
*
*/
public void <API key>(<API key> event) {
// Start of user code for tab synchronization
// End of user code
}
/**
* {@inheritDoc}
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>#<API key>(EObject current, EReference containingFeature, EReference feature)
*/
public void <API key>(<API key> settings) {
if (current.eResource() != null && current.eResource().getResourceSet() != null)
this.resourceSet = current.eResource().getResourceSet();
<API key> contentProvider = new <API key>();
commentMediators.setContentProvider(contentProvider);
commentMediators.setInput(settings);
boolean <API key> = isReadOnly(EsbViewsRepository.<API key>.Properties.commentMediators);
if (<API key> && commentMediators.isEnabled()) {
commentMediators.setEnabled(false);
commentMediators.setToolTipText(EsbMessages.<API key>);
} else if (!<API key> && !commentMediators.isEnabled()) {
commentMediators.setEnabled(true);
}
}
/**
* {@inheritDoc}
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>#<API key>()
*
*/
public void <API key>() {
commentMediators.refresh();
}
/**
* {@inheritDoc}
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>#<API key>(ViewerFilter filter)
*
*/
public void <API key>(ViewerFilter filter) {
<API key>.add(filter);
if (this.commentMediators != null) {
this.commentMediators.addFilter(filter);
}
}
/**
* {@inheritDoc}
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>#<API key>(ViewerFilter filter)
*
*/
public void <API key>(ViewerFilter filter) {
<API key>.add(filter);
}
/**
* {@inheritDoc}
*
* @see org.wso2.developerstudio.eclipse.gmf.esb.parts.<API key>#<API key>(EObject element)
*
*/
public boolean <API key>(EObject element) {
return ((<API key>)commentMediators.getInput()).contains(element);
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.<API key>#getTitle()
*
*/
public String getTitle() {
return EsbMessages.<API key>;
}
// Start of user code additional methods
// End of user code
}
|
// <API key>.h
// IOSDuoduo
#import "DDSuperAPI.h"
@interface <API key> : DDSuperAPI<<API key>>
@end
|
package org.apereo.cas.adaptors.duo.web.flow;
import org.apereo.cas.adaptors.duo.<API key>;
import org.apereo.cas.configuration.<API key>;
import org.apereo.cas.configuration.model.support.mfa.<API key><API key>;
import org.apereo.cas.web.flow.configurer.<API key>;
import org.junit.jupiter.api.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.<API key>;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.<API key>;
import org.springframework.webflow.definition.registry.<API key>;
/**
* This is {@link <API key>}.
*
* @author Misagh Moayyed
* @since 6.2.0
*/
@SpringBootTest(classes = <API key>.<API key>.class,
properties = {
"cas.authn.mfa.duo[0].duo-secret-key=1234567890",
"cas.authn.mfa.duo[0].duo-application-key=abcdefghijklmnop",
"cas.authn.mfa.duo[0].duo-integration-key=QRSTUVWXYZ",
"cas.authn.mfa.duo[0].duo-api-host=theapi.duosecurity.com",
"cas.authn.mfa.duo[0].<API key>=true",
"cas.authn.mfa.trusted.core.<API key>=true"
})
@<API key>(<API key>.class)
@Tag("WebflowMfaConfig")
public class <API key> extends <API key> {
@Autowired
private <API key> applicationContext;
@Override
protected <API key> <API key>() {
return this.applicationContext.getBean(<API key><API key>.DEFAULT_IDENTIFIER, <API key>.class);
}
@Override
protected String <API key>() {
return <API key><API key>.DEFAULT_IDENTIFIER;
}
}
|
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//Registers group
namespace Spi1SpiCntrl{ ///<Control and Status Register
using Addr = Register::Address<0x40034000,0xff210000,0x00000000,unsigned>;
Go and Busy Status1 = In master mode, writing 1 to this bit to start the SPI data transfer; in slave mode, writing 1 to this bit indicates that the slave is ready to communicate with a master.0 = Writing 0 to this bit to stop data transfer if SPI is transferring.During the data transfer, this bit keeps the value of 1. As the transfer is finished, this bit will be cleared automatically.NOTE: All registers should be set before writing 1 to this GO_BUSY bit. The transfer result will be unpredictable if software changes related settings when GO_BUSY bit is 1.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::Access<Register::AccessType::readWrite,Register::ReadActionType::normal,Register::<API key>::modify>,unsigned> goBusy{};
Receive At Negative Edge1 = The received data input signal is latched at the falling edge of SPICLK.0 = The received data input signal is latched at the rising edge of SPICLK.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rxNeg{};
Transmit At Negative Edge1 = The transmitted data output signal is changed at the falling edge of SPICLK.0 = The transmitted data output signal is changed at the rising edge of SPICLK.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> txNeg{};
Transmit Bit LengthThis field specifies how many bits are transmitted in one transaction. Up to 32 bits can be transmitted.TX_BIT_LEN = 0x01 ... 1 bitTX_BIT_LEN = 0x02 ... 2 bits......TX_BIT_LEN = 0x1f ... 31 bitsTX_BIT_LEN = 0x00 .. 32 bits
constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,3),Register::ReadWriteAccess,unsigned> txBitLen{};
Numbers of Transmit/Receive WordThis field specifies how many transmit/receive word numbers should be executed in one transfer.00 = Only one transmit/receive word will be executed in one transfer.01 = Two successive transmit/receive words will be executed in one transfer. (burst mode)10 = Reserved.11 = Reserved.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> txNum{};
LSB First1 = The LSB is sent first on the line (bit 0 of SPI_TX0/1), and the first bit received from the line will be put in the LSB position of the RX register (bit 0 of SPI_RX0/1).0 = The MSB is transmitted/received first (which bit in SPI_TX0/1 and SPI_RX0/1 register that is depends on the TX_BIT_LEN field).
constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,10),Register::ReadWriteAccess,unsigned> lsb{};
Clock Polarity1 = SPICLK idle high.0 = SPICLK idle low.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,11),Register::ReadWriteAccess,unsigned> clkp{};
Suspend Interval (master only)These four bits provide configurable suspend interval between two successive transmit/receive transactions in a transfer. The suspend interval is from the last falling clock edge of the current transaction to the first rising clock edge of the successive transaction if CLKP = 0. If CLKP = 1, the interval is from the rising clock edge to the falling clock edge. The default value is 0x0. When TX_NUM = 00b, setting this field has no effect on transfer. The desired suspend interval is obtained according to the following equation:(SP_CYCLE[3:0] + 2)*period of SPI clockSP_CYCLE = 0x0 ... 2 SPICLK clock cycleSP_CYCLE = 0x1 ... 3 SPICLK clock cycle......SP_CYCLE = 0xe ... 16 SPICLK clock cycleSP_CYCLE = 0xf ... 17 SPICLK clock cycle
constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,12),Register::ReadWriteAccess,unsigned> spCycle{};
Interrupt Flag1 = It indicates that the transfer is done. The interrupt flag is set if it was enable.0 = It indicates that the transfer does not finish yet.NOTE: This bit can be cleared by writing 1 to itself.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(16,16),Register::Access<Register::AccessType::readWrite,Register::ReadActionType::normal,Register::<API key>::oneToClear>,unsigned> if_{};
Interrupt Enable1 = Enable MICROWIRE/SPI Interrupt.0 = Disable MICROWIRE/SPI Interrupt.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,17),Register::ReadWriteAccess,unsigned> ie{};
SLAVE Mode Indication1 = Slave mode.0 = Master mode.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(18,18),Register::ReadWriteAccess,unsigned> slave{};
Reorder Mode Select00 = Disable both byte reorder and byte suspend functions.01 = Enable byte reorder function and insert a byte suspend interval (2~17 SPICLK cycles) among each byte. The setting of TX_BIT_LEN must be configured as 0x00. (32 bits/word).10 = Enable byte reorder function, but disable byte suspend function.11 = Disable byte reorder function, but insert a suspend interval (2~17 SPICLK cycles) among each byte. The setting of TX_BIT_LEN must be configured as 0x00. (32 bits/word).Byte reorder function is only available if TX_BIT_LEN is defined as 16, 24 and 32.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(20,19),Register::ReadWriteAccess,unsigned> reorder{};
Two Bits Transfer Mode Active1 = Enable two-bit transfer mode.0 = disable two-bit transfer mode.Note that when enable TWOB, the serial transmitted 2-bit data output are from SPI_TX1/0, and the received 2-bit data input are put in SPI_RX1/0.Note that when enable TWOB, the setting of TX_NUM must be programmed as 0x00.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(22,22),Register::ReadWriteAccess,unsigned> twob{};
Variable Clock Enable (master only)1 = The serial clock output frequency is variable. The output frequency is decided by the value of VARCLK, DIVIDER, and DIVIDER2.0 = The serial clock output frequency is fixed and decided only by the value of DIVIDER. Note that when enable this VARCLK_EN bit, the setting of TX_BIT_LEN must be programmed as 0x10 (16 bits mode)
constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,23),Register::ReadWriteAccess,unsigned> varclkEn{};
}
namespace Spi1SpiDivider{ ///<Clock Divider Register
using Addr = Register::Address<0x40034004,0x00000000,0x00000000,unsigned>;
Clock Divider Register (master only) The value in this field is the frequency divider of the system clock, PCLK, to generate the serial clock on the output SPICLK. The desired frequency is obtained according to the following equation:fsclk = fpclk / ((DIVIDER+1)*2)In slave mode, the period of SPI clock driven by a master shall equal or over 5 times the period of PCLK. In other words, the maximum frequency of SPI clock is the fifth of the frequency of slave's PCLK.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> divider{};
Clock Divider 2 Register (master only) The value in this field is the 2nd frequency divider of the system clock, PCLK, to generate the serial clock on the output SPICLK. The desired frequency is obtained according to the following equation:fsclk = fpclk / ((DIVIDER2+1)*2)
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,16),Register::ReadWriteAccess,unsigned> divider2{};
}
namespace Spi1SpiSsr{ ///<Slave Select Register
using Addr = Register::Address<0x40034008,0xffffffc0,0x00000000,unsigned>;
Slave Select Register (master only)If AUTOSS bit is cleared, writing 1 to any bit location of this field sets the proper SPISSx0/1 line to an active state and writing 0 sets the line back to inactive state.If AUTOSS bit is set, writing 1 to any bit location of this field will select appropriate SPISSx0/1 line to be automatically driven to active state for the duration of the transmit/receive, and will be driven to inactive state for the rest of the time. (The active level of SPISSx0/1 is specified in SS_LVL).Note: 1. This interface can only drive one device/slave at a given time. Therefore, the slave select pin of the selected device must be set to its active level before starting any read or write transfer. 2. SPISSx0 is also defined as device/slave select input signal in slave mode.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> ssr{};
Slave Select Active LevelIt defines the active level of slave select signal (SPISSx0/1). 1 = The slave select signal SPISSx0/1 is active at high-level/rising-edge.0 = The slave select signal SPISSx0/1 is active at low-level/falling-edge..
constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> ssLvl{};
Automatic Slave Select (master only)1 = If this bit is set, SPISSx0/1 signals are generated automatically. It means that slave select signal, which is set in SSR[1:0] register is asserted by the SPI controller when transmit/receive is started by setting GO_BUSY, and is de-asserted after each transmit/receive is finished.0 = If this bit is cleared, slave select signals are asserted and de-asserted by setting and clearing related bits in SSR[1:0] register.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> autoss{};
Slave Select Level Trigger (slave only)1: The slave select signal will be level-trigger. It depends on SS_LVL to decide the signal is active low or active high.0: The input slave select signal is edge-trigger. This is default value.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,unsigned> ssLtrig{};
Level Trigger FlagWhen the SS_LTRIG bit is set in slave mode, this bit can be read to indicate the received bit number is met the requirement or not.1 = The transaction number and the transferred bit length met the specified requirements which defined in TX_NUM and TX_BIT_LEN.0 = The transaction number or the transferred bit length of one transaction doesn't meet the specified requirements.Note: This bit is READ only
constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::<API key>::normal>,unsigned> ltrigFlag{};
}
namespace Spi1SpiRx0{ ///<Data Receive Register 0
using Addr = Register::Address<0x40034010,0x00000000,0x00000000,unsigned>;
Data Receive RegisterThe Data Receive Registers hold the value of received data of the last executed transfer. The number of valid bits depend on the transmit bit length field in the SPI_CNTRL register. For example, if TX_BIT_LEN is set to 0x08 and TX_NUM is set to 0x0, bit RX0[7:0] holds the received data.NOTE: The Data Receive Registers are read only registers.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::<API key>::normal>,unsigned> rx{};
}
namespace Spi1SpiRx1{ ///<Data Receive Register 1
using Addr = Register::Address<0x40034014,0x00000000,0x00000000,unsigned>;
Data Receive RegisterThe Data Receive Registers hold the value of received data of the last executed transfer. The number of valid bits depend on the transmit bit length field in the SPI_CNTRL register. For example, if TX_BIT_LEN is set to 0x08 and TX_NUM is set to 0x0, bit RX0[7:0] holds the received data.NOTE: The Data Receive Registers are read only registers.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::<API key>::normal>,unsigned> rx{};
}
namespace Spi1SpiTx0{ ///<Data Transmit Register 0
using Addr = Register::Address<0x40034020,0x00000000,0x00000000,unsigned>;
Data Transmit RegisterThe Data Transmit Registers hold the data to be transmitted in the next transfer. The number of valid bits depend on the transmit bit length field in the CNTRL register. For example, if TX_BIT_LEN is set to 0x08 and the TX_NUM is set to 0x0, the bit TX0[7:0] will be transmitted in next transfer. If TX_BIT_LEN is set to 0x00 and TX_NUM is set to 0x1, the core will perform two successive 32-bit transmit/receive using the same setting (the order is TX0[31:0], TX1[31:0]).
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::<API key>::normal>,unsigned> tx{};
}
namespace Spi1SpiTx1{ ///<Data Transmit Register 1
using Addr = Register::Address<0x40034024,0x00000000,0x00000000,unsigned>;
Data Transmit RegisterThe Data Transmit Registers hold the data to be transmitted in the next transfer. The number of valid bits depend on the transmit bit length field in the CNTRL register. For example, if TX_BIT_LEN is set to 0x08 and the TX_NUM is set to 0x0, the bit TX0[7:0] will be transmitted in next transfer. If TX_BIT_LEN is set to 0x00 and TX_NUM is set to 0x1, the core will perform two successive 32-bit transmit/receive using the same setting (the order is TX0[31:0], TX1[31:0]).
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::<API key>::normal>,unsigned> tx{};
}
namespace Spi1SpiVarclk{ ///<Variable Clock Pattern Register
using Addr = Register::Address<0x40034034,0x00000000,0x00000000,unsigned>;
Variable Clock Pattern The value in this field is the frequency patterns of the SPI clock. If the bit patterns of VARCLK are 0, the output frequency of SPICLK is according the value of DIVIDER. If the bit patterns of VARCLK are 1, the output frequency of SPICLK is according the value of DIVIDER2. Refer to register SPI_DIVIDER.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::ReadWriteAccess,unsigned> varclk{};
}
namespace Spi1SpiDma{ ///<SPI DMA control register
using Addr = Register::Address<0x40034038,0xfffffffc,0x00000000,unsigned>;
Transmit DMA startSet this bit to 1 will start the transmit DMA process. SPI module will issue request to DMA module automatically. If using DMA mode to transfer data, remember not to set GO_BUSY bit of SPI_CNTRL register. The DMA controller inside SPI module will set it automatically whenever necessary.Hardware will clear this bit automatically after DMA transfer done.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> txDmaGo{};
Receive DMA startSet this bit to 1 will start the receive DMA process. SPI module will issue request to DMA module automatically. Hardware will clear this bit automatically after DMA transfer done.
constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rxDmaGo{};
}
}
|
<html><head><link rel="stylesheet" type="text/css" href="http://daisydiff.googlecode.com/files/diff.css"></link></head>
<p>This is a <u>sample paragraph that will be <span class="diff-html-removed" id="removed-diff-0" previous="first-diff" changeId="removed-diff-0" next="added-diff-0">used</span><span class="diff-html-added" id="added-diff-0" previous="removed-diff-0" changeId="added-diff-0" next="last-diff">useful</span></u><span class="diff-html-added" previous="removed-diff-0" changeId="added-diff-0" next="last-diff"> </span>for tests.</p>
</html>
|
package healthcheck
import (
"fmt"
"net/http"
"strconv"
log "github.com/Sirupsen/logrus"
)
func healthcheck(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "ok")
}
func StartHealthCheck(port int) error {
if port <= 0 || port > 65535 {
return fmt.Errorf("Invalid health check port number: %v", port)
}
http.HandleFunc("/healthcheck", healthcheck)
p := ":" + strconv.Itoa(port)
log.Infof("Listening for health checks on 0.0.0.0%v/healthcheck", p)
err := http.ListenAndServe(p, nil)
return err
}
|
package calls
import (
"errors"
"math/rand"
"time"
"github.com/mesos/mesos-go/api/v1/lib"
"github.com/mesos/mesos-go/api/v1/lib/scheduler"
)
// Filters sets a scheduler.Call's internal Filters, required for Accept and Decline calls.
func Filters(fo ...mesos.FilterOpt) scheduler.CallOpt {
return func(c *scheduler.Call) {
switch c.Type {
case scheduler.Call_ACCEPT:
c.Accept.Filters = mesos.OptionalFilters(fo...)
case scheduler.<API key>:
c.AcceptInverseOffers.Filters = mesos.OptionalFilters(fo...)
case scheduler.Call_DECLINE:
c.Decline.Filters = mesos.OptionalFilters(fo...)
case scheduler.<API key>:
c.<API key>.Filters = mesos.OptionalFilters(fo...)
default:
panic("filters not supported for type " + c.Type.String())
}
}
}
// <API key> returns a calls.Filters option that sets RefuseSeconds to a random number
// of seconds between 0 and the given duration.
func <API key>(r *rand.Rand, d time.Duration) scheduler.CallOpt {
return Filters(func(f *mesos.Filters) {
s := time.Duration(r.Int63n(int64(d))).Seconds()
f.RefuseSeconds = &s
})
}
// RefuseSeconds returns a calls.Filters option that sets RefuseSeconds to the given duration
func RefuseSeconds(d time.Duration) scheduler.CallOpt {
asFloat := d.Seconds()
return Filters(func(f *mesos.Filters) {
f.RefuseSeconds = &asFloat
})
}
// Framework sets a scheduler.Call's FrameworkID
func Framework(id string) scheduler.CallOpt {
return func(c *scheduler.Call) {
c.FrameworkID = &mesos.FrameworkID{Value: id}
}
}
// Subscribe returns a subscribe call with the given parameters.
// The call's FrameworkID is automatically filled in from the info specification.
func Subscribe(info *mesos.FrameworkInfo) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_SUBSCRIBE,
FrameworkID: info.GetID(),
Subscribe: &scheduler.Call_Subscribe{FrameworkInfo: info},
}
}
// SubscribeTo returns an option that configures a SUBSCRIBE call w/ a framework ID.
// If frameworkID is "" then the SUBSCRIBE call is cleared of all framework ID references.
// Panics if the call does not contain a non-nil Subscribe reference.
func SubscribeTo(frameworkID string) scheduler.CallOpt {
return func(call *scheduler.Call) {
if call.Subscribe == nil {
panic("illegal call option: Call.Subscribe was unexpectedly nil")
}
var frameworkProto *mesos.FrameworkID
if frameworkID != "" {
frameworkProto = &mesos.FrameworkID{Value: frameworkID}
}
call.Subscribe.FrameworkInfo.ID = frameworkProto
call.FrameworkID = frameworkProto
}
}
type acceptBuilder struct {
offerIDs map[mesos.OfferID]struct{}
operations []mesos.Offer_Operation
}
type AcceptOpt func(*acceptBuilder)
type OfferOperations []mesos.Offer_Operation
// WithOffers allows a client to pair some set of OfferOperations with multiple resource offers.
// Example: calls.Accept(calls.OfferOperations{calls.OpLaunch(tasks...)}.WithOffers(offers...))
func (ob OfferOperations) WithOffers(ids ...mesos.OfferID) AcceptOpt {
return func(ab *acceptBuilder) {
for i := range ids {
ab.offerIDs[ids[i]] = struct{}{}
}
ab.operations = append(ab.operations, ob...)
}
}
// Accept returns an accept call with the given parameters.
// Callers are expected to fill in the FrameworkID and Filters.
func Accept(ops ...AcceptOpt) *scheduler.Call {
ab := &acceptBuilder{
offerIDs: make(map[mesos.OfferID]struct{}, len(ops)),
}
for _, op := range ops {
op(ab)
}
offerIDs := make([]mesos.OfferID, 0, len(ab.offerIDs))
for id := range ab.offerIDs {
offerIDs = append(offerIDs, id)
}
return &scheduler.Call{
Type: scheduler.Call_ACCEPT,
Accept: &scheduler.Call_Accept{
OfferIDs: offerIDs,
Operations: ab.operations,
},
}
}
// AcceptInverseOffers returns an <API key> call for the given offer IDs.
// Callers are expected to fill in the FrameworkID and Filters.
func AcceptInverseOffers(offerIDs ...mesos.OfferID) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.<API key>,
AcceptInverseOffers: &scheduler.<API key>{
InverseOfferIDs: offerIDs,
},
}
}
// <API key> returns a <API key> call for the given offer IDs.
// Callers are expected to fill in the FrameworkID and Filters.
func <API key>(offerIDs ...mesos.OfferID) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.<API key>,
<API key>: &scheduler.<API key>{
InverseOfferIDs: offerIDs,
},
}
}
// OpLaunch returns a launch operation builder for the given tasks
func OpLaunch(ti ...mesos.TaskInfo) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
Launch: &mesos.<API key>{
TaskInfos: ti,
},
}
}
func OpLaunchGroup(ei mesos.ExecutorInfo, ti ...mesos.TaskInfo) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
LaunchGroup: &mesos.<API key>{
Executor: ei,
TaskGroup: mesos.TaskGroupInfo{
Tasks: ti,
},
},
}
}
func OpReserve(rs ...mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
Reserve: &mesos.<API key>{
Resources: rs,
},
}
}
func OpUnreserve(rs ...mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
Unreserve: &mesos.<API key>{
Resources: rs,
},
}
}
func OpCreate(rs ...mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
Create: &mesos.<API key>{
Volumes: rs,
},
}
}
func OpDestroy(rs ...mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
Destroy: &mesos.<API key>{
Volumes: rs,
},
}
}
func OpGrowVolume(v mesos.Resource, a mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
GrowVolume: &mesos.<API key>{
Volume: v,
Addition: a,
},
}
}
func OpShrinkVolume(v mesos.Resource, s mesos.Value_Scalar) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
ShrinkVolume: &mesos.<API key>{
Volume: v,
Subtract: s,
},
}
}
func OpCreateDisk(src mesos.Resource, t mesos.<API key>) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
CreateDisk: &mesos.<API key>{
Source: src,
TargetType: t,
},
}
}
func OpDestroyDisk(src mesos.Resource) mesos.Offer_Operation {
return mesos.Offer_Operation{
Type: mesos.<API key>,
DestroyDisk: &mesos.<API key>{
Source: src,
},
}
}
// Revive returns a revive call.
// Callers are expected to fill in the FrameworkID.
func Revive() *scheduler.Call {
return &scheduler.Call{Type: scheduler.Call_REVIVE}
}
// Revive returns a revive call with the given filters.
// Callers are expected to fill in the FrameworkID.
func ReviveWith(roles []string) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_REVIVE,
Revive: &scheduler.Call_Revive{Roles: roles},
}
}
// Suppress returns a suppress call.
// Callers are expected to fill in the FrameworkID.
func Suppress() *scheduler.Call {
return &scheduler.Call{Type: scheduler.Call_SUPPRESS}
}
// Suppress returns a suppress call with the given filters.
// Callers are expected to fill in the FrameworkID.
func SuppressWith(roles []string) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_SUPPRESS,
Suppress: &scheduler.Call_Suppress{Roles: roles},
}
}
// Decline returns a decline call with the given parameters.
// Callers are expected to fill in the FrameworkID and Filters.
func Decline(offerIDs ...mesos.OfferID) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_DECLINE,
Decline: &scheduler.Call_Decline{
OfferIDs: offerIDs,
},
}
}
// Kill returns a kill call with the given parameters.
// Callers are expected to fill in the FrameworkID.
func Kill(taskID, agentID string) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_KILL,
Kill: &scheduler.Call_Kill{
TaskID: mesos.TaskID{Value: taskID},
AgentID: optionalAgentID(agentID),
},
}
}
// Shutdown returns a shutdown call with the given parameters.
// Callers are expected to fill in the FrameworkID.
func Shutdown(executorID, agentID string) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_SHUTDOWN,
Shutdown: &scheduler.Call_Shutdown{
ExecutorID: mesos.ExecutorID{Value: executorID},
AgentID: mesos.AgentID{Value: agentID},
},
}
}
// Acknowledge returns an acknowledge call with the given parameters.
// Callers are expected to fill in the FrameworkID.
func Acknowledge(agentID, taskID string, uuid []byte) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_ACKNOWLEDGE,
Acknowledge: &scheduler.Call_Acknowledge{
AgentID: mesos.AgentID{Value: agentID},
TaskID: mesos.TaskID{Value: taskID},
UUID: uuid,
},
}
}
// ReconcileTasks constructs a []Call_Reconcile_Task from the given mappings:
// map[string]string{taskID:agentID}
// Map keys (taskID's) are required to be non-empty, but values (agentID's) *may* be empty.
func ReconcileTasks(tasks map[string]string) scheduler.ReconcileOpt {
return func(cr *scheduler.Call_Reconcile) {
if len(tasks) == 0 {
cr.Tasks = nil
return
}
result := make([]scheduler.Call_Reconcile_Task, len(tasks))
i := 0
for k, v := range tasks {
result[i].TaskID = mesos.TaskID{Value: k}
result[i].AgentID = optionalAgentID(v)
i++
}
cr.Tasks = result
}
}
// Reconcile returns a reconcile call with the given parameters.
// See ReconcileTask.
// Callers are expected to fill in the FrameworkID.
func Reconcile(opts ...scheduler.ReconcileOpt) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_RECONCILE,
Reconcile: (&scheduler.Call_Reconcile{}).With(opts...),
}
}
// Message returns a message call with the given parameters.
// Callers are expected to fill in the FrameworkID.
func Message(agentID, executorID string, data []byte) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_MESSAGE,
Message: &scheduler.Call_Message{
AgentID: mesos.AgentID{Value: agentID},
ExecutorID: mesos.ExecutorID{Value: executorID},
Data: data,
},
}
}
// Request returns a resource request call with the given parameters.
// Callers are expected to fill in the FrameworkID.
func Request(requests ...mesos.Request) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.Call_REQUEST,
Request: &scheduler.Call_Request{
Requests: requests,
},
}
}
func optionalAgentID(agentID string) *mesos.AgentID {
if agentID == "" {
return nil
}
return &mesos.AgentID{Value: agentID}
}
func <API key>(id string) *mesos.ResourceProviderID {
if id == "" {
return nil
}
return &mesos.ResourceProviderID{Value: id}
}
func errInvalidCall(reason string) error {
return errors.New("invalid call: " + reason)
}
// <API key> acks the receipt of an operation status update. Schedulers are responsible for
// explicitly acknowledging the receipt of updates which have the '<API key>.status().uuid()'
// field set. Such status updates are retried by the agent or resource provider until they are acknowledged by the scheduler.
// agentID and resourceProviderID are optional, the remaining fields are required.
func <API key>(agentID, resourceProviderID string, uuid []byte, operationID string) *scheduler.Call {
return &scheduler.Call{
Type: scheduler.<API key>,
<API key>: &scheduler.<API key>{
AgentID: optionalAgentID(agentID),
ResourceProviderID: <API key>(resourceProviderID),
UUID: uuid,
OperationID: mesos.OperationID{Value: operationID},
},
}
}
// <API key> is a convenience type for which each instance maps to an instance of
// scheduler.<API key>.
type <API key> struct {
OperationID string // OperationID is required
AgentID string // AgentID is optional
ResourceProviderID string // ResourceProviderID is optional
}
// ReconcileOperations allows the scheduler to query the status of operations. This causes the master to send
// back the latest status for each operation in 'req', if possible. If 'req' is empty, then the master will send
// the latest status for each operation currently known.
func ReconcileOperations(req []<API key>) *scheduler.Call {
var operations []scheduler.<API key>
for i := range req {
operations = append(operations, scheduler.<API key>{
OperationID: mesos.OperationID{Value: req[i].OperationID},
AgentID: optionalAgentID(req[i].AgentID),
ResourceProviderID: <API key>(req[i].ResourceProviderID),
})
}
return &scheduler.Call{
Type: scheduler.<API key>,
ReconcileOperations: &scheduler.<API key>{
Operations: operations,
},
}
}
// UpdateFramework updates the FrameworkInfo. All fields can be updated except for:
// * FrameworkInfo.checkpoint
// * FrameworkInfo.principal
// * FrameworkInfo.user
// The call returns after the update is either applied completely or
// not applied at all. No incomplete updates occur.
// The HTTP response codes specific to this call are:
// * 200 OK: update operation was successfully completed.
// * 400 Bad Request: the requested update is not valid.
// * 403 Forbidden: framework is not authorized to use some entities
// requested by the update (e.g. not authorized to use some of the
// supplied roles).
// * 409 Conflict: framework disappeared while this call was being processed
// (example: the framework was removed by a concurrent TEARDOWN call).
func UpdateFramework(fi mesos.FrameworkInfo, options ...func(*scheduler.<API key>)) *scheduler.Call {
c := &scheduler.Call{
Type: scheduler.<API key>,
UpdateFramework: &scheduler.<API key>{
FrameworkInfo: fi,
},
}
for _, f := range options {
if f != nil {
f(c.UpdateFramework)
}
}
return c
}
|
[%- i.develooper.weight=2;
i.develooper.data = BLOCK %]
<a href="http://develooper.com">
<img class="border" border="0" src="[% combust.static_url("/images/friends/develooperlogo-160t.png") %]" height="36" width="160" alt="Develooper" />Perl Consulting
</a>
[%- END %]
[%- i.yellowbot.weight=10;
i.yellowbot.data = BLOCK %]
<a href="http:
<img class="border" border="0" src="[% combust.static_url("/images/friends/yellowbot.gif") %]"
width="150" height="40" alt="YellowBot" />Local Search
</a>
[%- END %]
[%- i.dc.weight=2;
i.dc.data = BLOCK %]
<a href="http:
<img class="border" border="0" src="[% combust.static_url("/images/friends/digital_craftsmen.png") %]" height="56" width="142" alt="Digital Craftsmen" />bespoke hosting services
</a>
[%- END %]
[%- i.phyber.weight=4;
i.phyber.data = BLOCK %]
<a href="http:
<img class="border" border="0" src="[% combust.static_url("/images/friends/phyber.png") %]" height="54" width="150" alt="Phyber Communications" />Networking and Colocation
</a>
[%- END %]
[% TRY %]
[%- USE Rotato(i) %]
[%- Rotato.pick(h) %]
[% CATCH %]
[%
# This does not weight the advert
USE Shuffle;
sponsors = i.keys;
s = sponsors.shuffle.shift;
i.$s.data;
%]
[% END %]
|
package Entities;
import java.awt.Image;
import java.awt.geom.Rectangle2D;
public abstract class SceneToolkit {
public Image[] background;
public Integer x[];
public Integer y[];
public Integer w[];
public Integer h[];
public SceneToolkit(Integer[] x, Integer[] y, Integer[] w, Integer[] h){
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
public Rectangle2D getRectangle(int i,int p){
return new Rectangle2D.Double(x[i],y[p],w[i],h[p]);
}
}
|
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/type/tracing/v2/custom_tag.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef <API key>
#define <API key>
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct <API key>;
struct <API key>;
struct <API key>;
struct <API key>;
struct <API key>;
typedef struct <API key> <API key>;
typedef struct <API key> <API key>;
typedef struct <API key> <API key>;
typedef struct <API key> <API key>;
typedef struct <API key> <API key>;
extern const upb_msglayout <API key>;
extern const upb_msglayout <API key>;
extern const upb_msglayout <API key>;
extern const upb_msglayout <API key>;
extern const upb_msglayout <API key>;
struct <API key>;
struct <API key>;
extern const upb_msglayout <API key>;
extern const upb_msglayout <API key>;
/* envoy.type.tracing.v2.CustomTag */
UPB_INLINE <API key> *<API key>(upb_arena *arena) {
return (<API key> *)upb_msg_new(&<API key>, arena);
}
UPB_INLINE <API key> *<API key>(const char *buf, size_t size,
upb_arena *arena) {
<API key> *ret = <API key>(arena);
return (ret && upb_decode(buf, size, ret, &<API key>, arena)) ? ret : NULL;
}
UPB_INLINE char *<API key>(const <API key> *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &<API key>, arena, len);
}
typedef enum {
<API key> = 2,
<API key> = 3,
<API key> = 4,
<API key> = 5,
<API key> = 0
} <API key>;
UPB_INLINE <API key> <API key>(const <API key>* msg) { return (<API key>)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool <API key>(const <API key> *msg) { return <API key>(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const <API key>* <API key>(const <API key> *msg) { return UPB_READ_ONEOF(msg, const <API key>*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool <API key>(const <API key> *msg) { return <API key>(msg, UPB_SIZE(12, 24), 3); }
UPB_INLINE const <API key>* <API key>(const <API key> *msg) { return UPB_READ_ONEOF(msg, const <API key>*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
UPB_INLINE bool <API key>(const <API key> *msg) { return <API key>(msg, UPB_SIZE(12, 24), 4); }
UPB_INLINE const <API key>* <API key>(const <API key> *msg) { return UPB_READ_ONEOF(msg, const <API key>*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
UPB_INLINE bool <API key>(const <API key> *msg) { return <API key>(msg, UPB_SIZE(12, 24), 5); }
UPB_INLINE const <API key>* <API key>(const <API key> *msg) { return UPB_READ_ONEOF(msg, const <API key>*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void <API key>(<API key> *msg, <API key>* value) {
UPB_WRITE_ONEOF(msg, <API key>*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
UPB_INLINE void <API key>(<API key> *msg, <API key>* value) {
UPB_WRITE_ONEOF(msg, <API key>*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
UPB_INLINE void <API key>(<API key> *msg, <API key>* value) {
UPB_WRITE_ONEOF(msg, <API key>*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
UPB_INLINE void <API key>(<API key> *msg, <API key>* value) {
UPB_WRITE_ONEOF(msg, <API key>*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
/* envoy.type.tracing.v2.CustomTag.Literal */
UPB_INLINE <API key> *<API key>(upb_arena *arena) {
return (<API key> *)upb_msg_new(&<API key>, arena);
}
UPB_INLINE <API key> *<API key>(const char *buf, size_t size,
upb_arena *arena) {
<API key> *ret = <API key>(arena);
return (ret && upb_decode(buf, size, ret, &<API key>, arena)) ? ret : NULL;
}
UPB_INLINE char *<API key>(const <API key> *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &<API key>, arena, len);
}
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
/* envoy.type.tracing.v2.CustomTag.Environment */
UPB_INLINE <API key> *<API key>(upb_arena *arena) {
return (<API key> *)upb_msg_new(&<API key>, arena);
}
UPB_INLINE <API key> *<API key>(const char *buf, size_t size,
upb_arena *arena) {
<API key> *ret = <API key>(arena);
return (ret && upb_decode(buf, size, ret, &<API key>, arena)) ? ret : NULL;
}
UPB_INLINE char *<API key>(const <API key> *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &<API key>, arena, len);
}
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); }
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value;
}
/* envoy.type.tracing.v2.CustomTag.Header */
UPB_INLINE <API key> *<API key>(upb_arena *arena) {
return (<API key> *)upb_msg_new(&<API key>, arena);
}
UPB_INLINE <API key> *<API key>(const char *buf, size_t size,
upb_arena *arena) {
<API key> *ret = <API key>(arena);
return (ret && upb_decode(buf, size, ret, &<API key>, arena)) ? ret : NULL;
}
UPB_INLINE char *<API key>(const <API key> *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &<API key>, arena, len);
}
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); }
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value;
}
/* envoy.type.tracing.v2.CustomTag.Metadata */
UPB_INLINE <API key> *<API key>(upb_arena *arena) {
return (<API key> *)upb_msg_new(&<API key>, arena);
}
UPB_INLINE <API key> *<API key>(const char *buf, size_t size,
upb_arena *arena) {
<API key> *ret = <API key>(arena);
return (ret && upb_decode(buf, size, ret, &<API key>, arena)) ? ret : NULL;
}
UPB_INLINE char *<API key>(const <API key> *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &<API key>, arena, len);
}
UPB_INLINE const struct <API key>* <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, const struct <API key>*, UPB_SIZE(8, 16)); }
UPB_INLINE const struct <API key>* <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, const struct <API key>*, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview <API key>(const <API key> *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE void <API key>(<API key> *msg, struct <API key>* value) {
UPB_FIELD_AT(msg, struct <API key>*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
UPB_INLINE void <API key>(<API key> *msg, struct <API key>* value) {
UPB_FIELD_AT(msg, struct <API key>*, UPB_SIZE(12, 24)) = value;
}
UPB_INLINE struct <API key>* <API key>(<API key> *msg, upb_arena *arena) {
struct <API key>* sub = (struct <API key>*)<API key>(msg);
if (sub == NULL) {
sub = (struct <API key>*)upb_msg_new(&<API key>, arena);
if (!sub) return NULL;
<API key>(msg, sub);
}
return sub;
}
UPB_INLINE void <API key>(<API key> *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* <API key> */
|
<div class="row">
<div class="col-md-4 col-sm-12">
<span data-ng-repeat="userGroup in userGroupByUserList" >
<span class="label label-info label-left" data-ng-if="userGroup.userType!='A'">
{{userGroup.userName}}
</span>
</span>
<div class="list-group-item" data-ng-repeat="userRequirement in requirementList" >
{{userRequirement.competenceName}}
<span data-ng-if="userRequirement.specialization">{{'<API key>'+userRequirement.specialization | i18n}}</span>
<span data-ng-if="userRequirement.<API key>>0">:{{userRequirement.<API key>}} {{'COMPETENCE_UNIT_'+userRequirement.complianceUnit | i18n}}</span>
</div>
</div>
<div class="col-md-8 col-sm-12">
</div>
</div>
|
#pragma once
#include <aws/wafv2/WAFV2_EXPORTS.h>
#include <aws/wafv2/WAFV2Request.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/wafv2/model/Scope.h>
#include <utility>
namespace Aws
{
namespace WAFV2
{
namespace Model
{
class AWS_WAFV2_API GetIPSetRequest : public WAFV2Request
{
public:
GetIPSetRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* <API key>() const override { return "GetIPSet"; }
Aws::String SerializePayload() const override;
Aws::Http::<API key> <API key>() const override;
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline GetIPSetRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline GetIPSetRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the IP set. You cannot change the name of an <code>IPSet</code>
* after you create it.</p>
*/
inline GetIPSetRequest& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline const Scope& GetScope() const{ return m_scope; }
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; }
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); }
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline GetIPSetRequest& WithScope(const Scope& value) { SetScope(value); return *this;}
/**
* <p>Specifies whether this is for an Amazon CloudFront distribution or for a
* regional application. A regional application can be an Application Load Balancer
* (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. </p> <p>To
* work with CloudFront, you must also specify the Region US East (N. Virginia) as
* follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront
* scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li>
* <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li>
* </ul>
*/
inline GetIPSetRequest& WithScope(Scope&& value) { SetScope(std::move(value)); return *this;}
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline GetIPSetRequest& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline GetIPSetRequest& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* <p>A unique identifier for the set. This ID is returned in the responses to
* create and list commands. You provide it to operations like update and
* delete.</p>
*/
inline GetIPSetRequest& WithId(const char* value) { SetId(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Scope m_scope;
bool m_scopeHasBeenSet;
Aws::String m_id;
bool m_idHasBeenSet;
};
} // namespace Model
} // namespace WAFV2
} // namespace Aws
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.